Use Cookiecutter to quickly generate a new HyP3 Plugin.
1. Create the plugin with CookiecutterTo create a new plugin, you'll first need to run cookiecutter
, which you can install with conda
/mamba
(we recommend MiniForge):
mamba install cookiecutter
or pip
:
python -m pip install cookiecutter
Then, from a terminal on your local development machine, navigate to where you'd like to create the local copy of your new plugin's repository and run cookiecutter, following the prompts.
For example, this may look like:
cookiecutter https://github.com/ASFHyP3/hyp3-cookiecutter.git
[1/7] github_username (username_for_github_actions): foo
[2/7] github_email (email_for@github_actions.com): foo@bar.com
[3/7] github_actions_token (FOO_PAK):
[4/7] process_type (RTC): foo-bar
[5/7] short_description (HyP3 plugin for foo-bar processing.):
[6/7] public_url (https://github.com/ASFHyP3/hyp3-foo-bar):
[7/7] copyright_year (2025):
Tip
The github_*
prompts facilitate the CI/CD pipelines included in the cookiecutter. These can be for yourself, or a shared team "bot" user, and we'll set up a Personal Access Token in Section 6.
Now, you should have a hyp3-<process_type>
(hyp3-foo-bar
in the example above) directory which contains a minimal HyP3 plugin.
Next, we'll need to create a new repository on GitHub for your plugin.
Your repository name should be the same as the directory name for the plugin you created on your local develop machine. (e.g., hyp3-<PROCESS_TYPE>
). For the description section, you can copy in the short description you created in the cookiecutter step. You can find this in your newly-generated, README.md
file, or in your command line history. Next, set the repository to "Public", and do not click the "Initialize repository with a README" box (or add a .gitignore
or add a license).
We use a conda
/mamba
environments to manage our dependencies; you can get Mambaforge (recommended) here:
https://github.com/conda-forge/miniforge#mambaforge
And you can get Miniconda here:
https://docs.conda.io/en/latest/miniconda.html
Once conda is installed, from the repository root, you can create and activate a development environment with all the necessary dependencies
cd hyp3-<process> conda env create -f environment.yml conda activate hyp3-<process>
You should now have a development environment with all the required packages for a generic HyP3 plugin. Later, as dependencies change, you can edit the environment.yml
file and then update your environment with
conda env update -f environment.yml4. Push the repository to GitHub
We want to push the local copy we just created to our GitHub repository:
# From hyp3-<process> git init . git remote add origin https://github.com/<GITHUB_USERNAME>/hyp3-<PROCESS_TYPE>.git git add . git commit -m "Minimal HyP3 plugin created with the hyp3 plugin cookiecutter" git branch -M main git push -u origin main
We also want to create a zeroth production version from this initial commit so that the plugin's auto-versioning will work correctly.
git tag -a v0.0.0 -m "Marking zeroth release for auto-versioning and CI/CD Tooling" git push --tags
Then add a development branch:
git checkout -b develop git push -u origin develop5. Configure the GitHub repository settings
Once the zeroth release is pushed to GitHub, we need to configure the GitHub repository settings. The settings detailed here are not required, but we STRONGLY recommend them as they make it much easier for others to collaborate on your project, and for you to control how the collaboration occurs.
Go to your repository in GitHub and click "Settings", then:
develop
github_username
prompt when running the cookiecutter does not already have access to all repos at the organization level, add the user under "Direct access" with Role: write
. For https://github.com/ASFHyP3 repos, you should add the ASFHyP3/automation
team here, which includes the tools-bot
user.main
:
main
develop
:
develop
github_username
prompt when running the cookiecutter. This is required for allowing the reusable-release.yml
workflow to merge main
back into develop
after a release. For https://github.com/ASFHyP3 repos, you should add the ASFHyP3/automation
team here, which includes the tools-bot
user.github_username
prompt when running the cookiecutter. For https://github.com/ASFHyP3 repos, you should add the ASFHyP3/automation
team here, which includes the tools-bot
user.For more information on how to contribute to repositories set up in this manner, check out GitHub's GitHub flow article.
6. Create a personal access key for GitHub ActionsSome of the GitHub actions (release.yml
and tag-version.yml
) need extra permissions to work properly and will attempt to assume those permission via a repository secret named <github_actions_token>
. So, if it doesn't already exist, we will need to create the token.
<GH_ACCOUNT_NAME>_PAK
)<GH_ACCOUNT_NAME>_PAK
This access token will regularly expire unless you set them to last forever (which we don't recommend) so make sure to keep the token current and the secret up to date!
7. Make HyP3 plugin container publicOnce the "Test and build" GitHub Actions workflow has successfully run, a containerized version of your plugin will be available in the GitHub Container Registry (GHCR). You can find this plugin in the "Packages" section of your GitHub user/organization account. You can also pull
it to your local machine for use using the command:
docker pull ghcr.io/<GH_ACCOUNT_NAME>/<GH_REPOSITORY_NAME>
GHCR containers are private by default. You'll need to manually change the visibility of your container to "Public" so that HyP3 can access it. See this GitHub Documentation for a step-by-step guide.
After you've developed the basic functionality of your plugin, perform an initial release by opening and merging a PR from develop
to main
. This should create a v0.1.0
release, assuming you did not change the [0.1.0]
heading in the CHANGELOG.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4