qgis-plugin-dev-tools 0.7.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/CHANGELOG.md +5 -0
  2. {qgis_plugin_dev_tools-0.7.0/src/qgis_plugin_dev_tools.egg-info → qgis_plugin_dev_tools-0.8.0}/PKG-INFO +8 -1
  3. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/README.md +2 -0
  4. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/__init__.py +1 -1
  5. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/cli/__init__.py +2 -0
  6. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/config/dotenv.py +7 -1
  7. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/start/__init__.py +2 -0
  8. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/start/config.py +2 -0
  9. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/start/launch.py +12 -0
  10. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0/src/qgis_plugin_dev_tools.egg-info}/PKG-INFO +8 -1
  11. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/test/test_build.py +4 -12
  12. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/test/test_read_distributions.py +0 -2
  13. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/test/test_read_dotenv.py +2 -0
  14. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/LICENSE +0 -0
  15. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/MANIFEST.in +0 -0
  16. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/pyproject.toml +0 -0
  17. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/setup.cfg +0 -0
  18. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/setup.py +0 -0
  19. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/__main__.py +0 -0
  20. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/build/__init__.py +0 -0
  21. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/build/changelog_parser.py +0 -0
  22. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/build/distribution.py +0 -0
  23. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/build/metadata.py +0 -0
  24. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/build/packaging.py +0 -0
  25. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/build/rewrite_imports.py +0 -0
  26. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/config/__init__.py +0 -0
  27. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/config/pyproject.py +0 -0
  28. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/publish/__init__.py +0 -0
  29. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/py.typed +0 -0
  30. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/start/bootstrap/__init__.py +0 -0
  31. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/start/bootstrap/template.py +0 -0
  32. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/start/daemon_server.py +0 -0
  33. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/utils/__init__.py +0 -0
  34. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools/utils/distributions.py +0 -0
  35. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools.egg-info/SOURCES.txt +0 -0
  36. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools.egg-info/dependency_links.txt +0 -0
  37. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools.egg-info/entry_points.txt +0 -0
  38. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools.egg-info/requires.txt +0 -0
  39. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/src/qgis_plugin_dev_tools.egg-info/top_level.txt +0 -0
  40. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/test/test_read_pyproject.py +0 -0
  41. {qgis_plugin_dev_tools-0.7.0 → qgis_plugin_dev_tools-0.8.0}/test/test_rewrite_imports.py +0 -0
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.8.0] - 2024-08-23
8
+
9
+ - Feat: Add locale and ui ini options to be able to further customize development environment
10
+
7
11
  ## [0.7.0] - 2024-05-21
8
12
 
9
13
  - Fix: Bundle contents by parsing pep-compliant distribution file catalog instead of possibly missing tool-specific top-level.txt
@@ -72,3 +76,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
72
76
  [0.6.1]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.6.1
73
77
  [0.6.2]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.6.2
74
78
  [0.7.0]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.7.0
79
+ [0.8.0]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.8.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qgis-plugin-dev-tools
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: QGIS plugin development and packaging tools, which make managing runtime dependencies easy.
5
5
  Home-page: https://github.com/nlsfi/qgis-plugin-dev-tools
6
6
  Author: National Land Survey of Finland
@@ -113,6 +113,8 @@ By default config is read from `pyproject.toml` and runtime config from `.env` i
113
113
  QGIS_EXECUTABLE_PATH= # path to qgis-bin/qgis-bin-ltr or .exe equivalents, necessary
114
114
  # DEBUGGER_LIBRARY= # debugpy/pydevd to start a debugger on init, library must be installed to the environment
115
115
  # DEVELOPMENT_PROFILE_NAME= # name of the profile that qgis is launched with, otherwise uses default
116
+ # QGIS_LOCALE= # locale code of QGIS, otherwise uses default
117
+ # QGIS_GUI_INI= # path to ini file containing QGIS UI customizations
116
118
 
