Skip to content

Commit

Permalink
Merge pull request #136 from nautobot/release-0.9.0
Browse files Browse the repository at this point in the history
Release 0.9.0 prep
  • Loading branch information
glennmatthews authored Sep 27, 2023
2 parents bbcabbc + eb60cde commit 52d8986
Show file tree
Hide file tree
Showing 105 changed files with 6,883 additions and 2,834 deletions.
20 changes: 15 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@
development/Dockerfile
development/docker-compose*.yml
development/*.env
*.env
environments/

# Python
**/*.pyc
**/*.pyo
**/__pycache__/
**/.pytest_cache/
**/.venv/

# Linting, etc.
.yamllint
.flake8
.bandit.yml
.pydocstyle.ini

# Other
docs/_build
FAQ.md
.git/
.gitignore
.github
tasks.py
LICENSE
**/*.log
**/.vscode/
invoke*.yml
tasks.py
9 changes: 7 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[flake8]
# E501: Line length is enforced by Black, so flake8 doesn't need to check it
# F405: Star Imports for Nested Serializers (brief fields issue)
# W503: Black disagrees with this rule, as does PEP 8; Black wins
ignore = E501, F405, W503
ignore = E501, W503
exclude =
migrations,
__pycache__,
manage.py,
settings.py,
.venv
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default owner(s) of all files in this repository
* @glennmatthews @carbonarok
* @glennmatthews @mzbroch
51 changes: 38 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
name: "CI"
concurrency: # Cancel any existing runs of this workflow for this same PR
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
on: # yamllint disable-line rule:truthy rule:comments
push:
branches:
Expand All @@ -21,7 +24,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: black"
run: "poetry run invoke black"
bandit:
Expand All @@ -32,7 +35,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: bandit"
run: "poetry run invoke bandit"
pydocstyle:
Expand All @@ -43,7 +46,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: pydocstyle"
run: "poetry run invoke pydocstyle"
flake8:
Expand All @@ -54,7 +57,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: flake8"
run: "poetry run invoke flake8"
yamllint:
Expand All @@ -65,7 +68,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: yamllint"
run: "poetry run invoke yamllint"
pylint:
Expand All @@ -79,16 +82,16 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.7"]
nautobot-version: ["1.3.3"]
python-version: ["3.8"]
nautobot-version: ["1.5.4"]
env:
INVOKE_NAUTOBOT_BGP_MODELS_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_BGP_MODELS_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
Expand Down Expand Up @@ -116,9 +119,19 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
db-backend: ["postgresql"]
nautobot-version: ["1.3.3", "stable"]
nautobot-version: ["stable"]
include:
- python-version: "3.10"
db-backend: "postgresql"
nautobot-version: "1.5.4"
- python-version: "3.8"
db-backend: "mysql"
nautobot-version: "1.5.4"
- python-version: "3.10"
db-backend: "mysql"
nautobot-version: "stable"
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_BGP_MODELS_PYTHON_VER: "${{ matrix.python-version }}"
Expand All @@ -127,7 +140,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
Expand All @@ -147,6 +160,9 @@ jobs:
PYTHON_VER=${{ matrix.python-version }}
- name: "Copy credentials"
run: "cp development/creds.example.env development/creds.env"
- name: "Use Mysql invoke settings when needed"
run: "cp invoke.mysql.yml invoke.yml"
if: "matrix.db-backend == 'mysql'"
- name: "Run Tests"
run: "poetry run invoke unittest"
publish_gh:
Expand All @@ -168,6 +184,10 @@ jobs:
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
- name: "Run Poetry Version"
run: "poetry version $RELEASE_VERSION"
- name: "Install Dependencies (needed for mkdocs)"
run: "poetry install"
- name: "Build Documentation"
run: "poetry run mkdocs build --no-directory-urls --strict"
- name: "Run Poetry Build"
run: "poetry build"
- name: "Upload binaries to release"
Expand Down Expand Up @@ -197,6 +217,10 @@ jobs:
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
- name: "Run Poetry Version"
run: "poetry version $RELEASE_VERSION"
- name: "Install Dependencies (needed for mkdocs)"
run: "poetry install"
- name: "Build Documentation"
run: "poetry run mkdocs build --no-directory-urls --strict"
- name: "Run Poetry Build"
run: "poetry build"
- name: "Push to PyPI"
Expand All @@ -210,7 +234,7 @@ jobs:
- "publish_pypi"
runs-on: "ubuntu-20.04"
env:
SLACK_WEBHOOK_URL: "${{ '{{ secrets.SLACK_WEBHOOK_URL }}' }}"
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
SLACK_MESSAGE: >-
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n
Expand All @@ -220,11 +244,12 @@ jobs:
- name: "Send a notification to Slack"
# ENVs cannot be used directly in job.if. This is a workaround to check
# if SLACK_WEBHOOK_URL is present.
if: "${{ env.SLACK_WEBHOOK_URL != '' }}"
if: "env.SLACK_WEBHOOK_URL != ''"
uses: "slackapi/[email protected]"
with:
payload: |
{
"text": "${{ env.SLACK_MESSAGE }}",
"blocks": [
{
"type": "section",
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/upstream_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "Nautobot Upstream Monitor"

on: # yamllint disable-line rule:truthy rule:comments
schedule:
- cron: "0 4 */2 * *" # every other day at midnight

jobs:
upstream-test:
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop"
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced
invoke_context_name: "NAUTOBOT_BGP_MODELS"
plugin_name: "nautobot-bgp-models"
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ fabric.properties

# Rando
creds.env
development/*.txt

# Invoke overrides
invoke.yml

# Docs
docs/README.md
docs/CHANGELOG.md
public

nautobot_bgp_models/static
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python in the build environment.
build:
os: "ubuntu-22.04"
tools:
python: "3.10"

mkdocs:
configuration: "mkdocs.yml"
fail_on_warning: true

# Use our docs/requirements.txt during installation.
python:
install:
- requirements: "docs/requirements.txt"
1 change: 0 additions & 1 deletion CHANGELOG.md

This file was deleted.

12 changes: 0 additions & 12 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 52d8986

Please sign in to comment.