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

chore: Update dependencies, apply fixes (code, and tox), and update docs #113

Merged
merged 14 commits into from
Jun 11, 2024
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
37 changes: 37 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2

updates:
- package-ecosystem: pip
directories:
#- "/analysis_module"
#- "/analysis_ui_module"
- "/anonymizer_module"
- "/collector_module"
- "/corrector_module"
#- "/opendata_collector_module"
- "/opendata_module"
- "/reports_module"
schedule:
interval: "weekly"
day: "thursday"
groups:
python-minor-patch:
applies-to: version-updates
update-types:
- "minor"
- "patch"
python-major:
applies-to: version-updates
update-types:
- "major"

- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
interval: "weekly"
day: "thursday"
groups:
actions-update:
applies-to: version-updates
patterns:
- "*"
50 changes: 31 additions & 19 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: X-Road Metrics tests
name: X-Road Metrics Tests
on: [pull_request]
jobs:
Test-Anonymizer:
name: Anonymizer Tests
runs-on: ubuntu-22.04
defaults:
run:
Expand All @@ -13,13 +14,15 @@ jobs:
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: ./anonymizer_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-Collector:
name: Collector Tests
runs-on: ubuntu-22.04
defaults:
run:
Expand All @@ -31,13 +34,15 @@ jobs:
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: ./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-Corrector:
name: Corrector Tests
runs-on: ubuntu-22.04
defaults:
run:
Expand All @@ -49,13 +54,15 @@ jobs:
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: ./corrector_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:
name: OpenData Tests
runs-on: ubuntu-22.04
defaults:
run:
Expand All @@ -67,31 +74,35 @@ jobs:
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: ./opendata_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:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./opendata_collector_module
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
- 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@v3
# - name: Set up Python 3.8
# uses: actions/setup-python@v4
# 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
defaults:
run:
Expand All @@ -103,6 +114,7 @@ jobs:
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: ./reports_module/setup.py
- name: Install dependencies
run: pip install -r test_requirements.txt
- name: Install tox
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ nosetests.xml
coverage.xml
*,cover
.hypothesis/
test_results.xml
test_results.*

# Translations
*.mo
Expand Down
10 changes: 10 additions & 0 deletions analysis_module/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean:
@echo "Cleaning project..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@rm -rf .coverage
@rm -rf .tox/
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info/
@rm -rf opmon_collector/tests/responses/Test/
@echo "Project cleaned."
8 changes: 4 additions & 4 deletions analysis_module/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
from setuptools import setup, find_packages

requirements = [
'dill==0.3.1.1',
'pymongo==3.10.1',
'pyyaml==5.4.1',
'dill==0.3.8',
'pymongo==4.6.3',
'pyyaml==6.0.1',
'numpy==1.24.4',
'pandas==2.0.3',
'scipy==1.10.1'
'scipy==1.10.1',
]

