Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required ReadTheDocs configuration #294

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .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 All @@ -27,7 +27,8 @@ jobs:
run: |
tox
- name: Upload coverage information to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4.2.0
with:
fail_ci_if_error: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
exclude_types: [xml, json]
- 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 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
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_long_description():
author='OASIS Cyber Threat Intelligence Technical Committee',
author_email='[email protected]',
packages=find_packages(exclude=['*.test', '*.test.*']),
python_requires='>=3.7',
python_requires='>=3.8',
install_requires=[
'maec',
'netaddr',
Expand All @@ -55,10 +55,11 @@ def get_long_description():
},
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',
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
Expand Down
10 changes: 7 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39,310}-stix20-missing-policy{-description,-custom},py{37,38,39,310}-stix21-missing-policy{-description,-custom,-extensions,-ignore},style,isort-check,packaging
envlist = py{38,39,310,311,312}-stix20-missing-policy{-description,-custom},py{37,38,39,310}-stix21-missing-policy{-description,-custom,-extensions,-ignore},style,isort-check,packaging

[testenv]
deps =
Expand All @@ -18,7 +18,7 @@ setenv =
missing-policy-ignore: MISSING_POLICY=ignore

commands =
py.test -v --cov=stix2elevator stix2elevator/test/test_idioms.py stix2elevator/test/test_main.py --cov-report term-missing
py.test -v --cov=stix2elevator stix2elevator/test/test_idioms.py stix2elevator/test/test_main.py --cov-report term-missing --cov-append
missing-policy-description: py.test -v stix2elevator/test/test_utils.py --cov=stix2elevator --cov-report term-missing --cov-append
stix20: py.test -v stix2elevator/test/test_stepper.py --cov=stix2elevator --cov-report term-missing --cov-append

Expand All @@ -27,6 +27,8 @@ passenv = GITHUB_*
[testenv:packaging]
deps =
twine
setuptools
wheel
commands =
python setup.py sdist bdist_wheel --universal
twine check dist/*
Expand All @@ -41,8 +43,10 @@ commands =
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

[gh-actions:env]
VERSION =
Expand Down
Loading