Skip to main content

Modules and subpackages used in various GAMS5 related projects

Project description

gamslib

Gamslib is a collection of GAMS related modules and packages, which are used in multiple other packages.

Installation

gamslib is available on pypi.org and can be installed via pip:

pip install gamslib

Usage

As gamslib is a library, it can only we used with other code.

The main purpose is to make code reusable in other GAMS5 projects and to have a unique way of doing things. If you are not working on GAMS5 reated code (which is very likely), this library will be useless for you.

Currently these subpackages are available (more to come):

objectcsv

Handle object and datastream metadata in object csv files.

When creating bags for GAMS, we provide some metadata in csv files (which are not part of the bag, btw).

The objectcsv package provides tools to handle this metadata.

  • The ObjectCSV class represents the object and datastream csv data for a single object. It is created by providing the path to the object directory.
  • The manage_csv module can be used to collect csv data from all objects into a single file, which makes editing the data more efficient. It also has a function to update the csv files in the object directories based on the collected data.
  • The xlsx module can be used to convert the csv files to xlsx files and vice versa. This is useful for editing the data in a spreadsheet without the hassles of importing and exporting the csv files, which led to encoding problems in the past.

projectconfiguration

This package contains a central class Configuration that represents the project configuration. To create this object, the function load_configuration(OBJECT_ROOT, [PATH_TO_TOML_FILE]) should be used.

The function tries to find the project configuration file, validates its content, and creates the central Configuration object with all sub-objects (Each TOML inline table is provided as its own sub-object). These sub-objects are currently:

  • general
  • metadata

A basic configuration file can be generated via the create_condiguration() function.

Contributing

The Github repository is ment to be a read only mirror of the work repository hosted on our institutional private Github server. You can use the bug tracker on Github, but everything else should happen in the Zimlab Github repo.

License

MIT

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

gamslib-0.5.0.tar.gz (343.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gamslib-0.5.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file gamslib-0.5.0.tar.gz.

File metadata

  • Download URL: gamslib-0.5.0.tar.gz
  • Upload date:
  • Size: 343.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.26

File hashes

Hashes for gamslib-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ee766158ea7571854fdbfa5c90225e0aad51545331a48ac9181a2e6786047c82
MD5 a65501e030f8cc3693c365d710c162cf
BLAKE2b-256 f8de157f4d28d61c4ec846015d7715e9d6dc524de817fb26cf6edbe265953edc

See more details on using hashes here.

File details

Details for the file gamslib-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: gamslib-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.26

File hashes

Hashes for gamslib-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8ca2a0c7ab276ef7a02bb74d8a7e4492920aeee529865c6e3741f72b83e8b09
MD5 e918c3c78c62bd00771c4b0841f179f9
BLAKE2b-256 128401e3222ee4581cf1bf6a1be8fcfdb5a3d9484ae91c2106815709c54a8619

See more details on using hashes here.

Supported by

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