Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
9 changes: 0 additions & 9 deletions .bumpversion.cfg

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/deploy_mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install -e .[doc]

run: uv sync --group doc

- name: Build the MkDocs site
run: mkdocs build
run: uv run mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/deploy_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build

- name: Build the package
run: |
python -m build
- name: Build package
run: uv build
Comment thread
coatet marked this conversation as resolved.
Outdated

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

- name: Extract package version
id: package_version
run: |
echo "PACKAGE_VERSION=$(python setup.py --version)" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$(python -c 'from rdsa_utils import __version__; print(__version__)')" >> $GITHUB_ENV

- name: Bump version and push tag
id: tag_version
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pull_request_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install -e .[dev]
run: uv sync --group dev

- name: Run tests
run: pytest
run: uv run pytest
3 changes: 0 additions & 3 deletions .isort.cfg

This file was deleted.

15 changes: 5 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,19 @@ repos:
- id: check-yaml
- id: check-toml
- id: debug-statements

- repo: https://github.com/psf/black
rev: 24.10.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
hooks:
- id: black
- id: ruff-format
- id: ruff
args: ["--fix"]

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
hooks:
- id: ruff
args: ["--config", ".ruff.toml"]

- repo: https://github.com/gitleaks/gitleaks
rev: v8.23.1
hooks:
Expand Down
43 changes: 0 additions & 43 deletions .ruff.toml

This file was deleted.

15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.17.0] - 2026-05-08

### Added

### Changed

- Switched build system from setuptools to uv with hatchling backend.
- Consolidated `setup.cfg`, `setup.py`, `.ruff.toml`, `.isort.cfg`, and `.bumpversion.cfg` into a single `pyproject.toml`.
- Updated all GitHub Actions workflows (`deploy_pypi.yaml`, `pull_request_workflow.yaml`, `deploy_mkdocs.yaml`) to use uv.
- Replaced black and isort pre-commit hooks with ruff-format.
- Updated `contribution_guide.md` and `branch_and_deploy_guide.md` to reflect uv-based workflow.
- Bumped `ons-mkdocs-theme` minimum version from `>=1.1.3` to `>=1.2.4` and added Python version markers to doc dependencies.
### Deprecated

### Fixed

### Removed
- Removed `setup.cfg`, `setup.py`, `.bumpversion.cfg`, `.ruff.toml`, and `.isort.cfg` (consolidated into `pyproject.toml`).
- Removed `bump2version`, `black`, and `isort` from dev dependencies (replaced by uv version management and ruff).

## [0.16.1] - 2026-02-19

Expand Down
8 changes: 4 additions & 4 deletions docs/branch_and_deploy_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ and improvements are merged.
3. **Version Bumping**:
- Before merging `development` into `main`, update the package version.
[Follow semantic versioning principles (MAJOR.MINOR.PATCH).](https://semver.org/)
- Use `bump2version` to bump `rdsa-utils` package version.
Example: `bump2version patch` (for a patch update),
`bump2version minor` (for a minor update),
or `bump2version major` (for a major update).
- Update the version in `rdsa_utils/__init__.py` directly, or use
`uv version` to check the current version.
Example: edit `__version__ = "X.Y.Z"` in `rdsa_utils/__init__.py`
following semantic versioning (patch, minor, or major increment as appropriate).

4. **Merging to Main**:
- After a set of features is finalised in the `development` branch, and
Expand Down
28 changes: 14 additions & 14 deletions docs/contribution_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,28 @@ cd rdsa-utils

### Set Up the Development Environment

We use a traditional `setup.py` approach for managing dependencies. To set up your development environment, first, ensure you have Python 3.8 to 3.13 installed.
We use [uv](https://docs.astral.sh/uv/) for dependency management and builds. To set up your development environment, first, ensure you have Python 3.8 to 3.13 installed.

Then, to install the package in editable mode along with all development dependencies, run the following command:
1. **Install uv** (if you haven't already):

```bash
pip3 install -e .[dev]
pip install uv
```

The `-e` (or `--editable`) option is used to install the package in a way that allows you to modify the source code and see the changes directly without having to reinstall the package. This is particularly useful for development.
2. **Sync the project with dev dependencies**:

```bash
uv sync --group dev
```

This will create a virtual environment and install all dependencies (including development tools) in one step.

### Running Tests

To run tests, ensure you're in the top-level directory of the project and execute:

```bash
pytest
uv run pytest
```

This will run all the tests using the configurations set in the project.
Expand All @@ -227,16 +233,10 @@ Pre-commit hooks are used to automate checks and formatting before commits. Foll

#### Installation Steps

1. **Install pre-commit**: If you haven't already, install the pre-commit package:

```bash
pip install pre-commit
```

2. **Install pre-commit hooks**: Install the hooks defined in `.pre-commit-config.yaml`:
1. **Install pre-commit hooks**: Install the hooks defined in `.pre-commit-config.yaml`:

```bash
pre-commit install
uv run pre-commit install
```

This sets up the hooks to run automatically before each commit.
Expand All @@ -246,7 +246,7 @@ pre-commit install
The pre-commit hooks will automatically run on your modified files whenever you commit. To manually run all hooks on all files, use:

```bash
pre-commit run --all-files
uv run pre-commit run --all-files
```

This can be useful for checking your codebase.
Expand Down
Loading
Loading