-
Notifications
You must be signed in to change notification settings - Fork 85
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
PLAT-107: Clean up #1141
Merged
Merged
PLAT-107: Clean up #1141
Changes from 29 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
922ab00
Clean test_adapted_attributes
ethho 608782f
Clean test_admin
ethho 44a9184
Clean test_aggr_regressions
ethho 8f85b02
Clean test_alter
ethho d40fca6
Clean test_attach
ethho c0d56a6
Fix ImportError
ethho 95643de
Make stores config serializable
ethho 62bd4cc
Correct use of tmpdir_factory
ethho 32b7c4c
Clean up test_autopopulate
ethho 91d7ad6
Clean up other modules
ethho fc0cf35
Move all CONN_INFO to fixtures
ethho b689ec2
Session scoped s3_creds
ethho c3e96e9
Format with black
ethho a59325a
Replace PREFIX with fixture
ethho a3f6338
Format with black
ethho 462f111
Empty tests init
ethho 3f48bf9
Add missing prefix injection
ethho 70318e2
Add missing prefix injection
ethho 23529b4
Format with black
ethho e81d5ce
Fix warnings in test_cascading_delete
ethho fdace0b
Merge branch 'dev-tests' into dev-tests-cleanup
ethho 573df44
Clean up from merge conflict
ethho 5489dff
Merge branch 'dev-tests' into dev-tests-cleanup
ethho b149868
Add @dimitri-yatsenko suggested changes on #1131
ethho abda8f1
Clean up last modules
ethho fd53931
Replace PREFIX in test_schema
ethho 725cae2
Resolve DeprecationWarning in tests/test_blob.py::test_insert_longblob
ethho 34161a8
Move insert_blobs to module scope
ethho a7ad213
Delete commented code
ethho bf17e75
Format with black
ethho 27c6be1
Add fixture enable_feature_32bit_dims
ethho 7422f94
Explicitly define timeit context
ethho 674a669
Format with black
ethho a0a4a96
Use latest datajoint/nginx image
ethho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +0,0 @@ | ||
import datajoint as dj | ||
from packaging import version | ||
import pytest | ||
import os | ||
|
||
PREFIX = os.environ.get("DJ_TEST_DB_PREFIX", "djtest") | ||
|
||
# Connection for testing | ||
CONN_INFO = dict( | ||
host=os.environ.get("DJ_TEST_HOST", "fakeservices.datajoint.io"), | ||
user=os.environ.get("DJ_TEST_USER", "datajoint"), | ||
password=os.environ.get("DJ_TEST_PASSWORD", "datajoint"), | ||
) | ||
|
||
CONN_INFO_ROOT = dict( | ||
host=os.environ.get("DJ_HOST", "fakeservices.datajoint.io"), | ||
user=os.environ.get("DJ_USER", "root"), | ||
password=os.environ.get("DJ_PASS", "simple"), | ||
) | ||
|
||
S3_CONN_INFO = dict( | ||
endpoint=os.environ.get("S3_ENDPOINT", "fakeservices.datajoint.io"), | ||
access_key=os.environ.get("S3_ACCESS_KEY", "datajoint"), | ||
secret_key=os.environ.get("S3_SECRET_KEY", "datajoint"), | ||
bucket=os.environ.get("S3_BUCKET", "datajoint.test"), | ||
) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import datajoint as dj | ||
import inspect | ||
|
||
|
||
class Experiment(dj.Imported): | ||
original_definition = """ # information about experiments | ||
-> Subject | ||
experiment_id :smallint # experiment number for this subject | ||
--- | ||
experiment_date :date # date when experiment was started | ||
-> [nullable] User | ||
data_path="" :varchar(255) # file path to recorded data | ||
notes="" :varchar(2048) # e.g. purpose of experiment | ||
entry_time=CURRENT_TIMESTAMP :timestamp # automatic timestamp | ||
""" | ||
|
||
definition1 = """ # Experiment | ||
-> Subject | ||
experiment_id :smallint # experiment number for this subject | ||
--- | ||
data_path : int # some number | ||
extra=null : longblob # just testing | ||
-> [nullable] User | ||
subject_notes=null :varchar(2048) # {notes} e.g. purpose of experiment | ||
entry_time=CURRENT_TIMESTAMP :timestamp # automatic timestamp | ||
""" | ||
|
||
|
||
class Parent(dj.Manual): | ||
definition = """ | ||
parent_id: int | ||
""" | ||
|
||
class Child(dj.Part): | ||
definition = """ | ||
-> Parent | ||
""" | ||
definition_new = """ | ||
-> master | ||
--- | ||
child_id=null: int | ||
""" | ||
|
||
class Grandchild(dj.Part): | ||
definition = """ | ||
-> master.Child | ||
""" | ||
definition_new = """ | ||
-> master.Child | ||
--- | ||
grandchild_id=null: int | ||
""" | ||
|
||
|
||
LOCALS_ALTER = {k: v for k, v in locals().items() if inspect.isclass(v)} | ||
__all__ = list(LOCALS_ALTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 moved this schema to a separate module per @A-Baji 's previous suggestion.