diff --git a/LICENSE b/LICENSE index 7243b40..c5e02bb 100644 --- a/LICENSE +++ b/LICENSE @@ -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. diff --git a/SECURITY.md b/SECURITY.md index a7ccdbc..2b90d6d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -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]). diff --git a/docs/nav/development/CHANGELOG.md b/docs/nav/development/CHANGELOG.md deleted file mode 100644 index 5d1ee07..0000000 --- a/docs/nav/development/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -Check the [Github Releases](https://github.com/datnguye/dbterd/releases) out! diff --git a/docs/nav/development/contributing-guide.md b/docs/nav/development/contributing-guide.md index f941a23..a10f327 100644 --- a/docs/nav/development/contributing-guide.md +++ b/docs/nav/development/contributing-guide.md @@ -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 @@ -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 @@ -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: @@ -78,6 +85,7 @@ poe test ``` Run test with coverage report: + ```bash poe test-cov ``` diff --git a/docs/nav/guide/dbt-cloud/download-artifact-from-a-job-run.md b/docs/nav/guide/dbt-cloud/download-artifact-from-a-job-run.md index caac3e8..a5a378d 100644 --- a/docs/nav/guide/dbt-cloud/download-artifact-from-a-job-run.md +++ b/docs/nav/guide/dbt-cloud/download-artifact-from-a-job-run.md @@ -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:///deploy//projects/irrelevant/runs/`. +```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:///deploy//projects/irrelevant/runs/ +``` In the above: @@ -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 @@ -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 --dbt-cloud +dbterd run --dbt-cloud [-s ] ``` -> 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: diff --git a/mkdocs.yml b/mkdocs.yml index 7edf72e..3e4185f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,7 +12,7 @@ copyright: Copyright © 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 @@ -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 @@ -44,7 +42,6 @@ theme: - navigation.footer - navigation.indexes - navigation.sections - # - navigation.tabs - navigation.top - navigation.tracking - search.highlight