Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
johanek committed Jul 3, 2024
2 parents d371ae2 + be99b5a commit 02ac65f
Show file tree
Hide file tree
Showing 167 changed files with 10,016 additions and 1,810 deletions.
2 changes: 1 addition & 1 deletion .bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
exclude_dirs:
- "./tests/"
- "./docs/"
- "netutils/oui_mappings.py"
- "netutils/data_files/"
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Linting: black"
run: "poetry run invoke black"
bandit:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Linting: bandit"
run: "poetry run invoke bandit"
needs:
Expand All @@ -46,7 +46,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Type-Hints: mypy"
run: "poetry run invoke mypy"
needs:
Expand All @@ -61,7 +61,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Linting: pydocstyle"
run: "poetry run invoke pydocstyle"
needs:
Expand All @@ -76,7 +76,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Linting: flake8"
run: "poetry run invoke flake8"
needs:
Expand All @@ -91,7 +91,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Linting: yamllint"
run: "poetry run invoke yamllint"
needs:
Expand All @@ -100,7 +100,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
env:
PYTHON_VER: "${{ matrix.python-version }}"
steps:
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand Down Expand Up @@ -204,10 +204,10 @@ jobs:
run: "docker image ls"
- name: "Run Tests"
run: "poetry run invoke pytest"
- name: "Install Napalm"
run: "pip install napalm"
- name: "Install Optional Dependencies"
run: "poetry run poetry install --extras optionals"
- name: "Run Optional Tests"
run: "poetry run pytest tests/unit/test_lib_helpers_optionals.py"
run: "poetry run pytest tests/unit/test_lib_helpers_optionals.py tests/unit/test_acl.py"
needs:
- "pylint"
publish_gh:
Expand All @@ -220,7 +220,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/oui_filepull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "OUI-Updates"

on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 8 * * 4"
- cron: "0 2 1 * *"

jobs:
data_gathering:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto_filepull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Protocol-Updates"

on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 8 * * 4"
- cron: "0 2 1 * *"

jobs:
data_gathering:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/proto_num_filepull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: "Protocol-Number-Updates"

on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 2 1 * *"

jobs:
data_gathering:
runs-on: "ubuntu-latest"
env:
BRANCH_NAME: "PROTO_NUM_Updates"
steps:
# Checkout repo
- name: "Check out code"
uses: "actions/checkout@v2"
with:
ref: "develop"
# Delete old branch if it exists
- name: "Delete existing branch"
run: "git branch -D $BRANCH_NAME || true"
# Create branch for Flatbot
- name: "Create Flatbot branch"
run: "git checkout -b $BRANCH_NAME"
# Push new branch so Flatbot can make its commit
- name: "Push Flatbot branch"
run: "git push -f --set-upstream origin $BRANCH_NAME"
# Install Black
- name: "Install Python Black"
run: "pip install black"
# This step installs Deno, which is a new Javascript runtime that improves on Node. Can be used for an optional postprocessing step
- name: "Setup deno"
uses: "denoland/setup-deno@main"
with:
deno-version: "v1.10.x"
# The Flat Action step. We fetch the data in the http_url and save it as downloaded_filename
- name: "Fetch data"
uses: "githubocto/flat@v3"
with:
http_url: "https://www.iana.org/assignments/protocol-numbers/protocol-numbers-1.csv"
downloaded_filename: "./netutils/data_files/protocol_number_mappings.py"
postprocess: "./flat_postprocess/protocol_number_postprocess.ts"
pr_creation:
runs-on: "ubuntu-latest"
needs: "data_gathering"
steps:
# Checkout repo
- name: "Check out code"
uses: "actions/checkout@v2"
with:
ref: "PROTO_NUM_Updates"
# Create PR from branch created above into develop
- name: "Create a Pull Request"
run: "gh pr create -B develop -H PROTO_NUM_Updates --title 'Flatbot PROTOCOL Number File Updates' --body 'Created by Flatbot action'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ mkdocs:
python:
install:
- requirements: "docs/requirements.txt"
- method: "pip"
path: "."
Loading

0 comments on commit 02ac65f

Please sign in to comment.