Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
985b707
chore: install versioneer
mcflugen Apr 16, 2019
ed8b488
chore: add convenience makefile
mcflugen Apr 16, 2019
eba882d
chore: add classifiers
mcflugen Apr 16, 2019
bd537d2
style: reformat for black
mcflugen Apr 16, 2019
1a6ec47
chore: remove ez_setup.py
mcflugen Apr 16, 2019
990dfbd
chore: add setup.cfg with sensible defaults
mcflugen Apr 16, 2019
af852f7
chore: move tests into separate tests folder
mcflugen Apr 16, 2019
ab9b910
chore: use pytest instead of nose
mcflugen Apr 16, 2019
27a1573
test: fix for new numpy formatting
mcflugen Apr 16, 2019
0924157
chore: drop python 2.7 compatibility
mcflugen Apr 16, 2019
e4ccb5a
test: look in tests folder for tests
mcflugen Apr 16, 2019
b4304fa
refactor: remove local bmi package, use bmipy
mcflugen Apr 16, 2019
7b05d94
fix: use get_value_ptr, not get_value_ref
mcflugen Apr 16, 2019
1b52f8f
chore: NotImplementedError for usused methods
mcflugen Apr 16, 2019
6fa0a05
chore: add install requirements in setup.py
mcflugen Apr 19, 2019
b309bc5
test: use build stages for Travis CI
mcflugen Apr 19, 2019
288f285
chore: update versioneer
mcflugen Apr 19, 2019
382589d
style: format for black
mcflugen Apr 19, 2019
31ae9cb
style: remove lint
mcflugen Apr 19, 2019
2d24c6a
docs: add conda env file for building docs
mcflugen Apr 19, 2019
0a556ed
test: add flake8, coveralls to test requirements
mcflugen Apr 19, 2019
722fd8a
docs: remove submodules
mcflugen Apr 19, 2019
8d3c904
docs: add csdms logo and sidebar template
mcflugen Apr 19, 2019
a8480ab
chore: reformat readme from markdown to rst
mcflugen Apr 19, 2019
d9c8fea
docs: add bmi-heat docs, remove bmi-python stuff
mcflugen Apr 19, 2019
f56b75d
chore: use README.rst for long description
mcflugen Apr 19, 2019
60b996e
chore: remove unused model metadata
mcflugen Apr 19, 2019
b94ccd9
fix: order of args for set_value_at_indices
mcflugen Apr 19, 2019
63c8ae7
chore: use yaml.safe_load
mcflugen Apr 19, 2019
0754322
chore: more badges, including BMI
mcflugen Apr 19, 2019
46a9cc4
chore: add codacy config file
mcflugen Apr 19, 2019
c3138e9
chore: remove cruft
mcflugen Apr 19, 2019
661a18d
chore: update codacy config
mcflugen Apr 19, 2019
6a18d74
style: remove lint
mcflugen Apr 19, 2019
e170048
chore: update codacy badge
mcflugen Apr 19, 2019
9b13948
Merge branch 'master' into mcflugen/use-bmi-abstract-base-class
mcflugen Apr 19, 2019
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
8 changes: 0 additions & 8 deletions .bmi/api.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .bmi/heat_input.txt.tmpl

This file was deleted.

