Skip to content

Commit e3c7dc8

Browse files
committed
rename
1 parent d52622b commit e3c7dc8

Some content is hidden

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

66 files changed

+334
-340
lines changed

.github/workflows/run_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Data Scribe Tests"
1+
name: "Schema Scribe Tests"
22

33
on:
44
push:
@@ -32,12 +32,12 @@ jobs:
3232
3333
- name: "Run Pytest"
3434
run: |
35-
pytest data_scribe/tests/
35+
pytest schema_scribe/tests/
3636
env:
3737
# Set dummy keys to allow client initialization tests to pass
3838
# The actual API calls are mocked, so these don't need to be real
3939
OPENAI_API_KEY: "ci_test_key"
4040
GOOGLE_API_KEY: "ci_test_key"
4141
SNOWFLAKE_PASSWORD: "ci_test_key"
4242
MARIADB_PASSWORD: "ci_test_key"
43-
CONFLUENCE_API_TOKEN: "ci_test_key"
43+
CONFLUENCE_API_TOKEN: "ci_test_key"

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# ✍️ Data Scribe: AI-Powered Data Documentation
1+
# ✍️ Schema Scribe: AI-Powered Data Documentation
22

33
**Tired of writing data documentation? Let AI do it for you.**
44

5-
Data Scribe is a CLI tool that scans your databases and dbt projects, uses AI to generate descriptions, and automatically updates your documentation.
5+
Schema Scribe is a CLI tool that scans your databases and dbt projects, uses AI to generate descriptions, and automatically updates your documentation.
66

77
---
88

99
## ✨ See it in Action
1010

11-
Stop manually updating YAML files or writing Markdown tables. Let `data-scribe` do the work in seconds.
11+
Stop manually updating YAML files or writing Markdown tables. Let `schema-scribe` do the work in seconds.
1212

1313
| **Magically update dbt `schema.yml`** | **Instantly generate DB catalogs (w/ ERD)** |
1414
| :---: | :---: |
15-
| Run `data-scribe dbt --update` and watch AI fill in your missing descriptions, tags, and tests. | Point `data-scribe db` at a database and get a full Markdown catalog, complete with a Mermaid ERD. |
15+
| Run `schema-scribe dbt --update` and watch AI fill in your missing descriptions, tags, and tests. | Point `schema-scribe db` at a database and get a full Markdown catalog, complete with a Mermaid ERD. |
1616
| ![dbt Workflow Demo](asset/dbt_demo.gif) | ![Database Scan Demo](asset/markdown_demo.gif) |
1717

1818
## 🚀 Quick Start (60 Seconds)
@@ -24,20 +24,20 @@ Get your first AI-generated catalog in less than a minute.
2424
Clone the repo and install dependencies.
2525

2626
```bash
27-
git clone https://github.com/dongwonmoon/DataScribe.git
28-
cd DataScribe
27+
git clone https://github.com/dongwonmoon/SchemaScribe.git
28+
cd SchemaScribe
2929
pip install -r requirements.txt
3030
```
3131

32-
*(Note: For specific databases, install optional dependencies: `pip install -e ".[postgres, snowflake]"`)*
33-
*(Note: To use the web server, also install server dependencies: `pip install "data-scribe[server]"`)*
32+
*(Note: For specific databases, install optional dependencies: `pip install -e " .[postgres, snowflake]"`)*
33+
*(Note: To use the web server, also install server dependencies: `pip install "schema-scribe[server]"`)*
3434

3535
### 2. Initialize
3636

3737
Run the interactive wizard. It will guide you through setting up your database and LLM, automatically creating `config.yaml` and a secure `.env` file for your API keys.
3838

3939
```bash
40-
data-scribe init
40+
schema-scribe init
4141
```
4242

4343
### 3. Run!
@@ -48,22 +48,22 @@ You're all set.
4848
(Make sure `dbt compile` has been run to create `manifest.json`)
4949
```bash
5050
# See what's missing (CI check)
51-
data-scribe dbt --project-dir /path/to/your/dbt/project --check
51+
schema-scribe dbt --project-dir /path/to/your/dbt/project --check
5252

5353
# Let AI fix it
54-
data-scribe dbt --project-dir /path/to/your/dbt/project --update
54+
schema-scribe dbt --project-dir /path/to/your/dbt/project --update
5555

5656
# Check for documentation drift against the live database
57-
data-scribe dbt --project-dir /path/to/your/dbt/project --db your_db_profile --drift
57+
schema-scribe dbt --project-dir /path/to/your/dbt/project --db your_db_profile --drift
5858

5959
# Generate a global, end-to-end lineage graph
60-
data-scribe lineage --project-dir /path/to/your/dbt/project --db your_db_profile --output your_mermaid_profile
60+
schema-scribe lineage --project-dir /path/to/your/dbt/project --db your_db_profile --output your_mermaid_profile
6161
```
6262

