Skip to content

DOC: Adopt from dandi-cli - rudimentary CLAUDE.md and pytest_plugin.py (summary of depends, ai_generated marker, better diff for DandiBaseModel)#402

Merged
yarikoptic merged 3 commits into
masterfrom
enh-CLAUDE.md
Apr 30, 2026
Merged

DOC: Adopt from dandi-cli - rudimentary CLAUDE.md and pytest_plugin.py (summary of depends, ai_generated marker, better diff for DandiBaseModel)#402
yarikoptic merged 3 commits into
masterfrom
enh-CLAUDE.md

Conversation

@yarikoptic
Copy link
Copy Markdown
Member

adopted from dandi-cli

@satra rebase your #401 and ask your claude to reflect upon details provided here for tests annotation

@yarikoptic yarikoptic requested a review from satra April 28, 2026 19:12
@yarikoptic yarikoptic added the documentation Changes only affect the documentation label Apr 28, 2026
@yarikoptic yarikoptic requested a review from candleindark April 28, 2026 19:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.31%. Comparing base (40df0ac) to head (f95ad2b).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
dandischema/pytest_plugin.py 0.00% 29 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (40df0ac) and HEAD (f95ad2b). Click for more details.

HEAD has 495 uploads less than BASE
Flag BASE (40df0ac) HEAD (f95ad2b)
unittests 561 66
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #402       +/-   ##
===========================================
- Coverage   97.92%   48.31%   -49.61%     
===========================================
  Files          18       19        +1     
  Lines        2405     2434       +29     
===========================================
- Hits         2355     1176     -1179     
- Misses         50     1258     +1208     
Flag Coverage Δ
unittests 48.31% <0.00%> (-49.61%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread CLAUDE.md
Comment thread CLAUDE.md
yarikoptic and others added 2 commits April 28, 2026 16:15
Co-authored-by: Isaac To <candleindark@users.noreply.github.com>
…enerated marker)

Adapted from dandi-cli's `dandi/pytest_plugin.py`:
- `pytest_report_header` lists versions of declared dependencies.
- `pytest_assertrepr_compare` produces a useful dict-level diff for
  `DandiBaseModel == DandiBaseModel` failures instead of opaque pydantic reprs.
- `pytest_configure` registers custom markers — currently only `ai_generated`
  (the only custom marker actually used here).

Registered via `[project.entry-points.pytest11]` in pyproject.toml so it
auto-loads after `pip install`.

Tox:
- Drop the hardcoded `dandischema` argument from the `pytest` invocation in
  `tox.ini` so that `tox -e py3 -- dandischema/tests/test_foo.py::test_bar`
  passes the path straight through to pytest. With no posargs, pytest still
  discovers tests from the current directory.
- Set `--import-mode=importlib` in `[pytest]` addopts to avoid
  `ImportPathMismatchError`: with the plugin entry point, pytest now eagerly
  imports `dandischema` from the installed copy in the tox venv, which collides
  with collecting `dandischema/tests/conftest.py` from the source tree under
  the default "prepend" import mode.

Updated CLAUDE.md to describe the new plugin under "Test Markers / Pytest
Plugin", replacing the previous note that this repo had no plugin.

Co-Authored-By: Claude Code 2.1.121 / Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yarikoptic yarikoptic changed the title DOC: Add rudimentary CLAUDE.md inspired by absent ai annotations in proposed PRs DOC: Adopt from dandi-cli - rudimentary CLAUDE.md and pytest_plugin.py (summary of depends, ai_generated marker, better diff for DandiBaseModel) Apr 28, 2026
@yarikoptic yarikoptic added the tests Add or improve existing tests label Apr 28, 2026
@yarikoptic
Copy link
Copy Markdown
Member Author

odd, the test-dandi-cli (ubuntu-latest, 3.11, release, client, default) seems got stuck on

tests/test_delete.py::test_delete_zarr_path {'size': 21}
....
{'status': 'uploading', 'progress': 100.0}
{'status': 'server calculating checksum'}

canceled, reran

@yarikoptic yarikoptic requested a review from candleindark April 29, 2026 00:20
@yarikoptic
Copy link
Copy Markdown
Member Author

stuck again, on {'status': 'server calculating checksum'} can't be coincidence, yet to check on master since should not relate AFAIK but I could be wrong. @copilot wdyt?

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

stuck again, on {'status': 'server calculating checksum'} can't be coincidence, yet to check on master since should not relate AFAIK but I could be wrong. @copilot wdyt?

This is unrelated to the PR changes. Looking at the logs, the hang occurs in the DANDI server's Zarr checksum calculation ({'status': 'server calculating checksum'}) — a purely server-side operation that waited ~3.5 hours before the job was cancelled. The same ubuntu-latest, 3.11, release, client, default job is also cancelled on master (run 25038438960 from 2026-04-28), confirming this is a pre-existing server-side issue. This PR only adds CLAUDE.md and pytest_plugin.py, neither of which touches upload logic or checksum handling.

@yarikoptic
Copy link
Copy Markdown
Member Author

doh -- it is all that rabbitmq:management "goodness". Released since then dandi-cli should not have that issue -- restarting again!

@yarikoptic
Copy link
Copy Markdown
Member Author

if no further comments -- will merge tomorrow.

@yarikoptic yarikoptic merged commit 9c694b5 into master Apr 30, 2026
99 of 103 checks passed
@yarikoptic yarikoptic deleted the enh-CLAUDE.md branch April 30, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Changes only affect the documentation tests Add or improve existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants