odoo-toolkit 3.2.0__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. odoo_toolkit-4.0.0/.github/workflows/ci.yml +33 -0
  2. odoo_toolkit-4.0.0/.github/workflows/images.yml +75 -0
  3. odoo_toolkit-4.0.0/.github/workflows/release.yml +37 -0
  4. odoo_toolkit-4.0.0/.github/workflows/sync-runbot.yml +30 -0
  5. odoo_toolkit-4.0.0/PKG-INFO +812 -0
  6. odoo_toolkit-4.0.0/README.md +799 -0
  7. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/common.py +49 -148
  8. odoo_toolkit-4.0.0/odoo_toolkit/dev/__init__.py +21 -0
  9. odoo_toolkit-4.0.0/odoo_toolkit/dev/common.py +175 -0
  10. odoo_toolkit-4.0.0/odoo_toolkit/dev/db.py +55 -0
  11. odoo_toolkit-4.0.0/odoo_toolkit/dev/images.py +280 -0
  12. odoo_toolkit-4.0.0/odoo_toolkit/dev/run.py +183 -0
  13. odoo_toolkit-4.0.0/odoo_toolkit/dev/runtime.py +265 -0
  14. odoo_toolkit-4.0.0/odoo_toolkit/dev/stop.py +52 -0
  15. odoo_toolkit-4.0.0/odoo_toolkit/docker/compose.yaml +71 -0
  16. odoo_toolkit-4.0.0/odoo_toolkit/docker/dev.Dockerfile +33 -0
  17. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/docker/pgadmin/servers.json +4 -3
  18. odoo_toolkit-4.0.0/odoo_toolkit/docker/runbot/Docker18.Dockerfile +111 -0
  19. odoo_toolkit-4.0.0/odoo_toolkit/docker/runbot/Docker19.Dockerfile +111 -0
  20. odoo_toolkit-4.0.0/odoo_toolkit/docker/runbot/Docker191.Dockerfile +112 -0
  21. odoo_toolkit-4.0.0/odoo_toolkit/docker/runbot/Docker194.Dockerfile +120 -0
  22. odoo_toolkit-4.0.0/odoo_toolkit/docker/runbot/DockerMaster.Dockerfile +128 -0
  23. odoo_toolkit-4.0.0/odoo_toolkit/git_cli.py +140 -0
  24. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/main.py +2 -7
  25. odoo_toolkit-4.0.0/odoo_toolkit/multiverse_config/.vscode/launch.json +29 -0
  26. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/multiverse_config/.vscode/settings.json +23 -1
  27. odoo_toolkit-4.0.0/odoo_toolkit/multiverse_config/.vscode/tasks.json +42 -0
  28. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/mv/__init__.py +4 -0
  29. odoo_toolkit-4.0.0/odoo_toolkit/mv/cleanup.py +146 -0
  30. odoo_toolkit-4.0.0/odoo_toolkit/mv/config.py +359 -0
  31. odoo_toolkit-4.0.0/odoo_toolkit/mv/link.py +59 -0
  32. odoo_toolkit-4.0.0/odoo_toolkit/mv/remotes.py +217 -0
  33. odoo_toolkit-4.0.0/odoo_toolkit/mv/repos.py +339 -0
  34. odoo_toolkit-4.0.0/odoo_toolkit/mv/reset.py +131 -0
  35. odoo_toolkit-4.0.0/odoo_toolkit/mv/setup.py +821 -0
  36. odoo_toolkit-4.0.0/odoo_toolkit/mv/switch.py +168 -0
  37. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/po/__init__.py +1 -1
  38. {odoo_toolkit-3.2.0/odoo_toolkit/po/cldr-common-47 → odoo_toolkit-4.0.0/odoo_toolkit/po/cldr-common-48.2}/common/dtd/ldmlSupplemental.dtd +11 -4
  39. {odoo_toolkit-3.2.0/odoo_toolkit/po/cldr-common-47 → odoo_toolkit-4.0.0/odoo_toolkit/po/cldr-common-48.2}/common/supplemental/plurals.xml +11 -9
  40. odoo_toolkit-4.0.0/odoo_toolkit/po/common.py +316 -0
  41. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/po/create.py +45 -56
  42. odoo_toolkit-4.0.0/odoo_toolkit/po/export.py +1137 -0
  43. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/po/update.py +105 -77
  44. odoo_toolkit-4.0.0/odoo_toolkit/versions.json +42 -0
  45. odoo_toolkit-4.0.0/odoo_toolkit/versions.py +42 -0
  46. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/wl/__init__.py +0 -4
  47. odoo_toolkit-4.0.0/odoo_toolkit/wl/common.py +714 -0
  48. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/wl/config.py +283 -55
  49. odoo_toolkit-4.0.0/odoo_toolkit/wl/copy.py +378 -0
  50. odoo_toolkit-4.0.0/odoo_toolkit/wl/download.py +149 -0
  51. odoo_toolkit-4.0.0/odoo_toolkit/wl/update_teams.py +220 -0
  52. odoo_toolkit-4.0.0/odoo_toolkit/wl/upload.py +169 -0
  53. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/pyproject.toml +24 -7
  54. odoo_toolkit-4.0.0/scripts/build_images.py +67 -0
  55. odoo_toolkit-4.0.0/scripts/sync_runbot.py +161 -0
  56. odoo_toolkit-4.0.0/tests/conftest.py +14 -0
  57. odoo_toolkit-4.0.0/tests/dev/__init__.py +0 -0
  58. odoo_toolkit-4.0.0/tests/dev/test_common.py +82 -0
  59. odoo_toolkit-4.0.0/tests/dev/test_images.py +85 -0
  60. odoo_toolkit-4.0.0/tests/dev/test_runtime.py +210 -0
  61. odoo_toolkit-4.0.0/tests/mv/__init__.py +0 -0
  62. odoo_toolkit-4.0.0/tests/mv/conftest.py +58 -0
  63. odoo_toolkit-4.0.0/tests/mv/test_config.py +191 -0
  64. odoo_toolkit-4.0.0/tests/mv/test_remotes.py +126 -0
  65. odoo_toolkit-4.0.0/tests/mv/test_setup.py +295 -0
  66. odoo_toolkit-4.0.0/tests/mv/test_switch_reset.py +239 -0
  67. odoo_toolkit-4.0.0/tests/po/__init__.py +0 -0
  68. odoo_toolkit-4.0.0/tests/po/test_export.py +170 -0
  69. odoo_toolkit-4.0.0/tests/po/test_po_files.py +154 -0
  70. odoo_toolkit-4.0.0/tests/test_git_cli.py +69 -0
  71. odoo_toolkit-4.0.0/tests/test_http.py +18 -0
  72. odoo_toolkit-4.0.0/tests/test_versions.py +67 -0
  73. odoo_toolkit-4.0.0/tests/wl/__init__.py +0 -0
  74. odoo_toolkit-4.0.0/tests/wl/test_client.py +311 -0
  75. odoo_toolkit-4.0.0/tests/wl/test_commands.py +81 -0
  76. odoo_toolkit-4.0.0/uv.lock +340 -0
  77. odoo_toolkit-3.2.0/PKG-INFO +0 -789
  78. odoo_toolkit-3.2.0/README.md +0 -775
  79. odoo_toolkit-3.2.0/odoo_toolkit/dev/__init__.py +0 -24
  80. odoo_toolkit-3.2.0/odoo_toolkit/dev/common.py +0 -5
  81. odoo_toolkit-3.2.0/odoo_toolkit/dev/start.py +0 -201
  82. odoo_toolkit-3.2.0/odoo_toolkit/dev/start_db.py +0 -61
  83. odoo_toolkit-3.2.0/odoo_toolkit/dev/stop.py +0 -40
  84. odoo_toolkit-3.2.0/odoo_toolkit/docker/compose.yaml +0 -210
  85. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/.bash_aliases +0 -44
  86. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/17.0.Dockerfile +0 -214
  87. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/18.0.Dockerfile +0 -213
  88. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/18.4.Dockerfile +0 -215
  89. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/19.0.Dockerfile +0 -214
  90. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/append.bashrc +0 -9
  91. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/master.Dockerfile +0 -227
  92. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/starship.toml +0 -26
  93. odoo_toolkit-3.2.0/odoo_toolkit/docker/odoo/startup.sh +0 -19
  94. odoo_toolkit-3.2.0/odoo_toolkit/multiverse_config/.vscode/launch.json +0 -131
  95. odoo_toolkit-3.2.0/odoo_toolkit/mv/common.py +0 -50
  96. odoo_toolkit-3.2.0/odoo_toolkit/mv/reset.py +0 -116
  97. odoo_toolkit-3.2.0/odoo_toolkit/mv/setup.py +0 -942
  98. odoo_toolkit-3.2.0/odoo_toolkit/mv/switch.py +0 -125
  99. odoo_toolkit-3.2.0/odoo_toolkit/po/common.py +0 -207
  100. odoo_toolkit-3.2.0/odoo_toolkit/po/export.py +0 -880
  101. odoo_toolkit-3.2.0/odoo_toolkit/wl/autotranslate.py +0 -265
  102. odoo_toolkit-3.2.0/odoo_toolkit/wl/common.py +0 -609
  103. odoo_toolkit-3.2.0/odoo_toolkit/wl/copy.py +0 -265
  104. odoo_toolkit-3.2.0/odoo_toolkit/wl/download.py +0 -166
  105. odoo_toolkit-3.2.0/odoo_toolkit/wl/update_components.py +0 -330
  106. odoo_toolkit-3.2.0/odoo_toolkit/wl/update_teams.py +0 -309
  107. odoo_toolkit-3.2.0/odoo_toolkit/wl/upload.py +0 -230
  108. odoo_toolkit-3.2.0/uv.lock +0 -470
  109. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/.gitignore +0 -0
  110. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/.vscode/settings.json +0 -0
  111. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/LICENSE +0 -0
  112. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/images/mailpit.png +0 -0
  113. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/__init__.py +0 -0
  114. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/__main__.py +0 -0
  115. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/multiverse_config/.vscode/extensions.json +0 -0
  116. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/multiverse_config/requirements.txt +0 -0
  117. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/multiverse_config/ruff.toml +0 -0
  118. {odoo_toolkit-3.2.0/odoo_toolkit/po/cldr-common-47 → odoo_toolkit-4.0.0/odoo_toolkit/po/cldr-common-48.2}/LICENSE +0 -0
  119. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/odoo_toolkit/po/cldr.csv +0 -0
  120. {odoo_toolkit-3.2.0 → odoo_toolkit-4.0.0}/tests/__init__.py +0 -0