6363
**For a database:**
6464
(Assuming you created an output profile named `my_markdown` during `init`)
6565
```bash
66-
data-scribe db --output my_markdown
66+
schema-scribe db --output my_markdown
6767
```
6868

6969
---
@@ -96,19 +96,19 @@ data-scribe db --output my_markdown
9696

9797
## Command Reference
9898

99-
### `data-scribe init`
99+
### `schema-scribe init`
100100

101101
Runs the interactive wizard to create `config.yaml` and `.env` files. This is the recommended first step.
102102

103-
### `data-scribe db`
103+
### `schema-scribe db`
104104

105105
Scans a live database and generates a catalog.
106106

107107
- `--db TEXT`: (Optional) The database profile from `config.yaml` to use. Overrides default.
108108
- `--llm TEXT`: (Optional) The LLM profile from `config.yaml` to use. Overrides default.
109109
- `--output TEXT`: (Required) The output profile from `config.yaml` to use.
110110

111-
### `data-scribe dbt`
111+
### `schema-scribe dbt`
112112

113113
Scans a dbt project's `manifest.json` file.
114114

@@ -122,15 +122,15 @@ Scans a dbt project's `manifest.json` file.
122122

123123
**Note:** `--update`, `--check`, `--interactive`, and `--drift` flags are mutually exclusive. Choose only one.
124124

125-
### `data-scribe lineage`
125+
### `schema-scribe lineage`
126126

127127
Generates a global, end-to-end lineage graph for a dbt project.
128128

129129
- `--project-dir TEXT`: **(Required)** Path to the dbt project directory.
130130
- `--db TEXT`: **(Required)** The database profile to scan for physical Foreign Keys.
131131
- `--output TEXT`: **(Required)** The output profile (must be type 'mermaid') to write the `.md` file to.
132132

133-
### `data-scribe serve`
133+
### `schema-scribe serve`
134134

135135
Launches the FastAPI web server.
136136

@@ -141,12 +141,12 @@ Launches the FastAPI web server.
141141

142142
## 🚀 Web API Server
143143

144-
Data Scribe includes a built-in FastAPI web server that exposes the core workflows via a REST API. This is perfect for programmatic integration or for building a custom web UI.
144+
Schema Scribe includes a built-in FastAPI web server that exposes the core workflows via a REST API. This is perfect for programmatic integration or for building a custom web UI.
145145

146146
**1. Launch the server:**
147-
(Make sure you have installed the server dependencies: `pip install "data-scribe[server]"`)
147+
(Make sure you have installed the server dependencies: `pip install "schema-scribe[server]"`)
148148
```bash
149-
data-scribe serve --host 0.0.0.0 --port 8000
149+
schema-scribe serve --host 0.0.0.0 --port 8000
150150
```
151151

152152
**2. Explore the API:**
@@ -180,12 +180,12 @@ If the documentation is outdated, the API will return a `409 Conflict` status co
180180

181181
Adding a new database, LLM, or writer is easy:
182182

183-
1. Create a new class in the appropriate directory (e.g., `data_scribe/components/db_connectors`).
183+
1. Create a new class in the appropriate directory (e.g., `schema_scribe/components/db_connectors`).
184184
2. Implement the base interface (e.g., `BaseConnector`).
185-
3. Register your new class in `data_scribe/core/factory.py`.
185+
3. Register your new class in `schema_scribe/core/factory.py`.
186186

187187
The `init` command and core logic will automatically pick up your new component.
188188

189189
## 🤝 Contributing
190190

191-
Contributions are welcome! Please feel free to open an issue or submit a pull request.
191+
Contributions are welcome! Please feel free to open an issue or submit a pull request.

create_demo_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
"INSERT INTO users (name, email) VALUES ('천재 사용자', 'genius@example.com')"
4646
)
4747
cursor.execute(
48-
"INSERT INTO products (name, price) VALUES ('Data Scribe Pro', 99.9)"
48+
"INSERT INTO products (name, price) VALUES ('Schema Scribe Pro', 99.9)"
4949
)
5050

5151
conn.commit()
5252
conn.close()
5353

