-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/sckan-394-395-396 - Population set - Backend, UI, and Admin UI #420
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
Conversation
…xported read only
…pdating new field - has_statement_been_exported
… doesn't have EXPORT available transition
…ment_been_exported migration
| <App /> | ||
| </Provider> | ||
| ); | ||
| populations.setPopulations().then(() => { |
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.
Not related with this PR, but I don't love this nested callbacks. I think most of these fetches are independent, if that's the case we can use Promise.all instead to have them happening in parallel. It can be a tecnical debt card for later, cc @ddelpiano
…izer and refactor population change validation in ConnectivityStatement forms
…exported directly on instance
…sitioning to exported state
…atement constraints
…d utility to extract population set from statement ID
backend/composer/signals.py
Outdated
| if target == CSState.EXPORTED and not instance.has_statement_been_exported: | ||
| instance.has_statement_been_exported = True | ||
| instance.save() |
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.
I think this overlaps with my comment here. My preference would be to use the transition side-effects instead of the signal.
@transition....
def exported(self, *args, **kwargs):
self.has_statement_been_exported = True
self.save()
| def do_transition_to_exported_and_get_available_export_batch( | ||
| export_batch: ExportBatch, user: User | ||
| ): | ||
| def filter_statements_with_exported_transition(qs: QuerySet, user: User) -> QuerySet: |
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 might be a good use case for .iterator
| def do_transition_to_exported_and_get_available_export_batch( | ||
| export_batch: ExportBatch, user: User | ||
| ): | ||
| def filter_statements_with_exported_transition(qs: QuerySet, user: User) -> QuerySet: |
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 might be a good use case for .iterator
…ity to extract populationset from NeuronDM ID
…-effects instead of the signal
…neurondm function
Feature/sckan-394-ingestion - update ingestion and statement helper to add populationset on ingestion
…tatement and update permission checks
…rom list view and remove deprecated btn from detailed view
…ted_from_this_populationset_incremental_index to PopulationSet
… replace Subject URI with compr_uri
…s during deletion in admin
…generation in export process
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.
Changes requested in the PRs related with 394 were applied in branch https://github.com/MetaCell/sckan-composer/tree/feature/SCKAN-397
SCKAN-396 - Admin interface changes to support the population set - and deprecate state
Feature/sckan-398-export - Extend export to support population set
|
Included in #423 |
Task description:
https://metacell.atlassian.net/browse/SCKAN-394
https://metacell.atlassian.net/browse/SCKAN-395
https://metacell.atlassian.net/browse/SCKAN-396 - (not the third part) - that is taken care in a separate PR.
More on the PR:
The Backend changes:
Add populationset - models, URLs, views, and serializers
add another field to KS - has_statement_been_exported
along with the migrations; a custom migration - migrate_has_statement_been_exported - to fill the field for everything that is exported currently
Two constraints:
The Composer UI changes:
The Admin UI changes: