Package: threedi-settings
threedi-settingsConvert legacy model settings (V2) files to API V3 resources.InstallationTo get all functionalities this package as to offer, install with all extras$ pip install threedi-settings[cmd, api]UsageBefore you hit it off make sure you have the following environment variables set correctlyAPI_HOST=https://api.3di.live/v3.0# no trailing slashAPI_USERNAME=<yournamegoeshere>API_PASSWORD=<yourpasswordgoeshere>Ths will give you access to the command line interface that let's you convert 3Di model settings to
3Di API resources. There are two flavors. Either use a model*.inifile as input or the*.sqlitefile.Both commands requires aSIMULATION_IDargument as settings can only be defined
on a per simulation basis in the API. That gives you much more flexibility to experiment
with different configurations.Export from SQLITE database fileTo use the settings that are stored in a 3Di model sqlite database file use the following command. Please note, that
all aggregation settings stored in the database also will be exported to the API V3. You can suppress this behaviour
through the--no-aggregationsflag.export-settingsexport-from-sqlite--help
Usage:export-settingsexport-from-sqlite[OPTIONS]SIMULATION_IDSQLITE_FILE[SETTINGS_ROW]"Create API V3 settings resources from legacy model sqlite file"Arguments:SIMULATION_ID[required]SQLITE_FILESQLITEmodelfile.[required][SETTINGS_ROW]Specifytherowidofthev2_global_settingsentryyouwanttoexport.[default:1]Options:--aggregations/--no-aggregationsIfthe'--no-aggregations'optionisnotexplicitlyset,theaggregationsettingsfoundinthesqlitefilewillbeexported,too.[default:True]--helpShowthismessageandexit.If you are unsure about theSETTINGS_ROWargument you can quickly list the existing rows in the database by runningglobal-settingsls--help
Usage:global-settingsls[OPTIONS]SQLITE_FILEShowsidandnameofexistingglobalsettingsentries

Arguments:SQLITE_FILESQLITEmodelfile.[required]Options:--helpShowthismessageandexit.Export from ini (and aggregation) fileIf you have access to the model ini file, and optionally to the corresponding aggregation file, you can useexport-settingsexport-from-ini--help
Usage:export-settingsexport-from-ini[OPTIONS]SIMULATION_IDINI_FILE[AGGREGATION_FILE]"Create API V3 settings resources from legacy model ini file"Arguments:SIMULATION_ID[required]INI_FILELegacymodelsettingsinifile.[required][AGGREGATION_FILE]Legacymodelaggregationsettingsfile.

Options:--helpShowthismessageandexit.Overview of the API V3 simulation settings fieldsMost of the setting fields have been renamed in the API V3. To get an overview
of all available fields, their descriptions, suitable defaults etc use thedescribe-simulation-settingscommand.describe-simulation-settings--help
Usage:describe-simulation-settings[OPTIONS]ShowsallAPIV3simulationsettingsfields,helptextsonhowtousethem,suitabledefaults,typesetc.

Options:--helpShowthismessageandexit.Internal UsageThis package is also used to retrieve simulation settings resources from the API to further
convert them to an internal format that the 3Di calculation core is able to read and process.The package therefore can be installed without the extras mentioned above or a
single extra likeapiwhich will give you thethreedi-api-clientrequirement
and therefore access to the http module.Free software: MIT licenseDocumentation:https://threedi-settings.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.6 (2021-05-05)Renamed general settings to physical settings0.0.5 (2021-04-22)Update readme with required env variables.Fix for export edge cases.0.0.4 (2021-04-16)Added export from sqlite file command.Added command that lists the global settings entries of a given sqlite file.Added command that shows a description of the simulation settings API V3 fields.0.0.3 (2021-04-07)Unit tests.0.0.2 (2021-03-26)Setup proper package incl readme.Docstrings and code organisation.0.0.1 (2021-03-18)First release on PyPI.