Skip to content

Commit

Permalink
Merge branch 'release-v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedejaure committed Sep 9, 2024
2 parents 5d9c988 + 552779e commit 046f783
Show file tree
Hide file tree
Showing 38 changed files with 1,166 additions and 1,144 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.8.1
current_version = 1.0.0

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
Expand Down
2 changes: 0 additions & 2 deletions .darglint

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
10 changes: 5 additions & 5 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
name: autoupdate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7
with:
ref: develop

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: "3.10"

- name: Install system deps
shell: bash
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Run pre-commit
run: poetry run pre-commit run --all-files

- uses: peter-evans/create-pull-request@v5.0.2
- uses: peter-evans/create-pull-request@v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore-update-pre-commit-hooks
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: "3.10"

- name: Install system deps
shell: bash
Expand All @@ -26,13 +26,13 @@ jobs:
poetry build --ansi
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
uses: pypa/gh-action-pypi-publish@v1.10.1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
uses: pypa/gh-action-pypi-publish@v1.10.1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
Expand All @@ -43,7 +43,7 @@ jobs:
name: Create Github Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Get version from tag
id: tag_name
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2.2.2
uses: mindsers/changelog-reader-action@v2.2.3
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
Expand Down
43 changes: 23 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: "3.10"

- name: Install system deps
shell: bash
Expand All @@ -38,13 +38,13 @@ jobs:
strategy:
matrix:
os: [Ubuntu, MacOS]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -63,27 +63,29 @@ jobs:
shell: bash
run: nox --force-color -s tests-${{ matrix.python-version }}

- name: Run safety check
if: matrix.python-version == '3.11' && matrix.os == 'Ubuntu'
- name: Run security check
if: matrix.python-version == '3.12' && matrix.os == 'Ubuntu'
shell: bash
run: nox --force-color -s safety
run: nox --force-color -s security

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.4.0
with:
name: coverage-data
name: ${{ matrix.os }}-${{ matrix.python-version }}.coverage-data
path: ".coverage.*"
include-hidden-files: true
retention-days: 2

coverage:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: "3.10"

- name: Install system deps
shell: bash
Expand All @@ -93,16 +95,17 @@ jobs:
poetry config virtualenvs.in-project true
- name: Download coverage data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data
pattern: "*.coverage-data"
merge-multiple: true

- name: Create coverage report
shell: bash
run: |
nox --force-color --session=coverage -- --fmt xml
nox --force-color -s coverage-3.10 -- --fmt xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,3 @@ dmypy.json

# Pyre type checker
.pyre/

# flakeheaven
.flakeheaven_cache
24 changes: 12 additions & 12 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.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -11,20 +11,20 @@ repos:
- id: check-json
- id: end-of-file-fixer
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 24.8.0
hooks:
- id: black
- repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: flakeheaven
name: flakeheaven
description: "`FlakeHeaven` it's a Flake8 wrapper to make it cools."
entry: poetry run flakeheaven
args: [lint]
language: system
types: [python]
require_serial: true
- id: ruff
args: [ --fix ]
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: poetry-check
- id: poetry-install
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.8"
python: "3.10"

formats: []

Expand Down
12 changes: 12 additions & 0 deletions .safety-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '2.0'

# Safety Security and License Configuration file
security: # configuration for the `safety check` command
ignore-cvss-severity-below: 0 # A severity number between 0 and 10. Some helpful reference points: 9=ignore all vulnerabilities except CRITICAL severity. 7=ignore all vulnerabilities except CRITICAL
ignore-cvss-unknown-severity: False # True or False. We recommend you set this to False.
ignore-vulnerabilities: # Here you can list multiple specific vulnerabilities you want to ignore (optionally for a time period)
# We recommend making use of the optional `reason` and `expires` keys for each vulnerability that you ignore.
# 70612:
# reason: we do not use the vulnerable function
# expires: '2024-10-10'
continue-on-vulnerability-error: False # Suppress non-zero exit codes when vulnerabilities are found. Enable this in pipelines and CI/CD processes if you want to pass builds that have vulnerabilities
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.0] - 2024-09-09
### Added
- Python 3.12 support.

### Changed
- Update dependencies.

### Removed
- Python 3.8 support.
- Python 3.9 support.

## [0.8.1] - 2023-11-01
### Fixed
- docs deployment.
Expand Down Expand Up @@ -75,7 +86,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.8.1...develop
[Unreleased]: https://github.com/fedejaure/mdns-beacon/compare/v1.0.0...develop
[1.0.0]: https://github.com/fedejaure/mdns-beacon/compare/v0.8.1...v1.0.0
[0.8.1]: https://github.com/fedejaure/mdns-beacon/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/fedejaure/mdns-beacon/compare/v0.7.1...v0.8.0
[0.7.1]: https://github.com/fedejaure/mdns-beacon/compare/v0.7.0...v0.7.1
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ work, tests, or other changes before your pull request can be ultimately accepte

### Python Code Style

All Python code is linted with [Flake8](https://github.com/PyCQA/flake8) and formated with
All Python code is linted with [Ruff](https://github.com/astral-sh/ruff) and formated with
[Isort](https://github.com/PyCQA/isort) and [Black](https://github.com/psf/black). You can
execute `inv[oke] lint` and `inv[oke] format`.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![PyPI - Version](https://img.shields.io/pypi/v/mdns-beacon.svg)](https://pypi.python.org/pypi/mdns-beacon)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mdns-beacon.svg)](https://pypi.python.org/pypi/mdns-beacon)
[![Tests](https://github.com/fedejaure/mdns-beacon/workflows/tests/badge.svg)](https://github.com/fedejaure/mdns-beacon/actions?workflow=tests)
[![tests](https://github.com/fedejaure/mdns-beacon/actions/workflows/tests.yml/badge.svg)](https://github.com/fedejaure/mdns-beacon/actions/workflows/tests.yml)
[![Codecov](https://codecov.io/gh/fedejaure/mdns-beacon/branch/main/graph/badge.svg)](https://codecov.io/gh/fedejaure/mdns-beacon)
[![Read the Docs](https://readthedocs.org/projects/mdns-beacon/badge/)](https://mdns-beacon.readthedocs.io/)
[![PyPI - License](https://img.shields.io/pypi/l/mdns-beacon.svg)](https://pypi.python.org/pypi/mdns-beacon)
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx configuration."""

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
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==7.1.2
sphinx==8.0.2
recommonmark==0.7.1
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Supervisord

Supervisord example config.

.. code-block:: toml
.. code-block:: ini
[program:mdns-beacon]
command=mdns-beacon blink example --alias sub1.example --address 127.0.0.1 --type http --protocol tcp --delay-startup 180
Expand Down
11 changes: 6 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"""Nox sessions."""

import platform

import nox
from nox_poetry import Session, session

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


@session(python=python_versions)
Expand Down Expand Up @@ -34,7 +35,7 @@ def tests(session: Session) -> None:
session.notify("coverage")


@session
@session(python=python_versions)
def coverage(session: Session) -> None:
"""Produce the coverage report."""
args = session.posargs if session.posargs and len(session._runner.manifest) == 1 else []
Expand All @@ -50,8 +51,8 @@ def mypy(session: Session) -> None:
session.run("inv", "mypy")


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

0 comments on commit 046f783

Please sign in to comment.