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

Add version 18 #272

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ jobs:
fail-fast: false
matrix:
include:
- odoo-version: 11.0
python-version: 3.6
machine: ubuntu-20.04
- odoo-version: 12.0
python-version: 3.6
machine: ubuntu-20.04
- odoo-version: 13.0
python-version: 3.8
machine: ubuntu-22.04
Expand All @@ -35,6 +29,9 @@ jobs:
- odoo-version: 17.0
python-version: "3.10"
machine: ubuntu-22.04
- odoo-version: 18.0
python-version: "3.12"
sbidoul marked this conversation as resolved.
Show resolved Hide resolved
machine: ubuntu-24.04
steps:
# Prepare environment
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ This template allows to bootstrap and update addon repositories for these Odoo v
- 15.0
- 16.0
- 17.0
- 18.0

Future versions will be added as they are released. Past versions could be added as long
as they don't break existing branches.
Expand Down
3 changes: 2 additions & 1 deletion copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _migrations:

odoo_version:
type: float
default: 17.0
default: 18.0
choices:
- 10.0
- 11.0
Expand All @@ -23,6 +23,7 @@ odoo_version:
- 15.0
- 16.0
- 17.0
- 18.0
help: Which Odoo version are we deploying in this branch?

org_slug:
Expand Down
789 changes: 370 additions & 419 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ authors = ["Odoo Community Association (OCA)"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.8.0"
python = "^3.9.0"
pyyaml = ">=6.0.2"

[tool.poetry.dev-dependencies]
copier = ">=9"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
{%
set IMAGES = {
"odoo": {
18.0: "ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest",
SirAionTech marked this conversation as resolved.
Show resolved Hide resolved
17.0: "ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest",
16.0: "ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest",
15.0: "ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest",
Expand All @@ -22,6 +23,7 @@ set IMAGES = {
10.0: "ghcr.io/oca/oca-ci/py2.7-odoo10.0:latest",
},
"ocb": {
18.0: "ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest",
17.0: "ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest",
16.0: "ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest",
15.0: "ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest",
Expand Down
26 changes: 23 additions & 3 deletions src/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{%- set repo_rev.pylint = "v2.11.1" %}
{%- set repo_rev.pylint_odoo = "7.0.2" %}
{%- set repo_rev.pyupgrade = "v2.7.2" %}
{%- set repo_rev.ruff = "v0.1.3" %}
{%- set repo_rev.setuptools_odoo = "3.1.8" %}
{%- elif odoo_version < 16 %}
{%- set repo_rev.autoflake = "v1.4" %}
Expand All @@ -35,8 +36,9 @@
{%- set repo_rev.pylint = "v2.11.1" %}
{%- set repo_rev.pylint_odoo = "7.0.5" %}
{%- set repo_rev.pyupgrade = "v2.29.0" %}
{%- set repo_rev.ruff = "v0.1.3" %}
{%- set repo_rev.setuptools_odoo = "3.1.8" %}
{%- else %}
{%- elif odoo_version < 18 %}
{%- set repo_rev.autoflake = "v1.6.1" %}
{%- set repo_rev.black = "22.8.0" %}
{%- set repo_rev.eslint = "v8.24.0" %}
Expand All @@ -51,6 +53,24 @@
{%- set repo_rev.prettier_xml = "2.2.0" %}
{%- set repo_rev.pylint_odoo = "v8.0.19" %}
{%- set repo_rev.pyupgrade = "v2.38.2" %}
{%- set repo_rev.ruff = "v0.1.3" %}
{%- set repo_rev.setuptools_odoo = "3.1.8" %}
{%- else %}
{%- set repo_rev.autoflake = "v1.6.1" %}
{%- set repo_rev.black = "22.8.0" %}
{%- set repo_rev.eslint = "v9.11.1" %}
{%- set repo_rev.flake8 = "3.9.2" %}
{%- set repo_rev.flake8_bugbear = "21.9.2" %}
{%- set repo_rev.isort = "5.12.0" %}
{%- set repo_rev.maintainer_tools = "bf9ecb9938b6a5deca0ff3d870fbd3f33341fded" %}
{%- set repo_rev.nodejs = "16.17.0" %}
{%- set repo_rev.odoo_pre_commit_hooks = "v0.0.33" %}
{%- set repo_rev.pre_commit_hooks = "v4.6.0" %}
{%- set repo_rev.prettier = "2.7.1" %}
{%- set repo_rev.prettier_xml = "2.2.0" %}
{%- set repo_rev.pylint_odoo = "v9.1.2" %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to upgrade all linters for 16 and 17 too? What is the risk of making existing repos red due to new checks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to upgrade all linters for 16 and 17 too?

Is it safe to keep using the old ones? For how long should we keep using them?
I'm for using the new and shiny things, however I'll change it if you think it's better.

What is the risk of making existing repos red due to new checks?

I'll try the update in a repo to see how much it should change to satisfy the new requirements.

I could have left everything < 18 crystallized as it was but maybe they should be updated too from time to time, don't they?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could have left everything < 18 crystallized as it was but maybe they should be updated too from time to time, don't they?

I don't think we should update for previous branches unless necessary. Otherwise tiny changes in linters will make existing branches red, and this is really annoying.

So I would add a new section for 18, with the latest linters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old branches won't be affected unless manually updated. And in that case, pre-commit will update things and maybe ask for new changes, but that can be considered as part of that same manual work. However, it's true that if there must be a mass update of non-pre-commit-related things, that can be problematic. Oftentimes you're the one who does that, @sbidoul, so as you wish.

{%- set repo_rev.pyupgrade = "v2.38.2" %}
{%- set repo_rev.ruff = "v0.6.8" %}
{%- set repo_rev.setuptools_odoo = "3.1.8" %}
{%- endif %}

Expand Down Expand Up @@ -109,7 +129,7 @@ repos:
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
{%- if use_pyproject_toml %}
- repo: https://github.com/sbidoul/whool
rev: v0.5
rev: v1.2
hooks:
- id: whool-init
{%- endif %}
Expand Down Expand Up @@ -238,7 +258,7 @@ repos:
additional_dependencies: ["flake8-bugbear=={{ repo_rev.flake8_bugbear }}"]
{%- else %}
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: {{ repo_rev.ruff }}
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
Loading