Skip to content

Commit 0da55c8

Browse files
committed
chore: update GitHub Actions versions and remove broken Safety checks, add docs structure
1 parent 6422476 commit 0da55c8

File tree

4 files changed

+105
-21
lines changed

4 files changed

+105
-21
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838

3939
steps:
4040
- name: Checkout
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
4242

4343
- name: Install uv
44-
uses: astral-sh/setup-uv@v4
44+
uses: astral-sh/setup-uv@v7
4545
with:
4646
enable-cache: true
4747

@@ -72,19 +72,19 @@ jobs:
7272
fi
7373
7474
- name: Upload coverage.xml
75-
uses: actions/upload-artifact@v4
75+
uses: actions/upload-artifact@v5
7676
with:
7777
name: coverage-${{ matrix.python-version }}
7878
path: coverage.xml
7979

8080
- name: Upload coverage HTML
81-
uses: actions/upload-artifact@v4
81+
uses: actions/upload-artifact@v5
8282
with:
8383
name: coverage-html-${{ matrix.python-version }}
8484
path: htmlcov
8585

8686
security:
87-
name: Security Scan (Bandit + Safety)
87+
name: Security Scan (Bandit)
8888
runs-on: ubuntu-latest
8989
needs: test
9090
permissions:
@@ -95,10 +95,10 @@ jobs:
9595

9696
steps:
9797
- name: Checkout
98-
uses: actions/checkout@v4
98+
uses: actions/checkout@v5
9999

100100
- name: Install uv
101-
uses: astral-sh/setup-uv@v4
101+
uses: astral-sh/setup-uv@v7
102102
with:
103103
enable-cache: true
104104

@@ -113,24 +113,16 @@ jobs:
113113
uv run bandit -r python_project_deployment/ -f json -o bandit-report.json || true
114114
uv run bandit -r python_project_deployment/ -f txt
115115
116-
- name: Run Safety (JSON)
117-
run: uv run safety check --json > safety-report.json || true
118-
119116
- name: Apply Bandit threshold
120117
run: uv run python scripts/security_bandit_check.py
121118
continue-on-error: true
122119

123-
- name: Fail on Safety vulnerabilities
124-
run: uv run python scripts/security_safety_check.py
125-
126120
- name: Upload security reports
127121
if: always()
128-
uses: actions/upload-artifact@v4
122+
uses: actions/upload-artifact@v5
129123
with:
130124
name: security-reports
131-
path: |
132-
bandit-report.json
133-
safety-report.json
125+
path: bandit-report.json
134126

135127
docs:
136128
name: Build Documentation
@@ -141,10 +133,10 @@ jobs:
141133

142134
steps:
143135
- name: Checkout
144-
uses: actions/checkout@v4
136+
uses: actions/checkout@v5
145137

146138
- name: Install uv
147-
uses: astral-sh/setup-uv@v4
139+
uses: astral-sh/setup-uv@v7
148140
with:
149141
enable-cache: true
150142

@@ -158,7 +150,7 @@ jobs:
158150
run: uv run sphinx-build -b html docs docs/_build/html
159151

160152
- name: Upload documentation artifacts
161-
uses: actions/upload-artifact@v4
153+
uses: actions/upload-artifact@v5
162154
with:
163155
name: documentation
164156
path: docs/_build/html

docs/conf.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 Project Deployment"
10+
copyright = "2025, Python Project Deployment Contributors"
11+
author = "Python Project Deployment Contributors"
12+
release = "0.1.0"
13+
14+
# -- General configuration ---------------------------------------------------
15+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
16+
17+
extensions = [
18+
"sphinx.ext.autodoc",
19+
"sphinx.ext.napoleon",
20+
"sphinx.ext.viewcode",
21+
]
22+
23+
templates_path = ["_templates"]
24+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
25+
26+
27+
# -- Options for HTML output -------------------------------------------------
28+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
29+
30+
html_theme = "sphinx_rtd_theme"
31+
html_static_path = ["_static"]

docs/index.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Python Project Deployment Documentation
2+
========================================
3+
4+
A modern scaffolding tool for creating new Python packages with best practices built-in.
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Contents:
9+
10+
installation
11+
usage
12+
api
13+
14+
Installation
15+
============
16+
17+
Install using uv (preferred):
18+
19+
.. code-block:: bash
20+
21+
uv venv
22+
uv sync --all-extras
23+
24+
Quick Start
25+
===========
26+
27+
Create a new Python package:
28+
29+
.. code-block:: bash
30+
31+
scaffold-python my_awesome_package /path/to/parent/directory
32+
33+
API Reference
34+
=============
35+
36+
.. automodule:: python_project_deployment
37+
:members:
38+
:undoc-members:
39+
:show-inheritance:
40+
41+
.. automodule:: python_project_deployment.cli
42+
:members:
43+
:undoc-members:
44+
:show-inheritance:
45+
46+
.. automodule:: python_project_deployment.models
47+
:members:
48+
:undoc-members:
49+
:show-inheritance:
50+
51+
.. automodule:: python_project_deployment.scaffolder
52+
:members:
53+
:undoc-members:
54+
:show-inheritance:
55+
56+
Indices and tables
57+
==================
58+
59+
* :ref:`genindex`
60+
* :ref:`modindex`
61+
* :ref:`search`

scripts/security_safety_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def main() -> None:
1010
"""Check safety results for any vulnerabilities."""
1111
report_path = Path("safety-report.json")
1212
if not report_path.exists():
13-
print("No safety-report.json found, skipping.")
13+
print("No safety-report.json found, skipping.")
1414
return
1515

1616
with report_path.open() as f:

0 commit comments

Comments
 (0)