Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pyinvoke/invoke
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.4.1
Choose a base ref
...
head repository: pyinvoke/invoke
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.0.0
Choose a head ref

Commits on Dec 8, 2014

  1. Copy the full SHA
    add7085 View commit details

Commits on Jan 20, 2020

  1. Copy the full SHA
    2d033d5 View commit details
  2. Satisfy flake8 compatibility

    fndari authored and florisla committed Jan 20, 2020
    Copy the full SHA
    a831930 View commit details
  3. Make Travis happy for Python 2.7 and pypy

    fndari authored and florisla committed Jan 20, 2020
    Copy the full SHA
    eab7351 View commit details
  4. Copy the full SHA
    24c82b0 View commit details
  5. Skip Path unit test if Path can't be imported

    Rather than reverting to a regular str path, which is
    already covered by other tests.
    florisla committed Jan 20, 2020
    Copy the full SHA
    83cc422 View commit details
  6. Copy the full SHA
    6a1f58d View commit details
  7. Copy the full SHA
    c6b6b9b View commit details
  8. Copy the full SHA
    2e11f1b View commit details
  9. Copy the full SHA
    5dbfc90 View commit details
  10. Cosmetic: satisfy black

    florisla committed Jan 20, 2020
    Copy the full SHA
    a9e43b8 View commit details
  11. Copy the full SHA
    46d51a5 View commit details
  12. Copy the full SHA
    9041ac3 View commit details

Commits on Jan 30, 2020

  1. Copy the full SHA
    67583c2 View commit details
  2. Copy the full SHA
    17da163 View commit details
  3. Needed to mark this bug major because it was in the 1.2 line which ha…

    …sn't since gotten any bugfix releases
    
    Odd I haven't seen this particular wrinkle before w/ Releases tho
    bitprophet committed Jan 30, 2020
    Copy the full SHA
    7e0d0af View commit details
  4. Copy the full SHA
    008e930 View commit details

Commits on Nov 12, 2020

  1. Copy the full SHA
    41b4881 View commit details

Commits on Nov 13, 2020

  1. Expand sys.modules cleaner in conftest to clean EVERYTHING

    Useful for upcoming tests about inline imports
    bitprophet committed Nov 13, 2020
    Copy the full SHA
    6e27341 View commit details
  2. Copy the full SHA
    8fe29cc View commit details
  3. Copy the full SHA
    1f8cd14 View commit details
  4. Blacken, flake8

    bitprophet committed Nov 13, 2020
    Copy the full SHA
    d93e679 View commit details

Commits on Nov 24, 2020

  1. Copy the full SHA
    7cbfd72 View commit details
  2. Copy the full SHA
    1170617 View commit details

Commits on Nov 25, 2020

  1. Enhance MockContext a whole bunch

    - repeat kwarg
    - boolean, string result value shorthands
    - supports tuple values, not just lists
    - regex result-dict keys
    - other minor cleanup, fixes
    bitprophet committed Nov 25, 2020
    Copy the full SHA
    e5ecb36 View commit details

Commits on Nov 26, 2020

  1. Copy the full SHA
    6709e03 View commit details

Commits on Dec 11, 2020

  1. Copy the full SHA
    f8a0461 View commit details
  2. Blacken

    bitprophet committed Dec 11, 2020
    Copy the full SHA
    bd55d0a View commit details
  3. Not sure why UnexpectedExit repr override __repr__ and not _repr

    Fixed that, it makes more sense this way
    bitprophet committed Dec 11, 2020
    Copy the full SHA
    1987ff8 View commit details
  4. Copy the full SHA
    eeae30c View commit details

Commits on Dec 12, 2020

  1. Test Exit more thoroughly

    bitprophet committed Dec 12, 2020
    Copy the full SHA
    645c25b View commit details
  2. Copy the full SHA
    cce700b View commit details

Commits on Dec 23, 2020

  1. Copy the full SHA
    58c17cf View commit details
  2. Copy the full SHA
    279b2e4 View commit details

