Skip to content

Commit

Permalink
Merge pull request #35 from hugovk/rm-setup
Browse files Browse the repository at this point in the history
Modernise packaging
  • Loading branch information
marcusvolz authored Jul 25, 2023
2 parents 94ee1df + ff89c96 commit 3bcdb96
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 67 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "setup.cfg"

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U wheel
python -m pip install .
python -m pip install -U tox
- name: Test run
- name: Tox tests
run: |
stravavis --help
stravavis tests/gpx --activities_path tests/csv
tox -e py
- name: Upload output images
uses: actions/upload-artifact@v3
Expand Down
21 changes: 18 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.9.0
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black

Expand Down Expand Up @@ -39,8 +39,23 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.13.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.13
hooks:
- id: validate-pyproject

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
hooks:
- id: tox-ini-fmt

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
rev: v3.0.0
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
Expand Down
2 changes: 0 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

- [ ] Get `main` to the appropriate code release state.

- [ ] Update `version` in `setup.cfg` and commit and push.

* [ ] Start from a freshly cloned repo:

```bash
Expand Down
60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs",
"hatchling",
]

[project]
name = "stravavis"
description = "Create artistic visualisations with your exercise data"
readme = "README.md"
keywords = [
"artistic",
"artistic visualisations",
"exercise",
"exercise data",
"strava",
"visualisation",
]
license = {text = "MIT"}
maintainers = [{name = "Hugo van Kemenade"}]
authors = [{name = "Marcus Volz"}]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Artistic Software",
"Topic :: Multimedia :: Graphics",
"Topic :: Scientific/Engineering :: Visualization",
]
dynamic = [
"version",
]
dependencies = [
"calmap",
"fit2gpx",
"gpxpy",
"matplotlib",
"pandas<2", # Pending https://github.com/MarvinT/calmap/pull/14
"plotnine",
"rich",
"seaborn",
]
[project.urls]
Homepage = "https://github.com/marcusvolz/strava_py"
Source = "https://github.com/marcusvolz/strava_py"
[project.scripts]
stravavis = "stravavis.cli:main"

[tool.hatch]
version.source = "vcs"

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"

[tool.isort]
profile = "black"
54 changes: 0 additions & 54 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

22 changes: 22 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[tox]
requires =
tox>=4.2
env_list =
lint
py{311, 310, 39, 38}

[testenv]
pass_env =
FORCE_COLOR
commands =
stravavis --help
stravavis tests/gpx --activities_path tests/csv

[testenv:lint]
skip_install = true
deps =
pre-commit
pass_env =
PRE_COMMIT_COLOR
commands =
pre-commit run --all-files --show-diff-on-failure

0 comments on commit 3bcdb96

Please sign in to comment.