Skip to content

Commit

Permalink
Merge pull request #2 from kmarsteller/master
Browse files Browse the repository at this point in the history
adding a few more things to the repo, tests, and api, flesh out readme
  • Loading branch information
Keith Marsteller authored Aug 31, 2018
2 parents c1d3cce + 01e0a21 commit 807b238
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ language: generic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- ubuntu-toolchain-r-tests
packages:
- gfortran
- libblas-dev
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# library_template
A structure that can be a starting point for developers who want to create projects that depend on OpenMDAO.

This is the simplest working repository.

This sample repo is fully installable using:
`pip install -e .`

You can build the docs by changing into `your_project/docs` and typing:
`make clean; make all`

If you have installed testflo (`pip install testflo`), you can run the tests with:
`testflo`

Use this working example to build your own repository!
4 changes: 4 additions & 0 deletions your_project/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Key your_project classes can be imported from here."""

# source
from your_project.source.example import Example
2 changes: 1 addition & 1 deletion your_project/source/example.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Example(object):
def __init__(self):
pass
self.x = 1
Empty file.
Binary file added your_project/source/tests/__init__.pyc
Binary file not shown.
9 changes: 9 additions & 0 deletions your_project/source/tests/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import unittest
from your_project.api import Example


class TestExample(unittest.TestCase):

def test___init___simple(self):
ex = Example()
self.assertEqual(ex.x, 1)
Binary file added your_project/source/tests/test_example.pyc
Binary file not shown.

0 comments on commit 807b238

Please sign in to comment.