Skip to content

Commit

Permalink
Merge pull request #2 from GeoStat-Framework/develop
Browse files Browse the repository at this point in the history
1.0.0 release
  • Loading branch information
MuellerSeb authored Mar 22, 2020
2 parents a335ff4 + c9b03b3 commit 52e690e
Show file tree
Hide file tree
Showing 29 changed files with 408 additions and 129 deletions.
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[run]
source = anaflow
omit = *docs*, *examples*, *tests*

[report]
exclude_lines =
pragma: no cover
if __name__ == '__main__':
def __repr__
def __str__

113 changes: 70 additions & 43 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,54 +1,81 @@
language: python
python: 3.8

matrix:
include:
- name: "Linux py27"
sudo: required
language: python
python: 2.7
services: docker
env:
- PIP=pip
- CIBW_BUILD="cp27-*"
- COVER="off"

- name: "Linux py36"
sudo: required
language: python
python: 3.6
services: docker
env:
- PIP=pip
- CIBW_BUILD="cp36-*"
- COVER="on"
# setuptools-scm needs all tags in order to obtain a proper version
git:
depth: false

env:
global:
# Note: TWINE_PASSWORD is set in Travis settings
- TWINE_USERNAME=geostatframework

script:
# create wheels
- $PIP install cibuildwheel==0.10.1
- cibuildwheel --output-dir wheelhouse
# create source dist for pypi and create coverage (only once for linux py3.6)
- |
if [[ $COVER == "on" ]]; then
rm -rf dist
python setup.py sdist
fi
after_success:
# pypi upload (test allways and official on TAG)
- python -m pip install twine
- python -m twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl
- python -m twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*.tar.gz
- |
if [[ $TRAVIS_TAG ]]; then
python -m twine upload --skip-existing wheelhouse/*.whl
python -m twine upload --skip-existing dist/*.tar.gz
fi
- CIBW_BUILD="cp35-* cp36-* cp37-* cp38-*"
# update setuptools to latest version
- CIBW_BEFORE_BUILD="pip install -U setuptools"
# testing with cibuildwheel
- CIBW_TEST_REQUIRES=pytest
- CIBW_TEST_COMMAND="pytest -v {project}/tests"

notifications:
email:
recipients:
- [email protected]

before_install:
- |
if [[ "$TRAVIS_OS_NAME" = windows ]]; then
choco install python --version 3.8.0
export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
ln -s /c/Python38/python.exe /c/Python38/python3.exe
fi
install:
- python3 -m pip install cibuildwheel==1.3.0

script:
- python3 -m cibuildwheel --output-dir tmp_dist

stages:
- test
- coverage
- name: deploy
if: (NOT type IN (pull_request)) AND (repo = GeoStat-Framework/AnaFlow)

jobs:
include:
- stage: test
name: Test on Linux
services: docker
- stage: test
name: Test on MacOS
os: osx
language: generic
- stage: test
name: Test on Windows
os: windows
language: shell

- stage: coverage
name: Coverage on Linux
services: docker
install: python3 -m pip install .[test] coveralls
script:
- python3 -m pytest --cov anaflow --cov-report term-missing -v tests/
- python3 -m coveralls

# Test Deploy source distribution
- stage: deploy
name: Test Deploy
install: python3 -m pip install -U setuptools wheel twine
script: python3 setup.py sdist --formats=gztar bdist_wheel
after_success:
- python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*

# Deploy source distribution
- stage: deploy
name: Deploy to PyPI
if: tag IS present
install: python3 -m pip install -U setuptools wheel twine
script: python3 setup.py sdist --formats=gztar bdist_wheel
after_success: python3 -m twine upload --verbose --skip-existing dist/*
20 changes: 20 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"license": "MIT",
"language": "eng",
"keywords": [
"Groundwater flow equation",
"Groundwater",
"Pumping test",
"Pump test",
"Aquifer analysis",
"Python",
"GeoStat-Framework"
],
"creators": [
{
"orcid": "0000-0001-9060-4008",
"affiliation": "Helmholtz Centre for Environmental Research - UFZ",
"name": "Sebastian M\u00fcller"
}
]
}
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
All notable changes to **AnaFlow** will be documented in this file.


## [Unreleased]
## [1.0.0] - 2020-03-22

### Enhancements
- new TPL Solution
- new tools module
- new tools sub-module
- using pentapy to solve LES in laplace space
- solution for aparent transmissivity from neuman 2004
- added extended GRF model
- convenient functions for (inverse-)laplace transformation

### Bugfixes
- `lat_ext` was ignored by ext_theis_3d

### Changes
- py2.7 support dropped


## [0.4.0] - 2019-03-07

Expand Down Expand Up @@ -63,7 +69,7 @@ Containing:
- lap_transgwflow_cyl - Solution for a diskmodel in laplace inversion


[Unreleased]: https://github.com/GeoStat-Framework/gstools/compare/v0.4.0...HEAD
[1.0.0]: https://github.com/GeoStat-Framework/gstools/compare/v0.4.0...v1.0.0
[0.4.0]: https://github.com/GeoStat-Framework/gstools/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/GeoStat-Framework/gstools/compare/v0.2.4...v0.3.0
[0.2.4]: https://github.com/GeoStat-Framework/gstools/compare/v0.1...v0.2.4
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Sebastian Mueller
Copyright (c) 2019 - 2020 Sebastian Mueller

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include README.md
include MANIFEST.in
include setup.py
include setup.cfg
recursive-include anaflow *.py
recursive-include tests *.py
recursive-include docs/source *
include docs/Makefile docs/requirements.txt
include LICENSE
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1135723.svg)](https://doi.org/10.5281/zenodo.1135723)
[![PyPI version](https://badge.fury.io/py/anaflow.svg)](https://badge.fury.io/py/anaflow)
[![Build Status](https://travis-ci.org/GeoStat-Framework/AnaFlow.svg?branch=master)](https://travis-ci.org/GeoStat-Framework/AnaFlow)
[![Documentation Status](https://readthedocs.org/projects/docs/badge/?version=latest)](https://anaflow.readthedocs.io/en/latest/)
[![Build Status](https://travis-ci.com/GeoStat-Framework/AnaFlow.svg?branch=master)](https://travis-ci.com/GeoStat-Framework/AnaFlow)
[![Documentation Status](https://readthedocs.org/projects/docs/badge/?version=stable)](https://anaflow.readthedocs.io/en/stable/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

<p align="center">
Expand Down Expand Up @@ -90,7 +90,7 @@ inverse laplace-transformation of a given function

- [NumPy >= 1.14.5](https://www.numpy.org)
- [SciPy >= 1.1.0](https://www.scipy.org)
- [pentapy](https://github.com/GeoStat-Framework/pentapy)
- [pentapy >= 1.1.0](https://github.com/GeoStat-Framework/pentapy)


## Contact
Expand All @@ -100,7 +100,7 @@ You can contact us via <[email protected]>.

## License

[MIT][mit_link] © 2019
[MIT][mit_link] © 2019 - 2020

[mit_link]: https://github.com/GeoStat-Framework/AnaFlow/blob/master/LICENSE
[doc_link]: https://geostat-framework.readthedocs.io/projects/anaflow/en/latest/
[doc_link]: https://anaflow.readthedocs.io
10 changes: 6 additions & 4 deletions anaflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
"""
from __future__ import absolute_import

from anaflow._version import __version__

from anaflow.flow import (
thiem,
theis,
Expand All @@ -112,6 +108,12 @@
specialrange_cut,
)

try:
from anaflow._version import __version__
except ModuleNotFoundError: # pragma: nocover
# package is not installed
__version__ = "0.0.0.dev0"

__all__ = ["__version__"]
__all__ += [
"thiem",
Expand Down
3 changes: 0 additions & 3 deletions anaflow/_version.py

This file was deleted.

2 changes: 0 additions & 2 deletions anaflow/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
ext_grf
ext_grf_steady
"""
from __future__ import absolute_import

from anaflow.flow.homogeneous import thiem, theis, grf
from anaflow.flow.heterogeneous import (
ext_thiem_2d,
Expand Down
2 changes: 0 additions & 2 deletions anaflow/flow/ext_grf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
ext_grf_steady
"""
# pylint: disable=C0103
from __future__ import absolute_import, division, print_function

import numpy as np
from scipy.integrate import quad as integ

Expand Down
4 changes: 1 addition & 3 deletions anaflow/flow/heterogeneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
neuman2004_steady
"""
# pylint: disable=C0103
from __future__ import absolute_import, division, print_function

import functools as ft

import numpy as np
Expand Down Expand Up @@ -287,7 +285,7 @@ def ext_thiem_3d(
# derive the result
res = np.exp(-chi) * (np.log(rad) - np.log(r_ref))
res += sub21 * np.sinh(chi) + sub22 * (1.0 - np.cosh(chi))
res *= -rate / (2.0 * np.pi * K_efu)
res *= -rate / (2.0 * np.pi * K_efu * lat_ext)
res += h_ref

return res
Expand Down
2 changes: 0 additions & 2 deletions anaflow/flow/homogeneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
grf
"""
# pylint: disable=C0103
from __future__ import absolute_import, division, print_function

import numpy as np

from anaflow.tools.special import well_solution, grf_solution
Expand Down
2 changes: 0 additions & 2 deletions anaflow/flow/laplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
grf_laplace
"""
# pylint: disable=C0103
from __future__ import absolute_import, division, print_function

import warnings

import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions anaflow/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
get_lap
get_lap_inv
"""
from __future__ import absolute_import

from anaflow.tools.mean import (
annular_fmean,
annular_amean,
Expand Down
2 changes: 0 additions & 2 deletions anaflow/tools/coarse_graining.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
TPL_CG_error
"""
# pylint: disable=C0103
from __future__ import absolute_import, division, print_function

import numpy as np
from scipy.optimize import root

Expand Down
3 changes: 0 additions & 3 deletions anaflow/tools/laplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
lap_trans
stehfest
"""

from __future__ import absolute_import, division, print_function

from math import floor, factorial
import numpy as np
from scipy.integrate import quad
Expand Down
2 changes: 0 additions & 2 deletions anaflow/tools/mean.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
annular_pmean
"""
# pylint: disable=E1137, C0103
from __future__ import absolute_import, division, print_function

import numpy as np

from scipy.integrate import quad as integ
Expand Down
2 changes: 0 additions & 2 deletions anaflow/tools/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
neuman2004_trans
"""

from __future__ import absolute_import, division, print_function

import numpy as np
from scipy.special import gamma, gammaincc, exp1, expn, hyp2f1

Expand Down
8 changes: 3 additions & 5 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#required for readthedocs.org
numpy>=1.14.5
scipy>=1.1.0
pentapy
numpydoc
-r requirements_doc.txt
-r ../requirements_setup.txt
-r ../requirements.txt
1 change: 1 addition & 0 deletions docs/requirements_doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
numpydoc
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# NOTE:
# pip install sphinx_rtd_theme
# is needed in order to build the documentation
import datetime
import os
import sys

Expand Down Expand Up @@ -95,8 +96,9 @@ def setup(app):
master_doc = "contents"

# General information about the project.
curr_year = datetime.datetime.now().year
project = "AnaFlow"
copyright = "2019, Sebastian Mueller"
copyright = "2019 - {}, Sebastian Mueller".format(curr_year)
author = "Sebastian Mueller"

# The version info for the project you're documenting, acts as replacement for
Expand Down
Loading

0 comments on commit 52e690e

Please sign in to comment.