From 117d0c440035849a16f5d2973d48e78413172490 Mon Sep 17 00:00:00 2001 From: A-Baji Date: Thu, 16 Nov 2023 14:15:40 -0600 Subject: [PATCH 1/8] revert: :memo: revert docs dark mode cell text color --- docs/src/.overrides/assets/stylesheets/extra.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/src/.overrides/assets/stylesheets/extra.css b/docs/src/.overrides/assets/stylesheets/extra.css index 0bb7f5b..a4d0061 100644 --- a/docs/src/.overrides/assets/stylesheets/extra.css +++ b/docs/src/.overrides/assets/stylesheets/extra.css @@ -92,7 +92,6 @@ html a[title="YouTube"].md-social__link svg { /* --md-footer-fg-color: var(--dj-white); */ } -[data-md-color-scheme="slate"] td, -th { +[data-md-color-scheme="slate"] .jupyter-wrapper .Table Td { color: var(--dj-black) } \ No newline at end of file From 6441481367a0874c17869b8242b103e0e206a9e0 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 23 Aug 2024 08:48:02 -0500 Subject: [PATCH 2/8] Add `Attribute` part table for `Event` --- CHANGELOG.md | 5 +++++ element_event/event.py | 22 ++++++++++++++++++++-- element_event/version.py | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 639abef..9b94a1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. +## [0.2.4] - 2024-08-23 + ++ Update - EventType to varchar(32) ++ Add - `Attribute` part-table for the `Event` table + ## [0.2.3] - 2023-06-20 + Update - GitHub Actions workflows diff --git a/element_event/event.py b/element_event/event.py index cca66eb..fcad5e1 100644 --- a/element_event/event.py +++ b/element_event/event.py @@ -93,12 +93,12 @@ class EventType(dj.Lookup): """Set of unique events present within a recording session Attributes: - event_type ( varchar(16) ): Unique event type. + event_type ( varchar(32) ): Unique event type. event_type_description ( varchar(256) ): Event type description. """ definition = """ - event_type : varchar(16) + event_type : varchar(32) --- event_type_description='' : varchar(256) """ @@ -158,6 +158,24 @@ class Event(dj.Imported): event_end_time=null : float # (second) relative to recording start """ + class Attribute(dj.Part): + """Additional event attributes to fully describe an event + + Attributes: + Event (foreign key): Event table primary key. + attribute_name ( varchar(32) ): Name of trial attribute + attribute_value ( varchar(2000) ): Optional. Trial attribute value + attribute_blob (longblob): Optional. Trial attribute numerical data + """ + + definition = """ # Additional event attributes to fully describe an event + -> master + attribute_name : varchar(32) + --- + attribute_value='': varchar(2000) + attribute_blob=null: longblob + """ + def make(self, key): """Populate based on unique entries in BehaviorRecording and EventType.""" raise NotImplementedError("For `insert`, use `allow_direct_insert=True`") diff --git a/element_event/version.py b/element_event/version.py index fd93127..df499cc 100644 --- a/element_event/version.py +++ b/element_event/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = "0.2.3" +__version__ = "0.2.4" From 4247f955208e9a521b661883257b69e7c01a55c6 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 23 Aug 2024 09:01:57 -0500 Subject: [PATCH 3/8] format(version) --- element_event/version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/element_event/version.py b/element_event/version.py index df499cc..22dffcd 100644 --- a/element_event/version.py +++ b/element_event/version.py @@ -1,2 +1,3 @@ """Package metadata.""" + __version__ = "0.2.4" From 09e599e35745e20c5bf89e7fb82156d8fe89c826 Mon Sep 17 00:00:00 2001 From: MilagrosMarin Date: Thu, 26 Sep 2024 19:42:54 +0200 Subject: [PATCH 4/8] chore: add new GitHub Action callers --- .../workflows/devcontainer-build-publish-caller.yml | 10 ++++++++++ .github/workflows/mkdocs-release-caller.yml | 9 +++++++++ .github/workflows/semantic-release-caller.yml | 10 ++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/devcontainer-build-publish-caller.yml create mode 100644 .github/workflows/mkdocs-release-caller.yml create mode 100644 .github/workflows/semantic-release-caller.yml diff --git a/.github/workflows/devcontainer-build-publish-caller.yml b/.github/workflows/devcontainer-build-publish-caller.yml new file mode 100644 index 0000000..2745efe --- /dev/null +++ b/.github/workflows/devcontainer-build-publish-caller.yml @@ -0,0 +1,10 @@ +name: devcontainer_build_publish +on: + workflow_dispatch: + +jobs: + call_devcontainer_build_publish: + uses: datajoint/.github/.github/workflows/devcontainer-build-publish.yaml@main + secrets: + DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} + DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN_FOR_ELEMENTS}} diff --git a/.github/workflows/mkdocs-release-caller.yml b/.github/workflows/mkdocs-release-caller.yml new file mode 100644 index 0000000..e25b018 --- /dev/null +++ b/.github/workflows/mkdocs-release-caller.yml @@ -0,0 +1,9 @@ +name: mkdocs-release +on: + workflow_dispatch: + +jobs: + mkdocs_release: + uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main + permissions: + contents: write diff --git a/.github/workflows/semantic-release-caller.yml b/.github/workflows/semantic-release-caller.yml new file mode 100644 index 0000000..bfd7643 --- /dev/null +++ b/.github/workflows/semantic-release-caller.yml @@ -0,0 +1,10 @@ +name: semantic-release +on: + workflow_dispatch: + +jobs: + call_semantic_release: + uses: datajoint/.github/.github/workflows/semantic-release.yaml@main + secrets: + APP_ID: ${{ secrets.ELEMENT_APP_ID }} + GET_TOKEN_KEY: ${{ secrets.ELEMENT_GET_TOKEN_KEY }} From 06274f8ccbe4e15fda5856d494f2c5fc5db566fc Mon Sep 17 00:00:00 2001 From: kushalbakshi Date: Fri, 25 Oct 2024 15:14:39 -0400 Subject: [PATCH 5/8] Update - `trial_type` to varchar(24) in `TrialType` table --- CHANGELOG.md | 6 ++++++ element_event/trial.py | 4 ++-- element_event/version.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b94a1b..21d2c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. +## [0.2.5] - 2024-10-25 + ++ Update - `trial_type` to varchar(24) in `TrialType` table + ## [0.2.4] - 2024-08-23 + Update - EventType to varchar(32) @@ -48,6 +52,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Add - AlignmentEvent design to capture windows relative to an event + Add - Black formatting into code base +[0.2.5]: https://github.com/datajoint/element-event/releases/tag/0.2.5 +[0.2.4]: https://github.com/datajoint/element-event/releases/tag/0.2.4 [0.2.3]: https://github.com/datajoint/element-event/releases/tag/0.2.3 [0.2.2]: https://github.com/datajoint/element-event/releases/tag/0.2.2 [0.2.1]: https://github.com/datajoint/element-event/releases/tag/0.2.1 diff --git a/element_event/trial.py b/element_event/trial.py index adbb8dc..e1161dc 100644 --- a/element_event/trial.py +++ b/element_event/trial.py @@ -120,12 +120,12 @@ class TrialType(dj.Lookup): """Set of unique trial types present within a recording session Attributes: - trial_type ( varchar(16) ): Name of trial type + trial_type ( varchar(24) ): Name of trial type trial_type_description ( varchar(256) ): Optional. Long Description. """ definition = """ - trial_type : varchar(16) + trial_type : varchar(24) --- trial_type_description='' : varchar(256) """ diff --git a/element_event/version.py b/element_event/version.py index 22dffcd..f7d4a36 100644 --- a/element_event/version.py +++ b/element_event/version.py @@ -1,3 +1,3 @@ """Package metadata.""" -__version__ = "0.2.4" +__version__ = "0.2.5" From 5a134de62be0704882c50c438783fce8d20cd746 Mon Sep 17 00:00:00 2001 From: MilagrosMarin Date: Fri, 14 Feb 2025 15:23:09 +0000 Subject: [PATCH 6/8] fix: update element's test flow --- .github/workflows/test.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 79bfb64..0b82d31 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,20 +1,21 @@ name: Test on: push: + branches: + - main pull_request: + branches: + - main workflow_dispatch: jobs: + devcontainer-build: + uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main tests: runs-on: ubuntu-latest strategy: matrix: py_ver: ["3.9", "3.10"] - mysql_ver: ["8.0", "5.7"] - include: - - py_ver: "3.8" - mysql_ver: "5.7" - - py_ver: "3.7" - mysql_ver: "5.7" + mysql_ver: ["8.0"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{matrix.py_ver}} @@ -29,4 +30,3 @@ jobs: run: | python_version=${{matrix.py_ver}} black element_event --check --verbose --target-version py${python_version//.} - From cff4cd64a9b6e97a1e7ae0e5921a75a06ebb0eed Mon Sep 17 00:00:00 2001 From: MilagrosMarin Date: Fri, 14 Feb 2025 15:28:24 +0000 Subject: [PATCH 7/8] minor update --- .github/workflows/test.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0b82d31..9bb4635 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,8 +8,6 @@ on: - main workflow_dispatch: jobs: - devcontainer-build: - uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main tests: runs-on: ubuntu-latest strategy: From 6f580d54294bfbe48fe64d4b79120ef55d10fe3f Mon Sep 17 00:00:00 2001 From: MilagrosMarin Date: Tue, 20 May 2025 01:57:51 +0100 Subject: [PATCH 8/8] fix(docs): update home URL from `datajoint.com/docs` to `docs.datajoint.com` --- .github/ISSUE_TEMPLATE/config.yml | 2 +- CONTRIBUTING.md | 2 +- README.md | 4 ++-- docs/mkdocs.yaml | 2 +- docs/src/.overrides/partials/nav.html | 19 +++++-------------- docs/src/concepts.md | 4 ++-- 6 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b3d197d..7436854 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: DataJoint Contribution Guideline - url: https://datajoint.com/docs/community/contribute/ + url: https://docs.datajoint.com/about/contribute/ about: Please make sure to review the DataJoint Contribution Guidelines \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd14131..736a9f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,3 @@ # Contribution Guidelines -This project follows the [DataJoint Contribution Guidelines](https://docs.datajoint.org/python/community/02-Contribute.html). Please reference the link for more full details. +This project follows the [DataJoint Contribution Guidelines](https://docs.datajoint.com/about/contribute/). Please reference the link for more full details. diff --git a/README.md b/README.md index 03d1d6b..ef270f3 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ + `element-event` can be flexibly attached to any DataJoint workflow. -+ See the [Element Event documentation](https://elements.datajoint.org/description/event/) for the background information and development timeline. ++ See the [Element Event documentation](https://docs.datajoint.com/elements/element-event/) for the background information and development timeline. -+ For more information on the DataJoint Elements project, please visit https://elements.datajoint.org. This work is supported by the National Institutes of Health. ++ For more information on the DataJoint Elements project, please visit . This work is supported by the National Institutes of Health. ## Element architecture diff --git a/docs/mkdocs.yaml b/docs/mkdocs.yaml index e3db9ff..37171d5 100644 --- a/docs/mkdocs.yaml +++ b/docs/mkdocs.yaml @@ -1,7 +1,7 @@ # ---------------------- PROJECT SPECIFIC --------------------------- site_name: DataJoint Documentation -site_url: http://localhost/docs/elements/element-event +site_url: https://docs.datajoint.com/elements/element-event/ repo_url: https://github.com/datajoint/element-event repo_name: datajoint/element-event nav: diff --git a/docs/src/.overrides/partials/nav.html b/docs/src/.overrides/partials/nav.html index 4cf2f13..a72dfaf 100644 --- a/docs/src/.overrides/partials/nav.html +++ b/docs/src/.overrides/partials/nav.html @@ -1,23 +1,14 @@ {% set class = "md-nav md-nav--primary" %} {% if "navigation.tabs" in features %} {% set class = class ~ " md-nav--lifted" %} {% endif %} {% if "toc.integrate" in features %} {% set class = class ~ " md-nav--integrated" %} {% endif %} - \ No newline at end of file diff --git a/docs/src/concepts.md b/docs/src/concepts.md index 0a9385a..dec92f4 100644 --- a/docs/src/concepts.md +++ b/docs/src/concepts.md @@ -90,7 +90,7 @@ Event connects to upstream Element Session. ![element-event diagram](https://raw.githubusercontent.com/datajoint/element-event/main/images/trial_event_diagram.svg) -### `subject` schema ([API docs](https://datajoint.com/docs/elements/element-animal/api/element_animal/subject)) +### `subject` schema ([API docs](https://docs.datajoint.com/elements/element-animal/latest/api/element_animal/subject/)) Although not required, most choose to connect the `Session` table to a `Subject` table. @@ -98,7 +98,7 @@ Although not required, most choose to connect the `Session` table to a `Subject` | --- | --- | | Subject | Basic information of the research subject. | -### `session` schema ([API docs](https://datajoint.com/docs/elements/element-session/api/element_session/session_with_datetime)) +### `session` schema ([API docs](https://docs.datajoint.com/elements/element-session/latest/api/element_session/session_with_datetime/)) | Table | Description | | --- | --- |