Skip to content

Commit 65fca9f

Browse files
authored
update package to use more modern tooling and newer python versions (#11)
1 parent 42a84f3 commit 65fca9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+5157
-2696
lines changed

.coveragerc

Lines changed: 0 additions & 9 deletions
This file was deleted.

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[*.py]
2+
indent_style = space
3+
indent_size = 4

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
lint_format:
13+
name: Lint and Format
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python 3.14
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.14
23+
24+
- name: Set up uv
25+
uses: astral-sh/setup-uv@v7
26+
27+
- name: Install dev dependencies
28+
run: |
29+
uv --version
30+
uv sync --no-managed-python --only-dev
31+
32+
- name: Lint
33+
run: |
34+
uv run --no-managed-python ruff check
35+
36+
- name: Format
37+
run: |
38+
uv run --no-managed-python ruff format --check
39+
40+
- name: Type Check
41+
run: |
42+
uv run --no-managed-python ty check
43+
44+
tests:
45+
name: Tests (${{ matrix.os }} | Python ${{ matrix.python-version }})
46+
runs-on: ${{ matrix.os }}
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
os: [ubuntu-latest, windows-latest, macos-latest]
51+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
52+
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v4
56+
57+
- name: Set up Python ${{ matrix.python-version }}
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
62+
- name: Set up uv
63+
uses: astral-sh/setup-uv@v7
64+
65+
- name: Install dependencies
66+
run: |
67+
uv --version
68+
uv sync --no-managed-python --python ${{ matrix.python-version }}
69+
70+
- name: Run tests
71+
run: |
72+
uv run --no-managed-python --python ${{ matrix.python-version }} pytest -q

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout source
12+
uses: actions/checkout@v4
13+
14+
- name: Set up uv
15+
uses: astral-sh/setup-uv@v7
16+
17+
- name: Build package
18+
run: uv build
19+
20+
- name: Publish to PyPI
21+
env:
22+
UV_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
23+
run: uv publish --token $UV_PYPI_TOKEN

.gitignore

Lines changed: 217 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,218 @@
1-
venv
21
.idea
3-
HydroErr/tests/htmlcov/*
4-
docs/_build
5-
HydroErr.egg-info
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[codz]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
share/python-wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
*.py.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
cover/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
# Pipfile.lock
98+
99+
# UV
100+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
101+
# This is especially recommended for binary packages to ensure reproducibility, and is more
102+
# commonly ignored for libraries.
103+
# uv.lock
104+
105+
# poetry
106+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107+
# This is especially recommended for binary packages to ensure reproducibility, and is more
108+
# commonly ignored for libraries.
109+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110+
# poetry.lock
111+
# poetry.toml
112+
113+
# pdm
114+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
116+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
117+
# pdm.lock
118+
# pdm.toml
119+
.pdm-python
120+
.pdm-build/
121+
122+
# pixi
123+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
124+
# pixi.lock
125+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
126+
# in the .venv directory. It is recommended not to include this directory in version control.
127+
.pixi
128+
129+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130+
__pypackages__/
131+
132+
# Celery stuff
133+
celerybeat-schedule
134+
celerybeat.pid
135+
136+
# Redis
137+
*.rdb
138+
*.aof
139+
*.pid
140+
141+
# RabbitMQ
142+
mnesia/
143+
rabbitmq/
144+
rabbitmq-data/
145+
146+
# ActiveMQ
147+
activemq-data/
148+
149+
# SageMath parsed files
150+
*.sage.py
151+
152+
# Environments
153+
.env
154+
.envrc
155+
.venv
156+
env/
157+
venv/
158+
ENV/
159+
env.bak/
160+
venv.bak/
161+
162+
# Spyder project settings
163+
.spyderproject
164+
.spyproject
165+
166+
# Rope project settings
167+
.ropeproject
168+
169+
# mkdocs documentation
170+
/site
171+
172+
# mypy
173+
.mypy_cache/
174+
.dmypy.json
175+
dmypy.json
176+
177+
# Pyre type checker
178+
.pyre/
179+
180+
# pytype static type analyzer
181+
.pytype/
182+
183+
# Cython debug symbols
184+
cython_debug/
185+
186+
# PyCharm
187+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189+
# and can be added to the global gitignore or merged into this file. For a more nuclear
190+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
191+
# .idea/
192+
193+
# Abstra
194+
# Abstra is an AI-powered process automation framework.
195+
# Ignore directories containing user credentials, local state, and settings.
196+
# Learn more at https://abstra.io/docs
197+
.abstra/
198+
199+
# Visual Studio Code
200+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
201+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
203+
# you could uncomment the following to ignore the entire vscode folder
204+
# .vscode/
205+
206+
# Ruff stuff:
207+
.ruff_cache/
208+
209+
# PyPI configuration file
210+
.pypirc
211+
212+
# Marimo
213+
marimo/_static/
214+
marimo/_lsp/
215+
__marimo__/
216+
217+
# Streamlit
218+
.streamlit/secrets.toml

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
default_stages: [pre-commit]
2+
3+
repos:
4+
- repo: local
5+
hooks:
6+
- id: ruff-check
7+
name: Ruff Check
8+
entry: uv run ruff check
9+
language: system
10+
types: [python]
11+
12+
- id: ruff-format
13+
name: Ruff Format
14+
entry: uv run ruff format
15+
language: system
16+
types: [python]
17+
18+
- id: type-check
19+
name: Type Check
20+
entry: uv run ty check
21+
language: system
22+
types: [python]
23+
pass_filenames: false

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

.readthedocs.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
sphinx:
3+
configuration: docs/conf.py
4+
python:
5+
install:
6+
- requirements: requirements-docs.txt

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"python-envs.defaultEnvManager": "ms-python.python:venv",
3+
"python-envs.pythonProjects": []
4+
}

0 commit comments

Comments
 (0)