-
Notifications
You must be signed in to change notification settings - Fork 4
Configure default related models for new projects #905
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for antenna-preview canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR streamlines the creation of new projects by automatically configuring default related models and services. It introduces environment-driven configuration for processing services and pipelines to reduce manual setup steps for both local development and production environments.
- Automatically creates default related models (Station/Deployment, Research Site, Device, Collection) when projects are created
- Adds configurable default processing service creation based on environment variables
- Implements selective pipeline enabling/disabling through configuration settings
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
config/settings/base.py | Adds environment variables for default processing service configuration |
ami/tests/fixtures/main.py | Updates test fixtures to handle new project creation patterns and return project identifiers |
ami/ml/models/project_pipeline_config.py | Removes unused imports |
ami/ml/models/processing_service.py | Adds custom manager, pipeline filtering logic, and default service creation functionality |
ami/main/tests.py | Adds comprehensive tests for new project setup functionality with various configuration scenarios |
ami/main/models.py | Implements custom ProjectManager with automatic default model creation and refactors related helper functions |
.envs/.production/.django-example | Adds production environment configuration for default processing service |
.envs/.local/.django | Adds local development environment configuration for default processing service |
Co-authored-by: Copilot <[email protected]>
|
||
# Default processing service | ||
DEFAULT_PROCESSING_SERVICE_NAME="AMI Data Companion" | ||
DEFAULT_PROCESSING_SERVICE_ENDPOINT=http://ml.antenna.insectai.org/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only work if http:// is changed to https://
Summary
Currently there are several manual steps required each time a new project is created. This PR introduces several changes to streamline the creation of new projects, both for local development and in live environments for users.
List of Changes
TODO: set default lat & lon based on current country in the Request
TODO: create a default project when a user is registered (a hidden scratch project) #899
TODO: allow setting a default pipeline for a project to use for processing (multiple are enabled & available, even after this PR, so which should be used for automatic processing) #901
TODO: auto-populate some collections #907
Related Issues
This was added as part of #901, and it closes part of #899
Related #893
Screenshots
Deployment Notes
Copy the new
DEFAULT_*
settings from the.production/.django-example
config file to the live environments if desired.Checklist