Skip to content

Commit

Permalink
Merge branch 'release-v0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedejaure committed Jan 15, 2023
2 parents 45cb876 + a2e48eb commit b4f7a85
Show file tree
Hide file tree
Showing 13 changed files with 1,285 additions and 716 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = True
tag = False
current_version = 0.7.0
current_version = 0.7.1

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files

- uses: peter-evans/create-pull-request@v4.0.4
- uses: peter-evans/create-pull-request@v4.2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore-update-pre-commit-hooks
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
poetry build --ansi
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2.1.1
uses: mindsers/changelog-reader-action@v2.2.2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install system deps
shell: bash
run: |
pip install nox
pip install nox-poetry
pip install poetry
poetry config virtualenvs.in-project true
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Install system deps
shell: bash
run: |
pip install nox
pip install nox-poetry
pip install poetry
poetry config virtualenvs.in-project true
Expand All @@ -97,6 +97,6 @@ jobs:
nox --force-color --session=coverage -- --fmt xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.0
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -11,27 +11,27 @@ repos:
- id: check-json
- id: end-of-file-fixer
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
rev: 5.11.4
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/flakeheaven/flakeheaven
rev: 2.0.0
rev: 3.2.1
hooks:
- id: flakeheaven
additional_dependencies: [
'flake8~=4.0.1',
'flake8-builtins~=1.5.3',
'flake8-builtins~=2.0.0',
'flake8-blind-except~=0.2.1',
'flake8-logging-format~=0.6.0',
'flake8-bugbear~=22.7.1',
'flake8-annotations~=2.9.0',
'flake8-logging-format~=0.8.1',
'flake8-bugbear~=22.10.25',
'flake8-annotations~=2.9.1',
'flake8-docstrings~=1.6.0',
'flake8-bandit~=3.0.0',
'flake8-broken-line~=0.4.0',
'flake8-broken-line~=0.6.0',
'darglint~=1.8.1',
'pylint~=2.14.5',
'pylint~=2.15.5',
]
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.1] - 2023-01-15
### Changed
- Update dependencies.

## [0.7.0] - 2022-07-24
### Changed
- Update dependencies.
Expand Down Expand Up @@ -60,7 +64,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- First release on PyPI.

[Unreleased]: https://github.com/fedejaure/mdns-beacon/compare/v0.7.0...develop
[Unreleased]: https://github.com/fedejaure/mdns-beacon/compare/v0.7.1...develop
[0.7.1]: https://github.com/fedejaure/mdns-beacon/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/fedejaure/mdns-beacon/compare/v0.6.1...v0.7.0
[0.6.1]: https://github.com/fedejaure/mdns-beacon/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/fedejaure/mdns-beacon/compare/v0.5.0...v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sphinx==5.0.2
sphinx==6.1.3
recommonmark==0.7.1
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[mypy]

[mypy-pytest,invoke.*,nox.*,click_option_group.*]
[mypy-pytest,invoke.*,nox.*,nox_poetry.*,click_option_group.*]
allow_redefinition = false
check_untyped_defs = true
ignore_errors = false
Expand Down
51 changes: 9 additions & 42 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,49 +1,18 @@
"""Nox sessions."""
import platform
import tempfile
from typing import Any

import nox
from nox.sessions import Session
from nox_poetry import Session, session

nox.options.sessions = ["tests", "mypy"]
python_versions = ["3.8", "3.9", "3.10"]


def install_with_constraints(session: Session, *args: str, **kwargs: Any) -> None:
"""Install packages constrained by Poetry's lock file.
This function is a wrapper for nox.sessions.Session.install. It
invokes pip to install packages inside of the session's virtualenv.
Additionally, pip is passed a constraints file generated from
Poetry's lock file, to ensure that the packages are pinned to the
versions specified in poetry.lock. This allows you to manage the
packages as Poetry development dependencies.
Arguments:
session: The Session object.
args: Command-line arguments for pip.
kwargs: Additional keyword arguments for Session.install.
"""
with tempfile.NamedTemporaryFile(delete=False) as requirements:
session.run(
"poetry",
"export",
"--dev",
"--without-hashes",
"--format=requirements.txt",
f"--output={requirements.name}",
external=True,
)
session.install(f"--constraint={requirements.name}", *args, **kwargs)


@nox.session(python=python_versions)
@session(python=python_versions)
def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".")
install_with_constraints(
session,
session.install(
"invoke",
"pytest",
"xdoctest",
Expand All @@ -65,26 +34,24 @@ def tests(session: Session) -> None:
session.notify("coverage")


@nox.session
@session
def coverage(session: Session) -> None:
"""Produce the coverage report."""
args = session.posargs if session.posargs and len(session._runner.manifest) == 1 else []
install_with_constraints(session, "invoke", "coverage[toml]")
session.install("invoke", "coverage[toml]")
session.run("inv", "coverage", *args)


@nox.session(python=python_versions)
@session(python=python_versions)
def mypy(session: Session) -> None:
"""Type-check using mypy."""
session.install(".")
install_with_constraints(
session, "invoke", "mypy", "pytest-mock", "types-click", "types-python-slugify"
)
session.install("invoke", "mypy", "pytest-mock", "types-click", "types-python-slugify")
session.run("inv", "mypy")


@nox.session(python="3.10")
@session(python="3.10")
def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
install_with_constraints(session, "invoke", "safety")
session.install("invoke", "safety")
session.run("inv", "safety")
Loading

0 comments on commit b4f7a85

Please sign in to comment.