Skip to content

Commit

Permalink
Lint README
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Feb 10, 2024
1 parent 145737d commit f72f0a0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ conda-lock --lockfile superspecial.conda-lock.yml
Rendered `explicit` and `env` lockfiles will be named as `"conda-{platform}.lock"` and `"conda-{platform}.lock.yml` respectively by default.

If you want to override that call conda-lock as follows.

```bash
conda-lock -k explicit --filename-template "specific-{platform}.conda.lock"
```
Expand Down Expand Up @@ -157,7 +158,6 @@ The default category is `main`.
`conda-lock` can also lock the `dependencies.pip` section of
[environment.yml][envyaml], using a vendored copy of [Poetry's][poetry] dependency solver.
### private pip repositories
Right now `conda-lock` only supports [legacy](https://warehouse.pypa.io/api-reference/legacy.html) pypi repos with basic auth. Most self-hosted repositories like Nexus, Artifactory etc. use this. You can configure private pip repositories in a similar way to channels, for example:
Expand Down Expand Up @@ -185,8 +185,8 @@ url = "https://username:password@example.repo/simple"
The location of this file can be determined with `python -c 'from conda_lock._vendor.poetry.locations import CONFIG_DIR; print(CONFIG_DIR)'`
Private repositories will be used in addition to `pypi.org`. For projects using `pyproject.toml`, it is possible to [disable `pypi.org` entirely](#disabling-pypiorg).
### --dev-dependencies/--no-dev-dependencies
By default conda-lock will include dev dependencies in the specification of the lock (if the files that the lock
Expand All @@ -195,6 +195,7 @@ is being built from support them). This can be disabled easily
```bash
conda-lock --no-dev-dependencies -f ./recipe/meta.yaml
```
### --check-input-hash
Under some situation you may want to run conda lock in some kind of automated way (eg as a precommit) and want to not
Expand All @@ -210,7 +211,7 @@ When the input_hash of the input files, channels match those present in a given
By default `conda-lock` will leave basic auth credentials for private conda channels in the lock file. If you wish to strip authentication from the file, provide the `--strip-auth` argument.
```
```shell
conda-lock --strip-auth -f environment.yml
```
Expand Down Expand Up @@ -355,7 +356,7 @@ pgsql = ["psycopg2"]
These can be referened as follows
```
```shell
conda-lock --extra mysql --extra pgsql -f pyproject.toml
```
Expand Down Expand Up @@ -416,10 +417,12 @@ ampel-ztf = {source = "pypi"}
##### Defaulting non-conda dependency sources to PyPI
Alternatively, the above behavior is defaulted for all dependencies defined outside of `[tool.conda-lock.dependencies]`, i.e.:
- Default to `pip` dependencies for `[tool.poetry.dependencies]`, `[project.dependencies]`, etc.
- Default to `conda` dependencies for `[tool.conda-lock.dependencies]`
by explicitly providing `default-non-conda-source = "pip"` in the `[tool.conda-lock]` section, e.g.:
```toml
[tool.conda-lock]
default-non-conda-source = "pip"
Expand All @@ -432,6 +435,7 @@ dependency.
#### Lock only conda-lock dependencies
To lock only dependencies specified under `[tool.conda-lock]` (i.e. skipping all dependencies specified elsewhere), explicitly provide `skip-non-conda-lock = true` in the `[tool.conda-lock]` section, e.g.:
```toml
[tool.conda-lock]
skip-non-conda-lock = true
Expand All @@ -440,6 +444,7 @@ skip-non-conda-lock = true
#### Disabling pypi.org
When using private pip repos, it is possible to disable `pypi.org` entirely. This can be useful when using `conda-lock` behind a network proxy that does not allow access to `pypi.org`.
```toml
[tool.conda-lock]
allow-pypi-requests = false
Expand All @@ -451,7 +456,8 @@ In order to use conda-lock in a docker-style context you want to add the lockfil
docker container. In order to refresh the lock file just run `conda-lock` again.
Given a file tree like
```
```text
Dockerfile
environment.yaml
* conda-linux-64.lock
Expand Down

0 comments on commit f72f0a0

Please sign in to comment.