Skip to content

Commit

Permalink
Add types using tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
rgieseke committed Jun 19, 2024
1 parent 8b780f7 commit 4e44a9d
Show file tree
Hide file tree
Showing 6 changed files with 1,230 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ __pycache__
dist
build
*.pyc

node_modules/
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
index.js src/globalwarmingpotentials/__init__.py: scripts/generate_modules.py globalwarmingpotentials.csv venv
all: src/globalwarmingpotentials/__init__.py index.js index.d.ts

src/globalwarmingpotentials/__init__.py index.js: scripts/generate_modules.py globalwarmingpotentials.csv venv
@./venv/bin/python $<
@./venv/bin/black src/globalwarmingpotentials/*.py

index.d.ts: index.js package.json
@npm install
@npm run build

venv: scripts/requirements.txt
[ -d ./venv ] || python3 -m venv venv
./venv/bin/pip install --upgrade pip
./venv/bin/pip install -Ur $<
touch venv

clean-generated-files:
rm -rf index.js py/globalwarmingpotentials/__init__.py
rm -rf index.js index.d.ts py/globalwarmingpotentials/__init__.py

clean-venv:
rm -rf venv
Expand Down
Loading

0 comments on commit 4e44a9d

Please sign in to comment.