Skip to content

Commit aa6ee6d

Browse files
chore: finalize 1.0.9 release metadata (#58)
1 parent c10e62f commit aa6ee6d

24 files changed

+260
-100
lines changed

.github/workflows/bump-version.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,26 @@
11
# .github/workflows/bump-version.yml
2-
name: Bump Version on Merge to Main
3-
2+
name: Tag Version on Merge to Main
3+
44
on:
55
push:
66
branches:
77
- main
88

99
jobs:
10-
bump-version:
10+
tag-version:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: write
14-
id-token: write
1514

1615
steps:
1716
- uses: actions/checkout@v4
1817
with:
19-
fetch-depth: 0 # Fetch all history for all branches and tags
18+
fetch-depth: 0
2019

2120
- uses: actions/setup-python@v5
2221
with:
2322
python-version: "3.11"
2423

25-
- name: Install Poetry
26-
run: pip install poetry
27-
28-
- name: Install python-semantic-release
29-
run: pip install python-semantic-release
30-
31-
- name: Configure Git
32-
run: |
33-
git config user.name "github-actions[bot]"
34-
git config user.email "github-actions[bot]@users.noreply.github.com"
35-
36-
- name: Run Semantic Release
37-
env:
38-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: |
40-
# Run semantic-release to get the next version
41-
semantic-release version
24+
- name: Tag repository from pyproject
25+
run: python scripts/check_version_match.py --fix
4226

43-
- name: Push changes
44-
run: |
45-
git push --follow-tags

.github/workflows/ci.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
echo "$HOME/.local/bin" >> $GITHUB_PATH
3030
3131
- name: Install dependencies
32-
run: poetry install
32+
run: poetry install --with dev
3333

3434
- name: Run tests with coverage
3535
run: poetry run pytest --cov=gen_surv --cov-report=xml --cov-report=term
@@ -59,16 +59,7 @@ jobs:
5959
echo "$HOME/.local/bin" >> $GITHUB_PATH
6060
6161
- name: Install dependencies
62-
run: poetry install
62+
run: poetry install --with dev
6363

64-
- name: Run black
65-
run: poetry run black --check gen_surv tests examples
66-
67-
- name: Run isort
68-
run: poetry run isort --check gen_surv tests examples
69-
70-
- name: Run flake8
71-
run: poetry run flake8 gen_surv tests examples
72-
73-
- name: Run mypy
74-
run: poetry run mypy gen_surv
64+
- name: Run pre-commit checks
65+
run: poetry run pre-commit run --all-files

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
echo "$HOME/.local/bin" >> $GITHUB_PATH
2929
3030
- name: Install dependencies
31-
run: poetry install
31+
run: poetry install --with dev
3232

3333
- name: Run tests
3434
run: poetry run pytest --cov=gen_surv --cov-report=xml --cov-report=term

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 24.1.0
4+
hooks:
5+
- id: black
6+
- repo: https://github.com/pycqa/isort
7+
rev: 5.13.2
8+
hooks:
9+
- id: isort
10+
- repo: https://github.com/pycqa/flake8
11+
rev: 6.1.0
12+
hooks:
13+
- id: flake8
14+
- repo: https://github.com/pre-commit/mirrors-mypy
15+
rev: v1.15.0
16+
hooks:
17+
- id: mypy

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CHANGELOG
22

3-
## v1.0.9 (Unreleased)
3+
## v1.0.9 (2025-08-02)
44

55
### Features
66
- export datasets to RDS files
@@ -10,6 +10,10 @@
1010

1111
### Documentation
1212
- updated usage examples and tutorials
13+
- document optional scikit-survival dependency throughout the docs
14+
15+
### Continuous Integration
16+
- auto-tag releases using the version check script
1317

1418
### Misc
1519
- README quick example uses `covariate_range`

CHECKLIST.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# ✅ Python Package Development Checklist
2+
3+
A checklist to ensure quality, maintainability, and usability of your Python package.
4+
5+
---
6+
7+
## 1. Purpose & Scope
8+
9+
- [ ] Clear purpose and use cases defined
10+
- [ ] Scoped to a specific problem/domain
11+
- [ ] Project name is meaningful and not taken on PyPI
12+
13+
---
14+
15+
## 2. Project Structure
16+
17+
- [ ] Uses `src/` layout or appropriate flat structure
18+
- [ ] All package folders contain `__init__.py`
19+
- [ ] Main configuration handled via `pyproject.toml`
20+
- [ ] Includes standard files: `README.md`, `LICENSE`, `.gitignore`, `CHANGELOG.md`
21+
22+
---
23+
24+
## 3. Dependencies
25+
26+
- [ ] All dependencies declared in `pyproject.toml` or `requirements.txt`
27+
- [ ] Development dependencies separated from runtime dependencies
28+
- [ ] Uses minimal, necessary dependencies only
29+
30+
---
31+
32+
## 4. Code Quality
33+
34+
- [ ] Follows PEP 8 formatting
35+
- [ ] Imports sorted with `isort` or `ruff`
36+
- [ ] No linter warnings (`ruff`, `flake8`, etc.)
37+
- [ ] Fully typed using `typing` module
38+
- [ ] No unresolved TODOs or FIXME comments
39+
40+
---
41+
42+
## 5. Function & Module Design
43+
44+
- [ ] Functions are small, pure, and single-responsibility
45+
- [ ] Classes follow clear and simple roles
46+
- [ ] Global state is avoided
47+
- [ ] Public API defined explicitly (e.g. via `__all__`)
48+
49+
---
50+
51+
## 6. Documentation
52+
53+
- [ ] `README.md` includes overview, install, usage, contributing
54+
- [ ] All functions/classes include docstrings (Google/NumPy style)
55+
- [ ] API reference documentation auto-generated (e.g., Sphinx, MkDocs)
56+
- [ ] Optional: `docs/` folder for additional documentation or site generator
57+
58+
---
59+
60+
## 7. Testing
61+
62+
- [ ] Unit and integration tests implemented
63+
- [ ] Test coverage > 80% verified by `coverage`
64+
- [ ] Tests are fast and deterministic
65+
- [ ] Continuous Integration (CI) configured to run tests
66+
67+
---
68+
69+
## 8. Versioning & Releases
70+
71+
- [ ] Uses semantic versioning (MAJOR.MINOR.PATCH)
72+
- [ ] Git tags created for releases
73+
- [ ] `CHANGELOG.md` updated with each release
74+
- [ ] Local build verified (`poetry build`, `hatch build`, or equivalent)
75+
- [ ] Can be published to PyPI and/or TestPyPI
76+
77+
---
78+
79+
## 9. CLI or Scripts (Optional)
80+
81+
- [ ] CLI entrypoint works correctly (`__main__.py` or `entry_points`)
82+
- [ ] CLI provides helpful messages (`--help`) and handles errors gracefully
83+
84+
---
85+
86+
## 10. Examples / Tutorials
87+
88+
- [ ] Usage examples included in `README.md` or `examples/`
89+
- [ ] Optional: Jupyter notebooks with demonstrations
90+
- [ ] Optional: Colab or Binder links for live usage
91+
92+
---
93+
94+
## 11. Licensing & Attribution
95+
96+
- [ ] LICENSE file included (MIT, Apache 2.0, GPL, etc.)
97+
- [ ] Author and contributors credited in `README.md`
98+
- [ ] Optional: `CITATION.cff` file for academic citation
99+
100+
---
101+
102+
> You can duplicate this file for each new package or use it as a GitHub issue template for release checklists.

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ message: "If you use this software, please cite it using the metadata below."
55
preferred-citation:
66
type: software
77
title: "gen_surv"
8-
version: "1.0.8"
8+
version: "1.0.9"
99
url: "https://github.com/DiogoRibeiro7/genSurvPy"
1010
authors:
1111
- family-names: Ribeiro
@@ -15,5 +15,5 @@ preferred-citation:
1515
affiliation: "ESMAD - Instituto Politécnico do Porto"
1616
1717
license: "MIT"
18-
date-released: "2024-01-01"
18+
date-released: "2025-08-02"
1919

CONTRIBUTING.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ Thank you for taking the time to contribute to **gen_surv**! This document provi
55
## Getting Started
66

77
1. Fork the repository and create your feature branch from `main`.
8-
2. Install dependencies with `poetry install`.
9-
3. Ensure the test suite passes with `poetry run pytest`.
10-
4. If you add a feature or fix a bug, update `CHANGELOG.md` accordingly.
8+
2. Install dependencies with `poetry install --with dev`.
9+
This installs all packages needed for development, including
10+
the optional dependency `scikit-survival`.
11+
On Debian/Ubuntu you may need `build-essential gfortran libopenblas-dev`
12+
to build it.
13+
3. Run `pre-commit install` to enable style checks and execute them with `pre-commit run --all-files`.
14+
4. Ensure the test suite passes with `poetry run pytest`.
15+
5. If you add a feature or fix a bug, update `CHANGELOG.md` accordingly.
1116

1217
## Version Consistency
1318

LICENCE renamed to LICENSE

File renamed without changes.

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,23 @@ To develop locally with all extras:
3636
```bash
3737
git clone https://github.com/DiogoRibeiro7/genSurvPy.git
3838
cd genSurvPy
39-
poetry install
39+
# Install runtime and development dependencies
40+
# (scikit-survival is optional but required for integration tests).
41+
# On Debian/Ubuntu you may need ``build-essential gfortran libopenblas-dev`` to
42+
# build scikit-survival.
43+
poetry install --with dev
44+
```
45+
46+
Integration tests that rely on scikit-survival are automatically skipped if the
47+
package is not installed.
48+
49+
## Development Setup
50+
51+
Before committing changes, install the pre-commit hooks:
52+
53+
```bash
54+
pre-commit install
55+
pre-commit run --all-files
4056
```
4157

4258
## Quick Example
@@ -108,7 +124,7 @@ Open `build/html/index.html` in your browser to view the result.
108124

109125
## License
110126

111-
This project is licensed under the MIT License. See [LICENCE](LICENCE) for details.
127+
This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
112128

113129
## Citation
114130

0 commit comments

Comments
 (0)