Commits on Dec 30, 2020

  1. Copy the full SHA
    ca2fd9b View commit details
  2. Minor tweaks to update #197

    - Formatting/blacken
    - Modern pytest style asserts and 'raises' use
    bitprophet committed Dec 30, 2020
    Copy the full SHA
    cc12c31 View commit details
  3. Copy the full SHA
    775a75c View commit details
  4. Copy the full SHA
    d25faa1 View commit details
  5. Realized OP's impl was overkill/caused bugs. Just set name.

    Suspect maybe this changed in the years since it was filed,
    or they just didn't test --list, which exposes the bug: cannot
    display the transformed name of a collection.
    
    But as it happens, the way we normalize everything to dict string key
    lookups meant there was no need to special-case collections on lookup,
    only needed the 'save' side of things.
    bitprophet committed Dec 30, 2020
    Copy the full SHA
    dd8f524 View commit details
  6. Copy the full SHA
    207771d View commit details
  7. Copy the full SHA
    5f92a06 View commit details
  8. Copy the full SHA
    4734b02 View commit details
  9. Copy the full SHA
    fb717cf View commit details

Commits on Dec 31, 2020

  1. Copy the full SHA
    3a2613c View commit details
  2. Tweaks re #611

    - Simplify implementation a tad, arguably
    - Streamline tests and make them more unit-y, no real reason to be integration-style here
    - Copy help arg to prevent surprise mutation
    bitprophet committed Dec 31, 2020
    Copy the full SHA
    cfc0c29 View commit details
  3. Copy the full SHA
    54b28be View commit details
  4. Changelog, docstring and test tweak re #607, re #454

    Test didn't need to use Path objects; only needs to test
    the contract being defined.
    bitprophet committed Dec 31, 2020
    Copy the full SHA
    fdda9fa View commit details
  5. Changelog 1.5.0 release

    bitprophet committed Dec 31, 2020
    Copy the full SHA
    f0054ae View commit details
  6. Tweak versionadded/changed bits for new param.

    Looks confusing as rendered and I think using a single 'block' of these directives is how I normally do things anyhow
    bitprophet committed Dec 31, 2020
    Copy the full SHA
    ed94c59 View commit details

Commits on Jan 3, 2021

  1. Fix typo

    benbridts authored Jan 3, 2021
    Copy the full SHA
    8707cea View commit details
