Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ValUnifer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPIPAN
ValUnifer
Commits
bef33217
Commit
bef33217
authored
2 years ago
by
dcz
Browse files
Options
Downloads
Patches
Plain Diff
Zmiany poptrzebne do ładowania bazy
parent
f4e940a0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
phrase_expansions/management/commands/import_expansions.py
+1
-1
1 addition, 1 deletion
phrase_expansions/management/commands/import_expansions.py
reset_db.sh
+24
-5
24 additions, 5 deletions
reset_db.sh
syntax/management/commands/import_tei.py
+1
-1
1 addition, 1 deletion
syntax/management/commands/import_tei.py
with
26 additions
and
7 deletions
phrase_expansions/management/commands/import_expansions.py
+
1
−
1
View file @
bef33217
...
...
@@ -28,7 +28,7 @@ OPINION_MAP = {
}
def
import_expansions
():
xml_file
=
os
.
path
.
join
(
BASE_DIR
,
'
data
'
,
'
walenty
'
,
'
phrase_types_expand_202
0
09
26
.xml
'
)
xml_file
=
os
.
path
.
join
(
BASE_DIR
,
'
data
'
,
'
walenty
'
,
'
phrase_types_expand_202
1
09
13
.xml
'
)
xml_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
xml_file
)
parser
=
make_parser
()
...
...
This diff is collapsed.
Click to expand it.
reset_db.sh
+
24
−
5
View file @
bef33217
#!/bin/bash
dropdb shellvalier
createdb shellvalier
-E
UTF8
-T
template0
-l
pl_PL.utf8
python3 manage.py migrate
python3 manage.py import_plWordnet
python3 manage.py import_tei
sudo
su postgres
-c
"dropdb shellvalier"
sudo
su postgres
-c
"createdb shellvalier -E UTF8 -T template0 -l pl_PL.utf8"
# reset the migrations since we create the DB from scratch
find
.
-path
"*/migrations/*.py"
-not
-name
"__init__.py"
-delete
find
.
-path
"*/migrations/*.pyc"
-delete
python manage.py makemigrations
python manage.py migrate
rm
import.log
time
python manage.py start_import
time
python manage.py import_expansions
time
python manage.py import_plWordnet
time
python manage.py import_tei
head
import.log
wc
import.log
#python manage.py check_descriptions
python manage.py generate_semantics_css
# TODO dev only!!!
python manage.py shell
-c
"from django.contrib.auth.models import User; User.objects.create_superuser('shell', '', 'valier')"
This diff is collapsed.
Click to expand it.
syntax/management/commands/import_tei.py
+
1
−
1
View file @
bef33217
...
...
@@ -32,7 +32,7 @@ def import_tei():
logging
.
basicConfig
(
filename
=
'
import.log
'
,
level
=
logging
.
DEBUG
)
#xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200926_smaller.xml')
xml_file
=
os
.
path
.
join
(
BASE_DIR
,
'
data
'
,
'
walenty
'
,
'
walenty_202
0
09
26
.xml
'
)
xml_file
=
os
.
path
.
join
(
BASE_DIR
,
'
data
'
,
'
walenty
'
,
'
walenty_202
1
09
13_smaller
.xml
'
)
xml_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
xml_file
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment