Skip to content

Commit 52de2ab

Browse files
authored
Joss feedback (#106)
* 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
1 parent 9b15633 commit 52de2ab

File tree

16 files changed

+229
-41
lines changed

16 files changed

+229
-41
lines changed

.github/workflows/draft-pdf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Paper Draft
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
- name: Build draft PDF
1313
uses: openjournals/openjournals-draft-action@master
1414
with:

.github/workflows/pypublish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
name: Publish Python distribution to PyPI and TestPyPI
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- name: Setup Python 3.8
11-
uses: actions/setup-python@v2
9+
- uses: actions/checkout@v3
10+
- name: Setup Python 3.9
11+
uses: actions/setup-python@v3
1212
with:
13-
python-version: 3.8
13+
python-version: 3.9
1414
- name: Install pypa/build
1515
run: >-
1616
python -m

.github/workflows/pythonapp.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, windows-latest, macOS-latest]
15-
python-version: [3.8, 3.9, "3.10"]
15+
python-version: ["3.9", "3.10", "3.11"]
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v3
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Display Python version
@@ -38,3 +38,27 @@ jobs:
3838
run: |
3939
pip install --editable ./
4040
pytest --cov=UncertainSCI
41+
- name: Upload coverage data to coveralls.io
42+
run: |
43+
pip install coveralls
44+
coveralls --service=github
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
COVERALLS_FLAG_NAME: ${{ matrix.os }}
48+
COVERALLS_PARALLEL: true
49+
coveralls:
50+
name: confirm coveralls upload
51+
needs: build
52+
runs-on: ubuntu-latest
53+
container: python:3-slim
54+
steps:
55+
- name: Finished
56+
run: |
57+
pip3 install --upgrade pip
58+
pip3 install --upgrade coveralls
59+
coveralls --service=github --finish
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
63+
64+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,7 @@ docs/_build/
142142

143143
data_set/*
144144
._.DS_Store
145+
146+
#paper files
147+
paper/paper.pdf
148+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ A Python-based toolkit that harnesses modern techniques to estimate model and pa
66
![UncertainSCI](docs/_static/UncertainSCI.png "UncertainSCI")
77

88

9-
![Linux build](https://github.com/SCIInstitute/UncertainSCI/workflows/Linux%20build/badge.svg)
10-
9+
![All Builds](https://github.com/SCIInstitute/UncertainSCI/workflows/Build/badge.svg)
10+
[![Coverage Status](https://coveralls.io/repos/github/SCIInstitute/UncertainSCI/badge.svg?branch=master)](https://coveralls.io/github/SCIInstitute/UncertainSCI?branch=master)
1111
[![status](https://joss.theoj.org/papers/660d2fe53fbf67dd2714e9546251bd33/status.svg)](https://joss.theoj.org/papers/660d2fe53fbf67dd2714e9546251bd33)
1212

1313

docs/dev_docs/HowToTutorial.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,11 @@ Tables can be used with normal markdown syntax with the [sphinx-markdown-tables]
286286

287287
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).
288288

289+
290+
289291
## Content Guide
290292

291-
TODO
293+
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.
292294

293295
## Supplemental Materials
294296

docs/dev_docs/contribute.md

Lines changed: 101 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,107 @@
11
# Contribution Guide
22

3-
Thank you for you cobributions to UncertainSCI!
3+
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.
44

5-
If you'd like to make a tutorial, please follow the instructions in the [Tutorial Tutorial](HowToTutorial.html).
5+
## Community Support
6+
7+
A great way to start contributing to UncertainSCI is to submit and answer questions on our [discussion board]<https://github.com/SCIInstitute/UncertainSCI/discussions>.
8+
9+
Other ways of contacting the communtity are located on our [support page](../user_docs/support.html#support)
10+
11+
## Bugs and Features
12+
13+
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>.
14+
15+
16+
## Make a Tutorial
17+
18+
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.
19+
20+
21+
## Contribute Code
22+
23+
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.
24+
25+
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>.
26+
27+
### Fork Repo
28+
29+
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.
30+
31+
```
32+
$git clone https://github.com/[yourgithubaccount]/UncertainSCI.git
33+
```
34+
35+
After the the code is cloned, navigate to the repository directory and add the upstream path to the original UncertainSCI repository.
36+
37+
```
38+
$git remote add upstream https://github.com/SCIInstitute/UncertainSCI.git
39+
```
40+
41+
You should be able to see both your and the original repository when you use the command:
42+
43+
```
44+
$git remote -v
45+
```
46+
47+
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:
48+
49+
```
50+
$git fetch upstream
51+
52+
$git checkout master
53+
54+
$git merge upstream/master
55+
```
56+
You should sync and merge your fork before you start a new module and before you create a pull request.
57+
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:
58+
59+
```
60+
$git checkout -b [branch_name]
61+
```
62+
63+
Please see the [Github help page](https://help.github.com) for more information.
64+
65+
### Pull Requests
66+
67+
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.
68+
69+
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.
70+
71+
72+
## Syle Guide
73+
74+
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.
75+
76+
### Python
77+
78+
- 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.
79+
- Text encoding: UTF-8 is preferred, Latin-1 is acceptable
80+
- Comparisons:
81+
- To singletons (e.g. None): use ‘is’ or ‘is not’, never equality operations.
82+
- To Booleans (True, False): don’t ever compare with True or False (for further explanation, see PEP 8).
83+
- Prefix class definitions with two blank lines
84+
- Imports
85+
- Grouped in order of scope/commonallity
86+
- Standard library imports
87+
- Related third party imports
88+
- Local apps/library specific imports
89+
- UncertainSCI application imports and local/module imports may be grouped independently.
90+
- One package per line (with or without multiple function/module/class imports from the package)
91+
- Avoid extraneous whitespaces
92+
93+
### Demos and Usecases
94+
95+
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>
96+
97+
### Testing
98+
99+
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:
100+
101+
```
102+
pytest tests
103+
```
104+
6105

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

9107

docs/dev_docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Developer Documentation
55
:maxdepth: 2
66
:caption: Contents:
77

8+
contribute
89
HowToTutorial
910

docs/tutorials/models.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,15 @@ u = laplace_ode(left=xminus, right=xplus, N=N, diffusion=a, f=f)
108108
```
109109

110110
This model can be queried using the syntax `u(p)`, where `p` is a `d`-dimensional parameter vector.
111+
112+
# Using UncertainSCI with External Simulation Software
113+
114+
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.
115+
116+
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.
117+
118+
## SCIRun/UncertainSCI ECG uncertainty due to cardiac postion
119+
120+
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.
121+
122+
Code and example data are found on GitHub: <https://github.com/SCIInstitute/UQExampleBEMHeartPosition>

docs/tutorials/template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Tables can be used with normal markdown syntax with the [sphinx-markdown-tables]
104104

105105

106106
### Referencing Sphynx
107-
TODO
107+
108108

109109
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)
110110

0 commit comments

Comments
 (0)