-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pyproject.toml and python workflow
- Loading branch information
Showing
10 changed files
with
119 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Python | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- python-version: "3.9" | ||
- python-version: "3.10" | ||
- python-version: "3.11" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install ruff | ||
run: pip install ruff | ||
|
||
- name: Run ruff | ||
run: ruff netbox_slm |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
from extras.plugins import PluginConfig | ||
|
||
__version__ = "1.4" | ||
|
||
|
||
class SLMConfig(PluginConfig): | ||
name = 'netbox_slm' | ||
verbose_name = 'Software Lifecycle Management' | ||
description = 'Software Lifecycle Management Netbox Plugin.' | ||
version = '1.4' | ||
version = __version__ | ||
author = 'ICTU' | ||
author_email = '[email protected]' | ||
base_url = 'slm' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "netbox-slm" | ||
dynamic = ["version"] | ||
description = "Software Lifecycle Management Netbox Plugin" | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
license = { text = "Apache-2.0" } | ||
authors = [ | ||
{name = "ICTU", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Environment :: Web Environment", | ||
"Framework :: Django", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
] | ||
dependencies = [] | ||
|
||
[project.optional-dependencies] | ||
build = [ | ||
"build == 1.0.3", | ||
"setuptools == 68.2.0", | ||
"twine == 3.7.1", | ||
] | ||
tools = [ | ||
"black == 23.3.0", | ||
"mypy == 1.4.1", | ||
"ruff == 0.0.275", | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "app.__version__"} | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["netbox_slm"] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ["py39"] | ||
color = true | ||
check = true | ||
diff = true | ||
fast = true | ||
|
||
[tool.mypy] | ||
python_version = "3.9" | ||
error_summary = false | ||
ignore_missing_imports = false | ||
incremental = false | ||
warn_redundant_casts = true | ||
warn_return_any = true | ||
warn_unreachable = true | ||
warn_unused_ignores = true | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
target-version = "py39" | ||
format = "github" | ||
src = ["netbox_slm"] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = [ | ||
"D104", # https://beta.ruff.rs/docs/rules/#pydocstyle-d - don't require doc strings in __init__.py files | ||
"F401", # https://beta.ruff.rs/docs/rules/#pyflakes-f - don't complain about unused imports in __init__.py files | ||
] |
Oops, something went wrong.