Clean up code and modernize - #58
Merged
Merged
Conversation
…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>
jdrotleff
approved these changes
Jul 13, 2026
jdrotleff
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
Thanks for all the updates, cleanups and catching the toogle typo. I never noticed 😄
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.