Summary
We don't need the complexity of alembic, or at least not yet. What's really necessary is to build the database tables, and then load the default algorithms on startup. This will make the process of onboarding simple in the near future.
Acceptance Criteria
Details / Tasks
- Remove the alembic migrations and its dependencies from pyproject.toml
- Create a new file
assets/default_algorithms.yml and define the DIBBS Basic and DIBBS Enhanced algorithms in this file
- Put plenty of comments in the file to describe the different elements
- In
recordlinker.database create a new function for initializing the database, it should invoke "models.Base.metadata.create_all"
- The new function will also need to test to see if the Algorithms table has a default algorithm loaded, if so do nothing
- If there is no default algorithm, it should load the algorithms defined in
assets/default_algorithms.yml
- If no default algorithm is defined in the yml file, it should raise an error
- It should override any existing algorithms in the database with the same name
Background / Context
Currently, JSON is being used to store algorithms in text (or at least for our test cases). JSON doesn't allow for comments, which limits our ability to describe the process to the future user. We could put the documentation in another file, but typically keeping this close to the code as possible makes it more likely that the information will be used. YAML allows for comments and is generally more readable.
Dependencies
#24
Summary
We don't need the complexity of alembic, or at least not yet. What's really necessary is to build the database tables, and then load the default algorithms on startup. This will make the process of onboarding simple in the near future.
Acceptance Criteria
Details / Tasks
assets/default_algorithms.ymland define the DIBBS Basic and DIBBS Enhanced algorithms in this filerecordlinker.databasecreate a new function for initializing the database, it should invoke "models.Base.metadata.create_all"assets/default_algorithms.ymlBackground / Context
Currently, JSON is being used to store algorithms in text (or at least for our test cases). JSON doesn't allow for comments, which limits our ability to describe the process to the future user. We could put the documentation in another file, but typically keeping this close to the code as possible makes it more likely that the information will be used. YAML allows for comments and is generally more readable.
Dependencies
#24