Skip to content

chore: promote dev to main (v0.2.0 release, L-9) - #33

Merged
1mattbecker merged 13 commits into
mainfrom
resolve-main-dev-divergence
Sep 11, 2026
Merged

1mattbecker merged 13 commits into
mainfrom
resolve-main-dev-divergence

Conversation

@1mattbecker

Copy link
Copy Markdown
Collaborator

Summary

Note on branch: this PR's head is resolve-main-dev-divergence, not dev directly. Because #28 squash-merged dev into main, the two branches no longer share commit ancestry for files touched on both sides — main <- dev shows a false CITATION.cff add/add conflict even though the intended resolution is trivial (main's 0.1.0 → dev's 0.2.0). This branch is dev's tip with main merged in and that one line resolved in dev's favor; content is otherwise identical to dev. dev itself is untouched — no push to a protected branch was needed.

Test plan

  • CI green on chore: bump version to 0.2.0 (L-9) #31 into dev (lint, type, test on 3.11/3.12)
  • uv run ruff check && uv run ruff format --check
  • uv run mypy src/aind_motion_energy --strict
  • uv run pytest (100% coverage gate green)

🤖 Generated with Claude Code

1mattbecker and others added 13 commits September 9, 2026 22:46
* Adopt ruff for lint and format; consolidate dev deps

Adds [tool.ruff] (line-length=100, PEP8 + complexity/statement-count
checks backing L-6) and ruff to dev deps. Runs ruff check --fix and
ruff format over src/ and tests/, splitting render_motion_energy_video
into smaller helpers to clear the new complexity/statement-count gate.
Fixes the unsorted aind_video_utils import in io.py and removes the
duplicated [project.optional-dependencies].dev block that conflicted
with [dependency-groups].dev.

Closes #4

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Adjust pylint max-statements setting

Updated pylint configuration for maximum statements.

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Adds license = {text = "MIT"} plus a LICENSE file (Allen Institute for
Neural Dynamics), replaces the personal author entry with the
institute, and adds standard classifiers. Pins the internal
aind-video-utils dependency to >=0.3.1,<1 per the dependency-pinning
rule. version stays literal at 0.1.0 for the future uv release
workflow (L-9) to rewrite.

Closes #5

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
* Add .github/ scaffolding: CoC, issue/PR templates, CODEOWNERS

Adds CODE_OF_CONDUCT.md (Contributor Covenant 2.0, matching the copy
already used across AllenNeuralDynamics repos), bug/feature/user-story
issue templates and a PR template mirroring the org's existing
aind-data-schema templates, and a CODEOWNERS defaulting to the current
maintainer. CONTRIBUTING.md was already added in Phase 0.

