Skip to content

Commit

Permalink
Use pyproject file for project metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
naschmitz committed Jan 3, 2024
1 parent 9c990ba commit 9deff64
Show file tree
Hide file tree
Showing 13 changed files with 141 additions and 167 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --user --no-cache-dir Cython
pip install codespell -r requirements.txt -r requirements_extra.txt -r requirements_all.txt
pip install .
pip install codespell
pip install .[all]
- name: Discover typos with codespell
run: codespell --skip="*.csv,*.geojson,*.json,*.yml*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,ges,hart,hist,nd,ned,ois,wqs,watermask"
- name: LOAD EE CREDENTIALS
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --user --no-cache-dir Cython
pip install codespell -r requirements.txt -r requirements_extra.txt -r requirements_all.txt
pip install .
pip install codespell
pip install .[all]
- name: Discover typos with codespell
run: codespell --skip="*.csv,*.geojson,*.json,*.yml*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,ges,hart,hist,nd,ned,ois,wqs,watermask"
- name: LOAD EE CREDENTIALS
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
gdalinfo --version
- name: Install dependencies
run: |
pip install -r requirements.txt -r requirements_extra.txt -r requirements_all.txt
pip install .
pip install codespell
pip install .[all]
- name: Discover typos with codespell
run: |
pip install codespell
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
include LICENSE
include README.rst
include requirements.txt
include requirements_extra.txt
include requirements_all.txt
include requirements_docs.txt

recursive-include geemap/data *
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ Ready to contribute? Here's how to set up _geemap_ for local development.
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
```
flake8 geemap tests
pflake8 geemap tests
```
```
python setup.py test or pytest
```
To get flake8 and tox, just pip install them into your conda env.
To get pflake8 and tox, just pip install them into your conda env (`pip install pyproject-flake8` and `pip install tox`).
6. Commit your changes and push your branch to GitHub:
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ mamba install geemap -c conda-forge
mamba install geopandas localtileserver -c conda-forge
```

All the optional dependencies are listed in [requirements_all.txt](https://github.com/gee-community/geemap/blob/master/requirements_all.txt), which can be installed using one of the following:
The optional dependencies can be installed using one of the following:

- `pip install geemap[all]`: installing all optional dependencies listed in [requirements_all.txt](https://github.com/gee-community/geemap/blob/master/requirements_all.txt).
- `pip install geemap[all]`: installing all optional dependencies.
- `pip install geemap[backends]`: installing keplergl, pydeck.
- `pip install geemap[lidar]`: installing ipygany, ipyvtklink, laspy, panel, pyntcloud[LAS], pyvista.
- `pip install geemap[raster]`: installing localtileserver, rio-cogeo, rioxarray, netcdf4, xarray_leaflet.
Expand Down
2 changes: 2 additions & 0 deletions oryx-build-commands.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PlatformWithVersion=Python
BuildCommands=conda env create --file environment.yml --prefix ./venv --quiet
127 changes: 127 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
[project]
name = "geemap"
version = "0.30.0"
dynamic = [
"dependencies",
]
description = "A Python package for interactive mapping using Google Earth Engine and ipyleaflet"
readme = "README.rst"
requires-python = ">=3.8"
keywords = [
"geemap",
]
license = {text = "MIT"}
authors = [
{name = "Qiusheng Wu", email = "giswqs@gmail.com"},
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.entry-points."console_scripts"]
geemap = "geemap.cli:main"

[project.optional-dependencies]
all = [
"geemap[backends,extra,lidar,raster,sql,apps,vector,workshop]",
]
backends = [
"keplergl",
"pydeck",
"plotly",
]
extra = [
"ee_extra>=0.0.15",
"ffmpeg-python",
"gdown",
"geeadd>=0.5.1",
"geojson",
"geopandas",
"pycrs",
"sankee>=0.1.0",
"whiteboxgui>=0.6.0",
]
lidar = [
"ipygany",
"ipyvtklink",
"laspy[lazrs]",
"panel",
"pyntcloud[LAS]",
"pyvista",
"pyvista-xarray",
"rioxarray",
]
raster = [
"geedim",
"localtileserver",
"rio-cogeo",
"rioxarray",
"netcdf4",
"pyvista-xarray",
]
sql = [
"psycopg2",
"sqlalchemy",
]
apps = [
"gradio",
"streamlit-folium",
"voila",
"solara",
]
vector = [
"geopandas",
"osmnx",
]
workshop = [
"geopandas",
"geedim",
"ffmpeg-python",
"gdown",
]

[tool.setuptools.packages.find]
where = ["geemap"]
namespaces = false

[project.urls]
Homepage = "https://github.com/gee-community/geemap"

[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.distutils.bdist_wheel]
universal = true

[tool.bumpversion]
current_version = "0.30.0"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "geemap/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

[tool.flake8]
exclude = [
"docs",
]
max-line-length = 88

[tool.setuptools_scm]
28 changes: 0 additions & 28 deletions requirements_all.txt

This file was deleted.

4 changes: 2 additions & 2 deletions requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
black
black[jupyter]
bump-my-version
codespell
deadlink
bump2version
coverage
flake8
ipykernel
livereload
nbconvert
nbformat
pyproject-flake8
pip
sphinx
tox
Expand Down
9 changes: 0 additions & 9 deletions requirements_extra.txt

This file was deleted.

21 changes: 0 additions & 21 deletions setup.cfg

This file was deleted.

95 changes: 0 additions & 95 deletions setup.py

This file was deleted.

0 comments on commit 9deff64

Please sign in to comment.