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

global: start using black formatter #329

Closed
mvidalgarcia opened this issue Jun 4, 2020 · 1 comment
Closed

global: start using black formatter #329

mvidalgarcia opened this issue Jun 4, 2020 · 1 comment
Labels
Projects

Comments

@mvidalgarcia
Copy link
Member

mvidalgarcia commented Jun 4, 2020

https://black.readthedocs.io

Black is opinionated so you don’t have to be.

Motivation

  • Have a deterministic way of formatting our code so we don't have to worry about it.
  • Have a mechanism to auto format the code (like Prettier) so we save coding time.
  • Use a formatter used by well-known projects and companies.

Things to take into account

  • Start with small components to cause less impact (e.g. r-w-e-serial).
  • Adapt tests to use something like black --check.
  • Verify compatibility with isort.
  • "It requires Python 3.6.0+ to run but you can reformat Python 2 code with it, too." Check that doesn't break python2-compatible code (e.g. reana-client). Explore --target-version flag:
     -t, --target-version [py27|py33|py34|py35|py36|py37|py38]
                          Python versions that should be supported by
                          Black's output. [default: per-file auto-detection]
  • Add reana-team as author of bulk formatting changes.
  • Consider adding a black badge to the README.
  • Remove --pep8 from pytest.ini files as it causes conflicts with black.

Useful information

@tiborsimko tiborsimko added this to Backlog in v0.7.0 Jun 4, 2020
mvidalgarcia added a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
Drop isort support and pytest-pep8

addresses reanahub/reana#329
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana-workflow-engine-serial that referenced this issue Jun 5, 2020
@mvidalgarcia mvidalgarcia moved this from Backlog to In work in v0.7.0 Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana-workflow-engine-cwl that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana-workflow-engine-yadage that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana-job-controller that referenced this issue Jun 5, 2020
diegodelemos pushed a commit to diegodelemos/reana-workflow-controller that referenced this issue Jun 5, 2020
diegodelemos pushed a commit to diegodelemos/reana-commons that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana that referenced this issue Jun 5, 2020
diegodelemos pushed a commit to diegodelemos/reana-db that referenced this issue Jun 5, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana-client that referenced this issue Jun 5, 2020
mvidalgarcia added a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
Drop isort support and pytest-pep8

addresses reanahub/reana#329
mvidalgarcia pushed a commit to mvidalgarcia/pytest-reana that referenced this issue Jun 5, 2020
diegodelemos pushed a commit to diegodelemos/reana-server that referenced this issue Jun 8, 2020
diegodelemos pushed a commit to diegodelemos/reana-server that referenced this issue Jun 8, 2020
diegodelemos pushed a commit to diegodelemos/reana-server that referenced this issue Jun 8, 2020
diegodelemos pushed a commit to diegodelemos/reana-server that referenced this issue Jun 8, 2020
mvidalgarcia pushed a commit to mvidalgarcia/reana-client that referenced this issue Jun 8, 2020
@mvidalgarcia
Copy link
Member Author

All components migrated to Black 🎉

v0.7.0 automation moved this from In work to Done Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v0.7.0
  
Done
Development

No branches or pull requests

1 participant