Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0f01947
feat: add pre-commit-config.yaml
SiegeSailor Nov 8, 2025
f290c22
docs: update links in README.md
SiegeSailor Nov 8, 2025
1884b2e
feat: update pre-commit configuration
SiegeSailor Nov 8, 2025
21b8534
feat: add the lint dependency group
SiegeSailor Nov 8, 2025
5cd8336
docs: update local environment instruction
SiegeSailor Nov 8, 2025
dab335e
fix: format release commit message format
SiegeSailor Nov 8, 2025
fff15be
docs: update CONTRIBUTING.md
SiegeSailor Nov 8, 2025
3e36abc
chore: test pre-commit with semantic-release
SiegeSailor Nov 9, 2025
96d826f
feat: remove semantic-release pre-commit and add commitlint back
SiegeSailor Nov 9, 2025
f29cf3f
docs: add Apache License 2.0
SiegeSailor Nov 9, 2025
06a3ed6
docs: add FUNDING.yml with GitHub sponsor
SiegeSailor Nov 9, 2025
0f96829
docs: update SECURITY.md
SiegeSailor Nov 9, 2025
7cdaf1c
ci: add commitizen for PR title and use PAT for semantic-release
SiegeSailor Nov 9, 2025
9d6c3b2
fix: add PR if condition and remove paths-ignore
SiegeSailor Nov 9, 2025
e5aaeea
fix: reorder linting steps and update semantic release identifiers
SiegeSailor Nov 9, 2025
2a03d3c
fix: set ignore_token_for_push to true in releaserc.toml
SiegeSailor Nov 9, 2025
a66ec31
ci: use PERSONAL_ACCESS_TOKEN_ADMIN for remote.token
SiegeSailor Nov 9, 2025
35c77cd
fix: update token format in releaserc.tom
SiegeSailor Nov 9, 2025
6ed3376
ci: name a person for semantic-release
SiegeSailor Nov 9, 2025
7cee682
ci: use GitHub App to authenticate PSR
SiegeSailor Nov 9, 2025
a18962f
ci: increase verbosity level for semantic release action
SiegeSailor Nov 9, 2025
2bc3afd
ci: use GitHub App token for all release steps
SiegeSailor Nov 9, 2025
7fd3c83
ci: decrease verbosity level for semantic release action
SiegeSailor Nov 9, 2025
0839cea
chore: release 1.0.0-release.8
Nov 9, 2025
2c40036
Merge branch 'main' into release
SiegeSailor Nov 9, 2025
3f83a3d
feat: add commitlint for linting commit messages
SiegeSailor Nov 9, 2025
b175ac6
fix: update links and formatting in documentation
SiegeSailor Nov 9, 2025
b93ff26
chore: release 1.1.0-release.1
Nov 9, 2025
5e33d40
fix: update pull request event types and condition
SiegeSailor Nov 9, 2025
271fa11
fix: correct typo in security policy document
SiegeSailor Nov 9, 2025
7dde655
fix: add condition to validate PR title step
SiegeSailor Nov 9, 2025
e2427d2
chore: release 1.1.0-release.2
Nov 9, 2025
29f8415
ci: update PR title handling
SiegeSailor Nov 9, 2025
a46461f
ci: add checkout step in linting
SiegeSailor Nov 9, 2025
2bf27ae
ci: add condition to checkout and commit PR title
SiegeSailor Nov 9, 2025
420b37a
ci: update checkout step to use pull request head SHA
SiegeSailor Nov 9, 2025
b8f1514
ci: enhance checkout step in linting
SiegeSailor Nov 9, 2025
bce1cb5
ci: refine pull request checkout and commit title handling
SiegeSailor Nov 9, 2025
f42b8da
ci: update checkout action to version 5
SiegeSailor Nov 9, 2025
0a453ca
ci: install commitlint to verify PR title
SiegeSailor Nov 9, 2025
8449315
ci: use Poetry for commitlint
SiegeSailor Nov 9, 2025
cc3bf9f
docs: add setup instructions for in README.md
SiegeSailor Nov 9, 2025
96300dd
ci: remove commented-out steps
SiegeSailor Nov 9, 2025
cfa4376
ci: update fetch-depth for checkout and install commitlint via pip
SiegeSailor Nov 9, 2025
6b2a788
ci: use semantic versions for actions
SiegeSailor Nov 9, 2025
c5fb8ae
docs: update CONTRIBUTING.md time tense
SiegeSailor Nov 9, 2025
d0f139e
docs: update branching strategy and flowchart
SiegeSailor Nov 10, 2025
beea33d
docs: add badges for Conventional Commits and Continuous Delivery
SiegeSailor Apr 12, 2026
a557f1a
ci: update commitlint version to v1.13.3
SiegeSailor Apr 12, 2026
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
35 changes: 24 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Contributing

