Skip to content

Commit 92b1aa5

Browse files
Pypi readme (#133)
* Added README_pypi.md generation * Upversioned to 1.6.1
1 parent 2734c80 commit 92b1aa5

File tree

6 files changed

+29
-4
lines changed

6 files changed

+29
-4
lines changed

.github/workflows/python-build-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
python -m pip install pytest build
3030
# pip install -r requirements.txt # Install your dependencies
3131
32+
- name: Create pypi README.md
33+
run: |
34+
python build-tools\build_pypi_doc.py
35+
dir
36+
3237
- name: Create SDK directory
3338
shell: pwsh
3439
run: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ Current PicoScope support:
4747
- [pypi-nightly (dev repo)](https://pypi.org/project/pypicosdk-nightly/)
4848

4949
## Version Control
50-
pyPicoSDK: 1.6.0
50+
pyPicoSDK: 1.6.1
5151

5252
Docs: 0.4.0

build-tools/build_pypi_doc.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# pylint: skip-file
2+
# flake8: noqa
3+
import re
4+
5+
string = '<!-- start here -->'
6+
string_len = len(string)
7+
with open('README.md') as f:
8+
readme = f.read()
9+
10+
index = readme.find(string) + string_len + 1
11+
img_str = '''<p align="center">
12+
<img src="https://raw.githubusercontent.com/JamesPicoTech/pyPicoSDK/refs/heads/main/docs/docs/img/pypicosdk-light-300x300.png" alt="Fancy logo">
13+
</p>
14+
15+
'''
16+
17+
new_readme = img_str + readme[index:]
18+
19+
with open('README_pypi.md', 'w') as f:
20+
f.write(new_readme)

pypicosdk/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
VERSION = "1.6.0"
2+
VERSION = "1.6.1"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ keywords = [
1313
"electronic"
1414
]
1515
description = "Modern Python wrapper for PicoSDK"
16-
readme = "README.md"
16+
readme = "README_pypi.md"
1717
requires-python = ">=3.10"
1818
license = { file = "LICENSE" }
1919
authors = [

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Master version file for all scripts.
22
# Update these variables and run a build-tool (which will run version_updater.py)
33
docs_version = "0.4.0"
4-
package_version = "1.6.0"
4+
package_version = "1.6.1"

0 commit comments

Comments
 (0)