Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Prepare opendata_collector_module for release #161

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
- "/anonymizer_module"
- "/collector_module"
- "/corrector_module"
#- "/opendata_collector_module"
- "/opendata_collector_module"
- "/opendata_module"
- "/reports_module"
schedule:
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,26 @@ jobs:
run: pip install tox
- name: Run tox tests
run: tox
# Test-Opendata-Collector:
# name: OpenData Collector Tests
# runs-on: ubuntu-22.04
# defaults:
# run:
# working-directory: ./opendata_collector_module
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python 3.8
# uses: actions/setup-python@v5
# with:
# python-version: '3.8'
# cache: 'pip'
# cache-dependency-path: ./opendata_collector_module/setup.py
# - name: Install dependencies
# run: pip install -r test_requirements.txt
# - name: Install tox
# run: pip install tox
# - name: Run tox tests
# run: tox
Test-Opendata-Collector:
name: OpenData Collector Tests
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./opendata_collector_module
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: ./opendata_collector_module/setup.py
- name: Install dependencies
run: pip install -r test_requirements.txt
- name: Install tox
run: pip install tox
- name: Run tox tests
run: tox
Test-Reports:
name: Reports Tests
runs-on: ubuntu-22.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# url: https://example1:/api/harvest
# limit: 2000
# from_dt: '2022-12-05T00:00:00'
# until_dt: '2023-05-01T00:00:00
# until_dt: '2023-05-01T00:00:00'
# opendata_api_tz_offset: '+0200'
# verify_ssl: False
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, settings: dict, instance_id: str) -> None:
'tls': bool(settings['mongodb'].get('tls')),
'tlsCAFile': settings['mongodb'].get('tls-ca-file'),
}
self.client = MongoClient(self.get_mongo_uri(settings), **connect_args)
self.client: MongoClient = MongoClient(self.get_mongo_uri(settings), **connect_args)
self.query_db = self.client[f'query_db_{xroad}']
self.state_db = self.client[f'opendata_collector_state_{xroad}']

Expand Down
6 changes: 3 additions & 3 deletions opendata_collector_module/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
from setuptools import setup

requirements = [
'setuptools==75.1.0',
'pymongo==4.9.1',
'setuptools==75.3.0',
'pymongo==4.10.1',
'requests==2.32.3',
'tqdm==4.66.5',
'tqdm==4.67.1',
'pyyaml==6.0.2',
'urllib3==2.2.3',
]
Expand Down
2 changes: 1 addition & 1 deletion opendata_collector_module/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ pytest-mock
pytest-ruff
pytest-html
ruff
vcrpy==1.5.2
vcrpy==6.0.2
2 changes: 1 addition & 1 deletion opendata_collector_module/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ deps = -r test_requirements.txt
install_command=pip install --only-binary=numpy {opts} numpy {packages}
commands =
coverage run --source metrics_opendata_collector -m pytest metrics_opendata_collector/
coverage report --include=metrics_opendata_collector/*
coverage report --include=metrics_opendata_collector/* --fail-under=60
coverage html -d ../htmlcov/opendata_collector_module --include=metrics_opendata_collector/*

[testenv:lint]
Expand Down
34 changes: 0 additions & 34 deletions run_tests.sh

This file was deleted.

Loading