Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Commit 0143b08

Browse files
Merge pull request #264 from guzman-raphael/release013-compatibility
Update docs compatible with release djpy 0.13
2 parents 9f6ad80 + e2d761b commit 0143b08

File tree

8 files changed

+67
-6
lines changed

8 files changed

+67
-6
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5+
## [0.2.0] - 2021-03-24
6+
### Added
7+
- Add `update1` documentation and reference it properly to datajoint-python, release 0.13. PR #264
8+
- Add `query_caching` documentation and reference it properly to datajoint-python, release 0.13. PR #264
9+
- Add transpiler design documentation and reference it properly to datajoint-python, release 0.13. PR #264
10+
11+
### Changed
12+
- Modify the markdown parsing to `m2r2` and allow content to be included. PR #264
13+
- Update reverse proxy image from `datajoint` org. PR #264
14+
515
## [0.1.5] - 2021-03-11
616
### Added
717
- Numbering for easy reference in `Contribute` section. PR #262
@@ -37,6 +47,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
3747
- `local-docker-compose.yml` environment. PR #257
3848
- `entrypoint.sh` which is now unnecessary for the image. PR #257
3949

50+
[0.2.0]: https://github.com/datajoint/datajoint-docs/compare/v0.1.5...v0.2.0
4051
[0.1.5]: https://github.com/datajoint/datajoint-docs/compare/v0.1.4...v0.1.5
4152
[0.1.4]: https://github.com/datajoint/datajoint-docs/compare/v0.1.3...v0.1.4
4253
[0.1.3]: https://github.com/datajoint/datajoint-docs/releases/tag/v0.1.3

build_versions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"python": [
3+
"v0.13",
34
"v0.12",
45
"v0.11"
56
],

contents/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Add any Sphinx extension module names here, as strings. They can be
2323
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2424
# ones.
25-
extensions = ['sphinx.ext.mathjax','sphinx.ext.imgconverter']
25+
extensions = ['sphinx.ext.mathjax','sphinx.ext.imgconverter', 'm2r2']
2626

2727
# Add any paths that contain templates here, relative to this directory.
2828

@@ -52,7 +52,7 @@
5252
# The short X.Y version.
5353
version = ''
5454
# The full version, including alpha/beta/rc tags.
55-
release = '0.1.5'
55+
release = '0.2.0'
5656

5757

5858
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -65,7 +65,8 @@
6565
# List of patterns, relative to source directory, that match files and
6666
# directories to ignore when looking for source files.
6767
# This patterns also effect to html_static_path and html_extra_path
68-
exclude_patterns = ['README.md', '_build', 'Thumbs.db', '.DS_Store', '*/*_lang[0-9].rst', '*/*_WIP.rst']
68+
exclude_patterns = ['README.md', '_build', 'Thumbs.db', '.DS_Store', '*/*_lang[0-9].rst',
69+
'*/*_lang[0-9].md', '*/*_WIP.rst']
6970

7071
# The name of the Pygments (syntax highlighting) style to use.
7172
pygments_style = 'default'

contents/manipulation/3-Cautious-Update.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,23 @@ In database programming, the **update** operation refers to modifying the values
99
Such an in-place update mechanism is not part of DataJoint's data manipulation model, because it circumvents data :ref:`dependency constraints <referential-integrity>`.
1010

1111
This is not to say that data cannot be changed once they are part of a pipeline.
12-
In DataJoint, data are changed by replacing entire entities rather than by updating the values of their attributes.
12+
In DataJoint, data is changed by replacing entire entities rather than by updating the values of their attributes.
1313
The process of deleting existing entities and inserting new entities with corrected values ensures the :ref:`integrity <integrity>` of the data throughout the pipeline.
1414

1515
This approach applies specifically to automated tables (see :ref:`auto`).
1616
However, manual tables are often edited outside DataJoint through other interfaces.
1717
It is up to the user's discretion to allow updates in manual tables, and the user must be cognizant of the fact that updates will not trigger re-computation of dependent data.
18+
19+
Usage
20+
-----
21+
22+
For some cases, it becomes necessary to deliberately correct existing values where a user has chosen to accept the above responsibility despite the caution.
23+
24+
The ``update1`` method accomplishes this if the record already exists. Note that updates to primary key values are not allowed.
25+
26+
The method should only be used to fix problems, and not as part of a regular workflow. When updating an entry, make sure that any information stored in dependent tables that depends on the update values is properly updated as well.
27+
28+
Examples
29+
--------
30+
31+
.. include:: 1-Update_lang1.rst
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. progress: 10.0 100% Raphael
2+
3+
.. _query-caching:
4+
5+
Query Caching
6+
=============
7+
8+
Query caching allows avoiding repeated queries to the database by caching the results locally for faster retrieval.
9+
10+
To enable queries, set the query cache local path in ``dj.config``, create the directory, and activate the query caching.
11+
12+
.. include:: 12-Query-Caching_lang1.rst
13+
14+
The ``query_cache`` argument is an aribtrary string serving to differentiate cache states; setting a new value will effectively start a new cache, triggering retrieval of new values once.
15+
16+
To turn off query caching, use
17+
18+
.. include:: 12-Query-Caching_lang2.rst
19+
20+
While query caching is enabled, any insert or delete calls and any transactions are disabled and will raise an error. This ensures that stale data are not used for updating the database in violation of data integrity.
21+
22+
To clear and remove the query cache, use
23+
24+
.. include:: 12-Query-Caching_lang3.rst
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. progress: 10.0 100% Raphael
2+
3+
.. _transpiler-design:
4+
5+
Transpiler Design
6+
=================
7+
8+
This section contains the information and reasoning that went into the design of the DataJoint-to-SQL transpiler.
9+
10+
.. mdinclude:: 13-Transpiler-Design_lang1.md

docker-compose-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
python3 -m http.server
3333
fakeservices.datajoint.io:
3434
<<: *net
35-
image: raphaelguzman/nginx:v0.0.15
35+
image: datajoint/nginx:v0.0.16
3636
environment:
3737
- ADD_pharus_TYPE=REST
3838
- ADD_pharus_ENDPOINT=datajoint-docs:8000

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ sphinx==3.3.1 # search breaks with later versions
22
sphinx_rtd_theme
33
numpy
44
matplotlib
5-
recommonmark
5+
m2r2
66
#RunNotebook
77
#sphinx_bootstrap_theme

0 commit comments

Comments
 (0)