Skip to content

Commit 889cc5f

Browse files
committed
docs: updated documentation
1 parent 45b55e0 commit 889cc5f

4 files changed

Lines changed: 81 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ wheels/
2323
share/python-wheels/
2424
*.egg-info/
2525
.installed.cfg
26+
*.egg-info
2627
*.egg
2728
MANIFEST
2829

.releaserc.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ plugins:
88
- preset: conventionalcommits
99
releaseRules:
1010
- type: feat
11-
release: patch
12-
- type: minor
1311
release: minor
1412
- type: impr
1513
release: patch
@@ -39,9 +37,6 @@ plugins:
3937
- type: feat
4038
section: "Features"
4139
hidden: false
42-
- type: minor
43-
section: "Minor Changes"
44-
hidden: false
4540
- type: impr
4641
section: "Improvements"
4742
hidden: false

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,10 @@ mypy --strict --ignore-missing-imports .
121121
bandit -c pyproject.toml -r -q .
122122
```
123123

124-
### Add new FeatureGroup
125-
Create new directory under `placeholder/feature_groups/` following the `my_plugin/` pattern.
126-
127124
## Related Documentation
128125

129126
Guides for plugin development can be found in mloda-registry:
130127

131128
- https://github.com/mloda-ai/mloda-registry/tree/main/docs/guides/
132129

133-
## Architecture Overview
134-
135-
- [Repository structure and relationships](https://github.com/mloda-ai/mloda-registry/blob/main/docs/architecture/00_repositories.md)
130+
This template includes pre-configured GitHub Actions workflows for testing, security scanning, and automated releases. See the [GitHub Workflows documentation](docs/github-workflows.md) for setup instructions and required secrets.

docs/github-workflows.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# GitHub Workflows
2+
3+
This project uses three GitHub Actions workflows to automate testing, security scanning, and releases.
4+
5+
## Test Workflow
6+
7+
**File:** `.github/workflows/test.yml`
8+
9+
**Triggers:**
10+
- Push to any branch
11+
- Pull request to `main`
12+
13+
**Purpose:** Runs the full test suite using tox across multiple Python versions (3.10, 3.11, 3.12, 3.13). This includes pytest, ruff linting, mypy type checking, and bandit security analysis.
14+
15+
**Requirements:** None. This workflow uses only public GitHub Actions and requires no secrets.
16+
17+
## Security Scan Workflow
18+
19+
**File:** `.github/workflows/security-scan.yaml`
20+
21+
**Triggers:**
22+
- Scheduled: Every Monday at 9:00 AM UTC
23+
- Manual dispatch (can be triggered from any branch)
24+
25+
**Purpose:** Performs CVE vulnerability scanning on the latest published release using pip-audit via tox. The workflow fetches the latest release version from GitHub and scans it for known vulnerabilities.
26+
27+
**Requirements:** None. Uses only the default `GITHUB_TOKEN` with read permissions.
28+
29+
## Release Workflow
30+
31+
**File:** `.github/workflows/release.yaml`
32+
33+
**Triggers:**
34+
- Manual dispatch only
35+
36+
**Purpose:** Automates semantic versioning and publishing. The workflow:
37+
1. Analyzes commits using [semantic-release](https://semantic-release.gitbook.io/) to determine the next version
38+
2. Creates a GitHub release with changelog
39+
3. Updates version in `pyproject.toml`
40+
4. Builds and publishes the package to PyPI
41+
42+
**Requirements:**
43+
- `SEMANTIC_RELEASE_TOKEN` - GitHub Personal Access Token with `repo` write permissions
44+
- `PYPI_API_TOKEN` - PyPI API token for package publishing
45+
46+
**Prerequisites:** Commits must follow the [Conventional Commits](https://www.conventionalcommits.org/) format for semantic-release to determine version bumps:
47+
- `fix:` - Patch release (0.0.x)
48+
- `feat:` - Minor release (0.x.0)
49+
- `feat!:` or `BREAKING CHANGE:` - Major release (x.0.0)
50+
51+
## Setting Up Secrets
52+
53+
To configure the required secrets for the release workflow:
54+
55+
### SEMANTIC_RELEASE_TOKEN
56+
57+
1. Go to GitHub **Settings** > **Developer settings** > **Personal access tokens** > **Tokens (classic)**
58+
2. Click **Generate new token (classic)**
59+
3. Give it a descriptive name (e.g., "semantic-release")
60+
4. Select the `repo` scope (full control of private repositories)
61+
5. Click **Generate token** and copy the token
62+
6. In your repository, go to **Settings** > **Secrets and variables** > **Actions**
63+
7. Click **New repository secret**
64+
8. Name: `SEMANTIC_RELEASE_TOKEN`
65+
9. Value: Paste the token
66+
10. Click **Add secret**
67+
68+
### PYPI_API_TOKEN
69+
70+
1. Log in to [PyPI](https://pypi.org/)
71+
2. Go to **Account settings** > **API tokens**
72+
3. Click **Add API token**
73+
4. Give it a descriptive name and scope it to your project (recommended) or all projects
74+
5. Click **Create token** and copy the token
75+
6. In your repository, go to **Settings** > **Secrets and variables** > **Actions**
76+
7. Click **New repository secret**
77+
8. Name: `PYPI_API_TOKEN`
78+
9. Value: Paste the token (starts with `pypi-`)
79+
10. Click **Add secret**

0 commit comments

Comments
 (0)