diff --git a/README.md b/README.md index 8a36818e6..eecee41a0 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Doc Status - + doc status @@ -68,12 +68,12 @@ - Developer Chat - - + Developer Chat + + datajoint slack - - + + License @@ -84,21 +84,20 @@ - Citation - - - bioRxiv - + Citation + + + bioRxiv +
zenodo - - + + - DataJoint for Python is a framework for scientific workflow management based on relational principles. DataJoint is built on the foundation of the relational data model and prescribes a consistent method for organizing, populating, computing, and @@ -110,7 +109,7 @@ volumes of data streaming from regular experiments. Starting in 2011, DataJoint been available as an open-source project adopted by other labs and improved through contributions from several developers. Presently, the primary developer of DataJoint open-source software is the company -DataJoint (https://datajoint.com). +DataJoint (). ## Data Pipeline Example @@ -132,13 +131,13 @@ DataJoint (https://datajoint.com). pip install datajoint ``` -- [Documentation & Tutorials](https://datajoint.com/docs/core/datajoint-python/) +- [Documentation & Tutorials](https://docs.datajoint.com/core/datajoint-python/) - [Interactive Tutorials](https://github.com/datajoint/datajoint-tutorials) on GitHub Codespaces -- [DataJoint Elements](https://datajoint.com/docs/elements/) - Catalog of example pipelines for neuroscience experiments +- [DataJoint Elements](https://docs.datajoint.com/elements/) - Catalog of example pipelines for neuroscience experiments - Contribute - - [Contribution Guidelines](https://datajoint.com/docs/about/contribute/) + - [Contribution Guidelines](https://docs.datajoint.com/about/contribute/) - - [Developer Guide](https://datajoint.com/docs/core/datajoint-python/latest/develop/) + - [Developer Guide](https://docs.datajoint.com/core/datajoint-python/latest/develop/) diff --git a/datajoint/diagram.py b/datajoint/diagram.py index cb3daf4d3..aa505fb54 100644 --- a/datajoint/diagram.py +++ b/datajoint/diagram.py @@ -35,7 +35,7 @@ class Diagram: Entity relationship diagram, currently disabled due to the lack of required packages: matplotlib and pygraphviz. To enable Diagram feature, please install both matplotlib and pygraphviz. For instructions on how to install - these two packages, refer to https://datajoint.com/docs/core/datajoint-python/0.14/client/install/ + these two packages, refer to https://docs.datajoint.com/core/datajoint-python/0.14/client/install/ """ def __init__(self, *args, **kwargs): diff --git a/docs/README.md b/docs/README.md index df42fe764..4aecf0a69 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Contribute to DataJoint Documentation -This is the home for DataJoint software documentation as hosted at https://datajoint.com/docs/core/datajoint-python/latest/ +This is the home for DataJoint software documentation as hosted at https://docs.datajoint.com/core/datajoint-python/latest/. ## VSCode Linter Extensions and Settings @@ -89,9 +89,8 @@ INFO - Doc file 'index.md' contains an unrecognized relative link './develop - `/docs/core/datajoint-python/` is the actual docs site hosted by datajoint/datajoint-python's github pages - `/docs/elements/element-*/` is the actual docs site hosted by each element's github pages - ```log WARNING - Doc file 'query/operators.md' contains a link '../../../images/concepts-operators-restriction.png', but the target '../../images/concepts-operators-restriction.png' is not found among documentation files. ``` -- We use Github Pages to host our docs, the image references needs to follow the mkdocs's build directory structure, under `site/` directory once you run mkdocs. \ No newline at end of file +- We use Github Pages to host our docs, the image references needs to follow the mkdocs's build directory structure, under `site/` directory once you run mkdocs. diff --git a/docs/src/design/tables/indexes.md b/docs/src/design/tables/indexes.md index 8c0b53f15..fcd1b5702 100644 --- a/docs/src/design/tables/indexes.md +++ b/docs/src/design/tables/indexes.md @@ -35,7 +35,7 @@ To make searches faster on fields other than the primary key or a foreign key, y add a secondary index explicitly. Regular indexes are declared as `index(attr1, ..., attrN)` on a separate line anywhere in -the table declration (below the primary key divide). +the table declaration (below the primary key divide). Indexes can be declared with unique constraint as `unique index (attr1, ..., attrN)`. diff --git a/docs/src/faq.md b/docs/src/faq.md index 06ebbc2db..1de69bb31 100644 --- a/docs/src/faq.md +++ b/docs/src/faq.md @@ -12,7 +12,7 @@ source project for data entry but is no longer actively maintained. ## Does DataJoint support other programming languages? -DataJoint [Python](https://datajoint.com/docs/core/datajoint-python/) is the most +DataJoint [Python](https://docs.datajoint.com/core/datajoint-python/) is the most up-to-date version and all future development will focus on the Python API. The [Matlab](https://datajoint.com/docs/core/datajoint-matlab/) API was actively developed through 2023. Previous projects implemented some DataJoint features in diff --git a/docs/src/index.md b/docs/src/index.md index 8c5f8fcb1..6e3bf2a2d 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -36,9 +36,9 @@ Presently, the primary developer of DataJoint open-source software is the compan - [Interactive Tutorials](https://github.com/datajoint/datajoint-tutorials){:target="_blank"} on GitHub Codespaces -- [DataJoint Elements](https://datajoint.com/docs/elements/) - Catalog of example pipelines for neuroscience experiments +- [DataJoint Elements](https://docs.datajoint.com/elements/) - Catalog of example pipelines for neuroscience experiments - Contribute - [Development Environment](./develop) - - [Guidelines](https://datajoint.com/docs/community/contribute/) + - [Guidelines](https://docs.datajoint.com/about/contribute/) diff --git a/docs/src/query/operators.md b/docs/src/query/operators.md index 39f2488dd..ee3549f35 100644 --- a/docs/src/query/operators.md +++ b/docs/src/query/operators.md @@ -392,4 +392,4 @@ dj.U().aggr(Session, n="max(session)") # (3) `dj.U()`, as shown in the last example above, is often useful for integer IDs. For an example of this process, see the source code for -[Element Array Electrophysiology's `insert_new_params`](https://datajoint.com/docs/elements/element-array-ephys/latest/api/element_array_ephys/ephys_acute/#element_array_ephys.ephys_acute.ClusteringParamSet.insert_new_params). +[Element Array Electrophysiology's `insert_new_params`](https://docs.datajoint.com/elements/element-array-ephys/latest/api/element_array_ephys/ephys_acute/#element_array_ephys.ephys_acute.ClusteringParamSet.insert_new_params). diff --git a/docs/src/tutorials/dj-top.ipynb b/docs/src/tutorials/dj-top.ipynb index bbfe59f11..7ed9f97cc 100644 --- a/docs/src/tutorials/dj-top.ipynb +++ b/docs/src/tutorials/dj-top.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "First you will need to [install](../../getting-started/#installation) and [connect](../../getting-started/#connection) to a DataJoint [data pipeline](https://datajoint.com/docs/core/glossary/#data-pipeline).\n", + "First you will need to [install](../../getting-started/#installation) and [connect](../../getting-started/#connection) to a DataJoint [data pipeline](https://docs.datajoint.com/core/datajoint-python/latest/concepts/data-pipelines/#what-is-a-data-pipeline).\n", "\n", "Now let's start by importing the `datajoint` client." ] @@ -32,8 +32,9 @@ ], "source": [ "import datajoint as dj\n", + "\n", "dj.config[\"database.host\"] = \"127.0.0.1\"\n", - "schema = dj.Schema('university')" + "schema = dj.Schema(\"university\")" ] }, { @@ -114,7 +115,8 @@ " course_name : varchar(200) # e.g. \"Neurobiology of Sensation and Movement.\"\n", " credits : decimal(3,1) # number of credits earned by completing the course\n", " \"\"\"\n", - " \n", + "\n", + "\n", "@schema\n", "class Term(dj.Manual):\n", " definition = \"\"\"\n", @@ -122,6 +124,7 @@ " term : enum('Spring', 'Summer', 'Fall')\n", " \"\"\"\n", "\n", + "\n", "@schema\n", "class Section(dj.Manual):\n", " definition = \"\"\"\n", @@ -131,13 +134,15 @@ " ---\n", " auditorium : varchar(12)\n", " \"\"\"\n", - " \n", + "\n", + "\n", "@schema\n", "class CurrentTerm(dj.Manual):\n", " definition = \"\"\"\n", " -> Term\n", " \"\"\"\n", "\n", + "\n", "@schema\n", "class Enroll(dj.Manual):\n", " definition = \"\"\"\n", @@ -145,6 +150,7 @@ " -> Section\n", " \"\"\"\n", "\n", + "\n", "@schema\n", "class LetterGrade(dj.Lookup):\n", " definition = \"\"\"\n", @@ -153,18 +159,19 @@ " points : decimal(3,2)\n", " \"\"\"\n", " contents = [\n", - " ['A', 4.00],\n", - " ['A-', 3.67],\n", - " ['B+', 3.33],\n", - " ['B', 3.00],\n", - " ['B-', 2.67],\n", - " ['C+', 2.33],\n", - " ['C', 2.00],\n", - " ['C-', 1.67],\n", - " ['D+', 1.33],\n", - " ['D', 1.00],\n", - " ['F', 0.00]\n", - " ]\n", + " [\"A\", 4.00],\n", + " [\"A-\", 3.67],\n", + " [\"B+\", 3.33],\n", + " [\"B\", 3.00],\n", + " [\"B-\", 2.67],\n", + " [\"C+\", 2.33],\n", + " [\"C\", 2.00],\n", + " [\"C-\", 1.67],\n", + " [\"D+\", 1.33],\n", + " [\"D\", 1.00],\n", + " [\"F\", 0.00],\n", + " ]\n", + "\n", "\n", "@schema\n", "class Grade(dj.Manual):\n", @@ -192,6 +199,7 @@ "import faker\n", "import random\n", "import datetime\n", + "\n", "fake = faker.Faker()" ] }, @@ -202,14 +210,14 @@ "outputs": [], "source": [ "def yield_students():\n", - " fake_name = {'F': fake.name_female, 'M': fake.name_male}\n", + " fake_name = {\"F\": fake.name_female, \"M\": fake.name_male}\n", " while True: # ignore invalid values\n", " try:\n", - " sex = random.choice(('F', 'M'))\n", - " first_name, last_name = fake_name[sex]().split(' ')[:2]\n", - " street_address, city = fake.address().split('\\n')\n", - " city, state = city.split(', ')\n", - " state, zipcode = state.split(' ') \n", + " sex = random.choice((\"F\", \"M\"))\n", + " first_name, last_name = fake_name[sex]().split(\" \")[:2]\n", + " street_address, city = fake.address().split(\"\\n\")\n", + " city, state = city.split(\", \")\n", + " state, zipcode = state.split(\" \")\n", " except ValueError:\n", " continue\n", " else:\n", @@ -222,8 +230,10 @@ " home_state=state,\n", " home_zip=zipcode,\n", " date_of_birth=str(\n", - " fake.date_time_between(start_date=\"-35y\", end_date=\"-15y\").date()),\n", - " home_phone = fake.phone_number()[:20])" + " fake.date_time_between(start_date=\"-35y\", end_date=\"-15y\").date()\n", + " ),\n", + " home_phone=fake.phone_number()[:20],\n", + " )" ] }, { @@ -232,95 +242,106 @@ "metadata": {}, "outputs": [], "source": [ - "Student.insert(\n", - " dict(k, student_id=i) for i, k in zip(range(100,300), yield_students()))\n", + "Student.insert(dict(k, student_id=i) for i, k in zip(range(100, 300), yield_students()))\n", "\n", "Department.insert(\n", - " dict(dept=dept, \n", - " dept_name=name, \n", - " dept_address=fake.address(), \n", - " dept_phone=fake.phone_number()[:20])\n", + " dict(\n", + " dept=dept,\n", + " dept_name=name,\n", + " dept_address=fake.address(),\n", + " dept_phone=fake.phone_number()[:20],\n", + " )\n", " for dept, name in [\n", " [\"CS\", \"Computer Science\"],\n", " [\"BIOL\", \"Life Sciences\"],\n", " [\"PHYS\", \"Physics\"],\n", - " [\"MATH\", \"Mathematics\"]])\n", + " [\"MATH\", \"Mathematics\"],\n", + " ]\n", + ")\n", "\n", - "StudentMajor.insert({**s, **d, \n", - " 'declare_date':fake.date_between(start_date=datetime.date(1999,1,1))}\n", - " for s, d in zip(Student.fetch('KEY'), random.choices(Department.fetch('KEY'), k=len(Student())))\n", - " if random.random() < 0.75)\n", + "StudentMajor.insert(\n", + " {**s, **d, \"declare_date\": fake.date_between(start_date=datetime.date(1999, 1, 1))}\n", + " for s, d in zip(\n", + " Student.fetch(\"KEY\"), random.choices(Department.fetch(\"KEY\"), k=len(Student()))\n", + " )\n", + " if random.random() < 0.75\n", + ")\n", "\n", "# from https://www.utah.edu/\n", - "Course.insert([\n", - " ['BIOL', 1006, 'World of Dinosaurs', 3],\n", - " ['BIOL', 1010, 'Biology in the 21st Century', 3],\n", - " ['BIOL', 1030, 'Human Biology', 3],\n", - " ['BIOL', 1210, 'Principles of Biology', 4],\n", - " ['BIOL', 2010, 'Evolution & Diversity of Life', 3],\n", - " ['BIOL', 2020, 'Principles of Cell Biology', 3],\n", - " ['BIOL', 2021, 'Principles of Cell Science', 4],\n", - " ['BIOL', 2030, 'Principles of Genetics', 3],\n", - " ['BIOL', 2210, 'Human Genetics',3],\n", - " ['BIOL', 2325, 'Human Anatomy', 4],\n", - " ['BIOL', 2330, 'Plants & Society', 3],\n", - " ['BIOL', 2355, 'Field Botany', 2],\n", - " ['BIOL', 2420, 'Human Physiology', 4],\n", + "Course.insert(\n", + " [\n", + " [\"BIOL\", 1006, \"World of Dinosaurs\", 3],\n", + " [\"BIOL\", 1010, \"Biology in the 21st Century\", 3],\n", + " [\"BIOL\", 1030, \"Human Biology\", 3],\n", + " [\"BIOL\", 1210, \"Principles of Biology\", 4],\n", + " [\"BIOL\", 2010, \"Evolution & Diversity of Life\", 3],\n", + " [\"BIOL\", 2020, \"Principles of Cell Biology\", 3],\n", + " [\"BIOL\", 2021, \"Principles of Cell Science\", 4],\n", + " [\"BIOL\", 2030, \"Principles of Genetics\", 3],\n", + " [\"BIOL\", 2210, \"Human Genetics\", 3],\n", + " [\"BIOL\", 2325, \"Human Anatomy\", 4],\n", + " [\"BIOL\", 2330, \"Plants & Society\", 3],\n", + " [\"BIOL\", 2355, \"Field Botany\", 2],\n", + " [\"BIOL\", 2420, \"Human Physiology\", 4],\n", + " [\"PHYS\", 2040, \"Classcal Theoretical Physics II\", 4],\n", + " [\"PHYS\", 2060, \"Quantum Mechanics\", 3],\n", + " [\"PHYS\", 2100, \"General Relativity and Cosmology\", 3],\n", + " [\"PHYS\", 2140, \"Statistical Mechanics\", 4],\n", + " [\"PHYS\", 2210, \"Physics for Scientists and Engineers I\", 4],\n", + " [\"PHYS\", 2220, \"Physics for Scientists and Engineers II\", 4],\n", + " [\"PHYS\", 3210, \"Physics for Scientists I (Honors)\", 4],\n", + " [\"PHYS\", 3220, \"Physics for Scientists II (Honors)\", 4],\n", + " [\"MATH\", 1250, \"Calculus for AP Students I\", 4],\n", + " [\"MATH\", 1260, \"Calculus for AP Students II\", 4],\n", + " [\"MATH\", 1210, \"Calculus I\", 4],\n", + " [\"MATH\", 1220, \"Calculus II\", 4],\n", + " [\"MATH\", 2210, \"Calculus III\", 3],\n", + " [\"MATH\", 2270, \"Linear Algebra\", 4],\n", + " [\"MATH\", 2280, \"Introduction to Differential Equations\", 4],\n", + " [\"MATH\", 3210, \"Foundations of Analysis I\", 4],\n", + " [\"MATH\", 3220, \"Foundations of Analysis II\", 4],\n", + " [\"CS\", 1030, \"Foundations of Computer Science\", 3],\n", + " [\"CS\", 1410, \"Introduction to Object-Oriented Programming\", 4],\n", + " [\"CS\", 2420, \"Introduction to Algorithms & Data Structures\", 4],\n", + " [\"CS\", 2100, \"Discrete Structures\", 3],\n", + " [\"CS\", 3500, \"Software Practice\", 4],\n", + " [\"CS\", 3505, \"Software Practice II\", 3],\n", + " [\"CS\", 3810, \"Computer Organization\", 4],\n", + " [\"CS\", 4400, \"Computer Systems\", 4],\n", + " [\"CS\", 4150, \"Algorithms\", 3],\n", + " [\"CS\", 3100, \"Models of Computation\", 3],\n", + " [\"CS\", 3200, \"Introduction to Scientific Computing\", 3],\n", + " [\"CS\", 4000, \"Senior Capstone Project - Design Phase\", 3],\n", + " [\"CS\", 4500, \"Senior Capstone Project\", 3],\n", + " [\"CS\", 4940, \"Undergraduate Research\", 3],\n", + " [\"CS\", 4970, \"Computer Science Bachelors Thesis\", 3],\n", + " ]\n", + ")\n", "\n", - " ['PHYS', 2040, 'Classcal Theoretical Physics II', 4],\n", - " ['PHYS', 2060, 'Quantum Mechanics', 3],\n", - " ['PHYS', 2100, 'General Relativity and Cosmology', 3],\n", - " ['PHYS', 2140, 'Statistical Mechanics', 4],\n", - " \n", - " ['PHYS', 2210, 'Physics for Scientists and Engineers I', 4], \n", - " ['PHYS', 2220, 'Physics for Scientists and Engineers II', 4],\n", - " ['PHYS', 3210, 'Physics for Scientists I (Honors)', 4],\n", - " ['PHYS', 3220, 'Physics for Scientists II (Honors)', 4],\n", - " \n", - " ['MATH', 1250, 'Calculus for AP Students I', 4],\n", - " ['MATH', 1260, 'Calculus for AP Students II', 4],\n", - " ['MATH', 1210, 'Calculus I', 4],\n", - " ['MATH', 1220, 'Calculus II', 4],\n", - " ['MATH', 2210, 'Calculus III', 3],\n", - " \n", - " ['MATH', 2270, 'Linear Algebra', 4],\n", - " ['MATH', 2280, 'Introduction to Differential Equations', 4],\n", - " ['MATH', 3210, 'Foundations of Analysis I', 4],\n", - " ['MATH', 3220, 'Foundations of Analysis II', 4],\n", - " \n", - " ['CS', 1030, 'Foundations of Computer Science', 3],\n", - " ['CS', 1410, 'Introduction to Object-Oriented Programming', 4],\n", - " ['CS', 2420, 'Introduction to Algorithms & Data Structures', 4],\n", - " ['CS', 2100, 'Discrete Structures', 3],\n", - " ['CS', 3500, 'Software Practice', 4],\n", - " ['CS', 3505, 'Software Practice II', 3],\n", - " ['CS', 3810, 'Computer Organization', 4],\n", - " ['CS', 4400, 'Computer Systems', 4],\n", - " ['CS', 4150, 'Algorithms', 3],\n", - " ['CS', 3100, 'Models of Computation', 3],\n", - " ['CS', 3200, 'Introduction to Scientific Computing', 3],\n", - " ['CS', 4000, 'Senior Capstone Project - Design Phase', 3],\n", - " ['CS', 4500, 'Senior Capstone Project', 3],\n", - " ['CS', 4940, 'Undergraduate Research', 3],\n", - " ['CS', 4970, 'Computer Science Bachelor''s Thesis', 3]])\n", + "Term.insert(\n", + " dict(term_year=year, term=term)\n", + " for year in range(1999, 2019)\n", + " for term in [\"Spring\", \"Summer\", \"Fall\"]\n", + ")\n", "\n", - "Term.insert(dict(term_year=year, term=term) \n", - " for year in range(1999, 2019) \n", - " for term in ['Spring', 'Summer', 'Fall'])\n", + "Term().fetch(order_by=(\"term_year DESC\", \"term DESC\"), as_dict=True, limit=1)[0]\n", "\n", - "Term().fetch(order_by=('term_year DESC', 'term DESC'), as_dict=True, limit=1)[0]\n", + "CurrentTerm().insert1(\n", + " {**Term().fetch(order_by=(\"term_year DESC\", \"term DESC\"), as_dict=True, limit=1)[0]}\n", + ")\n", "\n", - "CurrentTerm().insert1({\n", - " **Term().fetch(order_by=('term_year DESC', 'term DESC'), as_dict=True, limit=1)[0]})\n", "\n", "def make_section(prob):\n", " for c in (Course * Term).proj():\n", - " for sec in 'abcd':\n", + " for sec in \"abcd\":\n", " if random.random() < prob:\n", " break\n", " yield {\n", - " **c, 'section': sec, \n", - " 'auditorium': random.choice('ABCDEF') + str(random.randint(1,100))} \n", + " **c,\n", + " \"section\": sec,\n", + " \"auditorium\": random.choice(\"ABCDEF\") + str(random.randint(1, 100)),\n", + " }\n", + "\n", "\n", "Section.insert(make_section(0.5))" ] @@ -339,29 +360,35 @@ } ], "source": [ - "# Enrollment \n", - "terms = Term().fetch('KEY')\n", + "# Enrollment\n", + "terms = Term().fetch(\"KEY\")\n", "quit_prob = 0.1\n", - "for student in tqdm(Student.fetch('KEY')):\n", + "for student in tqdm(Student.fetch(\"KEY\")):\n", " start_term = random.randrange(len(terms))\n", " for term in terms[start_term:]:\n", " if random.random() < quit_prob:\n", " break\n", " else:\n", - " sections = ((Section & term) - (Course & (Enroll & student))).fetch('KEY')\n", + " sections = ((Section & term) - (Course & (Enroll & student))).fetch(\"KEY\")\n", " if sections:\n", - " Enroll.insert({**student, **section} for section in \n", - " random.sample(sections, random.randrange(min(5, len(sections)))))\n", - " \n", + " Enroll.insert(\n", + " {**student, **section}\n", + " for section in random.sample(\n", + " sections, random.randrange(min(5, len(sections)))\n", + " )\n", + " )\n", + "\n", "# assign random grades\n", - "grades = LetterGrade.fetch('grade')\n", + "grades = LetterGrade.fetch(\"grade\")\n", "\n", - "grade_keys = Enroll.fetch('KEY')\n", + "grade_keys = Enroll.fetch(\"KEY\")\n", "random.shuffle(grade_keys)\n", - "grade_keys = grade_keys[:len(grade_keys)*9//10]\n", + "grade_keys = grade_keys[: len(grade_keys) * 9 // 10]\n", "\n", - "Grade.insert({**key, 'grade':grade} \n", - " for key, grade in zip(grade_keys, random.choices(grades, k=len(grade_keys))))" + "Grade.insert(\n", + " {**key, \"grade\": grade}\n", + " for key, grade in zip(grade_keys, random.choices(grades, k=len(grade_keys)))\n", + ")" ] }, { @@ -517,7 +544,9 @@ } ], "source": [ - "(Grade * LetterGrade) & \"term_year='2018'\" & dj.Top(limit=5, order_by='points DESC', offset=5)" + "(Grade * LetterGrade) & \"term_year='2018'\" & dj.Top(\n", + " limit=5, order_by=\"points DESC\", offset=5\n", + ")" ] }, { @@ -537,7 +566,11 @@ } ], "source": [ - "((LetterGrade * Grade) & \"term_year='2018'\" & dj.Top(limit=10, order_by='points DESC', offset=0)).make_sql()" + "(\n", + " (LetterGrade * Grade)\n", + " & \"term_year='2018'\"\n", + " & dj.Top(limit=10, order_by=\"points DESC\", offset=0)\n", + ").make_sql()" ] }, { @@ -557,7 +590,11 @@ } ], "source": [ - "((Grade * LetterGrade) & \"term_year='2018'\" & dj.Top(limit=20, order_by='points DESC', offset=0)).make_sql()" + "(\n", + " (Grade * LetterGrade)\n", + " & \"term_year='2018'\"\n", + " & dj.Top(limit=20, order_by=\"points DESC\", offset=0)\n", + ").make_sql()" ] }, { @@ -763,7 +800,9 @@ } ], "source": [ - "(Grade * LetterGrade) & \"term_year='2018'\" & dj.Top(limit=20, order_by='points DESC', offset=0)" + "(Grade * LetterGrade) & \"term_year='2018'\" & dj.Top(\n", + " limit=20, order_by=\"points DESC\", offset=0\n", + ")" ] }, { @@ -969,7 +1008,9 @@ } ], "source": [ - "(LetterGrade * Grade) & \"term_year='2018'\" & dj.Top(limit=20, order_by='points DESC', offset=0)" + "(LetterGrade * Grade) & \"term_year='2018'\" & dj.Top(\n", + " limit=20, order_by=\"points DESC\", offset=0\n", + ")" ] }, { diff --git a/docs/src/tutorials/json.ipynb b/docs/src/tutorials/json.ipynb index f39b43e33..9c5feebf6 100644 --- a/docs/src/tutorials/json.ipynb +++ b/docs/src/tutorials/json.ipynb @@ -27,7 +27,7 @@ "id": "67cf93d2", "metadata": {}, "source": [ - "First you will need to [install](../../getting-started/#installation) and [connect](../../getting-started/#connection) to a DataJoint [data pipeline](https://datajoint.com/docs/core/glossary/#data-pipeline).\n", + "First you will need to [install](../../getting-started/#installation) and [connect](../../getting-started/#connection) to a DataJoint [data pipeline](https://docs.datajoint.com/core/datajoint-python/latest/concepts/data-pipelines/#what-is-a-data-pipeline).\n", "\n", "Now let's start by importing the `datajoint` client." ] @@ -406,7 +406,7 @@ ], "source": [ "# Which team has a `car` equal to 100 inches long?\n", - "Team & {'car.length': 100}" + "Team & {\"car.length\": 100}" ] }, { @@ -592,7 +592,7 @@ ], "source": [ "# Any team that has had their car inspected?\n", - "Team & [{'car.inspected:unsigned': True}, {'car.safety_inspected:unsigned': True}]" + "Team & [{\"car.inspected:unsigned\": True}, {\"car.safety_inspected:unsigned\": True}]" ] }, { @@ -820,7 +820,7 @@ "source": [ "# Only interested in the car names and the length but let the type be inferred\n", "q_untyped = Team.proj(\n", - " car_name='car.name',\n", + " car_name=\"car.name\",\n", " car_length=\"car.length\",\n", ")\n", "q_untyped" @@ -950,7 +950,7 @@ "source": [ "# Nevermind, I'll specify the type explicitly\n", "q_typed = Team.proj(\n", - " car_name='car.name',\n", + " car_name=\"car.name\",\n", " car_length=\"car.length:float\",\n", ")\n", "q_typed" @@ -1058,7 +1058,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.7.16 64-bit", + "display_name": "all_purposes", "language": "python", "name": "python3" }, @@ -1072,12 +1072,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.16" - }, - "vscode": { - "interpreter": { - "hash": "949777d72b0d2535278d3dc13498b2535136f6dfe0678499012e853ee9abcab1" - } + "version": "3.9.18" } }, "nbformat": 4, diff --git a/pyproject.toml b/pyproject.toml index c484072bd..075bb92b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ maintainers = [ {name = "Dimitri Yatsenko", email = "dimitri@datajoint.com"}, {name = "DataJoint Contributors", email = "support@datajoint.com"}, ] -# manually sync here: https://datajoint.com/docs/core/datajoint-python/latest/#welcome-to-datajoint-for-python +# manually sync here: https://docs.datajoint.com/core/datajoint-python/latest/#welcome-to-datajoint-for-python description = "DataJoint for Python is a framework for scientific workflow management based on relational principles. DataJoint is built on the foundation of the relational data model and prescribes a consistent method for organizing, populating, computing, and querying data." readme = "README.md" license = {file = "LICENSE.txt"} @@ -69,8 +69,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://datajoint.com/docs" -Documentation = "https://datajoint.com/docs" +Homepage = "https://docs.datajoint.com/" +Documentation = "https://docs.datajoint.com/" Repository = "https://github.com/datajoint/datajoint-python" "Bug Tracker" = "https://github.com/datajoint/datajoint-python/issues" "Release Notes" = "https://github.com/datajoint/datajoint-python/releases"