Skip to content

Commit c9ceea1

Browse files
dbirmangithub-actions[bot]dougollerenshawgouwensbruno-f-cruz
authored
Release v2.7.0 (#1820)
* Allow specimen_id to be a list (#1770) * Allow specimen_id to be a list * Removed nonetype test * Fixed specimen names in test * Updated specimen_id description to clarify expectation during in-vivo sessions * Spread args over multi lines to avoid lint fail * docs: rebuild docs (#1771) * docs: minor fixes to acquisition.md * docs: remove bad directives and links * docs: improve description for AcquisitionSubjectDetails (#1772) * docs: improve description for AcquisitionSubjectDetails * docs: rebuild docs * fix: throw warnings when users include multiple identically named devices in the Instrument (#1773) * fix: allow both planar and regular sectioning in sectioning procedures (#1777) * fix: allow NHPSubject as subject_details option (#1778) * docs: auto-build docs on opening PR (#1760) * docs: auto-build docs on opening PR * update docs [skip actions] * docs: update contribution.md * update docs [skip actions] * chore: remove all unnecessary graphviz dependencies * update docs [skip actions] * update docs [skip actions] --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Handle lists of specimen IDs in procedures validator (#1783) * Handle lists of specimen IDs in procedures validator * Fix to properly handle individual str as well as lists of str * refactor: simplifying code a tiny bit --------- Co-authored-by: Dan Birman <danbirman@gmail.com> * Add ticket linking workflow (#1785) * Barseq blackbox acquisition (#1781) * First pass at minimal blackbox acquisition. Has file that generates acquisition for two subjects, plus json outputs * Added reference to output files * Added specimen IDs to barseq acquisitions * Removed readme file * Updating examples/barseq_acquisition.py docstring * Cleaned up comments in examples/barseq_acquisition.py * Set timestamps to pacific with offset * Changed experimenters to 'Barseq team' * Removed references to local paths, removed duplicate jsons * Added ExternalDataStream, made instrument optional, added test, updated example barseq * Updated example json outputs for barseq subjects * update docs [skip actions] * Linting fixes * Used DiscriminatedList * Clean up stream adding logic * Simplify barseq acquisition example * Removed jsons * clean up test and import properly * Add ExternalDataStream support to Metadata validators and test that no instrument warning is raised for external acquisitions. * Wording updates as suggested by Dan --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * 1792 quality control validator has a bug at line 307 where it fails to check metrics before doing metrics0 (#1793) * fix: validator would trigger on empty metrics * fix: do this upfront by bypassing the validator, adds a test * chore: delete CHANGELOG.md (#1799) * chore: delete CHANGELOG.md * update docs [skip actions] --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * refactor: replace root calls to logging with module-level loggers (#1800) * fix: issue with actions being skipped unnecessarily * refactor: replace root logger with local loggers * test: fixes to logger patches * docs: improve docstring (#1748) * docs: improve docstring * docs: update specimen ID * docs: clarify suffix * docs: better writing * update docs * fix: bad merge * update docs --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * refactor: only allow wrapped NonSurgeryInjections in Procedures.subject_procedures (#1802) * refactor: only allow Injections in Procedures.subject_procedures when wrapped with an InjectionProcedure * chore: add ethics_review_id/protocol_id * fix: only allow Injection, BrainInjection requires a full CS from Surgery * update docs [skip actions] * refactor: NonSurgicalInjection * update docs --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Add missing `tzdata` dependency (#1811) * Add git hash to Code model (#1813) * Add git hash to Code model * update docs * Increase hash length upper bound * Change property name and emit warning if hash and version are not defined * Refactor type alias * update docs * Break lines * Update tests to reflect longer hashes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * feat: add barseq instrument (#1685) * feat: add barseq instrument * refactor: SlapPlane -> Slap2Plane * Revert "refactor: SlapPlane -> Slap2Plane" This reverts commit 6f193b8. * chore: lint * refactor: fix serialization code in example * fix: fix issues blocking build * chore: fix write function for instrument example * fix: specimen_ids validator correctly flattens lists (#1763) * feat: working on procedures_sectioning example * feat: continuing to develop chunk sections * chore: embed slide regions in python code * chore: lint * chore: docstrings * chore: lint * chore: remove full sectioning file --------- Co-authored-by: Doug Ollerenshaw <doug.ollerenshaw@alleninstitute.org> * chore: bump version * bump schema version [skip actions] * chore: bump metadata * bump schema version [skip actions] --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Doug Ollerenshaw <doug.ollerenshaw@alleninstitute.org> Co-authored-by: gouwens <ngouwens@gmail.com> Co-authored-by: Bruno Cruz <7049351+bruno-f-cruz@users.noreply.github.com>
2 parents e40aa07 + 4e65801 commit c9ceea1

68 files changed

Lines changed: 2489 additions & 400 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Link issue to cross-repo milestone parent
2+
3+
on:
4+
issues:
5+
types: [milestoned]
6+
7+
jobs:
8+
link:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Link to parent issue in aind-scientific-computing
13+
uses: actions/github-script@v7
14+
with:
15+
github-token: ${{ secrets.SERVICE_TOKEN }}
16+
script: |
17+
const issue = context.payload.issue;
18+
const milestone = issue.milestone;
19+
20+
if (!milestone) return;
21+
22+
const targetOwner = "AllenNeuralDynamics";
23+
const targetRepo = "aind-scientific-computing";
24+
25+
const url = milestone.description;
26+
const match = url?.match(/\/issues\/(\d+)$/);
27+
28+
if (!match) {
29+
console.log(`Milestone description is not a roadmap URL: ${url}`);
30+
return;
31+
}
32+
33+
const parentNumber = parseInt(match[1]);
34+
35+
const { data: parent } = await github.rest.issues.get({
36+
owner: targetOwner,
37+
repo: targetRepo,
38+
issue_number: parentNumber
39+
});
40+
41+
if (!parent) {
42+
console.log(`No issue found at ${url}`);
43+
return;
44+
}
45+
46+
await github.request("POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues", {
47+
owner: targetOwner,
48+
repo: targetRepo,
49+
issue_number: parentNumber,
50+
sub_issue_id: issue.id,
51+
headers: {
52+
"X-GitHub-Api-Version": "2022-11-28"
53+
}
54+
});
55+
56+
console.log(`Linked issue #${issue.number} as sub-issue of ${targetRepo}#${parentNumber}`);

.github/workflows/run_dev_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
python-version: ${{ matrix.python-version }}
3939
- name: Install dependencies
4040
run: |
41-
sudo apt install graphviz libgraphviz-dev -y
4241
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
4342
- name: Run tests and coverage
4443
run: coverage run -m unittest discover && coverage report

.github/workflows/run_main_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
python-version: ${{ matrix.python-version }}
4141
- name: Install dependencies
4242
run: |
43-
sudo apt install graphviz libgraphviz-dev -y
4443
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
4544
- name: Run tests and coverage
4645
run: coverage run -m unittest discover && coverage report
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update docs for dev PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
update_docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
token: ${{ secrets.SERVICE_TOKEN }}
15+
ref: ${{ github.head_ref }}
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: '3.10'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
23+
- name: Generate docs
24+
run: |
25+
python src/aind_data_schema/utils/docs/model_generator.py
26+
python src/aind_data_schema/utils/docs/registries_generator.py
27+
python src/aind_data_schema/utils/docs/doc_generator.py
28+
sphinx-build -b html docs/source/ docs/build/html
29+
- name: Commit changes
30+
uses: EndBug/add-and-commit@v9
31+
with:
32+
default_author: github_actions
33+
message: "update docs"
34+
add: '["docs"]'

.github/workflows/update_docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ jobs:
6060
python-version: '3.10'
6161
- name: Install dependencies
6262
run: |
63-
sudo apt install graphviz libgraphviz-dev -y
6463
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
6564
- name: Commit changes
6665
uses: EndBug/add-and-commit@v9

CHANGELOG.md

Lines changed: 0 additions & 186 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Starting with the v2.0 release all changes must be accompanied by an [upgrader](
3939

4040
### Documentation
4141

42-
**Note**: The core files (`docs/source/acquisition.md`, etc) are auto-generated from the base files in the folder `docs/base/core` with the model definitions appended. You must modify the **base** file or your changes will be overwritten when you run the documentation generators.
42+
Documentation is automatically built when you open a PR into the aind-data-schema repository. For **core files, please make sure that you modify the base file**, these are used to construct the source files: i.e. `docs/base/core/acquisition.md` will over-write any changes made to `docs/source/acquisition.md`.
43+
44+
#### Manually build documentation
4345

4446
To generate the source files for the documentation and model class links, run:
4547

docs/base/core/acquisition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Because the start and stop times are independent for data streams and stimulus e
1919

2020
## Uniqueness
2121

22-
You can uniquely identify acquisition sessions (and therefore a specific data asset) by their acquisition datetime (`Acquisition.acquisition_end_time`). In addition, the `Acquisition.acquisition_type` is an open `str` field where you can put conceptual information that groups similar acquisitions together. This should not be completely redundant with project names, modalities, stimulus names, or any other fields in the metadata.
22+
You can uniquely identify acquisition sessions (and therefore a specific data asset) by their acquisition datetime (`Acquisition.acquisition_start_time`). In addition, the `Acquisition.acquisition_type` is an open `str` field where you can put conceptual information that groups similar acquisitions together. This should not be completely redundant with project names, modalities, stimulus names, or any other fields in the metadata.
2323

24-
For example, in the `"Brain Computer Interface"` project name, good acquisition types would be strings like: `"BCI: Single neuron stim"` and `"BCI: Group neuron stim"`. These phrases clearly identify what part of a project these acquisitions belong to, without being overly redundant with controlled fields in the metadata.
24+
For example, in the `"Brain Computer Interface"` project name, good acquisition types would be strings like: `"Single neuron stim"` and `"Group neuron stim"`. These phrases clearly identify what part of a project these acquisitions belong to, without being overly redundant with controlled fields in the metadata.
2525

2626
## Stimulus parameters
2727

docs/base/core/quality_control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If you find yourself computing a value for something smaller than an entire moda
2626

2727
`tags` are groups of descriptors that define how metrics are organized hierarchically, making it easier to visualize metrics. Good tag keys (groups) are things like "probe" and good tag values are things like "Probe A" or just "A".
2828

29-
```{python}
29+
```python
3030
# For an electrophysiology metric
3131
tags = {
3232
"probe": "A",

0 commit comments

Comments
 (0)