Skip to content

Commit 6231a2e

Browse files
author
Arun Persaud
committed
Rename package from vortran to vortran-lbl for PyPI release
- Rename package: vortran -> vortran_lbl (directory and imports) - Add LBL BSD 3-Clause license - Switch build system from setuptools to uv - Update all imports in tests and examples - Update README examples to use vortran_lbl - Update CI workflow to test vortran_lbl
1 parent c965e45 commit 6231a2e

File tree

14 files changed

+119
-63
lines changed

14 files changed

+119
-63
lines changed

.coverage

-52 KB
Binary file not shown.

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
3232
- name: Run tests
3333
run: |
34-
pytest --cov=src/vortran --cov-report=term-missing
34+
pytest --cov=src/vortran_lbl --cov-report=term-missing

LICENSE

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Copyright (c) 2026, The Regents of the University of California,
2+
through Lawrence Berkeley National Laboratory (subject to receipt of
3+
any required approvals from the U.S. Dept. of Energy). All rights
4+
reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are
8+
met:
9+
10+
(1) Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
(2) Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in the
15+
documentation and/or other materials provided with the distribution.
16+
17+
(3) Neither the name of the University of California, Lawrence
18+
Berkeley National Laboratory, U.S. Dept. of Energy, nor the names of
19+
its contributors may be used to endorse or promote products derived
20+
from this software without specific prior written permission.
21+
22+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33+
34+
You are under no obligation whatsoever to provide any bug fixes,
35+
patches, or upgrades to the features, functionality or performance of
36+
the source code ("Enhancements") to anyone; however, if you choose to
37+
make your Enhancements available either publicly, or directly to
38+
Lawrence Berkeley National Laboratory, without imposing a separate
39+
written license agreement for such Enhancements, then you hereby grant
40+
the following license: a non-exclusive, royalty-free perpetual license
41+
to install, use, modify, prepare derivative works, incorporate into
42+
other computer software, distribute, and sublicense such enhancements
43+
or derivative works thereof, in binary and source code form.

Readme.md renamed to README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
# Stradus SDK for Vortran lasers
22

3+
Note: Python library for controlling Vortran Stradus lasers,
4+
maintained by Lawrence Berkeley National Laboratory.
5+
36
## Installation
47

58
If you don't have python already on your system you can install it using [uv](https://docs.astral.sh/uv/#installation).
69

7-
Install the package using uv directly from the cloned git repository:
10+
Install the package from PyPI:
11+
12+
uv pip install vortran-lbl
13+
14+
You can also first clone this git repository and then install the
15+
package using uv directly from the cloned git repository:
816

917
uv pip install -e .
1018

1119
## Use
1220

13-
The code below shows how to use the package (note: currently not tested)
21+
The code below shows how to use the package
1422

1523
```python
16-
import vortran
24+
import vortran_lbl as vortran
1725

1826
lasers = vortran.get_lasers()
1927

@@ -33,13 +41,13 @@ laser.off()
3341

3442
## Logging Configuration
3543

36-
The vortran library uses Python's standard logging module. By default, no log messages are shown. To see log output, configure logging in your application:
44+
The vortran_lbl library uses Python's standard logging module. By default, no log messages are shown. To see log output, configure logging in your application:
3745

3846
### Basic Logging Setup
3947

4048
```python
4149
import logging
42-
import vortran
50+
import vortran_lbl as vortran
4351

4452
# Show INFO level and above (device discovery, connections)
4553
logging.basicConfig(level=logging.INFO)
@@ -54,19 +62,19 @@ lasers = vortran.get_lasers() # Will now show log messages
5462

5563
```python
5664
import logging
57-
import vortran
65+
import vortran_lbl as vortran
5866

5967
# Configure specific logger levels
60-
logging.getLogger('vortran.usb').setLevel(logging.INFO) # USB device discovery
61-
logging.getLogger('vortran.laser').setLevel(logging.DEBUG) # Laser operations
62-
logging.getLogger('vortran.usb_connection').setLevel(logging.WARNING) # Only errors
68+
logging.getLogger('vortran_lbl.usb').setLevel(logging.INFO) # USB device discovery
69+
logging.getLogger('vortran_lbl.laser').setLevel(logging.DEBUG) # Laser operations
70+
logging.getLogger('vortran_lbl.usb_connection').setLevel(logging.WARNING) # Only errors
6371

6472
# Custom formatter
6573
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
6674
handler = logging.StreamHandler()
6775
handler.setFormatter(formatter)
6876

69-
logger = logging.getLogger('vortran')
77+
logger = logging.getLogger('vortran_lbl')
7078
logger.addHandler(handler)
7179
logger.setLevel(logging.DEBUG)
7280
```
@@ -134,7 +142,7 @@ pytest
134142

135143
Run tests with coverage:
136144
```bash
137-
pytest --cov=src/vortran --cov-report=term-missing
145+
pytest --cov=src/vortran_lbl --cov-report=term-missing
138146
```
139147

140148
### Contributing

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import vortran
1+
import vortran_lbl as vortran
22

33
if __name__ == "__main__":
44
my_connection = []

pyproject.toml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
[build-system]
2-
requires = ["setuptools>61", "setuptools_scm[toml]>=6.2"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["uv_build>=0.10.0,<0.11.0"]
3+
build-backend = "uv_build"
44

55
[project]
6-
name = "vortran"
7-
dynamic = ["version"]
6+
name = "vortran-lbl"
7+
version = "1.0.0"
8+
license = {file = "LICENSE"}
89
description = "A Python project to control a Vortran Stradus laser"
910
authors = [
10-
{ name = "Arun Persaud", email = "apersaud@lbl.gov" }
11+
{ name = "Arun Persaud", email = "apersaud@lbl.gov" },
12+
{ name = "Sean Vo", email = "svo2@lbl.gov" }
1113
]
1214
readme = "README.md"
1315
requires-python = ">=3.10"
@@ -18,6 +20,7 @@ classifiers = [
1820
"Programming Language :: Python :: 3.11",
1921
"Programming Language :: Python :: 3.12",
2022
"Programming Language :: Python :: 3.13",
23+
"Programming Language :: Python :: 3.14",
2124
"Operating System :: OS Independent"
2225
]
2326

@@ -32,11 +35,10 @@ test = [
3235
"pytest-cov",
3336
]
3437

35-
[tool.setuptools.packages.find]
36-
where = ["src"]
37-
38-
[tool.setuptools_scm]
39-
write_to = "src/vortran/_version.py"
38+
[project.urls]
39+
Homepage = "https://github.com/arunpersaud/Stradus"
40+
Repository = "https://github.com/arunpersaud/Stradus"
41+
Issues = "https://github.com/arunpersaud/Stradus/issues"
4042

4143
[tool.ruff]
4244
line-length = 88
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""
66

77

8-
98
def parse_output(input: str | None) -> list[str] | None:
109
"""Parses response from microcontroller to seperate out the
1110
important data. Returns the data as a variable-length list.

0 commit comments

Comments
 (0)