diff --git a/.github/workflows/pre-commit-checks.yaml b/.github/workflows/pre-commit-checks.yaml index 04f86a3..65947d3 100644 --- a/.github/workflows/pre-commit-checks.yaml +++ b/.github/workflows/pre-commit-checks.yaml @@ -9,6 +9,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.0 \ No newline at end of file + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2df3b6..bb45c90 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,17 +8,17 @@ 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@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade pip wheel setuptools pip install -e .[test] - name: Test run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6de6bdb..f9be32a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,26 +1,26 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/psf/black - rev: 22.3.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.4.2 hooks: - id: black exclude: netconan/default_reserved_words.py -- repo: https://github.com/pre-commit/mirrors-isort - rev: v5.7.0 + language_version: "3.12" +- repo: https://github.com/PyCQA/isort + rev: 5.13.2 hooks: - id: isort - # args from https://black.readthedocs.io/en/stable/compatible_configs.html#isort - args: ["--multi-line=3", "--trailing-comma", "--force-grid-wrap=0", "--use-parentheses", "--ensure-newline-before-comments", "--line-length=88"] + args: ["--profile=black"] exclude: netconan/default_reserved_words.py -- repo: https://github.com/humitos/mirrors-autoflake.git - rev: v1.3 +- repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 hooks: - id: autoflake args: ["--in-place", "--remove-all-unused-imports", "--remove-unused-variables"] exclude: netconan/default_reserved_words.py - repo: https://github.com/pycqa/flake8 - rev: 3.8.4 + rev: 7.1.0 hooks: - id: flake8 additional_dependencies: [flake8-docstrings] diff --git a/setup.py b/setup.py index 57b6e1a..a78b094 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ + # Copyright 2018 Intentionet # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,7 +22,7 @@ from os import path # Always prefer setuptools over distutils -from setuptools import find_packages, setup +from setuptools import setup here = path.abspath(path.dirname(__file__)) @@ -63,17 +64,16 @@ # that you indicate whether you support Python 2, Python 3 or both. "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "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", ], - python_requires=">=3.7", + python_requires=">=3.8", # What does your project relate to? keywords="network configuration anonymizer", - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - packages=find_packages(exclude=["contrib", "docs", "tests"]), + packages=["netconan"], # Alternatively, if you want to distribute just a my_module.py, uncomment # this: # py_modules=["my_module"], @@ -82,8 +82,8 @@ # requirements files see: # https://packaging.python.org/en/latest/requirements.html install_requires=[ - "configargparse<2.0.0", "bidict<1.0.0", + "configargparse<2.0.0", "passlib<2.0.0", ], # List additional groups of dependencies here (e.g. development @@ -91,14 +91,13 @@ # for example: # $ pip install -e .[dev,test] extras_require={ - "dev": ["flake8<4.0.0", "flake8-docstrings<2.0.0", "pydocstyle<4.0.0"], + "dev": ["flake8<8.0.0", "flake8-docstrings<2.0.0", "pydocstyle<6.0.0"], }, # List pytest requirements for running unit tests - setup_requires=["pytest-runner<6.0"], - # pytest 5+ does not support Python 2 + setup_requires=["pytest-runner<7"], tests_require=[ "pytest>=6,<7", - "pytest-cov<3.0.0", + "pytest-cov<6.0.0", "requests_mock<2.0.0", "testfixtures<7.0.0", ],