Metadata-Version: 2.4
Name: gimodules
Version: 0.3.1
Summary: DEPRECATED (EOL): Use pygidata. Python package providing an interface to the Gantner Instruments Cloud API
Author: Gantner Instruments GmbH
Author-email: 
Keywords: python
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.10,<3.15
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi>=2022.6.15
Requires-Dist: ipython<9,>=8.12.0; python_version < "3.11"
Requires-Dist: ipython>=9.0.0; python_version >= "3.11"
Requires-Dist: ipywidgets>=7.7
Requires-Dist: matplotlib>=3.5
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.4
Requires-Dist: pymysql>=1.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pytz>=2024.1
Requires-Dist: requests>=2.31
Requires-Dist: seaborn>=0.11.2
Requires-Dist: sqlalchemy>=1.4
Requires-Dist: websocket-client>=1.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


# gimodules-python



> [!WARNING]

> **End of Life (EOL):** This package is deprecated and no longer actively developed.

> Please migrate to **`pygidata`**, which is the maintained successor.



## Deprecation Notice



- `gimodules` is in maintenance-only / end-of-life state.

- New features will be added to `pygidata` only.

- For new projects, use `pygidata` directly.



# Usage



### Install from PyPi



```bash 

pip install gimodules

```



Import module in python script and call functions.



A detailed description of the package and other APIs can be found in the Gantner Documentation.



```python

from gimodules.cloudconnect.cloud_request import CloudRequest



cloud = CloudRequest()

cloud.login(url='https://example.gi-cloud.io', access_token='TOKEN') # Create a token under Tools -> Monitor

cloud.get_all_stream_metadata()

```





# Development



### Information on how to manually distribute this package can be found here



https://packaging.python.org/en/latest/tutorials/packaging-projects/



**Hint:** If you are debugging the source code with a jupyter notebook, run this code in the `first cell` to enable autoreloading source code changes.



```bash

%load_ext autoreload

%autoreload 2

```



## Distribute with CI / CD

Edit setup.py version number and create a release.

-> Creating a release will trigger the workflow to push the package to PyPi



## Tests



run tests locally:



```bash

pipenv run test -v

```



or 



```bash

pytest

```



## Requirements



When starting to develop you can install the requirements with:



```bash

pip install -r requirements.txt

```



When you add new components and the requirements change, 

you can find out what packages are needed by the project and create new requirements:



```bash

pipreqs .

```



To create project all current packages installed in your venv for requirements automatically:



```bash

pip3 freeze > requirements.txt

```

---



**_NOTE:_** Remove the old gimodules version from requirements.txt before pushing (dependency conflict).



---



## Documentation



The documentation is being built as extern script in the GI.Sphinx repository.



The documentation consists of partially generated content. 

To **generate .rst files** from the code package, run the following command from the root directory of the project:



```bash

sphinx-apidoc -o docs/source/ gimodules

```

You need pandoc installed on the system itself first to build:



```bash

sudo apt install pandoc

```



Then, to **build the documentation**, run the following commands:



```bash

cd docs

sudo apt update

pip install -r requirements.txt

make html

```



## Linting / Type hints



This project follows the codestyle PEP8 and uses the linter flake8 (with line length = 100).



You can format and check the code using lint.sh:

    

```bash

./lint.sh [directory/]

```



Type hints are highly recommended.

Type hints in Python specify the expected data types of variables,

function arguments, and return values, improving code readability,

catching errors early, and aiding in IDE autocompletion.



To include type hints in the check:



```bash

mpypy=true ./lint.sh [directory])

```
