Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MQTTv5 UTransport methods #1

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ruff.toml

line-length = 120

# Exclude specific files or directories.
exclude = [
"build/",
"dist/",
".venv/",
"__pycache__/",

]

[lint]
# Enable all basic PEP 8 checks and other common linting rules.
select = [
"E", # PEP 8 rules (formatting issues)
"F", # Pyflakes rules (undefined names, etc.)
"W", # Additional PEP 8 rules (warning-level issues)
"I", # Import order checker (ensuring imports are ordered correctly)
"ERA", # flake8-eradicate (identifying commented-out code)
"N" # Naming convention rules
]

ignore = [
"F811", # Ignore the error for multimethod function
"N999" # Invalid module name: 'up-python'
]

[lint.flake8-annotations]
allow-star-arg-any = true

[format]
quote-style = "preserve"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 100
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Run Linter

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
lint:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3


- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff

- name: Lint Python Code with Ruff
run: |
ruff check --config .github/ruff.toml

- name: Check Python Code Formatting with Ruff
run: |
ruff format --check --config .github/ruff.toml
49 changes: 49 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry

- name: Install dependencies
run: |
poetry install

- name: Build package
run: poetry build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode/**
**/.coverage
**/__pycache__
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Code of Conduct

The Eclipse Foundation has a code of conduct that all projects must adhere to. the standard code of conduct that all Eclipse projects must adhere are defined in the following documents:

- https://raw.githubusercontent.com/eclipse/.github/master/CODE_OF_CONDUCT.md[Eclipse Code of Conduct]
- https://www.eclipse.org/projects/handbook/[Eclipse Foundation Handbook]
- https://www.eclipse.org/legal/committerguidelines.php[Eclipse Committer Due Diligence Guidelines]

We (the committers) aim to run this project in an open and fair manner where contributions are encouraged from all companies and individuals. We aim for high quality, well documented and tested software that can be used in production environments.

This document shall outline additional roles and responsibilities for committers and project leads to ensure the project is well maintained and supported to be useable in production environments.

## Committers
https://www.eclipse.org/projects/handbook/#roles-cm[Eclipse-uProtocol Committers] play a vital role to ensure contributions from others (and themselves) follow the vision and mission of the project as well. In this section we will outline how committers are nominated, retired, and their duties while in service.

### Duties

* Contribute to specifications by providing feedback, code contributions in up-spec, up-core-api repos
* Ensure all contributors (including themselves) adhere to this code of conduct, the Eclipse Foundation Handbook, and the vision & mission of the project
* Make _significant_ code contributions to one or more repositories in the Eclipse-uProtocol project
* Review and provide feedback to pull requests from other contributors
* _Actively_ participate in weekly/bi-weekly project meetings

### Nomination
Contributors are nominated by a uProtocol Committer when they meet the https://www.eclipse.org/projects/handbook/#elections-committer[Eclipse Committer Nomination Process] requirements and are actively performing the duties of a committer mentioned above.

### Retirement
Per https://www.eclipse.org/projects/handbook/#elections-retire-cm[Eclipse Foundation Handbook], Committers may retire for one of the following reasons:

1. Their own volition
2. By the project lead (with supporting justification)

Non-exhaustive examples for early retirement might be:
- Inactivity over extended period of time
- Repeated violations of this code of conduct (ex. obstructing progress during discussions/PRs without valid justification, intentional damage of various repos/projects, etc...)

All communication regarding committer nominations and retirement, *SHALL* be sent to the [email protected] mailing list.


## Project Lead
In addition to the duties mentioned in https://www.eclipse.org/projects/handbook/#roles-pl[Eclipse Contributor Handbook], project leads *MUST* also fulfill the Committer <<Duties>> defined above.


'''

NOTE: Violation to this code of conduct should be reported to the https://gitlab.eclipse.org/eclipsefdn/emo-team/emo/-/issues[Eclipse Foundation Management Office (EMO)]
36 changes: 36 additions & 0 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
= Contributing to Eclipse uProtocol

Thanks for your interest in this project. Contributions are welcome!

== Developer resources

Information regarding source code management, builds, coding standards, and
more.

https://projects.eclipse.org/proposals/eclipse-uprotocol

The project maintains the following source code repositories

* https://github.com/eclipse-uprotocol

== Eclipse Contributor Agreement

Before your contribution can be accepted by the project team contributors must
electronically sign the Eclipse Contributor Agreement (ECA).

* http://www.eclipse.org/legal/ECA.php

Commits that are provided by non-committers must have a Signed-off-by field in
the footer indicating that the author is aware of the terms by which the
contribution has been provided to the project. The non-committer must
additionally have an Eclipse Foundation account and must have a signed Eclipse
Contributor Agreement (ECA) on file.

For more information, please see the Eclipse Committer Handbook:
https://www.eclipse.org/projects/handbook/#resources-commit

== Contact

Contact the project developers via the project's "dev" list.

* https://accounts.eclipse.org/mailing-list/uprotocol-dev
Loading