Showing with 1,910 additions and 7,782 deletions.
  1. +63 −0 .circleci/config.yml
  2. +3 −0 .codecov.yml
  3. +3 −1 .coveragerc
  4. +0 −9 setup.cfg → .flake8
  5. +0 −79 .travis.yml
  6. +0 −1 MANIFEST.in
  7. +23 −3 README.rst
  8. +0 −20 appveyor.yml
  9. +0 −24 appveyor/install.ps1
  10. +19 −10 dev-requirements.txt
  11. +2 −4 integration/_support/busywork.py
  12. +2 −0 integration/_support/regression.py
  13. +0 −1 integration/_support/respond_base.py
  14. +0 −1 integration/_support/respond_both.py
  15. +0 −2 integration/_support/respond_fail.py
  16. +1 −1 integration/_util.py
  17. +13 −13 integration/context.py
  18. +5 −25 integration/main.py
  19. +1 −1 integration/runners.py
  20. +1 −1 invoke/_version.py
  21. +41 −24 invoke/collection.py
  22. +2 −8 invoke/completion/complete.py
  23. +18 −30 invoke/config.py
  24. +122 −47 invoke/context.py
  25. +3 −5 invoke/env.py
  26. +6 −7 invoke/exceptions.py
  27. +2 −4 invoke/executor.py
  28. +2 −2 invoke/loader.py
  29. +1 −1 invoke/parser/argument.py
  30. +1 −2 invoke/parser/context.py
  31. +4 −6 invoke/parser/parser.py
  32. +19 −15 invoke/program.py
  33. +163 −170 invoke/runners.py
  34. +56 −55 invoke/tasks.py
  35. +10 −40 invoke/util.py
  36. +1 −1 invoke/vendor/lexicon/LICENSE
  37. +3 −2 invoke/vendor/lexicon/__init__.py
  38. +2 −0 invoke/vendor/lexicon/_version.py
  39. +21 −25 invoke/vendor/lexicon/alias_dict.py
  40. +3 −0 invoke/vendor/lexicon/attribute_dict.py
  41. +0 −868 invoke/vendor/six.py
  42. +133 −18 invoke/vendor/{yaml3 → yaml}/__init__.py
  43. +2 −2 invoke/vendor/{yaml3 → yaml}/composer.py
  44. +122 −60 invoke/vendor/{yaml3 → yaml}/constructor.py
  45. +28 −12 invoke/vendor/{yaml3 → yaml}/cyaml.py
  46. +9 −9 invoke/vendor/{yaml3 → yaml}/dumper.py
  47. +8 −8 invoke/vendor/{yaml3 → yaml}/emitter.py
  48. 0 invoke/vendor/{yaml3 → yaml}/error.py
  49. 0 invoke/vendor/{yaml2 → yaml}/events.py
  50. +24 −1 invoke/vendor/{yaml3 → yaml}/loader.py
  51. 0 invoke/vendor/{yaml2 → yaml}/nodes.py
  52. 0 invoke/vendor/{yaml3 → yaml}/parser.py
  53. +1 −8 invoke/vendor/{yaml3 → yaml}/reader.py
  54. +24 −9 invoke/vendor/{yaml3 → yaml}/representer.py
  55. +6 −3 invoke/vendor/{yaml3 → yaml}/resolver.py
  56. +18 −31 invoke/vendor/{yaml3 → yaml}/scanner.py
  57. 0 invoke/vendor/{yaml3 → yaml}/serializer.py
  58. 0 invoke/vendor/{yaml2 → yaml}/tokens.py
  59. +0 −315 invoke/vendor/yaml2/__init__.py
  60. +0 −139 invoke/vendor/yaml2/composer.py
  61. +0 −675 invoke/vendor/yaml2/constructor.py
  62. +0 −85 invoke/vendor/yaml2/cyaml.py
  63. +0 −62 invoke/vendor/yaml2/dumper.py
  64. +0 −1,140 invoke/vendor/yaml2/emitter.py
  65. +0 −75 invoke/vendor/yaml2/error.py
  66. +0 −40 invoke/vendor/yaml2/loader.py
  67. +0 −589 invoke/vendor/yaml2/parser.py
  68. +0 −190 invoke/vendor/yaml2/reader.py
  69. +0 −484 invoke/vendor/yaml2/representer.py
  70. +0 −224 invoke/vendor/yaml2/resolver.py
  71. +0 −1,457 invoke/vendor/yaml2/scanner.py
  72. +0 −111 invoke/vendor/yaml2/serializer.py
  73. +0 −86 invoke/vendor/yaml3/events.py
  74. +0 −49 invoke/vendor/yaml3/nodes.py
  75. +0 −104 invoke/vendor/yaml3/tokens.py
  76. +11 −11 invoke/watchers.py
  77. +3 −0 pytest.ini
  78. +21 −16 setup.py
  79. +1 −1 sites/docs/api/parser.rst
  80. +5 −8 sites/docs/concepts/configuration.rst
  81. +1 −1 sites/docs/concepts/invoking-tasks.rst
  82. +2 −2 sites/docs/concepts/library.rst
  83. +2 −2 sites/docs/concepts/loading.rst
  84. +40 −0 sites/docs/concepts/namespaces.rst
  85. +169 −23 sites/docs/concepts/testing.rst
  86. +5 −2 sites/docs/conf.py
  87. +2 −2 sites/docs/getting-started.rst
  88. +1 −1 sites/docs/index.rst
  89. +1 −1 sites/docs/invoke.rst
  90. +2 −2 sites/shared_conf.py
  91. +158 −6 sites/www/changelog.rst
  92. +2 −2 sites/www/conf.py
  93. +3 −5 sites/www/contact.rst
  94. +1 −1 sites/www/development.rst
  95. +2 −5 sites/www/faq.rst
  96. +2 −6 sites/www/index.rst
  97. +4 −4 sites/www/installing.rst
  98. +0 −17 tasks-requirements.txt
  99. +24 −19 tasks.py
  100. +1 −1 tests/_support/custom_executor.py
  101. +2 −4 tests/_support/docstrings.py
  102. +7 −10 tests/_util.py
  103. +36 −14 tests/collection.py
  104. +24 −1 tests/completion.py
  105. +1 −1 tests/concurrency.py
  106. +12 −27 tests/config.py
  107. +33 −15 tests/conftest.py
  108. +151 −27 tests/context.py
  109. +1 −1 tests/executor.py
  110. +2 −4 tests/init.py
  111. +1 −1 tests/parser_context.py
  112. +1 −1 tests/parser_parser.py
  113. +42 −5 tests/program.py
  114. +54 −30 tests/runners.py
  115. +79 −5 tests/task.py
  116. +1 −1 tests/terminals.py
  117. +7 −0 tests/util.py
  118. +1 −2 tests/watchers.py
  119. +1 −1 tox.ini
