Skip to content

Commit

Permalink
Package web_gui, and add a note to CONTRIBUTING.md to check the built…
Browse files Browse the repository at this point in the history
… wheel
  • Loading branch information
glados-verma committed Nov 12, 2024
1 parent be30972 commit bc16234
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
18 changes: 17 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,22 @@ pip install tox
tox
```

As a developer it's a good practice to verify wheel-building.

```
python -m build
```

This will create a .whl in the `dist` directory. Try creating a fresh venv in
a different directory, following steps above, and installing the wheel there:

```
pip install path/to/openhtf.whl
# Try launching the dashboard server.
python -m openhtf.output.servers.dashboard_server
```

### MacOS
We will use [Homebrew](https://brew.sh/) to install our dependencies and Pip to set up the virtualenv. We recommend installing [Xcode](https://developer.apple.com/xcode/) first as the GCC compiler will be needed for both; however, other GCC compilers not associated with Xcode may work just as well.

Expand Down Expand Up @@ -282,7 +298,7 @@ OpenHTF ships with a built-in web gui found in the `openhtf.output.web_gui` modu

We don't expect everyone to go through the steps of building the frontend from
source, so we provide a prebuilt version of the frontend in the
`openhtf/output/web_gui/prebuilt` directory. If you don't plan to contribute to
`openhtf/output/web_gui/` directory. If you don't plan to contribute to
the built-in frontend, you can feel free to stop reading here; OpenHTF will
automatically use the the prebuilt version of the frontend we include.

Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ Homepage = "https://github.com/google/openhtf"
[tool.setuptools.packages]
find = {}

[tool.setuptools.package-data]
openhtf = [
"output/web_gui/dist/*.*",
"output/web_gui/dist/css/*",
"output/web_gui/dist/js/*",
"output/web_gui/dist/img/*",
"output/web_gui/*.*",
]

[tool.setuptools-protobuf]
protobufs = [
"openhtf/output/proto/assembly_event.proto",
Expand Down

0 comments on commit bc16234

Please sign in to comment.