54-
print(f"✅ 데모 데이터베이스 '{DB_FILE}' 생성 완료!")
54+
print(f"✅ 데모 데이터베이스 '{DB_FILE}' 생성 완료!")

jaffle_shop_mini/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ config-version: 2
55
profile: 'default'
66

77
model-paths: ["models"]
8-
target-path: "target"
8+
target-path: "target"

jaffle_shop_mini/models/schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ models:
3131
- user_info
3232
- pii
3333
description: This dbt model generates a single record representing customer
34-
information, with attributes like customer ID, name, and email address.
34+
information, with attributes like customer ID, name, and email address.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ requires = ["setuptools>=61.0"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "data-scribe"
7-
version = "0.1.1"
6+
name = "schema-scribe"
7+
version = "0.2.0"
88
description = "AI-powered data documentation generator for databases and dbt projects."
99
readme = "README.md"
1010
authors = [
@@ -65,8 +65,8 @@ all = [
6565
]
6666

6767
[tool.setuptools.packages.find]
68-
include = ["data_scribe*"]
68+
include = ["schema_scribe*"]
6969
exclude = ["jaffle_shop_mini*", "tests*"]
7070

7171
[project.scripts]
72-
data-scribe = "data_scribe.main:app"
72+
schema-scribe = "schema_scribe.main:app"
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This module defines the command-line interface (CLI) for the Data Scribe application.
2+
This module defines the command-line interface (CLI) for the Schema Scribe application.
33
44
It uses the Typer library to create a simple and intuitive CLI for scanning databases
55
and dbt projects. The main commands, `db` and `dbt`, orchestrate the process of
@@ -18,24 +18,24 @@
1818
except:
1919
uvicorn = None
2020

21-
from data_scribe.core.db_workflow import DbWorkflow
22-
from data_scribe.core.dbt_workflow import DbtWorkflow
23-
from data_scribe.core.lineage_workflow import LineageWorkflow
24-
from data_scribe.core.exceptions import (
21+
from schema_scribe.core.db_workflow import DbWorkflow
22+
from schema_scribe.core.dbt_workflow import DbtWorkflow
23+
from schema_scribe.core.lineage_workflow import LineageWorkflow
24+
from schema_scribe.core.exceptions import (
2525
DataScribeError,
2626
ConnectorError,
2727
ConfigError,
2828
LLMClientError,
2929
WriterError,
3030
CIError,
3131
)
32-
from data_scribe.core.factory import (
32+
from schema_scribe.core.factory import (
3333
DB_CONNECTOR_REGISTRY,
3434
LLM_CLIENT_REGISTRY,
3535
WRITER_REGISTRY,
3636
)
37-
from data_scribe.utils.logger import get_logger
38-
from data_scribe.server.main import app as fastapi_app
37+
from schema_scribe.utils.logger import get_logger
38+
from schema_scribe.server.main import app as fastapi_app
3939

4040
# Initialize a logger for this module
4141
logger = get_logger(__name__)
@@ -161,7 +161,7 @@ def _prompt_db_params(
161161
f"Password (sensitive, will be stored in .env)", hide_input=True
162162
)
163163
env_key = f"{profile_name.upper()}_PASSWORD"
164-
params["password"] = f"${{{env_key}}}"
164+
params["password"] = f"$ {{{env_key}}}"
165165
env_data[env_key] = pw
166166
params["dbname"] = typer.prompt("Database (dbname)")
167167
if db_type == "postgres":
@@ -178,7 +178,7 @@ def _prompt_db_params(
178178
f"Password (sensitive, will be stored in .env)", hide_input=True
179179
)
180180
env_key = f"{profile_name.upper()}_PASSWORD"
181-
params["password"] = f"${{{env_key}}}"
181+
params["password"] = f"$ {{{env_key}}}"
182182
env_data[env_key] = pw
183183
params["warehouse"] = typer.prompt("Warehouse")
184184
params["database"] = typer.prompt("Database")
@@ -273,7 +273,7 @@ def _prompt_writer_params(
273273
"Confluence Parent Page ID (numeric)"
274274
)
275275
params["page_title_prefix"] = typer.prompt(
276-
"Page title prefix", default="Data Scribe Catalog"
276+
"Page title prefix", default="Schema Scribe Catalog"
277277
)
278278
params["username"] = typer.prompt("Confluence Username (email)")
279279

@@ -470,7 +470,7 @@ def init_config():
470470
logger.info("Aborting configuration initialization.")
471471
raise typer.Exit(code=0)
472472

473-
logger.info(f"Starting the Data Scribe configuration wizard...")
473+
logger.info(f"Starting the Schema Scribe configuration wizard...")
474474
logger.info(
475475
f"This will create '{CONFIG_FILE}' and '{ENV_FILE}' in the current directory."
476476
)
@@ -559,9 +559,9 @@ def init_config():
559559
if env_data:
560560
# Use 'a' (append) mode to avoid overwriting existing .env variables
561561
with open(ENV_FILE, "a", encoding="utf-8") as f:
562-
f.write("\n# Added by data-scribe init\n")
562+
f.write("\n# Added by schema-scribe init\n")
563563
for key, value in env_data.items():
564-
f.write(f'{key}="{value}"\n')
564+
f.write(f'{key}"={value}"\n')
565565
logger.info(
566566
typer.style(
567567
f"Sensitive information added to '{ENV_FILE}'.",
@@ -589,24 +589,24 @@ def serve_app(
589589
port: int = typer.Option(8000, help="The port to run the server on."),
590590
):
591591
"""
592-
Launches the Data Scribe web server (FastAPI).
592+
Launches the Schema Scribe web server (FastAPI).
593593
594594
This command starts a Uvicorn server to run the FastAPI application,
595-
providing a web-based API for the Data Scribe workflows.
595+
providing a web-based API for the Schema Scribe workflows.
596596
597597
Note: This feature requires optional dependencies. Install them with:
598-
`pip install "data-scribe[server]"`
598+
`pip install \"schema-scribe[server]"`
599599
"""
600600
if uvicorn is None:
601601
logger.error("Failed to import 'uvicorn' or 'fastapi'.")
602602
logger.error(
603-
"Please run 'pip install data-scribe[server]' to install server dependencies."
603+
"Please run 'pip install schema-scribe[server]' to install server dependencies."
604604
)
605605
raise typer.Exit(code=1)
606606

607-
logger.info(f"Starting Data Scribe server at http://{host}:{port}")
607+
logger.info(f"Starting Schema Scribe server at http://{host}:{port}")
608608
logger.info("Go to http://{host}:{port}/docs for API documentation.")
609609

610610
uvicorn.run(
611611
fastapi_app, host=host, port=port # The FastAPI app we imported
612-
)
612+
)

data_scribe/components/db_connectors/__init__.py renamed to schema_scribe/components/db_connectors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .mariadb_connector import MariaDBConnector
44
from .duckdb_connector import DuckDBConnector
55
from .snowflake_connector import SnowflakeConnector
6-
from .sql_base_connector import SqlBaseConnector
6+
from .sql_base_connector import SqlBaseConnector

data_scribe/components/db_connectors/duckdb_connector.py renamed to schema_scribe/components/db_connectors/duckdb_connector.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import os
1111
from typing import List, Dict, Any, Optional
1212

13-
from data_scribe.core.interfaces import BaseConnector
14-
from data_scribe.core.exceptions import ConnectorError
15-
from data_scribe.utils.logger import get_logger
13+
from schema_scribe.core.interfaces import BaseConnector
14+
from schema_scribe.core.exceptions import ConnectorError
15+
from schema_scribe.utils.logger import get_logger
1616

1717
logger = get_logger(__name__)
1818

@@ -389,4 +389,4 @@ def close(self):
389389
self.connection.close()
390390
self.connection = None
391391
self.cursor = None
392-
logger.info("DuckDB database connection closed.")
392+
logger.info("DuckDB database connection closed.")

data_scribe/components/db_connectors/mariadb_connector.py renamed to schema_scribe/components/db_connectors/mariadb_connector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from typing import Dict, Any
1111

1212
from .sql_base_connector import SqlBaseConnector
13-
from data_scribe.core.exceptions import ConnectorError
14-
from data_scribe.utils.logger import get_logger
13+
from schema_scribe.core.exceptions import ConnectorError
14+
from schema_scribe.utils.logger import get_logger
1515

1616
logger = get_logger(__name__)
1717

@@ -62,4 +62,4 @@ def connect(self, db_params: Dict[str, Any]):
6262
)
6363
except mysql.connector.Error as e:
6464
logger.error(f"MariaDB/MySQL connection failed: {e}", exc_info=True)
65-
raise ConnectorError(f"MariaDB/MySQL connection failed: {e}") from e
65+
raise ConnectorError(f"MariaDB/MySQL connection failed: {e}") from e

0 commit comments

Comments
 (0)