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: merge develop into master #167

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5f1eb85
Merge pull request #119 from nordic-institute/master
melbeltagy Sep 20, 2024
27ec0d2
chore: Update dependencies to latest versions compatible with python 3.8
melbeltagy Sep 30, 2024
b32df47
fix: Fix import in database_manager
melbeltagy Sep 30, 2024
9e6bcef
chore: enable running tests manually from github actions page
melbeltagy Sep 30, 2024
57ec292
Merge pull request #129 from nordic-institute/OPMONDEV-187-update-deps
melbeltagy Sep 30, 2024
8bd6ff3
Fix corrector inserting duplicate documents when metrics arrive after…
VitaliStupin Oct 17, 2024
9de21a5
Fix sonarcloud issue
VitaliStupin Oct 17, 2024
9751967
Fix corrector inserting duplicate documents when metrics arrive after…
melbeltagy Oct 18, 2024
aadd1b4
Fix top 5 charts values in reports by calculating the correct average…
VitaliStupin Oct 18, 2024
10eb629
chore: Ignore dependencies that require python >= 3.9 from dependabot
melbeltagy Oct 18, 2024
96e363e
Merge pull request #136 from nordic-institute/dependabot-ignore-deps-…
melbeltagy Oct 18, 2024
d31bcc2
chore(deps): bump the python-minor-patch group across 5 directories w…
dependabot[bot] Oct 18, 2024
b502c2c
Merge pull request #138 from nordic-institute/dependabot/pip/anonymiz…
dependabot[bot] Oct 18, 2024
d7cedc6
chore: Ignore dependencies that require python >= 3.9 from dependabot
melbeltagy Oct 18, 2024
9ea51a5
Merge pull request #139 from nordic-institute/dependabot-ignore-deps-…
melbeltagy Oct 18, 2024
3a14dad
chore: Ignore dependencies that require python >= 3.9 from dependabot
melbeltagy Oct 24, 2024
59d90d6
Merge pull request #141 from nordic-institute/dependabot-ignore-deps-…
melbeltagy Oct 25, 2024
e3414a6
Fix OpenData create_users tests and run them in tox (test coverage) (…
melbeltagy Nov 1, 2024
2608d5f
chore: remove unnecessary test-dependency (pymongo-stubs) (#144)
melbeltagy Nov 1, 2024
24adeeb
chore: OpenData Module - Drop legacy support for Django 2.x in tests,…
melbeltagy Nov 1, 2024
b80e2cd
Switch from pycodestyle to ruff as a linter (#111)
melbeltagy Nov 1, 2024
25deb27
chore: Update "make clean" command to clean test_results.xml and rela…
melbeltagy Nov 4, 2024
d0b1d74
fix: Freeze pydyf's version in dependencies to fix reports during run…
melbeltagy Nov 4, 2024
ecf6c5a
Merge pull request #146 from nordic-institute/OPMONDEV-187-freeze-pyd…
melbeltagy Nov 5, 2024
c650969
Merge pull request #145 from nordic-institute/OPMONDEV-187-make-clean
melbeltagy Nov 5, 2024
5781228
chore: Add license header to all source code
melbeltagy Nov 12, 2024
a4042fa
Merge pull request #148 from nordic-institute/OPMONDEV-187-licenses
melbeltagy Nov 12, 2024
5788027
fix: Add missing make license command in anonymizer module
melbeltagy Nov 12, 2024
0016b59
Merge pull request #149 from nordic-institute/OPMONDEV-187-licenses-2
melbeltagy Nov 12, 2024
d7696e0
chore: Remove sensitive info from path variables from consumer messages
melbeltagy Nov 20, 2024
7d3e2c4
fix: Migrate mongopy's collection#update to collection#update_one (#150)
melbeltagy Nov 20, 2024
a781c7b
Merge branch 'develop' into OPMONDEV-187-rest-path
melbeltagy Nov 20, 2024
b476a3f
chore: map restMethod and restPath on opendata and anonymizer modules
melbeltagy Nov 24, 2024
3bce8e5
fix: Freeze rpds-py's version in dependencies to fix reports during i…
melbeltagy Nov 24, 2024
b848383
chore: add restMethod to comparison list in corrector
melbeltagy Nov 25, 2024
4a00f0e
docs: Add Developer's Guide documentation (#154)
melbeltagy Dec 30, 2024
1e7b350
feat: As a Metrics User I want the database migration to check if fie…
nortaljevgenikr Dec 18, 2024
3d3e556
Merge pull request #151 from nordic-institute/OPMONDEV-187-rest-path
raits Jan 17, 2025
ace32ea
Merge pull request #153 from nordic-institute/OPMONDEV-189-db-patching
nortaljevgenikr Jan 17, 2025
ff3747e
Update ORT config
petkivim Jan 22, 2025
f95e92e
Merge pull request #159 from nordic-institute/20250122-update-ort-config
petkivim Jan 23, 2025
1a7dd87
chore(deps): bump django
dependabot[bot] Jan 23, 2025
3a91366
chore(deps): Update django to 4.2.18; remove deprecated option (#160)
nortaljevgenikr Jan 28, 2025
62ba82f
Merge pull request #158 from nordic-institute/dependabot/pip/opendata…
nortaljevgenikr Jan 28, 2025
94a1347
feat: Prepare opendata_collector_module for release (#161)
nortaljevgenikr Jan 28, 2025
e824ecd
chore: ignore dependencies by dependabot; bump some dependency versions
nortaljevgenikr Jan 29, 2025
4e71fd8
Merge pull request #164 from nordic-institute/chore_dependabot_disall…
nortaljevgenikr Jan 30, 2025
b0259eb
chore: bump version to 1.4.0
nortaljevgenikr Jan 30, 2025
552efcd
Merge pull request #166 from nordic-institute/OPMONDEV-190-bump-version
nortaljevgenikr Jan 30, 2025
4b8c791
chore: dependabot - ignore pymongo >= 4.11 because it requires python…
nortaljevgenikr Jan 30, 2025
5e758aa
Merge pull request #168 from nordic-institute/chore_dependabot_mongo
nortaljevgenikr Jan 30, 2025
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
48 changes: 47 additions & 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 All @@ -24,6 +24,52 @@ updates:
applies-to: version-updates
update-types:
- "major"
ignore: # ignoring the following packages as they require python >= 3.9
- dependency-name: "matplotlib"
versions:
- ">= 3.8.0"
- dependency-name: "pandas"
versions:
- ">= 2.1.0"
- dependency-name: "weasyprint"
versions:
- ">= 62.0"
- dependency-name: "numpy"
versions:
- ">= 1.25.0"
- dependency-name: "contourpy"
versions:
- ">= 1.2.0"
- dependency-name: "markupsafe"
versions:
- ">= 3.0.0"
- dependency-name: "Pillow"
versions:
- ">= 11.0"
- dependency-name: "django"
versions:
- ">= 5.0"
- dependency-name: "pyparsing"
versions:
- ">= 3.2.0"
- dependency-name: "pydyf"
versions:
- ">= 0.11.0"
- dependency-name: "rpds-py"
versions:
- ">= 0.21.0"
- dependency-name: "vcrpy"
versions:
- ">= 7.0.0"
- dependency-name: "setuptools"
versions:
- ">= 75.4.0"
- dependency-name: "urllib3"
versions:
- ">= 2.3.0"
- dependency-name: "pymongo"
versions:
- ">= 4.11.0"

- package-ecosystem: "github-actions"
directory: "/.github/workflows"
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: X-Road Metrics Tests
on: [pull_request]
on: [workflow_dispatch, pull_request]
jobs:
Test-Anonymizer:
name: Anonymizer Tests
Expand Down 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
39 changes: 6 additions & 33 deletions .ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,12 @@ excludes:
- pattern: "3RD-PARTY-NOTICES.txt"
reason: "DOCUMENTATION_OF"
comment: "3rd party notices."

scopes:
- pattern: "checkstyle"
reason: "BUILD_DEPENDENCY_OF"
comment: "Packages for code styling checks (testing) only."

- pattern: "devDependencies"
reason: "DEV_DEPENDENCY_OF"
comment: "Packages for development only."

- pattern: "jacocoAgent"
reason: "TEST_DEPENDENCY_OF"
comment: "Packages for code coverage (testing) only."

- pattern: "jacocoAnt"
reason: "TEST_DEPENDENCY_OF"
comment: "Packages for code coverage (testing) only."

- pattern: "test.*"
reason: "TEST_DEPENDENCY_OF"
comment: "Packages for testing only."

- pattern: "annotationProcessor"
reason: "DEV_DEPENDENCY_OF"
comment: "Packages for development only."

- pattern: "compileClasspath"
reason: "DEV_DEPENDENCY_OF"
comment: "Packages for development only."

- pattern: "compileOnly"
reason: "DEV_DEPENDENCY_OF"
comment: "Packages for development only."
- pattern: "**/tests/**"
reason: "TEST_OF"
comment: "This directory contains tests."
- pattern: "**/test_results.html"
reason: "TEST_OF"
comment: "This file contains contains test results."

resolutions:
rule_violations:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Networking module is written in [**R**](https://www.r-project.org/).
get access to the
[X-Road Metrics Backlog](https://nordic-institute.atlassian.net/jira/software/c/projects/OPMONDEV/boards/2/backlog).

Follow the [developer's guide](./docs/dev_guide/developer_guide.md) to setup your local development environment

Submit a pull request to
[X-Road Metrics source code Github repository](https://github.com/nordic-institute/X-Road-Metrics)
or an enhancement request to the
Expand Down
18 changes: 16 additions & 2 deletions analysis_module/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
clean:
@echo "Cleaning project..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@rm -f ./test_results.xml
@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."
@rm -rf ../htmlcov/analysis_module/
@echo "Project cleaned."

license:
@echo "Checking if licenseheaders library is installed..."
@if pip show licenseheaders > /dev/null 2>&1; then \
echo "licenseheaders is installed."; \
else \
echo "licenseheaders is not installed. Installing it..."; \
pip install licenseheaders --no-input; \
fi
@echo "Adding license to opmon_analyzer module..."
@licenseheaders -t ../LICENSE.MD -E py -d ./opmon_analyzer
@echo "Note: bin directory is not updated by the tool. Make sure to update it manually."
@echo "License added."
40 changes: 21 additions & 19 deletions analysis_module/opmon_analyzer/AnalyzerDatabaseManager.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

import urllib.parse

Expand Down
40 changes: 21 additions & 19 deletions analysis_module/opmon_analyzer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

__version__ = '0.1.0'
40 changes: 21 additions & 19 deletions analysis_module/opmon_analyzer/analyzer_conf.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

class DataModelConfiguration:
"""Create data model time windows and thresholds based on settings.yaml"""
Expand Down
23 changes: 23 additions & 0 deletions analysis_module/opmon_analyzer/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
#
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
timestamp_field = 'requestInTs'

# The MIT License
Expand Down
Loading
Loading