160920

Meeting on NDS documentation 20.9.16

Ciprian, Ryan, Trond

Issues

  • fab fine -- far too much?
  • What to update in the source code
  • There are modules with plans, TODOs
  • We need a technical documentation, top-down style
    • We need a float scheme, a box diagram:
    • Here are the components, here is how they work together
    • Here are their raison d'être

Cases in point, examples:

  • docker (https://www.docker.com) Why is it there?
  • Another case: How to include a language without morphology
  • Log the IP address
  • The flax documentation -- you have an xml database -- why?
  • The link between the documentation and the code

Scenarios:

  • When you want to update the code
  • When you want to see the code functionality

Debugging

  • How do you develop the code?
  • How do you debug?
    • Is there a developer mode for debugging?
    • IDE?
  • logging
  • svn root checkout results in permissions problems

The FAB documentation:

  • To compile whatever remotely... ("this works only with hfst")
    • so, why?

Functions:

  • There are many functions, most are not in use?
  • Speed:
    • Ms time logging from pressing ENTER to getting the answer (with intermediate timepoints, in order to see the time leak)

Top-down

We actually need two top-down

  1. static
    1. this is the system, top-down
  2. dynamic
    1. this is the (process, lookup) as the lemma lookup goes along
    2. Conceptually, the dynamics is clear, but it must be linked to the concrete files

Comments

The docker was there because Ryan needed it for experimenting on another place than the production environment. It is not needed for production.

TODO: Put explanation in the readme file.

Flask

Flask is the django of NDS. The xml database = the dictionary. Oahpa uses a relational database, but flask uses xml for the dictionary.

Adding dictionaries

It was not clear what was required and what was not.

We need a separate documentation for NDS without morphology (Trond note: Even half an hour work will give a useful fst).

Feature: Export to paper-readable format

User behaviour

  • sudo su neahtta
    (there might a problem with several neahtta users at the same time, the answer message being "profile closed" or something)
  • ssh neahtta@gtweb.uit.no

Advanced features

nobsme hverandre

What it does is great, how it is done is hmm not. needs documentation

Reference to (sic.) references

Adding new lexicon attributes to the xml template:

  1. add to xml and dtd ok (but NDS does not read the dtd, only the xml)
  2. What matters is the jinja xml template, cf. (jinja use is documented for paradigms, but not for HTML templates for entries) /dicts/nds/NDSLinguisticSettings.html

Development

/dicts/nds/NDSDeveloping.html

Using virtualenv for building a development session

"you may start work on NDS"

means:

Now we set up an environment so that you may run python here, and run NDS here.

(env) tf-hsl-m0016:neahtta ttr000$     fab itwewina runserver
[localhost] Executing task 'itwewina'

Warning: Unable to load SSH config file '/Users/ttr000/.ssh/config'

[localhost] Executing task 'runserver'

Warning: Unable to load SSH config file '/Users/ttr000/.ssh/config'

** Production config not found, using development (*.in)
** Go.
[localhost] local: NDS_CONFIG=configs/itwewina.config.yaml.in python neahtta.py dev
* Missing dependency in $PATH: uglifyjs
  Install the executable, check that it is available in $PATH, 
  and check that it's executable. 

Done.
(env) tf-hsl-m0016:neahtta ttr000$ pwd
/Users/ttr000/main/apps/dicts/nds/src/neahtta
(env) tf-hsl-m0016:neahtta ttr000$
 izh: mees

Traceback (most recent call last):
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/env/lib/python2.7/site-packages/flask/views.py", line 149, in dispatch_request
    return meth(*args, **kwargs)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/neahtta/views/search.py", line 854, in post
    search_result_context = self.search_to_context(user_input, **self.get_shared_context(_from, _to))
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/neahtta/views/search.py", line 704, in search_to_context
    current_app.lexicon_templates.render_template(g._from, template, **tplkwargs)
  File "/Users/pyry/gtsvn/apps/dicts/nds/src/neahtta/entry_templates.py", line 287, in render_template
    'message': e.__class__(msg),
TypeError: __init__() takes exactly 4 arguments (2 given)

Reshaping the layout

One layout for all, or different layaouts?

bookmarklet plugin debugging

  1. file:// vs. http:// & https:// issues
  2. double popup on ruijan kaiku