Skip to content

Commit 9955fe2

Browse files
Merge pull request #9 from guzman-raphael/duplicate-secondary-attr
Update `test_same_secondary_attribute` test + PR review feedback
2 parents 26f6265 + 5456c1e commit 9955fe2

File tree

7 files changed

+43
-31
lines changed

7 files changed

+43
-31
lines changed

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
## Release notes
22

3-
### 0.13.0 -- Feb 15, 2021
3+
### 0.13.0 -- Mar 19, 2021
44
* Re-implement query transpilation into SQL, fixing issues (#386, #449, #450, #484). PR #754
55
* Re-implement cascading deletes for better performance. PR #839.
66
* Add table method `.update1` to update a row in the table with new values PR #763
77
* Python datatypes are now enabled by default in blobs (#761). PR #785
88
* Added permissive join and restriction operators `@` and `^` (#785) PR #754
99
* Support DataJoint datatype and connection plugins (#715, #729) PR 730, #735
10-
* add `dj.key_hash` alias to `dj.hash.key_hash`
11-
* default enable_python_native_blobs to True
10+
* Add `dj.key_hash` alias to `dj.hash.key_hash`
11+
* Default enable_python_native_blobs to True
12+
* Bugfix - Regression error on joins with same attribute name (#857) PR #878
13+
* Bugfix - Error when `fetch1('KEY')` when `dj.config['fetch_format']='frame'` set (#876) PR #880, #878
1214
* Drop support for Python 3.5
1315

1416
### 0.12.8 -- Jan 12, 2021

LNX-docker-compose.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
interval: 1s
3333
fakeservices.datajoint.io:
3434
<<: *net
35-
image: raphaelguzman/nginx:v0.0.13
35+
image: datajoint/nginx:v0.0.15
3636
environment:
3737
- ADD_db_TYPE=DATABASE
3838
- ADD_db_ENDPOINT=db:3306
@@ -72,15 +72,17 @@ services:
7272
- COVERALLS_SERVICE_NAME
7373
- COVERALLS_REPO_TOKEN
7474
working_dir: /src
75-
command: >
76-
/bin/sh -c
77-
"
78-
pip install --user -r test_requirements.txt;
79-
pip install --user .;
80-
pip freeze | grep datajoint;
81-
nosetests -vsw tests --with-coverage --cover-package=datajoint && coveralls;
82-
# jupyter notebook;
83-
"
75+
command:
76+
- sh
77+
- -c
78+
- |
79+
set -e
80+
pip install --user -r test_requirements.txt
81+
pip install --user .
82+
pip freeze | grep datajoint
83+
nosetests -vsw tests --with-coverage --cover-package=datajoint
84+
coveralls
85+
# jupyter notebook
8486
# ports:
8587
# - "8888:8888"
8688
user: ${UID}:${GID}

datajoint/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.13.dev5"
1+
__version__ = "0.13.dev6"
22

33
assert len(__version__) <= 10 # The log table limits version to the 10 characters

docs-parts/intro/Releases_lang1.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
0.13.0 -- Feb 15, 2021
1+
0.13.0 -- Mar 19, 2021
22
----------------------
33
* Re-implement query transpilation into SQL, fixing issues (#386, #449, #450, #484). PR #754
44
* Re-implement cascading deletes for better performance. PR #839.
55
* Add table method `.update1` to update a row in the table with new values PR #763
66
* Python datatypes are now enabled by default in blobs (#761). PR #785
77
* Added permissive join and restriction operators `@` and `^` (#785) PR #754
88
* Support DataJoint datatype and connection plugins (#715, #729) PR 730, #735
9-
* add `dj.key_hash` alias to `dj.hash.key_hash`
10-
* default enable_python_native_blobs to True
9+
* Add `dj.key_hash` alias to `dj.hash.key_hash`
10+
* Default enable_python_native_blobs to True
11+
* Bugfix - Regression error on joins with same attribute name (#857) PR #878
12+
* Bugfix - Error when `fetch1('KEY')` when `dj.config['fetch_format']='frame'` set (#876) PR #880, #878
1113
* Drop support for Python 3.5
1214

1315
0.12.8 -- Jan 12, 2021

local-docker-compose.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
interval: 1s
3535
fakeservices.datajoint.io:
3636
<<: *net
37-
image: raphaelguzman/nginx:v0.0.13
37+
image: datajoint/nginx:v0.0.15
3838
environment:
3939
- ADD_db_TYPE=DATABASE
4040
- ADD_db_ENDPOINT=db:3306
@@ -77,11 +77,13 @@ services:
7777
- JUPYTER_PASSWORD=datajoint
7878
- DISPLAY
7979
working_dir: /src
80-
command: >
81-
/bin/sh -c
82-
"
83-
pip install --user nose nose-cov coveralls flake8 ptvsd .;
84-
pip freeze | grep datajoint;
80+
command:
81+
- sh
82+
- -c
83+
- |
84+
set -e
85+
pip install --user nose nose-cov coveralls flake8 ptvsd .
86+
pip freeze | grep datajoint
8587
## You may run the below tests once sh'ed into container i.e. docker exec -it datajoint-python_app_1 sh
8688
# nosetests -vsw tests; #run all tests
8789
# nosetests -vs --tests=tests.test_external_class:test_insert_and_fetch; #run specific basic test
@@ -91,11 +93,11 @@ services:
9193
## Interactive Jupyter Notebook environment
9294
jupyter notebook &
9395
## Remote debugger
94-
while true;
95-
do python -m ptvsd --host 0.0.0.0 --port 5678 --wait .;
96-
sleep 2;
97-
done;
98-
"
96+
while true
97+
do
98+
python -m ptvsd --host 0.0.0.0 --port 5678 --wait .
99+
sleep 2
100+
done
99101
ports:
100102
- "8888:8888"
101103
- "5678:5678"

tests/schema.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,19 +348,21 @@ class ThingC(dj.Manual):
348348

349349

350350
@schema
351-
class Parent(dj.Manual):
351+
class Parent(dj.Lookup):
352352
definition = """
353353
parent_id: int
354354
---
355355
name: varchar(30)
356356
"""
357+
contents = [(1, 'Joe')]
357358

358359

359360
@schema
360-
class Child(dj.Manual):
361+
class Child(dj.Lookup):
361362
definition = """
362363
-> Parent
363364
child_id: int
364365
---
365366
name: varchar(30)
366367
"""
368+
contents = [(1, 12, 'Dan')]

tests/test_fetch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,6 @@ def test_key_fetch1(self):
251251
assert_equal(k1, k2)
252252

253253
def test_same_secondary_attribute(self):
254-
print(schema.Child * schema.Parent().proj())
254+
children = (schema.Child * schema.Parent().proj()).fetch()['name']
255+
assert len(children) == 1
256+
assert children[0] == 'Dan'

0 commit comments

Comments
 (0)