Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
datnguye committed Jan 13, 2024
1 parent d0da492 commit 00e541a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 36 deletions.
22 changes: 20 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://dbterd.datnguyen.de/latest/license.html)
MIT License

_(please help to check [here](./docs/license.md) if the above link doesn't work)_
Copyright (c) 2022 Dat Nguyen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 7 additions & 16 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported | Until When? |
| ------- | ------------------ | ------------------ |
| 1.7.x | :white_check_mark: | |
| 1.6.x | :white_check_mark: | |
| 1.5.x | :warning: | End of 2023 |
| 1.4.x | :warning: | End of 2023 |
| 1.3.x | :warning: | End of 2023 |
| 1.2.x | :warning: | End of 2023 |
| 1.1.x | :warning: | End of 2023 |
| 1.0.x | :warning: | End of 2023 |
| < 1.0 | :x: | End of Life |
| 1.9.x | :white_check_mark: | |
| 1.8.x | :white_check_mark: | |
| 1.7.x | :warning: | End of Feb 2024 |
| 1.6.x | :warning: | End of Jan 2024 |
| < 1.6 | :x: | End of Life |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.
The repository is currently enabled with [Privately reporting a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability). Once any security pops up, `dbterd` maintainer will be responsible to make an update and might release the patches if necessarily.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
Otherwise, please help to explicitly raise the awareness via [Report a security vulnerability issue](https://github.com/datnguye/dbterd/security/advisories/new/?title=[SEC]).
1 change: 0 additions & 1 deletion docs/nav/development/CHANGELOG.md

This file was deleted.

16 changes: 12 additions & 4 deletions docs/nav/development/contributing-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- [Setting up an environment](#setting-up-an-environment)
- [Tools](#tools)
- [Testing](#testing)
- [`pytest`](#pytest)
- [Submitting a Pull Request](#submitting-a-pull-request)

## About this document
Expand Down Expand Up @@ -47,12 +46,20 @@ There are some tools that will be helpful to you in developing locally. While th

We will buy `poetry` in `dbterd` development and testing.

So first install poetry via pip:
So first install poetry via the [official installer](https://python-poetry.org/docs/#installing-with-the-official-installer)

```bash
curl -sSL https://install.python-poetry.org | python3 -
```

or via pip:

```bash
python3 -m pip install poetry --upgrade
```

then, start installing the local environment:

```bash
python3 -m poetry install
python3 -m poetry shell
Expand All @@ -61,15 +68,15 @@ pip install -e .
dbterd -h
```


## Testing

Once you're able to manually test that your code change is working as expected, it's important to run existing automated tests, as well as adding some new ones. These tests will ensure that:

- Your code changes do not unexpectedly break other established functionality
- Your code changes can handle all known edge cases
- The functionality you're adding will _keep_ working in the future

#### `pytest`
**Use `pytest`**

Finally, you can also run a specific test or group of tests using [`pytest`](https://docs.pytest.org/en/latest/) directly. With a virtualenv active and dev dependencies installed you can do things like:

Expand All @@ -78,6 +85,7 @@ poe test
```

Run test with coverage report:

```bash
poe test-cov
```
Expand Down
21 changes: 15 additions & 6 deletions docs/nav/guide/dbt-cloud/download-artifact-from-a-job-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ In order to support dbt Cloud users, `dbterd` is now having multiple CLI options

## 1. Prepare the environment variables

Behind the scene, the API Endpoint will look like: `https://{host_url}/api/{api_version}/accounts/{account_id}/runs/{run_id}/artifacts/{path}`.
Behind the scene, the API Endpoint will look like:

And the dbt Cloud's Job Rub will have the URL constructed as `https://<host_url>/deploy/<account_id>/projects/irrelevant/runs/<run_id>`.
```log
https://{host_url}/api/{api_version}/accounts/{account_id}/runs/{run_id}/artifacts/{path}
```

And the dbt Cloud's Job Rub will have the URL constructed as:

```log
https://<host_url>/deploy/<account_id>/projects/irrelevant/runs/<run_id>
```

In the above:

Expand All @@ -41,10 +49,10 @@ Finally, fill in `your_value` and execute the (Linux or Macos) command below:

```bash
export DBTERD_DBT_CLOUD_SERVICE_TOKEN=your_value
export DBTERD_DBT_CLOUD_HOST_URL=your_value
export DBTERD_DBT_CLOUD_ACCOUNT_ID=your_value
export DBTERD_DBT_CLOUD_RUN_ID=your_value
export DBTERD_DBT_CLOUD_RUN_ID=your_value
export DBTERD_DBT_CLOUD_HOST_URL=your_value # optional, default = cloud.getdbt.com
export DBTERD_DBT_CLOUD_API_VERSION=your_value # optional, default = v2
```

## 2. Genrate ERD file
Expand All @@ -54,10 +62,11 @@ We're going to use `--dbt-cloud` option to tell `dbterd` to use dbt Cloud API wi
The command will be looks like:

```bash
dbterd run -s <dbterd selection> --dbt-cloud
dbterd run --dbt-cloud [-s <dbterd selection>]
```

> NOTE: You can not use `--dbt` option together with `--dbt-cloud`
!!! NOTE
You can not use `--dbt` option together with `--dbt-cloud`

and then, here is the sample console log:

Expand Down
11 changes: 4 additions & 7 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ copyright: Copyright &copy; 2023 Dat Nguyen
nav:
- dbterd:
- index.md
- User Guide:
- User Guide 📖:
- CLI Reference: nav/guide/cli-references.md
- Generate the Targets:
- DBML: nav/guide/targets/generate-dbml.md
Expand All @@ -25,11 +25,9 @@ nav:
- Relationship Types: nav/metadata/relationship_type.md
- dbt Cloud:
- Download artifacts from a Job Run: nav/guide/dbt-cloud/download-artifact-from-a-job-run.md
- Development:
- Contribution Guideline: nav/development/contributing-guide.md
- Change Log: nav/development/CHANGELOG.md
- About:
- license.md
- Contribution Guideline ❤️: nav/development/contributing-guide.md
- License: license.md
- Change Log ↗️: https://github.com/datnguye/dbterd/releases" target="_blank

theme:
name: material
Expand All @@ -44,7 +42,6 @@ theme:
- navigation.footer
- navigation.indexes
- navigation.sections
# - navigation.tabs
- navigation.top
- navigation.tracking
- search.highlight
Expand Down

0 comments on commit 00e541a

Please sign in to comment.