Skip to content

Commit

Permalink
Joss feedback (#106)
Browse files Browse the repository at this point in the history
* gitignore update

* some contribution guidelines and otherwise doc improvement

* tweaks to demos

* revert demo update

* update python dependancies to avoid vulnerabilities

* update python versions

* update version number

* some edits

* contribute guide done

* a couple additions

* some typos

* mailing list, some badgers

* tryout some badgers

* coveralls action

* coveralls action fixes

* coveralls action fixes

* coveralls action fixes ii

* update python versions

* upgrade numpy for security

* upgrade numpy for security

* coverall completion check

* some badge fixes

* build badge progress

* bump action versions per sercurity requests

* I think this will fix the build badger

* badgers working

* paper additions per commments.  updated examples to unclude scirun.  fixed typos

* typo in paper

* typos in paper

* bumping action versions per security requests

* updating date for paper

* bump Usci version (1.0-rc1).  bump python versions in setup
  • Loading branch information
jessdtate committed Apr 5, 2023
1 parent 9b15633 commit 52de2ab
Show file tree
Hide file tree
Showing 16 changed files with 229 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/draft-pdf.yml
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pypublish.yml
Expand Up @@ -6,11 +6,11 @@ jobs:
name: Publish Python distribution to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
Expand Down
30 changes: 27 additions & 3 deletions .github/workflows/pythonapp.yml
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
Expand All @@ -38,3 +38,27 @@ jobs:
run: |
pip install --editable ./
pytest --cov=UncertainSCI
- name: Upload coverage data to coveralls.io
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.os }}
COVERALLS_PARALLEL: true
coveralls:
name: confirm coveralls upload
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade pip
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -142,3 +142,7 @@ docs/_build/