117
119
  # any other variables are added to the runtime QGIS environment
118
120
  # SOMETHING=something
@@ -165,6 +167,10 @@ All notable changes to this project will be documented in this file.
165
167
 
166
168
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
167
169
 
170
+ ## [0.8.0] - 2024-08-23
171
+
172
+ - Feat: Add locale and ui ini options to be able to further customize development environment
173
+
168
174
  ## [0.7.0] - 2024-05-21
169
175
 
170
176
  - Fix: Bundle contents by parsing pep-compliant distribution file catalog instead of possibly missing tool-specific top-level.txt
@@ -233,3 +239,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
233
239
  [0.6.1]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.6.1
234
240
  [0.6.2]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.6.2
235
241
  [0.7.0]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.7.0
242
+ [0.8.0]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.8.0
@@ -83,6 +83,8 @@ By default config is read from `pyproject.toml` and runtime config from `.env` i
83
83
  QGIS_EXECUTABLE_PATH= # path to qgis-bin/qgis-bin-ltr or .exe equivalents, necessary
84
84
  # DEBUGGER_LIBRARY= # debugpy/pydevd to start a debugger on init, library must be installed to the environment
85
85
  # DEVELOPMENT_PROFILE_NAME= # name of the profile that qgis is launched with, otherwise uses default
86
+ # QGIS_LOCALE= # locale code of QGIS, otherwise uses default
87
+ # QGIS_GUI_INI= # path to ini file containing QGIS UI customizations
86
88
 
87
89
  # any other variables are added to the runtime QGIS environment
88
90
  # SOMETHING=something
@@ -20,7 +20,7 @@
20
20
  import logging
21
21
  import sys
22
22
 
23
- __version__ = "0.7.0"
23
+ __version__ = "0.8.0"
24
24
 
25
25
  LOGGER = logging.getLogger(__name__)
26
26
  _handler = logging.StreamHandler(sys.stdout)
