Metadata-Version: 2.1
Name: stellaspark-utils
Version: 1.6
Summary: A collection of python utilities for StellaSpark Nexus Digital Twin
Home-page: https://github.com/StellaSpark/stellaspark_utils
Download-URL: https://github.com/StellaSpark/stellaspark_utils/archive/v1.6.tar.gz
Author: StellaSpark
Author-email: support@stellaspark.com
Maintainer: StellaSpark
Maintainer-email: support@stellaspark.com
License: MIT
Keywords: stellaspark,nexus,utils,calculation,python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: test
License-File: LICENSE

[Nexus Digital Twin]:https://www.stellaspark.com/ 
[Pypi account]:https://pypi.org/account/register/


### Description
A collection of python utilities for StellaSpark [Nexus Digital Twin] technology.


### Usage
```
from stellaspark_utils.db import get_indexes, DatabaseManager
from stellaspark_utils.text import parse_time_placeholders
```

### Development

###### Create an environment:
```
cd <project_root>
set PIPENV_VENV_IN_PROJECT=1 && pipenv --python 3.7   # Create a .venv folder in current dir so it's easy to use/maintain by your idea
pipenv shell
pip install -r requirements.txt 
pip install -r requirements_dev.txt
```

###### Autoformat code:
```
cd <project_root>
pipenv shell
black .     # Make the code look nice
isort .     # Sort the import statements
flake8      # Validate the code syntax
```

###### Prepare release
1. Create a [Pypi account] and after registering, make sure your account has a pypi token
2. Update version in setup.py
3. Update the CHANGES.rst with a change message and release date of today
4. Optionally, autoformat code (see above)
5. Push changes to GitHub (preferably in a branch 'release_<x>_<y>')

###### Release manually
```
cd <project_root>
rmdir /s /q "dist"                                      # Remove dist dir (to avoid uploading old distributions)                       
pipenv shell                                            # Activate pipenv environnment (see 'Create an environment' above)
python setup.py sdist                                   # Create distribution (with a '.tar.gz' in it)
twine check dist/*                                      # Validate all distibutions in stellaspark_utils/dist
twine upload dist/*                                     # Upload distribution to pypi.org
# You will be prompted for a username and password: 
# - for the username, use __token__ (yes literally '__token__')
# - for the password, use the pypi token value, including the 'pypi-' prefix
```
