Skip to content

Commit

Permalink
Merge pull request #291 from AdityaSavara/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
AdityaSavara authored Aug 1, 2022
2 parents 49d50d9 + 4be142c commit 72041d2
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: python
python:
- "3.8"
# commands to install dependencies
install:
#No installation is required for UnitTesterSG with what is already on the Travis CI, so commenting out the below to let the build test run faster.
#- virtualenv -p /opt/pyenv/versions/3.8/bin/python3.8 venv
#- source venv/bin/activate
#- pip install UnitTesterSG[COMPLETE] #this is mostly to get the dependencies.
#- python setup.py install #now overwrite old installations with the current version.
# command to run tests
#remove the Examples13 doe test_3 and test_4.py since they require MPI and we have not gotten that to work on travis CI.
- cd Examples/Example13doeFunctionExample/
- rm test_3.py
- rm test_4.py
- cd ..
- cd ..
- pip install UnitTesterSG
- pip install numpy
- pip install pandas
- pip install matplotlib
- pip install scipy
- pip install CiteSoft
- pip install zeus-mcmc
- pip install dill
- pip install emcee
script:
- cd Examples
- python3 runPytestDriver.py failWithError #The "failWithError" optional argument will cause an error exitCode if any unit tests fail.
13 changes: 12 additions & 1 deletion Examples/runPytestDriver.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
import UnitTesterSG

UnitTesterSG.pytestDriver()
import sys

#We want runPytestDriver.py to give a pytest exitCode of 1 for travis CI purposes. That means we need to create an "actual" error when any test fails.
#The pytestDriver function of UnitTesterSG has an option to 'crash' with an error if "failWithError" is passed in.
#So the below lines of code are such that if the command line has 'python runPytestDriver.py failWithError"
if (len(sys.argv) <= 1):
UnitTesterSG.pytestDriver(failWithError=False)
elif sys.argv[1].strip() == '':
UnitTesterSG.pytestDriver(failWithError=False)
elif sys.argv[1].strip().lower() == 'failwitherror':
sys.argv.pop(1) #Need to remove the argument from sys.argv, because pytest also looks in the system arguments and if "failWithError" is still present, that will cause an undesired error.
UnitTesterSG.pytestDriver(failWithError=True)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[![PyPI version](https://badge.fury.io/py/PEUQSE.svg)](https://badge.fury.io/py/PEUQSE)
[![DOI:<10.11578/dc.20200908.7>](http://img.shields.io/badge/DOI-10.11578/dc.20200908.7-green.svg)](<https://doi.org/10.11578/dc.20200908.7>) [![Build Status](https://app.travis-ci.com/AdityaSavara/PEUQSE.svg?branch=master)](https://app.travis-ci.com/AdityaSavara/PEUQSE) [![UnitTests:<UnitTests>](http://img.shields.io/badge/UnitTests-Passing-blue.svg)](<Passing-blue>)
[![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)



# Parameter Estimation and Uncertainty Quantification for Science and Engineering (PEUQSE)

Parameter estimation for complex physical problems often suffers from finding ‘solutions’ that are not physically realistic. The PEUQSE software (formerly named CheKiPEUQ) provides tools for finding physically realistic parameter estimates, graphs of the parameter estimate positions within parameter space, and plots of the final simulation results.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# What packages are optional?
EXTRAS = {
'COMPLETE': ['UnitTesterSG >= 5.4.1', 'matplotlib', 'scipy', 'numpy', 'pandas', 'CiteSoft', 'zeus-mcmc >= 2.4.0', 'dill', 'emcee']# 'uncertainties': ['uncertainties'], #pymc...
'COMPLETE': ['UnitTesterSG >= 6.2.2', 'matplotlib', 'scipy', 'numpy', 'pandas', 'CiteSoft', 'zeus-mcmc >= 2.4.0', 'dill', 'emcee']# 'uncertainties': ['uncertainties'], #pymc...
}

#To make sure the license etc. is included, I added the DATA_FILES object based on https://stackoverflow.com/questions/9977889/how-to-include-license-file-in-setup-py-script
Expand Down

0 comments on commit 72041d2

Please sign in to comment.