kiwix / mirrors-qa

Q/A tools for Kiwix Download Mirrors
GNU General Public License v3.0
1 stars 0 forks source link

add region to database #42

Closed elfkuzco closed 2 months ago

elfkuzco commented 2 months ago

Rationale

Add Region table for keeping information of countries and mirror location. In order to keep the data in the db compatible with the schema changes, the region data for Country and Mirror are set to None by default. However, CLI commands which update mirrors and countries update this field accordingly.

To synchronize the data in the db fully, one should create the regions first using mirrors-qa-backend create-countries < csv-file. Afterwards, mirrors-qa-backend update-mirrors. This updates the region data for all the mirrors in the database.

This resolves #38

Changes

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 73.62637% with 24 lines in your changes missing coverage. Please review.

Project coverage is 72.75%. Comparing base (95c2609) to head (edd6bb4). Report is 4 commits behind head on main.

Files Patch % Lines
backend/src/mirrors_qa_backend/entrypoint.py 0.00% 12 Missing :warning:
backend/src/mirrors_qa_backend/db/mirrors.py 66.66% 2 Missing and 3 partials :warning:
backend/src/mirrors_qa_backend/cli/country.py 88.00% 1 Missing and 2 partials :warning:
backend/src/mirrors_qa_backend/db/region.py 81.25% 2 Missing and 1 partial :warning:
backend/src/mirrors_qa_backend/extract.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #42 +/- ## ========================================== - Coverage 72.83% 72.75% -0.08% ========================================== Files 28 30 +2 Lines 795 881 +86 Branches 70 81 +11 ========================================== + Hits 579 641 +62 - Misses 204 222 +18 - Partials 12 18 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.