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

drop black and flake8 dependencies #4181

Merged

Conversation

bjlittle
Copy link
Member

@bjlittle bjlittle commented Jun 4, 2021

🚀 Pull Request

Description

Akin to PR #4174 and isort, this PR drops the black and flake package dependencies from both our conda YAML and PyPI setup.cfg requirements.

We're now advocating the use of pre-commit for developers, which will take care of your linting needs. Additionally, developers (and users alike) can easily install these packages explicitly, if they wish.

The reason for dropping these packages is to reduce the iris dependency bloat, but also due to the regular cadence in version bumping that is required - hardly a major maintenance overhead, but this has cause recent difficulties, particularly with black.


Consult Iris pull request check list

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Thanks @bjlittle.

I like pre-commit being the 'single entry point'. But with that being the case there are a few extra changes I'd like to see:

  • Could we change the Nox linting session to do a manual run of pre-commit?
  • If we can't do that, what about my previous suggestion to have Nox read the black version from pre-commit?
  • Either with the current permutation, or with any of my suggested changes, please could you include some minor documentation changes? contributing_code_formatting.rst and contributing_running_tests.rst.

@bjlittle
Copy link
Member Author

bjlittle commented Jun 7, 2021

@trexfeathers Cool. I'll get nox to scrape and align with the pre-commit versions of black and flake8 (I guess this should also apply to isort too, if it lands)

And I'll add something to the docs 👍

@bjlittle bjlittle force-pushed the drop-black-and-flake8-conda-requriments branch 2 times, most recently from 6f57929 to e386d89 Compare June 21, 2021 22:32
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Thanks @bjlittle, I'm glad you think pre-commit is a good pattern. I have some config suggestions.

.pre-commit-config.yaml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
@bjlittle bjlittle force-pushed the drop-black-and-flake8-conda-requriments branch from d21915f to dadbc0f Compare June 22, 2021 12:29
@trexfeathers trexfeathers merged commit af13e14 into SciTools:main Jun 22, 2021
@bjlittle
Copy link
Member Author

@trexfeathers Great, thanks! 🍻

@bjlittle bjlittle mentioned this pull request Jun 23, 2021
@bjlittle bjlittle deleted the drop-black-and-flake8-conda-requriments branch June 23, 2021 21:25
tkknight added a commit to tkknight/iris that referenced this pull request Jul 21, 2021
* main: (43 commits)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4244)
  Updated environment lockfiles (SciTools#4242)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4239)
  Documented the --force option on conda env create (SciTools#4240)
  Updated environment lockfiles (SciTools#4237)
  pre-commit isort and black --check only for cirrus-ci (SciTools#4235)
  Only run docs-building sessions with Python 3.8. (SciTools#4210)
  consolidate cirrus-ci documentation tasks (SciTools#4219)
  Updated environment lockfiles (SciTools#4223)
  Replace pyke nopyke (SciTools#4198)
  drop cirrus-ci minimal tests (SciTools#4218)
  remove change management tech paper (SciTools#4217)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4213)
  Updated environment lockfiles (SciTools#4212)
  Widen cube printout for long ancil or cell-measure names. (SciTools#4124)
  convert docs print statements (SciTools#4209)
  optimise pre-commit (SciTools#4208)
  drop black and flake8 dependencies (SciTools#4181)
  pre-commit blacked docs (SciTools#4205)
  pre-commit update (SciTools#4204)
  ...
@rcomer rcomer mentioned this pull request Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants