Skip to content

Commit

Permalink
Merge pull request #97 from clenk/readthedocs-conf
Browse files Browse the repository at this point in the history
Add required ReadTheDocs configuration
  • Loading branch information
adulau authored Apr 8, 2024
2 parents 270fd74 + b6b4e6e commit 86c7dd7
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
27 changes: 27 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include .isort.cfg
include .pre-commit-config.yaml
include .*.yaml
include CHANGELOG.rst
include CONTRIBUTING.md
include dev-requirements.txt
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
url="https://github.com/oasis-open/cti-pattern-validator",
author='OASIS Cyber Threat Intelligence Technical Committee',
author_email='[email protected]',
python_requires=">=3.7",
python_requires=">=3.8",
packages=find_packages(),
install_requires=[
'antlr4-python3-runtime~=4.9.0',
Expand All @@ -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,
Expand Down
9 changes: 6 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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 =
Expand All @@ -14,6 +14,8 @@ passenv = GITHUB_*
[testenv:packaging]
deps =
twine
setuptools
wheel
commands =
python setup.py sdist bdist_wheel --universal
twine check dist/*
Expand All @@ -26,7 +28,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

0 comments on commit 86c7dd7

Please sign in to comment.