Skip to content

refactor: pyproject.toml migration + ruff lint clean-up - #13

Open
bknight1 wants to merge 2 commits into
mainfrom
refactor/deps-and-lint-clean
Open

refactor: pyproject.toml migration + ruff lint clean-up#13
bknight1 wants to merge 2 commits into
mainfrom
refactor/deps-and-lint-clean

Conversation

@bknight1

@bknight1 bknight1 commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces setup.py with PEP 621 pyproject.toml as the single source of truth for all Python dependencies, adds environment.yml for conda/mamba users, migrates CI to the env file, and cleans up all 118 ruff lint issues to zero.

Changes

Dependency management overhaul (6 files)

  • pyproject.toml — PEP 621, setuptools backend, all deps + [jupyter] + [dev] (ruff) extras
  • environment.yml — conda-forge + nodefaults, python=3.11, julia (linux-64 only), pip: -e ".[jupyter,dev]"
  • setup.py — deleted (pyproject.toml is complete)
  • .github/workflows/tests.yml — migrated to setup-miniconda@v3 with env file, single 3.11 job
  • README.md / AGENTS.md — added conda/mamba track + macOS caveat

Ruff lint clean-up (25 files)

  • ruff check . → 0 errors (was 118)
  • Auto-fix: import sorting (I001), unused imports (F401), deprecated typing (UP006/UP035), unnecessary list() in sorted() (C414)
  • Manual: exception narrowing (BLE001/E722/S110), ValueErrorTypeError for type validation (TRY004), mutable default args (B006), uncaptured loop variable (B023), unused unpacked/dead variables (RUF059/F841), ClassVar annotations (RUF012), nested with collapse (SIM117), subprocess check (PLW1510)
  • Added __all__ to __init__.py for explicit public API re-exports
  • Added [tool.ruff] config with extend-exclude = ["Tutorials"]

Verification

  • ruff check . → 0 errors
  • python3 -m unittest discover tests → 88 tests OK, 1 skipped (live Julia test)

- Replace setup.py with PEP 621 pyproject.toml (setuptools backend)
- Add environment.yml for conda/mamba (conda-forge + nodefaults, python=3.11)
- Migrate CI to use environment.yml via setup-miniconda@v3 (single 3.11 job)
- All Python deps (core + jupyter/dev extras) now in pyproject.toml as SSOT
- Update README.md and AGENTS.md with conda + pip install tracks
- Add [tool.ruff] config to pyproject.toml (extend-exclude Tutorials)
- Auto-fix: import sorting (I001), unused imports (F401), deprecated
  typing imports (UP006/UP035), unnecessary list() in sorted() (C414)
- Manual: narrow exception catches (BLE001/E722/S110), ValueError→TypeError
  for type validation (TRY004), mutable default args (B006), uncaptured
  loop variable (B023), unused unpacked variables (RUF059/F841), ClassVar
  annotations (RUF012), nested with collapse (SIM117), subprocess check
  (PLW1510)
- Add __all__ to __init__.py for explicit public API re-exports
- Fix test_grid_extraction.py expected exception (ValueError→TypeError)
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