-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1141 from ethho/dev-tests-cleanup
PLAT-107: Clean up
- Loading branch information
Showing
34 changed files
with
1,526 additions
and
1,599 deletions.
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
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.