63 changes: 63 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: 2.1


orbs:
orb: invocations/orb@1.2.0


jobs:
# Unit+integration tests, with coverage
coverage:
executor:
name: orb/default
version: "3.6"
steps:
- orb/setup
- run: inv ci.make-sudouser
- orb/sudo-coverage
- orb/debug

regression:
executor:
name: orb/default
version: "3.6"
steps:
- orb/setup
- run: inv regression
- orb/debug

doctests:
executor:
name: orb/default
version: "3.6"
steps:
- orb/setup
- run: inv www.doctest
- orb/debug


workflows:
main:
jobs:
- orb/lint:
name: Lint
- orb/format:
name: Style check
- coverage:
name: Test
- regression:
name: Regression tests
- orb/test-release:
name: Release test
- orb/test:
name: Test << matrix.version >>
requires: ["Test"]
matrix:
parameters:
version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
- orb/docs:
name: "Docs"
requires: ["Test"]
- doctests:
name: "Doctests"
requires: ["Docs"]
3 changes: 3 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
comment: false
coverage:
precision: 0
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[run]
branch = True
include = invoke/*
include =
invoke/*
tests/*
omit = invoke/vendor/*
9 changes: 0 additions & 9 deletions setup.cfg → .flake8
Original file line number Diff line number Diff line change
@@ -3,12 +3,3 @@ exclude = invoke/vendor,sites,.git,build,dist,alt_env,appveyor
ignore = E124,E125,E128,E261,E301,E302,E303,E306,W503,E731
max-line-length = 79

[metadata]
license_file = LICENSE

[tool:pytest]
testpaths = tests
python_files = *
filterwarnings =
once::Warning
ignore::DeprecationWarning
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ recursive-include invoke/completion *
recursive-include sites *
recursive-exclude sites/*/_build *
include dev-requirements.txt
include tasks-requirements.txt
recursive-include tests *
recursive-exclude * *.pyc *.pyo
recursive-exclude **/__pycache__ *
26 changes: 23 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
|version| |python| |license| |ci| |coverage|

.. |version| image:: https://img.shields.io/pypi/v/invoke
:target: https://pypi.org/project/invoke/
:alt: PyPI - Package Version
.. |python| image:: https://img.shields.io/pypi/pyversions/invoke
:target: https://pypi.org/project/invoke/
:alt: PyPI - Python Version
.. |license| image:: https://img.shields.io/pypi/l/invoke
:target: https://github.com/pyinvoke/invoke/blob/main/LICENSE
:alt: PyPI - License
.. |ci| image:: https://img.shields.io/circleci/build/github/pyinvoke/invoke/main
:target: https://app.circleci.com/pipelines/github/pyinvoke/invoke
:alt: CircleCI
.. |coverage| image:: https://img.shields.io/codecov/c/gh/pyinvoke/invoke
:target: https://app.codecov.io/gh/pyinvoke/invoke
:alt: Codecov

Welcome to Invoke!
==================

@@ -6,6 +24,8 @@ subprocesses and organizing executable Python code into CLI-invokable tasks. It
draws inspiration from various sources (``make``/``rake``, Fabric 1.x, etc) to
arrive at a powerful & clean feature set.

For a high level introduction, including example code, please see `our main
project website <http://pyinvoke.org>`_; or for detailed API docs, see `the
versioned API website <http://docs.pyinvoke.org>`_.
To find out what's new in this version of Invoke, please see `the changelog
<https://pyinvoke.org/changelog.html#{}>`_.

