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

Implement first units tests and integration tests and UI tests, also set up with GitHub actions #10

Closed
3 tasks done
nuest opened this issue Apr 18, 2022 · 3 comments
Closed
3 tasks done
Assignees
Labels
enhancement New feature or request small task < 2 hours
Projects

Comments

@nuest
Copy link
Contributor

nuest commented Apr 18, 2022

Start with some reading on GitHub actions. Then implement first test cases:

  • transform HTML fragment with geodata into a Python object with GeoJSON (unit test), multiple options to support:
     <meta name="DC.Coverage" xml:lang="en" content="Earth, Europe, Republic of France, Pays de la Loire"/>
     <meta name="DC.SpatialCoverage" scheme="GeoJSON" content="{&quot;type&quot;:&quot;FeatureCollection&quot;,&quot;features&quot;:[{&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{&quot;provenance&quot;:{&quot;description&quot;:&quot;geometric shape created by user (drawing)&quot;,&quot;id&quot;:11}},&quot;geometry&quot;:{&quot;type&quot;:&quot;LineString&quot;,&quot;coordinates&quot;:[[0.19995063543319705,47.83528342275264],[-0.6350103020668031,47.80577611936812]]}}],&quot;administrativeUnits&quot;:[{&quot;name&quot;:&quot;Earth&quot;,&quot;geonameId&quot;:6295630,&quot;bbox&quot;:&quot;not available&quot;,&quot;administrativeUnitSuborder&quot;:[&quot;Earth&quot;],&quot;provenance&quot;:{&quot;description&quot;:&quot;administrative unit created by user (acceppting the suggestion of the geonames API , which was created on basis of a geometric shape input)&quot;,&quot;id&quot;:23}},{&quot;name&quot;:&quot;Europe&quot;,&quot;geonameId&quot;:6255148,&quot;bbox&quot;:{&quot;east&quot;:41.73303985595703,&quot;south&quot;:27.6377894797159,&quot;north&quot;:80.76416015625,&quot;west&quot;:-24.532675386662543},&quot;administrativeUnitSuborder&quot;:[&quot;Earth&quot;,&quot;Europe&quot;],&quot;provenance&quot;:{&quot;description&quot;:&quot;administrative unit created by user (acceppting the suggestion of the geonames API , which was created on basis of a geometric shape input)&quot;,&quot;id&quot;:23}},{&quot;name&quot;:&quot;Republic of France&quot;,&quot;geonameId&quot;:3017382,&quot;bbox&quot;:{&quot;east&quot;:9.56009360694225,&quot;south&quot;:41.3335556861592,&quot;north&quot;:51.0889894407743,&quot;west&quot;:-5.14127657354623},&quot;administrativeUnitSuborder&quot;:[&quot;Earth&quot;,&quot;Europe&quot;,&quot;Republic of France&quot;],&quot;provenance&quot;:{&quot;description&quot;:&quot;administrative unit created by user (acceppting the suggestion of the geonames API , which was created on basis of a geometric shape input)&quot;,&quot;id&quot;:23}},{&quot;name&quot;:&quot;Pays de la Loire&quot;,&quot;geonameId&quot;:2988289,&quot;bbox&quot;:{&quot;east&quot;:0.916650657911376,&quot;south&quot;:46.2666616230696,&quot;north&quot;:48.5679940644253,&quot;west&quot;:-2.62573947290169},&quot;administrativeUnitSuborder&quot;:[&quot;Earth&quot;,&quot;Europe&quot;,&quot;Republic of France&quot;,&quot;Pays de la Loire&quot;],&quot;provenance&quot;:{&quot;description&quot;:&quot;administrative unit created by user (acceppting the suggestion of the geonames API , which was created on basis of a geometric shape input)&quot;,&quot;id&quot;:23}}],&quot;temporalProperties&quot;:{&quot;unixDateRange&quot;:&quot;[1654041600000,1654214399000]&quot;,&quot;provenance&quot;:{&quot;description&quot;:&quot;temporal properties created by user&quot;,&quot;id&quot;:31}}}" />
     <meta name="geo.placename" content="Pays de la Loire" />
     <meta name="DC.box" content="name=Pays de la Loire; northlimit=48.567994064425; southlimit=46.26666162307; westlimit=-2.6257394729017; eastlimit=0.91665065791138; projection=EPSG3857" />
     <meta name="ISO 19139" content="<gmd:EX_GeographicBoundingBox><gmd:westBoundLongitude><gco:Decimal>-2.6257394729017</gco:Decimal></gmd:westBoundLongitude><gmd:eastBoundLongitude><gco:Decimal>0.91665065791138</gco:Decimal></gmd:eastBoundLongitude><gmd:southBoundLatitude><gco:Decimal>46.26666162307</gco:Decimal></gmd:southBoundLatitude><gmd:northBoundLatitude><gco:Decimal>48.567994064425</gco:Decimal></gmd:northBoundLatitude></gmd:EX_GeographicBoundingBox>" />
  • retrieve and validate geometry based on Return a single MultiPolygon geometry via the API #5 (integration test)
    • load test data into database
    • retrieve via API
    • validate response
  • UI test: is the polygon shown on the map #24

