RCLCO Python library
Project description
RCLCO Python Library
A Python library for RCLCO.
Installation
Install from PyPI:
pip install rclco
Or using uv:
uv pip install rclco
Development
This project uses uv for dependency management. uv is an extremely fast Python package manager written in Rust that replaces pip, poetry, pyenv, and virtualenv.
Installing uv
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternative (via pip):
pip install uv
After installation, restart your terminal or run refreshenv to ensure uv is available in your PATH.
Getting Started (Full Workflow)
- Clone the repository:
git clone https://github.com/RCLCO-RFA/python-rclco.git
cd python-rclco
- Install all dependencies (including dev dependencies):
uv sync --all-extras
This command will:
- Create a virtual environment in
.venv(if it doesn't exist) - Install all project dependencies
- Install the package in editable mode
- Activate the virtual environment (optional):
uv commands automatically use the virtual environment, but if you want to activate it manually:
# Windows PowerShell
.venv\Scripts\Activate.ps1
# Windows Command Prompt
.venv\Scripts\activate.bat
# macOS/Linux
source .venv/bin/activate
Common uv Commands
| Task | Command |
|---|---|
| Install all dependencies | uv sync |
| Install with dev dependencies | uv sync --all-extras |
| Add a new dependency | uv add <package> |
| Add a dev dependency | uv add --dev <package> |
| Remove a dependency | uv remove <package> |
| Update all dependencies | uv lock --upgrade then uv sync |
| Run a command in the venv | uv run <command> |
| Run Python | uv run python |
| Run tests | uv run pytest |
Adding Dependencies
Add a runtime dependency:
uv add requests
Add a dev-only dependency:
uv add --dev black ruff mypy
Add a dependency with version constraints:
uv add "pandas>=2.0"
After adding dependencies, the pyproject.toml and uv.lock files will be updated automatically. Commit both files to version control.
Running Tests
uv run pytest
To run with verbose output:
uv run pytest -v
Building and Publishing
This project uses tag-based versioning with hatch-vcs. The version is automatically derived from git tags — no need to manually edit version strings in code.
How Versioning Works
- The version is determined by git tags (e.g.,
v0.1.2→ version0.1.2) - During development, the version includes git metadata (e.g.,
0.1.2.dev3+g1234567) - When you build from a tagged commit, you get a clean version (e.g.,
0.1.2)
Creating a Release
-
Ensure all changes are committed and pushed to main
-
Create and push a version tag:
git tag v0.2.0
git push origin v0.2.0
- GitHub Actions automatically:
- Runs all tests
- Builds the package
- Creates a GitHub Release with auto-generated release notes
- Publishes to PyPI
Manual Build (for testing)
Build the package locally:
uv build
This creates distribution files in the dist/ directory.
Publish manually (if needed):
uv publish --token YOUR_PYPI_TOKEN
Setting Up PyPI Publishing (for maintainers)
To enable automatic publishing to PyPI:
-
Create a PyPI API Token:
- Go to https://pypi.org/manage/account/token/
- Create a token scoped to the
rclcoproject - Copy the token (starts with
pypi-)
-
Add the token to GitHub Secrets:
- Go to your repo → Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
PYPI_TOKEN - Value: paste your PyPI token
- Click Add secret
Version Tag Format
Use semantic versioning with a v prefix:
| Tag | Version | Description |
|---|---|---|
v0.1.0 |
0.1.0 | Initial release |
v0.1.1 |
0.1.1 | Patch release (bug fixes) |
v0.2.0 |
0.2.0 | Minor release (new features) |
v1.0.0 |
1.0.0 | Major release (breaking changes) |
Development Workflow Summary
1. Clone repo → git clone ... && cd python-rclco
2. Install deps → uv sync --all-extras
3. Make changes → edit code
4. Add dependencies → uv add <package> or uv add --dev <package>
5. Run tests → uv run pytest
6. Commit changes → git add . && git commit -m "..."
7. Push to branch → git push origin feature-branch
8. Open PR → merge to main after review
9. Create release → git tag v0.2.0 && git push origin v0.2.0
License
See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rclco-0.1.4.tar.gz.
File metadata
- Download URL: rclco-0.1.4.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d04a8c078a1d73e95c993505722be31f3dbfc4c88602d2992fd716ebfbaa25f7
|
|
| MD5 |
740288878583939c5e9b5ebbbe18b96e
|
|
| BLAKE2b-256 |
efb45f2ed629a392fcdace4736cbcd3c7108b41b69a061b3ac5a084f54ddbf28
|
File details
Details for the file rclco-0.1.4-py3-none-any.whl.
File metadata
- Download URL: rclco-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d0eda4f9703467e60d163d8206144b9c4213d349b0d0dcf88b269a960686695
|
|
| MD5 |
b1feacbcaae51a04e0a40058cda1e6f4
|
|
| BLAKE2b-256 |
3d16768a51f589f3eee603caa9b4aabb8d083395b3c68e528806d9b44bae1eb7
|