Skip to content

Commit

Permalink
Initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ricklupton committed May 19, 2019
1 parent 4557722 commit edccf56
Show file tree
Hide file tree
Showing 74 changed files with 3,141 additions and 249 deletions.
10 changes: 1 addition & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Travis configuration file using the build matrix feature
# Read more under http://docs.travis-ci.com/user/build-configuration/
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!

sudo: false
language: python
Expand All @@ -13,16 +12,9 @@ matrix:
- env: DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="false"
install:
- source tests/travis_install.sh
- pip install -r requirements.txt
# ^ DEPRECATION WARNING:
# The automatic creation of a `requirements.txt` file is deprecated.
# See `Dependency Management` in the docs for other options.
before_script:
- git config --global user.email "[email protected]"
- git config --global user.name "Your Name"
- pip install -e '.[testing]'
script:
- python setup.py test
# ^ Change here if using tox
after_success:
- if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; fi
after_script:
Expand Down
9 changes: 5 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
Changelog
=========

Version 0.1
Version 0.2
===========

- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
First release as *bemused*. This code was previously on Github under the name
"`py\-bem`_".

.. _py-bem: https://github.com/ricklupton/py-bem
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
bemused = {path = ".",extras = ["testing"],editable = true}

[requires]
python_version = "3.7"
205 changes: 205 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 11 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
bemused
=======

`Blade Element Momentum (BEM)`_ calculations implemented in Python. For
modelling wind turbine (or other rotor) aerodynamics and loads.

Add a short description here!
Getting started
---------------

See `this blog post`_ for an introduction to how to use this package.

Description
===========
Documentation
-------------

A longer description of your project goes here...
Documentation is available `here`_.


Note
====

This project has been set up using PyScaffold 3.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.
.. _Blade Element Momentum (BEM): https://en.wikipedia.org/wiki/Blade_element_momentum_theory
.. _this blog post: https://ricklupton.name/2019/TBC
.. _here: https://bemused.readthedocs.io/
9 changes: 5 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ help:
clean:
rm -rf $(BUILDDIR)/* $(AUTODOCDIR)

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

doc-requirements: $(AUTODOCDIR)
doc-requirements:
# $(AUTODOCDIR)

html: doc-requirements
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Expand Down
7 changes: 7 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bemused package
===============

.. automodule:: bemused
:members:
:undoc-members:
:show-inheritance:
68 changes: 34 additions & 34 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,40 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.join(__location__, '../src'))

# -- Run sphinx-apidoc ------------------------------------------------------
# This hack is necessary since RTD does not issue `sphinx-apidoc` before running
# `sphinx-build -b html . _build/html`. See Issue:
# https://github.com/rtfd/readthedocs.org/issues/1139
# DON'T FORGET: Check the box "Install your project inside a virtualenv using
# setup.py install" in the RTD Advanced Settings.
# Additionally it helps us to avoid running apidoc manually

try: # for Sphinx >= 1.7
from sphinx.ext import apidoc
except ImportError:
from sphinx import apidoc

output_dir = os.path.join(__location__, "api")
module_dir = os.path.join(__location__, "../src/bemused")
try:
shutil.rmtree(output_dir)
except FileNotFoundError:
pass

try:
import sphinx
from pkg_resources import parse_version

cmd_line_template = "sphinx-apidoc -f -o {outputdir} {moduledir}"
cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir)

args = cmd_line.split(" ")
if parse_version(sphinx.__version__) >= parse_version('1.7'):
args = args[1:]

apidoc.main(args)
except Exception as e:
print("Running `sphinx-apidoc` failed!\n{}".format(e))
# # -- Run sphinx-apidoc ------------------------------------------------------
# # This hack is necessary since RTD does not issue `sphinx-apidoc` before running
# # `sphinx-build -b html . _build/html`. See Issue:
# # https://github.com/rtfd/readthedocs.org/issues/1139
# # DON'T FORGET: Check the box "Install your project inside a virtualenv using
# # setup.py install" in the RTD Advanced Settings.
# # Additionally it helps us to avoid running apidoc manually

# try: # for Sphinx >= 1.7
# from sphinx.ext import apidoc
# except ImportError:
# from sphinx import apidoc

# output_dir = os.path.join(__location__, "api")
# module_dir = os.path.join(__location__, "../src/bemused")
# try:
# shutil.rmtree(output_dir)
# except FileNotFoundError:
# pass

# try:
# import sphinx
# from pkg_resources import parse_version

# cmd_line_template = "sphinx-apidoc -f -o {outputdir} {moduledir}"
# cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir)

# args = cmd_line.split(" ")
# if parse_version(sphinx.__version__) >= parse_version('1.7'):
# args = args[1:]

# apidoc.main(args)
# except Exception as e:
# print("Running `sphinx-apidoc` failed!\n{}".format(e))

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

Expand Down
Loading

0 comments on commit edccf56

Please sign in to comment.