Skip to content

Commit 8e5b7ed

Browse files
raivolinkclaude
andcommitted
Migrate from Poetry to uv package manager
- Convert pyproject.toml to PEP 621 format with hatchling build backend - Update tasks.py to use uv commands instead of poetry - Update GitHub Actions workflow to use astral-sh/setup-uv - Update README with uv-based development instructions - Replace poetry.lock with uv.lock - Remove requirements.txt (invoke is now a dev dependency) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 617ee1e commit 8e5b7ed

7 files changed

Lines changed: 636 additions & 540 deletions

File tree

.github/workflows/main.yaml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,24 @@ name: java-access-bridge-wrapper
22

33
on:
44
push:
5-
paths:
5+
paths:
66
- src/**
77
- .github/workflows/**
88

99
jobs:
1010
lint:
11-
# Not using the latest ubuntu until this issue is fixed in setup-python:
12-
# https://github.com/actions/setup-python/issues/401
13-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1412
steps:
15-
- uses: actions/checkout@v3
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: 3.10.12
20-
- name: Upgrade pip
21-
run: python -m pip install --upgrade pip
22-
- name: Install requirements
23-
run: pip install -Ur requirements.txt
24-
- name: Set up cache
25-
uses: actions/cache@v3
26-
with:
27-
path: .venv
28-
key: venv-${{ hashFiles('poetry.lock') }}
29-
- name: Install dependencies
30-
run: invoke update
31-
- name: Run lint
32-
run: invoke lint
13+
- uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v4
17+
18+
- name: Set up Python
19+
run: uv python install 3.10
20+
21+
- name: Install dependencies
22+
run: uv sync --all-groups
23+
24+
- name: Run lint
25+
run: uv run inv lint

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,44 +69,48 @@ Once the JABWrapper object is initialized, attach to some frame and optionally c
6969

7070
## Prerequisites
7171

72-
1. Install Invoke, Poetry and the other required dependencies in order to be able to develop and package the library:
73-
`pip install -Ur requirements.txt`.
74-
- If you want to isolate these from the other projects and not rely on the OS
75-
Python, enable a (_pyenv_) virtual environment first by following these
76-
[instructions](https://github.com/robocorp/rpaframework/blob/master/docs/source/contributing/development.md#virtual-environments).
77-
2. Now you're ready to set-up Poetry for the first time with `inv setup`.
78-
- Check with `-h` on how to pass credentials for ensuring that both your production PyPI and CI DevPI are
79-
configured. You'll find these in our **Robocorp** > **Shared** 1Password by searching for keywords like "pypi"
80-
(where we recommend a personal _token_ instead) and "devpi".
81-
3. Run `inv update` so the library gets ready for development.
72+
* [uv](https://docs.astral.sh/uv/) - Fast Python package manager
73+
74+
## Setup
75+
76+
Install all dependencies (including dev tools):
77+
78+
uv sync --all-groups
8279

8380
## Testing
8481

8582
Run test script against a simple Swing application.
8683

87-
Set environment variable
84+
Set environment variable:
8885

8986
set RC_JAVA_ACCESS_BRIDGE_DLL="C:\path\to\Java\bin\WindowsAccessBridge-64.dll"
9087

91-
Update requirements and install the library in development mode
88+
Run tests:
89+
90+
inv test # run all tests
91+
inv test -t test_jab_wrapper.py # run tests from a file
92+
inv test -t test_jab_wrapper.py::test_depth -c # specific test with output
93+
inv test -s # simple mode (single scenario, no callbacks)
94+
95+
## Linting
96+
97+
Check code style:
9298

93-
inv update
99+
inv lint
94100

95-
Run tests
101+
Apply formatting fixes:
96102

97-
inv test # runs all the tests in all scenarios
98-
inv test -s -t test_jab_wrapper.py # runs all the tests from a file in one simple common scenario
99-
inv test -s -c -t test_jab_wrapper.py::test_depth # as above, but specific test and captures output
103+
inv lint -a
100104

101105
## Packaging
102106

103-
Check linting
107+
Build and publish:
104108

105-
inv lint # apply with '-a'
109+
inv publish
106110

107-
Building and publishing
111+
Build only (no publish):
108112

109-
inv publish # '-c' for DevPI
113+
inv publish --build-only
110114

111115
## TODO:
112116

0 commit comments

Comments
 (0)