From 5ddb22b3e6201a5b36a2233f342ab0f5e6d56a5f Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 5 Apr 2024 14:30:58 -0400 Subject: [PATCH 1/5] Add required ReadTheDocs configuration --- .readthedocs.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..f825834 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,27 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Build all formats (incl. pdf, epub) +formats: all + +# Declare the Python requirements required to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - method: pip + path: . + extra_requirements: + - docs From a6ae750959b65787fabe5ec0a81989235db348a8 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 5 Apr 2024 14:52:08 -0400 Subject: [PATCH 2/5] Update to current Python versions --- .github/workflows/python-ci-tests.yml | 2 +- setup.py | 5 +++-- tox.ini | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-ci-tests.yml b/.github/workflows/python-ci-tests.yml index b28bb37..c278063 100644 --- a/.github/workflows/python-ci-tests.yml +++ b/.github/workflows/python-ci-tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] name: Python ${{ matrix.python-version }} Build steps: diff --git a/setup.py b/setup.py index 6b91cd5..84a5afe 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ url="https://github.com/oasis-open/cti-pattern-validator", author='OASIS Cyber Threat Intelligence Technical Committee', author_email='cti-users@lists.oasis-open.org', - python_requires=">=3.7", + python_requires=">=3.8", packages=find_packages(), install_requires=[ 'antlr4-python3-runtime~=4.9.0', @@ -53,10 +53,11 @@ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: BSD License', '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', ], extras_require={ 'dev': dev_requires, diff --git a/tox.ini b/tox.ini index e542859..8e28348 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,py38,py39,py310,packaging,pre-commit-check +envlist = py{38,39,310,311,312},packaging,pre-commit-check [testenv] deps = @@ -26,7 +26,8 @@ commands = [gh-actions] python = - 3.7: py37 3.8: py38 - 3.9: py39, packaging, pre-commit-check + 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312, packaging, pre-commit-check From a3001e27de6eb3245a1e84997bcb4f2b70ddfb9b Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 5 Apr 2024 15:02:38 -0400 Subject: [PATCH 3/5] Fix failing buils in test "lists of files in version control and sdist do not match! missing from sdist" --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index a1e24f0..1095e36 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include .isort.cfg -include .pre-commit-config.yaml +include .*.yaml include CHANGELOG.rst include CONTRIBUTING.md include dev-requirements.txt From 971db4cbd2033e90b7a6b031f9d26ebebe696784 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 5 Apr 2024 15:17:58 -0400 Subject: [PATCH 4/5] Fix packaging dependencies in workflow --- .pre-commit-config.yaml | 2 +- tox.ini | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50fb84d..9601d8b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: exclude: grammars - id: check-merge-conflict - repo: https://github.com/PyCQA/flake8 - rev: 3.8.4 + rev: 5.0.4 hooks: - id: flake8 name: Check project styling diff --git a/tox.ini b/tox.ini index 8e28348..bd6e286 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,8 @@ passenv = GITHUB_* [testenv:packaging] deps = twine + setuptools + wheel commands = python setup.py sdist bdist_wheel --universal twine check dist/* From b6b4e6e925bf2dd663fea660a4c3f02501ae908f Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 5 Apr 2024 17:26:41 -0400 Subject: [PATCH 5/5] Update isort version --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9601d8b..5aaa9ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - --ignore=F403,F405 - --max-line-length=160 - repo: https://github.com/PyCQA/isort - rev: 5.7.0 + rev: 5.13.2 hooks: - id: isort name: Sort python imports (shows diff)