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

Tools update #1358

Merged
merged 46 commits into from
Feb 3, 2022
Merged

Tools update #1358

merged 46 commits into from
Feb 3, 2022

Conversation

eddiebergman
Copy link
Contributor

@eddiebergman eddiebergman commented Dec 26, 2021

Updates several aspects of the tools surrounding development on autosklearn as part of the "black and isort" major change. Most of the configuration for things can be found in pyproject.toml and are documented where non-obvious.

Reminder: Add attribution for @isaac-chung

These checks will fail but running make format will fix all files so that that it will pass these pre-commit checks. They have been left unformatted to keep the PR clean and reviewable.

TODO: Update Contribution Guide in light of these changes

  • Formatting is now done with black and isort.
    • Line length was changed to 88 in accordance with usual black'nd libraries.
    • Black and isort now check for code formatting, flake8 does not.
    • Relevant updates were done to pre-commit
  • Added the tool pydocstyle, however this is disabled for now as almost all modules fail this check.
    • Checks that most things we would like documented are indeed documented.
    • Disabled some things deemed not relevant (see pyproject.toml)
    • Checks for numpy style (the one we use)
  • All mypy and pytest configurations were moved to the new pyproject.toml along with the black, pydocstyle and isort configurations.
  • Removed testcommand.sh, seems like a stray file.
  • Updated coverage.yml which controls our automatic code coverage checks through github actions.
    • Fixes how strict PR's can allow drop in overall code test percentage, from 50% -> 0.2%.
    • Updates overall strictness to 87% to match current test coverage
    • PR changed code now needs to be 90% tested
    • Branch coverage is now uploaded to code-cov, this will likely drop our coverage but indicate branches that were not taken.
  • pre-commit now includes the aforementioned formatters and checkers. The packages were also updated to their latest versions.
  • The root Makefile was remade to perform many of these commands and others. This should make it easier to perform the relevant commands as well as make it easier for new contributors to use our workflows. Notably:
    help:
    @echo "Makefile autosklearn"
    @echo "* install-dev      to install dev requirements and init pre-commit"
    @echo "* check            to check the source code for issues"
    @echo "* format           to format the code with black and isort"
    @echo "* pre-commit       to clean the dist and doc build files"
    @echo "* clean            to clean the dist and doc build files"
    @echo "* build            to build a dist"
    @echo "* doc              to generate and view the html files"
    @echo "* linkcheck        to check the documentation links"
    @echo "* examples         to run and generate the examples"
    @echo "* publish          to help publish the current branch to pypi"
    • Note the publish only publishes to the test servers but prints instructions for the real one after advising that the test distribution be pip installed and tested first.

@codecov
Copy link

codecov bot commented Jan 3, 2022

Codecov Report

Merging #1358 (fed8668) into development (2bea930) will decrease coverage by 87.95%.
The diff coverage is n/a.

❗ Current head fed8668 differs from pull request most recent head b16d154. Consider uploading reports for the commit b16d154 to get more accurate results

@@               Coverage Diff               @@
##           development   #1358       +/-   ##
===============================================
- Coverage        87.95%       0   -87.96%     
===============================================
  Files              140       0      -140     
  Lines            10959       0    -10959     
===============================================
- Hits              9639       0     -9639     
+ Misses            1320       0     -1320     

Impacted file tree graph

@eddiebergman eddiebergman merged commit 7e7beb4 into development Feb 3, 2022
github-actions bot pushed a commit that referenced this pull request Feb 3, 2022
@mfeurer mfeurer deleted the tool_update branch February 4, 2022 07:51
eddiebergman added a commit that referenced this pull request Feb 8, 2022
* Update: Contributing guide with respect to #1358

* Fix: Add line on manually running pre-commit

* Add: Line for `isort` in contributing guide

* Fix: uncomment `make examples` in overview
eddiebergman added a commit that referenced this pull request Aug 18, 2022
* Draft tidy of workflows

* Fix: mypy should not ignore missing imports

* Added pydocstyle to checkers

* Added check and format make options

* Fix: mutiple entries in same line setup.py

* Change: black line length to 88

* Fix: make check to only perform checks

* Update: Flake8 ignores style (handled by black/isort)

* Add: pydocstyle, disabled in pre-commit

* Add: Makefile `make pre-commit`

* Fix: Ignores for mypy on untyped modules

* Limit scope of pre-commit steps

* Fix: flake8 no longer concerned about line length

* Add: Flake8 to `make check`

* Fix: reduce scope of black and isort

* Fix: Pydocstyle now uses numpy convention

* Fix: workaround for test imports of `automl_common`

* Fix: `mypy` ignores `automl_common` now

* Fix: Limit scope of `black` and `isort` formatting

* Fix: pre-commit performs no file changes now

* Add: `make pre-commit` to `make help`

* Fix: `make help` docstring for `make pre-commit`

* Fix: isort update sections autosklearn, types

* Fix: warnings by flake8 for line length

* Fix: Types section for isort

* Fix: reenable `flake8` formatting checking

* Update: flake8 to use black's line length of 88

* add: ignore D205 pydocstyle

* Fix: Import order for futures

* Fix: flake8 ignore E203

* Fix: Formatting and fixed long lines

* Del: black/isort checker, checked with pre-commit

* Fix: test dummy prediction error msg

* Add: `coverage` to `pyproject.yaml`

* Add: coverage ignore for `if TYPE_CHECKING`

* Fix: missing coma

* Fix: `toml` dependency for pydoctyle in pre-commit

* Fix: isort src path

* Add: `make test`

* Fix: Add name of module to check coverage of

* Maint: isort and black most recent dev

* Fix: import typo

* Change: format now performs individually on each directory
eddiebergman added a commit that referenced this pull request Aug 18, 2022
* Update: Contributing guide with respect to #1358

* Fix: Add line on manually running pre-commit

* Add: Line for `isort` in contributing guide

* Fix: uncomment `make examples` in overview
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.

Increase the tolerance for code coverage or improve tests
2 participants