-
Notifications
You must be signed in to change notification settings - Fork 284
Modernize ProjectQ (isort, PEP 257 docstrings, drop Python 2 code, more flake8 plugins) and fix phase estimation unit tests #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize ProjectQ (isort, PEP 257 docstrings, drop Python 2 code, more flake8 plugins) and fix phase estimation unit tests #408
Conversation
Pull Request Test Coverage Report for Build 1026758702
💛 - Coveralls |
- flake8-breakpoint - flake8-comprehensions - flake8-eradicate - flake8-mutable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. I'd like you to address the comments in conf.py.
Everything else are just optional minor improvements for the docstings.
I find it a bit funny that a file "does" something, that's why I'd remove all the "Contains" and "Defines" and put in the docstring only a description of its contents (without a verb). For the "Registers", importing the file seems to actually do something, so I'd leave that.
But feel free to ignore and just resolve all those comments.
Never thought about this in those terms, but I like your way of thinking. I'll keep that in mind for the future ;-) |
Summary of changes
matplotlibisortto the list of pre-commit hooks and run it on the whole codebaseflake8-breakpoint,flake8-comprehensions,flake8-eradicate,flake8-mutableto pre-commit configuration file and run on the whole codebase__ne__)docs/Reviewing
There are a lot of changes in the code that are only the result of running
isort, running a few moreflake8plugins, updating the docstrings to make them PEP257 compliant as well as replacing some Python 2 code like:BasicEngine.__init__(self)to the new style (super().__init__())__ne__methods since Python 3 guarantees that__ne__calls__eq__if that one is defined.Here is a list of files that have some changes in them that are not immediately related to aforementioned issue to make reviewing this PR easier:
.pre-commit-config.yamldocs/conf.pydocs/package_description.pyprojectq/backends/_exceptions.pyprojectq/backends/_circuits/_plot.pyprojectq/cengines/__init__.pyprojectq/meta/_exceptions.pyprojectq/setups/decompositions/phaseestimation.py