Skip to content

Commit

Permalink
Merge pull request #22 from wpreimes/develop
Browse files Browse the repository at this point in the history
Things that never got released altough they should have
  • Loading branch information
wpreimes committed Jul 3, 2020
2 parents 0183225 + e0bc9e6 commit d0e812f
Show file tree
Hide file tree
Showing 25 changed files with 283 additions and 170 deletions.
7 changes: 6 additions & 1 deletion .coveragerc
@@ -1,9 +1,14 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = smap
source = smap_io
# omit = bad_file.py

[paths]
source =
src/
*/site-packages/

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -41,4 +41,4 @@ cover/*
MANIFEST

#others
local_scripts/*
*/_local_scripts/*
12 changes: 12 additions & 0 deletions .readthedocs.yml
@@ -0,0 +1,12 @@
version: 2

sphinx:
configuration: docs/conf.py

formats:
- pdf

python:
version: 3.7
install:
- requirements: docs/requirements.txt
24 changes: 18 additions & 6 deletions .travis.yml
@@ -1,4 +1,6 @@
dist: xenial
os:
- linux
language: python
sudo: required
addons:
Expand All @@ -10,19 +12,15 @@ notifications:
email: false
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "2.7"
- "3.6"
- "3.7"
- "3.8"
install:
# You may want to periodically update this, although the conda update
# conda line below will keep everything up-to-date. We do this
# conditionally because it saves us some downloading if the version is
# the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
Expand All @@ -48,3 +46,17 @@ after_success:
# report coverage results to coveralls.io
- pip install coveralls
- coveralls
deploy:
provider: pypi
# better than hiding the token would be to encrypt it with travis...
username: __token__
password: $PYPI_TOKEN
skip_existing: true
on:
repo: TUW-GEO/smap_io
tags: true
after_deploy:
# as in docs
- conda create -q -n smap_io_deploy -c conda-forge numpy h5py pyproj netcdf4 pyresample pandas
- source activate smap_io_deploy
- pip install smap_io
5 changes: 3 additions & 2 deletions CHANGES.rst → CHANGELOG.rst
Expand Up @@ -2,12 +2,13 @@
Changelog
=========

Version 0.x
===========
Unreleased
==========
-

Version 0.4
===========
- Switch to new pyscaffold structure
- Add support for SMAP L3 v6 data,
- Remove download support for v4 and v5 (decommissioned), reading still possible.
- Add option to rename variables with orbit indicator during reading.
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

18 changes: 9 additions & 9 deletions README.rst
Expand Up @@ -42,22 +42,22 @@ commands:

.. code-block:: shell
conda create -q -n smap_io -c conda-forge numpy h5py pyproj netcdf4 pyresample pandas
source activate smap_io
pip install smap_io
$ conda create -q -n smap_io -c conda-forge numpy h5py pyproj netcdf4 pyresample pandas
$ source activate smap_io
$ pip install smap_io
You can also install all needed (conda and pip) dependencies at once using the
following commands after cloning this repository. This is recommended for
developers of the package.

.. code-block:: shell
git clone https://github.com/TUW-GEO/smap_io.git --recursive
cd smap_io
conda create -n smap_io python=3.6 # or any supported python version
source activate smap_io
conda update -f environment.yml
python setup.py develop
$ git clone https://github.com/TUW-GEO/smap_io.git --recursive
$ cd smap_io
$ conda create -n smap_io python=3.6 # or any supported python version
$ source activate smap_io
$ conda update -f environment.yml
$ python setup.py develop
Supported Products
==================
Expand Down
1 change: 0 additions & 1 deletion doc_requirements.txt

This file was deleted.

74 changes: 45 additions & 29 deletions docs/Makefile
Expand Up @@ -5,7 +5,11 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
BUILDDIR = ../build/sphinx/
AUTODOCDIR = api
AUTODOCBUILD = sphinx-apidoc
PROJECT = smap_io
MODULEDIR = ../src/smap_io

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
Expand All @@ -19,7 +23,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext doc-requirements

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand Down Expand Up @@ -47,131 +51,143 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*
rm -rf $(BUILDDIR)/* $(AUTODOCDIR)

html:
$(AUTODOCDIR): $(MODULEDIR)
mkdir -p $@
$(AUTODOCBUILD) -f -o $@ $^

doc-requirements: $(AUTODOCDIR)

html: doc-requirements
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
dirhtml: doc-requirements
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
singlehtml: doc-requirements
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
pickle: doc-requirements
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
json: doc-requirements
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
htmlhelp: doc-requirements
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
qthelp: doc-requirements
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/smap_io.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(PROJECT).qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/smap_io.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(PROJECT).qhc"

devhelp:
devhelp: doc-requirements
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $HOME/.local/share/devhelp/smap_io"
@echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/smap_io"
@echo "# mkdir -p $HOME/.local/share/devhelp/$(PROJECT)"
@echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/$(PROJEC)"
@echo "# devhelp"

epub:
epub: doc-requirements
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
patch-latex:
find _build/latex -iname "*.tex" | xargs -- \
sed -i'' 's~includegraphics{~includegraphics\[keepaspectratio,max size={\\textwidth}{\\textheight}\]{~g'

latex: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) patch-latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
latexpdf: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) patch-latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja:
latexpdfja: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
text: doc-requirements
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
man: doc-requirements
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
texinfo: doc-requirements
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
info: doc-requirements
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
gettext: doc-requirements
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
changes: doc-requirements
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
linkcheck: doc-requirements
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
doctest: doc-requirements
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

xml:
xml: doc-requirements
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."

pseudoxml:
pseudoxml: doc-requirements
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
2 changes: 2 additions & 0 deletions docs/changelog.rst
@@ -0,0 +1,2 @@
.. _changes:
.. include:: ../CHANGELOG.rst
2 changes: 0 additions & 2 deletions docs/changes.rst

This file was deleted.

0 comments on commit d0e812f

Please sign in to comment.