ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
874 stars 271 forks source link

GitHub actions, pre-commit hooks, pyproject.toml and more #395

Closed Takishima closed 3 years ago

Takishima commented 3 years ago

Summary of changes

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):

GitHub Actions

Add support for GitHub actions (in replacement of Travis CI) for testing, linting and building binaries. ProjectQ now has 3 distinct pipelines:

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:

Takishima commented 3 years ago

Thanks for the review! I have made the required changes in the code and marked those conversations as "resolved". For your questions, I will let you mark them as resolved once you are satisfied with my answers ;-)

Takishima commented 3 years ago

Ok, I think I have not managed to fix everything that was broken (somehow the CI builds that worked previously for Clang and GCC started to fail?!) and address the bug in the classical simulator.

If you're happy with those changes, then I will merge this in the coming days. Thanks again for your contribution and doing this review.

Takishima commented 3 years ago

Thanks a lot for you review @andreashehn !