@@ -0,0 +1,33 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-24.04
15
+ steps:
16
+ - uses: actions/checkout@v5
17
+ - uses: astral-sh/setup-uv@v6
18
+ - run: uvx ruff@0.15.0 check odoo_toolkit scripts tests
19
+
20
+ test:
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ # The oldest supported Python and the newest one Runbot uses, on Linux and macOS.
25
+ python: ["3.12", "3.14"]
26
+ os: [ubuntu-24.04, macos-15]
27
+ runs-on: ${{ matrix.os }}
28
+ steps:
29
+ - uses: actions/checkout@v5
30
+ - uses: astral-sh/setup-uv@v6
31
+ with:
32
+ python-version: ${{ matrix.python }}
33
+ - run: uv run --python ${{ matrix.python }} pytest -q
@@ -0,0 +1,75 @@
1
+ name: Docker images
2
+
3
+ # Builds the development images for amd64 and arm64 on native runners, pushes them to Docker Hub and combines them
4
+ # into one multi-architecture tag per Odoo version (like `dylankiss/odoo-dev:19.0`).
5
+ #
6
+ # Needs the `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` repository secrets.
7
+ on:
8
+ workflow_dispatch:
9
+ inputs:
10
+ images:
11
+ description: "Space-separated Runbot images to build (like `Docker19 DockerMaster`), or empty for all"
12
+ required: false
13
+ default: ""
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ plan:
20
+ runs-on: ubuntu-24.04
21
+ outputs:
22
+ images: ${{ steps.images.outputs.images }}
23
+ steps:
24
+ - uses: actions/checkout@v5
25
+ - uses: astral-sh/setup-uv@v6
26
+ - id: images
27
+ env:
28
+ REQUESTED: ${{ inputs.images }}
29
+ run: |
30
+ uv run python -c '
31
+ import json, os
32
+ from odoo_toolkit.dev.images import get_images
33
+ requested = os.environ["REQUESTED"].split()
34
+ print("images=" + json.dumps(requested or get_images()))
35
+ ' >> "$GITHUB_OUTPUT"
36
+
37
+ build:
38
+ needs: plan
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ image: ${{ fromJSON(needs.plan.outputs.images) }}
43
+ arch: [amd64, arm64]
44
+ runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
45
+ steps:
46
+ - uses: actions/checkout@v5
47
+ - uses: astral-sh/setup-uv@v6
48
+ - uses: docker/setup-buildx-action@v3
49
+ - uses: docker/login-action@v3
50
+ with:
51
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
52
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
53
+ - env:
54
+ IMAGE: ${{ matrix.image }}
55
+ ARCH: ${{ matrix.arch }}
56
+ run: uv run scripts/build_images.py --image "$IMAGE" --arch "$ARCH" --push
57
+
58
+ merge:
59
+ needs: [plan, build]
60
+ runs-on: ubuntu-24.04
61
+ strategy:
62
+ fail-fast: false
63
+ matrix:
64
+ image: ${{ fromJSON(needs.plan.outputs.images) }}
65
+ steps:
66
+ - uses: actions/checkout@v5
67
+ - uses: astral-sh/setup-uv@v6
68
+ - uses: docker/setup-buildx-action@v3
69
+ - uses: docker/login-action@v3
70
+ with:
71
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
72
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
73
+ - env:
74
+ IMAGE: ${{ matrix.image }}
75
+ run: uv run scripts/build_images.py --image "$IMAGE" --merge
@@ -0,0 +1,37 @@
1
+ name: Release
2
+
3
+ # Publishes the package to PyPI when a version tag (like `v4.0.0`) is pushed.
4
+ #
5
+ # Uses PyPI's trusted publishing, so no token is stored: the `odoo-toolkit` project on PyPI trusts this workflow, in the
6
+ # `pypi` environment, of this repository.
7
+ on:
8
+ push:
9
+ tags: ["v*"]
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ pypi:
16
+ runs-on: ubuntu-24.04
17
+ environment:
18
+ name: pypi
19
+ url: https://pypi.org/project/odoo-toolkit/
20
+ permissions:
21
+ # Proves to PyPI that this workflow is the one it trusts.
22
+ id-token: write
23
+ steps:
24
+ - uses: actions/checkout@v5
25
+ - uses: astral-sh/setup-uv@v6
26
+ - name: Check that the tag is the package version
27
+ env:
28
+ TAG: ${{ github.ref_name }}
29
+ run: |
30
+ version="v$(uv version --short)"
31
+ if [ "$version" != "$TAG" ]; then
32
+ echo "The tag $TAG doesn't match the package version $version." >&2
33
+ exit 1
34
+ fi
35
+ - run: uv run pytest -q tests
36
+ - run: uv build
37
+ - run: uv publish
@@ -0,0 +1,30 @@
1
+ name: Sync with Runbot
2
+
3
+ # Checks Runbot every week for new versions or changed Dockerfiles, and opens a pull request with the changes.
4
+ on:
5
+ schedule:
6
+ - cron: "0 5 * * 1"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ sync:
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+ - uses: astral-sh/setup-uv@v6
19
+ - run: uv run scripts/sync_runbot.py
20
+ # Pull requests opened by this workflow don't run the CI, so check the rendered images here.
21
+ - run: uv run pytest -q tests/dev tests/test_versions.py
22
+ - uses: peter-evans/create-pull-request@v7
23
+ with:
24
+ branch: sync-runbot
25
+ commit-message: "[IMP] versions: sync with Runbot"
26
+ title: "[IMP] versions: sync with Runbot"
27
+ body: |
28
+ Runbot's versions or Dockerfiles changed. Review the diff, then run the **Docker images** workflow after
29
+ merging to rebuild the images.
30
+ delete-branch: true