Skip to content

Commit b92b98e

Browse files
Merge 3880010 into f795516
2 parents f795516 + 3880010 commit b92b98e

16 files changed

+310
-183
lines changed

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
# 4 space indentation
15+
[*.py]
16+
indent_size = 4
17+
18+
[*.json]
19+
indent_size = 4
20+
21+
# 2 space indentation
22+
[*.yml]
23+
indent_size = 2
24+
25+
[*.{md,rst}]
26+
indent_size = 4
27+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
blank_issues_enabled: false
1+
---
2+
3+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/issue.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
name: "Default issue"
24
description: Report any kind of issue
35
body:
@@ -13,7 +15,8 @@ body:
1315
id: reproduction
1416
attributes:
1517
label: Reproduction steps
16-
description: Please enter an explicit description to reproduce this issue
18+
description: |
19+
Please enter an explicit description to reproduce this issue
1720
value: |
1821
1.
1922
2.
@@ -48,17 +51,38 @@ body:
4851
- other
4952
validations:
5053
required: true
54+
- type: textarea
55+
id: modbus-version
56+
attributes:
57+
label: MicroPython Modbus version
58+
description: Which version of this lib are you using?
59+
value: |
60+
# e.g. v2.3.3
61+
# use the following command to get the used version
62+
import os
63+
from umodbus import version
64+
print('MicroPython infos:', os.uname())
65+
print('Used micropthon-modbus version:', version.__version__))
66+
render: python
67+
validations:
68+
required: true
5169
- type: textarea
5270
id: logs
5371
attributes:
5472
label: Relevant log output
55-
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
73+
description: >
74+
Please copy and paste any relevant log output.
75+
This will be automatically formatted into code, so no need for
76+
backticks.
5677
render: bash
5778
- type: textarea
5879
id: usercode
5980
attributes:
6081
label: User code
61-
description: Please copy and paste any relevant user code. This will be automatically formatted into Python code, so no need for backticks.
82+
description: >
83+
Please copy and paste any relevant user code.
84+
This will be automatically formatted into Python code, so no need for
85+
backticks.
6286
render: python
6387
- type: textarea
6488
id: additional
@@ -67,4 +91,4 @@ body:
6791
description: Please provide additional informations if available
6892
placeholder: Some more informations
6993
validations:
70-
required: false
94+
required: false

.github/workflows/release.yml

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to
2-
# help make automated releases for this project
1+
---
2+
3+
# this file is *not* meant to cover or endorse the use of GitHub Actions, but
4+
# rather to help make automated releases for this project
35

46
name: Upload Python Package
57

