Restructure as package, introduce an API #6

Open
opened 2026-02-25 11:59:46 +00:00 by msz · 0 comments
Member

I am thinking of restructuring the project from a mostly flat collection of scripts into a library (see uv definitions), and making it more similar to query research information from PsyInf's datalink.

Code would be split into:

  • filters (same as currently)
  • renderers (current top-level script)
  • utils (a place to factor out duplicated code)

Changing to a project layout would allow internal import of utils from both filters and renderers.

A main.py script could use click command groups to define the following API (ppp being the main command):

  • ppp filter [filter name] [filter args and opts]
  • ppp render [renderer name] [renderer args and opts]
I am thinking of restructuring the project from a mostly flat collection of scripts into a library (see [uv definitions](https://docs.astral.sh/uv/concepts/projects/init/#creating-a-minimal-project)), and making it more similar to [query research information](https://hub.psychoinformatics.de/orinoco/query-research-information) from PsyInf's datalink. Code would be split into: - `filters` (same as currently) - `renderers` (current top-level script) - `utils` (a place to factor out duplicated code) Changing to a project layout would allow internal import of utils from both filters and renderers. A `main.py` script could use [click command groups](https://click.palletsprojects.com/en/stable/commands-and-groups/#id5) to define the following API (`ppp` being the main command): - `ppp filter [filter name] [filter args and opts]` - `ppp render [renderer name] [renderer args and opts]`
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
q02/pool-publication-page#6
No description provided.