The project maintainer keeps a `roadmap
<https://bitprophet.org/projects#roadmap>`_ on his website.
20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

24 changes: 0 additions & 24 deletions appveyor/install.ps1

This file was deleted.

29 changes: 19 additions & 10 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Install self before invocations to save a bit of time
-e .
# Invocations, for all sorts of things
invocations>=3.0.1
# Coverage!
coverage>=6.2,<7
codecov==2.1.12
# Docs
# NOTE: sphinx hook is in tasks-requirements.txt
releases>=0.6.1,<2.0
releases>=2
alabaster==0.7.12
# Testing (explicit dependencies to get around a Travis/pip issue)
pytest==4.6.3
pytest-relaxed==1.1.5
pytest-cov==2.5.1
mock==1.0.1
flake8==3.7.8
# Stuff needed for our tasks.py to execute (broken out for ease of CI)
-r tasks-requirements.txt
# Testing
pytest-relaxed>=2
pytest-cov>=4
# Formatting
# Flake8 5.x seems to have an odd importlib-metadata incompatibility?
flake8>=4,<5
black>=22.8,<22.9
# Packaging
setuptools>56
# Debuggery
icecream>=2.1
6 changes: 2 additions & 4 deletions integration/_support/busywork.py
Original file line number Diff line number Diff line change
@@ -15,9 +15,7 @@

for i in range(num_cycles):
out = "[{}] This is my stdout, there are many like it, but...\n".format(i)
sys.stdout.write(out)
sys.stdout.flush()
print(out, file=sys.stdout, flush=True)
err = "[{}] To err is human, to stderr is superhuman\n".format(i)
sys.stderr.write(err)
sys.stderr.flush()
print(out, file=sys.stderr, flush=True)
time.sleep(0.1)
2 changes: 2 additions & 0 deletions integration/_support/regression.py
Original file line number Diff line number Diff line change
@@ -32,3 +32,5 @@ def check(c):
if failures:
print("run() FAILED {}/{} times!".format(len(failures), count))
sys.exit(1)
else:
print("No failures detected after {} runs, A-OK".format(count))
1 change: 0 additions & 1 deletion integration/_support/respond_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys

from invoke.vendor.six.moves import input

if input("What's the password?") != "Rosebud":
sys.exit(1)
1 change: 0 additions & 1 deletion integration/_support/respond_both.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys

from invoke.vendor.six.moves import input

if input("standard out") != "with it":
sys.exit(1)
2 changes: 0 additions & 2 deletions integration/_support/respond_fail.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from invoke.vendor.six.moves import input

if input("What's the password?") == "Rosebud":
print("You're not Citizen Kane!")
# This should sit around forever like e.g. a bad sudo prompt would, but the
2 changes: 1 addition & 1 deletion integration/_util.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from contextlib import contextmanager
from functools import wraps
from resource import getrusage, RUSAGE_SELF
import sys
import time

from invoke.vendor.six import wraps

from pytest import skip

26 changes: 13 additions & 13 deletions integration/context.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import os

from pytest import skip

from invoke import Context, Config
from invocations import ci as ci_mod


class Context_:
class sudo:
def base_case(self):
# NOTE: Assumes a user whose password is 'mypass' has been created
# & added to passworded (not passwordless) sudo configuration; and
# that this user is the one running the test suite. Only for
# running on Travis, basically.
if not os.environ.get("TRAVIS", False):
skip()
config = Config({"sudo": {"password": "mypass"}})
result = Context(config=config).sudo("whoami", hide=True)
assert result.stdout.strip() == "root"
c = Context()
# Grab CI-oriented sudo user/pass direct from invocations.ci
# TODO: might be nice to give Collection a way to get a Config
# object direct, instead of a dict?
ci_conf = Config(ci_mod.ns.configuration()).ci.sudo
user = ci_conf.user
c.config.sudo.password = ci_conf.password
# Safety 1: ensure configured user even exists
assert c.run("id {}".format(user), warn=True)
# Safety 2: make sure we ARE them (and not eg root already)
assert c.run("whoami", hide=True).stdout.strip() == user
assert c.sudo("whoami", hide=True).stdout.strip() == "root"
Loading