Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 412_combo_box
Browse files Browse the repository at this point in the history
  • Loading branch information
jnumainville committed May 10, 2024
2 parents ef501cc + ce1a019 commit 29ff91d
Show file tree
Hide file tree
Showing 71 changed files with 31,716 additions and 13,496 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# templates cannot be properly checked for formatting due to the substitution syntax
exclude: templates
repos:
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.15.0
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pre-commit run --all-files
All steps should pass.

To bypass the pre-commit hook, you can commit with the `--no-verify` flag, for example:

```shell
git commit --no-verify -m "commit message"`
```
Expand All @@ -67,7 +68,7 @@ We use [Playwright](https://playwright.dev/) for end-to-end tests. We test again

You should be able to pass arguments to these commands as if you were running Playwright via CLI directly. For example, to test only `matplotlib.spec.ts` you could run `npm run e2e:docker -- ./tests/matplotlib.spec.ts`, or to test only `matplotlib.spec.ts` in Firefox, you could run `npm run e2e:docker -- --project firefox ./tests/matplotlib.spec.ts`. See [Playwright CLI](https://playwright.dev/docs/test-cli) for more details.

It is highly recommended to use `npm run e2e:docker` (instead of `npm run e2e`) as CI also uses the same environment. You can also use `npm run e2e:update-snapshots` to regenerate snapshots in said environment.
It is highly recommended to use `npm run e2e:docker` (instead of `npm run e2e`) as CI also uses the same environment. You can also use `npm run e2e:update-snapshots` to regenerate snapshots in said environment. Run Playwright in [UI Mode](https://playwright.dev/docs/test-ui-mode) with `npm run e2e:ui` when creating new tests or debugging, as this will allow you to run each test individually, see the browser as it runs it, inspect the console, evaluate locators, etc.

### Running Python tests

Expand Down Expand Up @@ -229,6 +230,6 @@ After you have successfully run `tools/release.sh` once, you should be able to d

As part of the release process, `cog` will, per our `cog.toml` configuration, invoke `tools/update_version.sh <packageName> <newVersion>`, which is a script that uses `sed` to update a plugin's version number in whatever source file we happen to use as the source of truth for version information in the given plugin.
*[WARNING]* If you change where the source of truth for a plugin's version is located, you must update `tools/update_version.sh` to update the correct file with a new version number.
_[WARNING]_ If you change where the source of truth for a plugin's version is located, you must update `tools/update_version.sh` to update the correct file with a new version number.

We use `tools/update_version.sh` to remove any `.dev0` "developer version" suffix before creating a release, and to put the `.dev0` version suffix back after completing the release.
17,059 changes: 3,830 additions & 13,229 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"test:ci": "run-p test:ci:*",
"test:ci:unit": "jest --config jest.config.unit.cjs --ci --cacheDirectory $PWD/.jest-cache",
"test:ci:lint": "jest --config jest.config.lint.cjs --ci --cacheDirectory $PWD/.jest-cache",
"e2e:docker": "./tools/run_docker.sh e2e-tests",
"e2e": "playwright test",
"e2e:ui": "playwright test --ui",
"e2e:docker": "DEEPHAVEN_PORT=10001 ./tools/run_docker.sh e2e-tests",
"e2e:update-snapshots": "./tools/run_docker.sh update-snapshots",
"update-dh-packages": "lerna run --concurrency 1 update-dh-packages",
"update-dh-packages:ui": "npm run update-dh-packages -- --scope=@deephaven/js-plugin-ui --"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ def timeline(
table: Table | None: (Default value = None)
A table to pull data from.
x_start: str | None: (Default value = None)
A column that contains starting x-axis values.
A column that contains starting x-axis values. Must be a `java.time.Instant` column.
x_end: str | None: (Default value = None)
A column that contains ending x-axis values.
A column that contains ending x-axis values. Must be a `java.time.Instant` column.
by: str | list[str] | None: (Default value = None)
A column or list of columns that contain values to plot the figure traces by.
All values or combination of values map to a unique design. The variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

from ..shared import get_unique_names

from deephaven.time import to_j_instant
from deephaven.table import Table

NANOS_PER_MILLI = 1_000_000


class TimePreprocessor:
"""
Expand Down Expand Up @@ -45,12 +46,13 @@ def preprocess_partitioned_tables(
x_diff = get_unique_names(table, ["x_diff"])["x_diff"]

for table in tables:
# Times are assumed to be Instants which have nanosecond precision
# We convert them to milliseconds for plotly express
yield table.update_view(
[
f"{x_start} = (Instant) to_j_instant({x_start})",
f"{x_end} = (Instant) to_j_instant({x_end})",
f"{x_diff} = ((Instant) to_j_instant({x_end}) - "
f"(Instant) to_j_instant({x_start})) / 1000000",
f"{x_start} = {x_start}",
f"{x_end} = {x_end}",
f"{x_diff} = ({x_end} - {x_start}) / NANOS_PER_MILLI",
f"{y}",
]
), {"x_diff": x_diff}
Loading

0 comments on commit 29ff91d

Please sign in to comment.