@@ -15,42 +17,42 @@ jobs:
1517
deploy:
1618
runs-on: ubuntu-latest
1719
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v3
20-
- name: Set up Python
21-
uses: actions/setup-python@v3
22-
with:
23-
python-version: '3.9'
24-
- name: Install build dependencies
25-
run: |
26-
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
27-
- name: Build package
28-
run: |
29-
changelog2version \
30-
--changelog_file changelog.md \
31-
--version_file umodbus/version.py \
32-
--version_file_type py \
33-
--debug
34-
python setup.py sdist
35-
rm dist/*.orig
36-
# sdist call create non conform twine files *.orig, remove them
37-
- name: Publish package
38-
uses: pypa/gh-action-pypi-publish@release/v1.5
39-
with:
40-
password: ${{ secrets.PYPI_API_TOKEN }}
41-
skip_existing: true
42-
verbose: true
43-
print_hash: true
44-
- name: 'Create changelog based release'
45-
uses: brainelectronics/changelog-based-release@v1
46-
with:
47-
# note you'll typically need to create a personal access token
48-
# with permissions to create releases in the other repo
49-
# or you set the "contents" permissions to "write" as in this example
50-
changelog-path: changelog.md
51-
tag-name-prefix: ''
52-
tag-name-extension: ''
53-
release-name-prefix: ''
54-
release-name-extension: ''
55-
draft-release: true
56-
prerelease: false
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
- name: Set up Python
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: '3.9'
26+
- name: Install build dependencies
27+
run: |
28+
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
29+
- name: Build package
30+
run: |
31+
changelog2version \
32+
--changelog_file changelog.md \
33+
--version_file umodbus/version.py \
34+
--version_file_type py \
35+
--debug
36+
python setup.py sdist
37+
rm dist/*.orig
38+
# sdist call create non conform twine files *.orig, remove them
39+
- name: Publish package
40+
uses: pypa/gh-action-pypi-publish@release/v1.5
41+
with:
42+
password: ${{ secrets.PYPI_API_TOKEN }}
43+
skip_existing: true
44+
verbose: true
45+
print_hash: true
46+
- name: 'Create changelog based release'
47+
uses: brainelectronics/changelog-based-release@v1
48+
with:
49+
# note you'll typically need to create a personal access token
50+
# with permissions to create releases in the other repo
51+
# or you set the "contents" permissions to "write" as in this example
52+
changelog-path: changelog.md
53+
tag-name-prefix: ''
54+
tag-name-extension: ''
55+
release-name-prefix: ''
56+
release-name-extension: ''
57+
draft-release: true
58+
prerelease: false

.github/workflows/test-release.yaml

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to
2-
# help make automated releases for this project
1+
---
2+
3+
# this file is *not* meant to cover or endorse the use of GitHub Actions, but
4+
# rather to help make automated test releases for this project
35

46
name: Upload Python Package to test.pypi.org
57

@@ -12,55 +14,55 @@ jobs:
1214
test-deploy:
1315
runs-on: ubuntu-latest
1416
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
- name: Set up Python
18-
uses: actions/setup-python@v3
19-
with:
20-
python-version: '3.9'
21-
- name: Install build dependencies
22-
run: |
23-
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
24-
- name: Build package
25-
run: |
26-
changelog2version \
27-
--changelog_file changelog.md \
28-
--version_file umodbus/version.py \
29-
--version_file_type py \
30-
--additional_version_info="-rc${{ github.run_number }}.dev${{ github.event.number }}" \
31-
--debug
32-
python setup.py sdist
33-
- name: Test built package
34-
# sdist call creates non twine conform "*.orig" files, remove them
35-
run: |
36-
rm dist/*.orig
37-
twine check dist/*.tar.gz
38-
- name: Archive build package artifact
39-
uses: actions/upload-artifact@v3
40-
with:
41-
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
42-
# ${{ github.repository }} and ${{ github.ref_name }} can't be used for artifact name due to unallowed '/'
43-
name: dist_repo.${{ github.event.repository.name }}_sha.${{ github.sha }}_build.${{ github.run_number }}
44-
path: dist/*.tar.gz
45-
retention-days: 14
46-
- name: Publish package
47-
uses: pypa/gh-action-pypi-publish@release/v1.5
48-
with:
49-
repository_url: https://test.pypi.org/legacy/
50-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
51-
skip_existing: true
52-
verbose: true
53-
print_hash: true
54-
- name: 'Create changelog based prerelease'
55-
uses: brainelectronics/changelog-based-release@v1
56-
with:
57-
# note you'll typically need to create a personal access token
58-
# with permissions to create releases in the other repo
59-
# or you set the "contents" permissions to "write" as in this example
60-
changelog-path: changelog.md
61-
tag-name-prefix: ''
62-
tag-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
63-
release-name-prefix: ''
64-
release-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
65-
draft-release: true
66-
prerelease: true
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: '3.9'
23+
- name: Install build dependencies
24+
run: |
25+
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
26+
- name: Build package
27+
run: |
28+
changelog2version \
29+
--changelog_file changelog.md \
30+
--version_file umodbus/version.py \
31+
--version_file_type py \
32+
--additional_version_info="-rc${{ github.run_number }}.dev${{ github.event.number }}" \
33+
--debug
34+
python setup.py sdist
35+
- name: Test built package
36+
# sdist call creates non twine conform "*.orig" files, remove them
37+
run: |
38+
rm dist/*.orig
39+
twine check dist/*.tar.gz
40+
- name: Archive build package artifact
41+
uses: actions/upload-artifact@v3
42+
with:
43+
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
44+
# ${{ github.repository }} and ${{ github.ref_name }} can't be used for artifact name due to unallowed '/'
45+
name: dist_repo.${{ github.event.repository.name }}_sha.${{ github.sha }}_build.${{ github.run_number }}
46+
path: dist/*.tar.gz
47+
retention-days: 14
48+
- name: Publish package
49+
uses: pypa/gh-action-pypi-publish@release/v1.5
50+
with:
51+
repository_url: https://test.pypi.org/legacy/
52+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
53+
skip_existing: true
54+
verbose: true
55+
print_hash: true
56+
- name: 'Create changelog based prerelease'
57+
uses: brainelectronics/changelog-based-release@v1
58+
with:
59+
# note you'll typically need to create a personal access token
60+
# with permissions to create releases in the other repo
61+
# or you set the "contents" permissions to "write" as in this example
62+
changelog-path: changelog.md
63+
tag-name-prefix: ''
64+
tag-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
65+
release-name-prefix: ''
66+
release-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
67+
draft-release: true
68+
prerelease: true

0 commit comments

Comments
 (0)