No GitHub Team currently has any access to this repo (confirmed via
`gh api repos/.../teams`); assigning one is left as an open item
(noted in CODEOWNERS and to be tracked in issue #16) pending a team
decision.

Closes #6

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Strip PR template and CODEOWNERS: not backed by any required source

Cross-checked against aind-library-template, the standards page, and
the reusable GH Actions workflows. CODE_OF_CONDUCT.md and the three
issue templates are verified (identical files present in
aind-library-template). PULL_REQUEST_TEMPLATE.md and CODEOWNERS are
not present in the template, the standards page, or the workflows --
removing them. (The standards page's "at least one GitHub Team as
Maintainer" requirement is a repo-settings action, not a CODEOWNERS
file; conflating the two was the mistake.)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Audit every issue against the four sources the plan cites: the AIND
software practices page, the three template repos it names, the
reusable workflows it mandates, and aind-data-schema. Remove anything
that does not trace to one of them.

30 issues -> 23, and four of the five breaking changes are gone.

Closed: L-8 (typed metadata model; dict[str, Any] passes mypy --strict),
C-3 (superseded by M-1), BA-6 (100% coverage gate applies to the library
only -- aind-capsule-template ships no tests/).

Out of compliance scope but still open as backlog: L-6, BA-3, BA-4,
C-5, C-7.

Trimmed: L-2, L-3, L-5, C-2, C-4, C-6, BA-5, BA-7, BA-8.

New: M-1, one cross-repo processing.json issue sequenced last, so its
design can be settled with SciComp without blocking anything else.

Added to L-4: link-issues-by-milestone.yml, backing the page's
requirement that PRs link to a milestone-scoped issue -- a gap the
original plan missed.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Add .github/workflows/test_lint_type.yml (lint: ruff check + format
--check, test: pytest tests/, on the 3.11/3.12 matrix via
astral-sh/setup-uv, triggered on PRs to main/dev) adapted from the
AIND reusable workflow templates, and
.github/workflows/link-issues-by-milestone.yml from
aind-library-template to back the milestone-linked-PR requirement.

Fix two gaps that would leave CI red on day one: matplotlib was only
in the viz extra, not [dependency-groups].dev, so a clean `uv sync`
left tests/test_viz.py unable to import; add it to the dev group.
The example notebook also failed `ruff check`/`ruff format --check`
(unsorted imports, one over-length line, one unformatted cell) since
L-1's reformat didn't touch it; fix those too, preserving stored
outputs. Set --cov-fail-under=68, today's coverage baseline; L-7
raises it to 100.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Converts every docstring in src/aind_motion_energy to numpydoc
Parameters/Returns/Yields sections, fills in the module docstrings and
function docstrings that were missing entirely, and modernizes
typing.Optional/Tuple/Generator to PEP 585/604 syntax now that the
package requires Python >=3.11. Bare dict returns are parameterized as
dict[str, Any].

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
…-11) (#24)

Adds the required support badge plus license/CI/coverage/python-version
badges, an installation section, a full CLI flag reference generated
from --help, and an outputs section documenting the file-naming
convention including the camera-keying heuristic the capsule silently
depends on. Also fixes the stale "Adding dependencies" instruction:
the capsule Dockerfile installs this library directly via pinned
git+pip, not from a generated environment/requirements.txt (deleted
in 3b3d65d), so the export step is dropped.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
… 100% (#25)

cli.py had zero tests and save_summary_plots was untested, together the
entire gap to the required 100% coverage gate. Adds tests/test_cli.py
(argument parsing, video discovery, the camera-keying heuristic, each
--format branch, each optional-output branch) and save_summary_plots
tests to tests/test_viz.py, plus a test closing two pre-existing gaps
in render_motion_energy_video's mux path. Raises addopts and adds
[tool.coverage.report] fail_under = 100 in pyproject.toml.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
…10) (#26)

Replace the loose notes in docs/ with a MkDocs site:

- mkdocs.yml (material theme) with mkdocstrings' numpydoc handler; the API
  reference is generated at build time by scripts/gen_ref_pages.py via
  mkdocs-gen-files + mkdocs-literate-nav, so new public modules appear on the
  site without editing docs/.
- docs/index.md landing page; design-notes.md, optimization-backlog.md and
  standards-compliance.md carried over as site pages.
- .readthedocs.yaml building the site with uv, mirroring the local command.
  Importing the project on readthedocs.org is still a manual step.
- Move notebooks/ibl_vs_aind_motion_energy_comparison.ipynb to examples/ per
  the root-level folder standard; nothing referenced the notebooks/ path except
  a comment inside the notebook itself, updated here.
- Add mkdocs/mkdocstrings to the dev group, ignore site/, document the docs
  build in CONTRIBUTING.md and README.md.

Two link fixes were needed for `mkdocs build --strict`: the plan's relative
link to ../tests/test_io.py (outside docs/) now points at GitHub, and
__init__.py gained the module docstring the reference index page renders.

Verified: uv run mkdocs build --strict, ruff check, ruff format --check, and
pytest (100% coverage) all pass.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Add mypy to dev deps with a strict [tool.mypy] block, fix the two real
strict-mode findings (a numpy buffer-protocol overload on the decoded
video plane, and an Any|None narrowing gap across the video-writer
loop in viz.py), and add types-tqdm since it exists on PyPI rather
than reaching for ignore_missing_imports. av already ships inline
types so no override was needed there. Wire a parallel `type` job
into test_lint_type.yml (our own step, not the AIND reusable
type.yml, which hardcodes src/mypackage) and gate `test` behind both
lint and type.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
…ing to SciComp (#30)

L-10 (#13, #26) added a MkDocs + mkdocstrings site and .readthedocs.yaml,
but the RTD project was never imported so it never went live. Rather than
maintain a second, unpublished hosting path, docs hosting is deferred to
SciComp's infrastructure.

Keeps the examples/ directory move and numpydoc docstrings (L-5) from the
same original PR, since both are independent of where the site is hosted.
Also drops properdocs, a transitive dev-dependency pulled in by recent
mkdocs-literate-nav/mkdocs-gen-files releases that was printing an
unsolicited ad for a competing tool into mkdocs build output.

Updates docs/standards-compliance.md to record the reversal.

See #29.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Manual version bump for the first tagged release (#12), in place of the
automated release-bump-version-uv.yml workflow — that workflow needs a
repo-token secret with push rights to protected main, and the AIND
service account (svc-aindscicomp) is not yet a collaborator. Deferred
until the secret/service-account setup is in place; see
docs/standards-compliance.md.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@1mattbecker
1mattbecker merged commit f3c48c5 into main Sep 11, 2026
6 checks passed
@1mattbecker
1mattbecker deleted the resolve-main-dev-divergence branch September 11, 2026 18:59
1mattbecker added a commit that referenced this pull request Sep 11, 2026
Squashing the dev->main promotion (as #28 did) discards the parent
link between the branches' histories. The next promotion's conflict
check then falls back to a stale common ancestor, so any file both
branches touched independently (CITATION.cff on every release) shows
a false add/add conflict -- hit cutting v0.2.0 (#31-#33).

The AIND standard only requires squash-merge for feature branches into
dev; it says nothing about the dev->main step, so this is a local
choice, not a standards violation. Repo now allows merge commits;
dev's branch protection requires linear history (squash-only, matching
the standard) so the exception can't land on dev by mistake.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant