Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identification, tag normalization and private_fields API enhancements released #113

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

mjanez
Copy link
Owner

@mjanez mjanez commented Nov 13, 2024

This pull request includes several updates to the ckanext/schemingdcat extension, focusing on new features, bug fixes, and code improvements. The main changes involve the addition of private fields handling in the API, new CSS styles, and updates to the configuration and validation patterns.

New Features:

  • ckanext/schemingdcat/config_declaration.yml: Added API settings for private fields and roles that can access them.
  • ckanext/schemingdcat/schemas/default_presets.json: Introduced new presets for tag normalization and required multiple text fields.

Bug Fixes:

Code Improvements:

  • ckanext/schemingdcat/package_controller.py: Enhanced search and view methods to remove private fields from API responses and improved the handling of private fields in search parameters.
  • ckanext/schemingdcat/utils.py: Added a utility function remove_private_keys to clean private fields from data dictionaries.

Styling Updates:

  • ckanext/schemingdcat/assets/css/schemingdcat.css: Added a new CSS variable for grey color and a .text-muted class for muted text styling.

Configuration and Validation:

  • ckanext/schemingdcat/config/__init__.py, ckanext/schemingdcat/config/tools.py: Added a new regular expression pattern TAGS_NORMALIZE_PATTERN for tag normalization.
  • ckanext/schemingdcat/validators.py: Imported TAGS_NORMALIZE_PATTERN for use in validation.

…nfig options

- Improve before_dataset_search and after_dataset_search to avoid exposing private_fields
- Improve dataset_show to clean up private_fields
- Add options to config_declaration to configure private_fields and roles that have access to private_fields.
- Improve docs.
@mjanez mjanez added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Nov 13, 2024
@mjanez mjanez added this to the v4.2.2 milestone Nov 13, 2024
@mjanez mjanez self-assigned this Nov 13, 2024
@mjanez mjanez merged commit 6d029d2 into main Nov 13, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant