Skip to content

Commit

Permalink
Merge pull request #10 from tsutterley/pip
Browse files Browse the repository at this point in the history
pip installable version of pointCollection
  • Loading branch information
SmithB authored Jun 17, 2020
2 parents 779cecd + dc27c22 commit 47be54f
Show file tree
Hide file tree
Showing 58 changed files with 180 additions and 10 deletions.
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
3 changes: 3 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx
recommonmark
sphinx_markdown_tables
18 changes: 18 additions & 0 deletions doc/source/Install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Installation
============

Presently pointCollection is only available for use as a [github repository](https://github.com/SmithB/pointCollection).
The contents of the repository can be download as a [zipped file](https://github.com/SmithB/pointCollection/archive/master.zip) or cloned.
To use this repository, please fork into your own account and then clone onto your system.
```bash
git clone https://github.com/SmithB/pointCollection.git
```
Can then install using `setuptools`
```bash
python setup.py install
```
or `pip`
```bash
python3 -m pip install --user .
```
Executable versions of this repository can also be tested using [Binder](https://mybinder.org/v2/gh/SmithB/pointCollection/master) and [Pangeo](https://binder.pangeo.io/v2/gh/SmithB/pointCollection/master).
59 changes: 59 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'pointCollection'
copyright = '2020, Ben Smith'
author = 'Ben Smith'

# The full version, including alpha/beta/rc tags
release = '1.0.0.0'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['recommonmark','sphinx_markdown_tables']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['**.ipynb_checkpoints']

# location of master document (by default sphinx looks for contents.rst)
master_doc = 'index'

# -- Configuration options ---------------------------------------------------
autosummary_generate = True

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'bizstyle'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
10 changes: 10 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pointCollection
===============

Python utilities for organizing and manipulating point data

.. toctree::
:maxdepth: 2
:caption: Getting Started:

Install.md
4 changes: 2 additions & 2 deletions GeoIndex_demo.ipynb → notebooks/GeoIndex_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"metadata": {},
"outputs": [],
"source": [
"test_dir='test_data/for_geoindex'\n",
"test_dir='../test_data/for_geoindex'\n",
"if not os.path.isdir(test_dir):\n",
" os.mkdir(test_dir)\n",
"for offset in np.arange(-40, 50, 10):\n",
Expand Down Expand Up @@ -581,7 +581,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.8.2"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions Tile_demo.ipynb → notebooks/Tile_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@
}
],
"source": [
"gi_file='test_data/for_geoindex/GeoIndex.h5'\n",
"gi_file='../test_data/for_geoindex/GeoIndex.h5'\n",
"srs_proj4 = '+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '\n",
"\n",
"\n",
"tile_dir='test_Data/for_geoindex/tiles'\n",
"tile_dir='../test_Data/for_geoindex/tiles'\n",
"if not os.path.isdir(tile_dir):\n",
" os.mkdir(tile_dir)\n",
"else:\n",
Expand Down Expand Up @@ -175,7 +175,7 @@
"metadata": {},
"outputs": [],
"source": [
"test_dir='test_data/for_geoindex/other_diagonal'\n",
"test_dir='../test_data/for_geoindex/other_diagonal'\n",
"\n",
"x=np.arange(-50, 50, dtype=np.float64)\n",
"y=-0.8*x\n",
Expand Down Expand Up @@ -410,7 +410,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.8.2"
}
},
"nbformat": 4,
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions point_demo.ipynb → notebooks/point_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
}
],
"source": [
"ATL06_file=os.path.dirname(pc.__file__)+'/test_data/ATL06_20190205041106_05910210_209_01.h5'\n",
"ATL06_file='../test_data/ATL06_20190205041106_05910210_209_01.h5'\n",
"D_06=pc.ATL06.data().from_h5(ATL06_file)\n",
"print(D_06)"
]
Expand Down Expand Up @@ -358,7 +358,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.8.2"
}
},
"nbformat": 4,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: []

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: doc/requirements.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
from setuptools import setup, find_packages

with open("README.md", "r") as fh:
long_description = fh.read()

setup(
name='Utilities for organizing and manipulating point data',
name='pointCollection',
version='1.0.0.0',
description='Python',
description='Utilities for organizing and manipulating point data',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/SmithB/pointCollection',
author='Ben Smith',
author_email='besmith@uw.edu',
Expand Down

0 comments on commit 47be54f

Please sign in to comment.