diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..96dc5ad --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main, master] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 \ No newline at end of file diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-package.yml similarity index 58% rename from .github/workflows/python-app.yml rename to .github/workflows/python-package.yml index b22fdd7..74f9eb6 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-package.yml @@ -1,28 +1,29 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Pydantic-CLI +name: "pydantic-cli" on: push: - branches: [ "master" ] + branches: [ "main", "master" ] pull_request: - branches: [ "master" ] - -permissions: - contents: read + branches: [ "main", "master" ] jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip @@ -31,4 +32,4 @@ jobs: pip install -r REQUIREMENTS-TEST.txt - name: Test with pytest run: | - pytest + pytest --cov diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0655ebc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/mirrors-mypy + rev: 'v1.10.1' + hooks: + - id: mypy \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6384b..1eaf832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## Version 7.0.0 + +- Drop support for python > 3.10 +- CI fixes for explicitly testing for 3.10, 3.11, 3.12 + ## Version 6.0.0 - Backwards incompatible change. Use `Cmd` model. diff --git a/REQUIREMENTS-TEST.txt b/REQUIREMENTS-TEST.txt index c74f10b..1ad0ae9 100644 --- a/REQUIREMENTS-TEST.txt +++ b/REQUIREMENTS-TEST.txt @@ -1,3 +1,4 @@ pytest >= 8.2.2 +pytest-cov >=4.0.0 mypy >= 1.10.1 black >= 24.4.2 \ No newline at end of file diff --git a/pydantic_cli/_version.py b/pydantic_cli/_version.py index 0f607a5..b378fc6 100644 --- a/pydantic_cli/_version.py +++ b/pydantic_cli/_version.py @@ -1 +1 @@ -__version__ = "6.0.0" +__version__ = "7.0.0" diff --git a/setup.py b/setup.py index 80e755d..e9374b5 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def get_version(): author='M. Kocher', author_email='michael.kocher@me.com', license='MIT', - python_requires=">=3.7", + python_requires=">=3.10", install_requires=_get_requirements("REQUIREMENTS.txt"), packages=['pydantic_cli', 'pydantic_cli.examples'], package_data={"pydantic_cli": ["py.typed"]}, @@ -48,9 +48,9 @@ def get_version(): zip_safe=False, classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "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", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Topic :: Utilities",