Skip to content

Conversation

@davidhassell
Copy link
Contributor

Fixes #356

Essentially targets uses of uritools.urisplit and uritools.uricompose to account for URI fragments. Makes use of cfdm.abspath and cfdm.dirname where possible, as these now deal with it appropriately.

@davidhassell davidhassell added this to the NEXTVERSION milestone Oct 1, 2025
@davidhassell davidhassell added bug Something isn't working dataset read Relating to reading datasets labels Oct 1, 2025
Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Sensible fix that works well from local testing (including downstream in cf-python), but I would like a dedicated test added to cover it - should be as simple as reading in an existing field (list), writing it out with a name with 2 or 3 hash characters in and then checking it re-reads - unless there's some reason that complicates like temp files not liking the '#' in the name?

(I'm guessing having a '#' in the name of a dataset does happen in practice - else I'd be tempted to argue the users should rename such files to have standard characters only rather than us fixing a weird edge case that fails for good reason... 😃 )

@davidhassell
Copy link
Contributor Author

Test added: c5cb747

Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test. It seems sufficiently robust, so all good now - please merge.

@davidhassell davidhassell merged commit ab117f3 into NCAS-CMS:main Oct 8, 2025
@davidhassell davidhassell deleted the read-glob branch October 8, 2025 12:33
@davidhassell
Copy link
Contributor Author

(I'm guessing having a '#' in the name of a dataset does happen in practice - else I'd be tempted to argue the users should rename such files to have standard characters only rather than us fixing a weird edge case that fails for good reason... 😃 )

Unfortunately so. Charlotte's use case was from FAMOUS model output.

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

Labels

bug Something isn't working dataset read Relating to reading datasets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cfdm.read fails to read a file with # characters in the file name

2 participants