Skip to main content

invenio-typing-stubs

This is a package that provides typing support for the InvenioRDM source base. It is intended as a temporary solution until InvenioRDM itself provides typing support.

As such, it is a collection of type stubs for the InvenioRDM source base, as well as some utility functions to help with typing.

It must not contain any runtime code, it is intended to be used only for type checking.

Warning

These stubs were generated mostly automatically and only some have been manually checked. They will surely contain some errors. Please report any issues you find.

Usage

Please install the package directly from github:

pip install git+https://github.com/oarepo/invenio-typing-stubs.git

If you add the dependency to your pyproject.toml built with hatchling, do it like:

[project.optional-dependencies]
dev = [
    "invenio-typing-stubs @ git+https://github.com/oarepo/invenio-typing-stubs.git",
]

How it was generated

Automatic generation

Copilot with GPT-5 was used to generate the stubs. The following prompt was used:

There is a agent_helper command that will give you work. Please call the command as 
`.venv/bin/python agent_helper.py invenio_communities`. 

The output of the command are the instructions that you should do. 
Read them carefully and execute them. 

After that, continue calling the agent and processing the instructions 
until it will tell you that all work has been done.

Manual checks

Some manual checks were done to ensure the stubs are correct. Systemfields were patched manually to ensure correct typing.

Problems

Typing for SQL Alchemy mostly does not work with invenio_db.

Final checks

Checked with

mypy --check-untyped-defs --ignore-missing-imports invenio_records_resources-stubs/

Metadata

Release files for oarepo-invenio-typing-stubs 0.1.40

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oarepo-invenio-typing-stubs 0.1.40
File Size Uploaded
oarepo_invenio_typing_stubs-0.1.40.tar.gz 165.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oarepo-invenio-typing-stubs 0.1.40
File Interpreter ABI Platform
oarepo_invenio_typing_stubs-0.1.40-py3-none-any.whl Python 3 none any Details

Total release size: 595.8 kB

Release files / oarepo_invenio_typing_stubs-0.1.40.tar.gz

Download URL oarepo_invenio_typing_stubs-0.1.40.tar.gz
Size 165.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d2ada3f61531b07624ccc5510641194b03fc184662766674d4df02235611755c
BLAKE2b-256 checksum
How to use checksums
a1f1a3c99b6af660795a215cc880cff7b50c5c5db982dd5b8fff86dbb5c13f17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / oarepo_invenio_typing_stubs-0.1.40-py3-none-any.whl

Download URL oarepo_invenio_typing_stubs-0.1.40-py3-none-any.whl
Size 430.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
723fcc77aa00abe21bc91f190814cc6c74fe58b9e4d356f7cde386f8e1f9301f
BLAKE2b-256 checksum
How to use checksums
c8001c2c48bb45ff3704b7476f49ec1b4e54f70fb930bafc56ec7c0bc5ee4e2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page