Skip to content

Commit a0a4e5b

Browse files
LeguarkJaphioliteAlexander SchaafTobiasGlaubachjavoha
authored
GemPy 2.2.0 (#428)
* Update ch1-1_Basics.ipynb * Revert "Update ch1-1_Basics.ipynb" This reverts commit 1852684. * play around with stochastics in exploratory notebook * differentiate filename and path in moose export * fix errors in moose notebook * Delete main.yml * [CLN] Refactored DataMutation and Model to ImplicitCoKriging and Project * work on hierarchical modelling test notebook * [DOC] finish notebook with example for hierarchical modeling * Fix 335 (#336) * [DOC] Updated version * [BUGFIX] Fixes typing error >>> import gempy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/namur/coding/gempy/gempy/__init__.py", line 10, in <module> import gempy.plot.plot_api as _plot File "/home/namur/coding/gempy/gempy/plot/plot_api.py", line 38, in <module> from .vista import _Vista as Vista File "/home/namur/coding/gempy/gempy/plot/vista.py", line 56, in <module> class Vista: File "/home/namur/coding/gempy/gempy/plot/vista.py", line 108, in Vista name='lith', AttributeError: module 'gempy' has no attribute 'Solution' Co-authored-by: varga <varga@aices.rwth-aachen.de> * [BUG] Plot2D.extract_section_lines breaks * [DOC] Updated requirements.txt and README.md for Win installation * [ENH] Added the option in delete series to delete associated data - Added a gpu_theano file to check the installation * renamed file_path to table_source and added if/else for directly passing a dataframe instead of loading from csv * renamed file_path to table_source * added read_df function for directly reading from dataframe objects and added the corresponding kwargs to init_data function * added integration test for loading by directly passing a dataframe * adapted the case checking to incorporate dataframes as well * fixed the test to actually cover the new behaviour properly * [DOC] Added explanation to Data_Manipulation notebook, fixed broken link * minor * Fixture model (#340) * [ENH] Added possible fixture model data and example notebook * [ENH] Small fixes in naming conventions and scalar field plotting * [META] Add .vs to gitignore * [TEST] Added test for the old implementation of passing directly dfs * [ENH] Added a better parser of columns when data is read * [ENH] Refactored read_Df to set_geometric_data * [ENH] Init data use the old way to pass frames * [Test] Update test to the new code * [DOC] Added export to gocad code to the implicit benchmark * [DOC] Claudius low memory profile - nugget effect small bug * [TEST] Fixing travis * [BUG] Fix broken Model().read_data when used old kwargs * [ENH] Giving up trying to edit current vista code - Added 'hasData' column to surfaces * [TEST] Ordering a bit the test * [ENH] Init of the new vista class * [TEST] Tidying up test and creating only one interpolator fixture * [TEST] Fixed gravity test - Added gravity fixture - Now it is possible to pass the centered grid after compilation - update_additional data moved from api to Model * [TEST] Fixed magnetics - Added magnetics fixture - added fw_magnetics to Solution * [TEST] Fixed topology - Added fabian and unconformity fixture * [TEST] Fixed rest of the tests * [Test] Added fixture model with folding/faulting/unconformity to conftest.py * Added notebook with example of diamond square algorithm (and additional smoothing step) * Some edits for PEP8 conformity * [ENH] Added plot_surface_points * [BUG] Small fixes * Vectorized topography generation using DS algorithm - example notebook, first steps for single hierarchy * Vectorized interpolation with padded checkerboard pattern to reduce number of possible cases * Extension to point selection on multiple hierarchies * Selection on multiple hierarchies, including padding and grid visualization; one problem with hierarchy calculation remaining, should be easy to fix. * Hierarchical point selection now working - notebook contains example comparable to example on Wikipedia (https://en.wikipedia.org/wiki/Diamond-square_algorithm#/media/File:Diamond_Square.svg) * Added hillshade example * Generalized point selection in DS algorithm * set up diamond-square module and test in gempy/utils * Methods for grid size determination and set-up of class structure * Updated module with grid selection plots and added (tutorial) notebook using the gempy.utils.diamond_square module * Implemented full diamond-square interpolation algorithm * Added tests for grid generation and point selection * Full implementation vectorized and working! (Need to check parameter settings, next) * Added possibility to initialize and interpolate on lower hierarchy levels * Added type hints to function declarations * Extended testing and fixed type hints * [ENH] Added plot orientations, topography and structured grid - [BUG] set_is_fault updates properly Surfaces * [DOC] Added some docs and making test running * Added several random functions to generate topography and extended description in tutorial notebook. * Small changes in notebooks (stored to avoid problems in branch switch) * [ENH] Capturing errors in gempy_to_rexfile.py [CLN] Deleted old set_gravity_interpolator * change interpolation function of topo along sections - still needs tests * [CLN] Move API to the root folder of gempy * add new topo section function for testing and comparing with old one * [ENH] Added editing function [CLN] Move gempy functions to modules and regions * [CLN] Refactor all notebooks * - minor * [TEST] Minor refactor * [ENH] First prototype of sphinx gallery running * [ENH] Add first example * [ENH] changed spline interpolation to interp2d cubic * DataforPullRequest * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * clean up functions for interpolating topography along set sections * move csv data of hierarchical modeling from notebooks to data * remove my copy of metropolis notebook * [DOC] Converted all notebooks into .py files that can be rendered by sphinx-gallery * Revert "[CLN] Move API to the root folder of gempy" This reverts commit e908000 * Refactor notebooks/data to examples/data for tests * [BUG] Fixed: colors for more than 67 surfaces. * [DOC] Converted all notebooks into .py files that can be rendered by sphinx-gallery * [DOC] Files converted in mac to avoid windows problems * [DOC] Converted all notebooks into .py files that can be rendered by sphinx-gallery * ChangeGemPyAPI * ChangeGemPyAPI * ChangeGemPyAPI * [DOC] Tidy up * [DOC] Tutorials to %% format * [DOC] Add subset of columns to render in the GeometricData - Added verbosity arg to gp.get_data * [BUG] Added default value to plot_2D * [MERGE] Merging sphinx and api branches * [MERGE] Merging pyvista polishing with api and sphinx * Generate colordict with own palette. * add default for argument method in interpolate_zvals_at_xy * [DOC] Tutorial one running - plot_2d: - accepts block and values now - Different series - [BUG] If only one axes plots on the whole figure - vista - [BUG] plot_data now works - [ENH] compute_model check for an interpolator - [Test] New test to try vista functionality api * Updated and cleaned module and extended tests * Fixed notebook and extended description; included comparison for different roughness values. * [CLN] Added restricting wrapper to all data objects * AddTypeHinting * [CLN] Slit the data.py module and fixing the imports * [CLN] Stack class encapsulates Series and faults * [DOC] Some sphinx config * [DOC] More shpinx config * [ENH] Move new plotting api to the main frame * [ENH] Lot of shpinx docs polishing * [ENH] Fixed the autodocs deprecation! * [CLN] Removed nptyping dependency - Fixed lost of types in Stack/Series - Lot of docstrings in ImplicitcoKriging * [DOC] All the ImplicitKriging class docstrings updated * [DOC] Plot 2D and 3D hyperlinks fixed * [DOC] Docstring has links to examples * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [BUG] Fixed marching cubes bug * [BUG] Fixed Colors topography pyvista * [BUG] Fixing travis: Apparently pad does not have explicit mode anymore * [TEST] Start porting the notebook test to a test file * [BUG] Solved #397 [TEST] - Added a test for JanN code - Added a test for changing the order of the surfaces - solved minor problems * [MERGE] Florian's diamond random topo merged * [ENH] First commit for topography.py rework * [ENH] Merged hillshading - Ported to the new plot2d code - Added test * [ENH] Topography fixed!!! - Finally random and gdal are pointing to the same directions - Test!! [ENH] Vertical exaggeration in pyvista * [ENH] Vertical exaggeration in 2d plot too - More test for 2d plot * [DOC] Added probability examples - Topography is saved now - Fixed latest arviz compatibility - Moving some probability functionality to modules - Minor plotting enhancements - added test pymc * [ENH] pyvista: scalar_bar - mjnor stuff * [ENH] Fixed masked marching cubes - pyvista scalar_bar inverted * [ENH] adapting code to scikit image 17.1 * [CLN] Minor cleaning * [ENH] Size of figures grow with number of axis - Better projection distance [BUG] - Axis label were breaking [TEST] - More 2D test * [DOC] Moved half of the tutorials to sphinx gallery * fixed get section polygons and updated tutorials notebook * deleted plotting function * [ENH] Fixed mask returning from interpolator - Fixed bug loading old models - Fixed bug masking the faults [TEST] Adding bunch of tests * [ENH] Add gdal to travis? * [ENH] Added a bunch of tutorials * [DOC] All examples and integration added * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis and added getting started * [DOC] Fixing travis and added getting started * [DOC] Fixing travis * [DOC] Fixing travis * Development flow update readme (#408) * Restructured and edited introduction readme up to installation * Updated readme, included now MacOSX 10.14 installation instructions. * Updated table of contents * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis - added more general documentation * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Adding installation and projects * [CLN] Remove all notebooks! * [CLN] small refactorings * [TEST] added test to travis * [ENH] All pyvista interactions running again! * [DOC] Fixing interactive notebooks * [DOC] Fixing travis to run test * [TEST] Fixing last test * [TEST] Fixing last test * [WIP] Sprint 2.2 - Merge of several open issues opened by me. (#396) * Update ch1-1_Basics.ipynb * Revert "Update ch1-1_Basics.ipynb" This reverts commit 1852684. * play around with stochastics in exploratory notebook * differentiate filename and path in moose export * fix errors in moose notebook * Delete main.yml * [CLN] Refactored DataMutation and Model to ImplicitCoKriging and Project * work on hierarchical modelling test notebook * [DOC] finish notebook with example for hierarchical modeling * [ENH] Giving up trying to edit current vista code - Added 'hasData' column to surfaces * [TEST] Ordering a bit the test * [ENH] Init of the new vista class * Added notebook with example of diamond square algorithm (and additional smoothing step) * Some edits for PEP8 conformity * [ENH] Added plot_surface_points * Vectorized topography generation using DS algorithm - example notebook, first steps for single hierarchy * Vectorized interpolation with padded checkerboard pattern to reduce number of possible cases * Extension to point selection on multiple hierarchies * Selection on multiple hierarchies, including padding and grid visualization; one problem with hierarchy calculation remaining, should be easy to fix. * Hierarchical point selection now working - notebook contains example comparable to example on Wikipedia (https://en.wikipedia.org/wiki/Diamond-square_algorithm#/media/File:Diamond_Square.svg) * Added hillshade example * Generalized point selection in DS algorithm * set up diamond-square module and test in gempy/utils * Methods for grid size determination and set-up of class structure * Updated module with grid selection plots and added (tutorial) notebook using the gempy.utils.diamond_square module * Implemented full diamond-square interpolation algorithm * Added tests for grid generation and point selection * Full implementation vectorized and working! (Need to check parameter settings, next) * Added possibility to initialize and interpolate on lower hierarchy levels * Added type hints to function declarations * Extended testing and fixed type hints * [ENH] Added plot orientations, topography and structured grid - [BUG] set_is_fault updates properly Surfaces * [DOC] Added some docs and making test running * Added several random functions to generate topography and extended description in tutorial notebook. * Small changes in notebooks (stored to avoid problems in branch switch) * [ENH] Capturing errors in gempy_to_rexfile.py [CLN] Deleted old set_gravity_interpolator * change interpolation function of topo along sections - still needs tests * [CLN] Move API to the root folder of gempy * add new topo section function for testing and comparing with old one * [ENH] Added editing function [CLN] Move gempy functions to modules and regions * [CLN] Refactor all notebooks * - minor * [TEST] Minor refactor * [ENH] First prototype of sphinx gallery running * [ENH] Add first example * [ENH] changed spline interpolation to interp2d cubic * DataforPullRequest * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * [TRY] Using travis to build docs * clean up functions for interpolating topography along set sections * move csv data of hierarchical modeling from notebooks to data * remove my copy of metropolis notebook * [DOC] Converted all notebooks into .py files that can be rendered by sphinx-gallery * Revert "[CLN] Move API to the root folder of gempy" This reverts commit e908000 * Refactor notebooks/data to examples/data for tests * [DOC] Converted all notebooks into .py files that can be rendered by sphinx-gallery * [DOC] Files converted in mac to avoid windows problems * [DOC] Converted all notebooks into .py files that can be rendered by sphinx-gallery * ChangeGemPyAPI * ChangeGemPyAPI * ChangeGemPyAPI * [DOC] Tidy up * [DOC] Tutorials to %% format * [DOC] Add subset of columns to render in the GeometricData - Added verbosity arg to gp.get_data * [BUG] Added default value to plot_2D * [MERGE] Merging sphinx and api branches * [MERGE] Merging pyvista polishing with api and sphinx * add default for argument method in interpolate_zvals_at_xy * [DOC] Tutorial one running - plot_2d: - accepts block and values now - Different series - [BUG] If only one axes plots on the whole figure - vista - [BUG] plot_data now works - [ENH] compute_model check for an interpolator - [Test] New test to try vista functionality api * Updated and cleaned module and extended tests * Fixed notebook and extended description; included comparison for different roughness values. * [CLN] Added restricting wrapper to all data objects * AddTypeHinting * [CLN] Slit the data.py module and fixing the imports * [CLN] Stack class encapsulates Series and faults * [DOC] Some sphinx config * [DOC] More shpinx config * [ENH] Move new plotting api to the main frame * [ENH] Lot of shpinx docs polishing * [ENH] Fixed the autodocs deprecation! * [CLN] Removed nptyping dependency - Fixed lost of types in Stack/Series - Lot of docstrings in ImplicitcoKriging * [DOC] All the ImplicitKriging class docstrings updated * [DOC] Plot 2D and 3D hyperlinks fixed * [DOC] Docstring has links to examples * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [TEST] Travis doc generation * [BUG] Fixed marching cubes bug * [BUG] Fixed Colors topography pyvista * [BUG] Fixing travis: Apparently pad does not have explicit mode anymore * [TEST] Start porting the notebook test to a test file * [BUG] Solved #397 [TEST] - Added a test for JanN code - Added a test for changing the order of the surfaces - solved minor problems * [MERGE] Florian's diamond random topo merged * [ENH] First commit for topography.py rework * [ENH] Merged hillshading - Ported to the new plot2d code - Added test * [ENH] Topography fixed!!! - Finally random and gdal are pointing to the same directions - Test!! [ENH] Vertical exaggeration in pyvista * [ENH] Vertical exaggeration in 2d plot too - More test for 2d plot * [DOC] Added probability examples - Topography is saved now - Fixed latest arviz compatibility - Moving some probability functionality to modules - Minor plotting enhancements - added test pymc * [ENH] pyvista: scalar_bar - mjnor stuff * [ENH] Fixed masked marching cubes - pyvista scalar_bar inverted * [ENH] adapting code to scikit image 17.1 * [CLN] Minor cleaning * [ENH] Size of figures grow with number of axis - Better projection distance [BUG] - Axis label were breaking [TEST] - More 2D test * [DOC] Moved half of the tutorials to sphinx gallery * [ENH] Fixed mask returning from interpolator - Fixed bug loading old models - Fixed bug masking the faults [TEST] Adding bunch of tests * [ENH] Add gdal to travis? * [ENH] Added a bunch of tutorials * [DOC] All examples and integration added * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis and added getting started * [DOC] Fixing travis and added getting started * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis - added more general documentation * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Fixing travis * [DOC] Adding installation and projects * [CLN] Remove all notebooks! * [CLN] small refactorings * [TEST] added test to travis * [ENH] All pyvista interactions running again! * [DOC] Fixing interactive notebooks * [DOC] Fixing travis to run test * [TEST] Fixing last test * [TEST] Fixing last test Co-authored-by: Japhiolite <jan.niederau@rwth-aachen.de> Co-authored-by: Florian Wellmann <flohorovicic@gmail.com> Co-authored-by: alexander.juestel <alexander.juestel@rwth-aachen.de> Co-authored-by: Alexander G. Zimmerman <alexander.zimmerman@rwth-aachen.de> * [DOC] Adding the notebooks! * [DOC] Adding the notebooks! * [DOC] Changes in Dockerfile * [ENH] Updated Dockerfile for preparation of gempy-server * [DOC] Some thoughts about Interpolator Epic * [ENH] Improved the function that generate the default gempy colors. However the whole class needs a better explanation of the api * [FIX] Added back the main 10 colors * Moved Petrel integration to subsurface module (#357) * [TEST] Refactor some test * [DOC] More thoughts on next Epic * [BUG] Fix elisas example * [DOC] Latest changes before release Co-authored-by: Japhiolite <jan.niederau@rwth-aachen.de> Co-authored-by: Alexander Schaaf <a.schaaf@abdn.ac.uk> Co-authored-by: Tobi Glaubach <tobias.glaubach@gmail.com> Co-authored-by: Jan von Harten <38279459+javoha@users.noreply.github.com> Co-authored-by: javoha <jan.von.harten@rwth-aachen.de> Co-authored-by: Florian Wellmann <flohorovicic@gmail.com> Co-authored-by: alexander.juestel <alexander.juestel@rwth-aachen.de> Co-authored-by: Alexander G. Zimmerman <alexander.zimmerman@rwth-aachen.de> Co-authored-by: Adam Kosík <adam.kosik@ost.ch> Co-authored-by: elimh <elisa.heim@gmx.de>
1 parent 6ef3bd5 commit a0a4e5b

File tree

480 files changed

+226883
-165230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+226883
-165230
lines changed

.github/workflows/main.yml

-30
This file was deleted.

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
*-checkpoint.ipynb
22

3+
.vscode
34
.idea
45
.DS_Store
5-
6+
.vs
67
.cache/
78
GeMpy/__pycache__/__init__.cpython-36.pyc
89
GeMpy/__pycache__/geomodeller_xml_obj.cpython-36.pyc
@@ -137,8 +138,11 @@ notebooks/prototype notebooks/vtk_exp_smooth_trnasitions
137138
notebooks/prototype notebooks/plots
138139

139140
docs/build
141+
docs/source
140142
test/figs
141143

142144
Profiles
143-
notebooks/data/input_data/Claudius/Results_
145+
examples/data/input_data/Claudius/Results_
146+
147+
/docs/source/gen_modules/
144148

.travis.yml

+51-8
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,66 @@ python:
77

88
env: TRAVIS=true
99

10+
before_install:
11+
# configure a headless display
12+
- git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
13+
- source ./gl-ci-helpers/travis/setup_headless_display.sh
14+
1015
install:
16+
- wget https://repo.anaconda.com/pkgs/misc/conda-execs/conda-latest-linux-64.exe -O conda.exe
17+
- chmod +x conda.exe
18+
- export CONDA_ALWAYS_YES=1
19+
# This is where you put any extra dependencies you may have.
20+
- ./conda.exe create -p $HOME/miniconda python=$TRAVIS_PYTHON_VERSION conda conda-build pytest six pytest-cov pytest-mock
21+
- export PATH="$HOME/miniconda/bin:$PATH"
22+
- hash -r
1123
- pip install --upgrade setuptools pip
12-
- pip install cython
1324
- pip install -r requirements.txt
25+
- pip install sphinx-gallery
1426
- pip install qgrid
1527
- pip install nbval
16-
- pip install git+git://github.com/Leguark/scikit-image@master
17-
- pip install vtk
1828
- pip install pyevtk
19-
- pip install dataclasses emg3d pyvista panel discretize
29+
- pip install arviz
30+
- pip install recommonmark
31+
- pip install dataclasses pyvista panel discretize # emg3d
32+
- pip install welly
33+
- conda install gdal
34+
- conda install --yes -c conda-forge python-graphviz
35+
- conda install -c anaconda libffi
36+
- pip install pymc3
37+
- pip install ipython
38+
# Install untested, non-required code (linter fails without them)
39+
- pip install ipython ipywidgets
40+
- export PATH="./bin:$PATH"
2041

2142
script:
22-
23-
- pytest -v notebooks/integrations/ --nbval-lax --ignore-glob='*discret*'
24-
- pytest -v notebooks/examples/ --nbval-lax --current-env --ignore-glob='*pography*' --ignore-glob='*lesmodel*' --ignore-glob='*Course*'
25-
- pytest -v notebooks/tutorials/ --nbval-lax --current-env --ignore-glob='*ch1-6*' --ignore-glob='ch1-7*' --ignore-glob='*ch1-10*' --ignore-glob='*MaskedMarchinCube_Onlap_relations*'
43+
- pytest -v notebooks/ --nbval-lax
2644
- pytest
2745

46+
stages:
47+
- test
48+
- deploy
49+
50+
jobs:
51+
include:
52+
- stage: test
53+
script:
54+
- pytest
55+
- stage: deploy
56+
name: Deploy to GitHub Pages
57+
# if: (NOT type IN (pull_request)) AND (branch = sphinx-gallery) # only deploy if merging on master
58+
59+
before_script:
60+
- pip install -e .
61+
- cd docs
62+
script: pipenv run make html
63+
deploy:
64+
provider: pages # deploy on github pages
65+
skip_cleanup: true
66+
github_token: $travis_doc # defined via the Travis interface
67+
local_dir: docs/build/html
68+
on:
69+
branch: sprint_2.2
70+
target_branch: gh-pages
2871
cache: pip
2972

DevelopersGuide.txt

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
Before a big commit.
2-
(we need to make the tests!!!)
3-
4-
- Check all notebooks work fine
5-
- Check that requirements has all the necessary libraries. Otherwise readmydocs may not produce the code tab
6-
- run update_doc_elements.sh to update the Shpinx tutorial notebooks
7-
- if you add some math to the notebooks probably you have to go afterwards to the rst and change the latex enviroment
8-
to ..math:
9-
- Then you can build or not the html to check offline if everything is in order
10-
- Push and check that readmydocs just worked fine
112

123
# set version number in setup.py, both for version and in download_url, also in the config file of the documentation
13-
version='X.X',
14-
download_url='https://github.com/cgre-aachen/gempy/archive/X.X.tar.gz',
4+
[ ]version='X.X',
5+
[] download_url='https://github.com/cgre-aachen/gempy/archive/X.X.tar.gz',
6+
[] in the config for sphinx
7+
158
# add new tag
169
$ git tag X.X -m "Add X.X tag for PyPI"
1710
# push git tag
@@ -35,3 +28,8 @@ BLD: Updates to the build process/scripts
3528
PERF: Performance improvement
3629
CLN: Code cleanup
3730

31+
32+
### Doc strings:
33+
34+
- Use sphinx reference a lot
35+
- Use decorator for arguments

Dockerfile

+37-22
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
# Heavily Inspired from https://github.com/jupyter/docker-stacks/tree/master/minimal-notebook
33
FROM nvidia/cuda:9.0-cudnn7-devel
44

5-
ENV THEANO_VERSION 1.0.3
6-
LABEL com.nvidia.theano.version="1.0.3"
7-
ENV PYGPU_VERSION 0.7.5
5+
# This loads nvidia cuda image
6+
# FROM nvidia/cuda
87

98
USER root
109

@@ -34,8 +33,8 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
3433
&& apt-get clean && \
3534
rm -rf /var/lib/apt/lists/*
3635

37-
#RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
38-
# locale-gen
36+
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
37+
locale-gen
3938

4039
# Install Tini
4140
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.9.0/tini && \
@@ -49,59 +48,75 @@ ENV PATH $CONDA_DIR/bin:$PATH
4948
ENV SHELL /bin/bash
5049
ENV NB_USER gempy
5150
ENV NB_UID 1000
52-
#ENV LC_ALL en_US.UTF-8
53-
#ENV LANG en_US.UTF-8
54-
#ENV LANGUAGE en_US.UTF-8
51+
ENV LC_ALL en_US.UTF-8
52+
ENV LANG en_US.UTF-8
53+
ENV LANGUAGE en_US.UTF-8
5554

56-
# Create jovyan user with UID=1000 and in the 'users' group
55+
# Create user with UID=1000 and in the 'users' group
5756
RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
5857
mkdir -p /opt/conda && \
5958
chown gempy /opt/conda
6059

6160
USER gempy
6261

63-
# Setup jovyan home directory
62+
# Setup home directory
6463
RUN mkdir /home/$NB_USER/work && \
6564
mkdir /home/$NB_USER/.jupyter && \
6665
mkdir /home/$NB_USER/.local && \
6766
echo "cacert=/etc/ssl/certs/ca-certificates.crt" > /home/$NB_USER/.curlrc
6867

69-
# Install conda as jovyan
70-
ENV CONDA_VER 4.3.31
68+
# Install conda as
69+
ENV CONDA_VER latest
7170
ENV CONDA_MD5 7fe70b214bee1143e3e3f0467b71453c
7271
RUN cd /tmp && \
7372
mkdir -p $CONDA_DIR && \
7473
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-${CONDA_VER}-Linux-x86_64.sh && \
75-
echo "$CONDA_MD5 *Miniconda3-${CONDA_VER}-Linux-x86_64.sh" | md5sum -c - && \
7674
/bin/bash Miniconda3-${CONDA_VER}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
7775
rm Miniconda3-${CONDA_VER}-Linux-x86_64.sh && \
78-
$CONDA_DIR/bin/conda install --quiet --yes conda==${CONDA_VER} && \
7976
conda config --set auto_update_conda False && \
8077
conda clean -tipsy
8178

82-
# Install Jupyter notebook as jovyan
79+
# Install Jupyter notebook
8380
RUN conda install --quiet --yes \
8481
terminado \
8582
mkl-service \
8683
&& conda clean -tipsy
8784

8885
# Install Theano, pygpu
89-
RUN conda install -c mila-udem -y Theano=$THEANO_VERSION pygpu=$PYGPU_VERSION
90-
86+
RUN conda install -c conda-forge pygpu
87+
RUN conda install theano gdal
9188

9289
ENV MKL_THREADING_LAYER GNU
9390

9491
USER root
9592

96-
RUN pip install --upgrade --force-reinstall Theano>=1.0.4
97-
RUN pip install gempy pandas==0.24 cython pytest seaborn networkx ipywidgets scikit-image
98-
99-
10093
# Configure container startup as root
10194
EXPOSE 8888
10295

96+
# Clone gempy
10397
WORKDIR /home/$NB_USER/work
104-
RUN git clone https://github.com/cgre-aachen/gempy.git
98+
RUN git clone https://github.com/cgre-aachen/gempy.git --depth 1 --branch master
99+
100+
WORKDIR /home/$NB_USER/work/gempy
101+
102+
# Pull from release
103+
RUN echo '2014122501' >/dev/null && git pull
104+
# This is necessary to get rid off the scan.c file missing
105+
106+
RUN pip install --upgrade --force-reinstall Theano>=1.0.4
107+
RUN pip install -e .
108+
RUN pip install -r optional-requirements.txt
109+
110+
# Pyvista headless display
111+
RUN sudo apt-get -y update && \
112+
sudo apt-get -y install xvfb & \
113+
export DISPLAY=:99.0 && \
114+
export PYVISTA_OFF_SCREEN=true && \
115+
export PYVISTA_USE_PANEL=true && \
116+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & \
117+
sleep 3
118+
119+
RUN sudo apt update && sudo apt -y install python-qt4 libgl1-mesa-glx
105120
# ENTRYPOINT ["tini", "--"]
106121

107122
## Add local files as late as possible to avoid cache busting

0 commit comments

Comments
 (0)