-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add contribution workflow and dev deployment
Contribution Guidelines
- Loading branch information
Showing
14 changed files
with
365 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Contribution Proposal | ||
description: | ||
Want to contribute to our eBook? Fill the following proposal form and we will review your contribution idea shortly. | ||
labels: ["needs triage"] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## Please fill out the form completly | ||
See our `contribution documentation <https://uc-ebook.org/docs/html/contributing.html>`_ for additional information. | ||
**NOTE**: We require that all contributions including any code, data, or other content provided with them be fully open source. | ||
- type: textarea | ||
id: issue-name | ||
attributes: | ||
label: Name | ||
description: Please provide your name | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: issue-email | ||
attributes: | ||
label: Email | ||
description: Please provide your email address | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: issue-institution | ||
attributes: | ||
label: Institution | ||
description: Please provide your institution | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: issue-source | ||
attributes: | ||
label: Referral | ||
description: How did you hear about the eBook? | ||
validations: | ||
required: true | ||
|
||
- type: dropdown | ||
id: issue-category | ||
attributes: | ||
label: Topic Area | ||
description: Select the part of the eBook you are hoping to contribute to. | ||
options: | ||
- General | ||
- Sensitivity Analysis | ||
- Uncertainty Quantification | ||
- Jupyter Notebook | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: issue-description | ||
attributes: | ||
label: Description | ||
description: Please provide a detailed description of the content you wish to contribute. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduction-info | ||
attributes: | ||
label: Additional Information | ||
description: Please provide any additional information you want to share. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Tutorial Contribution | ||
The following upon submission starts the review process for your draft Jupyter notebook contribution to the eBook. Please see our [contribution documentation](https://uc-ebook.org/docs/html/contributing.html) for additional guidance. | ||
|
||
## Contribution Issue Link | ||
Please reference the link to your approved contribution issue here: # (issue) | ||
|
||
## Checklist | ||
Please ensure that you are able to check all of the following boxes before submission | ||
- [ ] My contribution proposal has been approved | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] All elements of my contribution are fully open-source and can be distributed with an [Open Source Initiative approved license](https://opensource.org/licenses/) with an understanding that they may be used in community demonstrations and other activities. Author citations will be present in the notebook for any contributed work to ensure the author(s) receive full credit for their contribution. | ||
- [ ] Any data or code reused in your submission are correctly cited giving credit to the original authors. | ||
- [ ] The notebook provided is written in English and able to be a stand-alone product that needs no further explanation past what is written in the notebook to make use of it. | ||
- [ ] The provided work is not merely a regurgitation of an existing tutorial or demonstration but represents a novel contribution. | ||
- [ ] All contributions and communication thereof must abide by our [code of conduct](https://uc-ebook.org/docs/html/code_of_conduct.html). | ||
|
||
## Additional information | ||
|
||
## Please upload your draft notebook as an attachment to this pull request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Build | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [ main, dev ] | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,10 @@ jobs: | |
run: npm run build | ||
- name: Commit documentation changes | ||
run: | | ||
cd landing/build | ||
git clone --depth=1 --branch=gh-pages https://github.com/IMMM-SFA/msd_uncertainty_ebook.git previous_deploy | ||
mkdir ./landing/build/dev | ||
cp -r ./previous_deploy/dev/* ./landing/build/dev/ | ||
cd ./landing/build | ||
git init | ||
git add -A | ||
git config --local user.email "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Deploy Dev | ||
|
||
on: | ||
push: | ||
branches: [ dev ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Install latex dependencies | ||
run: sudo apt-get update -y && sudo apt-get install -y texlive latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended ghostscript | ||
- name: Update pip and install python dependencies | ||
working-directory: 'docs/' | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Build html and pdf ebook | ||
working-directory: 'docs/' | ||
env: | ||
NODE_ENV: development | ||
run: | | ||
make html latexpdf --keep-going LATEXMKOPTS="-interaction=nonstopmode" || true | ||
make latexpdf --keep-going LATEXMKOPTS="-interaction=nonstopmode" || true | ||
make latexpdf --keep-going LATEXMKOPTS="-interaction=nonstopmode" || true | ||
continue-on-error: true | ||
- name: Concatenate eBook cover with eBook | ||
run: | | ||
mv docs/build/latex/addressinguncertaintyinmultisectordynamicsresearch.pdf docs/build/latex/ebook_content.pdf | ||
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=docs/build/latex/addressinguncertaintyinmultisectordynamicsresearch.pdf -dBATCH docs/ebook_cover.pdf docs/build/latex/ebook_content.pdf | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
cache-dependency-path: landing/package-lock.json | ||
- uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --delete | ||
env: | ||
SOURCE_DIR: 'notebooks' | ||
DEST_DIR: 'notebooks' | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DEV }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_DEV }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEV }} | ||
AWS_REGION: ${{ secrets.AWS_REGION_DEV }} | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
file: Dockerfile_dev | ||
push: true | ||
tags: thurber/uc-ebook.org:dev | ||
- name: Install landing page dependencies | ||
working-directory: 'landing/' | ||
run: npm install | ||
- name: Build landing page | ||
working-directory: 'landing/' | ||
env: | ||
NODE_ENV: development | ||
run: npm run build | ||
- name: Commit documentation changes | ||
run: | | ||
git clone --depth=1 --branch=gh-pages https://github.com/IMMM-SFA/msd_uncertainty_ebook.git deploy | ||
rm -rf ./deploy/.git | ||
rm -rf ./deploy/dev | ||
mkdir ./deploy/dev | ||
cp -r ./landing/build/* ./deploy/dev/ | ||
cd ./deploy | ||
git init | ||
git add -A | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m 'deploy' -a || true | ||
- name: Push changes to gh-pages | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: gh-pages | ||
directory: deploy | ||
force: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the overall | ||
community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies | ||
when an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, | ||
available at https://www.contributor-covenant.org/version/2/0/ | ||
code_of_conduct.html. | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
https://www.contributor-covenant.org/faq. Translations are available at https:// | ||
www.contributor-covenant.org/translations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM jupyter/minimal-notebook:2022-05-03 | ||
|
||
USER root | ||
|
||
RUN git clone --depth=1 --branch=dev https://github.com/IMMM-SFA/msd_uncertainty_ebook.git msd_uncertainty_ebook | ||
RUN cd msd_uncertainty_ebook && pip install . | ||
|
||
# Now create a symlinked data folder inside the msdbook package that links to /home/demo/data folder | ||
RUN mkdir -p /home/demo/data | ||
RUN rm -rf /opt/conda/lib/python3.9/site-packages/msdbook/data | ||
RUN ln -s /home/demo/data /opt/conda/lib/python3.9/site-packages/msdbook/data | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
autodoc~=0.5.0 | ||
ipython~=8.0.1 | ||
mathjax~=0.1.2 | ||
nbsphinx~=0.8.6 | ||
sphinx~=4.0.2 | ||
sphinx-book-theme~=0.2.0 | ||
sphinxcontrib-bibtex~=2.4.1 | ||
autodoc>=0.5.0 | ||
ipython>=8.0.1 | ||
mathjax>=0.1.2 | ||
nbsphinx>=0.8.6 | ||
sphinx>=4.0.2 | ||
sphinx-book-theme>=0.2.0 | ||
sphinxcontrib-bibtex>=2.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Code of Conduct | ||
=============== | ||
|
||
Our Pledge | ||
---------- | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
Our Standards | ||
------------- | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
- Demonstrating empathy and kindness toward other people | ||
- Being respectful of differing opinions, viewpoints, and experiences | ||
- Giving and gracefully accepting constructive feedback | ||
- Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
- Focusing on what is best not just for us as individuals, but for the overall | ||
community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
- The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
- Trolling, insulting or derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
Scope | ||
----- | ||
|
||
This Code of Conduct applies within all community spaces, and also applies | ||
when an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
Attribution | ||
----------- | ||
|
||
This Code of Conduct is adapted from the Contributor Covenant, version 2.0, | ||
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.