Use pytest for tests, see if https://pypi.org/project/pytest-docker-compose/ is useful.

We should use the Django testing framework, see https://docs.djangoproject.com/en/4.1/topics/testing/

@nuest nuest added the enhancement New feature or request label Apr 18, 2022
@nuest nuest added this to To do in Portal MVP via automation Apr 18, 2022
@nuest nuest added the large task > days label Jun 3, 2022
@nuest nuest changed the title Set up integration testing using GitHub actions Implement first tests and set up integration testing using GitHub actions Jun 3, 2022
@nuest nuest moved this from To do to Sprint in Portal MVP Jun 3, 2022
@nuest nuest moved this from Sprint to To do in Portal MVP Jun 3, 2022
@nuest nuest moved this from To do to Sprint in Portal MVP Jun 17, 2022
@nuest nuest moved this from Sprint to To do in Portal MVP Jun 17, 2022
@nuest nuest moved this from To do to Sprint in Portal MVP Jun 17, 2022
@nuest nuest changed the title Implement first tests and set up integration testing using GitHub actions Implement first units tests and integration tests, also set up CItesting using GitHub actions Jun 17, 2022
@nuest nuest changed the title Implement first units tests and integration tests, also set up CItesting using GitHub actions Implement first units tests and integration tests, also set up with GitHub actions Jun 17, 2022
@nuest nuest changed the title Implement first units tests and integration tests, also set up with GitHub actions Implement first units tests and integration tests and UI tests, also set up with GitHub actions Jun 17, 2022
@nuest nuest assigned nuest and unassigned nuest Jun 17, 2022
@Kirubamoh Kirubamoh moved this from Sprint to In progress in Portal MVP Jun 24, 2022
@nuest nuest self-assigned this Aug 31, 2022
@nuest nuest moved this from In progress to Sprint (current week) in Portal MVP Aug 31, 2022
@nuest
Copy link
Contributor Author

nuest commented Oct 4, 2022

Some good ideas for a GH action setup: https://banagale.com/running-django-tests-in-github-actions.htm

@nuest
Copy link
Contributor Author

nuest commented Oct 5, 2022

@nuest nuest removed this from Sprint (current week) in Portal MVP Oct 17, 2022
@nuest nuest added this to To do in Portal 1.0 via automation Oct 17, 2022
@nuest nuest moved this from To do to Sprint (this week) in Portal 1.0 Oct 17, 2022
@nuest nuest moved this from Sprint (this week) to In progress in Portal 1.0 Oct 21, 2022
@nuest
Copy link
Contributor Author

nuest commented Oct 24, 2022

The remaining task is postponed until @Kirubamoh can start working on the harvesting.

@nuest nuest moved this from In progress to Sprint (next week) in Portal 1.0 Oct 24, 2022
@nuest nuest added small task < 2 hours and removed large task > days labels Oct 24, 2022
nuest pushed a commit to nuest/optimetaPortal that referenced this issue Nov 25, 2022
minor styling updates and test data update
@nuest nuest moved this from Sprint (next week) to Sprint (this week) in Portal 1.0 Nov 25, 2022
@Kirubamoh Kirubamoh moved this from Sprint (this week) to In progress in Portal 1.0 Dec 2, 2022
@Kirubamoh Kirubamoh moved this from In progress to Done in Portal 1.0 Dec 5, 2022
@nuest nuest closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request small task < 2 hours
Projects
No open projects
Development

No branches or pull requests

2 participants