wexample-wex-addon-dev-flutter 0.0.56__tar.gz → 0.0.57__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 (16) hide show
  1. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/PKG-INFO +9 -9
  2. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/README.md +5 -5
  3. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/pyproject.toml +4 -4
  4. wexample_wex_addon_dev_flutter-0.0.57/src/wexample_wex_addon_dev_flutter/file/flutter_pubspec_yaml_file.py +63 -0
  5. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/workdir/flutter_workdir.py +29 -1
  6. wexample_wex_addon_dev_flutter-0.0.56/src/wexample_wex_addon_dev_flutter/file/flutter_pubspec_yaml_file.py +0 -26
  7. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/__init__.py +0 -0
  8. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/__pycache__/__init__.py +0 -0
  9. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/config_value/__init__.py +0 -0
  10. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/config_value/flutter_package_readme_config_value.py +0 -0
  11. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/file/__init__.py +0 -0
  12. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/flutter_addon_manager.py +0 -0
  13. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/py.typed +0 -0
  14. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/workdir/__init__.py +0 -0
  15. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/workdir/flutter_package_workdir.py +0 -0
  16. {wexample_wex_addon_dev_flutter-0.0.56 → wexample_wex_addon_dev_flutter-0.0.57}/src/wexample_wex_addon_dev_flutter/workdir/flutter_packages_suite_workdir.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-wex-addon-dev-flutter
3
- Version: 0.0.56
3
+ Version: 0.0.57
4
4
  Summary: Python dev addon for wex
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -11,9 +11,9 @@ Project-URL: homepage, https://github.com/wexample/python-wex-dev-python
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: attrs>=23.1.0
13
13
  Requires-Dist: cattrs>=23.1.0
14
- Requires-Dist: wexample-filestate-flutter==0.0.13
15
- Requires-Dist: wexample-wex-addon-app==0.0.54
16
- Requires-Dist: wexample-wex-core==6.0.66
14
+ Requires-Dist: wexample-filestate-flutter==0.0.15
15
+ Requires-Dist: wexample-wex-addon-app==0.0.55
16
+ Requires-Dist: wexample-wex-core==6.0.67
17
17
  Provides-Extra: dev
18
18
  Requires-Dist: pytest; extra == "dev"
19
19
  Requires-Dist: pytest-cov; extra == "dev"
@@ -21,7 +21,7 @@ Description-Content-Type: text/markdown
21
21
 
22
22
  # wexample-wex-addon-dev-flutter
23
23
 
24
- Version: 0.0.56
24
+ Version: 0.0.57
25
25
 
26
26
  Python dev addon for wex
27
27
 
@@ -211,7 +211,7 @@ Free to use in both personal and commercial projects.
211
211
 
212
212
  ## Integration in the Suite
213
213
 
214
- This package is part of the **Wexample Suite** — a collection of high-quality Python packages designed to work seamlessly together.
214
+ This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
215
215
 
216
216
  ### Related Packages
217
217
 
@@ -229,9 +229,9 @@ Refer to each package's documentation for specific version compatibility require
229
229
 
230
230
  - attrs: >=23.1.0
231
231
  - cattrs: >=23.1.0
232
- - wexample-filestate-flutter: ==0.0.13
233
- - wexample-wex-addon-app: ==0.0.54
234
- - wexample-wex-core: ==6.0.66
232
+ - wexample-filestate-flutter: ==0.0.15
233
+ - wexample-wex-addon-app: ==0.0.55
234
+ - wexample-wex-core: ==6.0.67
235
235
 
236
236
 
237
237
  # About us
@@ -1,6 +1,6 @@
1
1
  # wexample-wex-addon-dev-flutter
2
2
 
3
- Version: 0.0.56
3
+ Version: 0.0.57
4
4
 
5
5
  Python dev addon for wex
6
6
 
@@ -190,7 +190,7 @@ Free to use in both personal and commercial projects.
190
190
 
191
191
  ## Integration in the Suite
192
192
 
193
- This package is part of the **Wexample Suite** — a collection of high-quality Python packages designed to work seamlessly together.
193
+ This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
194
194
 
195
195
  ### Related Packages
196
196
 
@@ -208,9 +208,9 @@ Refer to each package's documentation for specific version compatibility require
208
208
 
209
209
  - attrs: >=23.1.0
210
210
  - cattrs: >=23.1.0
211
- - wexample-filestate-flutter: ==0.0.13
212
- - wexample-wex-addon-app: ==0.0.54
213
- - wexample-wex-core: ==6.0.66
211
+ - wexample-filestate-flutter: ==0.0.15
212
+ - wexample-wex-addon-app: ==0.0.55
213
+ - wexample-wex-core: ==6.0.67
214
214
 
215
215
 
216
216
  # About us
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "wexample-wex-addon-dev-flutter"
9
- version = "0.0.56"
9
+ version = "0.0.57"
10
10
  description = "Python dev addon for wex"
