Skip to content

Commit c9b8fa7

Browse files
authored
Rename from hypha to preen (#72)
1 parent e2fa517 commit c9b8fa7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+356
-360
lines changed

.env.example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DEBUG | INFO | WARN | ERROR
2-
HYPHA_LOG_LEVEL=INFO
3-
# Config path for HyphaDB
4-
HYPHA_CONFIG_PATH=./.hypha/
5-
# Model path for HyphaDB
6-
HYPHA_MODELS_PATH=./models/
2+
PREEN_LOG_LEVEL=INFO
3+
# Config path for Preen
4+
PREEN_CONFIG_PATH=./.preen/
5+
# Model path for Preen
6+
PREEN_MODELS_PATH=./models/

.github/workflows/ci.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on: pull_request
55
jobs:
66
tests:
77
env:
8-
HYPHA_CONFIG_PATH: ./build/ci
9-
HYPHA_MODELS_PATH: ./build/ci/models
8+
PREEN_CONFIG_PATH: ./build/ci
9+
PREEN_MODELS_PATH: ./build/ci/models
1010
PG_USER: ${{ secrets.PG_USER }}
1111
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
1212
MYSQL_USER: ${{ secrets.MYSQL_USER }}
1313
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
14+
MONGO_USER: ${{ secrets.MONGO_USER }}
15+
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
1416
runs-on: ubuntu-latest
1517

1618
steps:
@@ -35,7 +37,7 @@ jobs:
3537
version: v1.60
3638
args: --timeout=5m
3739

38-
- name: Build Hypha binary
40+
- name: Build Preen binary
3941
run: make build
4042

4143
- name: Unit Tests
@@ -45,17 +47,17 @@ jobs:
4547
run: |
4648
sleep 5
4749
48-
bin/hypha model build
50+
bin/preen model build
4951
5052
# Test that the MySQL model was built and can be queried. Query should return 1 row.
51-
MYSQL_RESULTS_LENGTH=$(bin/hypha query -f json "select * from mysql_data_types_test;" | jq length)
53+
MYSQL_RESULTS_LENGTH=$(bin/preen query -f json "select * from mysql_data_types_test;" | jq length)
5254
if [[ $MYSQL_RESULTS_LENGTH -ne 1 ]]; then
5355
echo "Expected 1 row in mysql_data_types_test, got $MYSQL_RESULTS_LENGTH"
5456
exit 1
5557
fi
5658
5759
# Test that the PostgreSQL model was built and can be queried. Query should return 1 row.
58-
PG_RESULTS_LENGTH=$(bin/hypha query -f json "select * from pg_data_types_test;" | jq length)
60+
PG_RESULTS_LENGTH=$(bin/preen query -f json "select * from pg_data_types_test;" | jq length)
5961
if [[ $PG_RESULTS_LENGTH -ne 1 ]]; then
6062
echo "Expected 1 row in pg_data_types_test, got $PG_RESULTS_LENGTH"
6163
exit 1

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
GOARCH: ${{ matrix.arch }}
3636
CGO_ENABLED: 1
3737
run: |
38-
CGO_ENABLED=1 CGO_LDFLAGS="-L/usr/lib" go build -o output/${{ matrix.os }}_${{ matrix.arch }}/hypha --ldflags="-extldflags=-static" -tags osusergo,netgo main.go
39-
tar -C output/${{ matrix.os }}_${{ matrix.arch }} -czvf hypha-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz hypha
38+
CGO_ENABLED=1 CGO_LDFLAGS="-L/usr/lib" go build -o output/${{ matrix.os }}_${{ matrix.arch }}/preen --ldflags="-extldflags=-static" -tags osusergo,netgo main.go
39+
tar -C output/${{ matrix.os }}_${{ matrix.arch }} -czvf preen-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz preen
4040
echo "Built for $GOOS $GOARCH"
4141
4242
- name: Upload binaries
4343
uses: svenstaro/upload-release-action@v2
4444
with:
45-
file: hypha-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz
45+
file: preen-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz
4646
repo_token: ${{ secrets.GITHUB_TOKEN }}
4747
tag: ${{ github.ref }}
4848

@@ -73,13 +73,13 @@ jobs:
7373
GOARCH: ${{ matrix.arch }}
7474
CGO_ENABLED: 1
7575
run: |
76-
CGO_ENABLED=1 CGO_LDFLAGS="-L/usr/lib" go build -o output/${{ matrix.os }}_${{ matrix.arch }}/hypha main.go
77-
tar -C output/${{ matrix.os }}_${{ matrix.arch }} -czvf hypha-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz hypha
76+
CGO_ENABLED=1 CGO_LDFLAGS="-L/usr/lib" go build -o output/${{ matrix.os }}_${{ matrix.arch }}/preen main.go
77+
tar -C output/${{ matrix.os }}_${{ matrix.arch }} -czvf preen-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz preen
7878
echo "Built for $GOOS $GOARCH"
7979
8080
- name: Upload binaries
8181
uses: svenstaro/upload-release-action@v2
8282
with:
83-
file: hypha-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz
83+
file: preen-${{ matrix.os }}_${{ matrix.arch }}-${{ github.event.release.tag_name }}.tar.gz
8484
repo_token: ${{ secrets.GITHUB_TOKEN }}
8585
tag: ${{ github.ref }}

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
hyphadb
1+
preendb
22
bin/
33
tmp.txt
44
.config/
@@ -120,9 +120,9 @@ venv.bak/
120120
**plugins
121121
*.tfstate*
122122

123-
# Hypha
124-
*hyphaContext.db*
123+
# Preen
124+
*preenContext.db*
125125
.docker/db/data/**
126-
.hyphadb/config.yaml
127-
hypha
128-
.hypha/
126+
.preendb/config.yaml
127+
preen
128+
.preen/

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Copyright (c) 2024 Hypha Inc.
1+
Copyright (c) 2024 Preen Inc.
22

33
Portions of this software are licensed as follows:
44

55
* All content that resides under the "enterprise/" directory of this repository, if that directory exists, is licensed under the license defined in "enterprise/LICENSE.md".
6-
* All third party components incorporated into the Hypha Software are licensed under the original license provided by the owner of the applicable component.
6+
* All third party components incorporated into the Preen Software are licensed under the original license provided by the owner of the applicable component.
77
* Content outside of the above mentioned directories or restrictions above is available under the "LGPL3" license as defined below.
88

99
GNU LESSER GENERAL PUBLIC LICENSE

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ integration-test: build
44

55
.PHONY: build
66
build:
7-
go build -o bin/hypha main.go
7+
go build -o bin/preen main.go
88

99
.PHONY: lint
1010
lint:

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
![tests](https://github.com/hyphasql/hypha/actions/workflows/ci.yaml/badge.svg)
1+
![tests](https://github.com/preendata/preen/actions/workflows/ci.yaml/badge.svg)
22

3-
# Hypha
3+
# Preen
44

5-
Hypha is a powerful command-line application for querying from multiple sources locally from your laptop. Under the hood, Hypha uses [DuckDB](https://duckdb.org/) to build an ephemeral, in-memory data warehouse and then uses DuckDB's SQL engine to query the data. Think of Hypha as a mix of Fivetran and DBT for your DuckDB use cases. You describe the data you want to query using a declarative language and Hypha takes care of the rest.
5+
Preen is a powerful command-line application for querying from multiple sources locally from your laptop. Under the hood, Preen uses [DuckDB](https://duckdb.org/) to build an ephemeral, in-memory data warehouse and then uses DuckDB's SQL engine to query the data. Think of Preen as a mix of Fivetran and DBT for your DuckDB use cases. You describe the data you want to query using a declarative language and Preen takes care of the rest.
66

7-
Hypha is currently in the alpha stage and not all features are available. We are working on adding more features and improving the user experience. If you have any questions or feedback, please feel free to open an issue on GitHub.
7+
Preen is currently in the alpha stage and not all features are available. We are working on adding more features and improving the user experience. If you have any questions or feedback, please feel free to open an issue on GitHub.
88

99
## Features
1010

@@ -20,31 +20,31 @@ Hypha is currently in the alpha stage and not all features are available. We are
2020

2121
### Download pre-built binary
2222

23-
You can download a pre-built binary for your operating system and architecture from the [GitHub Releases](https://github.com/hyphasql/hypha/releases) page.
23+
You can download a pre-built binary for your operating system and architecture from the [GitHub Releases](https://github.com/preendata/preen/releases) page.
2424

2525
```bash
2626
# Using curl
27-
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hyphasql/hypha/main/build/install.sh)"
27+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/preendata/preen/main/build/install.sh)"
2828

2929
# Using wget
30-
sh -c "$(wget https://raw.githubusercontent.com/hyphasql/hypha/main/build/install.sh -O -)"
30+
sh -c "$(wget https://raw.githubusercontent.com/preendata/preen/main/build/install.sh -O -)"
3131
```
3232

3333
### Build from source
3434

35-
To build Hypha from source, you need to have Go 1.23.0 or later installed on your system. Then, you can build the application using the following commands:
35+
To build Preen from source, you need to have Go 1.23.0 or later installed on your system. Then, you can build the application using the following commands:
3636

3737
```bash
38-
git clone https://github.com/hyphasql/hypha.git
39-
cd hypha
38+
git clone https://github.com/preendata/preen.git
39+
cd preen
4040
make build
4141
```
4242

43-
This will create a `hypha` binary in the `bin` directory. You can add this to your `PATH` if you want to use the `hypha` command from anywhere.
43+
This will create a `preen` binary in the `bin` directory. You can add this to your `PATH` if you want to use the `preen` command from anywhere.
4444

4545
## Configuration
4646

47-
Hypha uses two configuration files: `sources.yaml` and `models.yaml`. The `sources.yaml` file is used to configure the data sources that Hypha will query. The `models.yaml` file is used to define the models that Hypha will build. The directory Hypha will look for source and model configurations is configurable via the `HYPHA_CONFIG_PATH` environment variable. You can see an example of the environment configuation in the [.env.example](.env.example) file.The `models.yaml` file is optional. If it is not present, Hypha will look for `.yaml` files in the `models` directory.
47+
Preen uses two configuration files: `sources.yaml` and `models.yaml`. The `sources.yaml` file is used to configure the data sources that Preen will query. The `models.yaml` file is used to define the models that Preen will build. The directory Preen will look for source and model configurations is configurable via the `PREEN_CONFIG_PATH` environment variable. You can see an example of the environment configuation in the [.env.example](.env.example) file.The `models.yaml` file is optional. If it is not present, Preen will look for `.yaml` files in the `models` directory.
4848

4949
Here is an example `sources.yaml` file:
5050

@@ -55,7 +55,7 @@ sources:
5555
connection:
5656
host: localhost
5757
port: 27117
58-
database: hypha
58+
database: preen
5959
username: root
6060
password: ${MONGO_PASSWORD} # You can also use environment variables.
6161
auth_source: admin
@@ -69,7 +69,7 @@ Here is an example `models.yaml` file:
6969

7070
```yaml
7171
models:
72-
- name: hypha-users-model
72+
- name: preen-users-model
7373
type: database
7474
query: |
7575
SELECT users.user_id, users.name, users.email FROM users
@@ -78,7 +78,7 @@ models:
7878
You can validate your configuration by running:
7979

8080
```bash
81-
hypha source validate
81+
preen source validate
8282
```
8383

8484
## Usage
@@ -88,24 +88,24 @@ hypha source validate
8888
Building a model will fetch the data from the source and save it to the DuckDB database. To build your models, run:
8989

9090
```bash
91-
hypha model build
91+
preen model build
9292
```
9393

9494
### Querying Data
9595

9696
You can query data using the interactive REPL. You can also specify the output format of the data (table, csv, markdown, json).
9797

9898
```bash
99-
hypha repl
99+
preen repl
100100
101101
# Specify output format
102-
hypha repl --output-format csv
102+
preen repl --output-format csv
103103
```
104104

105105
For one-off queries, use the `query` command:
106106

107107
```bash
108-
hypha query "select * from your_model limit 10" --output-format csv
108+
preen query "select * from your_model limit 10" --output-format csv
109109
```
110110

111111
## Development
@@ -121,4 +121,4 @@ To set up the development environment:
121121

122122
## License
123123

124-
This project is dual-licensed under the LGPL-3.0 License and Hypha Enterprise License - see the [LICENSE](LICENSE) file for details. Our core features are free to use under the LGPL-3.0 License. If you need additional features, you can purchase a Hypha Enterprise License.
124+
This project is dual-licensed under the LGPL-3.0 License and Preen Enterprise License - see the [LICENSE](LICENSE) file for details. Our core features are free to use under the LGPL-3.0 License. If you need additional features, you can purchase a Preen Enterprise License.

build/ci/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
environment:
3030
- MONGO_INITDB_ROOT_USERNAME=root
3131
- MONGO_INITDB_ROOT_PASSWORD=thisisnotarealpassword
32-
- MONGO_INITDB_DATABASE=hypha
32+
- MONGO_INITDB_DATABASE=preen
3333
volumes:
3434
- ./mongo/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh
3535
- ./mongo/create-mongo-user.js:/scripts/create-mongo-user.js

build/ci/hyphadb.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM golang:1.21.5-bullseye
22

3-
COPY . /hyphadb
3+
COPY . /preen
44

5-
WORKDIR /hyphadb
5+
WORKDIR /preen
66

77
RUN go mod tidy

build/ci/integration-test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
docker compose -f build/ci/docker-compose.yaml up -d
44
sleep 5
55

6-
bin/hypha model build
6+
bin/preen model build
77

88
# Test that the MySQL model was built and can be queried. Query should return 1 row.
9-
MYSQL_RESULTS_LENGTH=$(bin/hypha query -f json "select * from mysql_data_types_test;" | jq length)
9+
MYSQL_RESULTS_LENGTH=$(bin/preen query -f json "select * from mysql_data_types_test;" | jq length)
1010
if [[ $MYSQL_RESULTS_LENGTH -ne 1 ]]; then
1111
echo "Expected 1 row in mysql_data_types_test, got $MYSQL_RESULTS_LENGTH"
1212
exit 1
1313
fi
1414

1515
# Test that the PostgreSQL model was built and can be queried. Query should return 1 row.
16-
PG_RESULTS_LENGTH=$(bin/hypha query -f json "select * from pg_data_types_test;" | jq length)
16+
PG_RESULTS_LENGTH=$(bin/preen query -f json "select * from pg_data_types_test;" | jq length)
1717
if [[ $PG_RESULTS_LENGTH -ne 1 ]]; then
1818
echo "Expected 1 row in pg_data_types_test, got $PG_RESULTS_LENGTH"
1919
exit 1
2020
fi
2121

2222
# Test that the MongoDB model was built and can be queried. Query should return 1 row.
23-
MONGO_RESULTS_LENGTH=$(bin/hypha query -f json "select * from mongodb_test;" | jq length)
23+
MONGO_RESULTS_LENGTH=$(bin/preen query -f json "select * from mongodb_test;" | jq length)
2424
if [[ $MONGO_RESULTS_LENGTH -ne 1 ]]; then
2525
echo "Expected 1 row in mongodb_test, got $MONGO_RESULTS_LENGTH"
2626
exit 1

0 commit comments

Comments
 (0)