Skip to content

Commit

Permalink
Merge pull request #64 from aazuspan/pyproject
Browse files Browse the repository at this point in the history
pyproject.toml, Hatch, and MIT license
  • Loading branch information
aazuspan committed Apr 25, 2023
2 parents 6dc253d + 5a270ca commit 21b2ae8
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 839 deletions.
9 changes: 0 additions & 9 deletions .bumpversion.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__pycache__/
.mypy_cache/
.pytest_cache/
*.pyc
.ipynb_checkpoints/
.vscode/
Expand Down
695 changes: 21 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

64 changes: 0 additions & 64 deletions Makefile

This file was deleted.

4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import os
import sys

from wxee import __version__

sys.path.insert(0, os.path.abspath(".."))


Expand All @@ -21,7 +23,7 @@
project = "wxee"
copyright = "2021, Aaron Zuspan"
author = "Aaron Zuspan"
version = "0.3.3"
version = __version__

# -- General configuration ---------------------------------------------------

Expand Down
9 changes: 5 additions & 4 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Setup
git clone https://github.com/{username}/wxee
cd wxee
make install-dev
pip install -e .[dev]
pre-commit install
#. Create a new feature branch.

Expand All @@ -31,8 +32,8 @@ Setup

.. code-block:: bash
make docs
make view-docs
hatch run docs:build
hatch run docs:view
Tests
Expand All @@ -58,4 +59,4 @@ For example:
Running Tests
^^^^^^^^^^^^^

To run all tests, use :code:`make tests`. If you cannot connect to Earth Engine or would like to skip slower tests, use :code:`make tests-local`.
To run all tests, use :code:`hatch run test:all`. If you cannot connect to Earth Engine or would like to skip slower tests, use :code:`hatch run test:local`.
115 changes: 115 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "wxee"
dynamic = ["version"]
description = "Earth Engine to xarray interface"
readme = "README.rst"
license = "MIT"
requires-python = ">=3.8"
authors = [
{ name = "Aaron Zuspan", email = "[email protected]" },
]
keywords = [
"earth-engine",
"xarray",
"time-series",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: GIS",
"Typing :: Typed",
]
dependencies = [
"earthengine-api",
"joblib",
"netcdf4",
"plotly>=5.2.2",
"rasterio",
"requests",
"rioxarray",
"tqdm",
"xarray",
]

[project.optional-dependencies]
dev = [
"black",
"hatch",
"hvplot",
"isort",
"matplotlib",
"mock",
"mypy",
"nbsphinx",
"pre-commit",
"pytest",
"pytest-cov",
"requests_mock",
"sphinx",
"sphinx_rtd_theme",
]
doc = [
"nbsphinx",
"sphinx",
"sphinx_rtd_theme",
]
test = [
"hvplot",
"matplotlib",
"mock",
"pytest",
"pytest-cov",
"requests_mock",
]

[project.urls]
Homepage = "https://github.com/aazuspan/wxee"

[tool.hatch.version]
path = "wxee/__init__.py"


[tool.hatch.build.targets.sdist]
include = [
"/wxee",
]

[tool.hatch.envs.docs]
dependences = [
"nbsphinx",
"sphinx",
"sphinx_rtd_theme",
]

[tool.hatch.envs.docs.scripts]
build = "sphinx-build -b html docs docs/_build/html"
view = "python -m webbrowser -t docs/_build/html/index.html"


[tool.hatch.envs.test]
dependencies = [
"hvplot",
"matplotlib",
"mock",
"pytest",
"pytest-cov",
"requests_mock",
]

[tool.hatch.envs.test.scripts]
all = "pytest ."
local = "pytest . -m 'not ee'"
coverage = "pytest . --cov=wxee --cov-report=html"
view-coverage = "python -m webbrowser -t htmlcov/index.html"

[tool.pytest.ini_options]
markers = "ee: Marks tests that require an Earth Engine connection. These can be skipped using `pytest -m 'not ee' .`"
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

76 changes: 0 additions & 76 deletions setup.py

This file was deleted.

0 comments on commit 21b2ae8

Please sign in to comment.