Skip to content
Merged
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
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Install current project
run: pip install -e .
version: "latest"

- name: Run tests
run: |
pytest --cov=gbox --plots --cov-report=xml
uv run --group dev-dependencies pytest --cov=gbox --plots --cov-report=xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.9" # or your target version

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
version: "latest"

- name: Build the package
run: |
python -m build
uv build

- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
UV_PUBLISH_USERNAME: __token__
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m twine upload dist/*
uv publish
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
38 changes: 36 additions & 2 deletions READme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# gbox:: Geometry Box

[![codecov](https://codecov.io/gh/338rajesh/gbox/graph/badge.svg?token=OAWTURJG28)](https://codecov.io/gh/338rajesh/gbox)
[![codecov](https://codecov.io/gh/338rajesh/gbox/graph/badge.svg)](https://codecov.io/gh/338rajesh/gbox)
[![Documentation Status](https://readthedocs.org/projects/gbox/badge/?version=latest)](https://gbox.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://github.com/338rajesh/gbox/actions/workflows/ci.yml/badge.svg)](https://github.com/yourusername/yourrepo/actions)
[![Build Status](https://github.com/338rajesh/gbox/actions/workflows/ci.yml/badge.svg)](https://github.com/338rajesh/gbox/actions)

A simple Python package for working with geometry related operations.
See documentation at [gbox.readthedocs.io](https://gbox.readthedocs.io)
Expand Down Expand Up @@ -31,3 +31,37 @@ circle = Circle(5.0, point)
- Implement `__hash__` and `__eq__` for using points in sets and dicts
- Stick to numpy for now. Try with Numba in later releases.
- Use just `PointND` and `PointArrayND`, instead of `1D`, `2D`, `3D` etc.

## For Developers

### Install dependencies

Started using [uv](https://docs.astral.sh/uv/) for Python Package and Project management.

```bash
uv sync
```

### Add New dependencies

```bash
uv add package==version
```

### Add Dev-Dependency

```bash
uv add --group dev-dependencies dev-package==version
```

### Run Tests

```bash
uv run --group dev-dependencies pytest --cov=gbox tests/
```

> Check [uv](https://docs.astral.sh/uv/)'s documentation for more details




9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ requires = ["setuptools>=61.0", "wheel"] # Minimum versions of required build t
build-backend = "setuptools.build_meta"

[project]
requires-python = ">=3.11"
name = "gbox"
version = "0.2.0"
description = "A convenience package for geometry related operations"
Expand All @@ -22,10 +23,16 @@ classifiers = [
]
dependencies = [
"numpy==2.2.0",
"matplotlib==3.10.0",
"matplotlib==3.10.0",
"scipy==1.15.2",
]

[project.urls]
documentation = "https://gbox.readthedocs.io"
repository = "https://github.com/338rajesh/gbox"

[dependency-groups]
dev-dependencies = [
"pytest>=8.4.1",
"pytest-cov==6.0.0",
]
16 changes: 0 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
attrs==24.3.0
contourpy==1.3.1
coverage==7.6.9
cycler==0.12.1
fonttools==4.55.3
hypothesis==6.123.1
iniconfig==2.0.0
kiwisolver==1.4.7
matplotlib==3.10.0
numpy==2.2.0
packaging==24.2
pillow==11.0.0
pluggy==1.5.0
pyparsing==3.2.0
pytest==8.3.4
pytest-cov==6.0.0
python-dateutil==2.9.0.post0
six==1.17.0
sortedcontainers==2.4.0
Loading