classifiers = [
Expand Down
1 change: 1 addition & 0 deletions analysis_module/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ coverage
pytest
pytest-mock
pytest-pycodestyle
pytest-html
mongomock
2 changes: 1 addition & 1 deletion analysis_module/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ envlist = py38
deps = -rtest_requirements.txt
install_command=pip install --only-binary=numpy {opts} numpy {packages}
commands =
- coverage run --source opmon_analyzer -m pytest opmon_analyzer/
coverage run --source opmon_analyzer -m pytest opmon_analyzer/
coverage report --include=opmon_analyzer/*
coverage html -d ../htmlcov/analysis_module --include=opmon_analyzer/*

Expand Down
10 changes: 10 additions & 0 deletions analysis_ui_module/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean:
@echo "Cleaning project..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@rm -rf .coverage
@rm -rf .tox/
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info/
@rm -rf opmon_collector/tests/responses/Test/
@echo "Project cleaned."
6 changes: 3 additions & 3 deletions analysis_ui_module/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
from setuptools import setup, find_packages

requirements = [
'dill==0.3.1.1',
'dill==0.3.8',
'django==2.2.28',
'pymongo==3.10.1',
'pyyaml==5.4.1',
'pymongo==4.6.3',
'pyyaml==6.0.1',
'numpy==1.24.4'
]

Expand Down
1 change: 1 addition & 0 deletions analysis_ui_module/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ coverage
pytest
pytest-mock
pytest-pycodestyle
pytest-html
mongomock
2 changes: 1 addition & 1 deletion analysis_ui_module/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ envlist = py38
deps = -rtest_requirements.txt
install_command=pip install --only-binary=numpy {opts} numpy {packages}
commands =
- coverage run --source opmon_analyzer_ui -m pytest opmon_analyzer_ui/
coverage run --source opmon_analyzer_ui -m pytest opmon_analyzer_ui/
coverage report --include=opmon_analyzer_ui/*
coverage html -d ../htmlcov/analysis_ui_module --include=opmon_analyzer_ui/*

Expand Down
10 changes: 10 additions & 0 deletions anonymizer_module/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean:
@echo "Cleaning project..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@rm -rf .coverage
@rm -rf .tox/
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info/
@rm -rf opmon_collector/tests/responses/Test/
@echo "Project cleaned."
8 changes: 4 additions & 4 deletions anonymizer_module/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

requirements = [
'setuptools==67.4.0',
'pymongo==3.10.1',
'pyyaml==5.4.1',
'psycopg2==2.8.6',
'python-dateutil==2.8.1',
'pymongo==4.6.3',
'pyyaml==6.0.1',
'psycopg2==2.9.9',
'python-dateutil==2.9.0.post0',
]

classifiers = [
Expand Down
1 change: 1 addition & 0 deletions anonymizer_module/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ coverage
pytest
pytest-mock
pytest-pycodestyle
pytest-html
mongomock
psycopg2-binary
mypy
Expand Down
3 changes: 1 addition & 2 deletions anonymizer_module/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ envlist = py38-{pytest,mypy}
deps = -rtest_requirements.txt
install_command=pip install --only-binary=numpy {opts} numpy {packages}
commands =
- coverage run --source opmon_anonymizer -m pytest opmon_anonymizer/
coverage run --source opmon_anonymizer,metrics_statistics -m pytest opmon_anonymizer/ metrics_statistics/
coverage report --include=opmon_anonymizer/*
coverage html -d ../htmlcov/anonymizer_module --include=opmon_anonymizer/*
- coverage run --source metrics_statistics -m pytest metrics_statistics/
[testenv:py38-mypy]
description = Run mypy
deps =
Expand Down
32 changes: 0 additions & 32 deletions bitbucket-pipelines.yml

This file was deleted.

10 changes: 10 additions & 0 deletions collector_module/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean:
@echo "Cleaning project..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@rm -rf .coverage
@rm -rf .tox/
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info/
@rm -rf opmon_collector/tests/responses/Test/
@echo "Project cleaned."
10 changes: 5 additions & 5 deletions collector_module/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

requirements = [
'setuptools==67.4.0',
'pymongo==3.10.1',
'requests==2.31.0',
'tqdm==4.30.0',
'pyyaml==5.4.1',
'urllib3==1.26.14',
'pymongo==4.6.3',
'requests==2.32.3',
'tqdm==4.66.4',
'pyyaml==6.0.1',
'urllib3==1.26.18',
]

classifiers = [
Expand Down
1 change: 1 addition & 0 deletions collector_module/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ coverage
pytest
pytest-mock
pytest-pycodestyle
pytest-html
responses
mongomock
2 changes: 1 addition & 1 deletion collector_module/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ envlist = py38
deps = -rtest_requirements.txt
install_command=pip install --only-binary=numpy {opts} numpy {packages}
commands =
- coverage run --source opmon_collector,opmon_mongodb_maintenance -m pytest opmon_collector/ opmon_mongodb_maintenance/
coverage run --source opmon_collector,opmon_mongodb_maintenance -m pytest opmon_collector/ opmon_mongodb_maintenance/
coverage report --include=opmon_collector/*,opmon_mongodb_maintenance/*
coverage html -d ../htmlcov/collector_module --include=opmon_collector/*,opmon_mongodb_maintenance/*

Expand Down
10 changes: 10 additions & 0 deletions corrector_module/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean:
@echo "Cleaning project..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@rm -rf .coverage
@rm -rf .tox/
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info/
@rm -rf opmon_collector/tests/responses/Test/
@echo "Project cleaned."
Loading
Loading