-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f6e1d91
Showing
911 changed files
with
849,713 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
language: python | ||
|
||
dist: xenial | ||
|
||
python: | ||
- '3.7' | ||
|
||
env: TRAVIS=true | ||
|
||
install: | ||
- pip install --upgrade setuptools pip | ||
- pip install cython | ||
- pip install -r requirements.txt | ||
- 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 | ||
|
||
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 | ||
|
||
cache: pip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "/Users/zhouji/anaconda3/envs/gempy/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Contributing | ||
|
||
We welcome and encoruage everyone to contribute to GemPy! | ||
Contributions can be questions, bug reports, feature requests and new code. | ||
Here is how to get started. | ||
|
||
## Issues | ||
|
||
### Questions | ||
|
||
For questions about GemPy (e.g. its applications, functionality, and usage), | ||
please [search the existing issues for related questions](https://github.com/cgre-aachen/gempy/issues). | ||
If your question has not already been asked, then [make a new issue](https://github.com/cgre-aachen/gempy/issues/new/choose). | ||
|
||
### Reporting Bugs | ||
|
||
Please report bugs on the [issue page using the bug report template](https://github.com/cgre-aachen/gempy/issues/new?assignees=&labels=&template=bug_report.md&title=) and label the issue as a bug. | ||
The template asks essential questions for you to answer so that we can to understand, reproduce, and fix the bug. | ||
Be verbose! | ||
Whenever possible, provide tracebacks and/or error messages, screenshots, and sample code or other files. | ||
|
||
### Feature Requests | ||
|
||
We encourage users to submit ideas for improvements to the GemPy project. For | ||
this please create an issue on the | ||
[issue page](https://github.com/cgre-aachen/gempy/issues) with the *Feature | ||
Request* template and label. Please make sure to use a descriptive title and to | ||
provide ample background information to help us implement that functionality | ||
in the future. | ||
|
||
## Contributing New Code | ||
|
||
Any code contributions are welcome, | ||
whether fixing a typo or bug, | ||
adding new post-processing/plotting functionality, | ||
improve core functionality, | ||
or anything that you think should be in the repository. | ||
|
||
Contributions should address an open issue (either a bug or a feature request). | ||
If you have found a new bug | ||
or have an idea or a new feature, | ||
then please [open the issue](https://github.com/cgre-aachen/gempy/issues/new/choose) | ||
for discussion and link to that issue in your pull request. | ||
|
||
### Python code guidelines | ||
We aim to follow particular Python coding guidelines to improve the sustainability and positive impact of this community project: | ||
|
||
- Follow [The Zen of Python](https://www.python.org/dev/peps/pep-0020/), most importantly "readability counts" when writing Python code. | ||
- Adhere to the [Style Guide for Python Code (PEP8)](https://www.python.org/dev/peps/pep-0008/). | ||
- Write thorough and effective documentation: | ||
Make a docstring for each module, function, class, and method, | ||
all following [PEP 257](https://www.python.org/dev/peps/pep-0257/) for high-level guidelines | ||
and [Google Python Style Guidelines](http://google.github.io/styleguide/pyguide.html) for Syntax. | ||
**Example function documentation:** | ||
```python | ||
def func(arg1: int, arg2: float) -> int: | ||
"""A concise one line summary of the function. | ||
Additional information and description of the function, if necessary. This | ||
can be as long and verbose as you think is necessary for other users and | ||
developers to understand your functionality. | ||
Args: | ||
arg1 (int): Description of the first argument. | ||
arg2 (float): Description of the second argument. Please use hanging | ||
indentation for multi-line argument descriptions. | ||
Returns: | ||
(int) Description of the return value(s) | ||
""" | ||
return 42 | ||
``` | ||
- The code should explain the *what* and *how*. Add inline comments to explain the *why*. | ||
If an inline comment seems to be needed, consider first making the code more readable. | ||
For all comments, follow [PEP 8](https://www.python.org/dev/peps/pep-0008/). | ||
- Test every line of code. Untested code is dead code. | ||
|
||
### Licensing | ||
|
||
All contributed code will be licensed under | ||
[a LGPL-3 license](https://github.com/cgre-aachen/gempy/blob/master/LICENSE). | ||
If you did not write the code yourself, | ||
it is your responsibility to ensure that the existing license is compatible | ||
and included in the contributed files. | ||
In general we discourage contributing third party code. | ||
|
||
### Testing | ||
|
||
Our test suite uses [`pytest`](https://docs.pytest.org/). | ||
You should be familiar with `pytest` before contributing. | ||
Please run all tests locally before creating a pull request. | ||
You can do this by running `pytest` via your terminal in your GemPy folder: | ||
```bash | ||
cd ./path/to/gempy | ||
pytest | ||
``` | ||
All tests are located in the `test` folder and its subfolders. | ||
All contributed code must include test code in the pull request. | ||
|
||
### Pull Requests | ||
|
||
All contributions are made via pull requests (PR's) to the master branch. | ||
You must complete the checklist in the [PR template](https://github.com/cgre-aachen/gempy/blob/master/.github/PULL_REQUEST_TEMPLATE.md) before we will review the PR and consider merging your contribution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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', | ||
[] in the config for sphinx | ||
|
||
# add new tag | ||
$ git tag X.X -m "Add X.X tag for PyPI" | ||
# push git tag | ||
$ git push --tags origin master | ||
# upload newest version to PyPi | ||
# First create the dist | ||
python3 setup.py sdist bdist_wheel | ||
|
||
# Second upload the distributions | ||
twine upload dist/* | ||
|
||
|
||
|
||
### Type of commits: | ||
|
||
ENH: Enhancement, new functionality | ||
BUG: Bug fix | ||
DOC: Additions/updates to documentation | ||
TST: Additions/updates to tests | ||
BLD: Updates to the build process/scripts | ||
PERF: Performance improvement | ||
CLN: Code cleanup | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# Heavily intspired by docker theano | ||
# 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 | ||
|
||
USER root | ||
|
||
# Install all OS dependencies for fully functional notebook server | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update && apt-get install -yq --no-install-recommends \ | ||
git \ | ||
vim \ | ||
jed \ | ||
emacs \ | ||
wget \ | ||
build-essential \ | ||
python-dev \ | ||
ca-certificates \ | ||
bzip2 \ | ||
unzip \ | ||
libsm6 \ | ||
pandoc \ | ||
texlive-latex-base \ | ||
texlive-latex-extra \ | ||
texlive-fonts-extra \ | ||
texlive-fonts-recommended \ | ||
texlive-generic-recommended \ | ||
sudo \ | ||
locales \ | ||
libxrender1 \ | ||
&& apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
#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 && \ | ||
echo "faafbfb5b079303691a939a747d7f60591f2143164093727e870b289a44d9872 *tini" | sha256sum -c - && \ | ||
mv tini /usr/local/bin/tini && \ | ||
chmod +x /usr/local/bin/tini | ||
|
||
# Configure environment | ||
ENV CONDA_DIR /opt/conda | ||
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 | ||
|
||
# Create jovyan 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 | ||
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 | ||
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 | ||
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 | ||
|
||
|
||
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 | ||
|
||
WORKDIR /home/$NB_USER/work | ||
RUN git clone https://github.com/cgre-aachen/gempy.git | ||
# ENTRYPOINT ["tini", "--"] | ||
|
||
## Add local files as late as possible to avoid cache busting | ||
## Start notebook server | ||
#COPY start-notebook.sh /usr/local/bin/ | ||
#RUN chmod 755 /usr/local/bin/start-notebook.sh | ||
#COPY jupyter_notebook_config_secure.py /home/$NB_USER/.jupyter/jupyter_notebook_config.py | ||
#COPY notebook /home/$NB_USER/work/notebook | ||
|
||
## My own change | ||
# | ||
#RUN apt-get update && apt-get install -y \ | ||
# g++ \ | ||
# && \ | ||
# apt-get clean && \ | ||
# rm -rf /var/lib/apt/lists/* | ||
# | ||
#COPY theanorc /home/$NB_USER/.theanorc | ||
# | ||
## Make sure user jovyan owns files in HOME | ||
#RUN chown -R $NB_USER:users /home/$NB_USER | ||
# | ||
## Switch back to jovyan to avoid accidental container runs as root | ||
#USER jovyan | ||
# | ||
#RUN mkdir data && cd data && wget http://www.iro.umontreal.ca/~lisa/deep/data/mnist/mnist_py3k.pkl.gz -O mnist.pkl.gz | ||
# | ||
#CMD ["start-notebook.sh", "notebook"] |
Oops, something went wrong.