A simple CLI tool to create new BHKLab projects from a template
Project description
Project Template for BHKLab Projects
How this works
This project uses the copier tool to maintain a standardized project template that follows the general structure of BHKLab repositories.
Copier facilitates the management of project templates by using jinja2 templating for file/directory names and content in the template.
Project Status and Roadmap
[!NOTE] This section tracks the development progress of the BHKLab project template.
Project Overview
The BHKLab project template aims to provide:
- Simple project setup with pixi, mkdocs, and basic DMP folder structure
- Support for reproducible research with proper documentation
- GitHub integrations and standardized workflow
Requirements
1: Make sure you have the pixi tool installed.
Visit the pixi documentation
The following two commands should work:
pixi exec gh --help
pixi exec copier --help
2: Make sure you have logged in to GitHub CLI.
pixi exec gh auth login --hostname 'github.com' --git-protocol https
Follow the instructions to authenticate with your GitHub account.
[!WARNING] Make sure you have been added to our lab organization(s) before proceeding!
Usage
Run the following command to create a new project.
Replace <PROJECT_NAME> with the name of your project.
- i.e
gdcs-drug-combowould create a directory calledgdcs-drug-combo
pixi exec copier copy --trust gh:bhklab/bhklab-project-template <PROJECT_NAME>
Status and Roadmap
Status
- Basic template structure with copier
- Pixi integration with conda-forge/bioconda channels and platforms (linux-64, osx-arm64, win-64, osx-64)
- DMP structure with proper README files
- workflow/notebooks
- workflow/scripts
- data/rawdata (gitignored with README)
- data/procdata (gitignored with README)
- data/results (gitignored with README)
- MkDocs setup with basic pages structure
- Home page (links to README)
- Usage page (how to run code)
- Data Sources page (documentation for rawdata)
- Developer Notes page (working notes/journal)
- GitHub repository creation automation with gh CLI
- GitHub Pages setup with automatic deployment
- GitHub Actions workflow for releases
- Example walkthrough of creating a project with the template
- Add pre-commit hooks for basic quality checks
- GitHub Actions to audit DMP structure (check for accidental commits in data directories)
- Conventional PR title enforcement in GitHub Actions
- Add section for future links to manuscript/publication in README template
- Create additional environment for snakemake workflows if needed
- Add optional R project template support
- Create testing framework for the template itself
Meeting Agenda and Action Items
Latest Meeting Notes (Apr 25, 2025)
Template Ideas:
- Simple/Project structure with pixi, mkdocs, basic DMP folder setup
- Package development templates for R and Python with project toml, ruff, CodeRabbit, Code coverage
MkDocs Components:
- Home
- How to run code
- Where to get data
- Working notes
- Documenting symbolic links
GitHub Actions:
- Check for presence of rawdata, procdata, results directories
- Documentation audits
- Optional CodeRabbit integration
Action Items:
- Complete initial template structure ✓
- Document DMP best practices ✓
- Setup GitHub Actions workflows 🚧
- Test with real projects 🚧
Troubleshooting
I have tried to simplify this setup as much as possible including the setup of the remote GitHub repository and the GitHub Actions workflow, and deploying the documentation to GitHub Pages. However in case you run into issues, here are some troubleshooting steps.
extra setup steps if needed
Setting up GitHub Actions
Step 1: Go to settings > Actions > General in your GitHub repository.
Step 2: Select Allow all actions and reusable workflows in the Workflow permissions section + CLICK Save
Step 3: Scroll down to the Workflow permissions section and select Read and write permissions AND Allow GitHub Actions to create and approve pull requests
Setting up GitHub Pages
[!NOTE] Before being able to deploy the documentation, you need to set up GitHub Pages. This is a one-time setup for the repository. The documentation will be deployed automatically to GitHub Pages when you push to the
mainbranch. However, you need to create agh-pagesbranch in your repository. You can do this by running the following command:console git branch gh-pages git push origin gh-pagesThis is only possible after you have created the repository on GitHub.
The template will use mkdocs to build the documentation and deploy it to GitHub Pages.
To set up GitHub Pages, follow these steps:
Step 1: Go to settings > Pages in your GitHub repository.
Step 2: Select Deploy from a branch in the Source section.
Step 3: Select gh-pages branch and / (root) folder in the Branch section.
Step 4: Click Save.
Issues
Please report any issues with the template to the bhklab/bhklab-project-template.
Contributors
- Jermiah Joseph (@jjjermiah)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bhklab_project_template-0.5.5.tar.gz.
File metadata
- Download URL: bhklab_project_template-0.5.5.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3f6fc5347a34840680d2986b908457ad44cbaf4f3588866d82b154c7ad66f57
|
|
| MD5 |
86f5f46e778b9b7c5bc910effb8ec91e
|
|
| BLAKE2b-256 |
d5460fbeb04e2e0ad9d8456c297d946679a13339157bad974b0aad51e483d937
|
Provenance
The following attestation bundles were made for bhklab_project_template-0.5.5.tar.gz:
Publisher:
release-please.yaml on bhklab/bhklab-project-template
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bhklab_project_template-0.5.5.tar.gz -
Subject digest:
e3f6fc5347a34840680d2986b908457ad44cbaf4f3588866d82b154c7ad66f57 - Sigstore transparency entry: 211418125
- Sigstore integration time:
-
Permalink:
bhklab/bhklab-project-template@bb0ea8205f17744cea8ccd613db7794b75ff7b95 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bhklab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@bb0ea8205f17744cea8ccd613db7794b75ff7b95 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bhklab_project_template-0.5.5-py3-none-any.whl.
File metadata
- Download URL: bhklab_project_template-0.5.5-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48ecfefa5e210736c631dc3da857735070b240d6f164e2131e18c8d3b7f1f1b8
|
|
| MD5 |
7e812387eb909e3765df95b1866443ec
|
|
| BLAKE2b-256 |
3582438db3e37fce844c098da184f292d857a83533d8ea4fa2ae187ca0f90eb3
|
Provenance
The following attestation bundles were made for bhklab_project_template-0.5.5-py3-none-any.whl:
Publisher:
release-please.yaml on bhklab/bhklab-project-template
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bhklab_project_template-0.5.5-py3-none-any.whl -
Subject digest:
48ecfefa5e210736c631dc3da857735070b240d6f164e2131e18c8d3b7f1f1b8 - Sigstore transparency entry: 211418134
- Sigstore integration time:
-
Permalink:
bhklab/bhklab-project-template@bb0ea8205f17744cea8ccd613db7794b75ff7b95 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bhklab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@bb0ea8205f17744cea8ccd613db7794b75ff7b95 -
Trigger Event:
push
-
Statement type: