-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit abcd1c1
Showing
45 changed files
with
1,699 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM mcr.microsoft.com/devcontainers/python:3 | ||
|
||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install 'flit>=3.8.0' | ||
|
||
ENV FLIT_ROOT_INSTALL=1 | ||
|
||
COPY pyproject.toml . | ||
RUN touch README.md \ | ||
&& mkdir -p src/python_package \ | ||
&& python -m flit install --only-deps --deps develop \ | ||
&& rm -r pyproject.toml README.md src |
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,44 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda | ||
{ | ||
"name": "Python Environment", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": ".." | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"editorconfig.editorconfig", | ||
"github.vscode-pull-request-github", | ||
"ms-azuretools.vscode-docker", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-python.pylint", | ||
"ms-python.isort", | ||
"ms-python.flake8", | ||
"ms-python.black-formatter", | ||
"ms-vsliveshare.vsliveshare", | ||
"ryanluker.vscode-coverage-gutters", | ||
"bungcip.better-toml", | ||
"GitHub.copilot" | ||
], | ||
"settings": { | ||
"python.defaultInterpreterPath": "/usr/local/bin/python", | ||
"black-formatter.path": [ | ||
"/usr/local/py-utils/bin/black" | ||
], | ||
"pylint.path": [ | ||
"/usr/local/py-utils/bin/pylint" | ||
], | ||
"flake8.path": [ | ||
"/usr/local/py-utils/bin/flake8" | ||
], | ||
"isort.path": [ | ||
"/usr/local/py-utils/bin/isort" | ||
] | ||
} | ||
} | ||
}, | ||
"onCreateCommand": "pre-commit install-hooks" | ||
} |
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,21 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.bat] | ||
indent_style = tab | ||
end_of_line = crlf | ||
|
||
[LICENSE] | ||
insert_final_newline = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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,2 @@ | ||
[flake8] | ||
max-line-length = 120 |
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,61 @@ | ||
--- | ||
name: 🐛 Bug Report | ||
description: Report a reproducible bug in the current release of NetBox ptov Plugin | ||
labels: ["type: bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
**NOTE:** This form is only for reporting _reproducible bugs_ in a current NetBox ptov Plugin release. | ||
- type: input | ||
attributes: | ||
label: NetBox ptov Plugin version | ||
description: What version of NetBox ptov Plugin are you currently running? | ||
placeholder: v0.1.0 | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: NetBox version | ||
description: What version of NetBox are you currently running? | ||
placeholder: v3.6.0 | ||
validations: | ||
required: true | ||
- type: dropdown | ||
attributes: | ||
label: Python version | ||
description: What version of Python are you currently running? | ||
options: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Steps to Reproduce | ||
description: > | ||
Please provide a minimal working example to demonstrate the bug. Begin with the | ||
initialization of any necessary database objects and clearly enumerate each | ||
operation carried out. Ensure that your example is as concise as possible | ||
while adequately illustrating the issue. | ||
_Please refrain from including any confidential or sensitive | ||
information in your example._ | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Expected Behavior | ||
description: What did you expect to happen? | ||
placeholder: The script should execute without raising any errors or exceptions | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Observed Behavior | ||
description: What happened instead? | ||
placeholder: A TypeError exception was raised | ||
validations: | ||
required: true |
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,12 @@ | ||
# Reference: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 📖 Contributing Policy | ||
url: https://github.com/menckend/netbox-ptov-plugin/blob/main/CONTRIBUTING.md | ||
about: "Please read through our contributing policy before opening an issue or pull request." | ||
- name: ❓ Discussion | ||
url: https://github.com/menckend/netbox-ptov-plugin/discussions | ||
about: "If you're just looking for help, try starting a discussion instead." | ||
- name: 💬 Community Slack | ||
url: https://netdev.chat | ||
about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems." |
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,59 @@ | ||
--- | ||
name: ✨ Feature Request | ||
description: Propose a new NetBox ptov Plugin feature or enhancement | ||
labels: ["type: feature"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
**NOTE:** This form is only for submitting well-formed proposals to extend or modify | ||
NetBox ptov Plugin in some way. If you're trying to solve a problem but can't figure out how, or if | ||
you still need time to work on the details of a proposed new feature, please start a | ||
[discussion](https://github.com/netbox-community/pynetbox/discussions) instead. | ||
- type: input | ||
attributes: | ||
label: NetBox ptov Plugin version | ||
description: What version of NetBox ptov Plugin are you currently running? | ||
placeholder: v0.1.0 | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: NetBox version | ||
description: What version of NetBox are you currently running? | ||
placeholder: v3.6.0 | ||
validations: | ||
required: true | ||
- type: dropdown | ||
attributes: | ||
label: Feature type | ||
options: | ||
- Data model extension | ||
- New functionality | ||
- Change to existing functionality | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Proposed functionality | ||
description: > | ||
Describe in detail the new feature or behavior you are proposing. Include any specific changes | ||
to work flows, data models, and/or the user interface. The more detail you provide here, the | ||
greater chance your proposal has of being discussed. Feature requests which don't include an | ||
actionable implementation plan will be rejected. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Use case | ||
description: > | ||
Explain how adding this functionality would benefit NetBox ptov Plugin users. What need does it address? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: External dependencies | ||
description: > | ||
List any new dependencies on external libraries or services that this new feature would | ||
introduce. For example, does the proposal require the installation of a new Python package? | ||
(Not all new features introduce new dependencies.) |
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,24 @@ | ||
--- | ||
name: 🏡 Housekeeping | ||
description: A change pertaining to the codebase itself (developers only) | ||
labels: ["type: housekeeping"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
**NOTE:** This template is for use by maintainers only. Please do not submit | ||
an issue using this template unless you have been specifically asked to do so. | ||
- type: textarea | ||
attributes: | ||
label: Proposed Changes | ||
description: > | ||
Describe in detail the new feature or behavior you'd like to propose. | ||
Include any specific changes to work flows, data models, or the user interface. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Justification | ||
description: Please provide justification for the proposed change(s). | ||
validations: | ||
required: true |
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,18 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- run: pip install mkdocs-material mkdocs-autorefs mkdocs-material-extensions mkdocstrings mkdocstrings-python-legacy mkdocs-include-markdown-plugin | ||
- run: mkdocs gh-deploy --force |
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,51 @@ | ||
# see: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
name: Publish Python 🐍 distribution 📦 to PyPI | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/netbox-ptov-plugin | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
Oops, something went wrong.