From: Shane Jaroch Date: Sun, 29 May 2022 16:19:29 +0000 (-0400) Subject: docs, wip X-Git-Tag: 0.0.5~5 X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=5ae32d782ce1677d2afcf40e152cc8dbd4548d44;p=nutratech%2Fnt-sqlite.git docs, wip --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 12870f4..6b2cb26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,63 +1,84 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + ### Changed -- Replace grams with `msre_id` and `amt` in `food_log` table + +- Replace grams with `msre_id` and `amt` in `food_log` table ## [0.0.4] - 2021-06-17 + ### Added -- Empty `__init__.py` file to make packagable with `cli` repo (as a `git submodule`) -- Tables `custom_foods` and respective `cf_dat` + +- Empty `__init__.py` file to make packagable with `cli` repo (as a `git submodule`) +- Tables `custom_foods` and respective `cf_dat` ### Changed -- Build with `python sql/__init__.py` (removed root-level script `build.py`) -- Rename pre-populted `meals` table to `meal_name` + +- Build with `python sql/__init__.py` (removed root-level script `build.py`) +- Rename pre-populted `meals` table to `meal_name` ### Fixed -- Slight bash inconvenience when using `export.sh` + +- Slight bash inconvenience when using `export.sh` ### Removed -- `food_costs` table + +- `food_costs` table ## [0.0.3] - 2021-05-24 + ### Added -- More dummy CSV data (not production ready) -- `tagname` column to `recipes` table + +- More dummy CSV data (not production ready) +- `tagname` column to `recipes` table ### Changed -- `date` column uses `INT` type now, instead of `date` -- Drop `created` and `updated` fields off of `rda` table, add them to `biometrics` + +- `date` column uses `INT` type now, instead of `date` +- Drop `created` and `updated` fields off of `rda` table, add them to `biometrics` ### Removed -- `last_sync` column (future release? Feature is planned, but not alloted) -- `guid` parameter from `functions.sql` + +- `last_sync` column (future release? Feature is planned, but not alloted) +- `guid` parameter from `functions.sql` ## [0.0.2] - 2021-05-24 + ### Added + `SCRIPT_DIR` in `sql/__init__.py` to help track `cwd` ### Removed -- `guid` columns (may return in a future release) + +- `guid` columns (may return in a future release) ## [0.0.1] - 2021-05-21 + ### Added -- Version table -- Travis CI configuration file `.travis.yml` -- `functions.sql` for use in Python client -- [TODO] Placeholder for initial upgrade script (`sql/upgrade_scripts/0.0.1.sql`) -- `food_costs` table (lone table, functionality not yet implemented) + +- Version table +- Travis CI configuration file `.travis.yml` +- `functions.sql` for use in Python client +- [TODO] Placeholder for initial upgrade script (`sql/upgrade_scripts/0.0.1.sql`) +- `food_costs` table (lone table, functionality not yet implemented) ### Changed -- Use Python for import script (`build.py` replaced `import.sql`) + +- Use Python for import script (`build.py` replaced `import.sql`) ## [0.0.0] - 2020-09-22 + ### Added -- Initial release of table schema design -- Import script `import.sql` (SQL) -- Export script `export.sh` (Shell) -- Rudimentary dummy data in CSV files (e.g. `food_log.csv`, `biometric_log.csv`, `profiles.csv`) -- Database diagram generated via `docs/sqleton.sh` + +- Initial release of table schema design +- Import script `import.sql` (SQL) +- Export script `export.sh` (Shell) +- Rudimentary dummy data in CSV files + (e.g. `food_log.csv`, `biometric_log.csv`, `profiles.csv`) +- Database diagram generated via `docs/sqleton.sh` diff --git a/Makefile b/Makefile index 3849140..b4c3296 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := build clean: - find sql/ -name __pycache__ | xargs rm -rf + find sql/ -name __pycache__ -o -name .pytest_cache | xargs rm -rf rm -f sql/nt.sqlite build: diff --git a/sql/__init__.py b/sql/__init__.py index 64d209a..0fe25d8 100755 --- a/sql/__init__.py +++ b/sql/__init__.py @@ -45,8 +45,8 @@ def build_ntsqlite(verbose=False): query = "INSERT INTO {0} VALUES ({1});".format( # nosec: B608 table_name, values ) - print(query) - exit() + # print(query) + # exit() cur.executemany(query, reader) cur.close()