Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

CropXR/cropxr-lettuce-know-nextflow-example

Repository files navigation

cropxr-lk-nextflow-example

A great package.

Sections in this README

Installation

  1. Install pixi:

  2. Install the dependencies, including the dev dependencies

    pixi install --all

    or install only the runtime dependencies

    pixi install --environment default
  3. Install the pre-commit hook. This will set up pre-commit to run the checks automatically on your files before you commit them.

    pixi run -e dev pre-commit install

Remember that if the pre-commit checks fail, you can always commit by skipping the checks with git commit --no-verify

Running the main script

Execute the main script with

pixi run main_script

Adding dependencies

Pypi packages

Add dependencies by running

pixi add --pypi numpy

if you want to install torch with CUDA support, add the following line to the pyproject.toml under [tool.pixi.project]

pypi-options = { extra-index-urls = ["https://download.pytorch.org/whl/cu121"] }

then run

pixi add --pypi torch==2.4.1+cu121 torchaudio==2.4.1+cu121 torchvision==0.19.1+cu121

Conda packages

Add dependencies by running

pixi add numpy

to install pytorch with cuda support as a conda package add the additional channels to the pyproject.toml:

[tool.pixi.project]
channels = ["nvidia", "conda-forge", "pytorch"]

and the add the dependencies manually with channel restrictions like so:

[tool.pixi.dependencies]
pytorch = {version=">=2.5.1,<3", channel="pytorch"}
torchvision = {version=">=0.20.1,<1", channel="pytorch"}
torchaudio = {version=">=2.5.1,<3", channel="pytorch"}
pytorch-cuda = "12.4.*"

the run pixi install to download and install pytorch on the environment. For more information check out the pixi channel logic section.

Running tests

Run your tests with

pixi run -e dev pytest --cov=src ./tests

Formatting and checking

The tools for formatting and linting your code for errors are all bundled with pre-commit. Included are:

  • ruff - linting and formatting
  • yamlfix - linting and formatting for .yaml files
  • various other small fixes and checks (see the .pre-commit-config.yaml file for more information)

It's possible that pre-commit will make changes to your files when it runs the checks, so you should add those changes to your commit before you commit your code. A typical workflow would look like this:

git add -u
git commit -m "My commit message"
# pre-commit will run the checks here; if it makes changes, you'll need to add them to your commit
git add -u
git commit -m "My commit message"
# changes should have all been made by now and the commit should pass if there are no other issues
# if your commit fails again here, you have to fix the issues manually (not everything can be fixed automatically).

One thing that is worth knowing is how to lint your files outside of the context of a commit. You can run the checks manually by running the following command:

pixi run -e dev pre-commit run --all-files

This will run the checks on all files in your git project, regardless of whether they're staged for commit or not.

Documentation

Generate the documentation locally with

pixi run -e dev mkdocs serve --watch ./

Versions

Versions are managed automatically via hatch-vcs, which follows the versioning scheme from setuptools-scm.

To create a new version, tag the code with git tag <version>, e.g. git tag v0.1.0, and push the tag with git push --tags.

You can check the version by running

pixi run -e dev hatch version

In python you can see the version with

from cropxr_lk_nextflow_example import __version__

print(f"cropxr_lk_nextflow_example version is { __version__ }")

Publishing the package

Pixi does not support yet building and publishing conda packages. In the meantime, you can build and publish your package using rattler-build or conda-build.

License

Distributed under the terms of the No license (others may not use, share or modify the code) license.

cropxr-lettuce-know-nextflow-example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages