-
Notifications
You must be signed in to change notification settings - Fork 8
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
Showing
18 changed files
with
154 additions
and
341 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,2 @@ | ||
[flake8] | ||
max-line-length = 120 |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,51 @@ | ||
# This workflows will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
# see: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
name: Publish Python 🐍 distribution 📦 to PyPI | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
on: push | ||
|
||
jobs: | ||
deploy: | ||
|
||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5.1.0 | ||
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-healthcheck-plugin | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,5 +1,14 @@ | ||
# Changelog | ||
|
||
## 0.1.2 (2024-04-08) | ||
|
||
* Fix django-health-check dependency in pyproject.toml | ||
|
||
## 0.1.2 (2024-04-05) | ||
|
||
* General cleanup | ||
|
||
## 0.1.0 (2023-01-18) | ||
|
||
* First release on PyPI. | ||
|
Oops, something went wrong.