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

feat: Stage 3-4 of nox implementation - adding auto-format targets #478

Merged
merged 8 commits into from Aug 31, 2020

Conversation

mf2199
Copy link
Contributor

@mf2199 mf2199 commented Aug 31, 2020

As suggested in #466 , this represents item 4 of the recommended list aimed to implement nox testing automation in multiple steps.

Change list:

  1. Sessions lint and blacken added to the Nox configuration;
  2. Relevant folders added as targets for blacken routines;
  3. Nox executed using the updated configuration, resulting in multiple auto-format changes.

As multiple Python versions already present in unit session, no separate PR for item 3 is necessary at this point.

The lint session has conflicting definitions among flake8 and blacken (the latter follows PEP8). This is a known error, discussed, for example, here and here. The fix involves adding exceptions to the flake8 configuration file.

Session log:

nox > Running session lint
nox > Creating virtual environment (virtualenv) using python.exe in .nox\lint
nox > pip install flake8 black==19.10b0
nox > black --check django_spanner docs spanner_dbapi tests noxfile.py setup.py
All done! ✨ � ✨
35 files would be left unchanged.
nox > flake8 django_spanner spanner_dbapi tests
nox > Session lint was successful.
nox > Running session blacken
nox > Creating virtual environment (virtualenv) using python.exe in .nox\blacken
nox > pip install black==19.10b0
nox > black django_spanner docs spanner_dbapi tests noxfile.py setup.py
All done! ✨ � ✨
35 files left unchanged.
nox > Session blacken was successful.
nox > Running session lint_setup_py
nox > Creating virtual environment (virtualenv) using python.exe in .nox\lint_setup_py
nox > pip install docutils pygments
nox > python setup.py check --restructuredtext --strict
running check
nox > Session lint_setup_py was successful.
nox > Ran multiple sessions:
nox > * lint: success
nox > * blacken: success
nox > * lint_setup_py: success

Towards #474.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 31, 2020
@mf2199 mf2199 requested a review from c24t August 31, 2020 17:16
@mf2199 mf2199 marked this pull request as ready for review August 31, 2020 17:16
@mf2199 mf2199 added api: spanner Issues related to the googleapis/python-spanner-django API. type: process A process-related concern. May include testing, release, or the like. labels Aug 31, 2020
@mf2199 mf2199 requested a review from IlyaFaer August 31, 2020 17:18
Copy link
Contributor

@c24t c24t left a comment

Choose a reason for hiding this comment

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

LGTM. The only issue I see is black/isort incompatibility, but that's only an issue for people (like me) running isort locally since we don't call it from nox. Let me try to reconcile this with #469.

.flake8 Outdated Show resolved Hide resolved
@c24t c24t merged commit 7a1f6a6 into googleapis:master Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. cla: yes This human has signed the Contributor License Agreement. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants