Skip to content

Commit

Permalink
Merge pull request #5 from GeoStat-Framework/develop
Browse files Browse the repository at this point in the history
1.1.0 release
  • Loading branch information
MuellerSeb authored Mar 22, 2020
2 parents 15cbaa2 + c29244a commit fcd0fbf
Show file tree
Hide file tree
Showing 88 changed files with 192 additions and 290 deletions.
90 changes: 58 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,68 @@
language: python
python: 3.7

matrix:
include:
# separate sdist and coverage with py36 on linux
- name: "sdist and coverage"
sudo: required
language: python
python: 3.6
services: docker
script:
- python -m pip install -U setuptools pytest-cov coveralls
- python setup.py sdist -d dist
- python -m pip install -r requirements.txt
- python -m pytest --cov ogs5py --cov-report term-missing -v tests/
- python -m coveralls
# universal wheel on 64bit Linux with py36
- name: "py2.py3 wheel"
sudo: required
language: python
python: 3.6
services: docker
# 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
- CIBW_BEFORE_BUILD="pip install setuptools"

script:
# create wheels
- python -m pip install cibuildwheel==1.0.0
- python -m cibuildwheel --output-dir dist

after_success:
- python -m pip install twine
- python -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
- if [[ $TRAVIS_TAG ]]; then python -m twine upload --verbose --skip-existing dist/*; fi

notifications:
email:
recipients:
- [email protected]
- [email protected]

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

install:
- python3 -m pip install .[test] coveralls

script:
- python3 -m pytest --cov ogs5py --cov-report term-missing -v tests/

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

jobs:
include:
- stage: test
name: Test on Linux
services: docker
after_success: python3 -m coveralls
- stage: test
name: Test on MacOS
os: osx
language: generic
# skip windows due to a VTK BUG
# - stage: test
# name: Test on Windows
# os: windows
# language: shell

# 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/*
18 changes: 18 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"contributors": [
{
"orcid": "0000-0002-2547-8102",
"affiliation": "Helmholtz Centre for Environmental Research - UFZ",
"type": "Supervisor",
"name": "Falk He\u00dfe"
}
],
"license": "MIT",
"creators": [
{
"orcid": "0000-0001-9060-4008",
"affiliation": "Helmholtz Centre for Environmental Research - UFZ",
"name": "Sebastian M\u00fcller"
}
]
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to **ogs5py** will be documented in this file.


## [1.1.0] - 2020-03-22

### Bugfixes
* meshio 4 was not compatible
* fixed integer type in exporting meshes with element/material IDs
* better check for OGS5 success on Windows

### Changes
* drop py2.7 support


## [1.0.5] - 2019-11-18

### Bugfixes
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 MANIFEST.in
include setup.py
recursive-include ogs5py *.py
recursive-include tests *.py
recursive-include docs/source *
include docs/Makefile docs/requirements.txt
include LICENSE
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2546767.svg)](https://doi.org/10.5281/zenodo.2546767)
[![PyPI version](https://badge.fury.io/py/ogs5py.svg)](https://badge.fury.io/py/ogs5py)
[![Build Status](https://travis-ci.org/GeoStat-Framework/ogs5py.svg?branch=master)](https://travis-ci.org/GeoStat-Framework/ogs5py)
[![Build Status](https://travis-ci.com/GeoStat-Framework/ogs5py.svg?branch=master)](https://travis-ci.org/GeoStat-Framework/ogs5py)
[![Coverage Status](https://coveralls.io/repos/github/GeoStat-Framework/ogs5py/badge.svg?branch=master)](https://coveralls.io/github/GeoStat-Framework/ogs5py?branch=master)
[![Documentation Status](https://readthedocs.org/projects/ogs5py/badge/?version=latest)](https://geostat-framework.readthedocs.io/projects/ogs5py/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/ogs5py/badge/?version=stable)](https://geostat-framework.readthedocs.io/projects/ogs5py/en/stable/?badge=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 @@ -147,13 +147,12 @@ model.run_model(ogs_exe="path/to/ogs")

## Requirements:

- [NumPy >= 1.13.0](https://www.numpy.org)
- [Pandas >= 0.23.0](https://pandas.pydata.org/)
- [whichcraft](https://github.com/pydanny/whichcraft)
- [meshio](https://github.com/nschloe/meshio)
- [lxml](https://github.com/lxml/lxml)
- [vtk](https://vtk.org/)
- [pexpect](https://github.com/pexpect/pexpect)
- [NumPy >= 1.14.5](https://www.numpy.org)
- [Pandas >= 0.23.2](https://pandas.pydata.org/)
- [meshio >= 4.0.3; <5.0](https://github.com/nschloe/meshio)
- [lxml >= 4.0; <5.0](https://github.com/lxml/lxml)
- [pexpect >= 4.0; <5.0](https://github.com/pexpect/pexpect)
- [vtk >= 8.1](https://vtk.org/)

## Contact

Expand All @@ -162,12 +161,12 @@ You can contact us via <[email protected]>.

## License

[MIT][gpl_link] © 2018-2019 (inspired by Falk Hesse and Miao Jing)
[MIT][gpl_link] © 2018-2020 (inspired by Falk Hesse and Miao Jing)

This project is based on [OGSPY][ogspy_link].

[ogspy_link]: https://github.com/fhesze/OGSPY
[gpl_link]: https://github.com/GeoStat-Framework/ogs5py/blob/master/LICENSE
[ogs5_link]: https://www.opengeosys.org/ogs-5/
[doc_link]: https://geostat-framework.readthedocs.io/projects/ogs5py/en/latest/
[tut1_link]: https://geostat-framework.readthedocs.io/projects/ogs5py/en/latest/tutorial_01_pump.html
[doc_link]: https://ogs5py.readthedocs.io/
[tut1_link]: https://geostat-framework.readthedocs.io/projects/ogs5py/en/stable/tutorial_01_pump.html
7 changes: 3 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# required for readthedocs.org
numpydoc
# https://stackoverflow.com/a/11704396/6696397
-r ../requirements.txt
-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 = "ogs5py"
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
15 changes: 7 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,15 @@ Otherwise you need to specify the path to the executable within the run command:
Requirements
============

- `NumPy >= 1.13.0 <https://www.numpy.org>`_
- `Pandas >= 0.23.0 <https://pandas.pydata.org/>`_
- `whichcraft <https://github.com/pydanny/whichcraft>`_
- `meshio <https://github.com/nschloe/meshio>`_
- `lxml <https://github.com/lxml/lxml>`_
- `vtk <https://vtk.org/>`_
- `pexpect <https://github.com/pexpect/pexpect>`_
- `NumPy >= 1.14.5 <https://www.numpy.org>`_
- `Pandas >= 0.23.2 <https://pandas.pydata.org/>`_
- `meshio >= 4.0.3; <5.0 <https://github.com/nschloe/meshio>`_
- `lxml >= 4.0; <5.0 <https://github.com/lxml/lxml>`_
- `pexpect >= 4.0; <5.0 <https://github.com/pexpect/pexpect>`_
- `vtk >= 8.1 <https://vtk.org/>`_


License
=======

`MIT <https://github.com/GeoStat-Framework/ogs5py/blob/master/LICENSE>`_ © 2019
`MIT <https://github.com/GeoStat-Framework/ogs5py/blob/master/LICENSE>`_
2 changes: 0 additions & 2 deletions ogs5py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@
PCS_TYP
PRIM_VAR_BY_PCS
"""
from __future__ import absolute_import

from ogs5py._version import __version__
from ogs5py.ogs import OGS
from ogs5py.fileclasses import (
Expand Down
2 changes: 1 addition & 1 deletion ogs5py/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Provide a central version."""
__version__ = "1.0.5"
__version__ = "1.0.6.dev0"
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.asc import ASC
from ogs5py.fileclasses.bc import BC
from ogs5py.fileclasses.cct import CCT
Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/asc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.asc.core import ASC

__all__ = ["ASC"]
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/asc/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Class for the ogs ASC file."""

from __future__ import absolute_import, division, print_function
from ogs5py.fileclasses.base import LineFile


Expand Down
1 change: 0 additions & 1 deletion ogs5py/fileclasses/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
----
"""
from __future__ import print_function, division, absolute_import
import os
import shutil
import time
Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/bc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.bc.core import BC

__all__ = ["BC"]
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/bc/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Class for the ogs BOUNDARY CONDITION file."""

from __future__ import absolute_import, division, print_function
from ogs5py.fileclasses.base import BlockFile


Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/cct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.cct.core import CCT

__all__ = ["CCT"]
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/cct/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Class for the ogs COMMUNICATION TABLE file."""

from __future__ import absolute_import, division, print_function
from ogs5py.fileclasses.base import BlockFile


Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/ddc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.ddc.core import DDC

__all__ = ["DDC"]
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/ddc/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Class for the ogs DOMAIN DECOMPOSITION file."""

from __future__ import absolute_import, division, print_function
from ogs5py.fileclasses.base import BlockFile


Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/fct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.fct.core import FCT

__all__ = ["FCT"]
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/fct/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Class for the ogs FUNCTION file."""

from __future__ import absolute_import, division, print_function
from ogs5py.fileclasses.base import BlockFile


Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/gem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.gem.core import GEM, GEMinit

__all__ = ["GEM", "GEMinit"]
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/gem/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""Class for the ogs GEOCHEMICAL THERMODYNAMIC MODELING COUPLING file."""

from __future__ import absolute_import, division, print_function
import os
from ogs5py.fileclasses.base import BlockFile, LineFile

Expand Down
2 changes: 0 additions & 2 deletions ogs5py/fileclasses/gli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
----
"""
from __future__ import absolute_import

from ogs5py.fileclasses.gli.core import GLI, GLIext

__all__ = ["GLI", "GLIext"]
1 change: 0 additions & 1 deletion ogs5py/fileclasses/gli/checker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
"""Checking routines for the ogs5py-GLI package."""
from __future__ import division, print_function, absolute_import
import numpy as np
from ogs5py.tools.types import STRTYPE, GLI_KEYS, PLY_KEYS, SRF_KEYS, VOL_KEYS

Expand Down
Loading

0 comments on commit fcd0fbf

Please sign in to comment.