Repository navigation
Conversation
Add get_ai_detection_cache_size_bytes and clear_ai_detection_cache (returning AiDetectionCacheClearResult) to SettingsClient, and an AuditLogClient with iter_audit_logs and list_audit_logs returning AuditLog models newest first. Bump the version to 1.6.0.
| [project] | ||
| name = "datamasque-python" | ||
| version = "1.5.0" | ||
| version = "1.6.0" |
Collaborator
There was a problem hiding this comment.
1.6.0 already went out with the projects epic, can this rebase onto main, drop the version bump and add its notes to the unreleased section in HISTORY.rst?
| category: str | ||
| """The area the event belongs to, such as `auth`, `run` or `settings`, or the kind of object it changed.""" | ||
|
|
||
| action: AuditLogAction |
Collaborator
There was a problem hiding this comment.
Should an unknown action fail the whole listing? Same problem #86 just fixed for resource types
| class AuditLogClient(BaseClient): | ||
| """Audit log API methods. Mixed into `DataMasqueClient`.""" | ||
|
|
||
| def iter_audit_logs(self) -> Iterator[AuditLog]: |
Collaborator
There was a problem hiding this comment.
Worth taking a project filter? The audit log endpoint has accepted ?project= since 3.26.22
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
get_ai_detection_cache_size_bytes, which returns the size of the AI detection cache in bytes.clear_ai_detection_cache(unused_for_days=None), which deletes every cache entry, or only the entries no masking run has used inunused_for_daysdays. It returns anAiDetectionCacheClearResultwith the bytes freed and the size after the clear.list_audit_logs(limit=None)anditer_audit_logs, which return audit log entries newest first asAuditLogmodels. The newAuditLogActionenum typesaction.projectandproject_nameareNoneon servers older than 3.26.20./api/ai-detection-cache/endpoints.ui-testing uses raw
make_requestcalls for the cache size and the audit log today (datamasque/ui-testing!293). After 1.6.0 is released, ui-testing moves to these methods.