Compare commits
3 Commits
2025.10.19
...
2025.10.19
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a9b7b81be | |||
| 21c88bc442 | |||
| 04e0884e1c |
22
README.md
22
README.md
@@ -0,0 +1,22 @@
|
|||||||
|
## Prepare for development
|
||||||
|
|
||||||
|
After cloning the repository, run the following commands to set up your development environment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
# On Windows use `.venv\Scripts\activate`
|
||||||
|
# On Windows with git bash use `source .venv/Scripts/activate`
|
||||||
|
bash install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Install cpl-cli as a development package:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install -e src/core
|
||||||
|
pip install -e src/cli
|
||||||
|
# test with:
|
||||||
|
cpl v
|
||||||
|
```
|
||||||
|
|
||||||
|
When using Pycharm, mark all directories under `src/` as "Sources Root" and `exa` to ensure proper module resolution.
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Find and combine requirements from src/cpl-*/requirements.txt,
|
# Find and combine requirements from src/*/requirements.txt,
|
||||||
# filtering out lines whose *package name* starts with "cpl-".
|
# filtering out lines whose *package name* starts with "cpl-".
|
||||||
# Works with pinned versions, extras, markers, editable installs, and VCS refs.
|
# Works with pinned versions, extras, markers, editable installs, and VCS refs.
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
req_files=(src/cpl-*/requirements.txt)
|
req_files=(src/*/requirements.txt)
|
||||||
if ((${#req_files[@]} == 0)); then
|
if ((${#req_files[@]} == 0)); then
|
||||||
echo "No requirements files found at src/cpl-*/requirements.txt" >&2
|
echo "No requirements files found at src/*/requirements.txt" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ def init(target: str, name: str):
|
|||||||
if target in ["workspace", "ws"]:
|
if target in ["workspace", "ws"]:
|
||||||
workspace = Structure.init_workspace("./", name or click.prompt("Workspace name", default="my-workspace"))
|
workspace = Structure.init_workspace("./", name or click.prompt("Workspace name", default="my-workspace"))
|
||||||
elif target in PROJECT_TYPES:
|
elif target in PROJECT_TYPES:
|
||||||
workspace = Structure.find_workspace_in_path(Path(name).parent)
|
workspace = Structure.find_workspace_in_path(Path(name or "./").parent, with_parents=True)
|
||||||
project = Structure.init_project(
|
project = Structure.init_project(
|
||||||
"./", name or click.prompt("Project name", default=f"my-{target}"), target, workspace
|
"./", name or click.prompt("Project name", default=f"my-{target}"), target, workspace
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user