Use setuptools-scm for automatic versioning based on GitHub tags
Add setup.cfg configuration file and move package metadata from setup.py
Add pyproject.toml configuration file
Add .editorconfig file
README for the reviewer
Since this is a PR with a quite large change-set, you can probably best review this PR in chunks (below are commit ranges):
First 6 commits (3d15875..16dbc6c): most of the fundamental changes brought by this PR are located here
Last 4 commits (558ca27..7cdee73): this is where the rest of the fundamental changes are
Rest of the commits (4045260..b191c18): changes to address the issues due to the new building and testing by the GitHub CI (ie. quasi no changes in functionality for ProjectQ just taking care of warnings from flake8, etc.)
GitHub Actions
Add support for GitHub actions (in replacement of Travis CI) for testing, linting and building binaries. ProjectQ now has 3 distinct pipelines:
CI : dedicated to testing the building and installation of ProjectQ on multiple systems and compilers
PyPi: test the building of standardised Python binary wheels (as well as automatic upload to PyPi when a new GitHub release is published)
Format: run a series of pre-commit hooks, static analysis and linting tools such as pylint, flake8, clang-tidy, etc.
Caveat
The move to GitHub Action and some of the others mentioned above means that this will most likely break the installation of ProjectQ with Python 3.5 or lower (and definitely break compatibility with Python 2.x). Compatibility with Python 3.5.x is still probably possible by lightly editing some configuration file (e.g. probably remove any mention of setuptools-scm in setup.py and pyproject.toml for regaining Python 3.5 compatibility).
Support pre-commit Git hooks
Added .pre-commit-config.yaml YAML configuration file for pre-commit to allow an easier time running a set of pre-commit hooks such as:
Summary of changes
setuptools-scm
for automatic versioning based on GitHub tagssetup.cfg
configuration file and move package metadata fromsetup.py
pyproject.toml
configuration file.editorconfig
fileREADME for the reviewer
Since this is a PR with a quite large change-set, you can probably best review this PR in chunks (below are commit ranges):
3d15875..16dbc6c
): most of the fundamental changes brought by this PR are located here558ca27..7cdee73
): this is where the rest of the fundamental changes are4045260..b191c18
): changes to address the issues due to the new building and testing by the GitHub CI (ie. quasi no changes in functionality for ProjectQ just taking care of warnings fromflake8
, etc.)GitHub Actions
Add support for GitHub actions (in replacement of Travis CI) for testing, linting and building binaries. ProjectQ now has 3 distinct pipelines:
pylint
,flake8
,clang-tidy
, etc.Caveat
The move to GitHub Action and some of the others mentioned above means that this will most likely break the installation of ProjectQ with Python 3.5 or lower (and definitely break compatibility with Python 2.x). Compatibility with Python 3.5.x is still probably possible by lightly editing some configuration file (e.g. probably remove any mention of
setuptools-scm
insetup.py
andpyproject.toml
for regaining Python 3.5 compatibility).Support pre-commit Git hooks
Added
.pre-commit-config.yaml
YAML configuration file for pre-commit to allow an easier time running a set of pre-commit hooks such as: