Skip to content

Commit 145737d

Browse files
committed
Improve docs related to contribution
1 parent d06fa35 commit 145737d

File tree

4 files changed

+44
-22
lines changed

4 files changed

+44
-22
lines changed

CONTRIBUTING.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
1+
# Contributing
12

2-
## Developing
3+
Thanks for helping to improve conda-lock! We appreciate your time and effort.
34

4-
1. Ensure that Conda, Mamba, and Micromamba are installed. Install [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) if you're otherwise not sure which Conda distribution to pick.
5-
2. `micromamba create --name=conda-lock-dev --category=main --category=dev --file=environments/conda-lock.yml`
6-
3. `conda activate conda-lock-dev`
7-
4. `pip install --no-deps --editable .`
5+
## How to install a dev environment
86

9-
Run the tests to ensure that everything is running correctly. Due to the nature of this project, it hits remote webservers regularly so some tests occasionally fail. This is a normal part of conda-lock development. If you're not sure if your env is borked or the remote webserver is just being flaky, run the tests again. If you're still not sure you can open an issue about.
7+
Of course, we use conda-lock to manage our development environment.
108

11-
5. `pytest`
9+
1. Get [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)
1210

13-
Whilst not strictly necessary; the CI run using github actions will run pre-commit in order to reduce development friction you may want to install the pre-commit hooks:
11+
2. Install and activate the `conda-lock-dev` environment:
1412

15-
6. `pre-commit install`
13+
```shell
14+
micromamba env create --name=conda-lock-dev --category=main --category=dev --file=environments/conda-lock.yml
15+
micromamba activate conda-lock-dev
16+
```
17+
18+
3. Install `conda-lock` in editable mode. This will also install its runtime
19+
dependencies as defined in `pyproject.toml`.
20+
21+
```shell
22+
pip install --no-deps --editable .
23+
```
24+
25+
4. Check to ensure that your Python environment is consistent.
26+
27+
```shell
28+
pip check
29+
```
30+
31+
5. Finally, while not strictly necessary, it's recommended to install pre-commit to reduce development friction.
32+
33+
```shell
34+
pre-commit install
35+
```

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ mamba install --channel=conda-forge --name=base conda-lock
3636

3737
The first two options are recommended since they install conda-lock into an isolated environment. (Otherwise there is a risk of dependency conflicts.)
3838

39+
## Contributing
40+
41+
If you would like to contribute to conda-lock, please refer to the [Contributing Guide](CONTRIBUTING.md) for instructions on how to set up your development environment.
42+
3943
## Basic usage
4044

4145
```bash

environments/README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
# How to install dev environment
1+
# Conda environment specifications
22

3-
* First install dev dependencies:
3+
Our development dependencies are specified in [`dev-environment.yaml`](dev-environment.yaml).
44

5-
```
6-
mamba env create -f environments/dev-environment.yaml
7-
mamba activate conda-lock-dev
8-
```
9-
10-
* Then, install `conda-lock` in editable mode. This will also install its runtime
11-
dependencies as defined in `pyproject.toml`.
12-
13-
```
14-
pip install --editable .
15-
```
5+
The lockfile [`conda-lock.yml`](conda-lock.yml) is regularly updated using `conda-lock`
6+
via the [`update-lockfile.yaml`](../.github/workflows/update-lockfile.yaml) GHA workflow.
7+
In particular, the lockfile is generated based on the project dependencies specified in
8+
[`pyproject.toml`](../pyproject.toml) the development dependencies specified in
9+
[`dev-environment.yml`](dev-environment.yml).

environments/dev-environment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Here we specify the development dependencies.
2+
3+
# The main project dependencies are specified independently in pyproject.toml.
4+
15
name: conda-lock-dev
26
category: dev
37
channels:

0 commit comments

Comments
 (0)