Commit Graph

87 Commits (9ee667030fbc35106b77af6ae6045c5285cb42c7)

Author SHA1 Message Date
Matt Clay 9ee667030f
ansible-test - Update sanity test requirements (#85980) 2 months ago
Matt Clay f2612fbe3a
Drop Python 3.11 controller support (#85590) 4 months ago
Martin Krizek ef9d92b31d
Test both original and latest dnf versions (#85342)
Co-authored-by: Matt Clay <matt@mystile.com>
6 months ago
Matt Clay 83fcaeaa8b
Spelling fixes (#85345)
A few grammar fixes too.
6 months ago
Matt Clay 7ef13cb29e
ansible-test - Add remote debugging support (#85317) 6 months ago
Matt Davis ff6998f2b9
Switch to stackwalk caller ID (#85095)
* See changelog fragment for most changes.
* Defer early config warnings until display is functioning, eliminating related fallback display logic.
* Added more type annotations and docstrings.
* ansible-test - pylint sanity for deprecations improved.
* Refactored inline legacy resolutions in PluginLoader.

Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
Matt Clay 5ff8d093f0
ansible-test - Code style cleanup (#84749)
* ansible-test - Minor style cleanup (add blank lines)

* ansible-test - Use `"""` instead of `'''`
9 months ago
Matt Clay bddb9a7490
ansible-test - Support target testing with black (#84744) 9 months ago
Matt Clay 989e583356
ansible-test - Initial support for black in core (#84741) 9 months ago
Matt Clay 21bc1d915d
ansible-test - Fix warning message grammar (#84666) 10 months ago
Matt Clay 83671ecb39
ansible-test - Enable pylint docstyle for tests (#84092)
This cleans up the implementation of the pylint sanity test and enables the docstyle extension rule `bad-docstring-quotes` for tests.

The rule will be enabled for the rest of ansible-core once automated cleanup has been performed on existing docstrings.
1 year ago
Matt Clay 7693c892fa
ansible-test - Use Python version in pylint contexts (#83984) 1 year ago
Matt Clay 70be017f02
ansible-test - Update mypy and package-data tests (#83734)
* package-data - Test min/max setuptools version

* Fix multi-version abstraction

* Convert mypy test to script based test

* Fix f-string in pymarkdown test

* Sanity test fixes
1 year ago
Matt Clay 1c17fe2d53
Drop Python 3.7 support (#82982) 2 years ago
Abhijeet Kasurde b8b12c4be3
Update sanity requirements (#82296)
* Update sanity requirements
* Drop Python 3.7 for mypy

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Felix Fontein c0821346fc
Do not mangle plugin names in collections that start with an underscore. (#82574) 2 years ago
Matt Clay 37cee8bdfc
ansible-test - Remove special cryptography install (#82008)
Python 3.10 is the minimum version on the controller, and it requires openssl 1.1.1 or later.

As a result, there's no need to check the openssl version any longer.
2 years ago
Sviatoslav Sydorenko d2ba76c117
Remove Python `< 3.5` `selectors` fallbacks (#81872) 2 years ago
Matt Clay 921efce43a
ansible-test - Remove more Python 2.7 / 3.6 support (#81898) 2 years ago
Matt Clay b94ee1cefd
Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
2 years ago
Abhijeet Kasurde d8f791d88c
Bump sanity test requirements for 3.12 (#81846) 2 years ago
Matt Clay 3794612832
ansible-test - Skip pylint test on Python 3.12 (#81706) 2 years ago
Abhijeet Kasurde 1cc5efa77b
tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 390e508d27
ansible-test - Always use managed entry points (#81537) 2 years ago
Matt Clay 47ab59753c
Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
2 years ago
Matt Clay 691c8e8603
Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
2 years ago
Matt Clay e964078a83
ansible-test - Pre-build PyYAML wheels (#81300)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0.
2 years ago
Matt Clay 3f7bf0bcd4
ansible-test - Fix sanity traceback with `-e` opt (#81271)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
2 years ago
Matt Clay 876be11f8c
Add pymarkdown sanity test for core (#81220)
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
2 years ago
Matt Clay 72e038e823
Remove `docs` and `examples` directories (#81011)
* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test
2 years ago
Matt Clay 3d2ff64264
ansible-test - Fix import sanity test for targets (#81184) 2 years ago
Matt Clay c3926268e2
ansible-test - Avoid using atexit module (#81096) 2 years ago
Matt Martz 6fead15334
Pylint deprecated comment checker (#81071)
Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay fd341265d0
ansible-test - Avoid use of deprecated utcnow (#80750)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.
3 years ago
Matt Clay bad8843124
ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.
3 years ago
Matt Clay 367d45facd
ansible-test - Fix error with missing pylint home (#80155) 3 years ago
Matt Clay 27287b40c0
ansible-test - Fix pylint error with old home dir (#80151) 3 years ago
Matt Clay 715ab99462
ansible-test - Improve code formatting (#79983)
* ansible-test - Add blank lines after docstrings

* ansible-test - Preserve formatting of arg pairs

* ansible-test - Remove unused string

* ansible-test - Remove pointless dict() usage

* ansible-test - Clean up initial func arg indenting

* ansible-test - Clean up constructor arg indenting

* ansible-test - Clean up func arg wrapping

* ansible-test - Clean up comma and paren placement
3 years ago
Matt Clay 58d84933fc
ansible-test - Clean up indentation and spaces (#79980) 3 years ago
Matt Clay 27cd5e77d8
Update mypy and its dependencies. (#79812)
* Update mypy and its dependencies.

* Fix requirements.

* Remove unnecessary matching constraints.
3 years ago
Matt Clay c9f20aedc0
ansible-test - Fix various type hinting issues. (#79798)
* ansible-test - Add missing type hints.

* ansible-test - Remove redundant type hints.

* ansible-test - Fix return type annotations.

* ansible-test - Add assert, casts to assist mypy.

* ansible-test - Fix incorrect type hints.

* ansible-test - Remove no-op code.

* ansible-test - Fix incorrect types.

* ansible-test - Fix method signature mismatch.
3 years ago
Matt Clay 5f58015527 ansible-test - Remove obsolete DirectoryTarget.
This code has been unused since at least the 2.9 release.
3 years ago
Felix Fontein 1852f9fab4
Support test and filter plugins in ansible-doc sanity test (#77737)
* Support test and filter plugins in ansible-doc sanity test.

* Move integration target non-filter file check_pylint.py from filter/ to plugin_utils/.
3 years ago
Matt Clay cda16cc5e9
ansible-test - Improve container management. (#78550)
See changelogs/fragments/ansible-test-container-management.yml for details.
3 years ago
Matt Clay 938c0fa944 ansible-test - Fix and update documentation links. 3 years ago
Matt Clay bc274f57f7
ansible-test - Improve pylint command consistency. (#78896)
* ansible-test - Improve pylint command consistency.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
3 years ago
Matt Clay c56b35598f
ansible-test - Upgrade pylint. (#78727)
This version of pylint now supports Python 3.11.
3 years ago
Matt Clay 69ceb31600
ansible-test - Update sanity test requirements. (#78528) 3 years ago
Matt Clay 2b63fdd1b8
ansible-test - Fix ansible-doc sanity test FQCN. (#78518) 3 years ago
Matt Clay 85acf4d1e5
ansible-test - Avoid use of deprecated type hints. (#78456)
* ansible-test - Avoid use of deprecated type hints.

PEP 585 deprecated many container types in the `typing` module in favor of the actual types, which support subscripting as of Python 3.9.

Conversion of `t.Type` was skipped since PyCharm does not currently recognize it.

* ansible-test - Fix `t` and `c` imports/shadowing.
3 years ago