--- /dev/null
+---
+name: CI
+
+on:
+ push:
+ branches: [master, main]
+ pull_request:
+ branches: [master, main]
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.x"
+
+ - name: Build
+ run: |
+ make build
+
+ - name: Test
+ run: |
+ make test
+
+ - name: Clean
+ run: |
+ make clean
+++ /dev/null
----
-dist: xenial
-os: ["linux"]
-language: python
-python:
- - "3.6"
-script:
- - make build
- - make test
- - make clean
'SELECT * FROM bmr_eq;' \
'SELECT * FROM meal_name;' \
'SELECT * FROM rda;' \
- 'SELECT * FROM version;' \
+ 'PRAGMA user_version;' \
+ 'PRAGMA application_id;' \
+ 'PRAGMA foreign_keys;' \
+ 'PRAGMA integrity_check;' \
.PHONY: install
install: ## Copy sqlite file into ~/.nutra
-id,name
-1,NAVY
-2,3SITE
-3,7SITE
+id,name,friendly_name,requires
+1,NAVY,Navy,"gender, height (cm), waist (cm), neck (cm), and (if female) hip (cm)"
+2,3SITE,3 Site calipers,"gender, age, chest (mm), abdominal (mm), and thigh (mm)"
+3,7SITE,7 Site calipers,"gender, age, chest (mm), abdominal (mm), thigh (mm), tricep (mm), sub (mm), sup (mm), and mid (mm)"
-id,name
-1,HARRIS_BENEDICT
-2,KATCH_MACARDLE
-3,MIFFLIN_ST_JEOR
-4,CUNNINGHAM
+id,name,friendly_name,requires
+1,HARRIS_BENEDICT,Harris Benedict,activity_factor;weight;body_fat
+2,KATCH_MACARDLE,Katch Macardle,activity_factor;weight;body_fat
+3,MIFFLIN_ST_JEOR,Mifflin St Jeor,activity_factor;weight;gender;height;age
+4,CUNNINGHAM,Cunningham,activity_factor;weight;gender;height;age
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
--
+
PRAGMA user_version = 9;
+PRAGMA application_id = 1314145346; -- 'NTDB'
--- NOTE: INSERT INTO statements for version, bmr_eq, bf_eq? Don't maintain as CSV?
+-- NOTE: INSERT INTO statements for bmr_eq, bf_eq? Don't maintain as CSV?
-- TODO: enforce FK constraint across two DBs?
--
---------------------------------
---------------------------------
CREATE TABLE bmr_eq (
id integer PRIMARY KEY,
- name text NOT NULL UNIQUE
+ name text NOT NULL UNIQUE,
+ friendly_name text NOT NULL UNIQUE,
+ requires text NOT NULL
);
CREATE TABLE bf_eq (
id integer PRIMARY KEY,
- name text NOT NULL UNIQUE
+ name text NOT NULL UNIQUE,
+ friendly_name text NOT NULL UNIQUE,
+ requires text NOT NULL
);
--