Skip to content

Commit

Permalink
Merge branch 'release/0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Aug 19, 2023
2 parents b7b9646 + 3b37c11 commit 0e171b2
Show file tree
Hide file tree
Showing 27 changed files with 1,096 additions and 626 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:

- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
time: "09:00"
timezone: Europe/Dublin
open-pull-requests-limit: 10
target-branch: develop

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
time: "09:00"
timezone: Europe/Dublin
open-pull-requests-limit: 10
target-branch: develop
125 changes: 125 additions & 0 deletions .github/workflows/test_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Test and Publish

on:
push:

pull_request:
branches: [ 'develop' ]

jobs:
is-duplicate:
name: Is Duplicate
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip-check.outputs.should_skip }}
permissions:
actions: write
contents: read

steps:
- id: skip-check
name: Skip Check
uses: fkirc/skip-duplicate-actions@master
with:
paths_ignore: '["**.rst", "**.md", "**.txt"]'

test-code:
name: Test code
runs-on: ${{ matrix.os }}
needs: is-duplicate
if: needs.is-duplicate.outputs.should_skip != 'true'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with Tox
run: tox

test-docs:
name: Test documentation
runs-on: ubuntu-latest
needs: is-duplicate
if: needs.is-duplicate.outputs.should_skip != 'true'
env:
PYTHON_VERSION: '3.x'
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[docs]
- name: Build documentation
working-directory: docs
run: make html

publish-to-test-pypi:
name: Publish to TestPyPI
runs-on: ubuntu-latest
environment:
name: staging
url: https://test.pypi.org/project/hdlcontroller/
permissions:
# Required for trusted publishing on PyPI.
id-token: write
needs: [test-code, test-docs]
if: |
!failure() &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Publish to TestPyPI
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/
print-hash: true

publish-to-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: production
url: https://pypi.org/project/hdlcontroller/
permissions:
# Required for trusted publishing on PyPI.
id-token: write
needs: [publish-to-test-pypi]
if: |
!failure() &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Publish to PyPI
uses: pypa/[email protected]
with:
print-hash: true
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0
hooks:
- id: check-ast
- id: check-yaml
- id: trailing-whitespace

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: e812d61e6e9d269f44ecda63904ed670a1948fe8 # frozen: v0.0.257
hooks:
- id: ruff

- repo: https://github.com/pycqa/isort
rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: b0d1fba7ac3be53c71fb0d3211d911e629f8aecb # frozen: 23.1.0
hooks:
- id: black
2 changes: 0 additions & 2 deletions .snyk

This file was deleted.

28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2017 Paul-Emmanuel Raoul <[email protected]>
Copyright (c) 2015-2023 Paul-Emmanuel Raoul <[email protected]>

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
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

44 changes: 26 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
Python HDLC Controller
======================

|PyPI Package| |Build Status| |Code Coverage| |Documentation Status|
|PyPI Package| |PyPI Downloads| |PyPI Python Versions| |Build Status|
|Documentation Status|

HDLC controller written in Python and based on the
`python4yahdlc <https://github.com/SkypLabs/python4yahdlc>`__ Python
module to encode and decode the HDLC frames.
HDLC_ controller written in Python and based on the `python4yahdlc
<https://github.com/SkypLabs/python4yahdlc>`__ Python module to encode and
decode the HDLC frames.

Installation
============

With pip (recommended)
From PyPI (recommended)
----------------------

::
Expand All @@ -30,25 +31,32 @@ From sources
Documentation
=============

The full documentation is available `here <https://python-hdlc-controller.readthedocs.io/en/latest/>`__.
The full documentation is available `here
<https://python-hdlc-controller.readthedocs.io/en/latest/>`__.

License
=======

`MIT <http://opensource.org/licenses/MIT>`__
`MIT <https://opensource.org/license/mit/>`__

.. _HDLC: https://en.wikipedia.org/wiki/High-Level_Data_Link_Control

.. |Build Status| image:: https://github.com/SkypLabs/python-hdlc-controller/actions/workflows/test_and_publish.yml/badge.svg?branch=develop
:target: https://github.com/SkypLabs/python-hdlc-controller/actions/workflows/test_and_publish.yml?branch=develop
:alt: Build Status Develop Branch

.. |Build Status| image:: https://travis-ci.org/SkypLabs/python-hdlc-controller.svg
:target: https://travis-ci.org/SkypLabs/python-hdlc-controller
:alt: Build Status
.. |Code Coverage| image:: https://api.codacy.com/project/badge/Grade/07336c5b36504927ab5c44550da13adf
:target: https://www.codacy.com/app/skyper/python-hdlc-controller?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=SkypLabs/python-hdlc-controller&amp;utm_campaign=Badge_Grade
:alt: Code Coverage
.. |Documentation Status| image:: https://readthedocs.org/projects/python-hdlc-controller/badge/?version=latest
:target: https://python-hdlc-controller.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. |Known Vulnerabilities| image:: https://snyk.io/test/github/SkypLabs/python-hdlc-controller/badge.svg
:target: https://snyk.io/test/github/SkypLabs/python-hdlc-controller
:alt: Known Vulnerabilities

.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/hdlcontroller.svg?style=flat
:target: https://pypi.org/project/hdlcontroller/
:alt: PyPI Package Downloads Per Month

.. |PyPI Package| image:: https://badge.fury.io/py/hdlcontroller.svg
:target: https://badge.fury.io/py/hdlcontroller
:alt: PyPI Package
:target: https://pypi.org/project/hdlcontroller/
:alt: PyPI Package Latest Release

.. |PyPI Python Versions| image:: https://img.shields.io/pypi/pyversions/hdlcontroller.svg?logo=python&style=flat
:target: https://pypi.org/project/hdlcontroller/
:alt: PyPI Package Python Versions
82 changes: 0 additions & 82 deletions bin/hdlc_test

This file was deleted.

Loading

0 comments on commit 0e171b2

Please sign in to comment.