From 1afbf6cdaf2a34b42120187634d091494dfa5d53 Mon Sep 17 00:00:00 2001 From: Emanuel Calvo <3manuek@gmail.com> Date: Wed, 14 Jun 2023 13:53:13 +0200 Subject: [PATCH] chores: 1.3 release Signed-off-by: Emanuel Calvo <3manuek@gmail.com> --- CHANGELOG.md | 13 ++++++++++--- README.md | 9 +++++++-- artifact_builder/README.md | 19 +++++++++++++++---- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e8bba5..0e56bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,17 @@ Notable changes to pgqueries. -## Release number - [yyyy-mm-dd] +## v1.3 - [2023-06-14] ### Added -### Changed +- artifact_builder builds NDJSON format, for easy import into Postgres using COPY command. +### Fixed -### Fixed \ No newline at end of file +- Fixes to the artifact_builder + +## v1.0 - v1.2 + +### Added + +- Functional artifact_builder diff --git a/README.md b/README.md index 12ca79d..aabc547 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,6 @@ The hierarchical tree is compound by: sql//file.[sql|md] ``` - - ## SQL formatting and practices Rule 1: @@ -44,6 +42,13 @@ Rule 2: > First comment line is mandatory. Minimal accepted documentation. +## Indexer + +> This is currently under development. + +This repository includes and indexer tool (artifact_builder) that builds json artifacts to be +easily imported into Postgres using NDJSON format. + ## Testing TODO diff --git a/artifact_builder/README.md b/artifact_builder/README.md index 803533b..e8c1627 100644 --- a/artifact_builder/README.md +++ b/artifact_builder/README.md @@ -4,14 +4,25 @@ This section builds a JSON map of the SQL and MD files present on the repository ## Execution +Load virtual env: ```bash -python3 artifact_builder/ -D sql -v | jq '.search_query' +python3 -m venv venv +source venv/bin/activate +pip3 install -r requirements.txt ``` -Default output: index.json (with `--output`). +The folowing allows you to index and search: + +```bash +python3 artifact_builder/ -D sql -E -v | jq '.search_query' +``` + +See `python3 artifact_builder/ -h` for more information. + +Default output: index.json (with `--output`) and `--ouput-ndjson` (`ndindex.json`). -## Modules [potentially] used +## TODO -[Dataclasses](https://github.com/lidatong/dataclasses-json) +Modules [potentially] beneficial: [Dataclasses](https://github.com/lidatong/dataclasses-json)