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

Add cautious delete mixin #711

Merged
merged 11 commits into from
Dec 18, 2023
Merged

Add cautious delete mixin #711

merged 11 commits into from
Dec 18, 2023

Conversation

CBroz1
Copy link
Member

@CBroz1 CBroz1 commented Dec 15, 2023

Description

This PR applies the previously established mixin across all tables and provides users with a cautious_delete function to address #226.

  • Fixes warn about deleting other peoples' tables #226: cautious_delete, aliased cdel runs a permissions check prior to running both delete_downstream_merge and datajoint's builtin delete
    • utils/dj_mixin.py: Added a series of funcs to run the permission check
    • many other py: Add mixin class across all datajoint tables, adjust __init__ files to avoid circular imports
    • common/common_lab: add methods to cache admin and co-team-members to save time when deleting within a session
  • Minor fixes
    • run jupysync on new notebooks and slight cleanup, including running black on cells
    • add option for running command on docker container to database_settings.py
    • add missing imports of validate functions in dlc pipeline
    • add prepopulate property to settings file to avoid importing all of spyglass in common/__init__

Checklist:

  • This PR should be accompanied by a release: (yes/no/unsure)
    • I propose soft rollout for such a widespread change, not updating now, but collecting feedback and version bumping after any reported bugs are addressed
  • (If release) I have updated the CITATION.cff
  • I have updated the CHANGELOG.md
  • I have added/edited docs/notebooks to reflect the changes - Added extensive docstrings to new class

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CBroz1 CBroz1 marked this pull request as draft December 15, 2023 21:45
@CBroz1 CBroz1 marked this pull request as ready for review December 18, 2023 15:42
@edeno edeno merged commit 3cfdd28 into LorenFrankLab:master Dec 18, 2023
CBroz1 added a commit to CBroz1/spyglass that referenced this pull request Dec 19, 2023
PR LorenFrankLab#694 had a lot of conflicts related to PR LorenFrankLab#711, and discussions
suggested avoiding rename of existing tables. Rather than cherry pick
and rebase, this commit replaces the work in LorenFrankLab#694.
@CBroz1 CBroz1 mentioned this pull request Dec 19, 2023
4 tasks
edeno pushed a commit that referenced this pull request Dec 21, 2023
* V0 migration model. No surgery. See details.

PR #694 had a lot of conflicts related to PR #711, and discussions
suggested avoiding rename of existing tables. Rather than cherry pick
and rebase, this commit replaces the work in #694.

* Update notebooks

* Fetch upstream, run precommit
@edeno edeno linked an issue Dec 21, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warn about deleting other peoples' tables Possible feature request for verbose delete method
2 participants