-
Notifications
You must be signed in to change notification settings - Fork 3
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 #6 from simonsobs/docs
Documentation and several small fixes
- Loading branch information
Showing
23 changed files
with
545 additions
and
316 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,56 @@ | ||
name: Deploy Documentation | ||
|
||
# on: | ||
# push: | ||
# tags: | ||
# - '*' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update_docs: | ||
name: Build and Deploy Documentation | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Create Cache ID | ||
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
|
||
- name: Setup Cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: Install Dependencies | ||
run: | | ||
pip install mkdocs mkdocstrings mkdocstrings-python mkdocs-material | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Deploy Docs | ||
run: | | ||
cd docs | ||
mkdocs gh-deploy --force |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Automating the Install | ||
|
||
The general process of automating the install proceeds like this: | ||
|
||
1. A cron job (or similar) runs periodically and launches a script which | ||
examines current tags of soconda and finds the latest one. It looks at the | ||
installation directory and determines whether this tag has been installed. If | ||
not, it runs an installation wrapper script for the current system. | ||
|
||
2. The wrapper script has hard-coded paths to the various locations and also | ||
knows how to build the version string to use. This script calls the | ||
`soconda.sh` script to install the latest tag. | ||
|
||
3. If a new tag was installed, a message is posted via slack hook to one of the | ||
Simons Observatory slack channels. | ||
|
||
## Example: Perlmutter at NERSC | ||
|
||
In the `deploy` subdirectory are the relevant files. The perlmutter install | ||
wrapper script is in `install_perlmutter.sh`. The tag checking script run by | ||
the cron job is in `install_nersc_tag.sh`, and the example lines in the scron | ||
tab are in `scron_check_tag.slurm`. |
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,57 @@ | ||
# Developer Notes | ||
|
||
This section covers steps needed when maintaining the `soconda` tools. | ||
|
||
## Releases | ||
|
||
After updating the versions of included packages, it is a good idea to make a | ||
new release so that a new environment is built and deployed. After all | ||
outstanding changes are merged to `main`, go to the github page for this | ||
repository and click on the `Actions` tab. Trigger the `Test Build` workflow. | ||
This will take an hour or so to run. Assuming it all works, create a new | ||
release with some notes about what was updated. Cron jobs running on our | ||
computing centers will check for new tags and build them if found. | ||
|
||
## Changing Installed Packages | ||
|
||
The three top-level files: `packages_conda.txt`, `packages_local.txt`, and | ||
`packages_pip.txt` contain the packages that will be installed. The conda | ||
packages are installed first, then local conda packages are built and | ||
installed, and finally the pip packages are installed. When installing pip | ||
packages, the `soconda.sh` script first extracts the dependencies of each pip | ||
package and installs it instead with conda. This helps minimize the number of | ||
pip packages installed in the environment and that makes it easier to avoid | ||
dependency problems later. | ||
|
||
## Updating Bundled Recipes | ||
|
||
The conda recipes for bundled packages should be updated whenever upstream | ||
packages have new releases. This involves the following steps: | ||
|
||
1. Update the version in the `meta.yaml` file of the package recipe. | ||
|
||
2. Update the download URL if needed. | ||
|
||
3. Manually download the new tarball of the package. For example: | ||
|
||
curl -SL -o pixel-0.19.0.tar.gz \ | ||
https://github.com/simonsobs/pixell/archive/v0.19.0.tar.gz | ||
|
||
4. Get the sha256 checksum of the tarball, and copy that into the `meta.yaml` | ||
entry: | ||
|
||
openssl sha256 pixel-0.19.0.tar.gz | ||
SHA256(pixell-0.19.0.tar.gz)= 8142a2a368175de845166afffe3e4efd0ac0bdc109a96eb8f4cc0360e6191fd1 | ||
|
||
5. Ensure that the new version of the package does not have any updated | ||
dependencies or other constraints. | ||
|
||
## Adding New Package Recipes | ||
|
||
This should not be needed very often, and will require some familiarity with | ||
conda recipes. Create a new directory for the recipe in the `pkgs` directory. | ||
Add a `meta.yaml` file, a `build.sh` file, and a copy of the package license. | ||
See the conda documentation and existing conda-forge feedstocks for extensive | ||
examples. You can load an existing soconda environment as a testbed and then | ||
test your new recipe with `conda build`. After you can build it independently, | ||
add it to the `packages_local.txt` file. |
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,15 @@ | ||
# Simons Observatory Conda Tools | ||
|
||
[This git repository](https://github.com/simonsobs/soconda) contains scripts to | ||
help with: | ||
|
||
- Installing a conda base system (optional) | ||
|
||
- Creating a conda environment with a well-defined set of conda and pip packages | ||
|
||
- Building a few legacy compiled packages into this environment | ||
|
||
- Creating a versioned modulefile for loading the environment | ||
|
||
The documentation also covers different user scenarios for loading and | ||
customizing a pre-installed environment. |
Oops, something went wrong.