Thank you for investing your time in contributing to this project. Please take a moment to read through [Setting Up a Local Environment](./../README.md#setting-up-a-local-environment) to ensure you have the necessary tools and dependencies installed. If you are new to contributing to open source projects, the following resources may be helpful:
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)

Thank you for investing your time in contributing to this project. If you are new to contributing to open source projects, the following resources may be helpful:

- [Set up Git](https://docs.github.com/en/get-started/git-basics/set-up-git)
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
Expand All @@ -9,29 +11,40 @@ Thank you for investing your time in contributing to this project. Please take a
> [!Note]
> Signing commits is mandatory for this project.

### Branching Strategy
## Setting Up a Development Environment

Please take a moment to read through [Setting Up a Local Environment](./../README.md#setting-up-a-local-environment) to ensure you have the necessary tools and dependencies installed. Once we have your local environment configured, install the development dependencies with:

```shell
poetry install --with dev
```

## Branching Strategy

This project follows a modified GitHub flow that only focuses on two branches:

- `main`: Where the stable and ready-to-use code resides
- `release`: Where the code is prepared for the next production release
- `develop`: Where the latest development changes are integrated before being merged into `release`

```mermaid
flowchart TB
OB[Other Branches] --> PR1[Pull Request]
PR1 --> R(release)
R --> PR2[Pull Request]
PR2 --> M(main)
OB(Other Branches) -->|pull request| D(develop)
D --> |pull request| R(release)
R --> |pull request| M(main)

R -->|push| Prerelease[/Prerelease/]
M -->|push| Release[/Release/]
R -->|push or pull request| Prerelease[/Prerelease/]
M -->|push or pull request| Release[/Release/]
```

### Release Process

The release process has been automated using [Python Semantic Release](https://python-semantic-release.readthedocs.io/en/latest/) to ensure that all commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), and the relevant constraints are defined in the [releaserc.toml](./../releaserc.toml) file and [GitHub Settings Rules](https://github.com/SiegeSailor/Smarty-Notebook/settings/rules). The releases and prereleases should be versioned well following [Branching Strategy](#branching-strategy). Note that there are no build, test, package, and publish steps for this project, as it only contains Jupyter Notebooks.

#### Commitlint

This project uses [Commitlint](https://commitlint.js.org/) to ensure that all commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. It is recommended to have `pre-commit` installed on your local end before pushing commits. Please make sure you already [Set Up a Local Environment](./../README.md#setting-up-a-local-environment) before running the following command:
It is recommended to have `pre-commit` installed on your local end before pushing commits. Please make sure you already [Set Up a Development Environment](#setting-up-a-development-environment) before running the following command:

```shell
pip install pre-commit
pre-commit install --hook-type commit-msg
pre-commit install
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit install relies on pre-commit being on PATH. Since the instructions install it via Poetry, it’s safer to either instruct users to enter poetry shell first or run poetry run pre-commit install so the command works without extra steps.

Suggested change
pre-commit install
poetry run pre-commit install

Copilot uses AI. Check for mistakes.
```
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: SiegeSailor
5 changes: 4 additions & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Security Policy

This project generates releases and prereleases according to the current ongoing branch. For more information, please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md#branching-strategy).
This project generates releases and prereleases according to the current ongoing branch. For more information, please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md#branching-strategy). The `main` branch always contains the latest stable release code. However, it is out of scope for this project to cover the latest changes and security patches from [Smarty Cloud API](https://www.smarty.com/docs/cloud) as we currently don't have the dedicated Smarty API keys, we cannot have regular tests in our pipeline.

> [!Tip]
> Sponsor me to help me acquire the necessary API keys to implement regular testing and security patches for the latest changes from [Smarty Cloud API](https://www.smarty.com/docs/cloud). See [GitHub Become a Sponsor to Jin Yu Zhang](https://github.com/sponsors/SiegeSailor).

## Reporting a Vulnerability

Expand Down
80 changes: 56 additions & 24 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,80 @@ on:
branches:
- main
- release
paths-ignore:
- "./.github/CODE_OF_CONDUCT.md"
- "./.github/CONTRIBUTING.md"
- "./.github/GOVERNANCE.md"
- "./.github/ISSUE_TEMPLATE/*"
- "./.github/pull_request_template.md"
- "./.github/SECURITY.md"
- "./.github/SUPPORT.md"
- "./images/*"
- "./README.md"
pull_request:
branches:
- main
- release
types:
- edited
- opened
- reopened
- synchronize

permissions:
contents: read

jobs:
commitlint:
linting:
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: read

steps:
- name: Action | Run Conventional Commitlint
uses: opensource-nepal/commitlint@v1
- name: Action | Checkout Repository on Pull Request
uses: actions/checkout@v5.0.0
if: github.event_name == 'pull_request'
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Action | Set Up Python
uses: actions/setup-python@v6.0.0
if: github.event_name == 'pull_request'
with:
python-version: 3.11.13

- name: Setup | Install Commitlint
if: github.event_name == 'pull_request'
run: |
pip install commitlint
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install commitlint will install the latest available commitlint at runtime, which can change behavior over time and make CI non-reproducible. Prefer pinning the version (e.g., align with poetry.lock) or installing via Poetry dependency groups so CI uses the locked version.

Suggested change
pip install commitlint
python -m pip install commitlint==1.3.0

Copilot uses AI. Check for mistakes.

- name: Evaluate | Validate PR Title
if: github.event_name == 'pull_request'
run: |
commitlint "${{ github.event.pull_request.title }}"

- name: Action | Validate Commit Messages
uses: opensource-nepal/commitlint@v1.13.3

Comment on lines +54 to 56
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says this update is just bumping commitlint in the workflow, but this PR also changes release configuration, dependency management (Poetry dependency groups), docs, and adds/updates multiple repository meta files (LICENSE/FUNDING/SECURITY/CHANGELOG). Please update the PR description/scope to reflect the full set of changes, or split into focused PRs.

Copilot uses AI. Check for mistakes.
release:
runs-on: ubuntu-latest
needs: linting
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref_name }}
Comment on lines 57 to 61
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow now runs on pull_request events (see the on.pull_request trigger), but the release job has no job-level condition and will also run for PRs. On PRs, github.ref_name refers to a PR ref (e.g., 123/merge) and the job performs write operations (releases/tags), which is unsafe and likely to fail. Add a job-level if: github.event_name == 'push' (or move PR linting into a separate workflow) so releases only run on intended pushes.

Copilot uses AI. Check for mistakes.
cancel-in-progress: false

permissions:
contents: write
pull-requests: write

steps:
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@v4
- name: Action | Create GitHub App Token
uses: actions/create-github-app-token@v2.1.4
id: action-create-github-app-token
with:
app-id: ${{ vars.APP_ID_GITHUB_APP_BYPASS_RULESETS }}
private-key: ${{ secrets.PRIVATE_KEY_GITHUB_APP_BYPASS_RULESETS }}

- name: Action | Checkout Repository on Release Branch
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.action-create-github-app-token.outputs.token }}

- name: Setup | Force Release Branch to be at Workflow SHA
run: |
Expand Down Expand Up @@ -84,33 +116,33 @@ jobs:

printf '%s\n' "Verified upstream branch has not changed, continuing with release..."

- name: Bundle | Prepare Artifacts
- name: Build | Compress Artifacts
run: |
zip -r notebooks.zip ./notebooks/

- name: Action | Create Semantic Version Release
id: release
id: python-semantic-release-release
uses: python-semantic-release/python-semantic-release@v10.4.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.action-create-github-app-token.outputs.token }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
config_file: "./releaserc.toml"
verbosity: 1

- name: Action | Publish to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.4.1
if: steps.release.outputs.released == 'true'
if: steps.python-semantic-release-release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
github_token: ${{ steps.action-create-github-app-token.outputs.token }}
tag: ${{ steps.python-semantic-release-release.outputs.tag }}

- name: Action | Upload Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5.0.0
with:
name: notebooks
path: "./notebooks/"
if-no-files-found: error

outputs:
released: ${{ steps.release.outputs.released || 'false' }}
released: ${{ steps.python-semantic-release-release.outputs.released || 'false' }}
111 changes: 111 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,117 @@

<!-- version list -->

## v1.1.0-release.2 (2025-11-09)

### Bug Fixes

- Add condition to validate PR title step
([`7dde655`](https://github.com/SiegeSailor/Smarty-Notebook/commit/7dde655d6ae5af136278b174efe572fa546076fb))

- Correct typo in security policy document
([`271fa11`](https://github.com/SiegeSailor/Smarty-Notebook/commit/271fa115fb45d2fbce71647e26c1dc387e45c3e4))

- Update pull request event types and condition
([`5e33d40`](https://github.com/SiegeSailor/Smarty-Notebook/commit/5e33d408c4b2a53adeb386063a2d07017c753b3b))


## v1.1.0-release.1 (2025-11-09)

### Bug Fixes

- Update links and formatting in documentation
([`b175ac6`](https://github.com/SiegeSailor/Smarty-Notebook/commit/b175ac6114a3c6c0c669c068c0454b0267f1c6a9))

### Features

- Add commitlint for linting commit messages
([`3f83a3d`](https://github.com/SiegeSailor/Smarty-Notebook/commit/3f83a3d5930c7ae17cfa1cb9cf3e01965510e191))


## v1.0.0-release.8 (2025-11-09)

### Bug Fixes

- Add PR if condition and remove paths-ignore
([`9d6c3b2`](https://github.com/SiegeSailor/Smarty-Notebook/commit/9d6c3b2a75c53a6454e007c46ea869c73a5c03f3))

- Format release commit message format
([`dab335e`](https://github.com/SiegeSailor/Smarty-Notebook/commit/dab335e787d157f203395842bf2e2f70c04e9623))

- Reorder linting steps and update semantic release identifiers
([`e5aaeea`](https://github.com/SiegeSailor/Smarty-Notebook/commit/e5aaeeac16fde4a5f1ba13b158f973e5e3f94208))

- Set ignore_token_for_push to true in releaserc.toml
([`2a03d3c`](https://github.com/SiegeSailor/Smarty-Notebook/commit/2a03d3cd82c90fd5c6361c9c832275713a201f1a))

- Update token format in releaserc.tom
([`35c77cd`](https://github.com/SiegeSailor/Smarty-Notebook/commit/35c77cd014f9ee599c9dfce0c6058acf5a44965a))

### Chores

- Test pre-commit with semantic-release
([`3e36abc`](https://github.com/SiegeSailor/Smarty-Notebook/commit/3e36abc8549ab85b95fee51e47c2739f9500ca37))

### Continuous Integration

- Add commitizen for PR title and use PAT for semantic-release
([`7cdaf1c`](https://github.com/SiegeSailor/Smarty-Notebook/commit/7cdaf1c0adadab328c05e603f7f5c767ed5a9968))

- Decrease verbosity level for semantic release action
([`7fd3c83`](https://github.com/SiegeSailor/Smarty-Notebook/commit/7fd3c837c88ef59fa34a9a4758e710ddf79dab13))

- Increase verbosity level for semantic release action
([`a18962f`](https://github.com/SiegeSailor/Smarty-Notebook/commit/a18962f0bed21a66a44444b5a5584af71a33f4c4))

- Name a person for semantic-release
([`6ed3376`](https://github.com/SiegeSailor/Smarty-Notebook/commit/6ed3376b26e8ad93151a87129e1fac5c87b917a1))

- Use GitHub App to authenticate PSR
([`7cee682`](https://github.com/SiegeSailor/Smarty-Notebook/commit/7cee6826b871b9bf6d51bd6356f8d173c91167c5))

- Use GitHub App token for all release steps
([`2bc3afd`](https://github.com/SiegeSailor/Smarty-Notebook/commit/2bc3afd45a250dc19ad009cac8797e3146d7da27))

- Use PERSONAL_ACCESS_TOKEN_ADMIN for remote.token
([`a66ec31`](https://github.com/SiegeSailor/Smarty-Notebook/commit/a66ec315ece0da75a64bd23da12c29605d497beb))

### Documentation

- Add Apache License 2.0
([`f29cf3f`](https://github.com/SiegeSailor/Smarty-Notebook/commit/f29cf3fdafccce24a1ec478c5f19a1f1844d69c1))

- Add FUNDING.yml with GitHub sponsor
([`06a3ed6`](https://github.com/SiegeSailor/Smarty-Notebook/commit/06a3ed66e969df2e35899cc9225aaff4c16981c8))

- Update CONTRIBUTING.md
([`fff15be`](https://github.com/SiegeSailor/Smarty-Notebook/commit/fff15be51e5f69043bd3243d3a0e617e2be0b213))

- Update dependencies format
([`7451f61`](https://github.com/SiegeSailor/Smarty-Notebook/commit/7451f610077cdbcdf7e5796d1fa76765460b4d24))

- Update links in README.md
([`f290c22`](https://github.com/SiegeSailor/Smarty-Notebook/commit/f290c2283b6c2aa32eeaa09b19de0c3474530c63))

- Update local environment instruction
([`5cd8336`](https://github.com/SiegeSailor/Smarty-Notebook/commit/5cd83366df5cbb71467d5feb5f1a7ec89bd399d6))

- Update SECURITY.md
([`0f96829`](https://github.com/SiegeSailor/Smarty-Notebook/commit/0f9682918f009e4e7ab84c71c26804d1cce9069b))

### Features

- Add pre-commit-config.yaml
([`0f01947`](https://github.com/SiegeSailor/Smarty-Notebook/commit/0f01947f271c4252fb40db6ec65d6ae45670652e))

- Add the lint dependency group
([`21b8534`](https://github.com/SiegeSailor/Smarty-Notebook/commit/21b8534f58838b7ba8851adcb0066c13cace3a14))

- Remove semantic-release pre-commit and add commitlint back
([`96d826f`](https://github.com/SiegeSailor/Smarty-Notebook/commit/96d826f7091a7b7d278112252fdbb383f6595e70))

- Update pre-commit configuration
([`1884b2e`](https://github.com/SiegeSailor/Smarty-Notebook/commit/1884b2efc3208066887aa583e63d9aee13aa2d04))

## v1.0.0 (2025-11-05)

### Documentation
Expand Down
Loading
Loading