Repository navigation
Get the backend test suite green and run it in CI #171
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ac98b48
Get the backend test suite green and run it in CI
duaneatat 547d4f2
Filter CDC PLACES before joining the county lines
duaneatat c995877
Merge remote-tracking branch 'origin/main' into db/backend-test-suite
duaneatat 2f4bfed
Register the county comparison template in the SQL render test
duaneatat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Backend tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "backend/**" | ||
| - ".github/workflows/backend-tests.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "backend/**" | ||
| - ".github/workflows/backend-tests.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| pytest: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| lfs: false | ||
| - uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| version: "0.11.21" | ||
| enable-cache: true | ||
| cache-dependency-glob: backend/uv.lock | ||
| - name: Install locked Python dependencies | ||
| working-directory: backend | ||
| run: uv sync --frozen --python 3.13 | ||
| # No warehouse.duckdb or DuckLake exists here: tests that read real data | ||
| # are marked `requires_warehouse` and skip (see tests/conftest.py). | ||
| # test_base.py still imports the deleted data_collection_OLD package; drop | ||
| # the --ignore once it is ported to data_collection.base. | ||
| - name: Run the backend test suite | ||
| working-directory: backend | ||
| run: uv run --frozen pytest -q --ignore=tests/test_base.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,4 @@ FROM ( | |
| INTO | ||
| NAME col_name | ||
| VALUE val | ||
| ) | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| SELECT * | ||
| FROM {{ table }} | ||
| {{ where_string }} | ||
| ORDER BY year | ||
| ORDER BY year |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| {{ cte_filter_block }} | ||
| SELECT | ||
| SELECT | ||
| b.object_id, | ||
| b.town, | ||
| b.county, | ||
| b.geoid, | ||
| b.geoid, | ||
| b.name, | ||
| b.height_ft, | ||
| b.building_type, | ||
| ST_AsGeoJSON(b.geometry) AS geometry, | ||
| ST_AsGeoJSON(b.geometry) AS geometry | ||
| FROM VCGI_buildingFootprints_geom AS b | ||
| {{ join_filter_block }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.