Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 18 functionality to return all parameters when parameter-names are not given #30

Merged
merged 22 commits into from
Feb 12, 2024

Conversation

fjugipe
Copy link
Contributor

@fjugipe fjugipe commented Feb 8, 2024

Closes #18

  • Parameter name is no longer required in the query

    • Returns all parameters and values from /locations/{id}, /position and /area endpoints without parameter name in query
      • Returns all also when parameter-name is given, but empty string
  • Updates Swagger documentation with examples of time date

  • Improves error handling

    • Return 400 with incorrect coordinates or geometric type
    • Return 400 when time date is wrong format or start time is before end time in query
  • Adds unit tests to edr api endpoints

    • Test cases with mocked functions asserting correct calls to functions
    • Test cases to check that incorrect queries returns 400 with descriptive error message

Copy link

github-actions bot commented Feb 8, 2024

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py584621%23–68
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
dependencies.py31487%23–24, 31, 38
grpc_getter.py8450%12–16
locustfile.py15150%1–31
main.py22386%27, 37, 47
metadata_endpoints.py19479%16, 33–66, 70
formatters
   \_\_init\_\_.py120100% 
   base_formatter.py7186%18
   covjson.py52198%69
routers
   \_\_init\_\_.py00100% 
   edr.py721185%38–61, 111–112, 139–140
   records.py00100% 
TOTAL33911267% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 1.756s ⏱️

Copy link
Collaborator

@Teddy-1000 Teddy-1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test looks good, added some comments in dependencies.py

api/routers/edr.py Outdated Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
@fjugipe fjugipe requested a review from Teddy-1000 February 8, 2024 13:17
.github/workflows/ci.yml Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
api/dependencies.py Outdated Show resolved Hide resolved
api/dependencies.py Show resolved Hide resolved
api/test/test_edr.py Outdated Show resolved Hide resolved
api/test/test_edr.py Outdated Show resolved Hide resolved
api/test/test_edr.py Outdated Show resolved Hide resolved
@fjugipe fjugipe requested a review from lukas-phaf February 9, 2024 09:35
api/routers/edr.py Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
api/routers/edr.py Outdated Show resolved Hide resolved
api/dependencies.py Show resolved Hide resolved
@fjugipe fjugipe requested a review from lukas-phaf February 9, 2024 14:04
api/routers/edr.py Outdated Show resolved Hide resolved
@fjugipe fjugipe dismissed Teddy-1000’s stale review February 12, 2024 07:40

Requested changes have been implemented, can be resolved.

@fjugipe fjugipe merged commit 1037d40 into main Feb 12, 2024
6 checks passed
@fjugipe fjugipe deleted the issue-18-return-all branch March 26, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add funcitonality to return all parameters when parameter_name is not given
3 participants