akretion / ak

The toolbelt for Odoo
12 stars 12 forks source link

Make "src" optional #106

Open sebastienbeau opened 1 week ago

sebastienbeau commented 1 week ago

Hi when using the short syntax in the spec, I would like to make the "src" optionnal (as it mostly oca src)

So instead of having

brand:
  modules:
    - brand
    - product_brand
    - product_brand_tag
  src: https://github.com/oca/brand 16.0

product-attribute:
  modules:
    - product_set
    - product_sale_description
  src: https://github.com/oca/product-attribute 16.0

delivery-carrier:
  modules:
    - delivery_carrier_info
  src: https://github.com/oca/delivery-carrier 16.0

We can have

odoo_version: 16.0

brand:
  modules:
    - brand
    - product_brand
    - product_brand_tag

product-attribute:
  modules:
    - product_set
    - product_sale_description

delivery-carrier:
  modules:
    - delivery_carrier_info

By default src will always be resolve on OCA (maybe we can add a dict for some famous akretion repo, shopinvader, usability, incubator so it's also work for them)

What do you think?

@bealdav @florian-dacosta @Kev-Roche @hparfr

hparfr commented 1 week ago

in my case; I have often:

product-attribute:
  modules:
    - product_set
  src: https://github.com/oca/product-attribute 16.0

product-attribute-product_sale-desc:
  modules:
    - product_sale_description
  src: https://github.com/someothercontributor/product-attribute 16.0-fix-sale-description

delivery-carrier:
  modules:
    - delivery_carrier_info
  src: https://github.com/akretion/delivery-carrier 16.0-add-delivery-carrier-info

What I like:

Can you tell us what is the objective of your proposal ?

sebastienbeau commented 1 week ago

The aim was to have the less "duplicated" information possible, to make stuff more readable as most of the time you have oca repository.

If I take your example with the new syntax it will be

product-attribute:
  modules:
    - product_set

product-attribute-product_sale-desc:
  modules:
    - product_sale_description
  src: https://github.com/someothercontributor/product-attribute 16.0-fix-sale-description

delivery-carrier:
  modules:
    - delivery_carrier_info
  src: https://github.com/akretion/delivery-carrier 16.0-add-delivery-carrier-info

So quickly you see that the first repo is an official one the other are pending PR

But it's just a proposal to have feedback

rvalyi commented 1 week ago

I find it great. Yes it's a bit less explicit, but for me the benefit is large enough.

hparfr commented 1 week ago

benefit is large enough.

Can you be a bit more specific ?

Another good thing with the actual syntax, is that each block is self containing: no reference to something defined upper or hardcoded.

BTW, I'm ok to allow a shortened url like this one:

delivery-carrier:
  modules:
    - delivery_carrier_info
  src: gh:oca/delivery-carrier 16.0

which will expand to https://github.com/oca/delivery-carrier