The SVETlANNa project welcomes contributions from the community! Whether you're fixing a bug, adding a new feature, or improving documentation, your help is appreciated.
If you have any questions or need assistance, please don't hesitate to open an issue or reach out to the maintainers.
If you encounter any bugs, issues, or concerns, please report them by opening an issue. When reporting an issue, please provide as much detail as possible, including steps to reproduce the issue, expected behavior, and any relevant error messages or logs.
You can suggest new features in two ways:
- By opening an issue and describing the feature you'd like to see. Describe the feature you are requesting and its use case. If you have a simple code example that illustrates the feature, please include it in the issue description. It is very helpful to include a code implementation if you want to add more physics-related functionality.
- By opening a pull request.
You should first fork the repository, make your changes in a separate branch, and then open a pull request to merge your changes into the main branch.
When opening a pull request, please provide a clear description of the changes you made and the motivation behind them.
The rules for contributing code are as follows:
- DO NOT commit any binary files, Jupyter notebooks, images, or any files that are not directly related to the codebase.
- It is recommended to use the development environment tools (Black, Flake8, Mypy) to ensure code quality and consistency (see the development environment section below).
- It is recommended that all code be tested with pytest and have good test coverage.
In both cases, the maintainers can reject or ask for changes to your contribution if it does not align with the project's goals.
This repository uses several tools to ensure code quality and consistency, including Black for code formatting, pytest for testing, and Poetry for dependency management.
Poetry is used to manage dependencies and virtual environments. To set up the development environment, follow these steps:
- Install Poetry globally on your machine.
- Inside the repository, run:
poetry install --all-extrasThis installs the dependencies and sets up the virtual environment.
We use Black for code formatting. To run Black on specific files or directories, use:
poetry run black <file_or_directory>We use Flake8 as a code linter. To run Flake8 on specific files or directories, use:
poetry run flake8 <file_or_directory>To run Mypy for type checking, use:
poetry run mypy <file_or_directory>Pytest is used for testing:
poetry run pytestTo generate coverage reports, use:
poetry run pytest --cov=svetlanna --cov-report=htmlExtensions for Black, Flake8, and Mypy are available.
Please install them so you can see inline hints and diagnostics during development (see .vscode/extensions.json file).
- The Black extension allows you to run formatting automatically on save.
- The Flake8 and Mypy extensions report errors during development, so you can fix them on the spot.
We use numpy style for docstrings.
Before committing, run:
poetry run black svetlanna
poetry run mypy svetlanna
poetry run flake8 svetlanna
poetry run pytest