Skip to content

Commit

Permalink
chore: Rename master to main prep. (#2045)
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci authored Jun 27, 2023
1 parent 1fb1598 commit e4fa263
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Additional test coverage is appreciated. Help us make the codebase more robust.

## Security vulnerabilities

If you discover a security vulnerability within H2O Wave, please send an email to Prithvi Prabhu at [email protected]. All security vulnerabilities will be promptly addressed.
If you discover a security vulnerability within H2O Wave, please send an email to Prithvi Prabhu at <[email protected]>. All security vulnerabilities will be promptly addressed.

## Development Setup

Expand Down Expand Up @@ -94,7 +94,7 @@ Happy hacking!

### Daily development

For daily development, you'll only need to pull `master` from git and run `make run` and `make run-ui`. Running `make setup` is not necessary unless `make run` or `make run-ui` fail due to missing dependencies.
For daily development, you'll only need to pull `main` from git and run `make run` and `make run-ui`. Running `make setup` is not necessary unless `make run` or `make run-ui` fail due to missing dependencies.

### Other make targets

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- "master"
- "main"

jobs:
snyk_scan_test:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ H2O Wave excels at capturing information from multiple sources and broadcasting
- [Download](https://github.com/h2oai/wave/releases) / [How to install](https://wave.h2o.ai/docs/installation/)
- [Documentation](https://wave.h2o.ai/): [Getting Started](https://wave.h2o.ai/docs/getting-started/) / [Gallery and Examples](https://wave.h2o.ai/docs/examples/) / [Python API](https://wave.h2o.ai/docs/api/index/)
- [Roadmap 2021](https://github.com/h2oai/wave/issues/693)
- [Developing](https://github.com/h2oai/wave/blob/master/.github/CONTRIBUTING.md#development-setup)
- [Developing](https://github.com/h2oai/wave/blob/main/.github/CONTRIBUTING.md#development-setup)
- [Discuss / Support / Q&A / Ideas](https://github.com/h2oai/wave/discussions)
- [Report a problem](https://github.com/h2oai/wave/issues/new/choose)
- [Blog](https://wave.h2o.ai/blog/) / [@h2o_wave](https://twitter.com/h2o_wave)
Expand All @@ -45,7 +45,7 @@ H2O Wave excels at capturing information from multiple sources and broadcasting

![Dashboard](website/blog/assets/2021-01-17/dashboard_purple.png)

Code: <https://github.com/h2oai/wave/tree/master/py/demo>
Code: <https://github.com/h2oai/wave/tree/main/py/demo>

### Themes

Expand Down
2 changes: 1 addition & 1 deletion py/apps/dashboard/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Code for this app can be found at https://github.com/h2oai/wave/blob/master/py/demo.
Code for this app can be found at <https://github.com/h2oai/wave/blob/main/py/demo>.
11 changes: 6 additions & 5 deletions py/apps/dashboard/about.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## App Description:
H2O Wave lets you build and deploy amazing, realtime analytics with dramatically less effort. This application has seven example dashboard to give users and developers inspiration as they start building their own apps. The code for this app is Open Source and can be found on [GitHub](https://github.com/h2oai/wave/tree/master/py/demo).
## App Description

H2O Wave lets you build and deploy amazing, realtime analytics with dramatically less effort. This application has seven example dashboard to give users and developers inspiration as they start building their own apps. The code for this app is Open Source and can be found on [GitHub](https://github.com/h2oai/wave/tree/main/py/demo).

**Audience:** All users

**Feedback:** Send an email to [email protected] with any questions, problems, or concerns
**Feedback:** Send an email to <[email protected]> with any questions, problems, or concerns

## Products Used in the App:
## Products Used in the App

**H2O Wave:** H2O Wave is an open-source Python development framework that makes it fast and easy for data scientists, machine learning engineers, and software developers to develop real-time interactive AI apps with sophisticated visualizations.
**H2O Wave:** H2O Wave is an open-source Python development framework that makes it fast and easy for data scientists, machine learning engineers, and software developers to develop real-time interactive AI apps with sophisticated visualizations.
2 changes: 1 addition & 1 deletion py/apps/theme-generator/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Code for this app can be found at https://github.com/h2oai/wave/blob/master/py/examples/theme_generator.py.
Code for this app can be found at <https://github.com/h2oai/wave/blob/main/py/examples/theme_generator.py>.
2 changes: 1 addition & 1 deletion py/apps/tour/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Code for this app can be found at https://github.com/h2oai/wave/blob/master/py/examples/tour.py.
Code for this app can be found at <https://github.com/h2oai/wave/blob/main/py/examples/tour.py>.
4 changes: 2 additions & 2 deletions py/apps/tour/about.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## App Description

H2O Wave lets you build and deploy amazing, realtime analytics with dramatically less effort. This application is a tour of components and sample code which can help developers get started. The code for this app is Open Source and can be found on [GitHub](https://github.com/h2oai/wave/tree/master/py/examples).
H2O Wave lets you build and deploy amazing, realtime analytics with dramatically less effort. This application is a tour of components and sample code which can help developers get started. The code for this app is Open Source and can be found on [GitHub](https://github.com/h2oai/wave/tree/main/py/examples).

**Audience:** Application Developers

**Feedback:** Send an email to [email protected] with any questions, problems, or concerns
**Feedback:** Send an email to <[email protected]> with any questions, problems, or concerns

## Products Used in the App

Expand Down
2 changes: 1 addition & 1 deletion py/examples/layout_responsive.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
page = site['/demo']
page.drop()

content = '![Wave University](https://raw.githubusercontent.com/h2oai/wave/master/assets/brand/wave-university-wide.png)'
content = '![Wave University](https://raw.githubusercontent.com/h2oai/wave/main/assets/brand/wave-university-wide.png)'

# The meta card's 'zones' attribute defines placeholder zones to lay out cards for different viewport sizes.
# We define three layout schemes here.
Expand Down
2 changes: 1 addition & 1 deletion py/h2o_lightwave/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def ws(ws: WebSocket):
app.mount("/", StaticFiles(directory=web_directory, html=True), name="/")
```

We also recommend reading the [blog post](https://medium.com/@unusualcode/h2o-lightwave-building-web-uis-with-fastapi-and-python-88a915383490) and other [integration examples](https://github.com/h2oai/wave/tree/master/py/h2o_lightwave/examples).
We also recommend reading the [blog post](https://medium.com/@unusualcode/h2o-lightwave-building-web-uis-with-fastapi-and-python-88a915383490) and other [integration examples](https://github.com/h2oai/wave/tree/main/py/h2o_lightwave/examples).

## Installation

Expand Down
2 changes: 1 addition & 1 deletion university/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src='https://github.com/h2oai/wave/blob/master/assets/brand/wave-university-wide.png?raw=true' alt='wave-university-logo'/>
<img src='https://github.com/h2oai/wave/blob/main/assets/brand/wave-university-wide.png?raw=true' alt='wave-university-logo'/>
</p>

# Wave university
Expand Down
4 changes: 2 additions & 2 deletions website/blog/2022-05-31-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Another Wave release is here! `0.22.0` brings some exciting features like more R

## R support

Python is the most dominant programming language when it comes to Data Science community. That's why we started with it. However, we did not forget about R community and thanks to awesome work of [Ashrith Barthur](https://github.com/ashrith), Wave supports R apps and dashboards as well. See the [R examples](https://github.com/h2oai/wave/tree/master/r/R/examples) and let us know what you think in [discussions](https://github.com/h2oai/wave/discussions).

Python is the most dominant programming language when it comes to Data Science community. That's why we started with it. However, we did not forget about R community and thanks to awesome work of [Ashrith Barthur](https://github.com/ashrith), Wave supports R apps and dashboards as well. See the [R examples](https://github.com/h2oai/wave/tree/main/r/R/examples) and let us know what you think in [discussions](https://github.com/h2oai/wave/discussions).

Example R h2o_wave app

```r
library(h2owave)
serve <- function(qo)
Expand Down
2 changes: 1 addition & 1 deletion website/blog/2022-09-12-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ We are experimenting with bringing Wave development experience to the browser wi

The complexity of this app confirms that there are almost no limitations of what's possible with Wave.

Although the app is originally intended for our [cloud platform](https://h2oai.github.io/h2o-ai-cloud/), we have made it fully [open-source](https://github.com/h2oai/wave/tree/master/studio) so feel free to try it out or even deploy it to your own environment.
Although the app is originally intended for our [cloud platform](https://h2oai.github.io/h2o-ai-cloud/), we have made it fully [open-source](https://github.com/h2oai/wave/tree/main/studio) so feel free to try it out or even deploy it to your own environment.

Note that the app is very alpha currently and not suited for production use. If you spot a bug, don't hesitate and try to fix it yourself. PRs are always more than welcome.

Expand Down
6 changes: 3 additions & 3 deletions website/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ Additional test coverage is appreciated. Help us make the codebase more robust.

## Security vulnerabilities

If you discover a security vulnerability within H2O Wave, please send an email to Prithvi Prabhu at [email protected]. All security vulnerabilities will be promptly addressed.
If you discover a security vulnerability within H2O Wave, please send an email to Prithvi Prabhu at <[email protected]>. All security vulnerabilities will be promptly addressed.

## Code of Conduct

See <https://github.com/h2oai/wave/blob/master/.github/CODE_OF_CONDUCT.md>.
See <https://github.com/h2oai/wave/blob/main/.github/CODE_OF_CONDUCT.md>.

## Development Setup

Expand Down Expand Up @@ -96,7 +96,7 @@ If you want to run for example a python button example:
wave run examples.button
```

All examples are located in [py/examples](https://github.com/h2oai/wave/tree/master/py/examples) folder.
All examples are located in [py/examples](https://github.com/h2oai/wave/tree/main/py/examples) folder.

If you intend to modify the UI (Typescript), also launch the UI development server at <http://localhost:3000/> to watch and hot-reload your modifications. Open `./ui` in Visual Studio Code or your preferred IDE.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To switch to a flex layout, simply define a page layout using the `ui.layout()`
The flex layout system allows you to build user interfaces and dashboards that adapt to various device and screen sizes ("responsive layout").

:::info
To view examples of flex and responsive layouts in actions, see <https://github.com/h2oai/wave/tree/master/py/demo>
To view examples of flex and responsive layouts in actions, see <https://github.com/h2oai/wave/tree/main/py/demo>
:::

To define a layout for your page, attach a layout to your page's meta card using `ui.layout()`.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Access to a Wave app is controlled via [HTTP Basic Authentication](https://tools
You can make the Wave daemon include additional HTTP response headers by using the `-http-headers-file` command line argument to `waved`, pointing to a [MIME-formatted](https://en.wikipedia.org/wiki/MIME#MIME_header_fields) file.
[A sample file](https://github.com/h2oai/wave/blob/master/headers.txt) (make sure there's an empty line at the end):
[A sample file](https://github.com/h2oai/wave/blob/main/headers.txt) (make sure there's an empty line at the end):

```txt title="headers.txt"
X-Frame-Options: SAMEORIGIN
Expand Down
85 changes: 42 additions & 43 deletions website/docs/wavedb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It is a ~6MB (~2MB [UPX](https://upx.github.io/)-compressed) self-contained, zer

If you are already a fan of SQLite, WaveDB acts as a thin HTTP-server wrapper that lets you access your SQLite databases over a network.

WaveDB can be used as a lightweight, cross-platform, installation-free companion SQL database for Wave apps. The `h2o-wave` package includes non-blocking `async` functions to access WaveDB.
WaveDB can be used as a lightweight, cross-platform, installation-free companion SQL database for Wave apps. The `h2o-wave` package includes non-blocking `async` functions to access WaveDB.

Database files managed by WaveDB are 100% interoperable with SQLite, which means you can manage them with the `sqlite3` CLI, backup/restore/transfer them as usual, or use [Litestream](https://litestream.io/) for replication.

Expand All @@ -19,22 +19,24 @@ Database files managed by WaveDB are 100% interoperable with SQLite, which means
[Download the executable](https://github.com/h2oai/wave/releases) for your platform. No installation required.

### Other Platforms

Compiling WaveDB on other platforms is easy if you have the [Go](https://golang.org) and C compilers handy (uses [cgo](https://golang.org/cmd/cgo/)):

```
$ git clone --depth 1 https://github.com/h2oai/wave.git
$ cd wave
$ go build -o wavedb cmd/wavedb/main.go
```sh
git clone --depth 1 https://github.com/h2oai/wave.git
cd wave
go build -o wavedb cmd/wavedb/main.go
```

## Launch

Launch WaveDB (defaults to http://localhost:10100/):
Launch WaveDB (defaults to <http://localhost:10100/>):

```sh
./wavedb
```
$ ./wavedb
```
```

```sh
2021/05/07 14:00:41
2021/05/07 14:00:41 ┌────────┐┌────┐ H2O WaveDB
2021/05/07 14:00:41 │ ┐┌┐┐┌─┘│─┐ │ DEV 20210507132041
Expand All @@ -46,38 +48,39 @@ $ ./wavedb

Launch WaveDB on a different port:

```
$ ./wavedb -listen :8080
```sh
./wavedb -listen :8080
```

Launch WaveDB with verbose logging (useful during development):

```
$ ./wavedb -verbose
```sh
./wavedb -verbose
```

Launch WaveDB with a custom API access key/secret pair:

```
$ ./wavedb -access-key-id uzer -access-key-secret pa55word
```sh
./wavedb -access-key-id uzer -access-key-secret pa55word
```

Serve your existing SQLite database files using WaveDB (defaults to current directory):

```sh
./wavedb -dir /path/to/my/db/files
```
$ ./wavedb -dir /path/to/my/db/files
```

## Examples

- [Using WaveDB from a Wave app - A To-do list](https://github.com/h2oai/wave/blob/master/py/examples/db_todo.py)
- [Using WaveDB from a Wave app - Paginated table](https://github.com/h2oai/wave/blob/master/py/examples/table_pagination_wavedb.py)
- [Using WaveDB from a standalone script](https://github.com/h2oai/wave/blob/master/py/examples/db.py)
- [Using WaveDB from a Wave app - A To-do list](https://github.com/h2oai/wave/blob/main/py/examples/db_todo.py)
- [Using WaveDB from a Wave app - Paginated table](https://github.com/h2oai/wave/blob/main/py/examples/table_pagination_wavedb.py)
- [Using WaveDB from a standalone script](https://github.com/h2oai/wave/blob/main/py/examples/db.py)

## Usage

For this example, we'll use the [Chinook Sample Database](https://www.sqlitetutorial.net/sqlite-sample-database/) from [sqlitetutorial.net](https://www.sqlitetutorial.net/).

```
```sh
$ wget https://www.sqlitetutorial.net/wp-content/uploads/2018/03/chinook.zip
$ unzip chinook.zip
$ ls -l
Expand Down Expand Up @@ -116,10 +119,8 @@ The query API is simple:
2. `db.exec_many(...)`: Execute multiple queries.
3. `db.exec_atomic(...)`: Excute multiple queries as a transaction (rollback all on failure)


All three APIs support both DDL (`CREATE`, `ALTER`, `DROP`, etc.) and DML (`SELECT`, `INSERT`, `UPDATE`, etc.) statements:


```py
result, error = db.exec('CREATE TABLE student(name TEXT, age INTEGER)')
result, error = db.exec('INSERT INTO student VALUES ("Alice", 18)')
Expand Down Expand Up @@ -147,25 +148,24 @@ results, error = db.exec_many(

In the above example, substituting `exec_many()` with `exec_atomic()` executes all the queries in the batch as part of a transaction, rolling back all queries on any failures.


### From curl

Use `curl` to send a query:

```
$ curl -s -u uzer:pa55word -d '{"e":{"d":"chinook", "s":[{"q": "select name, composer from tracks limit 5"}]}}' http://localhost:10100
```sh
curl -s -u uzer:pa55word -d '{"e":{"d":"chinook", "s":[{"q": "select name, composer from tracks limit 5"}]}}' http://localhost:10100
```

```
```json
{"r":[[["For Those About To Rock (We Salute You)","Angus Young, Malcolm Young, Brian Johnson"],["Balls to the Wall",null],["Fast As a Shark","F. Baltes, S. Kaufman, U. Dirkscneider \u0026 W. Hoffman"],["Restless and Wild","F. Baltes, R.A. Smith-Diesel, S. Kaufman, U. Dirkscneider \u0026 W. Hoffman"],["Princess of the Dawn","Deaffy \u0026 R.A. Smith-Diesel"]]]}
```

Use [jq](https://stedolan.github.io/jq/) to pretty-print the response:


```
$ curl -s -u uzer:pa55word -d '{"e":{"d":"chinook", "s":[{"q": "SELECT name, composer FROM tracks LIMIT 5"}]}}' http://localhost:10100 | jq '.'
```sh
curl -s -u uzer:pa55word -d '{"e":{"d":"chinook", "s":[{"q": "SELECT name, composer FROM tracks LIMIT 5"}]}}' http://localhost:10100 | jq '.'
```

```js
{
"r": [
Expand Down Expand Up @@ -195,10 +195,8 @@ $ curl -s -u uzer:pa55word -d '{"e":{"d":"chinook", "s":[{"q": "SELECT name, com
}
```


## JSON protocol


### Grammar

```ts
Expand Down Expand Up @@ -275,6 +273,7 @@ Sample `reply`:
## Deployment
For production deployments:
- Use the `-access-keychain` option to control API keys. [See documentation](security.md#production).
- Use the `-tls-cert-file` and `-tls-key-file` options to enable HTTPS.
Expand All @@ -291,30 +290,30 @@ $ ./wavedb \
$ ./wavedb -help
Usage of ./wavedb:
-access-key-id string
default API access key ID (default "access_key_id")
default API access key ID (default "access_key_id")
-access-key-secret string
default API access key secret (default "access_key_secret")
default API access key secret (default "access_key_secret")
-access-keychain string
path to file containing API access keys (default ".wave-keychain")
path to file containing API access keys (default ".wave-keychain")
-benchmark int
run benchmarks for the given number of iterations
run benchmarks for the given number of iterations
-dir string
path to directory containing database (.db) files (default ".")
path to directory containing database (.db) files (default ".")
-listen string
listen on this address (default ":10100")
listen on this address (default ":10100")
-tls-cert-file string
path to certificate file (TLS only)
path to certificate file (TLS only)
-tls-key-file string
path to private key file (TLS only)
path to private key file (TLS only)
-verbose
enable verbose logging
enable verbose logging
-version
print version and exit
print version and exit

```

## Acknowledgements

WaveDB is based on [SQLite](https://www.sqlite.org) and [bvinc/go-sqlite-lite](https://github.com/bvinc/go-sqlite-lite), built with [Go](https://golang.org/). The Python client uses [HTTPX](https://www.python-httpx.org/) under the hood. Thank you to the authors and contributors.

WaveDB can be used from any language or platform that has libraries for HTTP and JSON. The reference implementation of the client is [~75 lines of code](https://github.com/h2oai/wave/blob/master/py/h2o_wave/db.py) if you're interested in porting it to other languages.
WaveDB can be used from any language or platform that has libraries for HTTP and JSON. The reference implementation of the client is [~75 lines of code](https://github.com/h2oai/wave/blob/main/py/h2o_wave/db.py) if you're interested in porting it to other languages.
Loading

0 comments on commit e4fa263

Please sign in to comment.