pytaskwarrior 3.0.0a2__tar.gz → 3.0.0a4__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 (42) hide show
  1. {pytaskwarrior-3.0.0a2/src/pytaskwarrior.egg-info → pytaskwarrior-3.0.0a4}/PKG-INFO +2 -2
  2. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/pyproject.toml +2 -3
  3. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4/src/pytaskwarrior.egg-info}/PKG-INFO +2 -2
  4. pytaskwarrior-3.0.0a4/src/pytaskwarrior.egg-info/requires.txt +2 -0
  5. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/config/config_store.py +54 -0
  6. pytaskwarrior-3.0.0a2/src/pytaskwarrior.egg-info/requires.txt +0 -2
  7. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/LICENSE +0 -0
  8. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/PYPI_README.md +0 -0
  9. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/README.md +0 -0
  10. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/setup.cfg +0 -0
  11. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/__init__.py +0 -0
  12. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/pytaskwarrior.egg-info/SOURCES.txt +0 -0
  13. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/pytaskwarrior.egg-info/dependency_links.txt +0 -0
  14. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/pytaskwarrior.egg-info/top_level.txt +0 -0
  15. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/__init__.py +0 -0
  16. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/adapters/__init__.py +0 -0
  17. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/adapters/taskchampion_adapter.py +0 -0
  18. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/adapters/taskwarrior_adapter.py +0 -0
  19. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/adapters/tc_converter.py +0 -0
  20. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/adapters/tc_filter.py +0 -0
  21. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/config/uda_parser.py +0 -0
  22. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/dto/__init__.py +0 -0
  23. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/dto/annotation_dto.py +0 -0
  24. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/dto/context_dto.py +0 -0
  25. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/dto/task_dto.py +0 -0
  26. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/dto/task_id.py +0 -0
  27. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/dto/uda_dto.py +0 -0
  28. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/enums.py +0 -0
  29. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/exceptions.py +0 -0
  30. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/main.py +0 -0
  31. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/py.typed +0 -0
  32. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/registry/__init__.py +0 -0
  33. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/registry/uda_registry.py +0 -0
  34. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/services/__init__.py +0 -0
  35. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/services/context_service.py +0 -0
  36. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/services/uda_service.py +0 -0
  37. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/utils/__init__.py +0 -0
  38. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/utils/conversions.py +0 -0
  39. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/utils/date_resolver.py +0 -0
  40. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/utils/dto_converter.py +0 -0
  41. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/src/taskwarrior/utils/virtual_tags.py +0 -0
  42. {pytaskwarrior-3.0.0a2 → pytaskwarrior-3.0.0a4}/tests/test_main_get_udas.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytaskwarrior
3
- Version: 3.0.0a2
3
+ Version: 3.0.0a4
4
4
  Summary: Taskwarrior wrapper python module
5
5
  Author-email: sznicolas <sznicolas@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -21,7 +21,7 @@ Requires-Python: >=3.12
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: pydantic>=2.11.7
24
- Requires-Dist: taskchampion3-py-dev>=3.0.1.1a0
24
+ Requires-Dist: taskchampion3-py-dev>=3.0.1.2a1
25
25
  Dynamic: license-file
26
26
 
27
27
  # pytaskwarrior
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pytaskwarrior"
3
- version = "3.0.0a2"
3
+ version = "3.0.0a4"
4
4
  description = "Taskwarrior wrapper python module"
5
5
  readme = "PYPI_README.md"
6
6
  requires-python = ">=3.12"
@@ -21,8 +21,7 @@ classifiers = [
21
21
  ]
22
22
  dependencies = [
23
23
  "pydantic>=2.11.7",
24
- # "taskchampion-py-dev>=3.0.1.1a1"
25
- "taskchampion3-py-dev>=3.0.1.1a0",
24
+ "taskchampion3-py-dev>=3.0.1.2a1",
26
25
  ]
27
26
 
28
27
  [dependency-groups]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytaskwarrior
3
- Version: 3.0.0a2
3
+ Version: 3.0.0a4
4
4
  Summary: Taskwarrior wrapper python module
5
5
  Author-email: sznicolas <sznicolas@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -21,7 +21,7 @@ Requires-Python: >=3.12
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: pydantic>=2.11.7
24
- Requires-Dist: taskchampion3-py-dev>=3.0.1.1a0
24
+ Requires-Dist: taskchampion3-py-dev>=3.0.1.2a1
25
25
  Dynamic: license-file
26
26
 
27
27
  # pytaskwarrior
@@ -0,0 +1,2 @@
1
+ pydantic>=2.11.7
2
+ taskchampion3-py-dev>=3.0.1.2a1
@@ -126,6 +126,60 @@ rc.bulk=0
126
126
  # Accept both 'sync.' and 'taskrc.sync.' keys for compatibility
127
127
  return {k: v for k, v in self.config.items() if k.startswith("sync.")}
128
128
 
129
+ def set_sync_config(self, config: dict[str, str | None]) -> None:
130
+ """Write (or clear) the ``sync.*`` section of the taskrc file.
131
+
132
+ This is the write-symmetric counterpart of :meth:`get_sync_config`. It
133
+ **replaces** the current ``sync.*`` keys entirely: keys present in the
134
+ file but absent from *config* are deleted; keys provided in *config*
135
+ are written (or removed when their value is ``None``).
136
+
137
+ Keys may be supplied with or without the ``"sync."`` prefix — the prefix
138
+ is added automatically when missing.
139
+
140
+ Args:
141
+ config: Mapping of sync key → value. Pass ``None`` as the value
142
+ to explicitly delete a key (e.g.
143
+ ``{"sync.encryption.secret": None}``). Pass an empty dict to
144
+ wipe all ``sync.*`` keys.
145
+
146
+ Raises:
147
+ TaskConfigurationError: If the taskrc file cannot be read or
148
+ written.
149
+
150
+ Example::
151
+
152
+ tw.config_store.set_sync_config({
153
+ "sync.server.origin": "https://taskchampion.example.com",
154
+ "sync.server.client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
155
+ "sync.encryption.secret": "my-passphrase",
156
+ })
157
+ # Replace with local sync, removing any previous remote config:
158
+ tw.config_store.set_sync_config({
159
+ "sync.local.server_dir": "/mnt/shared/taskserver",
160
+ })
161
+ """
162
+ # Normalise keys so callers may omit the "sync." prefix.
163
+ normalised: dict[str, str | None] = {}
164
+ for k, v in config.items():
165
+ full_key = k if k.startswith("sync.") else f"sync.{k}"
166
+ normalised[full_key] = v
167
+
168
+ # Delete keys currently in the file that are not present in the new config.
169
+ for existing_key in list(self.get_sync_config().keys()):
170
+ if existing_key not in normalised:
171
+ self.delete_value(existing_key)
172
+
173
+ # Write or delete each supplied key.
174
+ for key, value in normalised.items():
175
+ if value is None:
176
+ self.delete_value(key)
177
+ else:
178
+ self.set_value(key, value)
179
+
180
+ # Final refresh ensures the in-memory cache reflects the final state.
181
+ self.refresh()
182
+
129
183
  def get_contexts_config(self) -> dict[str, str]:
130
184
  # Extract context config directly from self.config
131
185
  return {k: v for k, v in self.config.items() if k.startswith("context.")}
@@ -1,2 +0,0 @@
1
- pydantic>=2.11.7
2
- taskchampion3-py-dev>=3.0.1.1a0
File without changes