Skip to content

Commit

Permalink
GemPy 2.2.0 (#428)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
11 people committed May 29, 2020
1 parent 6ef3bd5 commit a0a4e5b
Show file tree
Hide file tree
Showing 480 changed files with 226,883 additions and 165,230 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/main.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
*-checkpoint.ipynb

.vscode
.idea
.DS_Store

.vs
.cache/
GeMpy/__pycache__/__init__.cpython-36.pyc
GeMpy/__pycache__/geomodeller_xml_obj.cpython-36.pyc
Expand Down Expand Up @@ -137,8 +138,11 @@ notebooks/prototype notebooks/vtk_exp_smooth_trnasitions
notebooks/prototype notebooks/plots

docs/build
docs/source
test/figs

Profiles
notebooks/data/input_data/Claudius/Results_
examples/data/input_data/Claudius/Results_

/docs/source/gen_modules/

59 changes: 51 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,66 @@ python:

env: TRAVIS=true

before_install:
# configure a headless display
- git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
- source ./gl-ci-helpers/travis/setup_headless_display.sh

install:
- wget https://repo.anaconda.com/pkgs/misc/conda-execs/conda-latest-linux-64.exe -O conda.exe
- chmod +x conda.exe
- export CONDA_ALWAYS_YES=1
# This is where you put any extra dependencies you may have.
- ./conda.exe create -p $HOME/miniconda python=$TRAVIS_PYTHON_VERSION conda conda-build pytest six pytest-cov pytest-mock
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- pip install --upgrade setuptools pip
- pip install cython
- pip install -r requirements.txt
- pip install sphinx-gallery
- pip install qgrid
- pip install nbval
- pip install git+git://github.com/Leguark/scikit-image@master
- pip install vtk
- pip install pyevtk
- pip install dataclasses emg3d pyvista panel discretize
- pip install arviz
- pip install recommonmark
- pip install dataclasses pyvista panel discretize # emg3d
- pip install welly
- conda install gdal
- conda install --yes -c conda-forge python-graphviz
- conda install -c anaconda libffi
- pip install pymc3
- pip install ipython
# Install untested, non-required code (linter fails without them)
- pip install ipython ipywidgets
- export PATH="./bin:$PATH"

script:

- pytest -v notebooks/integrations/ --nbval-lax --ignore-glob='*discret*'
- pytest -v notebooks/examples/ --nbval-lax --current-env --ignore-glob='*pography*' --ignore-glob='*lesmodel*' --ignore-glob='*Course*'
- 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*'
- pytest -v notebooks/ --nbval-lax
- pytest

stages:
- test
- deploy

jobs:
include:
- stage: test
script:
- pytest
- stage: deploy
name: Deploy to GitHub Pages
# if: (NOT type IN (pull_request)) AND (branch = sphinx-gallery) # only deploy if merging on master

before_script:
- pip install -e .
- cd docs
script: pipenv run make html
deploy:
provider: pages # deploy on github pages
skip_cleanup: true
github_token: $travis_doc # defined via the Travis interface
local_dir: docs/build/html
on:
branch: sprint_2.2
target_branch: gh-pages
cache: pip

20 changes: 9 additions & 11 deletions DevelopersGuide.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
Before a big commit.
(we need to make the tests!!!)

- Check all notebooks work fine
- Check that requirements has all the necessary libraries. Otherwise readmydocs may not produce the code tab
- run update_doc_elements.sh to update the Shpinx tutorial notebooks
- if you add some math to the notebooks probably you have to go afterwards to the rst and change the latex enviroment
to ..math:
- Then you can build or not the html to check offline if everything is in order
- Push and check that readmydocs just worked fine

# set version number in setup.py, both for version and in download_url, also in the config file of the documentation
version='X.X',
download_url='https://github.com/cgre-aachen/gempy/archive/X.X.tar.gz',
[ ]version='X.X',
[] download_url='https://github.com/cgre-aachen/gempy/archive/X.X.tar.gz',
[] in the config for sphinx

# add new tag
$ git tag X.X -m "Add X.X tag for PyPI"
# push git tag
Expand All @@ -35,3 +28,8 @@ BLD: Updates to the build process/scripts
PERF: Performance improvement
CLN: Code cleanup


### Doc strings:

- Use sphinx reference a lot
- Use decorator for arguments
59 changes: 37 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# Heavily Inspired from https://github.com/jupyter/docker-stacks/tree/master/minimal-notebook
FROM nvidia/cuda:9.0-cudnn7-devel

ENV THEANO_VERSION 1.0.3
LABEL com.nvidia.theano.version="1.0.3"
ENV PYGPU_VERSION 0.7.5
# This loads nvidia cuda image
# FROM nvidia/cuda

USER root

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

#RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
# locale-gen
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen

# Install Tini
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.9.0/tini && \
Expand All @@ -49,59 +48,75 @@ ENV PATH $CONDA_DIR/bin:$PATH
ENV SHELL /bin/bash
ENV NB_USER gempy
ENV NB_UID 1000
#ENV LC_ALL en_US.UTF-8
#ENV LANG en_US.UTF-8
#ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

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

USER gempy

# Setup jovyan home directory
# Setup home directory
RUN mkdir /home/$NB_USER/work && \
mkdir /home/$NB_USER/.jupyter && \
mkdir /home/$NB_USER/.local && \
echo "cacert=/etc/ssl/certs/ca-certificates.crt" > /home/$NB_USER/.curlrc

# Install conda as jovyan
ENV CONDA_VER 4.3.31
# Install conda as
ENV CONDA_VER latest
ENV CONDA_MD5 7fe70b214bee1143e3e3f0467b71453c
RUN cd /tmp && \
mkdir -p $CONDA_DIR && \
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-${CONDA_VER}-Linux-x86_64.sh && \
echo "$CONDA_MD5 *Miniconda3-${CONDA_VER}-Linux-x86_64.sh" | md5sum -c - && \
/bin/bash Miniconda3-${CONDA_VER}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
rm Miniconda3-${CONDA_VER}-Linux-x86_64.sh && \
$CONDA_DIR/bin/conda install --quiet --yes conda==${CONDA_VER} && \
conda config --set auto_update_conda False && \
conda clean -tipsy

# Install Jupyter notebook as jovyan
# Install Jupyter notebook
RUN conda install --quiet --yes \
terminado \
mkl-service \
&& conda clean -tipsy

# Install Theano, pygpu
RUN conda install -c mila-udem -y Theano=$THEANO_VERSION pygpu=$PYGPU_VERSION

RUN conda install -c conda-forge pygpu
RUN conda install theano gdal

ENV MKL_THREADING_LAYER GNU

USER root

RUN pip install --upgrade --force-reinstall Theano>=1.0.4
RUN pip install gempy pandas==0.24 cython pytest seaborn networkx ipywidgets scikit-image


# Configure container startup as root
EXPOSE 8888

# Clone gempy
WORKDIR /home/$NB_USER/work
RUN git clone https://github.com/cgre-aachen/gempy.git
RUN git clone https://github.com/cgre-aachen/gempy.git --depth 1 --branch master

WORKDIR /home/$NB_USER/work/gempy

# Pull from release
RUN echo '2014122501' >/dev/null && git pull
# This is necessary to get rid off the scan.c file missing

RUN pip install --upgrade --force-reinstall Theano>=1.0.4
RUN pip install -e .
RUN pip install -r optional-requirements.txt

# Pyvista headless display
RUN sudo apt-get -y update && \
sudo apt-get -y install xvfb & \
export DISPLAY=:99.0 && \
export PYVISTA_OFF_SCREEN=true && \
export PYVISTA_USE_PANEL=true && \
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & \
sleep 3

RUN sudo apt update && sudo apt -y install python-qt4 libgl1-mesa-glx
# ENTRYPOINT ["tini", "--"]

## Add local files as late as possible to avoid cache busting
Expand Down
Loading

0 comments on commit a0a4e5b

Please sign in to comment.