Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs and testing + ci, code cov, black #68

Merged
merged 26 commits into from
Sep 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,39 @@ student/
__pycache__
*.egg-info
.idea/
docs/_build
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/


# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Jupyter Notebook
.ipynb_checkpoints

# Spyder project settings
.spyderproject
.spyproject

# mkdocs documentation
/site
doc/source/gallery
doc/source/gallery_vignettes

# Pycharm
.idea/
.idea/*

pip-wheel-metadata/
config.yml
docs/api
41 changes: 32 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
language: python
language: python

python:
- 3.6
matrix:
include:
- os: linux
dist: xenial
python: 3.5
env: TOXENV=py35
- os: linux
dist: xenial
python: 3.6
env: TOXENV=py36
- os: linux
dist: xenial
python: 3.7
env: TOXENV=py37,black,docs
- os: osx
language: generic

cache: pip
install:
- chmod +x .travis/install.sh
- ./.travis/install.sh

install:
- pip install -r dev-requirements.txt
script:
- chmod +x .travis/test.sh
- ./.travis/test.sh

script:
# Build documentation
- pushd docs && make html && popd
deploy:
provider: pypi
user: lwasser
password:
secure: PZkjwwgIzvCu68ckTFjbiGaakK6bXGv48Iefbj4gLA3xEZW5JVu4Gn+c75rX0ZoJ/Ei9WwlXiRRqsFeUh8rvBkxY+2DRM8IZt8YcjdKP/O5zPyqVqDNIvlSryfbxeqcC8bBwd8ZR6iEnGysBfPuUdqLiak8t51pGjI0Eanqlh/xrTIwDqztQY5+LqOaNtJzEedX7jKbz4AKkFRUzlp35nJJ5sbWPYk+Uvr+PMx9v3IVbpxS01/iazCTAO91kUZ5pmCrDB20j8qbghmMYuSCdkO8Vyy9i6uLxWRROEnULwspucnGHygd7MGRuXOVrHHeMkcK18HI0xHiA8kQCt2kkN0Fe8COK2ZKW7u1bwo0a+SDtA2ArJY/HuUUHHs7vrotJDBHZJ1KBVuk1jZU0fAVMY0zkaPFq6LXhxSO7I7lAt0MNkEP3BkOoodOV0+AFJ8WFDvmeg3A49+H4o+qnBFZzlcy47rqDj0tX7+DxAeIKFz/9W4soCTwXNLORGKb2RcUQIprZKtEbI3VTG670SUQWHJUZOYeBlqOvh5NKN+rl1TgEK80MRmWOHl4feRkUONchdDz84T+nVuMmDBtgf+CkbM2DGbPzJfnw5w+euOaqZaniROmxRL1k2ROtvJc2xO2uYa+dqP6MFf8pWB4cnDSikUp09Rxl7F8Uj9DFdk39Qnc=
on:
tags: true
repo: earthlab/abc-classroom
python: 3.6
25 changes: 25 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

if [[ $TRAVIS_OS_NAME == 'osx' ]]; then

# install conda and the abc-dev environment
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
echo "conda activate base" >> ~/.bashrc
source $HOME/miniconda/bin/activate
conda config --set always_yes yes --set show_channel_urls true --set changeps1 no
conda update -q conda
conda config --add channels conda-forge
conda info -a
conda init bash
conda env create -f environment.yml
conda activate abc-dev
python setup.py install
pip install -r dev-requirements.txt

else
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable --yes
sudo apt-get update
pip install tox-travis
fi
11 changes: 11 additions & 0 deletions .travis/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
source $HOME/miniconda/bin/activate
export PATH="$HOME/miniconda/bin:$PATH"
conda activate abc-dev
#python -m pytest -v
make -B docs
else
tox
fi
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ locally, but this is the recommended option on Windows and MacOS::
Install the package & The Precommit Hook
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Once your earthpy-dev environment is activated, install EarthPy in editable
Once your abc-dev environment is activated, install EarthPy in editable
mode, along with the development requirements and pre-commit hooks::

$ pip install -e .
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docs: docs/*.rst docs/conf.py docs/Makefile abcclassroom/*.py *.rst #examples/*.py ## generate html docs
sphinx-apidoc -fMeET -o docs/api abcclassroom abcclassroom/tests
$(MAKE) -C docs clean
$(MAKE) -C docs doctest
$(MAKE) -C docs html
$(MAKE) -C docs linkcheck
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@


[![codecov](https://codecov.io/gh/earthlab/abc-classroom/branch/master/graph/badge.svg)](https://codecov.io/gh/earthlab/abc-classroom)


# ABC Classroom

> A set of tools to manage your notebooks and assignments for a class.
Expand All @@ -9,7 +14,3 @@ Run `pip install -e .` in the directory of this README.


## Dev




Loading