Skip to content

Release 0.9 - #31

Open
domdinicola wants to merge 37 commits into
masterfrom
develop
Open

domdinicola wants to merge 37 commits into
masterfrom
develop

Conversation

@domdinicola

Copy link
Copy Markdown
Contributor

Update CHANGES file for 0.9 release with all changes from 0.8.x tags

domdinicola and others added 30 commits November 3, 2025 00:23
* Alter "all_fields" methods of "FieldsetAdmin"

Check if name is being duplicated for the fields within a given fieldset, raise exception if it is the case

* Add tests for validation changes of field names

---------

Co-authored-by: patsatsia <giorgi.patsatsia@valor-software.com>
…ess in DataChecker

- Introduced IdentityField to mark a record's identity, ensuring only one instance per DataChecker.
- Updated DataCheckerFieldsetFormset to validate the uniqueness of IdentityField across datasets.
- Registered IdentityField in FieldRegistry for proper integration.
- Adjusted ValidatorMixin to recognize IdentityField as the primary key field.
- Created a new migration to add IdentityField, ensuring safe and idempotent execution with create_default_fields.
- Updated ValidatorMixin to auto-detect IdentityField as primary key only if not explicitly set.
- Adjusted test to reflect the increase in processed objects due to the new IdentityField addition.
…ment

- Implemented tests for ValidatableFileValidator to ensure it correctly accepts and rejects file formats based on extensions.
- Added tests to validate the enforcement of a single IdentityField across multiple fieldsets in DataChecker.
- Enhanced existing tests in test_base.py to verify IdentityField behavior, including auto-detection as primary key and handling of duplicates.
- Added blank lines for better readability and separation of test sections in test_admin_checker.py.
- Ensured consistent formatting across test functions for improved clarity.
- Introduced a fixture to create a DataChecker with two IdentityField members for testing.
- Added a test to verify that a formset row marked for deletion is correctly skipped during validation, preventing errors related to multiple IdentityFields.
- Ensured that the test checks for the absence of the 'Only one IdentityField is allowed' error when a member is deleted.
#25)

* 298132: Add IdentityField for collision detection and enforce uniqueness in DataChecker

- Introduced IdentityField to mark a record's identity, ensuring only one instance per DataChecker.
- Updated DataCheckerFieldsetFormset to validate the uniqueness of IdentityField across datasets.
- Registered IdentityField in FieldRegistry for proper integration.
- Adjusted ValidatorMixin to recognize IdentityField as the primary key field.

* Add migration to introduce IdentityField in FieldDefinition catalogue

- Created a new migration to add IdentityField, ensuring safe and idempotent execution with create_default_fields.
- Updated ValidatorMixin to auto-detect IdentityField as primary key only if not explicitly set.
- Adjusted test to reflect the increase in processed objects due to the new IdentityField addition.

* Add unit tests for ValidatableFileValidator and IdentityField enforcement

- Implemented tests for ValidatableFileValidator to ensure it correctly accepts and rejects file formats based on extensions.
- Added tests to validate the enforcement of a single IdentityField across multiple fieldsets in DataChecker.
- Enhanced existing tests in test_base.py to verify IdentityField behavior, including auto-detection as primary key and handling of duplicates.

* Refactor test_admin_checker.py to improve test organization

- Added blank lines for better readability and separation of test sections in test_admin_checker.py.
- Ensured consistent formatting across test functions for improved clarity.

* Add test for DataCheckerFieldsetFormset to handle deleted inline members

- Introduced a fixture to create a DataChecker with two IdentityField members for testing.
- Added a test to verify that a formset row marked for deletion is correctly skipped during validation, preventing errors related to multiple IdentityFields.
- Ensured that the test checks for the absence of the 'Only one IdentityField is allowed' error when a member is deleted.

---------

Co-authored-by: ArsenPidhoretskyi <arsen.pidhoretskyi@valor.com>
Co-authored-by: Domenico <ddinicola@unicef.org>
* fix CI venv cache: key by resolved Python patch, upgrade venv, run pip/pytest via venv python.

* add fieldset cross-field JavaSript validation with error handling

* move fieldset validation to the FieldSet class

* merged fieldset_rules_validation implementation into the Fieldset model

---------

Co-authored-by: Domenico <ddinicola@unicef.org>
- Updated IdentityField to be read-only, preventing changes through normal form editing.
- Modified validation to ensure uniqueness of values during import, reinforcing data integrity.
…-support

298132: Colission detection support adjustments
- Introduced `is_file` property in `FlexField` to identify binary/file data fields.
- Added `get_file_field_names` method in `DataChecker` to retrieve names of fields that hold file data.
- Implemented `split_data` method in `DataChecker` to separate text fields from file fields in a given data mapping.
- Enhanced tests to verify the new functionality for file and text field handling.
- Moved the import of `forms` in `flexfield.py` to the top for better readability.
- Removed redundant import of `field_registry` in the test model file to streamline the code.
- Introduced a new test to verify that the `is_file` property of `FlexField` returns False when the field cannot be built due to a `FlexFieldCreationError`.
- Utilized mocking to simulate the error condition in the test case.
- Consolidated import statements by moving `patch` and `FlexFieldCreationError` to the top of the file for improved clarity.
- Removed duplicate imports from the `test_flexfield_is_file_false_when_field_cannot_be_built` test function to streamline the code.
- Updated the `is_file` property in `FlexField` to directly check the field type using `issubclass`, enhancing its reliability by removing the dependency on the `get_field` method.
- Removed the test case that handled `FlexFieldCreationError`, as the new implementation no longer requires it.
arsen-vs and others added 5 commits July 9, 2026 16:52
…-out-of-flex

320213: Add file handling capabilities to DataChecker and FlexField
#30)

* Enhance DataChecker's split_data method to accept optional file field names

- Updated the `split_data` method to allow passing a collection of file field names, improving flexibility in data separation.
- Added a memoized method `get_file_field_names` to optimize retrieval of file field names.
- Introduced a new test to verify that `split_data` correctly uses provided file field names without calling `get_file_field_names`.

* Update pyproject.toml to correctly define dynamic versioning

- Removed the incorrect dynamic version declaration from the project section.
- Added the dynamic version declaration back to the appropriate location in the file.

* Refactor test for DataChecker's split_data method to use context manager for mocking

- Updated the test for `split_data` to utilize `unittest.mock.patch` as a context manager, improving readability and ensuring proper cleanup of the mock.
- Removed the dependency on the `mocker` fixture for this test, streamlining the test setup.

---------

Co-authored-by: ArsenPidhoretskyi <arsen.pidhoretskyi@valor.com>
domdinicola and others added 2 commits August 17, 2026 12:39
* Extract the file-field abstraction into the library
Promotes the generic parts of the flex-file offload from Country
Workspace so that consumers share one field type and one reference
format instead of each redefining them.

* Use fixed field type and attrs in migration 0018 and make Pillow a regular dependency

This branch had an error being deployed

1 failed (outdated) deployment
release — efa9a637 Deployed Aug 17, 2026 by domdinicola via release #8
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.

5 participants