Development¶
- Clone the repository
- Install uv
- Run
uv syncin the project root. This will create a.venvfolder and install all the project dependencies. - Activate the virtual environment with as below:
- Windows:
./.venv/Scripts/activate - MacOs/Linux:
source .venv/bin/activate - Run
uv pip install -e .[dev]to installcr8torin editable mode. - Run
pre-commit installto enable pre-commit hooks.
Usage¶
A minimal example is provided in examples/simple_project.
Run cr8tor --help for more information
- Create a new project running:
uv run cr8tor initiate -t ./../cr8-cookiecutter/ -n "newproject" -org "lsc-sde-crates"to omit cookiecutter prompts and use default valuesuv run cr8tor initiate -t ./../cr8-cookiecutter/to invoke cookiecutter prompts- Run
uv run cr8tor create -a GithubAction -i ./resourcesto create a bagit package - Run
uv run cr8tor validate -a GithubAction -i ./resourcesto create a bagit package - Run
uv run cr8tor sign-off -a GithubAction -agreement "url" -signing-entity "entity"to add a sign-off activity - Run
uv run cr8tor stage-transfer -a GithubAction -i ./resourcesto kick off data extraction - Run
uv run cr8tor disclosure -a GithubAction -agreement "url" -signing-entity "entity"to add a disclosure activity - Run
uv run cr8tor publish -a GithubAction -i ./resourcesto kick off data extraction
Debugging in VSCode¶
- Prepare launch.json with content
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"type": "debugpy",
"request": "attach",
"justMyCode": false,
"connect": {
"host": "127.0.0.1",
"port": 5678,
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
]
}
]
}
- Run command you want to debug, e.g.
uv run python ./../src/cr8tor/main.py create - Click F5 to invoke VSCode Debugger