Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: tool: Odoo Modules Migration
byHello,
interesting mail Sebastian. Most of it sounds familiar because we aim for the same goals with [1] (pypi odoo-analyse). Generally speaking odoo-analyse goes deeper than a simple lines of code analyses because there are plenty of cases reading the manifest isn't enough (e.g. Odoo 16.0 website has a hidden dependency towards iap because of an import). In the last days we extended it also to allow to estimate the modules which would be installed in a system without a database which should influence the initial topic of this mailing list [see 3] (@Jan). It resolves auto_install and dependencies starting from an initial module list.
The tool is the foundation of [2] one of our long term projects
and this is the reason why the current code is under our github
and not pushed towards the OCA in the past. There would be no
problem for a joint operation and we could push it to the OCA if
we can stay maintainer of it. We (initOS) are also on the OCA days
and would welcome support/ideas/feedback.
We also already added complexity measurements in preparation to
estimate a module and system complexity and furthermore a
migration complexity. In the future we plan to offer a service to
estimate module complexities in conjunction with the files from
odoo-analyse (via a trained model) or for experts to estimate the
complexities of modules to train a model even further basically as
part of [2].
Btw it lacks the repository management because this one is better
handled externally (e.g. git-aggregator is a great tool). There
are various build environments for Odoo and we learned that
without the repository management we can easier analyse in
different environments. Often enough there is already a CI or a
development environment and reading the odoo.cfg is easy enough.
Best Regards,
Florian
[1] https://github.com/initOS/odoo-analyse
[2] https://www.odoo-code-search.com
[3] `cat modules.txt | odoo_analyse -p odoo --modules - --analyse analyse.json --estimate-state --state-filter installed`
where odoo is the folder under which ALL modules can be found
Hi,
I am the author of 'oca-port' so I'll try to answer your questions.
These two tools aim two different purposes, but have few common points:
- oca-port: it doesn't really know what is Odoo, this tool only plays with commits of git repositories to help the user to:
1) migrate the git history of the module ('git format-patch' dance) and run pre-commit before inviting the user to follow the OCA migration guide. It'll also request GitHub API to find a open PR to invite the user to review it instead of creating a new one.
2) for modules already migrated, it'll list the commits and related PRs that could be ported to fill the gap (fixes or features)
3) a parsable output is available so we at Camptocamp are using it to scan OCA repositories and generate reports to estimate the work to achieve for migration projects (which modules are 100% ported, missing some fixes/features, have to be migrated and which ones having a PR to review)
- odoo-module-migrator: from what I know (I do not use this tool yet) its job is to help you to migrate Odoo code to the target version (e.g. if a XML tag has been deprecated, it'll warn or update to the new format).
Both tools could be used together, my idea would be that 'oca-port' leverages 'odoo-module-migrator' to automatically update the code in a migration process. From now, the user can call 'oca-port' then call 'odoo-module-migrator' manually (not tested), no big deal.
I think the common points right now is that 'odoo-module-migrator' also does the 'git format-patch' step, and run pre-commit.
FYI I also started an Odoo project that scans all kind of git repositories (OCA, Odoo, private repos) to collect modules metadata and consolidate all these data in one place, and it leverages oca-port to collect the migration data presented above. This tool aims to help functional & technical people with these kind of features:
- get number of lines of code (Python/JS/XML/CSS) by module/repo/branch/organization or any filter you want
- for maintainers, get a quick overview of the state of their modules
- what are the most used OCA addons among all your Odoo projects
- in term of lines of code of a customer project, how are they distributed among Odoo, OCA and specifics
- generate reports to ease the estimation of migration projects for a given migration path (e.g. 14.0 -> 16.0)
- know all Python dependencies used in OCA to avoid versions conflicts or to improve security updates
A lot of use cases could be addressed I guess. I'll probably make a presentation of this at OCA Days (need to finish some stuff, do some cleanup, host the code in a OCA repository, and address some questions regarding the hosting).
Kind regards,
Le 04/10/2023 à 09:26, Rafael Blasco a écrit :
This is a really nice topic to have a doc/talk about for new contributor. Maybe for OCA DAys
- Which is the use of both tool?
- Why 2 and not just a single 1? (they should be different with different authors)
- A "How to" for newcontribs are really useful to increase OCA
It is not trivial and easy for everyone. The moment we take things for granted we lose contributors along the way.
https://github.com/OCA/oca-port
https://github.com/OCA/odoo-module-migrator
Thank you!
Regards
Rafael
De: Alexandre Fayolle <notifications@odoo-community.org>
Enviado el: martes, 26 de septiembre de 2023 10:03
Para: Contributors <contributors@odoo-community.org>
Asunto: Re: tool: Odoo Modules Migration
Hello, you should check oca-port too
https://github.com/OCA/oca-port
Best regards
--
Alexandre Fayolle
Senior Software Engineer
Tel : +33 4 58 48 20 30
De: Fernando La Chica <notifications@odoo-community.org>
Enviado el: lunes, 18 de septiembre de 2023 23:08
Para: Contributors <contributors@odoo-community.org>
Asunto: Re: tool: Odoo Modules Migration
Take a look at this tool
https://github.com/OCA/odoo-module-migrator
At first I thought it was the same tool. I understand that it is out of the scope of your tool but I think it can be useful for your final objective which is to migrate a large number of modules.
El lun, 18 sept 2023, 9:37, Jan Suhr | Nitrokey <notifications@odoo-community.org> escribió:
Hi!
I wrote a simple tool which helps me keeping an overview of module
upgrades during ongoing upgrade projects, especially for a large amount
of modules. I hope someone finds it useful.
https://github.com/Nitrokey/odoo-modules-migration
Best regards
Jan
__________________________________
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
-- Sébastien Alix Business Solutions Odoo Developer Camptocamp France SA https://www.camptocamp.com/_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
-- Mit freundlichen Grüßen Florian Kantelberg Softwareentwickler initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel.: +49 (0) 4181 1350344 Fax: +49 (0) 4181 1350310 Email: florian.kantelberg@initos.com Internet: https://www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht: Tostedt, HRB 205226 USt-IdNr: DE 815580155 Steuer-Nr: 15/200/53247
Reference
-
tool: Odoo Modules Migration
byNitrokey GmbH, Jan Suhr-
Re: tool: Odoo Modules Migration
byAGILE BUSINESS GROUP ITALIA SRL, Alex Comba. -
RE: tool: Odoo Modules Migration
byModuon Team, S. L., Rafael Blasco (Moduon) -
Re: tool: Odoo Modules Migration
byCamptocamp France SAS, Alexandre Fayolle