Skip to content

Commit cf36ebd

Browse files
Pypi README fix (#134)
* Fix pypi readme * Upversioned to 1.6.1
1 parent 92b1aa5 commit cf36ebd

File tree

3 files changed

+73
-2
lines changed

3 files changed

+73
-2
lines changed

build-tools/version_updater.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@
1111
sys.path.append(parent_dir)
1212
from version import docs_version, package_version
1313

14+
IMG_STR = '''<p align="center">
15+
<img src="https://raw.githubusercontent.com/JamesPicoTech/pyPicoSDK/refs/heads/main/docs/docs/img/pypicosdk-light-300x300.png" alt="Fancy logo">
16+
</p>
17+
18+
'''
19+
20+
def build_pypi_doc():
21+
"Create a pypi readme"
22+
string = '<!-- start here -->'
23+
string_len = len(string)
24+
with open('README.md') as f:
25+
readme = f.read()
26+
27+
index = readme.find(string) + string_len + 1
28+
29+
new_readme = IMG_STR + readme[index:]
30+
31+
with open('pypi.md', 'w') as f:
32+
f.write(new_readme)
33+
1434

1535
def update_lines(file_path, start_with, replacement_string):
1636
with open(file_path, 'r') as f:
@@ -35,4 +55,5 @@ def update_versions():
3555
update_src()
3656

3757
if __name__ == "__main__":
38-
update_versions()
58+
update_versions()
59+
build_pypi_doc()

pypi.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<p align="center">
2+
<img src="https://raw.githubusercontent.com/JamesPicoTech/pyPicoSDK/refs/heads/main/docs/docs/img/pypicosdk-light-300x300.png" alt="Fancy logo">
3+
</p>
4+
5+
# Welcome to pyPicoSDK Documentation
6+
## Installation
7+
### Prerequisites
8+
1. Go to PicoTech downloads [picotech.com/downloads](https://www.picotech.com/downloads)
9+
2. Find your PicoScope in the list and click through
10+
3. Download and install PicoSDK for your operating system
11+
### Via Pip
12+
1. Install the package via pip `pip install pypicosdk`
13+
2. In your `main.py` add `import pypicosdk` or `import pypicosdk as psdk`
14+
15+
### Via GitHub (Inc examples)
16+
1. Install github repository to folder `git clone https://github.com/JamesPicoTech/pyPicoSDK.git`
17+
2. In the root directory (where setup.py is) run `pip install .`
18+
3. In your `main.py` add `import pypicosdk` or `import pypicosdk as psdk`
19+
20+
## Quickstart
21+
To test functionality of this library, copy and run the following python script:
22+
```
23+
import pypicosdk as psdk
24+
25+
scope = psdk.ps6000a()
26+
27+
scope.open_unit()
28+
print(scope.get_unit_serial())
29+
scope.close_unit()
30+
```
31+
The output should be similar to:
32+
`JR001/001`
33+
34+
Once tested, try an [example script from github](https://github.com/JamesPicoTech/pyPicoSDK) to get started.
35+
36+
## Compatibility
37+
Current PicoScope support:
38+
- PicoScope 6000E (ps6000a drivers)
39+
- PicoScope 3000E (psospa drivers)
40+
41+
## Useful links and references
42+
- [Documentation & Reference](https://jamespicotech.github.io/pyPicoSDK/)
43+
- [GitHub Repo (with examples)](https://github.com/JamesPicoTech/pyPicoSDK)
44+
- [pypi (src repo)](https://pypi.org/project/pypicosdk/)
45+
- [pypi-nightly (dev repo)](https://pypi.org/project/pypicosdk-nightly/)
46+
47+
## Version Control
48+
pyPicoSDK: 1.6.1
49+
50+
Docs: 0.4.0

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_pypi.md"
16+
readme = "pypi.md"
1717
requires-python = ">=3.10"
1818
license = { file = "LICENSE" }
1919
authors = [

0 commit comments

Comments
 (0)