Skip to content

Commit

Permalink
docs: renaming cython to _cython so its not included in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Jun 14, 2022
1 parent 3a3058f commit 27e88a1
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

logger = getLogger(__name__)

from .cython.dsi_helper import fold_cg
from ._cython.dsi_helper import fold_cg


class DiscreteFoldInterpolator(PiecewiseLinearInterpolator):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Piecewise linear interpolator
"""
import numpy as np
from LoopStructural.interpolators.cython.dsi_helper import cg, fold_cg
from LoopStructural.interpolators._cython.dsi_helper import cg, fold_cg

from LoopStructural.interpolators import DiscreteInterpolator
from LoopStructural.interpolators import InterpolatorType
Expand Down
20 changes: 20 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM continuumio/miniconda3
LABEL maintainer="lachlan.grose@monash.edu"
#This docker image has been adapted from the lavavu dockerfile
# install things

RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
gcc \
g++ \
libc-dev \
make
RUN conda install -c conda-forge theano cython numpy pandas imageio scipy matplotlib sphinx sphinx-gallery sphinxcontrib-bibtex sphinx_rtd_theme myst-parser scikit-learn scikit-image pyamg flake8 pytest networkx -y
RUN pip install lavavu-osmesa
COPY . LoopStructural
#RUN git clone https://github.com/Loop3D/LoopStructural.git
WORKDIR LoopStructural
RUN pip install .
WORKDIR docs
RUN conda install -c conda-forge pydata-sphinx-theme
RUN make html
115 changes: 61 additions & 54 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#setup cython code
# setup cython code
import sys

try:
from setuptools import setup, find_packages
from setuptools import setup, find_packages
except:
raise RuntimeError("Cannot import setuptools \n"\
"python -m pip install setuptools")
sys.exit(1)
raise RuntimeError("Cannot import setuptools \n" "python -m pip install setuptools")
sys.exit(1)

try:
from Cython.Build import cythonize
from Cython.Build import cythonize
except:
raise RuntimeError("Cannot import cython \n"\
"python -m pip install cython")
sys.exit(1)
raise RuntimeError("Cannot import cython \n" "python -m pip install cython")
sys.exit(1)
try:
import numpy
import numpy
except:
raise RuntimeError("Cannot import numpy \n"\
"python -m pip install numpy")
sys.exit(1)

raise RuntimeError("Cannot import numpy \n" "python -m pip install numpy")
sys.exit(1)

import numpy
import os
import codecs
Expand All @@ -32,44 +30,53 @@
version = version["__version__"]

setup(
name="LoopStructural",
install_requires=[
'numpy>=1.18', #need to fix numpy to 1.18 because we build against it
'pandas',
'scipy',
'scikit-image',
'scikit-learn',
'tqdm',
'numba',
'geostatspy',
'statsmodels',
'scikit-fmm'
],
description="Open source 3D structural geology modelling",
long_description=codecs.open("README.md", "r", "utf-8").read(),
author="Lachlan Grose",
author_email="lachlan.grose@monash.edu",
license=("MIT"),
url="https://loop3d.github.io/LoopStructural/",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"License :: Free for non-commercial use",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Graphics :: 3D Modeling",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
],
version=version,
name="LoopStructural",
install_requires=[
"numpy>=1.18", # need to fix numpy to 1.18 because we build against it
"pandas",
"scipy",
"scikit-image",
"scikit-learn",
"tqdm",
"numba",
"geostatspy",
"statsmodels",
"scikit-fmm",
],
description="Open source 3D structural geology modelling",
long_description=codecs.open("README.md", "r", "utf-8").read(),
author="Lachlan Grose",
author_email="lachlan.grose@monash.edu",
license=("MIT"),
url="https://loop3d.github.io/LoopStructural/",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"License :: Free for non-commercial use",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Graphics :: 3D Modeling",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
],
version=version,
packages=find_packages(),
ext_modules=cythonize("LoopStructural/interpolators/cython/*.pyx",compiler_directives={"language_level": "3"}),
include_dirs=[numpy.get_include()],
include_package_data=True,
package_data={'LoopStructural':['datasets/data/*.csv','datasets/data/*.txt']},
keywords=['earth sciences','geology', '3-D modelling', 'structural geology', 'uncertainty']
)
ext_modules=cythonize(
"LoopStructural/interpolators/_cython/*.pyx",
compiler_directives={"language_level": "3"},
),
include_dirs=[numpy.get_include()],
include_package_data=True,
package_data={"LoopStructural": ["datasets/data/*.csv", "datasets/data/*.txt"]},
keywords=[
"earth sciences",
"geology",
"3-D modelling",
"structural geology",
"uncertainty",
],
)

0 comments on commit 27e88a1

Please sign in to comment.