Skip to content
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

Make it easier to get Coding System DBs for local development #2253

Open
mikerkelly opened this issue Dec 17, 2024 · 0 comments
Open

Make it easier to get Coding System DBs for local development #2253

mikerkelly opened this issue Dec 17, 2024 · 0 comments

Comments

@mikerkelly
Copy link
Contributor

Why are we doing this?

Developers will find it easier to develop locally if there is a convenient way of obtaining some or all of the coding system databases from production for their local development. Without them site functionality is limited and some production bugs may not be easily reproducible. It's possible but not easy to recreate the databases locally by running code on the source files.

Each coding system has its own read-only SQLite database. These production databases are based on public sources so there is no sensitivity around them. They don't change once created so a dev may only need to do this when setting up local development, or to get new ones. There are also mapping files recorded in the core database (I think).

How will we know when it's done?

There will be scripts, management commands, and/or justfile commands that aid producing coding system databases and mapping data locally. These will be documented in DEVELOPERS.md or elsewhere as appropriate.

What are we doing?

It's easy enough to download all of the coding system databases from production via SCP, albeit it takes several hours and there are many of them. A command that fetches that those aren't present locally or specific ones as specified could be useful. Determine if this should be scheduled for outside of business hours -- does running it place significant demand on the server's network connection?

When they are present locally the database coding system version models still need to point at them for the site to be able to use them. There is code to update these in coding_systems.versioning.models.update_coding_system_database_connections but no convenient to invoke it. Add one (management command + justfile command, for example.)

Also consider how to make it easy to get the mapping data.


Defining delivery tasks guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant