Skip to content

Commit

Permalink
[MOV] spreadsheet: move spreadsheet utils to util folder
Browse files Browse the repository at this point in the history
`upgrade-util/src/spreadsheet` clashes with `upgrade/spreadsheet`. Both
are merged in `odoo.upgrade.spreadsheet` from the python point of view.

When importing `from odoo.upgrade.util.spreadsheet`, python follows the path
and stops at the first package package (first folder with `__init__.py`)

Currently, if you add tests in `upgrade/spreadsheet/tests`, they are ignored
(because of `upgrade-util/spreadsheet/__init__.py`). If you remove the
`__init__.py` file, it works.

With this commit, we move all spreadsheet utils (more are coming) into the
`util` folder, which allows to safely have an `__init__.py` file.

Tests are kept in `upgrade-util/spreadsheet`, but without any `__init__.py`
file.

Note that moving those files is a breaking change and it's not
retro-compatible. However, those spreadsheet utils have only been merged
a few weeks ago. They are most probably not used outside our internal upgrade
repo.

closes #92

Related: odoo/upgrade#6086
Signed-off-by: Christophe Simonis (chs) <[email protected]>
  • Loading branch information
LucasLefevre committed Jun 1, 2024
1 parent 54e0abe commit 6a7f050
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spreadsheet/tests/test_spreadsheet_tokenizer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from odoo.addons.base.maintenance.migrations.spreadsheet.tokenizer import tokenize
from odoo.addons.base.maintenance.migrations.testing import UnitTestCase
from odoo.addons.base.maintenance.migrations.util.spreadsheet import tokenize


class SpreadsheetTokenizeTest(UnitTestCase):
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 6a7f050

Please sign in to comment.