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

fix 151 and 374 - cascades to part tables must be from parent tables. #957

Merged
merged 27 commits into from
Jan 20, 2022

Conversation

dimitri-yatsenko
Copy link
Member

@dimitri-yatsenko dimitri-yatsenko commented Sep 9, 2021

fix #151 (Method 1)
fix #374

@dimitri-yatsenko dimitri-yatsenko changed the title fix issue 151 - cascades to part tables must be from parent tables. fix 151 and 374 - cascades to part tables must be from parent tables. Sep 10, 2021
@dimitri-yatsenko dimitri-yatsenko marked this pull request as ready for review September 10, 2021 17:57
Copy link
Collaborator

@guzman-raphael guzman-raphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dimitri-yatsenko. Logic looks good. 🤝
Requesting a fix of just some minor documentation errors (for Sphinx rendering) and some 'future-proof' suggestions for the tests (use built in assert). Also, please link the issues that are fixed here so they are auto-closed on merge.

CHANGELOG.md Outdated Show resolved Hide resolved
docs-parts/intro/Releases_lang1.rst Outdated Show resolved Hide resolved
@@ -4,6 +4,10 @@
import random
import datajoint as dj
import itertools
import hashlib
import uuid
import faker
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should set the seed here to make this test deterministic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already deterministic. The code generates deterministic UUIDs rather than random.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dimitri-yatsenko That is not what I meant. UUID's are generated from url which is actually generated by faker's profile method. This is the portion I meant by not being deterministic. Each time we call fake.profile(), it will yield a random result unless we seed it properly.

tests/test_cascading_delete.py Outdated Show resolved Hide resolved
tests/test_cascading_delete.py Outdated Show resolved Hide resolved
datajoint/table.py Outdated Show resolved Hide resolved
datajoint/table.py Outdated Show resolved Hide resolved
datajoint/table.py Outdated Show resolved Hide resolved
datajoint/table.py Outdated Show resolved Hide resolved
datajoint/utils.py Outdated Show resolved Hide resolved
@A-Baji
Copy link
Collaborator

A-Baji commented Jan 20, 2022

@dimitri-yatsenko Please update this branch so I can merge.

Copy link
Collaborator

@guzman-raphael guzman-raphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dimitri-yatsenko Great work! 🚀

CHANGELOG.md Outdated
@@ -3,6 +3,7 @@
### 0.13.3 -- TBD
* Bugfix - Dependencies not properly loaded on populate. (#902) PR #919
* Bugfix - Replace use of numpy aliases of built-in types with built-in type. (#938) PR #939
* Bugfix - Deletes and drops must include the master of each part. (#151 and #374) PR #957
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Bugfix - Deletes and drops must include the master of each part. (#151 and #374) PR #957
* Bugfix - Deletes and drops must include the master of each part. (#151, #374) PR #957

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.

Drop all parts when master is dropped in a master-part relationship. Cascading delete for Part
3 participants