Contribute to This Plugin¶
We welcome contributions to improve the AIF parser plugin! This guide explains how to contribute to the project.
How to Contribute¶
Reporting Issues¶
If you find a bug or have a feature request:
- Check if the issue already exists in our GitHub issues tracker
- Create a new issue with a clear description and reproduction steps
-
Include relevant information such as:
- AIF file sample (if applicable)
- Error messages
- Python/NOMAD versions
- Expected vs actual behavior
Submitting Pull Requests¶
To submit code changes:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request with a clear description
Development Setup¶
To set up a development environment:
# Clone the repository
git clone https://github.com/Bondoki/aifparser.git
cd aifparser
# Create virtual environment
python3.12 -m venv .pyenv
source .pyenv/bin/activate
# Install development dependencies
uv pip install -e '.[dev]'
# Install pre-commit hooks
pip install pre-commit
pre-commit install
Code Style and Standards¶
Python Coding Standards¶
- Follow PEP 8 style guidelines
- Use docstrings for all public functions and classes
- Write type hints where appropriate
- Keep functions focused and well-tested
Linting and Formatting¶
The project uses Ruff for linting and formatting:
# Check for linting issues
ruff check .
# Format code
ruff format .
# Both checks and format
ruff check . && ruff format .
Testing¶
All contributions must include appropriate tests:
# Run all tests
python -m pytest -sv tests
# Run tests with coverage
uv pip install pytest-cov
python -m pytest --cov=src tests
Documentation¶
Documentation improvements are always welcome:
- Update the MkDocs documentation in the
docs/directory - Ensure consistency with existing documentation style
- Include examples where appropriate
- Run
mkdocs serveto preview documentation changes
Code of Conduct¶
This project follows the Contributor Covenant Code of Conduct.
Release Process¶
Releases are managed through GitHub and PyPI:
- Update version in
pyproject.toml - Create a git tag
- Push to GitHub
- Build and publish to PyPI
Contact¶
For questions about contributing, please contact:
- Ron Dockhorn ron.dockhorn@tu-dresden.de