Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/lib/poseidon_api/paramiko-3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cglewis authored Jun 4, 2024
2 parents d381a0a + 48ca44f commit e9dad2f
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 71 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ jobs:
cd lib/poseidon_cli && poetry run pip install 'setuptools==64.0.3' && poetry run pytest --cov-report term-missing --cov=. --cov-report=xml && cd ../../
cd lib/poseidon_core && poetry run pip install 'setuptools==64.0.3' && poetry run pytest --cov-report term-missing --cov=. --cov-report=xml && cd ../../
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
if: github.repository == 'faucetsdn/poseidon' && github.ref_name == 'main'
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /home/runner/work/poseidon/poseidon/lib/poseidon_api/coverage.xml,/home/runner/work/poseidon/poseidon/lib/poseidon_cli/coverage.xml,/home/runner/work/poseidon/poseidon/lib/poseidon_core/coverage.xml
fail_ci_if_error: true
12 changes: 8 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:

jobs:
analyze:
permissions:
actions: read
contents: write
security-events: write
name: Analyze
runs-on: ubuntu-latest

Expand All @@ -35,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Poseidon

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![Build Status](https://github.com/IQTLabs/poseidon/workflows/test/badge.svg)
[![codecov](https://codecov.io/gh/IQTLabs/poseidon/branch/main/graph/badge.svg?token=ORXmFYC3MM)](https://codecov.io/gh/IQTLabs/poseidon)
![Build Status](https://github.com/faucetsdn/poseidon/workflows/test/badge.svg)
[![codecov](https://codecov.io/github/faucetsdn/poseidon/graph/badge.svg?token=PJmRKQMk1P)](https://codecov.io/github/faucetsdn/poseidon)
[![Docker Hub Downloads](https://img.shields.io/docker/pulls/iqtlabs/poseidon.svg)](https://hub.docker.com/r/iqtlabs/poseidon/)

> Software Defined Network Situational Awareness
Expand Down
71 changes: 34 additions & 37 deletions lib/poseidon_api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions lib/poseidon_api/poseidon_api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def scrape_prometheus(self):
if "result" in results["data"] and results["data"]["result"]:
for metric in results["data"]["result"]:
if metric["metric"]["hash_id"] in role_hashes:
role_hashes[metric["metric"]["hash_id"]][
"second_role"
] = metric["metric"].get("role", NO_DATA)
role_hashes[metric["metric"]["hash_id"]]["second_role"] = (
metric["metric"].get("role", NO_DATA)
)
role_hashes[metric["metric"]["hash_id"]][
"second_confidence"
] = float(metric["values"][-1][1])
Expand All @@ -145,9 +145,9 @@ def scrape_prometheus(self):
if "result" in results["data"] and results["data"]["result"]:
for metric in results["data"]["result"]:
if metric["metric"]["hash_id"] in role_hashes:
role_hashes[metric["metric"]["hash_id"]][
"third_role"
] = metric["metric"].get("role", NO_DATA)
role_hashes[metric["metric"]["hash_id"]]["third_role"] = (
metric["metric"].get("role", NO_DATA)
)
role_hashes[metric["metric"]["hash_id"]][
"third_confidence"
] = float(metric["values"][-1][1])
Expand Down
2 changes: 1 addition & 1 deletion lib/poseidon_api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ urllib3 = "<2.0.8"
poseidon-core = { path="../poseidon_core", develop=true }

[tool.poetry.dev-dependencies]
black = "23.3.0"
black = "24.3.0"
docker = "6.1.3"
httmock = "1.4.0"
mock = "5.0.2"
Expand Down
14 changes: 7 additions & 7 deletions lib/poseidon_cli/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions lib/poseidon_core/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/poseidon_core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ prometheus_client = "^0.17.0"
pyyaml = "6.0"
schedule = "1.2.0"
transitions = "0.9.0"
requests = "<2.31.1"
requests = "<2.32.3"
urllib3 = "<2.0.8"

[tool.poetry.dev-dependencies]
Expand Down

0 comments on commit e9dad2f

Please sign in to comment.