Skip to content

Commit

Permalink
remove old schema and code (#68)
Browse files Browse the repository at this point in the history
## Description
5000 lines removed 😮 

## Related Issues
#63 

## Additional Notes

- Making SQLite the default database for testing and local_server, now
the old code is removed. HOWEVER, we will continue to use postgres in CI
- Removed assets and migrations related to old schema
- explicitly added DB adapters (postgres, mysql, microsoft sql server)
to pyproject.toml
- consolidating testing session fixtures by creating a new
contextmanager function, `get_test_session`, in database.py and adding
[conftest.py](https://docs.pytest.org/en/7.1.x/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files)
to assist with creating reusable testing fixtures
- removed all `recordlinker.linkage` code and tests, except for
matchers, this was copied to `recordlinker.linking.old_matchers` (we
need to port these methods before we can move them)
- removed old schema calls from the link-record API endpoint
- removed pyway helpers from `recordlinker.utils`
- renamed test_record_linkage to test_main (as its really just testing
the API endpoints in main.py). Rewrote some of the tests to make use of
the new client fixture.
  • Loading branch information
ericbuckley authored Oct 9, 2024
1 parent bdaa30e commit 1a2f7ce
Show file tree
Hide file tree
Showing 40 changed files with 179 additions and 5,289 deletions.
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DB_URI="postgresql+psycopg2://postgres:pw@localhost:5432/postgres"
TEST_DB_URI="sqlite:///:memory:"
DB_URI="sqlite:///db.sqlite3"
2 changes: 1 addition & 1 deletion .github/workflows/check_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Run unit tests
env:
DB_URI: "postgresql+psycopg2://postgres:pw@localhost:5432/postgres"
TEST_DB_URI: "postgresql+psycopg2://postgres:pw@localhost:5432/postgres"
run: |
pytest --cov=recordlinker --cov-report=xml tests/unit
- name: Upload test results to Codecov
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To run all the unit tests, use the following command:

To run a single unit test, use the following command:
```bash
./scripts/test_unit.sh tests/unit/test_linkage.py::test_link_record_against_mpi
./scripts/test_unit.sh tests/unit/test_main.py::test_linkage_success
```

## Standard Notices
Expand Down
68 changes: 0 additions & 68 deletions assets/linkage/dibbs_basic_algorithm.json

This file was deleted.

94 changes: 0 additions & 94 deletions assets/linkage/dibbs_enhanced_algorithm.json

This file was deleted.

13 changes: 0 additions & 13 deletions assets/linkage/patient_lol.csv

This file was deleted.

Binary file not shown.
100 changes: 0 additions & 100 deletions migrations/V01_01__flat_schema.sql

This file was deleted.

45 changes: 0 additions & 45 deletions migrations/V01_02__indexes.sql

This file was deleted.

Loading

0 comments on commit 1a2f7ce

Please sign in to comment.