Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
sudo apt-get install libgeos-dev
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f setup.py ]; then pip install -e .; fi
uv sync
uv add --dev flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest .
uv run python -m pytest .
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Only `PURE_MICROTRANSIT` trips are converted to GOFS format.

### Installation
```bash
python -m pip install -e .
uv sync
```

### Running Tests
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Tool to convert GTFS-Flex data to the GOFS-lite format

To install:
* `python -m pip install -e .`
* `uv sync`

To run test:
* `python -m pytest .`
* `uv run python -m pytest .`

You can use `createTests.sh` to regenerate the test.

To deploy a new version, run:
```
rm -r dist/
python setup.py sdist bdist_wheel
uv build
TWINE_USERNAME=transit TWINE_REPOSITORY_URL=https://pypi.transitapp.com:443 TWINE_PASSWORD=[PASSWORD] twine upload dist/*
```

Expand Down
34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "GTFS-flex-to-GOFS-lite"
version = "0.4.1"
description = "Convert GTFS Flex to GOFS lite"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Nicholas Paun"},
{name = "Jonathan Milot"}
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.8"
dependencies = [
"py-gtfs-loader @ git+https://github.com/transitapp/py-gtfs-loader@v0.1.15",
"shapely>=2.0.4",
"pytest"
]

[project.urls]
Homepage = "https://github.com/TransitApp/GTFS-flex-to-GOFS-lite"
Repository = "https://github.com/TransitApp/GTFS-flex-to-GOFS-lite"

[tool.setuptools.packages.find]
include = ["gtfs_flex_to_gofs_lite*"]

[project.scripts]
gtfs-flex-to-gofs-lite = "gtfs_flex_to_gofs_lite.__main__:main"
15 changes: 0 additions & 15 deletions setup.py

This file was deleted.

Loading
Loading