Compare commits

...

6 Commits

Author SHA1 Message Date
91269f351b Fixed init command regarding package handling
All checks were successful
Test before pr merge / test-lint (pull_request) Successful in 7s
Build on push / prepare (push) Successful in 11s
Build on push / core (push) Successful in 19s
Build on push / query (push) Successful in 23s
Build on push / cli (push) Successful in 16s
Build on push / dependency (push) Successful in 19s
Build on push / database (push) Successful in 16s
Build on push / application (push) Successful in 18s
Build on push / mail (push) Successful in 20s
Build on push / translation (push) Successful in 20s
Build on push / auth (push) Successful in 19s
Build on push / api (push) Successful in 15s
2025-10-19 19:37:13 +02:00
5d07973940 Fixed init command regarding package handling
Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 7s
Build on push / prepare (push) Successful in 11s
Build on push / core (push) Successful in 19s
Build on push / query (push) Successful in 20s
Build on push / cli (push) Successful in 19s
Build on push / dependency (push) Successful in 22s
Build on push / database (push) Successful in 16s
Build on push / translation (push) Successful in 16s
Build on push / mail (push) Successful in 17s
Build on push / application (push) Successful in 17s
Build on push / auth (push) Successful in 18s
Build on push / api (push) Successful in 16s
2025-10-19 19:32:14 +02:00
0a9b7b81be Fixed init command regarding name None
All checks were successful
Test before pr merge / test-lint (pull_request) Successful in 7s
Build on push / prepare (push) Successful in 11s
Build on push / query (push) Successful in 19s
Build on push / core (push) Successful in 24s
Build on push / cli (push) Successful in 19s
Build on push / dependency (push) Successful in 18s
Build on push / database (push) Successful in 17s
Build on push / mail (push) Successful in 18s
Build on push / application (push) Successful in 20s
Build on push / translation (push) Successful in 20s
Build on push / auth (push) Successful in 15s
Build on push / api (push) Successful in 15s
2025-10-19 19:27:18 +02:00
21c88bc442 Fixed install.sh after renaming
All checks were successful
Test before pr merge / test-lint (pull_request) Successful in 7s
Build on push / prepare (push) Successful in 10s
Build on push / query (push) Successful in 19s
Build on push / core (push) Successful in 20s
Build on push / dependency (push) Successful in 15s
Build on push / cli (push) Successful in 18s
Build on push / database (push) Successful in 20s
Build on push / translation (push) Successful in 20s
Build on push / application (push) Successful in 21s
Build on push / mail (push) Successful in 24s
Build on push / auth (push) Successful in 15s
Build on push / api (push) Successful in 18s
2025-10-19 19:17:14 +02:00
04e0884e1c Added readme for devs
Some checks failed
Test before pr merge / test-lint (pull_request) Successful in 6s
Build on push / prepare (push) Successful in 12s
Build on push / core (push) Successful in 19s
Build on push / query (push) Successful in 19s
Build on push / api (push) Has been cancelled
Build on push / application (push) Has been cancelled
Build on push / auth (push) Has been cancelled
Build on push / database (push) Has been cancelled
Build on push / dependency (push) Has been cancelled
Build on push / cli (push) Has been cancelled
Build on push / mail (push) Has been cancelled
Build on push / translation (push) Has been cancelled
2025-10-19 19:16:39 +02:00
2ac7fa4568 Fixed dev build
All checks were successful
Test before pr merge / test-lint (pull_request) Successful in 6s
Build on push / prepare (push) Successful in 14s
Build on push / core (push) Successful in 21s
Build on push / query (push) Successful in 22s
Build on push / cli (push) Successful in 19s
Build on push / dependency (push) Successful in 21s
Build on push / translation (push) Successful in 16s
Build on push / application (push) Successful in 22s
Build on push / mail (push) Successful in 24s
Build on push / database (push) Successful in 26s
Build on push / auth (push) Successful in 15s
Build on push / api (push) Successful in 15s
2025-10-19 14:42:40 +02:00
5 changed files with 41 additions and 18 deletions

View File

@@ -16,68 +16,68 @@ jobs:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, application, auth, core, dependency ]
with:
working_directory: src/cpl-api
working_directory: src/api
secrets: inherit
application:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency ]
with:
working_directory: src/cpl-application
working_directory: src/application
secrets: inherit
auth:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency, database ]
with:
working_directory: src/cpl-auth
working_directory: src/auth
secrets: inherit
cli:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core ]
with:
working_directory: src/cpl-cli
working_directory: src/cli
secrets: inherit
core:
uses: ./.gitea/workflows/package.yaml
needs: [prepare]
with:
working_directory: src/cpl-core
working_directory: src/core
secrets: inherit
database:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency ]
with:
working_directory: src/cpl-database
working_directory: src/database
secrets: inherit
dependency:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core ]
with:
working_directory: src/cpl-dependency
working_directory: src/dependency
secrets: inherit
mail:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency ]
with:
working_directory: src/cpl-mail
working_directory: src/mail
secrets: inherit
query:
uses: ./.gitea/workflows/package.yaml
needs: [prepare]
with:
working_directory: src/cpl-query
working_directory: src/query
secrets: inherit
translation:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency ]
with:
working_directory: src/cpl-translation
working_directory: src/translation
secrets: inherit

View File

@@ -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.

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env bash
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-".
# Works with pinned versions, extras, markers, editable installs, and VCS refs.
shopt -s nullglob
req_files=(src/cpl-*/requirements.txt)
req_files=(src/*/requirements.txt)
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
fi

View File

@@ -12,7 +12,8 @@ from cpl.core.console import Console
@click.command("init")
@click.argument("target", required=False)
@click.argument("name", required=False)
def init(target: str, name: str):
@click.option("--verbose", "-v", is_flag=True, help="Enable verbose output")
def init(target: str, name: str, verbose: bool = False):
workspace = None
project = None
@@ -30,9 +31,9 @@ def init(target: str, name: str):
if target in ["workspace", "ws"]:
workspace = Structure.init_workspace("./", name or click.prompt("Workspace name", default="my-workspace"))
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(
"./", name or click.prompt("Project name", default=f"my-{target}"), target, workspace
"./", name or click.prompt("Project name", default=f"my-{target}"), target, workspace, verbose=verbose
)
else:
Console.error(f"Unknown target '{target}'")

View File

@@ -151,7 +151,7 @@ class Structure:
os.chdir(old_cwd)
if workspace is not None:
rel_path = str(path.resolve().absolute().relative_to(Path(workspace.path).parent))
rel_path = str(path.resolve().absolute().relative_to(Path(workspace.path).parent)).replace("\\", "/")
if rel_path not in workspace.projects:
workspace.projects.append(rel_path)
workspace.save()
@@ -199,4 +199,4 @@ class Structure:
shutil.copy(src_file, tgt_file)
Console.write_line()
Structure.init_project(str(path), name, project_type, workspace)
Structure.init_project(str(path), name, project_type, workspace, verbose=verbose)