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

Standardize documentation style with darglint #70

Merged
merged 2 commits into from
Feb 2, 2022

Conversation

cthoyt
Copy link
Contributor

@cthoyt cthoyt commented Feb 2, 2022

Summary

This PR adds the darglint plugin for flake8, whose job it is to check that documentation is provided in the correct format.

  • Unit tests provided for these changes
  • Documentation and docstrings added for these changes

Changes

  • Add darglint to the flake8 environment in tox.ini
  • Add darglint configuration in setup.cfg where I set sphinx as the preferred style for chemicalx. Previously, people looked towards the numpy and google styles since they helped reduce clutter, at the cost of taking a huge number of lines and leaving tons of dead whitespace. Now that type hints are first class in the python langauge, these formats seem a bit too verbose and the sphinx style is now best again
  • Update all code to pass new tests

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2022

Codecov Report

Merging #70 (82ada2b) into main (a6f2b73) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   93.74%   93.76%   +0.02%     
==========================================
  Files          29       29              
  Lines         815      818       +3     
==========================================
+ Hits          764      767       +3     
  Misses         51       51              
Impacted Files Coverage Δ
chemicalx/data/batchgenerator.py 98.30% <ø> (ø)
chemicalx/data/contextfeatureset.py 100.00% <ø> (ø)
chemicalx/data/drugfeatureset.py 100.00% <ø> (ø)
chemicalx/data/labeledtriples.py 100.00% <ø> (ø)
chemicalx/models/deepsynergy.py 100.00% <ø> (ø)
chemicalx/models/epgcnds.py 100.00% <ø> (ø)
chemicalx/models/matchmaker.py 95.00% <ø> (ø)
chemicalx/data/datasetloader.py 87.23% <100.00%> (+0.27%) ⬆️

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 a6f2b73...82ada2b. Read the comment docs.

@benedekrozemberczki benedekrozemberczki merged commit 3a3715d into AstraZeneca:main Feb 2, 2022
@cthoyt cthoyt deleted the add-darglint branch February 2, 2022 11:58
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.

3 participants