Skip to content

Commit 163f8aa

Browse files
committed
Merge branch 'master' of https://github.com/datajoint/datajoint-python into top-restrcition
2 parents 59279ba + a55e8d6 commit 163f8aa

File tree

127 files changed

+1684
-420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1684
-420
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM mcr.microsoft.com/devcontainers/python:3.7-bullseye
44
RUN \
55
apt update && \
66
apt-get install bash-completion graphviz default-mysql-client -y && \
7-
pip install flake8 black faker ipykernel nose nose-cov datajoint && \
7+
pip install flake8 black faker ipykernel pytest pytest-cov nose nose-cov datajoint && \
88
pip uninstall datajoint -y
99

1010
ENV DJ_HOST fakeservices.datajoint.io

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"ghcr.io/guiyomh/features/vim:0": {}
1717
},
1818
"onCreateCommand": "pip install -e .",
19-
"postStartCommand": "MYSQL_VER=8.0 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml down && MYSQL_VER=8.0 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml up --build --wait",
19+
"postStartCommand": "MYSQL_VER=8.0 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml down && docker volume prune -f && MYSQL_VER=8.0 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml up --build --wait",
2020
"forwardPorts": [
2121
80,
2222
443,

.github/workflows/development.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
--count --max-complexity=62 --max-line-length=127 --statistics
9393
black datajoint --check -v
9494
black tests --check -v
95+
black tests_old --check -v
9596
publish-docs:
9697
if: |
9798
github.event_name == 'push' &&

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
"[markdown]": {
1212
"editor.defaultFormatter": "disable"
1313
},
14+
"[yaml]": {
15+
"editor.defaultFormatter": "disable"
16+
},
17+
"[dockercompose]": {
18+
"editor.defaultFormatter": "disable"
19+
},
1420
"files.autoSave": "off"
1521
}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- Changed - Docs to add landing page and update navigation
99
- Changed - `.data` method to `.stream` in the `get()` method for S3 (external) objects PR [#1085](https://github.com/datajoint/datajoint-python/pull/1085)
1010
- Fixed - Docs to rename `create_virtual_module` to `VirtualModule`
11+
- Added - Skeleton from `datajoint-company/datajoint-docs` repository for docs migration
12+
- Added - Initial `pytest` for `test_connection`
1113

1214
### 0.14.0 -- Feb 13, 2023
1315
- Added - `json` data type ([#245](https://github.com/datajoint/datajoint-python/issues/245)) PR [#1051](https://github.com/datajoint/datajoint-python/pull/1051)

LNX-docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ services:
8989
pip install --user nose nose-cov
9090
pip install -e .
9191
pip list --format=freeze | grep datajoint
92-
nosetests -vsw tests --with-coverage --cover-package=datajoint
92+
pytest -sv --cov-report term-missing --cov=datajoint tests
93+
nosetests -vsw tests_old --with-coverage --cover-package=datajoint
9394
# ports:
9495
# - "8888:8888"
9596
user: ${HOST_UID}:anaconda

datajoint/admin.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
logger = logging.getLogger(__name__.split(".")[0])
99

1010

11-
def set_password(
12-
new_password=None, connection=None, update_config=None
13-
): # pragma: no cover
11+
def set_password(new_password=None, connection=None, update_config=None):
1412
connection = conn() if connection is None else connection
1513
if new_password is None:
1614
new_password = getpass("New password: ")
@@ -28,7 +26,7 @@ def set_password(
2826
config.save_local(verbose=True)
2927

3028

31-
def kill(restriction=None, connection=None, order_by=None): # pragma: no cover
29+
def kill(restriction=None, connection=None, order_by=None):
3230
"""
3331
view and kill database connections.
3432

datajoint/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def conn(
120120
host = host if host is not None else config["database.host"]
121121
user = user if user is not None else config["database.user"]
122122
password = password if password is not None else config["database.password"]
123-
if user is None: # pragma: no cover
123+
if user is None:
124124
user = input("Please enter DataJoint username: ")
125-
if password is None: # pragma: no cover
125+
if password is None:
126126
password = getpass(prompt="Please enter DataJoint password: ")
127127
init_fun = (
128128
init_fun if init_fun is not None else config["connection.init_function"]

datajoint/dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def load(self, force=True):
127127
self.add_edge(fk["referenced_table"], alias_node, **props)
128128
self.add_edge(alias_node, fk["referencing_table"], **props)
129129

130-
if not nx.is_directed_acyclic_graph(self): # pragma: no cover
130+
if not nx.is_directed_acyclic_graph(self):
131131
raise DataJointError("DataJoint can only work with acyclic dependencies")
132132
self._loaded = True
133133

docs/mkdocs.yaml

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,72 @@ repo_name: datajoint/datajoint-python
66
nav:
77
- DataJoint Python: index.md
88
- Getting Started: getting-started/index.md
9-
- Existing Pipelines: concepts/existing-pipelines.md
10-
- Query Language:
11-
- Common Commands: query-lang/common-commands.md
12-
- Operators: query-lang/operators.md
13-
- Iteration: query-lang/iteration.md
14-
- Query Caching: query-lang/query-caching.md
9+
- Concepts:
10+
- Principles: concepts/principles.md
11+
- Glossary: concepts/glossary.md
12+
- System Administration:
13+
- Database Administration: sysadmin/dba.md
14+
- File Storage: sysadmin/filestore.md
15+
- Client Configuration:
16+
- Install: client/install.md
17+
- Credentials: client/creds.md
18+
- Settings: client/settings.md
19+
- File Stores: client/stores.md
20+
- Schema Design:
21+
- Schema Creation: design/schema.md
22+
- Table Definition:
23+
- Table Tiers: design/tables/tiers.md
24+
- Declaration Syntax: design/tables/declare.md
25+
- Primary Key: design/tables/primary.md
26+
- Attributes: design/tables/attributes.md
27+
- Lookup Tables: design/tables/lookup.md
28+
- Blobs: design/tables/blobs.md
29+
- Attachments: design/tables/attach.md
30+
- Filepaths: design/tables/filepath.md
31+
- Custom Datatypes: design/tables/customtype.md
32+
- Dependencies: design/tables/dependencies.md
33+
- Indexes: design/tables/indexes.md
34+
- Master-Part Relationships: design/tables/master-part.md
35+
- Schema Diagrams: design/diagrams.md
36+
- Entity Normalization: design/normalization.md
37+
- Data Integrity: design/integrity.md
38+
- Schema Recall: design/recall.md
39+
- Schema Drop: design/drop.md
40+
- Schema Modification: design/alter.md
41+
- Data Manipulations:
42+
- Insert: manipulation/insert.md
43+
- Delete: manipulation/delete.md
44+
- Update: manipulation/update.md
45+
- Transactions: manipulation/transactions.md
46+
- Data Queries:
47+
- Common Commands: query/common-commands.md
48+
- Fetch: query/fetch.md
49+
- Iteration: query/iteration.md
50+
- Operators: query/operators.md
51+
- Restrict: query/restrict.md
52+
- Projection: query/project.md
53+
- Join: query/join.md
54+
- Aggregation: query/aggregation.md
55+
- Union: query/union.md
56+
- Universal Sets: query/universals.md
57+
- Query Caching: query/query-caching.md
58+
- Computations:
59+
- Make Method: compute/make.md
60+
- Populate: compute/populate.md
61+
- Key Source: compute/key-source.md
62+
- Distributed Computing: compute/distributed.md
63+
- Internals:
64+
- SQL Transpilation: internal/transpilation.md
1565
- Reproducibility:
1666
- Table Tiers: reproduce/table-tiers.md
1767
- Make Method: reproduce/make-method.md
68+
- Existing Pipelines: existing-pipelines.md
1869
- Tutorials:
1970
- tutorials/json.ipynb
71+
- FAQ: faq.md
2072
- Develop: develop.md
2173
- Citation: citation.md
22-
- Changelog: about/changelog.md
74+
- Changelog: changelog.md
2375
- API: api/ # defer to gen-files + literate-nav
2476

2577
# ---------------------------- STANDARD -----------------------------

0 commit comments

Comments
 (0)