Skip to content

Commit

Permalink
Cleaned up versioning.
Browse files Browse the repository at this point in the history
  • Loading branch information
arkottke committed Jul 6, 2016
1 parent a46cc27 commit 59c884d
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 23 deletions.
5 changes: 4 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ Write Documentation

pyRVT could always use more documentation, whether as part of the
official pyRVT docs, in docstrings, or even on the web in blog posts,
articles, and such.
articles, and such. Docstrings should be formatted using the
`NumPy conventions`_.

.. _NumPy conventions: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt

Submit Feedback
~~~~~~~~~~~~~~~
Expand Down
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
History
=======

0.5.0 (2016-07-06)
------------------

* Added ability to pass transfer function to PSA calculation.
* Removed extraneous files.
* Cleaned up documentation to use NumPy style.
* Fixed PEP8 issues.

0.1.0 (2016-03-04)
------------------

Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
include versioneer.py
include pyrvt/_version.py
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ lint:
test:
python setup.py test

test-all:
tox

coverage:
coverage run --source pyrvt setup.py test
coverage report -m
Expand Down
12 changes: 10 additions & 2 deletions pyrvt/motions.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ def duration(self):
"""Duration of the ground motion for RVT analysis."""
return self._duration

def calc_osc_accels(self, osc_freqs, osc_damping=0.05):
def calc_osc_accels(self, osc_freqs, osc_damping=0.05,
trans_func=None):
"""Compute the pseudo-acceleration spectral response of an oscillator
with a specific frequency and damping.
Expand All @@ -211,15 +212,22 @@ def calc_osc_accels(self, osc_freqs, osc_damping=0.05):
osc_damping : float
Fractional damping of the oscillator (dec). For example, 0.05 for a
damping ratio of 5%.
trans_func : array_like, optional
Transfer function to be applied to motion prior calculation of the
oscillator response.
Returns
-------
spec_accels : :class:`numpy.ndarray`
Peak pseudo-spectral acceleration of the oscillator
"""
if trans_func is None:
trans_func = np.ones_like(self.freqs)
else:
trans_func = np.asarray
resp = np.array([
self.calc_peak(
calc_sdof_tf(self._freqs, of, osc_damping),
trans_func * calc_sdof_tf(self.freqs, of, osc_damping),
of, osc_damping)
for of in osc_freqs])
return resp
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--index-url https://pypi.python.org/simple/

numpy
openpyxl
pyprind
Expand Down
3 changes: 1 addition & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
-r ./requirements.txt

bumpversion
coveralls
cryptography
flake8
invoke
pytest
pytest-cov
pytest-flake8
pytest-runner
sphinx
sphinxcontrib-bibtex
watchdog
Expand Down
13 changes: 3 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
[bumpversion]
current_version = 0.1.0
commit = True
tag = True

[bumpversion:file:setup.py]

[bumpversion:file:pyrvt/__init__.py]
[aliases]
test = pytest
release = clean --all sdist bdist_wheel build_sphinx upload upload_docs

[metadata]
description-file = README.rst

[wheel]
universal = 1

[pytest]
flake8-ignore =
17 changes: 14 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,27 @@
history = history_file.read()

requirements = [
# TODO: put package requirements here
'numpy',
'openpyxl',
'pyprind',
'setuptools',
'scipy',
'xlrd',
'xlwt',
]

test_requirements = [
# TODO: put package test requirements here
'coveralls',
'flake8',
'pytest',
'pytest-cov',
'pytest-flake8',
'pytest-runner'
]

setup(
name='pyrvt',
version='0.4.0',
version='0.5.0',
description='Ground motion models implemented in Python.',
long_description=readme + '\n\n' + history,
author='Albert Kottke',
Expand Down

0 comments on commit 59c884d

Please sign in to comment.