11
11
  authors = [
12
12
  { name = "weeger", email = "contact@wexample.com" },
@@ -20,9 +20,9 @@ classifiers = [
20
20
  dependencies = [
21
21
  "attrs>=23.1.0",
22
22
  "cattrs>=23.1.0",
23
- "wexample-filestate-flutter==0.0.13",
24
- "wexample-wex-addon-app==0.0.54",
25
- "wexample-wex-core==6.0.66",
23
+ "wexample-filestate-flutter==0.0.15",
24
+ "wexample-wex-addon-app==0.0.55",
25
+ "wexample-wex-core==6.0.67",
26
26
  ]
27
27
 
28
28
  [project.readme]
@@ -0,0 +1,63 @@
1
+ from __future__ import annotations
2
+
3
+ from wexample_filestate.item.file.yaml_file import YamlFile
4
+ from wexample_filestate_git.remote.github_remote import GithubRemote
5
+ from wexample_helpers.decorator.base_class import base_class
6
+
7
+
8
+ @base_class
9
+ class FlutterPubspecYamlFile(YamlFile):
10
+ def get_dependencies_versions(
11
+ self, optional: bool = False, group: str = "dev"
12
+ ) -> dict[str, str]:
13
+ config = self.read_config()
14
+
15
+ dependencies = config.search(path="dependencies").get_dict_or_default(
16
+ default={}
17
+ )
18
+ dev_dependencies = config.search(path="dev_dependencies").get_dict_or_default(
19
+ default={}
20
+ )
21
+
22
+ merged = dict(dependencies)
23
+
24
+ if group == "dev":
25
+ merged.update(dev_dependencies)
26
+
27
+ return merged
28
+
29
+ def dumps(self, content: dict | None = None) -> str:
30
+ workdir = self.get_parent_item()
31
+
32
+ # Always have a dict
33
+ content = content or {}
34
+
35
+ # Always set the package name
36
+ content["name"] = workdir.get_package_name()
37
+ content["version"] = workdir.get_project_version()
38
+
39
+ # Get repo remote URL (fallback: origin)
40
+ repo_url = workdir.git_run(
41
+ cmd=[
42
+ "remote",
43
+ "get-url",
44
+ workdir._get_deployment_remote_name() or "origin",
45
+ ],
46
+ capture=True,
47
+ ).stdout.strip()
48
+
49
+ # Auto-fill URLs if this is a GitHub repo
50
+ if GithubRemote.is_github_repo(repo_url):
51
+ resolved_repo_url = GithubRemote.resolve_url_from_repo_url(repo_url)
52
+
53
+ if resolved_repo_url:
54
+ # Fill homepage if missing
55
+ content.setdefault("homepage", resolved_repo_url)
56
+
57
+ # Fill repository if missing
58
+ content.setdefault("repository", resolved_repo_url)
59
+
60
+ # Fill issue tracker if missing
61
+ content.setdefault("issue_tracker", f"{resolved_repo_url}/issues")
62
+
63
+ return super().dumps(content)
@@ -5,7 +5,9 @@ from typing import TYPE_CHECKING
5
5
  from wexample_config.options_provider.abstract_options_provider import (
6
6
  AbstractOptionsProvider,
7
7
  )
8
+ from wexample_helpers.decorator.base_class import base_class
8
9
  from wexample_wex_addon_app.workdir.code_base_workdir import CodeBaseWorkdir
10
+ from wexample_wex_addon_app.workdir.mixin.with_license_workdir_mixin import WithLicenseWorkdirMixin
9
11
 
10
12
  if TYPE_CHECKING:
11
13
  from wexample_config.const.types import DictConfig
@@ -18,7 +20,8 @@ if TYPE_CHECKING:
18
20
  )
19
21
 
20
22
 
21
- class FlutterWorkdir(CodeBaseWorkdir):
23
+ @base_class
24
+ class FlutterWorkdir(WithLicenseWorkdirMixin, CodeBaseWorkdir):
22
25
  def get_app_config_file(self, reload: bool = True) -> FlutterPubspecYamlFile:
23
26
  from wexample_wex_addon_dev_flutter.file.flutter_pubspec_yaml_file import (
24
27
  FlutterPubspecYamlFile,
@@ -104,9 +107,16 @@ class FlutterWorkdir(CodeBaseWorkdir):
104
107
  self._create_flutter_file_children_filter(),
105
108
  ],
106
109
  },
110
+ {
111
+ "name": ".publignore",
112
+ "type": DiskItemType.FILE,
113
+ "should_exist": True,
114
+ },
107
115
  ]
108
116
  )
109
117
 
118
+ self.append_license(raw_value)
119
+
110
120
  return raw_value
111
121
 
112
122
  def _create_flutter_file_children_filter(self) -> ChildrenFileFactoryOption:
@@ -130,3 +140,21 @@ class FlutterWorkdir(CodeBaseWorkdir):
130
140
  name_pattern=r"^.*\.dart$",
131
141
  recursive=True,
132
142
  )
143
+
144
+ def _safe_shell(self, cmd, cwd) -> None:
145
+ import subprocess
146
+ from wexample_helpers.helpers.shell import shell_run
147
+ try:
148
+ shell_run(cmd, inherit_stdio=True, cwd=cwd)
149
+ except subprocess.CalledProcessError as e:
150
+ if e.returncode != 65:
151
+ raise
152
+ self.warning(f"Command {cmd} returned warnings (exit code 65).")
153
+
154
+ def _publish(self, force=False) -> None:
155
+ cwd = self.get_path()
156
+
157
+ self._safe_shell(["flutter", "pub", "publish", "--dry-run"], cwd)
158
+
159
+ publish_cmd = ["flutter", "pub", "publish"] + (["--force"] if force else [])
160
+ self._safe_shell(publish_cmd, cwd)
@@ -1,26 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from wexample_filestate.item.file.yaml_file import YamlFile
4
- from wexample_helpers.decorator.base_class import base_class
5
-
6
-
7
- @base_class
8
- class FlutterPubspecYamlFile(YamlFile):
9
- def get_dependencies_versions(
10
- self, optional: bool = False, group: str = "dev"
11
- ) -> dict[str, str]:
12
- config = self.read_config()
13
-
14
- dependencies = config.search(path="dependencies").get_dict_or_default(
15
- default={}
16
- )
17
- dev_dependencies = config.search(path="dev_dependencies").get_dict_or_default(
18
- default={}
19
- )
20
-
21
- merged = dict(dependencies)
22
-
23
- if group == "dev":
24
- merged.update(dev_dependencies)
25
-
26
- return merged