datagen-utilities-url-handler 1.0.1
Datagen general purpose dg_utilities
Requires Python: >=3.7

# About

**datagen-utilities** is a Python library for exposing different fundamental and infrastructure utilities to datagen code.

### Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install **datagen-utilities** library.
```bash
pip install -i http://system1.datagen.tech:8888/ datagen-utilities --trusted-host system1.datagen.tech
```

### Using datagen-utilities in simulated reality:
datagen-utilities was uploaded to our own [Pypi server](http://system1.datagen.tech:8888/), and was added to the requirements.txt file of simulated reality.  
That means that when building simulated-reality docker-file the library will be installed, and the only difference in using it is that the module name is switched to dg_utilities.   
For example: instead of using ```from utilities import logging``` we will be using ```from dg_utilities import logging``` 

### Modifying datagen-utilities

#### The flow of adding changes to the library is as follows
* Clone the datagen-utilities repository to your local laptop (required only once).  
* Create a new branch.  
* Make the changes you want on the branch and commit-push the changes.  
* Create a pull request in bitbucket &#8594; this will trigger a new tests pipeline for your branch on bitbucket (You can view datagen-utilities pipelines [here](https://bitbucket.org/datagen-tech/datagen-utilities/addon/pipelines/home#!/results/page/1)).   
* After you passed the tests and your peer's reviews, you can merge the branch &#8594; this will trigger a new deployment pipeline for the master branch, which uploads a new version to our [Pypi server](http://system1.datagen.tech:8888/).  

#### Pipelines notes
* The pipelines are configured inside the repository in a file called '[bitbucket-pipelines.yml](https://bitbucket.org/datagen-tech/datagen-utilities/src/master/bitbucket-pipelines.yml)'.
* The deployment pipeline automatically updates the package version (currently it updates it to 0.0.<pipeline-serial-number>, we hope to change it soon).
* To avoid pipelines when making changes you can add '[skip ci]' to the HEAD commit message. This can be used to avoid deploying when merging to master.
* From atlassian support:
```bash
If you don't want to run a pipeline on a commit that would normally trigger one, 
you can include [skip ci] or [ci skip] anywhere in your commit message of the HEAD commit.
Any commits that include [skip ci] or [ci skip] in the message are ignored by Pipelines.
```

### Extra notes:
* If you need to add/remove some dependency (or change dependency version) please change it both in requirements.txt and in setup.cfg (only the setup.cfg effects the package, requirements.txt is used for development).
* Datagen-utilities was also added to the services requirements.txt files.  
* After making changes to datagen-utilities remember to update the version in simulated-realty requirements file in order to use these changes.
* Because the library is on our private Pypi server, we added flags to the requirements.txt files which allows installing the requirements the 'regular pip way':  
```bash
pip install -r <path-to-requirements.txt>
```