rinikerlab / PyGromosTools

This package is a python library with tools for the Molecular Simulation - Software Gromos. It allows you to easily set up, manage and analyze simulations in python.
https://rinikerlab.github.io/PyGromosTools/
MIT License
16 stars 14 forks source link

Pre commit #221

Closed MTLehner closed 2 years ago

MTLehner commented 2 years ago

Description

This PR adds pre-commit to the repo. This will help to keep the code clean and up to standarts

Todos

TODOs moved to next PR. See Issue #227

Status

codecov[bot] commented 2 years ago

Codecov Report

Merging #221 (e07c23e) into release3 (bb9b66e) will decrease coverage by 0.76%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release3     #221      +/-   ##
============================================
- Coverage     53.47%   52.70%   -0.77%     
============================================
  Files            93       93              
  Lines         12647    12884     +237     
============================================
+ Hits           6763     6791      +28     
- Misses         5884     6093     +209     
Flag Coverage Δ
unittests 52.70% <ø> (-0.77%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pygromos/__init__.py 100.00% <ø> (ø)
pygromos/analysis/coordinate_analysis.py 29.41% <ø> (ø)
pygromos/analysis/energy_analysis.py 50.00% <ø> (ø)
pygromos/analysis/error_estimate.py 100.00% <ø> (ø)
pygromos/analysis/free_energy_calculation.py 66.97% <ø> (-0.16%) :arrow_down:
pygromos/data/__init__.py 100.00% <ø> (ø)
pygromos/data/ene_ana_libs/__init__.py 0.00% <ø> (ø)
pygromos/data/ff/Gromos2016H66/__init__.py 100.00% <ø> (ø)
pygromos/data/ff/Gromos54A7/__init__.py 100.00% <ø> (ø)
pygromos/data/ff/MixHexGromos54A7/__init__.py 0.00% <ø> (ø)
... and 126 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9f165d6...e07c23e. Read the comment docs.

pultar commented 2 years ago

What about this hook:

  - repo: https://github.com/myint/autoflake
    rev: v1.4
    hooks:
      - id: autoflake
        name: Removes unused variables
        args:
          - --in-place
          - --remove-all-unused-imports
          - --expand-star-imports
          - --ignore-init-module-imports
MTLehner commented 2 years ago

Does not work right now. All import related formatting are destroying the code due to files like _all_blocks

MTLehner commented 2 years ago

Does not work right now. All import related formatting are destroying the code due to files like _all_blocks

We first need to fix the code. But this will be a second PR as mentioned in issue #227