Skip to content

Commit

Permalink
Auto initialize algorithms in DB (#89)
Browse files Browse the repository at this point in the history
## Description
Configuring the code to optionally load in initial algorithms after the
tables have been initialized. Doing so, removes our needs now for having
to use a database migration tool for the near future.

## Related Issues
closes #57 

## Additional Notes
- This is contentious, but have removed alembic. Using alembic has
required a lot of manual effort to get migrations correct, with little
benefit this early in a project. Our schema hasn't stabilized yet, and
we don't have any systems running the code in production, so it's of
little value. Over time, we may need to bring this back to safely adjust
production schemas, but now is not the time.
- Created `assets/initial_algorithms.json` with the two existing DIBBs
algorithms. We can use this for our test cases, and also initializing a
new database with the data, if the INITIAL_ALGORITHMS env variable is
set. This also gives customers another option for managing their
algorithms, in they can write their own and set the INITIAL_ALGORITHMS
env variable to load that json file.
- Capitalized `schemas.pii.Features`. The blocking keys were
capitalized, so making them both capitalized will hopefully reduce
errors in writing the algorithm specs.
- Consolidated some of the assets and testing assets, as there were
duplicates and there was some testing files in the top level one.

Co-authored-by: Alex Hayward <[email protected]>
  • Loading branch information
ericbuckley and alhayward authored Oct 21, 2024
1 parent bc0d93f commit dbe3761
Show file tree
Hide file tree
Showing 36 changed files with 471 additions and 1,876 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
verbose: true
116 changes: 0 additions & 116 deletions alembic.ini

This file was deleted.

23 changes: 0 additions & 23 deletions alembic/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions alembic/env.py

This file was deleted.

26 changes: 0 additions & 26 deletions alembic/script.py.mako

This file was deleted.

51 changes: 0 additions & 51 deletions alembic/versions/0c90faa0378f_create_algorithm_tables.py

This file was deleted.

56 changes: 0 additions & 56 deletions alembic/versions/6052c193a26a_add_blockingvalue_table.py

This file was deleted.

Loading

0 comments on commit dbe3761

Please sign in to comment.