Skip to content

Commit

Permalink
Updates supported versions.
Browse files Browse the repository at this point in the history
Switches to trusted publishers PyPI workflow.
  • Loading branch information
Daverball committed Aug 21, 2024
1 parent fc34ebd commit 45250da
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 49 deletions.
9 changes: 0 additions & 9 deletions .coveragerc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/python-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ on:
release:
types: [created]

permissions:
contents: read
environment:
name: pypi
url: https://pypi.org/project/suitable

jobs:
deploy:

runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package distributions
run: python -m build -s -w

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .github/workflows/python-tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Get branch name (merge)
if: github.event_name != 'pull_request'
Expand All @@ -28,7 +28,7 @@ jobs:
>> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ dist/
.coverage
.DS_Store
docs/build
eggs/
eggs/
venv/
.coverage.*
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: '^(.bumpversion.cfg)$'
Expand All @@ -14,19 +14,19 @@ repos:
- id: rst-linter
files: '^[A-Z]+\.rst$'
- repo: https://github.com/seantis/pre-commit-hooks
rev: v1.0.1
rev: v1.1.0
hooks:
- id: nocheckin
exclude: .pre-commit-config.yaml
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
files: '^(src/.*|tests/.*)\.py$'
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
rev: 1.7.9
hooks:
- id: bandit
args: ["-c", "pyproject.toml", "--quiet"]
Expand Down
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Compatibility
-------------

* Python 3.8+
* Ansible 2.4+
* Mitogen 0.2.6+ (currently incompatible with Ansible 2.8)
* Ansible 2.8+
* Mitogen 0.3.7+

Support for older releases is kept only if possible. New Ansible releases
are favored over old ones.
Expand Down Expand Up @@ -60,6 +60,10 @@ Latest Release

Changelog
---------

- Adds support for Python 3.11 and 3.12
[Daverball]

0.18.0 (2023-09-04)
~~~~~~~~~~~~~~~~~~~
Modernizes project structure [strfx]:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ skips = ["B101"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py38,py39,py310,flake8,bandit,report
envlist = py38,py39,py310,py311,py312,flake8,bandit,report
[testenv]
usedevelop = true
setenv =
py{38,39,310}: COVERAGE_FILE = .coverage.{envname}
py{38,39,310,311,312}: COVERAGE_FILE = .coverage.{envname}
deps =
-e{toxinidir}[tests]
Expand Down
13 changes: 10 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ classifiers =
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development :: Libraries :: Python Modules


Expand All @@ -30,10 +37,10 @@ packages =
python_requires = >= 3.8
platforms = any
install_requires =
ansible>=2.8.0.0
ansible-core<2.16
ansible>=2.8
ansible-core
ansible-base

[options.extras_require]
dev =
bandit[toml]
Expand Down

0 comments on commit 45250da

Please sign in to comment.