-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Catalyst Documentation Builders and UDCs | ||
|
||
This directory contains targets for the Catalyst Documentation builders, and associated UDCs. | ||
|
||
## Check | ||
|
||
This target includes a check to ensure the MkDocs base builder works as expected. | ||
|
||
```bash | ||
earthly -P +check | ||
``` | ||
|
||
## Updating Dependencies | ||
|
||
If a new dependency is added to `pyproject.toml` ensure to run: | ||
|
||
```sh | ||
poetry lock | ||
``` | ||
|
||
in the `earthly/docs` directory to update the locked dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
# Python Earthly Build Containers and UDCs | ||
|
||
This repo defines common python targets and UDCs for use with python. | ||
|
||
## User Defined Commands | ||
|
||
### POETRY_SETUP | ||
|
||
This UDC sets up a python based container that uses poetry for dependency management. | ||
Once the UDC has run, the Earthly target that invoked it will | ||
|
||
#### Invocation | ||
|
||
In an `Earthfile` in your source repository add: | ||
|
||
```Earthfile | ||
example_python_target: | ||
FROM python:3.11-bullseye | ||
DO github.com/input-output-hk/catalyst-ci:v1.2.0/earthly/python+POETRY_SETUP | ||
``` | ||
|
||
You may also pass optional arguments: | ||
|
||
* `extra_files`: Defining extra files into the `/poetry` directory in the container. | ||
* `opts`: Options to the `poetry install` command. | ||
|
||
These arguments are optional and neither is required to be set. | ||
|
||
The directory that contains the Earthfile that invokes this UDC MUST have: | ||
|
||
* `pyproject.toml` : Definitions of the project to be installed with Poetry. | ||
* `poetry.lock` : Dependency lock file. | ||
Up-to-date by running: | ||
* `poetry lock --no-update` : Update lock file, but do not update dependencies; or | ||
* `poetry lock` : Update lock file and dependencies as required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters