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

[12.0] [IMP] geoengine_swisstopo : Add Swisstopo projections #351

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

sbrunner
Copy link

No description provided.

@sbrunner sbrunner force-pushed the swisstopo-projections branch 16 times, most recently from 00d1758 to e691044 Compare November 20, 2023 16:26
Copy link

@cyrilmanuel cyrilmanuel left a comment

Choose a reason for hiding this comment

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

for the code, LGTM :)

but for the 3 commits, i'm not sure if you shall split them in 2 (pre-commit and swisstopo projections)

same here for the name of the PR. i'm not sure if shall be rename to contain the version, type of pr (implementation) and a title explicit about the module that contain most of the modification and a description of the implementation. example :
[12.0] [IMP] base_geoengine : Adding Swisstopo projections

@yvaucher could you confirm or refute this :))

Copy link
Member

@yvaucher yvaucher left a comment

Choose a reason for hiding this comment

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

Looks great, just have a little concern on the multiple odoo.define for projections as it seems redundant.

Plus about the commits, some part of the changes of the 2nd commit deserve to be in the 3rd commit (or be squashed) the linting could go in a separate commit to let your last commit emphasis on the practical changes.

geoengine_swisstopo/static/src/js/geoengine_swisstopo.js Outdated Show resolved Hide resolved
geoengine_swisstopo/static/src/js/geoengine_swisstopo.js Outdated Show resolved Hide resolved

var PROJECTION_CODE = "EPSG:21781";
const GeoengineWidgets = require("base_geoengine.geoengine_widgets");
Copy link
Member

Choose a reason for hiding this comment

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

The require is similiar as an import wouldn't it make more sense to keep it at the root level of the file or was there some cyclic import issue?

Copy link
Author

Choose a reason for hiding this comment

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

I just keep it as it was, and the require function is not defined at top level...

@yvaucher yvaucher changed the title Swisstopo projections [12.0] [IMP] base_geoengine : Adding Swisstopo projections Nov 21, 2023
@yvaucher yvaucher changed the title [12.0] [IMP] base_geoengine : Adding Swisstopo projections [12.0] [IMP] geoengine_swisstopo : Adding Swisstopo projections Nov 21, 2023
@yvaucher yvaucher changed the title [12.0] [IMP] geoengine_swisstopo : Adding Swisstopo projections [12.0] [IMP] geoengine_swisstopo : Add Swisstopo projections Nov 21, 2023
Use the service Capabilities
@yvaucher
Copy link
Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 12.0-ocabot-merge-pr-351-by-yvaucher-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 1cc9c74 into OCA:12.0 Feb 29, 2024
4 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at e8e6b94. Thanks a lot for contributing to OCA. ❤️

@@ -131,7 +131,7 @@ def get_edit_info_for_geo_column(self, column):
'default_extent': view.default_extent or DEFAULT_EXTENT,
'default_zoom': view.default_zoom,
}
logger.debug("Parameters for geo field {}:\n{}".format(column, res))
logger.debug(f"Parameters for geo field {column}:\n{res}")
Copy link
Contributor

Choose a reason for hiding this comment

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

the minimum version of python supported by v12 is 3.5, which does not have fstrings. This unfortunately broke my installation.

Comment on lines +59 to +100
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v2.1.2
# hooks:
# - id: prettier
# name: prettier (with plugin-xml)
# additional_dependencies:
# - "[email protected]"
# - "@prettier/[email protected]"
# args:
# - --plugin=@prettier/plugin-xml
# files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args:
- --keep-percent-format
- --py36-plus
# - repo: https://github.com/PyCQA/isort
# rev: 5.12.0
# language_version: python3.8
# hooks:
# - id: isort
# name: isort except __init__.py
# args:
# - --settings=.
# exclude: /__init__\.py$
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be modified manually, but only through copier update

@aleuffre
Copy link
Contributor

Fixed the issue in #366

@sbrunner sbrunner deleted the swisstopo-projections branch March 13, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants