Skip to content

[#558] iRODSAccess: Handle iRODSCollection and iRODSDataObject #595

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

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

alanking
Copy link
Contributor

Addresses #558 (I think?)

The new tests failed as expected before fix and then passed as expected after fix. Also confirmed that irods.test.access_test.TestAccess passes.

I didn't bother testing / handling other types because I'm not sure how deep we want to go here. Happy to discuss this.

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.

Do we want to handle the case where the input args do not have the expected str type?

@alanking
Copy link
Contributor Author

I read the issue again and in order to fully address the problem we will need to handle the non-str-like types. This is being done in the latest two unsquashed commits.

@alanking alanking requested a review from d-w-moore July 30, 2024 17:13
Copy link
Collaborator

@d-w-moore d-w-moore left a comment

Choose a reason for hiding this comment

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

Seems good, just pointed out where one line could be more succinct.

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 to me.

Squash to taste.

@korydraughn
Copy link
Contributor

Do the tests pass?

@alanking
Copy link
Contributor Author

I tried testing in an Ubuntu 22.04 container (python version 3.10.12) by running the tests as described in the irods/test/README.md file. I used iRODS 4.3.2 as released and a build of iRODS near the tip of 4-3-stable.

For both I ran into this: #566 and this: #597

I tried again with an iRODS server using Postgres and only experienced the issues in #566

Then, I applied my changes and ran the test suite again and just saw the issues in #566 again.

So... all told, I think the tests are passing. I did not try with python 2, or other iRODS versions, or other OS flavors / versions.

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.

Agreed. Let's get this merged.

Pound it.

alanking added 2 commits July 30, 2024 16:44
This change enables the iRODSAccess constructor to handle iRODSCollection and
iRODSDataObject types in addition to str-like types for the 'path' parameter.
A TypeError is now raised when an unsupported type is used for this parameter.
@alanking
Copy link
Contributor Author

Neat. #'d, mergin.

@alanking alanking merged commit 858bac8 into irods:main Jul 30, 2024
@alanking alanking deleted the 558.m branch July 30, 2024 20:45
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.

3 participants