-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from openforcefield/examples
[DNM] Examples page
- Loading branch information
Showing
23 changed files
with
822 additions
and
83 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,29 @@ | ||
name: Clean up PR cache | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
preprocess: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout deployment branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: _cookbook_data | ||
clean: false | ||
|
||
- name: Clean up PR cache | ||
shell: bash -l {0} | ||
run: | | ||
rm -r PR${{ github.event.number }} | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add . | ||
git commit --amend -m "Deploy pre-processed notebook cache" | ||
git push --force origin _cookbook_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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Generate PR cache by copying main | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
branches: | ||
- main | ||
|
||
jobs: | ||
preprocess: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout deployment branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: _cookbook_data | ||
clean: false | ||
|
||
- name: Copy cache from main to PR folder and deploy | ||
shell: bash -l {0} | ||
run: | | ||
cp -r main PR${{ github.event.number }} | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add . | ||
git commit --amend -m "Deploy pre-processed notebook cache" | ||
git push --force origin _cookbook_data | ||
- name: Add descriptive comment to PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: > | ||
This repository caches data generated from notebooks stored in other | ||
repositories in the `_cookbook_data` branch. Regenerating this cache | ||
takes about half an hour, so it is not done automatically in PRs. | ||
The current value of the cache from the `main` branch has been | ||
copied over to this PR's cache. | ||
To regenerate the cache, navigate to the [`cookbook_preproc` | ||
action], click "Run workflow", select the current branch and enter | ||
the PR number (`${{ github.event.number }}`), and then click the | ||
green "Run workflow" button. | ||
Note that the RTD build must be executed after the | ||
`cookbook_preproc` action has finished for its results to be | ||
visible, which can be done from the appropriate [build page]. | ||
[`cookbook_preproc` action]: https://github.com/openforcefield/openff-docs/actions/workflows/cookbook_preproc.yaml | ||
[build page]: https://readthedocs.org/projects/openff-docs/builds/ |
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
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
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,6 +2,7 @@ | |
build/ | ||
|
||
# Cookbook files | ||
source/examples/ | ||
source/_cookbook/ | ||
|
||
# Python stuff | ||
|
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
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
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
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.