From a553abd949d93d24a0465ffc21012427370c42d9 Mon Sep 17 00:00:00 2001 From: Leif Denby Date: Wed, 22 May 2024 15:38:17 +0200 Subject: [PATCH] add dev notes to README --- README.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b06fb51..0700ae0 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,38 @@ The full configuration file specification is given in [mllam_data_prep/config/sp ## Installation -The easiest way to install the package is to clone the repository and install it using pip: +To simply use `mllam-data-prep` you can install the most recent tagged version from pypi with pip: ```bash -git clone https://github.com/mllam/mllam-data-prep +python -m pip install mllam-data-prep +``` + +## Developing `mllam-data-prep` + +To work on developing `mllam-data-prep` it easiest to install and manage the dependencies with [pdm](https://pdm.fming.dev/). To get started clone your fork of [the main repo](https://github.com/mllam/mllam-data-prep) locally: + +```bash +git clone https://github.com//mllam-data-prep cd mllam-data-prep -pip install . ``` +Use pdm to create and use a virtualenv: + +```bash +pdm venv create +pdm use --venv in-project +pdm install +``` + +All the linting is handelled by `pre-commit` which can be setup to automatically be run on each `git commit` by installing the git commit hook: + +```bash +pdm run pre-commit install +``` + +The branch, commit, push and make a pull-request :) + + ## Usage The package is designed to be used as a command-line tool. The main command is `mllam-data-prep` which takes a configuration file as input and outputs a training dataset in the form of a `.zarr` dataset named from the config file (e.g. `example.danra.yaml` produces `example.danra.zarr`).