Skip to content

[ENH][SCHEMA] Use Universal Path Library for Schema Retrieval#2351

Draft
bendhouseart wants to merge 7 commits intomasterfrom
enh-allow-schema-loading-from-url
Draft

[ENH][SCHEMA] Use Universal Path Library for Schema Retrieval#2351
bendhouseart wants to merge 7 commits intomasterfrom
enh-allow-schema-loading-from-url

Conversation

@bendhouseart
Copy link
Collaborator

I had initially added this to a PR for pybids but it seems more appropriate here. I think this also plays a bit into the discussion at issue #965 in so far as python users are concerned.

Conversely, a user could make a request first to https://bids-specification.readthedocs.io/en/stable/schema.json then use schema.load_schema following that retrieval.

I don't know, maybe this is a solution in search of a problem and/or should be fleshed out to retrieve specific versions of the schema from bids-standard/bids-schema.

@bendhouseart bendhouseart changed the title [ENH][SCHEMA] Use Universal Path Library for Schema Retrival [ENH][SCHEMA] Use Universal Path Library for Schema Retrieval Feb 27, 2026
@bendhouseart
Copy link
Collaborator Author

Also, can we convert the build backend to not pdm? Uv does not like it.

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

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

I really don't want to do this. If anything, I want fewer dependencies for tools that want to use the schema. We allow users to use UPaths.

What problems are you having with pdm?

@bendhouseart
Copy link
Collaborator Author

I really don't want to do this. If anything, I want fewer dependencies for tools that want to use the schema. We allow users to use UPaths.

Okay does that mean I should kill this or switch it over to urllib to handle collecting the schema?

What problems are you having with pdm?

UV run was not behaving until I went and setup the environment for bst with pdm first.

@effigies
Copy link
Collaborator

Okay does that mean I should kill this or switch it over to urllib to handle collecting the schema?

I would prefer to kill it, myself. I don't think we should handle requests. Supporting PathLike/Traversable objects is enough to support UPaths constructed by another tool.

UV run was not behaving until I went and setup the environment for bst with pdm first.

Interesting. I only use uv (mainly uv sync), and not the pdm frontend. It's just a quite easy backend to write plugins for. If you want to rewrite in a different backend and get the same result, I'll have no objection.

@bendhouseart
Copy link
Collaborator Author

I would prefer to kill it, myself. I don't think we should handle requests. Supporting PathLike/Traversable objects is enough to support UPaths constructed by another tool.

Okay, sounds good, it's straight forward enough to GET then load on one's own.

@bendhouseart
Copy link
Collaborator Author

Interesting. I only use uv (mainly uv sync), and not the pdm frontend. It's just a quite easy backend to write plugins for. If you want to rewrite in a different backend and get the same result, I'll have no objection.

Yeah I think it's a me uv/pdm/brew thing, but I kept getting invalid/unavailable backend when I was running uv run pytest... will make a smaller PR when I get the chance next week.

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.

2 participants