Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Update packaging to meet PEP517 #109

Merged
merged 5 commits into from
Aug 22, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
python3 -m pip install --upgrade pip setuptools wheel
make clean
python3 -m pip install .
python3 -m pip install ".[dev]"
- name: Install Validation
run: |
python -c "import snowexsql"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']

Expand Down Expand Up @@ -46,7 +47,7 @@ jobs:
sudo apt-get install -y postgis gdal-bin
python3 -m pip install --upgrade pip
python3 -m pip install pytest coverage
if [ -f requirements_dev.txt ]; then python3 -m pip install -r requirements_dev.txt; fi
python3 -m pip install -e ".[dev]"
- name: Test with pytest
run: |
pytest -s
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ htmlcov/*
scripts/upload/test*.txt
.idea/
scripts/download/data/*
*.egg-info

# Version
_version.py
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ formats: []
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- method: setuptools
- method: pip
path: .
extra_requirements:
- docs
70 changes: 70 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "snowexsql"
dynamic = ["version"]
description = "SQL Database software for SnowEx data"
keywords = ["snowex", "sql", "database", "snow"]
readme = "README.rst"
requires-python = ">=3.8"
classifiers = [
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10'
]
dependencies = [
"utm>=0.5.0,<1.0",
"geoalchemy2>=0.6,<1.0",
"geopandas>=0.7,<2.0",
"psycopg2-binary>=2.9.0,<2.10.0",
"rasterio>=1.1.5",
"SQLAlchemy >= 2.0.0",
]

[project.optional-dependencies]
dev = [
"pip==23.3",
"coverage==5.5",
"pytest==6.2.4",
"pytest-cov==2.12.1",
"sphinx-autobuild<=2024.5",
]
docs = [
"ipython>7.0,<9.0",
"nbconvert>=6.4.3,<6.5.0",
"nbsphinx==0.9.4",
"pandoc==1.0.2",
"plotly==5.22.0",
"sphinx-gallery==0.9.0",
"sphinx>=7.1,<7.4",
"sphinxcontrib-apidoc==0.3.0",
"jupyter-book>=1.0.2,<1.1",
"pyyaml<6.1"
]
all = ["snowexsql[dev,docs]"]

[project.license]
file = "LICENSE"

[project.urls]
Homepage = "https://github.com/SnowEx/snowexsql"
Documentation = "https://snowexsql.readthedocs.io"
Repository = "https://github.com/SnowEx/snowexsql.git"
Issues = "https://github.com/SnowEx/snowexsql/issues"

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

[tool.hatch.build.hooks.vcs]
version-file = "snowexsql/_version.py"

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

[tool.hatch.build.targets.sdist]
exclude = ["/tests"]
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

12 changes: 0 additions & 12 deletions requirements_dev.txt

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

4 changes: 3 additions & 1 deletion snowexsql/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Top-level package for snowexsql."""

from ._version import __version__ # noqa

__author__ = """Micah Johnson"""
__version__ = '0.5.0'
__version__ = __version__
Loading