Installation
The installation phase involves:
Cloning the NOS-T tools repository
Installing the NOS-T Tools library
Configuring the necessary credentials to interact with the NOS-T infrastructure.
Note
The best way to get the NOS-T Tools library and example codes is to clone the NOS-T git repository and install the tools. The library will soon be available on PyPI for easy installation.
NOS-T Tools Installation
Clone the repository:
git clone git@github.com:code-lab-org/nost-tools.git
If the above command fails, try using the HTTPS URL instead:
git clone https://github.com/code-lab-org/nost-tools.git
Change to the directory where the repository was cloned:
cd nost-tools
Pip
To install NOS-T tools using pip:
Upgrade pip to the latest version:
python -m pip install --upgrade pip
Install NOS-T tools:
pip install .
To install additional libraries required to run the examples:
pip install .[examples]
Conda
For instructions on how to install Conda, see the: Conda documentation.
To install NOS-T tools using conda:
Create a new conda environment (recommended):
conda create -n nost python=3.11
conda activate nost
Install NOS-T tools:
pip install .
To install additional libraries required to run the examples:
pip install .[examples]
Credentials
Credentials required by the NOS-T infrastructure can be defined in your bashrc file or using a .env file.
Bashrc
Open your bashrc file:
vim ~/.bashrc
Add the following lines:
export USERNAME=<NOS-T Keycloak Username>
export PASSWORD=<NOS-T Keycloak Password>
export CLIENT_ID=<Ask NOS-T Operator>
export CLIENT_SECRET_KEY=<Ask NOS-T Operator>
Source the changes:
source ~/.bashrc
.env
You can create a .env file using the same values as listed above:
vim .env
Add the following lines:
USERNAME=<NOS-T Keycloak Username>
PASSWORD=<NOS-T Keycloak Password>
CLIENT_ID=<Ask NOS-T Operator>
CLIENT_SECRET_KEY=<Ask NOS-T Operator>
Note
Restart your computer after defining environmental variables in your ~/.bashrc file.
Dependencies and Requirements
NOS-T tools requires Python 3.8 or newer. The installation process automatically handles all required dependencies.
Core Dependencies:
Core libraries for messaging, event processing, and authentication (pika, python-keycloak)
Time synchronization utilities (ntplib)
Data serialization and validation tools (pydantic)
Data manipulation libraries (numpy, pandas)
Configuration and environment management utilities (python-dotenv, pyyaml)
Optional Dependencies:
examples: Additional libraries for running example applications including:
Visualization tools (matplotlib, dash, seaborn)
Geospatial libraries (geopandas, rioxarray)
Data formats (netCDF4, h5netcdf)
Optimization tools (pulp)
Cloud storage (s3fs, boto3)
dev: Additional libraries for development and testing including:
Development tools (black, pytest, pylint, coverage)
docs: Additional libraries for building documentation including:
Documentation tools (sphinx, autodoc_pydantic, sphinx_rtd_theme)
To install optional dependencies:
pip install .[examples] # For example applications
pip install .[dev] # For development tools
pip install .[docs] # For documentation building
For a complete list of dependencies and version requirements, refer to the project specification file (pyproject.toml) in the repository.
If you encounter compatibility issues, check your Python version (3.8+) and ensure your environment meets all requirements.
Next Steps
Important: NOS-T requires an event broker to function. To get started:
Set up a local RabbitMQ broker: RabbitMQ Broker on Local Host guide. Alternatively, you can use a cloud-based broker by checking in with the NOS-T operator.
Verify your installation by testing the publisher-consumer example: Creating a Simple Publisher-Consumer Example
These steps will ensure your environment is correctly configured and ready for developing with NOS-T.