Contributions are welcome. Contact the maintainer for more information.
Source organization is already documented in the README. As of December 2024, the codebase is over 21k lines of Python code.
The core of the project is in the benchkit/
directory.
It defines everything required to run campaigns and benchmarks, including
utility functions and classes.
Supported benchmarks are placed in the examples/
directory.
When defining a class, follow this order for methods:
__new__
(static) method__init__
method__post_init__
method- Properties (
@property
) - Static methods (
@staticmethod
) - Class methods (
@classmethod
) - Regular methods
- Protected or private methods (prefix
_
)
- Shebang: Executable files must start with
#!/usr/bin/env python3
. - Type Hinting: Ensure type annotations are correct and reasonably complete.
- Imports: Sort using
isort --profile black .
. - Formatting: Apply
black -l 100 .
. - Linting: Run
pylint
andflake8
to catch errors and maintain style consistency.
A helper script is provided to apply these, you can invoke it as follows:
BENCHKIT_NO_PYLINT=yes ./scripts/all_checks.sh
- New Files: Copyright should be attributed to the contributor's current organization or individual name, as applicable.
- Minor Modifications: Leave the existing copyright unchanged.
- Significant Modifications: Add a new copyright line to the modified file.
- LICENSE File Updates: If significant modifications span multiple files, update the LICENSE file to reflect the added copyright.
- If contributing as an individual, use:
Copyright (C) [year] [Your Name].
- If contributing on behalf of an organization, follow its attribution guidelines.
For questions, consult the maintainer.
All contributions must be reviewed and approved by the maintainer.