4 changes: 0 additions & 4 deletions .bmi/info.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions .bmi/parameters.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions .codacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
exclude_paths:
- tests/**
- docs/source/conf.py
- setup.py
- versioneer.py
- heat/_version.py
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
heat/_version.py export-subst
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

7 changes: 0 additions & 7 deletions .landscape.yaml

This file was deleted.

76 changes: 55 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,58 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"

language: generic
os:
- linux

- linux
- osx
env:
matrix:
- CONDA_ENV=3.7
- CONDA_ENV=3.6
sudo: false
jobs:
include:
- stage: lint
os: linux
script:
- make lint
- stage: docs
os: linux
install:
- conda env create --file docs/source/environment.yml
- conda activate heat_docs
script:
- sphinx-apidoc --force -o docs heat *tests
- make -C docs clean html
- stage: deploy
if: tag =~ v.*$
script: skip
os: linux
deploy:
on:
all_branches: true
provider: pypi
user: mcflugen
password:
secure: nCLTNxxwRBpvaeNosG+V1sQHeYPDd7zfcBvm5sGE6KVtGOfQtO0cNe1NwMKoVKH9Te9B2RJGs+s6tb4mMqJNuXpTyoFsAr+4gBxO9BSAdjm2wadcqyXexhU99L9oBhfrMAuGYEvV57LE57WaRQfmBnnKH9HE57fWmsx8VO50DEw3mMWKusZt4aFxNgpKwjUGJxtYDEIoOzfOdWAlRicPsZ21s/oMsrYKaYMG8mI8uM5/nVGc2jCb18HXflG9LnsmXlU8P/Jfa0Zu52MRgHuJnyflIDolgjkqPSgu8v/pGhjTCOS88tWSC09mIy1mdkZzJOOiIny+CLkEWxcQbikiVaXwq592+I6YcnW9TAls2hOChFaALYldZd5EopOmlc64DmQXMXCOPLbMM4wiUx63F/zJDZg1i0sMl0ucG5EpNPG18EerdygbvdcLLYKM70jSuqyYBOjk4pAO6Y1EvjffZMBu1XxuO/NvTZyAjoJTTb8xbO4s59Z7KB8sYi+9Gq1DATq1YXZ8k3GoU+KlOGJ73o+D87O95Q5qLWI30HvElKj72eEGMCsOTyvxmNZsEf9yCYbxzP9FEWrWV1uWUwWEV6tAATd7o3bcbp8+DzeglaLX8eOch8MwtxqR2aFvoiMQVTIXkfrn+emuZzhqQcTZSQMA9SztnQ8it4F7WeQWqH8=
before_install:
- |
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
brew remove --force $(brew list)
brew cleanup -s
rm -rf $(brew --cache)
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh
else
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh
fi
- bash $HOME/miniconda.sh -b -p $HOME/anaconda
- export PATH="$HOME/anaconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda create -n test_env python=$CONDA_ENV
- source activate test_env
install:
- echo "Build on $TRAVIS_OS_NAME for Python $TRAVIS_PYTHON_VERSION"
- bash .travis/install_python.sh
- export PATH="$HOME/miniconda/bin:$PATH"
- source activate test-env
- pip install coveralls
- conda info
- conda list
- python setup.py install

- pip install . -r requirements.txt
script:
- nosetests --with-doctest --with-coverage --cover-package=heat

after_success:
coveralls
- pytest --cov=heat --cov-report=xml:$(pwd)/coverage.xml -vvv
after_success: coveralls
30 changes: 0 additions & 30 deletions .travis/install_python.sh

This file was deleted.

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include heat/_version.py
92 changes: 92 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.PHONY: clean clean-test clean-pyc clean-build docs help
.DEFAULT_GOAL := help

define BROWSER_PYSCRIPT
import os, webbrowser, sys

try:
from urllib import pathname2url
except:
from urllib.request import pathname2url

webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT

define PRINT_HELP_PYSCRIPT
import re, sys

for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT

BROWSER := python -c "$$BROWSER_PYSCRIPT"

help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)

clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts

clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +

clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +

clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache

lint: ## check style with flake8
flake8 heat tests

pretty:
find heat -name '*.py' | xargs isort
black setup.py tests heat

test: ## run tests quickly with the default Python
pytest

test-all: ## run tests on every Python version with tox
tox

coverage: ## check code coverage quickly with the default Python
coverage run --source heat -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/source/heat.rst
rm -f docs/source/modules.rst
sphinx-apidoc -o docs/source heat
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/build/html/index.html

servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .

release: dist ## package and upload a release
twine upload dist/*

dist: clean ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
ls -l dist

install: clean ## install the package to the active Python's site-packages
python setup.py develop
9 changes: 0 additions & 9 deletions README.md

This file was deleted.

23 changes: 23 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. image:: https://img.shields.io/badge/CSDMS-Basic%20Model%20Interface-green.svg
:target: https://bmi.readthedocs.io/
:alt: Basic Model Interface

.. image:: https://travis-ci.org/csdms/bmi-example-python.svg?branch=master
:target: https://travis-ci.org/csdms/bmi-example-python

.. image:: https://coveralls.io/repos/csdms/bmi-example-python/badge.png?branch=master
:target: https://coveralls.io/r/csdms/bmi-example-python?branch=master

.. image:: https://readthedocs.org/projects/bmi-forum/badge/?version=latest
:target: https://readthedocs.org/projects/bmi-forum/?badge=latest

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/csdms/bmi

.. image:: https://api.codacy.com/project/badge/Grade/e0252b85fefc402ea4cc5e7949219a94
:target: https://www.codacy.com/app/mcflugen/bmi-example-python?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=csdms/bmi-example-python&amp;utm_campaign=Badge_Grade

bmi-example-python
==================

An example BMI implementation written in Python
5 changes: 0 additions & 5 deletions bmi/__init__.py

This file was deleted.

Loading