Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# Use bd merge for beads JSONL files
.beads/issues.jsonl merge=beads
35 changes: 11 additions & 24 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package
name: Publish to PyPI

on:
release:
types: [created]

jobs:
deploy:

runs-on: self-hosted

publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Build package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
38 changes: 17 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
name: Run tests

on: [push]
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
example-1:
name: Testing (${{ matrix.python-version }}, ${{ matrix.os }})
test:
name: Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
os: [ubuntu-latest]
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check repo out
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run tests
shell: bash -l {0}
run: |
pytest -vv
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --extra dev --extra api
- name: Run tests
run: uv run pytest -vv
40 changes: 31 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
ORC_VPP_2019.pdf
sphinx/_build/
src/__pycache__/
dev.py
venv
.vscode
# Python
__pycache__/
*.pyc
*.pyo
*.egg-info/
dist/
build/

# Environments
.venv/
venv/

# IDE
.vscode/
.idea/

# Sphinx
sphinx/_build/

# pytest
.pytest_cache/

# Claude Code
.claude/
CLAUDE.md
AGENTS.md
.beads/

# Project
ORC_VPP_2019.pdf
dev.py
/.pytest_cache
/__pycache__/
.pytest_cache

.playwright-cli/
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,16 @@ Follow the steps below to contribute to this project.

### Install dependencies

Install the required dependencies from the `requirements.txt` file.
Install the project using [uv](https://docs.astral.sh/uv/):

If using `pip` then `pip install requirements.txt`.
```bash
uv sync --extra dev
```

If using `conda` then follow these steps to create an environment with the right dependencies:
If using `pip`:

```bash
conda create --name Python-VPP \
&& conda config --add channels conda-forge \
&& conda activate Python-VPP \
&& conda install -y --file requirements.txt
pip install -e ".[dev]"
```

### Run tests
Expand Down
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[project]
name = "python-vpp"
version = "0.0.2"
description = "OOP Velocity Prediction Program"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
{ name = "Marin Lauber", email = "M.Lauber@soton.ac.uk" },
{ name = "Otto Villani" },
{ name = "Thomas Dickson" },
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=2.0",
"matplotlib>=3.8",
"scipy>=1.12",
"tqdm>=4.66",
"flask",
"streamlit>=1.37",
"plotly>=6.6.0",
]

[project.optional-dependencies]
api = ["flask"]
demo = ["streamlit>=1.37"]
dev = [
"pytest",
"ruff",
"mypy",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src"]

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.ruff]
line-length = 100

[tool.ruff.lint]
select = ["E", "F", "I", "W"]
Loading