Skip to content

Commit fcee976

Browse files
committed
feat: upgraded versions, added coverage and sphinx support
1 parent 69167fd commit fcee976

File tree

11 files changed

+144
-20
lines changed

11 files changed

+144
-20
lines changed

.github/actions/setup_environment/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Setup CI Environment
22
inputs:
33
python-version:
4-
default: "3.9"
4+
default: "3.11"
55
type: string
66

77
runs:
88
using: composite
99
steps:
1010
- name: Setup Python
11-
uses: actions/setup-python@v4
11+
uses: actions/setup-python@v5
1212
with:
1313
python-version: ${{ inputs.python-version }}
1414

.github/workflows/build_and_upload_wheel.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout Repository
26-
uses: actions/checkout@v3
27-
with:
28-
ref: ${{ inputs.branch }}
29-
submodules: recursive
26+
uses: actions/checkout@v4
27+
with:
28+
ref: ${{ inputs.branch }}
29+
submodules: recursive
3030

3131
- name: Setup Environment
3232
uses: ./.github/actions/setup_environment
3333

3434
- name: Build Wheel
3535
run: |
36-
python3 -m build
36+
python -m build
3737
3838
- name: Upload Wheels to Github
39-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
4040
with:
4141
name: wheels
4242
path: dist/*.whl
@@ -48,9 +48,14 @@ jobs:
4848
outputs:
4949
upload: ${{ steps.trigger_upload.outputs.value }}
5050
steps:
51+
- name: Setup Python
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: "3.11"
55+
5156
- name: Download Artifacts From Github
5257
continue-on-error: true
53-
uses: actions/download-artifact@v3
58+
uses: actions/download-artifact@v4
5459
with:
5560
name: wheels
5661

@@ -74,7 +79,7 @@ jobs:
7479
env:
7580
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
7681
run: |
77-
pip3 install twine
82+
pip install twine
7883
if [[ "${{ inputs.real-pypi }}" == true ]]; then
7984
python -m twine upload \
8085
--username __token__ \

.github/workflows/run_linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
submodules: recursive
1818

.github/workflows/run_tests.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ jobs:
1717
- ubuntu-latest
1818
- windows-latest
1919
python-version:
20-
#- "3.8"
21-
- "3.9"
22-
#- "3.10"
20+
- "3.11"
2321
steps:
2422
- name: Checkout Repository
25-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2624
with:
2725
submodules: recursive
2826

@@ -33,12 +31,21 @@ jobs:
3331

3432
- name: Install Dependencies
3533
run: |
36-
pip3 install -r requirements.txt
34+
pip install -r requirements.txt
3735
3836
- name: Install Project
3937
run: |
40-
pip3 install .
38+
pip install .
4139
42-
- name: Run Tests
43-
run:
44-
pytest --no-header -v test
40+
- name: Run tests & coverage
41+
run: |
42+
coverage run -m pytest --no-header -v test
43+
coverage report -m -i
44+
coverage html -i
45+
46+
- name: Archive coverage results
47+
if: startsWith(matrix.os, 'ubuntu')
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: code-coverage-report
51+
path: htmlcov

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Sphinx Build
2+
/doc/_build
3+
14
# Byte-compiled / optimized / DLL files
25
__pycache__/
36
*.py[cod]

build_documentation.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
cd doc
4+
make html

ci_requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
setuptools
2+
packaging
3+
wheel
4+
build
15
pre-commit
26
pytest
7+
sphinx
8+
coverage

doc/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/conf.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
project = 'python-quickstart'
10+
copyright = '2025, Author Name(s)'
11+
author = 'Author Name(s)'
12+
13+
# -- General configuration ---------------------------------------------------
14+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15+
16+
extensions = []
17+
18+
templates_path = ['_templates']
19+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
20+
21+
22+
23+
# -- Options for HTML output -------------------------------------------------
24+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
25+
26+
html_theme = 'alabaster'
27+
html_static_path = ['_static']

doc/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. python-quickstart documentation master file, created by
2+
sphinx-quickstart on Fri Jan 17 13:18:00 2025.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
python-quickstart documentation
7+
===============================
8+
9+
Add your content using ``reStructuredText`` syntax. See the
10+
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
11+
documentation for details.
12+
13+
14+
.. toctree::
15+
:maxdepth: 2
16+
:caption: Contents:
17+

0 commit comments

Comments
 (0)