Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "src" optional #106

Open
sebastienbeau opened this issue Oct 23, 2024 · 4 comments
Open

Make "src" optional #106

sebastienbeau opened this issue Oct 23, 2024 · 4 comments

Comments

@sebastienbeau
Copy link
Member

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

@sebastienbeau sebastienbeau changed the title Make "src" optionnal Make "src" optional Oct 23, 2024
@hparfr
Copy link
Member

hparfr commented Oct 23, 2024

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:

  • it's quite clear what where each source is taken: no magic
  • it's really easy to copy paste
  • if I need, i can append multiple spec.yaml
  • for ak it's easy to parse.

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

@sebastienbeau
Copy link
Member Author

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
Copy link
Member

rvalyi commented Oct 23, 2024

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

@hparfr
Copy link
Member

hparfr commented Oct 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants