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

ObservedProperty label & test data loader through ingestion #209

Merged
merged 23 commits into from
Nov 19, 2024

Conversation

fjugipe
Copy link
Contributor

@fjugipe fjugipe commented Oct 18, 2024

  • Change ObservedProperty label to standard_name without underscores
  • Change Parameter description to have standard_name without underscores
  • Update test data to be on par with current ingest
  • Add a data loader to load test data through ingest
  • Add Dockerized unit tests for ingest
  • Update ci.yml to load test data through ingest and
  • Comment test coverage for ingest unit tests
  • Add new just commands

closes #204, closes #190

Copy link

github-actions bot commented Oct 18, 2024

Coverage

Unit Test Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
datastore_pb2.py614821%34–81
datastore_pb2_grpc.py542750%15–16, 19, 65–80, 121–123, 128–130, 135–137, 142–144, 148–173, 219, 246, 273, 300
export_metrics.py100100% 
grpc_getter.py201145%15–19, 23–26, 30–32, 36–38
locustfile.py15150%1–31
main.py43784%45, 50, 60, 70–71, 81–82
metadata_endpoints.py663252%45–54, 58, 85, 100–220, 224
response_classes.py50100% 
utilities.py1744674%20, 38, 45, 67–70, 78–89, 94–101, 121, 125, 127, 155, 161, 179, 193–194, 198, 214–218, 222–228, 232–234, 264, 268, 290, 295
custom_geo_json
   edr_feature_collection.py60100% 
formatters
   __init__.py110100% 
   covjson.py60198%91
   geojson.py21290%27, 52
openapi
   custom_dimension_examples.py40100% 
   edr_query_parameter_descriptions.py110100% 
   openapi_examples.py130100% 
routers
   __init__.py00100% 
   edr.py101496%348–349, 438–439
   feature.py471960%99–132, 148–153, 159–181
TOTAL72221271% 

Title Coverage Tests Skipped Failures Errors Time
API Unit Tests Coverage 30 0 💤 0 ❌ 0 🔥 1.798s ⏱️
Ingest Unit Tests Coverage 16 0 💤 0 ❌ 0 🔥 1m 41s ⏱️

@lukas-phaf
Copy link
Contributor

It is not clear to me why test-ingest is a separate job. I think it leads to a confusing mix of jobs and steps in the action output.

Also, the matrix of python versions leads to additional confusion, especially as it has only one version. Can we take the blue pill and comment out the whole strategy bit for now so the matrix doesn't show up?

To be honest, I also don't see the advantage of a separate publish-test-results job. It was added by @Jeffrey-Vervoort-KNMI as separation of concern. But it also adds a lot of noise (for example to retrieve the artifacts). I don't think the contents and issues permissions are needed, so I would be fine with all the main job having pull-requests permissions.

@fjugipe
Copy link
Contributor Author

fjugipe commented Oct 23, 2024

I see the point on separate jobs for tests when you trigger them for example on push to that service. Currently we don't have that, but should we? Running performance tests to the api on each push, when changes are made to ingest seems a bit unnecessary in my opinion and I personally would run them only on pull_request.

I agree with you on the changes, especially the strategy is unnecessary now that the ingest tests are run in a container. Overall I think that our workflows could have a slight rework. But in this PR I changed only minor things, since it is for another issue.

I can continue refactoring the workflows here, but I think the work should be done in a separate branch, since this PR contains changes which affect how we present the data.

Copy link
Contributor

@lukas-phaf lukas-phaf left a comment

Choose a reason for hiding this comment

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

Great improvements!

api/formatters/covjson.py Outdated Show resolved Hide resolved
datastore/data-loader/Dockerfile Show resolved Hide resolved
datastore/data-loader/client_knmi_station_ingest.py Outdated Show resolved Hide resolved
datastore/data-loader/client_knmi_station_ingest.py Outdated Show resolved Hide resolved
datastore/data-loader/requirements.txt Show resolved Hide resolved
datastore/data-loader/client_knmi_station.py Outdated Show resolved Hide resolved
datastore/data-loader/client_knmi_station.py Show resolved Hide resolved
datastore/integration-test/test_knmi.py Outdated Show resolved Hide resolved
justfile Outdated Show resolved Hide resolved
@lukas-phaf
Copy link
Contributor

lukas-phaf commented Oct 23, 2024 via email

@Jeffrey-Vervoort-KNMI
Copy link
Contributor

Jeffrey-Vervoort-KNMI commented Oct 24, 2024 via email

@lukas-phaf
Copy link
Contributor

lukas-phaf commented Nov 6, 2024

I noticed this warning when running just load, which seems a bit worrying, but I don't seem to be able to pin it down:

/usr/local/lib/python3.11/site-packages/google/protobuf/runtime_version.py:112: UserWarning: Protobuf gencode version 5.27.2 is older than the runtime version 5.28.2 at datastore.proto. Please avoid checked-in Protobuf gencode that can be obsolete.
  warnings.warn(

Edit: Oh, it looks like this a common issue...

.github/workflows/ci.yml Outdated Show resolved Hide resolved
justfile Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
@fjugipe fjugipe merged commit 3f3a241 into main Nov 19, 2024
8 checks passed
@fjugipe fjugipe deleted the issue_194_204-data-loader-to-ingest branch November 19, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants