diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/doc/Makefile @@ -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) diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000..6247f7e --- /dev/null +++ b/doc/make.bat @@ -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 diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..4229bf7 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx +recommonmark +sphinx_markdown_tables diff --git a/doc/source/Install.md b/doc/source/Install.md new file mode 100644 index 0000000..0826e4a --- /dev/null +++ b/doc/source/Install.md @@ -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). diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..08fb7d1 --- /dev/null +++ b/doc/source/conf.py @@ -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'] diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..1402333 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,10 @@ +pointCollection +=============== + +Python utilities for organizing and manipulating point data + +.. toctree:: + :maxdepth: 2 + :caption: Getting Started: + + Install.md diff --git a/GeoIndex_demo.ipynb b/notebooks/GeoIndex_demo.ipynb similarity index 99% rename from GeoIndex_demo.ipynb rename to notebooks/GeoIndex_demo.ipynb index b7cfd95..1eb801f 100644 --- a/GeoIndex_demo.ipynb +++ b/notebooks/GeoIndex_demo.ipynb @@ -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", @@ -581,7 +581,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.8.2" } }, "nbformat": 4, diff --git a/Tile_demo.ipynb b/notebooks/Tile_demo.ipynb similarity index 99% rename from Tile_demo.ipynb rename to notebooks/Tile_demo.ipynb index 3c6f265..6711fef 100644 --- a/Tile_demo.ipynb +++ b/notebooks/Tile_demo.ipynb @@ -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", @@ -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", @@ -410,7 +410,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.8.2" } }, "nbformat": 4, diff --git a/map_1415.ipynb b/notebooks/map_1415.ipynb similarity index 100% rename from map_1415.ipynb rename to notebooks/map_1415.ipynb diff --git a/map_CS2_fit.ipynb b/notebooks/map_CS2_fit.ipynb similarity index 100% rename from map_CS2_fit.ipynb rename to notebooks/map_CS2_fit.ipynb diff --git a/point_demo.ipynb b/notebooks/point_demo.ipynb similarity index 99% rename from point_demo.ipynb rename to notebooks/point_demo.ipynb index b81ed2e..054e621 100644 --- a/point_demo.ipynb +++ b/notebooks/point_demo.ipynb @@ -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)" ] @@ -358,7 +358,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.9" + "version": "3.8.2" } }, "nbformat": 4, diff --git a/tide_demo.ipynb b/notebooks/tide_demo.ipynb similarity index 100% rename from tide_demo.ipynb rename to notebooks/tide_demo.ipynb diff --git a/ATL06/__init__.py b/pointCollection/ATL06/__init__.py similarity index 100% rename from ATL06/__init__.py rename to pointCollection/ATL06/__init__.py diff --git a/ATL06/data.py b/pointCollection/ATL06/data.py similarity index 100% rename from ATL06/data.py rename to pointCollection/ATL06/data.py diff --git a/ATL06/tile.py b/pointCollection/ATL06/tile.py similarity index 100% rename from ATL06/tile.py rename to pointCollection/ATL06/tile.py diff --git a/ATL11/__init__.py b/pointCollection/ATL11/__init__.py similarity index 100% rename from ATL11/__init__.py rename to pointCollection/ATL11/__init__.py diff --git a/ATL11/crossover_data.py b/pointCollection/ATL11/crossover_data.py similarity index 100% rename from ATL11/crossover_data.py rename to pointCollection/ATL11/crossover_data.py diff --git a/ATL11/data.py b/pointCollection/ATL11/data.py similarity index 100% rename from ATL11/data.py rename to pointCollection/ATL11/data.py diff --git a/ATL11/demo.py b/pointCollection/ATL11/demo.py similarity index 100% rename from ATL11/demo.py rename to pointCollection/ATL11/demo.py diff --git a/ATM_Qfit/__init__.py b/pointCollection/ATM_Qfit/__init__.py similarity index 100% rename from ATM_Qfit/__init__.py rename to pointCollection/ATM_Qfit/__init__.py diff --git a/ATM_Qfit/data.py b/pointCollection/ATM_Qfit/data.py similarity index 100% rename from ATM_Qfit/data.py rename to pointCollection/ATM_Qfit/data.py diff --git a/ATM_WF/__init__.py b/pointCollection/ATM_WF/__init__.py similarity index 100% rename from ATM_WF/__init__.py rename to pointCollection/ATM_WF/__init__.py diff --git a/ATM_WF/data.py b/pointCollection/ATM_WF/data.py similarity index 100% rename from ATM_WF/data.py rename to pointCollection/ATM_WF/data.py diff --git a/CS2/__init__.py b/pointCollection/CS2/__init__.py similarity index 100% rename from CS2/__init__.py rename to pointCollection/CS2/__init__.py diff --git a/CS2/data.py b/pointCollection/CS2/data.py similarity index 100% rename from CS2/data.py rename to pointCollection/CS2/data.py diff --git a/CS2_retracked_POCA/__init__.py b/pointCollection/CS2_retracked_POCA/__init__.py similarity index 100% rename from CS2_retracked_POCA/__init__.py rename to pointCollection/CS2_retracked_POCA/__init__.py diff --git a/CS2_retracked_POCA/tile.py b/pointCollection/CS2_retracked_POCA/tile.py similarity index 100% rename from CS2_retracked_POCA/tile.py rename to pointCollection/CS2_retracked_POCA/tile.py diff --git a/CS2_retracked_SW/__init__.py b/pointCollection/CS2_retracked_SW/__init__.py similarity index 100% rename from CS2_retracked_SW/__init__.py rename to pointCollection/CS2_retracked_SW/__init__.py diff --git a/CS2_retracked_SW/tile.py b/pointCollection/CS2_retracked_SW/tile.py similarity index 100% rename from CS2_retracked_SW/tile.py rename to pointCollection/CS2_retracked_SW/tile.py diff --git a/CS2_wfm/__init__.py b/pointCollection/CS2_wfm/__init__.py similarity index 100% rename from CS2_wfm/__init__.py rename to pointCollection/CS2_wfm/__init__.py diff --git a/CS2_wfm/data.py b/pointCollection/CS2_wfm/data.py similarity index 100% rename from CS2_wfm/data.py rename to pointCollection/CS2_wfm/data.py diff --git a/Qfit.py b/pointCollection/Qfit.py similarity index 100% rename from Qfit.py rename to pointCollection/Qfit.py diff --git a/__init__.py b/pointCollection/__init__.py similarity index 100% rename from __init__.py rename to pointCollection/__init__.py diff --git a/bin_rows.py b/pointCollection/bin_rows.py similarity index 100% rename from bin_rows.py rename to pointCollection/bin_rows.py diff --git a/data.py b/pointCollection/data.py similarity index 100% rename from data.py rename to pointCollection/data.py diff --git a/geoIndex.py b/pointCollection/geoIndex.py similarity index 100% rename from geoIndex.py rename to pointCollection/geoIndex.py diff --git a/glah12/__init__.py b/pointCollection/glah12/__init__.py similarity index 100% rename from glah12/__init__.py rename to pointCollection/glah12/__init__.py diff --git a/glah12/campaign_bias_correction.py b/pointCollection/glah12/campaign_bias_correction.py similarity index 100% rename from glah12/campaign_bias_correction.py rename to pointCollection/glah12/campaign_bias_correction.py diff --git a/glah12/data.py b/pointCollection/glah12/data.py similarity index 100% rename from glah12/data.py rename to pointCollection/glah12/data.py diff --git a/grid/WV_date.py b/pointCollection/grid/WV_date.py similarity index 100% rename from grid/WV_date.py rename to pointCollection/grid/WV_date.py diff --git a/grid/__init__.py b/pointCollection/grid/__init__.py similarity index 100% rename from grid/__init__.py rename to pointCollection/grid/__init__.py diff --git a/grid/data.py b/pointCollection/grid/data.py similarity index 100% rename from grid/data.py rename to pointCollection/grid/data.py diff --git a/grid/mosaic.py b/pointCollection/grid/mosaic.py similarity index 100% rename from grid/mosaic.py rename to pointCollection/grid/mosaic.py diff --git a/index_glob.py b/pointCollection/index_glob.py similarity index 100% rename from index_glob.py rename to pointCollection/index_glob.py diff --git a/indexedH5/__init__.py b/pointCollection/indexedH5/__init__.py similarity index 100% rename from indexedH5/__init__.py rename to pointCollection/indexedH5/__init__.py diff --git a/indexedH5/data.py b/pointCollection/indexedH5/data.py similarity index 100% rename from indexedH5/data.py rename to pointCollection/indexedH5/data.py diff --git a/is2_calendar.py b/pointCollection/is2_calendar.py similarity index 100% rename from is2_calendar.py rename to pointCollection/is2_calendar.py diff --git a/pt_blockmedian.py b/pointCollection/pt_blockmedian.py similarity index 100% rename from pt_blockmedian.py rename to pointCollection/pt_blockmedian.py diff --git a/reconstruct_ATL06_tracks.py b/pointCollection/reconstruct_ATL06_tracks.py similarity index 100% rename from reconstruct_ATL06_tracks.py rename to pointCollection/reconstruct_ATL06_tracks.py diff --git a/tile.py b/pointCollection/tile.py similarity index 100% rename from tile.py rename to pointCollection/tile.py diff --git a/unique_by_rows.py b/pointCollection/unique_by_rows.py similarity index 100% rename from unique_by_rows.py rename to pointCollection/unique_by_rows.py diff --git a/readthedocs.yml b/readthedocs.yml new file mode 100644 index 0000000..d7b4fc7 --- /dev/null +++ b/readthedocs.yml @@ -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 diff --git a/IndexPicker.py b/scripts/IndexPicker.py similarity index 100% rename from IndexPicker.py rename to scripts/IndexPicker.py diff --git a/make_mosaic.py b/scripts/make_mosaic.py similarity index 100% rename from make_mosaic.py rename to scripts/make_mosaic.py diff --git a/make_tiles.py b/scripts/make_tiles.py similarity index 100% rename from make_tiles.py rename to scripts/make_tiles.py diff --git a/points_to_grid.py b/scripts/points_to_grid.py similarity index 100% rename from points_to_grid.py rename to scripts/points_to_grid.py diff --git a/test.py b/scripts/test.py similarity index 100% rename from test.py rename to scripts/test.py diff --git a/setup.py b/setup.py index 3d8a937..f55816a 100644 --- a/setup.py +++ b/setup.py @@ -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',