Skip to content

Conversation

@d-w-moore
Copy link
Collaborator

In other words, setting opt2 = val2 does not reset opt1 back to its default value.

Copy link
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Looks good overall.

@d-w-moore d-w-moore changed the title [_709] preserve options in chaining obj.metadata(opt1=val1)(opt2=val2) [#709] preserve options in chaining obj.metadata(opt1=val1)(opt2=val2) May 6, 2025
@d-w-moore d-w-moore marked this pull request as draft November 27, 2025 04:44
…val2)

In other words, setting opt2 = val2 does not reset opt1 back to its default value.

[_709] correct and streamline. _opts and __kw should be separate.

[_709] reasonable copy of _opts
[_768] add test

[_768] reasonable handling of _meta
Example: iRODSBinOrStringMeta allows storing arbitrary octet strings in metadata.

[_707] test of iRODSMeta subclass which stores bytestring value and/or unit

This required some more corrections and tweaks of the iRODSMeta_type handling.

[_707] iRODSMeta name could contain Unicode, ergo should not be included in translations

[_707] do remove properly
@d-w-moore d-w-moore force-pushed the 709.m branch 2 times, most recently from ef597fa to 087ded2 Compare November 29, 2025 03:24
@d-w-moore d-w-moore self-assigned this Nov 29, 2025
@d-w-moore
Copy link
Collaborator Author

Evidently it is still possible to fail here:

https://github.com/d-w-moore/python-irodsclient/blob/388ad3d858ebcc7be981d1c065a4dd57ffc066cf/irods/test/data_obj_test.py#L3317

The modify time turned out on this occasion to be one second later than the access time on a just-created replica open for write:


======================================================================
FAIL [0.216s]: test_access_time__issue_700 (data_obj_test.TestDataObjOps.test_access_time__issue_700)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/prc.rw/irods/test/data_obj_test.py", line 3317, in test_access_time__issue_700
    self.assertEqual(data.access_time, data.modify_time)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.datetime(2025, 11, 29, 4, 12, 23, tzinfo=datetime.timezone.utc) != datetime.datetime(2025, 11, 29, 4, 12, 24, tzinfo=datetime.timezone.utc)

----------------------------------------------------------------------
Ran 302 tests in 319.841s

FAILED (failures=1, skipped=16)

@korydraughn any ideas why this might occasionally happen?

@d-w-moore d-w-moore marked this pull request as ready for review November 29, 2025 04:31
@d-w-moore
Copy link
Collaborator Author

Squashed , ready for review.

all_relevant_avus = meta_coll.get_all(avu_name)
self.assertIn(new_avu, all_relevant_avus)

# these could be in a separate test. TODO - make issue regarding hash and sets of iRODSMeta
Copy link
Member

Choose a reason for hiding this comment

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

found a TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants