Skip to content

Commit

Permalink
Merge pull request #64 from brainelectronics/feature/support-mip-inst…
Browse files Browse the repository at this point in the history
…allation

Support mip installation
  • Loading branch information
brainelectronics authored Mar 20, 2023
2 parents f795516 + 2d11448 commit 2975f78
Show file tree
Hide file tree
Showing 17 changed files with 354 additions and 183 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# 4 space indentation
[*.py]
indent_size = 4

[*.json]
indent_size = 4

# 2 space indentation
[*.yml]
indent_size = 2

[*.{md,rst}]
indent_size = 4
trim_trailing_whitespace = false
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
blank_issues_enabled: false
---

blank_issues_enabled: false
32 changes: 28 additions & 4 deletions .github/ISSUE_TEMPLATE/issue.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---

name: "Default issue"
description: Report any kind of issue
body:
Expand All @@ -13,7 +15,8 @@ body:
id: reproduction
attributes:
label: Reproduction steps
description: Please enter an explicit description to reproduce this issue
description: |
Please enter an explicit description to reproduce this issue
value: |
1.
2.
Expand Down Expand Up @@ -48,17 +51,38 @@ body:
- other
validations:
required: true
- type: textarea
id: modbus-version
attributes:
label: MicroPython Modbus version
description: Which version of this lib are you using?
value: |
# e.g. v2.3.3
# use the following command to get the used version
import os
from umodbus import version
print('MicroPython infos:', os.uname())
print('Used micropthon-modbus version:', version.__version__))
render: python
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
description: >
Please copy and paste any relevant log output.
This will be automatically formatted into code, so no need for
backticks.
render: bash
- type: textarea
id: usercode
attributes:
label: User code
description: Please copy and paste any relevant user code. This will be automatically formatted into Python code, so no need for backticks.
description: >
Please copy and paste any relevant user code.
This will be automatically formatted into Python code, so no need for
backticks.
render: python
- type: textarea
id: additional
Expand All @@ -67,4 +91,4 @@ body:
description: Please provide additional informations if available
placeholder: Some more informations
validations:
required: false
required: false
84 changes: 43 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to
# help make automated releases for this project
---

# this file is *not* meant to cover or endorse the use of GitHub Actions, but
# rather to help make automated releases for this project

name: Upload Python Package

Expand All @@ -15,42 +17,42 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install build dependencies
run: |
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
- name: Build package
run: |
changelog2version \
--changelog_file changelog.md \
--version_file umodbus/version.py \
--version_file_type py \
--debug
python setup.py sdist
rm dist/*.orig
# sdist call create non conform twine files *.orig, remove them
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
verbose: true
print_hash: true
- name: 'Create changelog based release'
uses: brainelectronics/changelog-based-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
# or you set the "contents" permissions to "write" as in this example
changelog-path: changelog.md
tag-name-prefix: ''
tag-name-extension: ''
release-name-prefix: ''
release-name-extension: ''
draft-release: true
prerelease: false
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install build dependencies
run: |
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
- name: Build package
run: |
changelog2version \
--changelog_file changelog.md \
--version_file umodbus/version.py \
--version_file_type py \
--debug
python setup.py sdist
rm dist/*.orig
# sdist call create non conform twine files *.orig, remove them
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
verbose: true
print_hash: true
- name: 'Create changelog based release'
uses: brainelectronics/changelog-based-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
# or you set the "contents" permissions to "write" as in this example
changelog-path: changelog.md
tag-name-prefix: ''
tag-name-extension: ''
release-name-prefix: ''
release-name-extension: ''
draft-release: true
prerelease: false
110 changes: 56 additions & 54 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to
# help make automated releases for this project
---

# this file is *not* meant to cover or endorse the use of GitHub Actions, but
# rather to help make automated test releases for this project

name: Upload Python Package to test.pypi.org

Expand All @@ -12,55 +14,55 @@ jobs:
test-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install build dependencies
run: |
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
- name: Build package
run: |
changelog2version \
--changelog_file changelog.md \
--version_file umodbus/version.py \
--version_file_type py \
--additional_version_info="-rc${{ github.run_number }}.dev${{ github.event.number }}" \
--debug
python setup.py sdist
- name: Test built package
# sdist call creates non twine conform "*.orig" files, remove them
run: |
rm dist/*.orig
twine check dist/*.tar.gz
- name: Archive build package artifact
uses: actions/upload-artifact@v3
with:
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# ${{ github.repository }} and ${{ github.ref_name }} can't be used for artifact name due to unallowed '/'
name: dist_repo.${{ github.event.repository.name }}_sha.${{ github.sha }}_build.${{ github.run_number }}
path: dist/*.tar.gz
retention-days: 14
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
repository_url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
skip_existing: true
verbose: true
print_hash: true
- name: 'Create changelog based prerelease'
uses: brainelectronics/changelog-based-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
# or you set the "contents" permissions to "write" as in this example
changelog-path: changelog.md
tag-name-prefix: ''
tag-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
release-name-prefix: ''
release-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
draft-release: true
prerelease: true
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install build dependencies
run: |
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
- name: Build package
run: |
changelog2version \
--changelog_file changelog.md \
--version_file umodbus/version.py \
--version_file_type py \
--additional_version_info="-rc${{ github.run_number }}.dev${{ github.event.number }}" \
--debug
python setup.py sdist
- name: Test built package
# sdist call creates non twine conform "*.orig" files, remove them
run: |
rm dist/*.orig
twine check dist/*.tar.gz
- name: Archive build package artifact
uses: actions/upload-artifact@v3
with:
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# ${{ github.repository }} and ${{ github.ref_name }} can't be used for artifact name due to unallowed '/'
name: dist_repo.${{ github.event.repository.name }}_sha.${{ github.sha }}_build.${{ github.run_number }}
path: dist/*.tar.gz
retention-days: 14
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
repository_url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
skip_existing: true
verbose: true
print_hash: true
- name: 'Create changelog based prerelease'
uses: brainelectronics/changelog-based-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
# or you set the "contents" permissions to "write" as in this example
changelog-path: changelog.md
tag-name-prefix: ''
tag-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
release-name-prefix: ''
release-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
draft-release: true
prerelease: true
Loading

0 comments on commit 2975f78

Please sign in to comment.