TNO Intern

Commit 6d9d28c5 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

adding information on how to install the package

parent 58a8abb5
Loading
Loading
Loading
Loading
+36 −4
Original line number Diff line number Diff line
@@ -5,15 +5,47 @@ binding.

It uses xarray (https://docs.xarray.dev/en/stable/index.html) Datasets as input to the simulation and can be combined with the pygridsio package (https://pypi.org/project/pygridsio/) to read in and process 2D rasters
   
### Install via pip from GitLab
## Installation for Usage

To install `pyThermoGIS` into your own project directly from GitLab, run:
### Install from the TNO GitLab

To install `pyThermoGIS` from the GitLab repository for now; authentication is required. Follow these steps:

### 1. Create a Personal Access Token (PAT)

- Log in to GitLab.
- Navigate to **Preferences > Access Tokens**.
- Create a new token with the **read_api** and **read_package_registry** scopes.
- Copy the token and store it securely, as it will not be visible again.

### 2. Set Up Authentication with `.pypirc`

Create a `.pypirc` file in your home directory (`~/.pypirc` on Linux/macOS or `%USERPROFILE%\.pypirc` on Windows) with the following content:

```ini
[gitlab]
repository = https://ci.tno.nl/gitlab/api/v4/projects/18271/packages/pypi
username = __token__
password = <your_personal_token>
```

Replace `<your personal access token>` with your actual GitLab PAT. Ensure the token has the necessary permissions to access the repository.

### 3. Install the Package

Once the `.pypirc` file is set up, install `pyThermoGIS` using:

```sh
pip install git+https://gitlab.com/your-repo/pythermogis.git
pip install pythermogis --index-url https://__token__:<your_personal_token>@ci.tno.nl/gitlab/api/v4/projects/18271/packages/pypi/simple
```

This will fetch the latest version from the public GitLab repository.
This will fetch the package from the specified GitLab package repository.

### Notes

- If you have multiple package sources configured, you may need to use `--extra-index-url` instead of `--index-url`.
- Ensure your `.pypirc` file is stored securely, as it contains authentication credentials.


## Usage