Skip to content

Commit

Permalink
Merge pull request #103 from natekspencer/dev
Browse files Browse the repository at this point in the history
Use dynamic versioning to publish on release
  • Loading branch information
natekspencer authored Jun 26, 2023
2 parents ee5d00d + 8e11512 commit e420527
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 253 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
23 changes: 23 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# An action to build and publish python package to https://pypi.org/ using poetry https://github.com/sdispater/poetry
# For more information see: https://github.com/marketplace/actions/publish-python-poetry-package

name: Publish python package

on:
push:
tags:
- "v?*.*.*"

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
plugins: "poetry-dynamic-versioning-plugin"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Nathan Spencer
Copyright (c) 2021-2023 Nathan Spencer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
495 changes: 253 additions & 242 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vivintpy"
version = "2023.3.3"
version = "0.0.0"
description = "Python library for interacting with a Vivint security and smart home system."
authors = ["Nathan Spencer <[email protected]>"]
license = "MIT"
Expand All @@ -17,7 +17,7 @@ pubnub = "^7.0"
grpcio = "1.56.0"
protobuf = "^4.22.1"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
tox = "^3.28.0"
pytest = "^7.2.2"
pytest-asyncio = "^0.21.0"
Expand All @@ -31,6 +31,12 @@ pydocstyle = "^6.3.0"
pylint = "^2.17.4"
grpcio-tools = "1.51.1"

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
pattern = "default-unprefixed"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
2 changes: 1 addition & 1 deletion tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

def test_version() -> None:
"""Test version."""
assert __version__ == "2023.3.3"
assert __version__ == "0.0.0"
2 changes: 1 addition & 1 deletion vivintpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Provide a package for vivintpy."""
__version__ = "2023.3.3"
__version__ = "0.0.0"
4 changes: 1 addition & 3 deletions vivintpy/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ def device_type(self) -> DeviceType:
return DeviceType(self.data.get(Attribute.TYPE))

@property
def features(
self,
) -> list[FeatureType] | None:
def features(self) -> list[FeatureType] | None:
"""Device Features."""
return self._features

Expand Down

0 comments on commit e420527

Please sign in to comment.