datamasque-python 1.3.0__tar.gz → 1.3.1__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 (90) hide show
  1. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/.github/workflows/release.yml +24 -0
  2. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/HISTORY.rst +9 -0
  3. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/PKG-INFO +1 -1
  4. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/RELEASING.rst +4 -25
  5. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/__init__.py +2 -0
  6. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/discovery.py +9 -0
  7. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/pyproject.toml +1 -1
  8. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_discovery.py +17 -0
  9. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/uv.lock +1 -1
  10. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/.editorconfig +0 -0
  11. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/.github/workflows/ci.yml +0 -0
  12. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/.github/workflows/release-testpypi.yml +0 -0
  13. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/.gitignore +0 -0
  14. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/.readthedocs.yaml +0 -0
  15. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/CONTRIBUTING.rst +0 -0
  16. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/LICENSE +0 -0
  17. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/MANIFEST.in +0 -0
  18. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/Makefile +0 -0
  19. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/NOTICE +0 -0
  20. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/README.rst +0 -0
  21. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/base.py +0 -0
  22. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/connections.py +0 -0
  23. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/discovery.py +0 -0
  24. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/discovery_config_libraries.py +0 -0
  25. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/discovery_configs.py +0 -0
  26. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/dmclient.py +0 -0
  27. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/exceptions.py +0 -0
  28. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/files.py +0 -0
  29. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/ifm.py +0 -0
  30. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/license.py +0 -0
  31. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/__init__.py +0 -0
  32. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/connection.py +0 -0
  33. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/data_selection.py +0 -0
  34. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/discovery_config.py +0 -0
  35. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/discovery_config_library.py +0 -0
  36. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/dm_instance.py +0 -0
  37. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/files.py +0 -0
  38. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/git.py +0 -0
  39. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/ifm.py +0 -0
  40. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/license.py +0 -0
  41. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/pagination.py +0 -0
  42. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/rg_config.py +0 -0
  43. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/ruleset.py +0 -0
  44. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/ruleset_library.py +0 -0
  45. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/runs.py +0 -0
  46. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/safe_data_preview.py +0 -0
  47. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/status.py +0 -0
  48. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/table_reference.py +0 -0
  49. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/models/user.py +0 -0
  50. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/py.typed +0 -0
  51. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/rg_configs.py +0 -0
  52. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/ruleset_libraries.py +0 -0
  53. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/rulesets.py +0 -0
  54. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/runs.py +0 -0
  55. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/settings.py +0 -0
  56. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/spcs.py +0 -0
  57. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/table_references.py +0 -0
  58. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/datamasque/client/users.py +0 -0
  59. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/Makefile +0 -0
  60. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/client.models.rst +0 -0
  61. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/client.rst +0 -0
  62. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/conf.py +0 -0
  63. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/contributing.rst +0 -0
  64. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/history.rst +0 -0
  65. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/index.rst +0 -0
  66. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/installation.rst +0 -0
  67. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/make.bat +0 -0
  68. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/modules.rst +0 -0
  69. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/readme.rst +0 -0
  70. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/docs/usage.rst +0 -0
  71. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/__init__.py +0 -0
  72. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/conftest.py +0 -0
  73. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/helpers.py +0 -0
  74. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_base.py +0 -0
  75. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_connections.py +0 -0
  76. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_discovery_config_libraries.py +0 -0
  77. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_discovery_configs.py +0 -0
  78. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_files.py +0 -0
  79. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_ifm.py +0 -0
  80. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_license.py +0 -0
  81. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_pagination.py +0 -0
  82. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_rg_configs.py +0 -0
  83. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_ruleset_library.py +0 -0
  84. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_rulesets.py +0 -0
  85. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_runs.py +0 -0
  86. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_safe_data_preview.py +0 -0
  87. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_settings.py +0 -0
  88. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_spcs.py +0 -0
  89. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_table_references.py +0 -0
  90. {datamasque_python-1.3.0 → datamasque_python-1.3.1}/tests/test_users.py +0 -0
@@ -60,3 +60,27 @@ jobs:
60
60
 
61
61
  - name: Publish to PyPI
62
62
  uses: pypa/gh-action-pypi-publish@release/v1
