Skip to content

Commit cc2ee51

Browse files
committed
Debugged errors in initialize_denkmit.sh.
1 parent fe00c4b commit cc2ee51

File tree

4 files changed

+8
-28
lines changed

4 files changed

+8
-28
lines changed

data_loaders/load_models_from_data.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
import django
33
os.environ["DJANGO_SETTINGS_MODULE"] = 'denkmit.settings'
44
django.setup()
5+
from denkmit.settings import BASE_DIR
56
import pandas as pd
67
from flashcards.models import Article, Preposition, InfinitiveVerb, Noun, PersonalPronoun
78

89
for name, part_of_speech in [('article', Article), ('preposition', Preposition), ('infinitive_verb', InfinitiveVerb),
910
('noun', Noun), ('personal_pronoun', PersonalPronoun)]:
10-
df = pd.read_csv(f"/Users/benfeifke/code/denkmit/data/{name}_table.csv").fillna('')
11+
df = pd.read_csv(os.path.join(BASE_DIR, f"data/{name}_table.csv")).fillna('')
1112
records = df.to_dict(orient='records')
1213
for record in records:
1314
part_of_speech.create(**record)

initialize_denkmit.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
poetry install
12
poetry run python manage.py migrate --run-syncdb
23
poetry run python << END
34
import os

poetry.lock

+5-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ authors = ["Ben Feifke <[email protected]>"]
77
[tool.poetry.dependencies]
88
python = ">=3.7.1,<4.0"
99
Django = "^3.2"
10-
psycopg2 = "^2.8.6"
1110
ipython = "^7.23.0"
1211
pandas = "^1.2.4"
1312
spacy = "^3.0.6"

0 commit comments

Comments
 (0)