/ˈdōˌjō/
noun
a hall or place for immersive learning or meditation.
Conda-Build Dojo walks you through lessons that re-create scenarios encountered during package building.
Requirements
Setup
Getting updates
How to contribute a lesson
Development
- A system running some Unix variant (e.g. MacOS or Linux)
- Docker
NOTE: Only linux-64
and noarch
lessons are supported at this time.
- Fork this repo to your personal Github account.
- Clone your forked repo to your local machine (e.g. your Mac), preferably the same directory as
aggregate
. - From the
conda_build_dojo
root directory, run these steps to set up your remote sources:- Check the remote source of your repo (you should only see
origin
, pointing to the repo under your Github account).git remote -v
- Add a new remote source, called
upstream
, pointed at the URL of the original repo.git remote add upstream [email protected]:anaconda-distribution/conda_build_dojo.git
- Check the remote sources again. You should now see
origin
andupstream
.git remote -v
- Check the remote source of your repo (you should only see
- Build the Docker image.
docker build --network=host -t dojo_c3i_linux_64 ./docker_images/c3i-linux-64/
- Run the Docker container, mounted to the local directory on your host that is the parent to
aggregate
andconda_build_dojo
.docker run -it --mount 'src=</absolute/path/to/conda_build_dojo_and_aggregate_parent>,target=/home/,type=bind' dojo_c3i_linux_64 # EXAMPLE (if `aggregate` and `conda_build_dojo` share the same parent directory called `projects`): docker run -it --mount 'src=/Users/pyim/shared/projects/,target=/home/,type=bind' dojo_c3i_linux_64
- You should now be in the container. Run:
This will install
start
dojo
and its dependencies. If you get an error, double-check that you mounted from the correct directory in the previous step. - Confirm
dojo
is installed.dojo --help
- View lessons.
dojo lessons
- Start a lesson.
dojo start <LESSON NAME>
- As you complete lessons in
dojo
, save your progress by committing and pushing to your personalorigin
repo. (Do this from your host machine - not from the Docker container).git push origin main
- If you exit your Docker container, you can re-run it using the command in Step 5. If your Docker image gets destroyed, you can rebuild it using the command in Step 4.
In the future, when you need to pull updates from the upstream repo (e.g. new lessons, bug fixes, or enhancements), run this form your host machine (not the Docker container):
git pull upstream main
Then, if you have a running container, run this to re-install dojo
with the updates:
start
- From your host machine, checkout a dev branch.
- From the Docker container, run:
dojo create_lesson --name <LESSON_NAME>
- Fill out all of the sections in the
lesson.yaml
. - (OPTIONAL) If your lesson requires
dojo_channels
(e.g. fake channels that recreate the channel conditions for your lesson), create and populate adojo_channels_pkgs.txt
file in your lesson directory.- In a separate terminal session, create a conda env (e.g.
test_env
) with your target package installed in it. Make sure to include allbuild
,host
,run
, andtest
requirements. This will capture the full set of packages you need to build your target package indojo
. - After the env is created, run:
conda list -n test_env --explicit
- Copy and paste the list of URLs into the
dojo_channel_pkgs.txt
file.- Delete the URLs for any packages that should be removed for the lesson (i.e. the packages that the learner is expected to debug or build on their own).
- In a separate terminal session, create a conda env (e.g.
- Test your lesson (e.g. try out each step yourself).
- Add your lesson to the
curriculum.yaml
under one of the topics. - Run
dojo clean
(to get rid of any progress and history that should not be committed upstream). - Commit and push your changes to the upstream repo.
git push upstream <YOUR DEV BRANCH>
- Create a PR.
If you're planning to make a change to the upstream repo, do the following:
- From your host machine, checkout a dev branch.
- Make your changes.
- Test your changes in the Docker container.
- Run
dojo clean
(to get rid of any progress and history that should not be committed upstream). - Commit and push your changes to the upstream repo.
git push upstream <YOUR DEV BRANCH>
- Create a PR.
- Lesons to add:
- Create a patch (including on GitHub using .patch extension!)
- Port a patch
- Oniguruma (upstream breaking change)
- How to inspect a failed build (e.g. build_env, h_env)
- Checking the license type in a meta.yaml (Anju's example with pg8000-feedstock)