Skip to content
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

Pylinting more tests #3620

Closed
wants to merge 33 commits into from
Closed

Pylinting more tests #3620

wants to merge 33 commits into from

Conversation

apotapov
Copy link

Context:

Adding to the work done here to start linting more of the test files: #3600

Description of the Change:

  • Added a helper make command to lint an individual test file eg: make lint-test file=./tests/math/test_density_matrices.py

Benefits:

Moar cleaner code.

Possible Drawbacks:

Disabling certain pylint rules might hide issues and doesn't actually improve the code itself. The goal with this PR is not to be super intrusive.

Related GitHub Issues:

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@apotapov apotapov added the WIP 🚧 Work-in-progress label Jan 10, 2023
@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #3620 (99da099) into master (d05b001) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3620   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files         314      314           
  Lines       28084    28084           
=======================================
  Hits        28046    28046           
  Misses         38       38           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! can you fix up the whitespace in the Makefile? I know it's actual tabs.. but git makes it look especially funny

tests/math/test_density_matrices.py Outdated Show resolved Hide resolved
@apotapov apotapov removed the WIP 🚧 Work-in-progress label Jan 11, 2023
Makefile Outdated Show resolved Hide resolved
@apotapov apotapov requested a review from albi3ro January 11, 2023 05:53
requirements-dev.txt Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
albi3ro and others added 6 commits January 11, 2023 13:29
* skip test failing due to networkx version

* Update doc/releases/changelog-dev.md

* dont run qcut tests in interface runners

* fix qcut return types fixture, only selectively skip

* return types dont run qcut tests
Bumps [torch](https://github.com/pytorch/pytorch) from 1.11.0+cpu to 1.13.1.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/master/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/commits/v1.13.1)

---
updated-dependencies:
- dependency-name: torch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…3624)

* avoid using global random numbers generation in qchem

* use local random number generation

* Update doc/releases/changelog-dev.md

* fix is_independent tests

* remove spsa change, update random test

* undo spsa test change
* add pre-commit hook to run pylint on tests passing pylint

* skip test pre-commit if no tests are changed
too-many-arguments,
too-few-public-methods,
too-many-public-methods,
no-self-argument,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where was this raised? This is a funny one to hit

@rmoyard rmoyard removed their request for review January 20, 2023 15:02
@apotapov apotapov closed this Jun 20, 2023
@timmysilv timmysilv deleted the pylint-tests-more branch February 2, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants