Skip to content

Clean up code and modernize - #58

Merged
SamTov merged 5 commits into
mainfrom
feat/cleanup-for-paper
Jul 14, 2026
Merged

Clean up code and modernize#58
SamTov merged 5 commits into
mainfrom
feat/cleanup-for-paper

Conversation

@SamTov

@SamTov SamTov commented Apr 8, 2026

Copy link
Copy Markdown
Member

No description provided.

SamTov and others added 5 commits April 8, 2026 14:49
…on-cleanup-b355a0

# Conflicts:
#	CI/unit_tests/particle/test_particle.py
#	CI/unit_tests/visualizer/test_visualizer.py
#	znvis/particle/particle.py
#	znvis/visualizer/visualizer.py
Update the JOSS paper and bibliography, and perform a cleanup pass over
the codebase for publication readiness.

Paper:
- Reflect merged features in paper.md (headless/parallel offscreen
  rendering, programmable camera paths, memory-efficient mesh caching).
- Add and cite the published SwarmRL reference (EPJ E 2025).

Code cleanups:
- Fix broken examples/export_scene.py (removed invalid `colour=` kwarg
  passed to Sphere; colour is a Material field) and correct its docstring.
- Fix Mitsuba shared-mutable default: deep-copy default_scene_dict so
  separate instances no longer mutate the same module-level dict.
- Rename misspelled _toogle_play_direction -> _toggle_play_direction.
- Expose znvis.__version__ via importlib.metadata.
- Fix headless_visualizer copy-paste docstrings, an "occured" typo, and
  a leftover commented-out debug print; label the current-frame print.
- Remove stray committed examples/example_data/__temp_ipython__.png.

JOSS readiness:
- Add CONTRIBUTING.md with contribution, testing, and support guidelines.
- Add README sections for documentation, contributing, license, citation.
- Add a draft-pdf GitHub Action to compile the JOSS paper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add Jannik Drotleff, Christoph Lohrmann, and David Zimmer as authors.
Mark Samuel Tovey and Jannik Drotleff as equal first authors
(equal-contrib), with Samuel Tovey as corresponding author.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Consolidate the toolchain onto a single tool. Ruff replaces black
(formatting), isort (import sorting), and flake8 (linting), run via one
command.

- pyproject.toml: drop [tool.black]/[tool.isort], add [tool.ruff] with
  rule set E, W, F, I, UP, B (line length 88, target py311); swap the dev
  dependencies to ruff.
- Remove now-redundant .flake8 and .isort.cfg config files.
- .pre-commit-config.yaml: replace the three hooks with ruff + ruff-format.
- .github/workflows/lint.yaml: replace the black/isort/flake8 jobs with a
  single ruff job (ruff check + ruff format --check).
- Apply the resulting fixes: modernize type annotations to PEP 585/604
  (list[...], X | None), add `raise ... from e` in except blocks, add
  strict=True to zip() calls, and drop unused loop variables.
- Update CONTRIBUTING.md and the README badge to reference ruff.

All 151 tests pass; ruff check and ruff format are clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SamTov
SamTov requested a review from jdrotleff July 13, 2026 11:38

@jdrotleff jdrotleff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for all the updates, cleanups and catching the toogle typo. I never noticed 😄

@SamTov
SamTov merged commit b232fa3 into main Jul 14, 2026
7 checks passed
@SamTov
SamTov deleted the feat/cleanup-for-paper branch July 14, 2026 06:20
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.

2 participants