Metadata-Version: 2.4
Name: bl-odoo
Version: 0.3.6
Summary: A command-line tool for managing Odoo dependencies.
Author-email: Your Name <your.email@example.com>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich
Requires-Dist: typer
Dynamic: license-file

# bl

## 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)

### Build

```bl build -c <path_to_spec.yaml> -z <path_to_frozen.yaml> -j <concurrency>```

#### What does it do
It does what ak build does

#### Params
* `path_to_spec.yaml` should be the path to your spec (default: spec.yaml)
* `path_to_frozen.yaml` should be the path to your spec (default: frozen.yaml)
* `concurrency` number of module clone simultaneously (default: 28)

#### How it looks
<img width="1683" height="756" alt="bl_build" src="https://github.com/user-attachments/assets/22fc1565-3a54-4f57-9b85-a11263b9b536" />

### Freeze

```bl freeze -c <path_to_spec.yaml> -z <path_to_frozen.yaml> -j <concurrency>```

#### What does it do
It does what ak freeze does

#### Params
* `path_to_spec.yaml` should be the path to your spec (default: spec.yaml)
* `path_to_frozen.yaml` should be the path to your spec (default: frozen.yaml)
* `concurrency` number of module clone simultaneously (default: 28)

### Clean

```bl clean -c <path_to_spec.yaml>```

#### What does it do
It asks you if you want to delete `external-src` and `src` and then deletes it

#### Params
* `path_to_spec.yaml` should be the path to your spec (default: spec.yaml)

## 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:
```yaml
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>"

Before:
```yaml
folder_name:
  modules:
    ...
  remotes:
    ...
  merges:
    ...
  shell_command_after:
    - git am ../../patches/patch_folder/*
```
After:
```yaml
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 |

