You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Simplify version handling and dependencies (#136)
Simplify Deephaven version handling and improve dependency management
- Remove hardcoded `DH_VERSION_DEFAULT` and make Deephaven version
optional, defaulting to latest from PyPI
- Add `get_latest_version()` helper function to fetch latest package
versions from PyPI
- Remove `DH_VERSION` environment variable requirement from `setup.py`
and make `deephaven-server` dependency version-agnostic
- Fix dependency parsing regex in `pkg_dependencies()` to handle complex
version specifiers
- Update README
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,6 +201,7 @@ you can use the `--use_venv false` option to [./dhib_env.py](./dhib_env.py).
201
201
202
202
Install the dependencies needed to run the script into this installer virtual environment:
203
203
```bash
204
+
pip --upgrade pip
204
205
pip install -r requirements_dhib_env.txt
205
206
```
206
207
@@ -211,17 +212,17 @@ you can use the `--use_venv false` option to [./dhib_env.py](./dhib_env.py).
211
212
python ./dhib_env.py --help
212
213
```
213
214
214
-
To install the latest production release version of [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) from PyPi plus the release-specified `ibapi`and `deephaven` versions:
215
+
To install the latest production release version of [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) from PyPI. This command will automatically install the latest `deephaven-server` from PyPI and extract the required `ibapi` version from the deephaven-ib package dependencies:
215
216
```bash
216
217
python ./dhib_env.py release
217
218
```
218
219
219
-
To install the latest development version of [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) from source plus the default `ibapi` and `deephaven` versions:
220
+
To install the latest development version of [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) from source. This command will automatically install the latest `deephaven-server` and `ibapi` versions from PyPI:
220
221
```bash
221
222
python ./dhib_env.py dev
222
223
```
223
224
224
-
To create a venv fordeveloping [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib)in PyCharm: (This will not install `deephaven-ib`, but it will install the default `ibapi` and `deephaven` versions.)
225
+
To create a venv fordeveloping [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib)in PyCharm: (This will not install `deephaven-ib`, but it will install the latest `deephaven-server` and `ibapi` versions from PyPI.)
Copy file name to clipboardExpand all lines: dhib_env.py
+54-40Lines changed: 54 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
""" A script to build a virtual environment for Deephaven-IB development or release."""
4
4
5
+
importsys
6
+
7
+
ifsys.version_info< (3, 10):
8
+
raiseRuntimeError(f"This script requires Python 3.10 or higher. You are using Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}")
@click.option('--python', default="python3", help='The path to the Python executable to use.')
513
-
@click.option('--dh_version', default=DH_VERSION_DEFAULT, help='The version of Deephaven.')
514
-
@click.option('--dh_version_exact', default=None, help='The exact version of Deephaven.')
531
+
@click.option('--dh_version', default=None, help='The version of Deephaven. If not specified, uses the latest version from PyPI.')
515
532
@click.option('--ib_version', default=IB_VERSION_DEFAULT, help='The version of ibapi.')
516
533
@click.option('--dh_ib_version', default=None, help='The version of deephaven-ib.')
517
534
@click.option('--use_venv', default=True, help='Whether to use a python virtual environment or system python.')
@@ -521,8 +538,7 @@ def dhib_wheel(
521
538
@click.option('--install_dhib', default=True, help='Whether to install deephaven-ib. If set to false, the resulting venv can be used to develop deephaven-ib in PyCharm or other development environments.')
522
539
defdev(
523
540
python: str,
524
-
dh_version: str,
525
-
dh_version_exact: str,
541
+
dh_version: Optional[str],
526
542
ib_version: str,
527
543
dh_ib_version: Optional[str],
528
544
use_venv: bool,
@@ -532,26 +548,19 @@ def dev(
532
548
install_dhib: bool
533
549
):
534
550
"""Create a development environment."""
535
-
logging.warning(f"Creating development environment: python={python} dh_version={dh_version}, dh_version_exact={dh_version_exact}, ib_version={ib_version}, dh_ib_version={dh_ib_version}, delete_vm_if_exists={delete_venv}")
551
+
logging.warning(f"Creating development environment: python={python} dh_version={dh_version}, ib_version={ib_version}, dh_ib_version={dh_ib_version}, delete_vm_if_exists={delete_venv}")
0 commit comments