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

Draft application upgrade to SQLAlchemy, Pytest #346

Draft
wants to merge 44 commits into
base: develop
Choose a base branch
from

Conversation

benjwadams
Copy link
Contributor

@benjwadams benjwadams commented May 10, 2024

Draft commit for migration to SQLAlchemy and moves application to application factory pattern for better reusability and testing.

Adds support for BDD testing via pytest-bdd, see example feature files. Example tests extend #343 by implementing these tests.

This is still a work in progress and not complete, but represents a large effort to modernize the DAC architecture.

benjwadams and others added 30 commits April 12, 2024 13:27
Uses application factory pattern.

Moves over to SQLAlchemy from MongoKit.
Removes BerkeleyDB for user authentication, instead using User model
to store password.  FTP PAM authentication methods will need to be
updated to use SQL instead.
Adds a model attribute/DB column for whether CF Standard names
are all compliant after Compliance Checker runs.  Also updates NCEI
archival scripts to utilize this column as part of the criteria
prior to determining whether datasets should be archived by NCEI.
Removes a non-functioning dataset removal task which didn't properly get
queued up due to Flask application context error.  In theory even for
removing many files from the web application from a delayed mode
dataset the operation should not take much time and deletions are not a
common occurrence.  If needed can be fixed and re-added later.
Adds feature file for example scenarios with deployments.
Tests are currently not implemented for these feature files
but will likely be implemented later using pytest-bdd.
Adds BDD testing steps for glider deployment creation, ensuring
that a user can create a deployment successfully, have an email
sent out to Glider DAC group, and ensure the proper filesystem
directory and file structure is created for the dataset.
@benjwadams benjwadams changed the base branch from main to develop May 10, 2024 02:30
@benjwadams
Copy link
Contributor Author

Would like to merge this into new develop branch fairly soon so that others can work off this branch and contribute. I have some MongoDB to MySQL migration scripts I'll be adding shortly once they're polished up a little bit.

Adds UDUNITS_XML_PATH to environment variables so that cf_units
library will properly build on ARM based Docker builds.
Uses ERDDAP Docker image that provides support for ARM builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants