Skip to main content

GO-3-data-model

PyPI

Pydantic models for the GO Competition Challenge 3 json format. Support for loading, validation, editing, saving.

Should often be used in conjunction with C3DataUtilities.

Install

pip install GO-3-data-model

Use

To load GO-3 input data files:

from datamodel.input.data import InputDataFile
problem_data = InputDataFile.load(problem_data_file_name)

If no errors are raised, then validation succeeded and problem_data is a Pydantic model containing the problem data. All fields may be edited, and the resulting modified model can be saved:

problem_data.save(filename)

The output data structure is encoded in datamodel.input.data.OutputDataFile, and json schemas are available in datamodel/schemas.

Developer Instructions

If the json format changes, please:

  1. Create a new folder named YYYYMMDD (with today's current date) under GO-3-data-model/input
  2. Copy and paste the .tex files of the new version into the folder
  3. Commit and push

If you want to work on automatically generating the Pydantic model, you'll first want to create a conda/Python environment and install this package in developer mode:

conda activate YOUR_ENV_NAME
cd GO-3-data-model
pip install -e .

Then you'll want to modify code in GO-3-data-model/datamodel/create.py and run it from the command line as in:

cd GO-3-data-model
python datamodel/create.py 20220128

If any of the files prefixed with __ change, you might need to hand-port those changes into the files with the same names but not prefixed with __. (The latter sometimes contain hand-written validators and therefore are not overwritten by create.py.)

Release files for GO-3-data-model 1.0.2

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

Source distribution (sdist)

Source distribution for GO-3-data-model 1.0.2
File Size Uploaded
GO-3-data-model-1.0.2.tar.gz 22.2 kB Details

Release files / GO-3-data-model-1.0.2.tar.gz

Download URL GO-3-data-model-1.0.2.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e36370302a6a19ecc8e1943c2f8ae2d73e24cbd99dc472232579ec0e80be4737
BLAKE2b-256 checksum
How to use checksums
9d0e2fa2956715935ec1f3e06f684289ba3a206379c4aa4396d287bcaa90fa45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.0

1 release file

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