pylops/: core library source code.pytests/: pytest test suite (discovered viapytests/*.py).docs/: Sphinx documentation sources and build output.examples/: runnable examples and small scripts.tutorials/: tutorial notebooks/scripts used in docs.testdata/: data used by tests/examples.build/,pylops.egg-info/: build artifacts (usually not edited).
make tests: run CPU tests with pytest.make tests_cpu_ongpu: run CPU tests on GPU systems (disables CuPy usage).make tests_gpu: run GPU tests (requires CuPy; sets TEST_CUPY_PYLOPS=1).make lint: runflake8ondocs/,examples/,pylops/,pytests/,tutorials/.make typeannot: runmypyonpylops/.make doc: clean docs build artifacts and build HTML docs.make docupdate: rebuild HTML docs without a clean.make servedoc: serve docs fromdocs/build/html/.make coverage: run tests with coverage and build HTML/XML reports.
build.yaml: main test matrix onubuntu-latestandmacos-latestfor Python3.10–3.13.- Installs dev requirements (CPU vs ARM variants), pyfftw, torch, then runs
pytest.
- Installs dev requirements (CPU vs ARM variants), pyfftw, torch, then runs
build-mkl.yaml: Ubuntu-only tests using Intel oneMKL via conda (Python3.11–3.13).buildcupy.yaml: self-hosted GPU job running CuPy tests (TEST_CUPY_PYLOPS=1).flake8.yaml: flake8 linting onpylops/with the same ignores/max line length assetup.cfg.codacy-coverage-reporter.yaml: runs tests with coverage and uploadscoverage.xmlto Codacy.deploy.yaml: builds and publishes the package to PyPI on GitHub release publish.
- Follow
flake8rules fromsetup.cfg:- Max line length is 88.
- Ignored rules:
E203,E501,W503,E402. __init__.pyallows unused imports (F401,F403,F405).
- Prefer clear, PEP 8–style Python, keeping imports at the top unless there is a strong reason.
- Type checking uses
mypywithnumpy.typingplugin enabled.mypyruns onpylops/only viamake typeannot.- Several third-party modules are configured with
ignore_missing_imports = Trueinsetup.cfg.
- When changing APIs or adding new modules, add or update tests under
pytests/.
- Use Makefile targets rather than invoking tools directly where possible.
- Keep changes focused; avoid editing build artifacts or generated docs.
Use docs/source/contributing.rst as the source of truth. When taking a GitHub issue through to PR, follow this sequence:
- Ensure dev environment is set up (per
DevInstallin the docs). - Branch from
devfor your work:git checkout -b <branch-name> dev
- Implement the change and add/update tests in
pytests/. - Run CPU tests:
make tests
- If a GPU is available, also run:
make tests_gpu
- Run linting:
make lint
- Update docs if functionality changes:
make docupdate
- Commit and push:
git add .git commit -m "<message>"(Conventional Commits recommended, not required)git push -u origin <branch-name>
- Open a PR and ensure it meets the PR guidelines:
- Include tests for new core routines.
- Update docs when adding functionality.
- Ensure all tests pass.