Skip to main content

A command-line tool for managing Odoo dependencies.

Project description

bl

CI codecov

Why BL

Because ak is a bit slow and I was tired of waiting around

Install

pipx install bl-odoo

Usage

For all those command bl will try to look in the current directory. If it does find the spec file it will try to look in the child odoo directory. (i.e. you can launch bl in the root of you project) You can also override the default paths and verbosity with:

  • -c/--config: path to the project spec file (default: spec.yaml)
  • -z/--frozen: path to the frozen spec file (default: frozen.yaml)
  • -j/--concurrency: number of concurrent tasks (default: 28)
  • -w/--workdir: working directory, defaults to the directory of --config
  • --log-level: one of DEBUG, INFO, WARNING, ERROR, CRITICAL (default: WARNING)

Build

bl build [-c PATH_TO_SPEC] [-z PATH_TO_FROZEN] [-j CONCURRENCY] [-w WORKDIR] [--log-level LEVEL]

What does it do

It does what ak build does

Params

  • PATH_TO_SPEC path to your spec (default: spec.yaml)
  • PATH_TO_FROZEN path to your frozen spec (default: frozen.yaml)
  • CONCURRENCY number of module clone simultaneously (default: 28)
  • WORKDIR working directory; if omitted, the directory containing spec.yaml
  • LEVEL log level (see --log-level above)

How it looks

bl_build

Freeze

bl freeze [-c PATH_TO_SPEC] [-z PATH_TO_FROZEN] [-j CONCURRENCY] [-w WORKDIR] [--log-level LEVEL]

What does it do

It does what ak freeze does

Params

  • PATH_TO_SPEC path to your spec (default: spec.yaml)
  • PATH_TO_FROZEN path to your frozen spec (default: frozen.yaml)
  • CONCURRENCY number of module clone simultaneously (default: 28)
  • WORKDIR working directory; if omitted, the directory containing spec.yaml
  • LEVEL log level (see --log-level above)

Clean

bl clean [-c PATH_TO_SPEC] [-w WORKDIR] [--log-level LEVEL] [--i-am-stupid] [--dirty]

What does it do

By default it asks you if you want to delete external-src and src under the workdir and then deletes them. With --i-am-stupid it deletes those directories without prompting. With --dirty it additionally scans all repos in the spec for dirty git state and offers to clean them with git reset --hard.

Params

  • PATH_TO_SPEC path to your spec (default: spec.yaml)
  • WORKDIR working directory; if omitted, the directory containing spec.yaml
  • LEVEL log level (see --log-level above)
  • --i-am-stupid delete src and external-src non‑interactively
  • --dirty also inspect repos and optionally clean dirty ones with git reset --hard

Odoo is taking a really long time to clone

Yes !

You can add a locales entry to your odoo repo in spec.yaml like so:

odoo:
  modules:
    - account
    ...
  remotes:
    odoo: https://github.com/odoo/odoo
  merges:
    - odoo 14.0
  locales:
    - fr
    - en

It will only download the french and english translation instead of all of them

  • without locales: 849MB and 40 seconds fresh build
  • with locales fr, en: 169MB and 27 seconds fresh build

⚠️ WARNING: you must list all the odoo modules you need if you use the locales property

I have warnings about patch globs

There is a new property to handle git am <patch_glob> (the old one still works but I hope to remove it at some point)

Before:

folder_name:
  modules:
    ...
  remotes:
    ...
  merges:
    ...
  shell_command_after:
    - git am ../../patches/patch_folder/*

After:

folder_name:
  modules:
    ...
  remotes:
    ...
  merges:
    ...
  patch_globs:
    - ../../patches/patch_folder/*

Benchmarks

Ak benchmarks

Fresh install

ak_bench_cold

Already cloned once

ak_bench_hot

Bl benchmarks

Fresh install

bl_bench_cold

Already cloned once

bl_bench_hot

Results

Type AK BL
Cold ~100s 2 - 10x faster
Hot 3-20s 2 - 10x faster

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bl_odoo-0.3.13.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bl_odoo-0.3.13-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file bl_odoo-0.3.13.tar.gz.

File metadata

  • Download URL: bl_odoo-0.3.13.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bl_odoo-0.3.13.tar.gz
Algorithm Hash digest
SHA256 c2f245394b1d0095d1b388c13fa7e1a5f6ae4454af7e5e3cf6fecf851e57330b
MD5 b068a1aa1999ddc47be8aa84724662ae
BLAKE2b-256 5922a9c5dad572bce74cc716ebc23540f795f1e04cdc5d39f1e023a906d223f8

See more details on using hashes here.

File details

Details for the file bl_odoo-0.3.13-py3-none-any.whl.

File metadata

  • Download URL: bl_odoo-0.3.13-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bl_odoo-0.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 5dae8c8c597eec2d12de0c1731bcfd27b48f20c7f29c45e6c22ad0a133606733
MD5 60b7cf7b88c8913017e38242469c2b22
BLAKE2b-256 932f29826c1d0f4c7388a3e498f61cfd71c83cd1d3dc579aa7b0a4e78fcaec72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page