Skip to content

RG config client — CRUD, models and versioned generate methods - #38

Merged
carlosfunk merged 1 commit into
mainfrom
dm-3731-rg-config
Jul 29, 2026
Merged

RG config client — CRUD, models and versioned generate methods#38
carlosfunk merged 1 commit into
mainfrom
dm-3731-rg-config

Conversation

@carlosfunk

@carlosfunk carlosfunk commented Jul 19, 2026

Copy link
Copy Markdown
Member

Adds client support for DataMasque ruleset-generation configs: server-side masks-per-label configs consumed by the versioned generate APIs.

Commits

  • feat(client): add RG config CRUD and versioned generate methods

What's in it

  • RGConfig pydantic model + RGConfigClient mixin: list/get/create/update/delete + get_default_rg_config_yaml() against rg/configs/
  • Versioned generate methods mirroring the discovery *_from_config split: generate_ruleset_with_rg_config (v3), generate_file_ruleset_with_rg_config (v2), start_async_ruleset_generation_with_rg_config (v2), start_async_ruleset_generation_from_csv_with_rg_config (v2). Old methods keep the old endpoints (server default RG config).
  • Old generate request models reject rg_config and point callers at the new methods.
  • CSV/multipart note: rg_config=None is sent as an empty form field; DRF coerces '' to null on relational fields (verified end-to-end against a live server).

@carlosfunk
carlosfunk marked this pull request as draft July 19, 2026 23:01
@carlosfunk carlosfunk changed the title DM-3731: RG config client — CRUD, models and versioned generate methods (DM-3958) RG config client — CRUD, models and versioned generate methods Jul 20, 2026
@carlosfunk carlosfunk self-assigned this Jul 20, 2026
@carlosfunk
carlosfunk force-pushed the dm-3731-rg-config branch 2 times, most recently from b610a34 to dd05444 Compare July 27, 2026 02:58
@carlosfunk
carlosfunk marked this pull request as ready for review July 27, 2026 03:00

@cph-datamasque cph-datamasque left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mostly minor issues.

Do we want a RGConfigNotFoundError exception type to mirror the handling of 400 responses for other APIs?

Another thing that needs to be done at some point: the docs are out of date and need regenerating. Up to you if you want to do that in this MR, or we could raise a ticket to do it another day.

Comment thread datamasque/client/models/discovery.py Outdated
Comment thread datamasque/client/models/discovery.py Outdated
Comment thread datamasque/client/models/discovery.py
Comment thread datamasque/client/discovery.py Outdated
Comment thread datamasque/client/discovery.py Outdated
Comment thread datamasque/client/discovery.py Outdated
Comment thread datamasque/client/rg_configs.py
Comment thread datamasque/client/rg_configs.py Outdated
Comment thread datamasque/client/models/rg_config.py Outdated
@carlosfunk

Copy link
Copy Markdown
Member Author

Do we want a RGConfigNotFoundError exception type to mirror the handling of 400 responses for other APIs?

Added.

Another thing that needs to be done at some point: the docs are out of date and need regenerating. Up to you if you want to do that in this MR, or we could raise a ticket to do it another day.

Added the two stubs for this PR.

@cph-datamasque cph-datamasque left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved after one wording change

Comment thread datamasque/client/exceptions.py Outdated
@carlosfunk
carlosfunk merged commit 2c1c885 into main Jul 29, 2026
9 checks passed
@carlosfunk
carlosfunk deleted the dm-3731-rg-config branch July 29, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants