diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 71e45e4..c0bf9f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.x"] + python-version: ["3.11", "3.12", "3.13", "3.14"] runs-on: ${{ matrix.os }} steps: @@ -57,7 +57,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- @@ -66,7 +66,7 @@ jobs: run: | python3 -m pip install --upgrade pip python3 -m pip install build hatchling - python3 -m pip install -e . + python3 -m pip install -e ".[dev]" - name: Run Pytest with coverage run: pytest --cov --cov-report=xml diff --git a/BSD_LICENSE b/BSD_LICENSE index 0f421a1..973a911 100644 --- a/BSD_LICENSE +++ b/BSD_LICENSE @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2024, StartOS, Inc +Copyright (c) 2026, StartOS, Inc All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/LICENSE b/LICENSE index a96d7c5..1e0026d 100644 --- a/LICENSE +++ b/LICENSE @@ -86,7 +86,7 @@ To the extent possible, if any provision of this Public License is deemed unenfo No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. -Copyright 2024-2025 StartOS Inc. +Copyright 2024-2026 StartOS Inc. Code committed prior to October 26th, 2024 remains the copyright of Jason Nichols, the previous maintainer of the repository under the BSD 2-Clause License (see BSD_LICENSE) diff --git a/make_version.py b/make_version.py index 649e0bb..609be24 100644 --- a/make_version.py +++ b/make_version.py @@ -1,7 +1,6 @@ import os import datetime - # Get the version from the git tag, and write to VERSION. ref = None if "GITHUB_REF" in os.environ: diff --git a/modernmetric/__main__.py b/modernmetric/__main__.py index 3d3409e..85144c0 100644 --- a/modernmetric/__main__.py +++ b/modernmetric/__main__.py @@ -22,8 +22,7 @@ def ArgParser(custom_args=None): formatter_class=argparse.RawTextHelpFormatter, prog="modernmetric", description="Calculate code metrics in various languages", - epilog=textwrap.dedent( - """ + epilog=textwrap.dedent(""" Currently you could import files of the following types for --warn_* or --coverage # noqa: E501 Following information can be read @@ -45,8 +44,7 @@ def ArgParser(custom_args=None): "content": , "severity": } - """ - ), + """), ) parser.add_argument( "--output_file", default=None, help="File to write the output to" diff --git a/pyproject.toml b/pyproject.toml index 0d72457..2280bac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ requires = [ "setuptools", "setuptools_scm[toml]>=6.0", "build", - "hatch-requirements-txt" ] build-backend = "hatchling.build" @@ -17,7 +16,7 @@ description = "Calculate code metrics in various languages" readme = "README.md" license = "CC-BY-NC-4.0" license-files = ["LICENSE"] -requires-python = ">=3.9" +requires-python = ">=3.11" classifiers = [ "Development Status :: 4 - Beta", "Environment :: Console", @@ -32,13 +31,21 @@ classifiers = [ "Programming Language :: Python :: 3", "Topic :: Software Development :: Quality Assurance", ] -dynamic = ["dependencies", "version"] +dependencies = [ + "chardet>=5.2.0", + "httpx[http2]~=0.28.1", + "pygments>=2.19.2", + "pygments-tsx>=1.0.4", + "pygount>=3.1.1", + "cachehash>=1.1.4", +] +dynamic = ["version"] [project.optional-dependencies] dev = [ - "black>=24.1.1", - "pytest", - "pytest-cov" + "black>=26.1.0", + "pytest>=9.0.2", + "pytest-cov>=7.0.0" ] [project.scripts] @@ -52,7 +59,7 @@ modernmetric-test = "test.test_self_scan:main" [tool.black] line-length = 88 -target-version = ['py39', 'py310', 'py311'] +target-version = ['py311', 'py312', 'py313'] include = '\.pyi?$' exclude = ''' ( @@ -71,6 +78,3 @@ include = ["modernmetric*", "test*"] [tool.hatch.version] path = "VERSION.py" - -[tool.hatch.metadata.hooks.requirements_txt] -files = ["requirements.txt"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 94105b1..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -chardet>=5.2.0 -httpx[http2]~=0.28.1 -pygments>=2.15.1 -pygments-tsx>=1.0.1 -pygount -cachehash>=1.1.0