Skip to content

Commit

Permalink
docs: improve explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
shah committed Jan 15, 2024
1 parent 42fe9f0 commit c1ae453
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 8 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,30 @@ the following to install Git, Deno, DuckDB and SQLite:
```psh
$ winget install Git.Git deno SQLite.SQLite DuckDB.cli JanDeDobbeleer.OhMyPosh
```
**IMPORTANT**: `winget` installations will update your PATH so exit your terminal,
close VS Code, etc. and restart your terminal session and VS Code _before you try
out the code_.

**IMPORTANT**: `winget` installations will update your PATH so exit your
terminal, close VS Code, etc. and restart your terminal session and VS Code
_before you try out the code_.

### Quick start (Linux or MacOS):

For Linux or MacOS use [pkgx](https://pkgx.sh/) and [eget](https://github.com/zyedidia/eget/releases)
to install dependencies (use `pkgx` by default, `eget` to get from GitHub directrly
when pkgx is missing a package):
For Linux or MacOS use [pkgx](https://pkgx.sh/) and
[eget](https://github.com/zyedidia/eget/releases) to install dependencies (use
`pkgx` by default, `eget` to get from GitHub directrly when pkgx is missing a
package):

```bash
# use your OS-specific package manager to install Git and then:
$ pkgx install deno.land sqlite.org duckdb.org
$ eget lovasoa/SQLpage --to=$HOME/bin/sqlpage
```

### Try out the code
### Dependendies Elaboration

See [support/docs/dependencies.md](support/docs/dependencies.md) if you need
further details about what the code depends on at runtime.

## Try out the code

Once you've installed Git and Deno you can run the code directly from GitHub
(the latest version or any specific pinned version) without cloning the GitHub
Expand All @@ -82,7 +89,7 @@ $ deno task ahc-hrsn-screening-test-e2e # run the orchestration tasks as end-t
$ deno task ahc-hrsn-screening-test-serve # run the orchestration tasks as end-to-end test and serve with SQLPage
```

### Build (Development) Dependencies
## Build (Development) Dependencies

During build (development) in a sandbox you will need all the runtime
dependencies mentioned above plus do the following:
Expand Down
51 changes: 51 additions & 0 deletions support/docs/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Dependencies

## Runtime (Deployment) Dependencies

All dependencies are cross-platform, open source with permissive licenses so
that developers and data analysts do not need to procure or purchase any tools.

- Download
[Deno](https://docs.deno.com/runtime/manual/getting_started/installation)
Javascript runtime and put it in your `PATH`.
- Download [DuckDB](https://duckdb.org/docs/installation) 0.9+ for data
orchestration operations and put it in your `PATH`.
- Download [SQLite](https://www.sqlite.org/download.html) embedded database and
put it in your `PATH`.
- Download [SQLPage](https://github.com/lovasoa/SQLpage/releases) SQL browser,
call it `sqlpage` on Linux/MacOS (not the default `sqlpage.bin`) or
`sqlpage.exe` on Windows and put it in your `PATH`.
- SQLPage is not strictly required but highly recommended for easier
diagnostics. See _Manage GitHub binaries with `eget`_ for an easy way to
manage GitHub binaries.

The utilities mentioned above are cross-platform single-file binaries and will
run on Windows, MacOS, or Linux. Please be sure to get the proper binaries for
your platform.

You can run `deno task doctor` (see below) to see if dependencies are installed
properly.

### Manage GitHub binaries with `eget`

A good way to get binaries from GitHub (e.g. SQLPage, et. al.) you should
download and use [eget](https://github.com/zyedidia/eget/releases).

1. Create a directory called `D:\bin` or `C:\Program Files\qe-cs` (or anywhere
you want), grab the `eget.exe` binary and store it in `D:\bin`.
2. Add `D:\bin` or `C:\Program Files\qe-cs` (or whatever you created in step #1)
to your `PATH`.
3. Create an `D:\bin\eget.toml` file (or `C:\Program Files\qe-cs\eget.toml`) and
add the following content. Be sure to set `target = "X"` where X is either
`D:\\bin` or `C:\\Program Files\\qe-cs` (or whatever you created in step #1).

```toml
[global]
target = "D:\\bin"

["lovasoa/SQLpage"]
```

4. CD into `D:\bin` (or `C:\\Program Files\\qe-cs` or whatever you created in
step #1) and run `eget /D` to download all required binaries.

0 comments on commit c1ae453

Please sign in to comment.