-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] lint/test/docs on PR and push to main (#742)
* lint/test on PR and push to main * Run docs CI on every push to main * Fail docs when a notebook doesn't build * skip eval_metrics fix in tutorial_utils * when writing extxyz in docs, specific force as a column explicitly * task.dataset -> dataset.format * small fixes in config in tutorial * make train dataset optional if only used test dataset * more small fixes if you don't specify a train dataset * loss_fns -> loss_functions in tutorial * eval_metrics -> evaluation_metrics in OCP tutorial * FixAtoms as int * don't clear train dataset if present but src is missing * invert train dataset load logic * fix logic * bool mask * require docs test on main * pull_request_review to trigger doc build * use FixAtoms fix from stress-relaxations branch * sneak in a push trigger to test docs * upload only html artifact * sneaky push * fix artifact path * fix job names * no deploy docs on push * add devcontainer settings * small fix to legacy tutorial * small fix to legacy tutorial * another small tutorial fix * add rest of tutorial back * clean up logic in load_datasets * typo * logic typo in load_datasets * convert all md to ipynb on launch * add minimum spec on devcontainer to make sure everything runs * include subdirectories in conversion * 758 fix * minor fixes * relax otf * typo * try removing comments in build_docs yml --------- Co-authored-by: zulissimeta <[email protected]> Co-authored-by: Zack Ulissi <[email protected]> Co-authored-by: Muhammed Shuaibi <[email protected]>
- Loading branch information
1 parent
1442177
commit aacb883
Showing
17 changed files
with
180 additions
and
88 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,22 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/anaconda:0.205.0-3", | ||
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", | ||
"forwardPorts": [ | ||
8888 | ||
], | ||
"postStartCommand": "nohup bash -c 'jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' &'", | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance" | ||
] | ||
} | ||
}, | ||
"hostRequirements": { | ||
"memory": "16gb", | ||
} | ||
} |
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,11 @@ | ||
#!/bin/bash | ||
if [ -f packages/requirements.txt ]; then pip install -r packages/requirements.txt; fi | ||
if [ -f packages/requirements-optional.txt ]; then pip install -r packages/requirements-optional.txt; fi | ||
pip install -e packages/fairchem-core[dev] | ||
pip install -e packages/fairchem-data-oc[dev] | ||
pip install -e packages/fairchem-demo-ocpapi[dev] | ||
pip install -e packages/fairchem-applications-cattsunami | ||
pip install jupytext | ||
|
||
# Convert all .md docs to ipynb for easy viewing in vscode later! | ||
find ./docs -name '*.md' -exec jupytext --to ipynb {} \; |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: build and deploy docs | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build_docs.yml | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download docs artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docs-html | ||
path: docs-html/ | ||
|
||
- name: Deploy to ghpages branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs-html | ||
|
||
- name: Deploy to fair-chem.github.io | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
external_repository: FAIR-Chem/fair-chem.github.io | ||
publish_branch: gh-pages | ||
publish_dir: docs-html |
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,8 +1,11 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
workflow_call: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
|
||
jobs: | ||
lint: | ||
|
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
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
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.