data_set/*
._.DS_Store

#paper files
paper/paper.pdf

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -6,8 +6,8 @@ A Python-based toolkit that harnesses modern techniques to estimate model and pa
![UncertainSCI](docs/_static/UncertainSCI.png "UncertainSCI")


![Linux build](https://github.com/SCIInstitute/UncertainSCI/workflows/Linux%20build/badge.svg)

![All Builds](https://github.com/SCIInstitute/UncertainSCI/workflows/Build/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/SCIInstitute/UncertainSCI/badge.svg?branch=master)](https://coveralls.io/github/SCIInstitute/UncertainSCI?branch=master)
[![status](https://joss.theoj.org/papers/660d2fe53fbf67dd2714e9546251bd33/status.svg)](https://joss.theoj.org/papers/660d2fe53fbf67dd2714e9546251bd33)


Expand Down
4 changes: 3 additions & 1 deletion docs/dev_docs/HowToTutorial.md
Expand Up @@ -286,9 +286,11 @@ Tables can be used with normal markdown syntax with the [sphinx-markdown-tables]

To link the UncertainSCI API generated using Sphinx, Use this syntax: [`[text](../api_docs/pce.html#polynomial-chaos-expansions)`](../api_docs/pce.html#polynomial-chaos-expansions).



## Content Guide

TODO
Try to be comprehensive, yet consise, and keep in mind the target audience for the tutorial. It is ok to write an advanced tutorial that builds on more basic knowledge, but please make this expectation clear and link to tutorials and materials that will help the reader develop the required understanding. Include code snippets, example scripts, screenshots, and videos as appropriate. Please use [existing tutorials](../tutorials/index.html#Contents) as try to match the style, flow, and level of detail they provide.

## Supplemental Materials

Expand Down
104 changes: 101 additions & 3 deletions docs/dev_docs/contribute.md
@@ -1,9 +1,107 @@
# Contribution Guide

Thank you for you cobributions to UncertainSCI!
Thank you for you contributions to UncertainSCI! We welcome and appreciate and contributions, from reporting a bugs to code contributions. If you wish to contribute, please do so in the following ways.

If you'd like to make a tutorial, please follow the instructions in the [Tutorial Tutorial](HowToTutorial.html).
## Community Support

A great way to start contributing to UncertainSCI is to submit and answer questions on our [discussion board]<https://github.com/SCIInstitute/UncertainSCI/discussions>.

Other ways of contacting the communtity are located on our [support page](../user_docs/support.html#support)

## Bugs and Features

We encourage users to report any bugs they find and request any features they'd like as a [GitHub issue]<https://github.com/SCIInstitute/UncertainSCI/issues>. If you would like to tackle any issues, please volunteer by commenting in the issue or [assigning yourself]<https://docs.github.com/en/issues/tracking-your-work-with-issues/assigning-issues-and-pull-requests-to-other-github-users>.


## Make a Tutorial

If you have a tutorial you'd like to share, we'd love to have it. We have a [Tutorial Tutorial](HowToTutorial.html) to explain how to make and contribute tutorials.


## Contribute Code

We appreciate to code maintenance and development that our community can provide. If you'd like to submit a bug fix, dependency update, or an added feature, please keep in mind the [style guide](#style-guide), create a [fork](#fork-repo) of the UncertainSCI repo, and use a [Pull Request](#pull-requests) to add it to UncertainSCI.

It is best practice to make sure that there is [GitHub issue]<https://github.com/SCIInstitute/UncertainSCI/issues> to describe the required changes to the code, and having these issues documented become more important with the scope of the additions and changes. Possible additions can also be discussed on our [discussion board]<https://github.com/SCIInstitute/UncertainSCI/discussions>.

### Fork Repo

With your own github account, go to the [UncertainSCI Github page](https://github.com/SCIInstitute/UncertainSCI). Click the fork button on the upper right side of the page. It will ask you where to move the fork to, chose your own account. Once the repository is forked, clone it to your local machine with the following command.

```
$git clone https://github.com/[yourgithubaccount]/UncertainSCI.git
```

After the the code is cloned, navigate to the repository directory and add the upstream path to the original UncertainSCI repository.

```
$git remote add upstream https://github.com/SCIInstitute/UncertainSCI.git
```

You should be able to see both your and the original repository when you use the command:

```
$git remote -v
```

The fork is good to go, but you will need to sync the fork occasionally to keep up with the changes in the main repository. To sync your fork, use the following commands:

```
$git fetch upstream
$git checkout master
$git merge upstream/master
```
You should sync and merge your fork before you start a new module and before you create a pull request.
It is a good practice to create a new branch in your fork for every module you will be adding. The command to create a new branch is:

```
$git checkout -b [branch_name]
```

Please see the [Github help page](https://help.github.com) for more information.

### Pull Requests

With the contributions added to a branch on a fork of UncertainSCI, it is ready to create a [pull request]<https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests>. While this can be done in many ways, the easiest is probably through the web page of the forked repo. When navigating to the main page, it will usually display the a `contribute` button near the top of the page for recently updated branches. This is a shortcut to creating a pull request to the main repo and branch. Alternatively, a pull request can be created from the pull request tab of either the main repo or the fork. Before making a pull request, please make sure that you've tried your best to follow the [style guide](#style-guide), and that the branch is up-to-date with the lastest master branch. Also, please update or add [testing](#testing) as appropriate.

Once the pull request is created, the maintainers of UncertainSCI will assign reviewers who will test and review the code to ensure that it meets the requirements of the style guide and is stable. It is best to limit the size of each pull request to facilitate review, so if there are major new additions, please add a [GitHub issue]<https://github.com/SCIInstitute/UncertainSCI/issues> to track the progress.


## Syle Guide

If you are editing code, take a few minutes to look at the code around you and determine its style. Please try to keep the style of new code as similar as possible to unchanged code to avoid jarring inconsistencies in the style.

### Python

- Indentation is 4 spaces per level for consistency with the rest of the code base. This may be revisited in the future. Do not use tabs.
- Text encoding: UTF-8 is preferred, Latin-1 is acceptable
- Comparisons:
- To singletons (e.g. None): use ‘is’ or ‘is not’, never equality operations.
- To Booleans (True, False): don’t ever compare with True or False (for further explanation, see PEP 8).
- Prefix class definitions with two blank lines
- Imports
- Grouped in order of scope/commonallity
- Standard library imports
- Related third party imports
- Local apps/library specific imports
- UncertainSCI application imports and local/module imports may be grouped independently.
- One package per line (with or without multiple function/module/class imports from the package)
- Avoid extraneous whitespaces

### Demos and Usecases

New demos and usecases are always welcome. Please add self-contained scripts demonstrating core functionality to the [demos folder]<https://github.com/SCIInstitute/UncertainSCI/tree/master/demos>. Demos that require external packages can be located in seperate repos, such as this [UQ BEM heart position usecase]<https://github.com/SCIInstitute/UQExampleBEMHeartPosition>

### Testing

In addition to demos, please add unit testing to new function contributed to UncertainSCI using pytest. Unit test should be placed in the [test folder]<https://github.com/SCIInstitute/UncertainSCI/tree/master/tests>, which contains several tests to use as examples. To run the test, use the command:

```
pytest tests
```


We will be filling in more directions about how to to contribute. Try to do the best that you can.


1 change: 1 addition & 0 deletions docs/dev_docs/index.rst
Expand Up @@ -5,5 +5,6 @@ Developer Documentation
:maxdepth: 2
:caption: Contents:

contribute
HowToTutorial

12 changes: 12 additions & 0 deletions docs/tutorials/models.md
Expand Up @@ -108,3 +108,15 @@ u = laplace_ode(left=xminus, right=xplus, N=N, diffusion=a, f=f)
```

This model can be queried using the syntax `u(p)`, where `p` is a `d`-dimensional parameter vector.

# Using UncertainSCI with External Simulation Software

UncertainSCI's non-invasive methods and architecture allow it to be used with simulations run with a variety of software. The only requirements is to take parameter sets from UncertainSCI and to generate a set of solutions for UncertainSCI to use. This can be acheived with software that is implemented in Python or contains a Python API, or by creating a hard disk data passing system. We will include some examples on how to use these systems to integrate simulations with UncertainSCI.

We most often interface UncertainSCI with [SCIRun](https://github.com/SCIInstitute/SCIRun), a simulation software we also produce, to UQ predictions on Bioelectric field simulations.

## SCIRun/UncertainSCI ECG uncertainty due to cardiac postion

An uncertainty quantification (UQ) example computing the effect of heart position on boundary element method (BEM) ECG forward computations. This example is similar to the work of [Swenson, etal.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3362042/) but is implemented in UncertainSCI and SCIRun.

Code and example data are found on GitHub: <https://github.com/SCIInstitute/UQExampleBEMHeartPosition>
2 changes: 1 addition & 1 deletion docs/tutorials/template.md
Expand Up @@ -104,7 +104,7 @@ Tables can be used with normal markdown syntax with the [sphinx-markdown-tables]


### Referencing Sphynx
TODO


To link the UncertainSCI API generated using Sphynx, Use this syntax: [`[text](../api_docs/pce.html#polynomial-chaos-expansions)`](../api_docs/pce.html#polynomial-chaos-expansions)

Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/getting_started.md
Expand Up @@ -23,6 +23,6 @@ Alternatively, you can call the script with `python setup.py install`. pip is s

There are a number of demos included with UncertainSCI to test it's installation and to demonstrate its use.

`demos/build_pce.py` is particularly useful for a quick demonstration of parametric uncertainty quantification using polynomial chaos methods. To run this demo, make sure that UncertainSCI is [installed](#getting-uncertainsci), then simply call the script with python using the command `python demo/build_pce.py`. Other demos can be run similarily.
`demos/build_pce.py` is particularly useful for a quick demonstration of parametric uncertainty quantification using polynomial chaos methods. To run this demo, make sure that UncertainSCI is [installed](#getting-uncertainsci), then simply call the script with python using the command `python demos/build_pce.py`. Other demos can be run similarily.

We have included a number of demos and [tutorials](../tutorials/index.html) to teach users how to use UncertainSCI with your own applications. The [API documentation](../api_docs/index.html) explains the implementation of UncertainSCI in more detail.
21 changes: 15 additions & 6 deletions docs/user_docs/support.md
Expand Up @@ -2,14 +2,23 @@

## Questions?

If you have questions, please ask them on our discussion board:
If you have questions, please ask them on our public discussion board:
<https://github.com/SCIInstitute/UncertainSCI/discussions>

Or you can email our mailing list:
TODO
Or, you can ask them on our mailing list <uncertainsci@sci.utah.edu>. To subscribe:
- send an email to <sympa@sci.utah.edu> with `subscribe uncertainsci` in the body of the email.
- You will receive an email requesting confirmation of the subscription.
- Reply (no text needed) to the email to confirm submission.

## Bugs and Requests
Now you're on the list and will receive updates and questions. You can also submit questions to the list once subscribed

To unsubscribe from the mailing list:
- send an email to <sympa@sci.utah.edu> with `unsubscribe uncertainsci` in the body of the email.
- You will receive a confirmation email confirming the unsubcription.

You can also submit questions to our private support email at <cibc-contact@sci.utah.edu>

Create an issue on Github.

Github: <https://github.com/SCIInstitute/UncertainSCI/issues>
## Bugs and Requests

If you find any bugs or have any feature requests, please create an issue on GitHub: <https://github.com/SCIInstitute/UncertainSCI/issues>
43 changes: 43 additions & 0 deletions paper/paper.bib
Expand Up @@ -106,6 +106,22 @@ @InProceedings{JDT:Ber2021
volume = "48"
}

@Article{JDT:Rah2016,
author = "A. {Rahimi} and J. {Sapp} and J. {Xu} and P.
{Bajorski} and M. Hor\'{a}\v{c}ek and L. {Wang}",
journal = "{IEEE} Trans. Med. Imag.",
title = "Examining the Impact of Prior Models in Transmural
Electrophysiological Imaging: {A} Hierarchical
Multiple-Model Bayesian Approach",
year = "2016",
volume = "35",
number = "1",
pages = "229--243",
doi = "10.1109/TMI.2015.2464315",
ISSN = "0278-0062",
month = jan,
}


@article{JDT:Tat2021c,
author = {Tate, J.D. and Rampersad, S. and Charlebois, C. and Liu, Zexin and Bergquist, J.A. and White, D. and Rupp, L.C. and Brooks, D.H. and Narayan, A. and MacLeod, R.S.},
Expand All @@ -124,6 +140,19 @@ @article{JDT:Tat2021c
volume = {14},
year = {2021}
}
@Article{JDT:Xu2014,
author = "Jingjia Xu and John L Sapp and Azar Rahimi Dehaghani
and Fei Gao and Linwei Wang",
date = "2014",
journal = "Med Image Comput Comput Assist Interv",
number = "Pt 2",
pages = "529--537",
title = "Variational Bayesian electrophysiological imaging of
myocardial infarction.",
volume = "17",
year = "2014",
}
@book{ACN:Xiu2010,
title = {Numerical {Methods} for {Stochastic} {Computations}: {A} {Spectral} {Method} {Approach}},
Expand All @@ -135,6 +164,18 @@ @book{ACN:Xiu2010
year = {2010}
}

@incollection{ACN:Ras2004,
title = "Gaussian {Processes} in {Machine} {Learning}",
series = "Lecture {Notes} in {Computer} {Science}",
isbn = "978-3-540-23122-6 978-3-540-28650-9",
booktitle = "Advanced {Lectures} on {Machine} {Learning}",
publisher = "Springer, Berlin, Heidelberg",
author = "Rasmussen, C. E.",
year = "2004",
doi = "10.1007/978-3-540-28650-9_4",
pages = "63--71",
}

@article{ACN:Guo2018,
title = {Weighted {Approximate} {Fekete} {Points}: {Sampling} for {Least}-{Squares} {Polynomial} {Approximation}},
volume = {40},
Expand Down Expand Up @@ -173,3 +214,5 @@ @article{ACN:Nar2018
note = {arXiv:1704.08465 [math]},
pages = {71--97}
}


0 comments on commit 52de2ab

Please sign in to comment.