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

Add --no-provision flag #1922

Merged
merged 1 commit into from
Mar 3, 2021
Merged

Add --no-provision flag #1922

merged 1 commit into from
Mar 3, 2021

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Feb 17, 2021

Add --no-provision flag

tox can now be invoked with a new --no-provision flag that prevents provision,
if requires or minversion are not satisfied, tox will fail;
if a path is specified as an argument to the flag
(e.g. as tox --no-provision missing.json) and provision is prevented,
provision metadata are written as JSON to that path.

Fixes #1921

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation,breaking, doc, misc
    • if PR has no issue: consider creating one first or change it to the PR number after creating the PR
    • "sign" fragment with "by :user:<your username>"
    • please use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files - by :user:superuser."
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

@hroncok hroncok force-pushed the no_provision branch 2 times, most recently from 9bd6b6b to b4b691d Compare February 17, 2021 18:20
src/tox/config/__init__.py Outdated Show resolved Hide resolved
src/tox/config/__init__.py Outdated Show resolved Hide resolved
src/tox/config/__init__.py Outdated Show resolved Hide resolved
src/tox/config/__init__.py Outdated Show resolved Hide resolved
@hroncok hroncok changed the title WIP: --no-provision Add --no-provision flag Mar 2, 2021
@hroncok hroncok force-pushed the no_provision branch 2 times, most recently from a2075da to ab293cf Compare March 2, 2021 16:47
@hroncok
Copy link
Contributor Author

hroncok commented Mar 2, 2021

Docs added. I've discovered there is no way to reference an command line option: sphinx-contrib/autoprogram#8

@gaborbernat
Copy link
Member

Docs added. I've discovered there is no way to reference an command line option: sphinx-contrib/autoprogram#8

Hence why I've created https://pypi.org/project/sphinx-argparse-cli/ already used by the rewrite branch. We could migrate this too.

@hroncok
Copy link
Contributor Author

hroncok commented Mar 2, 2021

We could migrate this too.

I would not block this on it.

Working on tests.

tox can now be invoked with a new --no-provision flag that prevents provision,
if requires or minversion are not satisfied, tox will fail;
if a path is specified as an argument to the flag
(e.g. as `tox --no-provision missing.json`) and provision is prevented,
provision metadata are written as JSON to that path.

Fixes tox-dev#1921
@hroncok hroncok marked this pull request as ready for review March 2, 2021 18:33
@hroncok hroncok requested a review from gaborbernat March 2, 2021 18:33
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

@gaborbernat gaborbernat merged commit 93a9667 into tox-dev:master Mar 3, 2021
@hroncok hroncok deleted the no_provision branch March 3, 2021 11:21
@hroncok
Copy link
Contributor Author

hroncok commented Mar 3, 2021

Thanks! When writing the docs, I've assumed this will be released as 3.23.0, correct?

@gaborbernat
Copy link
Member

ssbarnea pushed a commit to ssbarnea/tox that referenced this pull request Apr 19, 2021
tox can now be invoked with a new --no-provision flag that prevents provision,
if requires or minversion are not satisfied, tox will fail;
if a path is specified as an argument to the flag
(e.g. as `tox --no-provision missing.json`) and provision is prevented,
provision metadata are written as JSON to that path.

Fixes tox-dev#1921
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.

Ability to disable provisioning
2 participants