Skip to content

Commit

Permalink
Merge pull request #25 from VCTLabs/workflows
Browse files Browse the repository at this point in the history
workflow triggers
  • Loading branch information
sarnold authored Apr 13, 2022
2 parents a8ff1c9 + e9c5e68 commit f7816f4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request:
push:
branches: [ main ]
branches: [ master ]

jobs:
build:
Expand All @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, '3.10']
steps:
- name: Set git crlf/eol
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request:
push:
branches: [ main ]
branches: [ master ]

jobs:
pylint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, '3.10']

steps:
- name: Set git crlf/eol
Expand All @@ -46,7 +46,7 @@ jobs:
tox -e deploy
- name: Upload artifacts
if: matrix.python-version == 3.8 && runner.os == 'Linux'
if: matrix.python-version == 3.8 && runner.os != 'Windows'
uses: actions/upload-artifact@v2
with:
name: wheels
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request:
push:
branches: [ main ]
branches: [ master ]

jobs:
build:
Expand All @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, '3.10']

steps:
- name: Set git crlf/eol
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.8, 3.9]
python-version: [3.6, 3.8, '3.10']

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ the CP210x always uses 500kBit/sec as baudrate.
TODO
----

* Test on other than CP2102
* Implement CP2103 GIOP settings
* Implement GUI
* (re)Test on CP2102 and CP2103 (legacy parts)
* read config blob from CP2102N (new part)

Model notes
-----------
Expand All @@ -90,7 +89,7 @@ Taken from the respective device Data Sheets:
* CP2104 - EPROM only (1024 byte, not re-programmable)
* CP2105 - EPROM only (296 byte, not re-programmable)
* CP2109 - EPROM only (1024 byte, not re-programmable)
* CP2102N - EEPROM (960 byte) **does not work**
* CP2102N - EEPROM (960 byte) **will not work** with legacy ``cp210x-program``

The following table from AN721 shows the default SiLabs USB device IDs; note
third-party manufacturers often do not reprogram with their own vendor/product
Expand Down
6 changes: 2 additions & 4 deletions test_platform_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
:00000001FF
'''

orig_hex_data_bytes = bytes(orig_hex_data.encode('utf-8'))
orig_hex_file = "cp2102-orig.hex"
orig_hex_data_bytes = bytes(orig_hex_data.encode('utf-8'))

out_file = 'test.out'
stdout_file = 'test2.out'
Expand All @@ -84,7 +84,7 @@
def test_text_file_io():
orig_hex_data_txt = out_path.joinpath(orig_hex_file).read_text()

assert orig_hex_data == orig_hex_data_txt
assert orig_hex_data_txt == orig_hex_data


def test_bin_file_io():
Expand All @@ -96,14 +96,12 @@ def test_bin_file_io():
def test_hex_file_output():
outfile = out_path.joinpath(out_file)

#for child in out_path.iterdir(): print(child)
assert outfile.read_text() == orig_hex_data
assert outfile.read_bytes() == orig_hex_data_bytes


def test_hex_file_stdout():
outfile = out_path.joinpath(stdout_file)

#for child in out_path.iterdir(): print(child)
assert outfile.read_text() == orig_hex_data
assert outfile.read_bytes() == orig_hex_data_bytes

0 comments on commit f7816f4

Please sign in to comment.