Skip to content

Commit

Permalink
Obelix release: binary DAWGs, /_ah/stop URL added
Browse files Browse the repository at this point in the history
  • Loading branch information
vthorsteinsson committed May 9, 2017
1 parent 8289960 commit 76ae622
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# App.yaml for the Netskrafl application on Google App Engine
#
application: netskrafl
version: asterix
version: obelix
runtime: python27
api_version: 1
threadsafe: true
Expand Down Expand Up @@ -142,7 +142,8 @@ handlers:
# Files that should not be uploaded to App Engine
skip_files:
- ^resources/.*\.txt$ # Raw text resources, such as word lists
- ^resources/.*\.dawg$ # Compiled but not pickled DAWG trees
- ^resources/.*\.text\.dawg$ # DAWG trees in text form
- ^resources/.*\.dawg\.pickle$ # DAWG trees in pickled form
- ^(.*/)?.*\.psd$ # Photoshop files
- ^(.*/)?.*\.ai$ # Illustrator files
- ^(.*/)?.*\.log$ # Local log files
Expand Down
21 changes: 21 additions & 0 deletions dawgtester.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ def run(self, fname, relpath):
self._test_true(u"drenið")
self._test_true(u"drensins")
self._test_true(u"álínis")
self._test_true(u"hán")
self._test_true(u"háni")
self._test_true(u"háns")
self._test_false(u"réttleganna")
self._test_false(u"meistarleganna")
self._test_false(u"hjálpsamligana")
self._test_false(u"ennig")

self._test_true(u"bitla")
self._test_true(u"friðla")
Expand Down Expand Up @@ -164,12 +168,29 @@ def run(self, fname, relpath):
self._test_false(u"þarftðu")
self._test_false(u"þurreystðu")

# Spurnarmyndir (question forms)
# Allowed in singular (present and past tense),
# disallowed in plural (present and past tense)
self._test_true(u"ertu")
self._test_true(u"vertu")
self._test_true(u"sértu")
self._test_true(u"varstu")
self._test_true(u"verðurðu")
self._test_true(u"varðstu")
self._test_true(u"fórstu")
self._test_true(u"ferðu")
self._test_true(u"komstu")
self._test_true(u"kemurðu")
self._test_true(u"borðarðu")
self._test_true(u"borðaðirðu")
self._test_false(u"voruði")
self._test_false(u"eruði")
self._test_false(u"fóruði")
self._test_false(u"fariði")
self._test_false(u"borðiði")
self._test_false(u"borðuðuði")
self._test_false(u"komiði")
self._test_false(u"komuði")

# All two-letter words on the official list of the
# Icelandic Skrafl society
Expand Down
6 changes: 6 additions & 0 deletions netskrafl.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ def start():
return "", 200 # jsonify(ok = ok)


@app.route("/_ah/stop")
def stop():
""" App Engine is stopping an instance """
return "", 200


@app.route("/_ah/warmup")
def warmup():
""" App Engine is starting a fresh instance - warm it up by loading word database """
Expand Down

0 comments on commit 76ae622

Please sign in to comment.