Skip to content

Commit 796904f

Browse files
authored
Merge pull request #798 from jupyter-incubator/devstein/add-poetry
Add Poetry for Local Development
2 parents c67c5e1 + 6001a42 commit 796904f

File tree

4 files changed

+2479
-7
lines changed

4 files changed

+2479
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Updates
66
* Add official support for Python 3.10 and 3.11
7+
* Add Poetry as an option for local development
78

89
### Bug Fixes
910
* Support `ipywidgets==8.0.0`

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,38 @@ If you've made an improvement to our code, please send us a [pull request](https
288288

289289
To dev install, execute the following:
290290

291-
git clone https://github.com/jupyter-incubator/sparkmagic
292-
pip install -e hdijupyterutils
293-
pip install -e autovizwidget
294-
pip install -e sparkmagic
295-
296-
and optionally follow steps 3 and 4 above.
291+
1. Clone the repo
292+
```bash
293+
git clone https://github.com/jupyter-incubator/sparkmagic
294+
```
295+
296+
2. Install local versions of packages
297+
```bash
298+
pip install -e hdijupyterutils
299+
pip install -e autovizwidget
300+
pip install -e sparkmagic
301+
```
302+
303+
Alternatively, you can use [Poetry](https://python-poetry.org/docs/) to setup a virtual environment
297304

298-
To run unit tests, run:
299305
```bash
306+
poetry install
307+
# If you run into issues install numpy or pandas, run
308+
# poetry run pip install numpy pandas
309+
# then re-run poetry install
310+
```
311+
312+
3. Run unit tests, with `pytest`
313+
314+
```bash
315+
# if you don't have pytest and mock installed, run
316+
# pip install pytest mock
300317
pytest
301318
```
319+
320+
If you installed packages with Poetry, run
321+
```bash
322+
poetry run pytest
323+
```
324+
302325
If you want to see an enhancement made but don't have time to work on it yourself, feel free to submit an [issue](https://github.com/jupyter-incubator/sparkmagic/issues) for us to deal with.

0 commit comments

Comments
 (0)