Compare commits

...

6 Commits

Author SHA1 Message Date
bcca7090d3 Updated requirements
All checks were successful
Build on push / prepare (push) Successful in 10s
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 18s
Build on push / translation (push) Successful in 21s
Build on push / mail (push) Successful in 22s
Build on push / application (push) Successful in 22s
Build on push / database (push) Successful in 22s
Build on push / auth (push) Successful in 16s
Build on push / api (push) Successful in 16s
2026-01-16 16:41:04 +01:00
8aeb381a91 Add .cpl to build
All checks were successful
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 19s
Build on push / translation (push) Successful in 16s
Build on push / application (push) Successful in 20s
Build on push / database (push) Successful in 21s
Build on push / mail (push) Successful in 20s
Build on push / auth (push) Successful in 15s
Build on push / api (push) Successful in 15s
2026-01-16 16:35:45 +01:00
9cf5886902 Fixed master build
All checks were successful
Build on push / prepare (push) Successful in 23s
Build on push / core (push) Successful in 19s
Build on push / query (push) Successful in 23s
Build on push / cli (push) Successful in 15s
Build on push / dependency (push) Successful in 47s
Build on push / application (push) Successful in 15s
Build on push / mail (push) Successful in 19s
Build on push / translation (push) Successful in 19s
Build on push / database (push) Successful in 46s
Build on push / auth (push) Successful in 17s
Build on push / api (push) Successful in 16s
2026-01-16 16:27:32 +01:00
d60b281d6a Merge pull request 'dev into master' (#184) from dev into master
Some checks failed
Build on push / core (push) Has been cancelled
Build on push / query (push) Has been cancelled
Build on push / translation (push) Has been cancelled
Build on push / mail (push) Has been cancelled
Build on push / prepare (push) Has been cancelled
Reviewed-on: #184
2026-01-16 16:25:37 +01:00
6eae7c7b98 Merge pull request '#191_tests' (#201) from #191_tests into dev
All checks were successful
Test before pr merge / test-lint (pull_request) Successful in 9s
Build on push / prepare (push) Successful in 25s
Test before pr merge / test (pull_request) Successful in 27s
Build on push / query (push) Successful in 49s
Build on push / core (push) Successful in 50s
Build on push / cli (push) Successful in 44s
Build on push / dependency (push) Successful in 45s
Build on push / database (push) Successful in 17s
Build on push / application (push) Successful in 17s
Build on push / mail (push) Successful in 18s
Build on push / translation (push) Successful in 18s
Build on push / auth (push) Successful in 1m7s
Build on push / api (push) Successful in 16s
Reviewed-on: #201
2026-01-16 16:21:25 +01:00
638434af76 Fixed test action installation
All checks were successful
Test before pr merge / test-lint (pull_request) Successful in 17s
Test before pr merge / test (pull_request) Successful in 31s
2026-01-16 16:20:41 +01:00
5 changed files with 89 additions and 33 deletions

View File

@@ -10,30 +10,72 @@ jobs:
uses: ./.gitea/workflows/prepare.yaml uses: ./.gitea/workflows/prepare.yaml
secrets: inherit secrets: inherit
api:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, application, auth, core, dependency ]
with:
working_directory: src/api
secrets: inherit
application:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency ]
with:
working_directory: src/application
secrets: inherit
auth:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency, database ]
with:
working_directory: src/auth
secrets: inherit
cli:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core ]
with:
working_directory: src/cli
secrets: inherit
core: core:
uses: ./.gitea/workflows/package.yaml uses: ./.gitea/workflows/package.yaml
needs: [prepare] needs: [prepare]
with: 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/database
secrets: inherit
dependency:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core ]
with:
working_directory: src/dependency
secrets: inherit
mail:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core, dependency ]
with:
working_directory: src/mail
secrets: inherit secrets: inherit
query: query:
uses: ./.gitea/workflows/package.yaml uses: ./.gitea/workflows/package.yaml
needs: [prepare] needs: [prepare]
with: with:
working_directory: src/cpl-query working_directory: src/query
secrets: inherit secrets: inherit
translation: translation:
uses: ./.gitea/workflows/package.yaml uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core ] needs: [ prepare, core, dependency ]
with: with:
working_directory: src/cpl-translation working_directory: src/translation
secrets: inherit
mail:
uses: ./.gitea/workflows/package.yaml
needs: [ prepare, core ]
with:
working_directory: src/cpl-mail
secrets: inherit secrets: inherit

View File

@@ -35,9 +35,16 @@ jobs:
token: ${{ secrets.CI_ACCESS_TOKEN }} token: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Setting up Python 3.12 - name: Setting up Python 3.12
shell: bash
run: | run: |
python3.12 -m pip install -r src/requirements-dev.txt python3.12 -m venv venv
source venv/bin/activate
bash ./install.sh
bash ./install.sh -dev
python3.12 -m pip install pytest
- name: Testing with pytest - name: Testing with pytest
shell: bash
run: | run: |
source venv/bin/activate
python3.12 -m pytest python3.12 -m pytest