@@ -54,6 +54,8 @@ def start(dotenv_file_paths: list[Path]) -> None:
54
54
  DevelopmentModeConfig(
55
55
  qgis_executable_path=dotenv_config.QGIS_EXECUTABLE_PATH,
56
56
  profile_name=dotenv_config.DEVELOPMENT_PROFILE_NAME,
57
+ locale=dotenv_config.QGIS_LOCALE,
58
+ ui_ini=dotenv_config.QGIS_GUI_INI,
57
59
  runtime_environment=dotenv_config.runtime_environment,
58
60
  runtime_library_paths=[Path(p) for p in sys.path],
59
61
  plugin_package_path=dev_tools_config.plugin_package_path,
@@ -34,14 +34,18 @@ class DotenvConfig:
34
34
  QGIS_EXECUTABLE_PATH: Path
35
35
  DEBUGGER_LIBRARY: Optional[str]
36
36
  DEVELOPMENT_PROFILE_NAME: Optional[str]
37
+ QGIS_LOCALE: Optional[str]
38
+ QGIS_GUI_INI: Optional[str]
37
39
  runtime_environment: dict[str, str]
38
40
 
39
- def __init__(
41
+ def __init__( # noqa: PLR0913
40
42
  self,
41
43
  *,
42
44
  QGIS_EXECUTABLE_PATH: str, # noqa: N803
43
45
  DEBUGGER_LIBRARY: Optional[str] = None, # noqa: N803
44
46
  DEVELOPMENT_PROFILE_NAME: Optional[str] = None, # noqa: N803
47
+ QGIS_LOCALE: Optional[str] = None, # noqa: N803
48
+ QGIS_GUI_INI: Optional[str] = None, # noqa: N803
45
49
  **other_vars: str,
46
50
  ) -> None:
47
51
  self.QGIS_EXECUTABLE_PATH = Path(QGIS_EXECUTABLE_PATH)
@@ -51,6 +55,8 @@ class DotenvConfig:
51
55
  )
52
56
  self.DEBUGGER_LIBRARY = DEBUGGER_LIBRARY
53
57
  self.DEVELOPMENT_PROFILE_NAME = DEVELOPMENT_PROFILE_NAME
58
+ self.QGIS_LOCALE = QGIS_LOCALE
59
+ self.QGIS_GUI_INI = QGIS_GUI_INI
54
60
  self.runtime_environment = other_vars
55
61
 
56
62
 
@@ -42,6 +42,8 @@ def launch_development_qgis(
42
42
  development_mode_config.qgis_executable_path,
43
43
  bootstrap_file_path,
44
44
  development_mode_config.profile_name,
45
+ development_mode_config.locale,
46
+ development_mode_config.ui_ini,
45
47
  )
46
48
 
47
49
  LOGGER.info("waiting for qgis to connect")
@@ -26,6 +26,8 @@ from typing import Optional
26
26
  class DevelopmentModeConfig:
27
27
  qgis_executable_path: Path
28
28
  profile_name: Optional[str]
29
+ locale: Optional[str]
30
+ ui_ini: Optional[str]
29
31
  runtime_environment: dict[str, str]
30
32
  runtime_library_paths: list[Path]
31
33
  plugin_package_path: Path
@@ -29,6 +29,8 @@ def launch_qgis_with_bootstrap_script(
29
29
  qgis_executable_path: Path,
30
30
  bootstrap_script_path: Path,
31
31
  profile_name: Optional[str],
32
+ locale: Optional[str],
33
+ ui_ini: Optional[str],
32
34
  ) -> None:
33
35
  args = [
34
36
  str(qgis_executable_path),
@@ -42,6 +44,16 @@ def launch_qgis_with_bootstrap_script(
42
44
  else:
43
45
  LOGGER.info("using default profile name")
44
46
 
47
+ if locale:
48
+ LOGGER.info("using locale name %s", locale)
49
+ args.extend(["--lang", locale])
50
+ else:
51
+ LOGGER.info("using default locale")
52
+
53
+ if ui_ini:
54
+ LOGGER.info("using ui ini file from path %s", ui_ini)
55
+ args.extend(["--customizationfile", ui_ini])
56
+
45
57
  LOGGER.debug("launch command args %s", args)
46
58
 
47
59
  process = Popen(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qgis-plugin-dev-tools
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: QGIS plugin development and packaging tools, which make managing runtime dependencies easy.
5
5
  Home-page: https://github.com/nlsfi/qgis-plugin-dev-tools
6
6
  Author: National Land Survey of Finland
@@ -113,6 +113,8 @@ By default config is read from `pyproject.toml` and runtime config from `.env` i
113
113
  QGIS_EXECUTABLE_PATH= # path to qgis-bin/qgis-bin-ltr or .exe equivalents, necessary
114
114
  # DEBUGGER_LIBRARY= # debugpy/pydevd to start a debugger on init, library must be installed to the environment
115
115
  # DEVELOPMENT_PROFILE_NAME= # name of the profile that qgis is launched with, otherwise uses default
116
+ # QGIS_LOCALE= # locale code of QGIS, otherwise uses default
117
+ # QGIS_GUI_INI= # path to ini file containing QGIS UI customizations
116
118
 
117
119
  # any other variables are added to the runtime QGIS environment
118
120
  # SOMETHING=something
@@ -165,6 +167,10 @@ All notable changes to this project will be documented in this file.
165
167
 
166
168
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
167
169
 
170
+ ## [0.8.0] - 2024-08-23
171
+
172
+ - Feat: Add locale and ui ini options to be able to further customize development environment
173
+
168
174
  ## [0.7.0] - 2024-05-21
169
175
 
170
176
  - Fix: Bundle contents by parsing pep-compliant distribution file catalog instead of possibly missing tool-specific top-level.txt
@@ -233,3 +239,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
233
239
  [0.6.1]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.6.1
234
240
  [0.6.2]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.6.2
235
241
  [0.7.0]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.7.0
242
+ [0.8.0]: https://github.com/nlsfi/qgis-plugin-dev-tools/releases/tag/v0.8.0
@@ -121,13 +121,9 @@ def test_make_zip(dev_tools_config: "DevToolsConfig", tmp_path: Path):
121
121
  assert vendor_files == {
122
122
  "__init__.py",
123
123
  "_pytest",
124
- "atomicwrites",
125
- "atomicwrites-1.4.0.dist-info",
126
124
  "attr",
127
125
  "attrs",
128
126
  "attrs-21.4.0.dist-info",
129
- "colorama",
130
- "colorama-0.4.4.dist-info",
131
127
  "importlib_metadata",
132
128
  "importlib_metadata-4.11.3.dist-info",
133
129
  "iniconfig",
@@ -142,7 +138,7 @@ def test_make_zip(dev_tools_config: "DevToolsConfig", tmp_path: Path):
142
138
  "pytest-6.2.5.dist-info",
143
139
  "toml",
144
140
  "toml-0.10.2.dist-info",
145
- "typing_extensions-4.2.0.dist-info",
141
+ "typing_extensions-4.12.2.dist-info",
146
142
  "typing_extensions.py", # no top-level.txt in .dist-info, parsed from record
147
143
  "zipp-3.8.0.dist-info",
148
144
  "zipp.py", # top-level.txt in .dist-info, includes zipp
@@ -172,15 +168,11 @@ def test_make_zip_with_duplicate_dependencies(
172
168
  assert vendor_files == {
173
169
  "__init__.py",
174
170
  "_pytest",
175
- "atomicwrites",
176
- "atomicwrites-1.4.0.dist-info",
177
171
  "attr",
178
172
  "attrs",
179
173
  "attrs-21.4.0.dist-info",
180
- "colorama",
181
- "colorama-0.4.4.dist-info",
182
174
  "coverage",
183
- "coverage-6.3.2.dist-info",
175
+ "coverage-7.6.1.dist-info",
184
176
  "importlib_metadata",
185
177
  "importlib_metadata-4.11.3.dist-info",
186
178
  "iniconfig",
@@ -194,10 +186,10 @@ def test_make_zip_with_duplicate_dependencies(
194
186
  "pytest",
195
187
  "pytest-6.2.5.dist-info",
196
188
  "pytest_cov",
197
- "pytest_cov-2.12.0.dist-info",
189
+ "pytest_cov-4.1.0.dist-info",
198
190
  "toml",
199
191
  "toml-0.10.2.dist-info",
200
- "typing_extensions-4.2.0.dist-info",
192
+ "typing_extensions-4.12.2.dist-info",
201
193
  "typing_extensions.py", # no top-level.txt in .dist-info, parsed from record
202
194
  "zipp-3.8.0.dist-info",
203
195
  "zipp.py", # top-level.txt in .dist-info, includes zipp
@@ -14,9 +14,7 @@ def sample_dist() -> Any:
14
14
  def test_get_distribution_requirements(sample_dist: Any):
15
15
  requirements = get_distribution_requirements(sample_dist)
16
16
  assert sorted(requirements.keys()) == [
17
- "atomicwrites",
18
17
  "attrs",
19
- "colorama",
20
18
  "importlib-metadata",
21
19
  "iniconfig",
22
20
  "packaging",
@@ -46,6 +46,8 @@ def test_optionals_can_be_missing(
46
46
  result = read_dotenv_configs([test_file])
47
47
  assert result.DEVELOPMENT_PROFILE_NAME is None
48
48
  assert result.DEBUGGER_LIBRARY is None
49
+ assert result.QGIS_LOCALE is None
50
+ assert result.QGIS_GUI_INI is None
49
51
 
50
52
 
51
53
  def test_other_vars_saved_as_runtime_env(