Skip to main content

IMAS Data Dictionaries converted to Python Dataclass used in the IMAS-GK/IDSPy project

Project description

IDSPy_Dictionaries

IMAS Data Dictionaries converted to Python Dataclass used in the IDSPy suite.

Prerequisites

To use this script, you need to have Python 3.9 or later installed. You can download Python from https://www.python.org/downloads/. Please note that Python at least 3.10 is recommended.

Installation

To install the necessary packages, run the following command:

python -m pip install idspy_dictionaries

Usage

To load the desired IDS :

from idspy_dictionaries import ids_gyrokinetics_local # or any other available IDS
new_ids = ids_gyrokinetics_local.Gyrokinetics()

FAQ

Q: What is the minimum required version of Python to run this script?
A: The recommended version of Python is 3.10. It can be used with Python >= 3.9

but there is no support in that case.

Q: Can I add new members to the dataclasses?

A: This option is not possible to be sure that the dataclasses follow the IMAS conventions.

Q: Is the package compatible with pydantic and/or attrs?

A: Short answer, no ;)

Q: I would really like to use python <3.9 is it really impossible?
A: IDSPy_dictionaries used mainly python dataclasses and the slot property which had been added in python 3.10 only.

The main reason to use __slots__ is to avoid addition of members in the IDS and remains fully compliant with IMAS. A version of the package had been published “as it is” without the slots dependency but need at least python 3.9. The way dataclasses are generated with the associated fields, at the opposite, is not compatible at all with python 3.8.

Q: Can I load all the dictionaries at once?

A: For performances reasons, it’s not possible right now.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idspy_dictionaries-34200.3.0.tar.gz (436.6 kB view details)

Uploaded Source

Built Distribution

idspy_dictionaries-34200.3.0-py3-none-any.whl (561.1 kB view details)

Uploaded Python 3

File details

Details for the file idspy_dictionaries-34200.3.0.tar.gz.

File metadata

File hashes

Hashes for idspy_dictionaries-34200.3.0.tar.gz
Algorithm Hash digest
SHA256 46c91f404f2caee70372bc7bd3c1eb01e929ec9a09862e55bdb1e7e722c296a4
MD5 12691d8a91b6727fff2fbcfe70d4e03f
BLAKE2b-256 75b6c8f21f699957e0a650308baf50ab825e4fd23ad2b194a2e5e440f8b1d75f

See more details on using hashes here.

File details

Details for the file idspy_dictionaries-34200.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for idspy_dictionaries-34200.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 908d82ddf0277b88bdd78010e194c4b227345e515166c7a9f379aa99a51daeb5
MD5 50ae8e80841f29d5e176709efe510af6
BLAKE2b-256 aee03847d6e036da93b22a05980292a63fbd92a99513fd73f6fbd7e046b1130f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page