63
+
64
+ github-release:
65
+ name: Publish GitHub Release
66
+ needs: publish
67
+ runs-on: ubuntu-latest
68
+ permissions:
69
+ contents: write
70
+ steps:
71
+ - name: Download distributions
72
+ uses: actions/download-artifact@v4
73
+ with:
74
+ name: dist
75
+ path: dist/
76
+
77
+ - name: Create GitHub Release
78
+ env:
79
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80
+ run: |
81
+ gh release create "${GITHUB_REF_NAME}" \
82
+ --repo "${GITHUB_REPOSITORY}" \
83
+ --title "${GITHUB_REF_NAME}" \
84
+ --verify-tag \
85
+ --notes "See [HISTORY.rst](https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_REF_NAME}/HISTORY.rst) for changelog." \
86
+ dist/*
@@ -2,6 +2,15 @@
2
2
  History
3
3
  =======
4
4
 
5
+ 1.3.1 (2026-09-09)
6
+ ------------------
7
+
8
+ * Added ``max_length_unit`` to ``SchemaDiscoveryColumn``, typed by the new ``LengthUnit`` enum
9
+ (``chars`` or ``bytes``), reporting the unit a column's ``max_length`` is counted in.
10
+ It is ``None`` for results from older servers that do not report a unit.
11
+
12
+ Requires server version 3.26.17
13
+
5
14
  1.3.0 (2026-09-04)
6
15
  ------------------
7
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: datamasque-python
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Official Python client for the DataMasque data-masking API.
5
5
  Project-URL: Homepage, https://datamasque.com/
6
6
  Project-URL: Documentation, https://datamasque-python.readthedocs.io/
@@ -68,31 +68,10 @@ Releasing to PyPI
68
68
  You can verify that the release appears at https://pypi.org/project/datamasque-python/,
69
69
  and Read the Docs has built the new tag
70
70
  at https://datamasque-python.readthedocs.io/.
71
- 5. Create the GitHub Release (see below).
72
-
73
- Creating the GitHub Release
74
- ===========================
75
-
76
- Do this after the PyPI publish has succeeded,
77
- so the release never points at a version nobody can install.
78
-
79
- 1. On the repository home page,
80
- find **Releases** in the right-hand sidebar under the *About* box,
81
- and click it,
82
- then **Draft a new release**.
83
- 2. **Choose a tag** — pick the existing tag you pushed as part of releasing to PyPI.
84
- Don't let GitHub create a new one; the tag should already exist from the release flow.
85
- 3. Set the target to ``main``.
86
- 4. Title it the same as the tag, e.g. ``v1.2.2``.
87
- 5. Paste the ``HISTORY.rst`` entry for this version into the body, converted to Markdown.
88
- **Generate release notes** is a reasonable starting point for the commit list,
89
- but the hand-written changelog is what users read.
90
- 6. Leave *Set as a pre-release* unticked for a normal release.
91
- 7. Click **Publish release**.
92
-
93
- Creating releases can also be done from the ``gh`` CLI::
94
-
95
- gh release create v1.2.2 --title v1.2.2 --notes-file notes.md
71
+ 5. The GitHub Release is created automatically once the PyPI publish succeeds.
72
+ ``release.yml`` runs a ``github-release`` job that creates the release for the pushed tag,
73
+ attaches the built distributions, and links to ``HISTORY.rst`` at that tag for the changelog.
74
+ Nothing to do by hand; just confirm it appears under **Releases** on the repository home page.
96
75
 
97
76
  Releasing a dev build to TestPyPI
98
77
  =================================
@@ -73,6 +73,7 @@ from datamasque.client.models.discovery import (
73
73
  ForeignKeyRef,
74
74
  InDataDiscoveryConfig,
75
75
  InDataDiscoveryRule,
76
+ LengthUnit,
76
77
  ReferencingForeignKey,
77
78
  RulesetGenerationRequest,
78
79
  RulesetGenerationWithRGConfigRequest,
@@ -239,6 +240,7 @@ __all__ = [
239
240
  "InvalidRulesetError",
240
241
  "JsonPath",
241
242
  "LengthEntry",
243
+ "LengthUnit",
242
244
  "LengthsStatistics",
243
245
  "LicenseInfo",
244
246
  "Locator",
@@ -367,6 +367,13 @@ class ReferencingForeignKey(BaseModel):
367
367
  referencing_column: str # Dotted path: "schema.table.column".
368
368
 
369
369
 
370
+ class LengthUnit(Enum):
371
+ """The unit a column's declared width (`max_length`) is counted in."""
372
+
373
+ chars = "chars"
374
+ bytes = "bytes"
375
+
376
+
370
377
  class SchemaDiscoveryColumn(BaseModel):
371
378
  """Column-level data in a schema discovery result."""
372
379
 
@@ -374,6 +381,8 @@ class SchemaDiscoveryColumn(BaseModel):
374
381
 
375
382
  data_type: Optional[str] = None
376
383
  max_length: Optional[int] = None
384
+ # None when the server does not report a unit (older runs count chars).
385
+ max_length_unit: Optional[LengthUnit] = None
377
386
  foreign_keys: list[ForeignKeyRef]
378
387
  discovery_matches: list[DiscoveryMatch]
379
388
  numeric_precision: Optional[int] = None
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "datamasque-python"
3
- version = "1.3.0"
3
+ version = "1.3.1"
4
4
  description = "Official Python client for the DataMasque data-masking API."
5
5
  authors = [
6
6
  { name = "DataMasque Ltd" },
@@ -21,6 +21,7 @@ from datamasque.client import (
21
21
  FileRulesetGenerationRequest,
22
22
  FileRulesetGenerationWithRGConfigRequest,
23
23
  InDataDiscoveryConfig,
24
+ LengthUnit,
24
25
  RGConfig,
25
26
  RGConfigId,
26
27
  RulesetGenerationRequest,
@@ -795,6 +796,22 @@ def test_schema_discovery_result_parses_safe_data_preview():
795
796
  assert preview.statistics_common.count_distinct == 988
796
797
 
797
798
 
799
+ def test_schema_discovery_result_parses_max_length_unit() -> None:
800
+ row = _schema_discovery_row(1, "name")
801
+ row["data"]["max_length"] = 10
802
+ row["data"]["max_length_unit"] = "bytes"
803
+ result = SchemaDiscoveryResult.model_validate(row)
804
+ assert result.data.max_length == 10
805
+ assert result.data.max_length_unit is LengthUnit.bytes
806
+
807
+
808
+ def test_schema_discovery_result_without_max_length_unit_is_none() -> None:
809
+ row = _schema_discovery_row(1, "name")
810
+ assert "max_length_unit" not in row["data"]
811
+ result = SchemaDiscoveryResult.model_validate(row)
812
+ assert result.data.max_length_unit is None
813
+
814
+
798
815
  def test_list_schema_discovery_results_follows_pagination(client):
799
816
  run_id = RunId(42)
800
817
  page1 = {
@@ -419,7 +419,7 @@ toml = [
419
419
 
420
420
  [[package]]
421
421
  name = "datamasque-python"
422
- version = "1.3.0"
422
+ version = "1.3.1"
423
423
  source = { editable = "." }
424
424
  dependencies = [
425
425
  { name = "pydantic" },