Skip to content

Commit

Permalink
Update 20231130 (#117)
Browse files Browse the repository at this point in the history
* updated by cruft

* clean up env

* update requirements

* removed travis config

* update minimal python >=3.8

* fix setup.cfg

* fix docs version

* fix docs config

* Update .readthedocs.yml

Co-authored-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>

* update after review

* restrict python >=3.8

---------

Co-authored-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
  • Loading branch information
cehbrecht and Zeitsperre authored Nov 30, 2023
1 parent bae9501 commit aa75f3d
Show file tree
Hide file tree
Showing 21 changed files with 205 additions and 172 deletions.
71 changes: 37 additions & 34 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
{
"template": "https://github.com/bird-house/cookiecutter-birdhouse.git",
"commit": "f157ea8419fd4e32a9e4d52e613c90c807190e7e",
"skip": [
"emu/processes/wps_say_hello.py",
"tests/test_wps_hello.py",
"docs/source/notebooks/example.ipynb",
"environment.yml",
"requirements.txt",
"AUTHORS.rst",
"CHANGES.rst",
"docs/source/notebooks/index.rst",
"docs/source/processes.rst",
"emu/processes/__init__.py",
"tests/test_wps_caps.py"
],
"context": {
"cookiecutter": {
"full_name": "Carsten Ehbrecht",
"email": "ehbrecht@dkrz.de",
"github_username": "bird-house",
"project_name": "Emu",
"project_slug": "emu",
"project_repo_name": "emu",
"project_readthedocs_name": "emu",
"project_short_description": "WPS processes for testing and demos.",
"version": "0.12.0",
"open_source_license": "Apache Software License 2.0",
"http_port": "5000",
"_copy_without_render": [
"{{cookiecutter.project_slug}}/templates/*.cfg"
],
"_template": "https://github.com/bird-house/cookiecutter-birdhouse.git"
}
"template": "https://github.com/bird-house/cookiecutter-birdhouse.git",
"commit": "bc8a389e02a3e55e55dad7657671d91e2f238ed9",
"skip": [
"emu/processes/wps_say_hello.py",
"tests/test_wps_hello.py",
"docs/source/notebooks/example.ipynb",
"environment.yml",
"requirements.txt",
"AUTHORS.rst",
"CHANGES.rst",
"docs/source/notebooks/index.rst",
"docs/source/processes.rst",
"emu/processes/__init__.py",
"tests/test_wps_caps.py"
],
"context": {
"cookiecutter": {
"full_name": "Carsten Ehbrecht",
"email": "ehbrecht@dkrz.de",
"github_username": "bird-house",
"project_name": "Emu",
"project_slug": "emu",
"project_repo_name": "emu",
"project_readthedocs_name": "emu",
"project_short_description": "WPS processes for testing and demos.",
"version": "0.12.0",
"open_source_license": "Apache Software License 2.0",
"http_port": "5000",
"use_pytest": "y",
"create_author_file": "y",
"_copy_without_render": [
"{{cookiecutter.project_slug}}/templates/*.cfg"
],
"_template": "https://github.com/bird-house/cookiecutter-birdhouse.git"
}
}
},
"checkout": null
}
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
Expand All @@ -31,15 +31,15 @@ jobs:
run: make test
- name: Lint with flake8 ⚙️
run: make lint
if: matrix.python-version == 3.7
if: matrix.python-version == 3.8
# - name: Check formatting with black ⚙️
# run: black --check --target-version py37 birdy tests
# run: black --check --target-version py38 birdy tests
# if: matrix.python-version == 3.7
- name: Build docs 🏗️
run: make docs
if: matrix.python-version == 3.7
if: matrix.python-version == 3.8
# - name: Run smoke tests ⚙️
# run: |
# export PYWPS_CFG=$PWD/etc/smoke-pywps.cfg
# make smoke
# if: matrix.python-version == 3.7
# if: matrix.python-version == 3.8
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,19 @@ testdata.json

# Merge conflict
*.orig

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# IDE settings
.vscode/
15 changes: 9 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ sphinx:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all
formats: []

# Optionally set the version of Python and requirements required to build your docs
#python:
# version: 3.6
build:
os: ubuntu-22.04
tools:
python: "mambaforge-22.9"

conda:
environment: environment-docs.yml

build:
image: stable
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements_dev.txt
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

18 changes: 17 additions & 1 deletion LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
Apache License
Apache Software License 2.0

Copyright (c) 2023, Carsten Ehbrecht

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include Makefile
include *.txt
include *.rst
include tox.ini
recursive-include emu *
global-exclude __pycache__
global-exclude *.py[co]
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ You can find information about contributing in our `Developer Guide`_.

Please use bumpversion_ to release a new version.


License
-------

Free software: Apache Software License 2.0
* Free software: Apache Software License 2.0
* Documentation: https://emu.readthedocs.io.


Credits
-------
Expand Down
3 changes: 0 additions & 3 deletions docs/source/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/authors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../../AUTHORS.rst
59 changes: 44 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# emu documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
Expand Down Expand Up @@ -51,22 +50,52 @@
# To avoid having to install these and burst memory limit on ReadTheDocs.
# List of all tested working mock imports from all birds so new birds can
# inherit without having to test which work which do not.
autodoc_mock_imports = ["numpy", "xarray", "fiona", "rasterio", "shapely",
"osgeo", "geopandas", "pandas", "statsmodels",
"affine", "rasterstats", "spotpy", "matplotlib",
"scipy", "unidecode", "gdal", "sentry_sdk", "dask",
"numba", "parse", "siphon", "sklearn", "cftime",
"netCDF4", "bottleneck", "ocgis", "geotiff", "geos",
"hdf4", "hdf5", "zlib", "pyproj", "proj", "cartopy",
"scikit-learn", "cairo"]
autodoc_mock_imports = [
"numpy",
"xarray",
"fiona",
"rasterio",
"shapely",
"osgeo",
"geopandas",
"pandas",
"statsmodels",
"affine",
"rasterstats",
"spotpy",
"matplotlib",
"scipy",
"unidecode",
"gdal",
"sentry_sdk",
"dask",
"numba",
"parse",
"siphon",
"sklearn",
"cftime",
"netCDF4",
"bottleneck",
"ocgis",
"geotiff",
"geos",
"hdf4",
"hdf5",
"zlib",
"pyproj",
"proj",
"cartopy",
"scikit-learn",
"cairo",
]

# Monkeypatch constant because the following are mock imports.
# Only works if numpy is actually installed and at the same time being mocked.
#import numpy
#numpy.pi = 3.1416
# import numpy
# numpy.pi = 3.1416

# We are using mock imports in readthedocs, so probably safer to not run the notebooks
nbsphinx_execute = 'never'
nbsphinx_execute = "never"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand All @@ -82,7 +111,7 @@

# General information about the project.
project = "Emu"
copyright = "2018-2020, Carsten Ehbrecht"
copyright = "2018-2023, Carsten Ehbrecht"
author = "Carsten Ehbrecht"

# The version info for the project you're documenting, acts as replacement
Expand All @@ -99,7 +128,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -113,7 +142,7 @@
todo_include_todos = False

# Suppress "WARNING: unknown mimetype for ..." when building EPUB.
suppress_warnings = ['epub.unknown_project_files']
suppress_warnings = ["epub.unknown_project_files"]

# Avoid "configuration.rst:4:duplicate label configuration, other instance in configuration.rst"
autosectionlabel_prefix_document = True
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
dev_guide
tutorial
processes
authors
changes

Indices and tables
Expand Down
6 changes: 3 additions & 3 deletions emu/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# without importing the main package when its dependencies are not installed.
# See: https://packaging.python.org/guides/single-sourcing-package-version

__author__ = """Carsten Ehbrecht"""
__email__ = 'ehbrecht@dkrz.de'
__version__ = '0.12.0'
__author__ = "Carsten Ehbrecht"
__email__ = "ehbrecht@dkrz.de"
__version__ = "0.12.0"
6 changes: 5 additions & 1 deletion emu/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ def stop():
@click.option('--log-level', metavar='LEVEL', default='INFO', help='log level in PyWPS configuration.')
@click.option('--log-file', metavar='PATH', default='pywps.log', help='log file in PyWPS configuration.')
@click.option('--database', default='sqlite:///pywps-logs.sqlite', help='database in PyWPS configuration')
@click.option('--outputurl', default='', help='base URL for file downloads')
@click.option('--outputpath', default='', help='base directory where outputs are written')
def start(config, bind_host, daemon, hostname, port,
maxsingleinputsize, maxprocesses, parallelprocesses,
log_level, log_file, database):
log_level, log_file, database, outputurl, outputpath):
"""Start PyWPS service.
This service is by default available at http://localhost:5000/wps
"""
Expand All @@ -150,6 +152,8 @@ def start(config, bind_host, daemon, hostname, port,
wps_log_level=log_level,
wps_log_file=log_file,
wps_database=database,
wps_outputurl=outputurl,
wps_outputpath=outputpath
))
if config:
cfgfiles.append(config)
Expand Down
4 changes: 2 additions & 2 deletions environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: emu-docs
channels:
- conda-forge
- defaults
dependencies:
- pywps=4.4.0
- python >=3.8,<3.11
- pywps >=4.5.2
- sphinx
- nbsphinx
- ipython
Loading

0 comments on commit aa75f3d

Please sign in to comment.