Files
sientia-dataops-opc-ingestor/README.md
vitor-aignosi b9ef69a865 SIENTIAPDE-988
Refactor OpcManager initialization and unsubscribe method; enhance logging

- Removed the `initialize_from_config` method from `OpcManager` class and adjusted the constructor to handle configuration directly.
- Improved the `unsubscribe` method to include detailed logging for non-existent subscriptions.
- Updated tests in `test_opc_manager.py` to reflect changes in the `OpcManager` class.
- Commented out Docker-related fixtures in `conftest.py` for potential future use.
- Enhanced test coverage in `test_single_node.py` and `test_data_manager.py` with additional scenarios and assertions.
- Introduced new methods in `Ingestor` and `IngestorManager` classes to manage server subscriptions and leases more effectively.
- Added new tests for `Ingestor` class to validate initialization and slot management logic.
- Implemented logging improvements across various classes to ensure better traceability of actions and errors.
2025-04-23 18:24:49 -03:00

59 lines
1.0 KiB
Markdown

# sientia-dataops-opc-gateway
OPC gateway to manage Scouter pipelines
## Local tests
### Generate your ssh key to Docker
'''
ssh-keygen -t ed25519 -C "docker-access" -f ~/.ssh/id_ed25519_docker
'''
Add the public key to yout Git SSH keys
### Enable Docker BuildKit
'''
export DOCKER_BUILDKIT=1
'''
or make it permanent:
'''
echo '{ "features": { "buildkit": true } }' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
'''
### Run docker compose
'''
docker compose build --ssh default=$HOME/.ssh/id_ed25519_docker
docker compose up -d
'''
### Populate redis server
Create venv with python3.11
'''
python3.11 -m venv venv
source ./venv/bin/activate
'''
Install requirements
'''
pip install -r requirements.txt
'''
Run feeder
'''
python simulator/redis-feeder.py
'''
## Unit tests
### Install pytest
'''
pip install pytest
'''
### Run pytest
'''
pytest
'''
### Get current coverage
'''
pip install pytest-cov
pytest --cov=ingestor
'''
### Generate complete report
'''
pytest --cov=ingestor --cov-report=html
'''