Skip to main content

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-combo would create a directory called gdcs-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

google doc to meeting notes

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. actions-general

Step 2: Select Allow all actions and reusable workflows in the Workflow permissions section + CLICK Save actions-permissions

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 actions-permissions

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 main branch. However, you need to create a gh-pages branch in your repository. You can do this by running the following command: console git branch gh-pages git push origin gh-pages This 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. gh-pages

Issues

Please report any issues with the template to the bhklab/bhklab-project-template.

Contributors

  • Jermiah Joseph (@jjjermiah)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bhklab_project_template-0.5.2.tar.gz (377.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bhklab_project_template-0.5.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file bhklab_project_template-0.5.2.tar.gz.

File metadata

  • Download URL: bhklab_project_template-0.5.2.tar.gz
  • Upload date:
  • Size: 377.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bhklab_project_template-0.5.2.tar.gz
Algorithm Hash digest
SHA256 3e2911975ab40643b3c5c40709e650a9c14e740cb7344c4572fbb5cec5fa6111
MD5 fb0672f9b8affa16795c3a0a85a396c2
BLAKE2b-256 14a1a68c8ecff773c5851e75bdb331277859eb4ebfa2ae7e9152d8cb6f2d86af

See more details on using hashes here.

Provenance

The following attestation bundles were made for bhklab_project_template-0.5.2.tar.gz:

Publisher: release-please.yaml on bhklab/bhklab-project-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bhklab_project_template-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for bhklab_project_template-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5f2877c9790d46627700176abdc331dfeb11125add76d934871d5a8b8e682e8
MD5 e099271ce4889d2fe4cb2f1a53556e12
BLAKE2b-256 30f963b99b4fe6e328da8573d25085fd8547b3144ebc47cf149eb65939af1b44

See more details on using hashes here.

Provenance

The following attestation bundles were made for bhklab_project_template-0.5.2-py3-none-any.whl:

Publisher: release-please.yaml on bhklab/bhklab-project-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page