View File

@@ -1,61 +1,64 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
# Find and combine requirements from src/*/requirements.txt, # Optionaler Dev-Installationsmodus
# filtering out lines whose *package name* starts with "cpl-". dev_mode=false
# Works with pinned versions, extras, markers, editable installs, and VCS refs. if [[ "${1:-}" == "-dev" ]]; then
dev_mode=true
fi
shopt -s nullglob shopt -s nullglob
req_files=(src/*/requirements.txt) # Wähle die passende Requirements-Datei
pattern='requirements.txt'
msg_hint='src/*/requirements.txt'
if $dev_mode; then
pattern='requirements.dev.txt'
msg_hint='src/*/requirements.dev.txt'
fi
req_files=(src/*/"$pattern")
if ((${#req_files[@]} == 0)); then if ((${#req_files[@]} == 0)); then
echo "No requirements files found at src/*/requirements.txt" >&2 echo "Keine Requirements-Dateien gefunden unter '$msg_hint'" >&2
exit 1 exit 1
fi fi
tmp_combined="$(mktemp)" tmp_combined="$(mktemp)"
trap 'rm -f "$tmp_combined"' EXIT trap 'rm -f "$tmp_combined"' EXIT
# Concatenate, trim comments/whitespace, filter out cpl-* packages, dedupe. # Kombiniere, filtere Kommentare/Whitespace, entferne cpl-*, dedupliziere.
# We keep non-package options/flags/constraints as-is.
awk ' awk '
function trim(s){ sub(/^[[:space:]]+/,"",s); sub(/[[:space:]]+$/,"",s); return s } function trim(s){ sub(/^[[:space:]]+/,"",s); sub(/[[:space:]]+$/,"",s); return s }
{ {
line=$0 line=$0
# drop full-line comments and strip inline comments
if (line ~ /^[[:space:]]*#/) next if (line ~ /^[[:space:]]*#/) next
sub(/#[^!].*$/,"",line) # strip trailing comment (simple heuristic) sub(/#[^!].*$/,"",line)
line=trim(line) line=trim(line)
if (line == "") next if (line == "") next
# Determine the package *name* even for "-e", extras, pins, markers, or VCS "@"
e = line e = line
sub(/^-e[[:space:]]+/,"",e) # remove editable prefix sub(/^-e[[:space:]]+/,"",e)
# Tokenize up to the first of these separators: space, [ < > = ! ~ ; @
token = e token = e
sub(/\[.*/,"",token) # remove extras quickly sub(/\[.*/,"",token)
n = split(token, a, /[<>=!~;@[:space:]]/) n = split(token, a, /[<>=!~;@[:space:]]/)
name = tolower(a[1]) name = tolower(a[1])
# If the first token (name) starts with "cpl-", skip this requirement
if (name ~ /^cpl-/) next if (name ~ /^cpl-/) next
print line print line
} }
' "${req_files[@]}" | sort -u > "$tmp_combined" ' "${req_files[@]}" | sort -u > "$tmp_combined"
if ! [ -s "$tmp_combined" ]; then if ! [ -s "$tmp_combined" ]; then
echo "Nothing to install after filtering out cpl-* packages." >&2 echo "Nichts zu installieren nach dem Entfernen von cpl-* Paketen." >&2
exit 0 exit 0
fi fi
echo "Installing dependencies (excluding cpl-*) from:" echo "Installiere Abhängigkeiten (ohne cpl-*) aus:"
printf ' - %s\n' "${req_files[@]}" printf ' - %s\n' "${req_files[@]}"
echo echo
echo "Final set to install:" echo "Finale Menge zur Installation:"
cat "$tmp_combined" cat "$tmp_combined"
echo echo
# Use python -m pip for reliability; change to python3 if needed.
python -m pip install -r "$tmp_combined" python -m pip install -r "$tmp_combined"

View File

@@ -26,6 +26,9 @@ Homepage = "https://www.sh-edraft.de"
where = ["."] where = ["."]
include = ["cpl*"] include = ["cpl*"]
[tool.setuptools.package-data]
"cpl.cli" = [".cpl/**/*"]
[tool.setuptools.dynamic] [tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] } dependencies = { file = ["requirements.txt"] }
optional-dependencies.dev = { file = ["requirements.dev.txt"] } optional-dependencies.dev = { file = ["requirements.dev.txt"] }

View File

@@ -4,3 +4,4 @@ tabulate==0.9.0
termcolor==3.1.0 termcolor==3.1.0
pynput==1.8.1 pynput==1.8.1
croniter==6.0.0 croniter==6.0.0
cryptography==46.0.2