-
Notifications
You must be signed in to change notification settings - Fork 114
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
[ADD] Add option for Odoo 17.0 #425
Conversation
- copier: user sintax according seven point of https://copier.readthedocs.io/en/v9.0.1/changelog/#v800-2023-06-04 copier SUBCOMMAND args instead of copier args SUBCOMMAND
Please review the comments associated with each commit for additional details. I attempted to adapt the test, but encountered errors during precommit. I suspect this is because the oca-addons-repo-template now utilizes ruff instead of black, isort, flake8, autoflake, and pyupgrade. However, I am uncertain whether the maximum line length is now set to 79 instead of 88. @sbidoul, could you please provide your insights on this matter? Refer to the following commit for the changes: OCA/oca-addons-repo-template@49b350f |
Better to do this in several steps: limit this PR to enable the 17.0 version, and then we can investigate about switching to |
Currently, the process is not functional without some adjustments. This is necessary due to changes made in the For visual reference, please find the screenshot below: |
@pedrobaeza I updated code for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: these diff files are less helpful each time. The origin idea behind these files was to implement some kind of snapshot testing that served us as a warning sign when we diverged from the recommended linter configurations from OCA.
However, it's impossible for a human to interpret correctly 16 plain diffs in a review.
Back then, when oca-addons-repo-template
didn't exist, OCA was using standard configurations per version, based on their MQT repo, which is mostly useless today (OCA/maintainer-quality-tools#717).
Now that updates are based on Copier, and don't happen randomly, what's the point on freezing the linter configurations per version? It's useless IMHO. Linters don't happen at Odoo runtime. They happen at dev time, in the dev laptop. Or on CI, in separate jobs. You can lint today code for Odoo 8 using today's linters, with a modern python version, and it will lint it properly.
So linters should depend on the template version, and not on the odoo version. In OCA they don't think like this and it's a maintenance burden in their template. I don't think we should follow the same path.
IMHO we should just review the new linters, enable those that make sense for all supported versions, and remove this diff snapshotting method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this is my first contribution into doodba-copier-template
and I attempted to adhere to this guide. However, upon executing invoke update-test-samples
all diff are altered, I'm having difficulty understanding why it has become more complex.
Do you recommend removing all the test related?
Currently, my primary objective is to enable V17 for Doodba. Unfortunately, the testing process is proving to be intricate and a bit frustrating. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the diff tests all together then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed all test related, can you enable github actions please .
On my repo get the followin error(The test attempts to commit with a manifest containing a higher version, and it should fail the pre-commit check) , but Pylint-odoo working properly up to version v8.0.5, but starting from version v8.0.6, it encounters issues., please check issue reported here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, the names of the linters to execute changed on that version from underscores (_
) to dashes (-
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, the names of the linters to execute changed on that version from underscores (
_
) to dashes (-
).
The configuration is OK, issue become from pylint-odoo not support V17.0 yet.
waiting OCA/pylint-odoo#477 to upgrade oca-addons-repo-template and try again
see more details on Tecnativa#425 (comment)
@pedrobaeza @yajo |
@pedrobaeza @yajo |
@pedrobaeza @yajo I hope I explained myself well. |
see more details on Tecnativa#425 (comment)
IIRC doodba-qa should be archived, as it is no longer used. |
@yajo @pedrobaeza On my repo all test are gree(but without this commit) |
@yajo @pedrobaeza all tests are OK, CI is green without this commit, but if these tests are enabled, V14.0 never finishes. I haven't changed the code in this test; everything seems normal, but I don't understand. Any ideas? Please your help |
@celm1990 Please remove the last 2 commits and instead, just add one commenting the import of the test in |
@pedrobaeza I see |
OK, try to rename the file instead. It seems it imports all the files starting with |
.flake8.jinja
Outdated
@@ -1 +1,10 @@ | |||
{%- include "vendor/oca-addons-repo-template/.flake8" -%} | |||
[flake8] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you have hardcoded this. The idea is to use the same linter configuration here that on oca-addons-repo-template, so instead you have to use the new .pre-commit-config.yaml
from vendor submodule and remove these ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you replace for ruff, probably this file will not be needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the idea. In fact, the .pre-commit-config.yaml
from oca-addons-repo-template has changed to ruff (not the one being templated):
see more details on Tecnativa#425 (comment)
- odoo to V17 change module note and add project_todo, this commit adapt test
this test never finished by an unknown reason(for V14.0)
inspired by OCA/oca-addons-repo-template@299cb36 - remove flake8, isort
Versions from V7 to V10 are skipped in the test, so they should be removed from the CI.
@pedrobaeza |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the effort.
I'm not sure if it's a good idea to use Copier 9, but I have problems with the old version. @yajo, can you please review?
TODO: adapt github actions to V17 and PY 3.10
Is need execute
copier copy
with option--trust
similar to OCA/oca-addons-repo-template#202