Database reference

class ieml.ieml_database.descriptors.Descriptors(df)

Bases: object

__dict__ = mappingproxy({'__module__': 'ieml.ieml_database.descriptors', '__init__': <function Descriptors.__init__>, 'get_values': <function Descriptors.get_values>, 'get_values_partial': <function Descriptors.get_values_partial>, 'get_descriptor': <function Descriptors.get_descriptor>, 'from_csv_string': <staticmethod object>, '__dict__': <attribute '__dict__' of 'Descriptors' objects>, '__weakref__': <attribute '__weakref__' of 'Descriptors' objects>, '__doc__': None})
__init__(df)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'ieml.ieml_database.descriptors'
__weakref__

list of weak references to the object (if defined)

static from_csv_string(s, assert_unique_ieml=False)
get_descriptor(ieml) → Dict[ieml.constants.DescriptorsType, Dict[ieml.constants.Languages, List[str]]]
get_values(ieml, language, descriptor)
get_values_partial(ieml, language=None, descriptor=None)
ieml.ieml_database.descriptors.normalize_key(ieml, key, value, parse_ieml=False, partial=False, structure=False)
class ieml.ieml_database.git_interface.GitInterface(origin='https://github.com/IEMLdev/ieml-language.git', credentials=<pygit2.credentials.Username object>, branch='master', commit_id=None, folder=None)

Bases: object

__dict__ = mappingproxy({'__module__': 'ieml.ieml_database.git_interface', '__init__': <function GitInterface.__init__>, 'commit': <function GitInterface.commit>, 'status': <function GitInterface.status>, 'reset': <function GitInterface.reset>, 'checkout': <function GitInterface.checkout>, 'repo': <property object>, 'pull': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'push': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'current_commit': <property object>, 'get_version': <function GitInterface.get_version>, 'add_remote': <function GitInterface.add_remote>, 'diff': <function GitInterface.diff>, '__dict__': <attribute '__dict__' of 'GitInterface' objects>, '__weakref__': <attribute '__weakref__' of 'GitInterface' objects>, '__doc__': None})
__init__(origin='https://github.com/IEMLdev/ieml-language.git', credentials=<pygit2.credentials.Username object>, branch='master', commit_id=None, folder=None)
Parameters:
  • origin
  • credentials
  • branch – the branch to checkout
  • commit_id – the commit to checkout
  • folder
__module__ = 'ieml.ieml_database.git_interface'
__weakref__

list of weak references to the object (if defined)

add_remote(name, url)
checkout(branch=None, commit_id=None)
commit(signature, message)
current_commit
diff(commit0, commit1)
get_version()
pull(**kwargs)
push(**kwargs)
repo
reset(commit_id=None)

Set the current branch HEAD to ref the given commit :param commit_id: if set, reset to this commit id, otherwise to the head of the branch :return: None

status()

ignore path starting with ‘.’

exception ieml.ieml_database.git_interface.MergeConflict(message, conflicts)

Bases: Exception

__init__(message, conflicts)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'ieml.ieml_database.git_interface'
__repr__()

Return repr(self).

__weakref__

list of weak references to the object (if defined)

ieml.ieml_database.git_interface.get_local_cache_dir(origin)
class ieml.ieml_database.git_interface.git_transaction(db, signature, message)

Bases: object

__dict__ = mappingproxy({'__module__': 'ieml.ieml_database.git_interface', '__init__': <function git_transaction.__init__>, '__enter__': <function git_transaction.__enter__>, '__exit__': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, '__dict__': <attribute '__dict__' of 'git_transaction' objects>, '__weakref__': <attribute '__weakref__' of 'git_transaction' objects>, '__doc__': None})
__enter__()
__exit__(**kwargs)
__init__(db, signature, message)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'ieml.ieml_database.git_interface'
__weakref__

list of weak references to the object (if defined)

class ieml.ieml_database.ieml_database.IEMLDatabase(folder, cache_folder=None, use_cache=True)

Bases: object

CLASS_TO_FOLDER = {<class 'ieml.dictionary.script.script.NullScript'>: ('morpheme', 0), <class 'ieml.dictionary.script.script.AdditiveScript'>: ('morpheme', 0), <class 'ieml.dictionary.script.script.MultiplicativeScript'>: ('morpheme', 0), <class 'ieml.usl.polymorpheme.PolyMorpheme'>: ('polymorpheme', 5), <class 'ieml.usl.lexeme.Lexeme'>: ('lexeme', 8), <class 'ieml.usl.word.Word'>: ('word', 10)}
HASH_SIZE = 10
MAX_IEML_NAME_SIZE = 100
__dict__ = mappingproxy({'__module__': 'ieml.ieml_database.ieml_database', 'CLASS_TO_FOLDER': {<class 'ieml.dictionary.script.script.NullScript'>: ('morpheme', 0), <class 'ieml.dictionary.script.script.AdditiveScript'>: ('morpheme', 0), <class 'ieml.dictionary.script.script.MultiplicativeScript'>: ('morpheme', 0), <class 'ieml.usl.polymorpheme.PolyMorpheme'>: ('polymorpheme', 5), <class 'ieml.usl.lexeme.Lexeme'>: ('lexeme', 8), <class 'ieml.usl.word.Word'>: ('word', 10)}, 'MAX_IEML_NAME_SIZE': 100, 'HASH_SIZE': 10, '__init__': <function IEMLDatabase.__init__>, '__str__': <function IEMLDatabase.__str__>, 'filename_of': <function IEMLDatabase.filename_of>, 'path_of': <function IEMLDatabase.path_of>, 'list': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, '_process_line': <function IEMLDatabase._process_line>, 'get_descriptors': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'get_structure': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'get_dictionary': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'get_list': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'add_descriptor': <function IEMLDatabase.add_descriptor>, 'remove_descriptor': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'add_structure': <function IEMLDatabase.add_structure>, 'remove_structure': <function IEMLDatabase.remove_structure>, 'escape_value': <function IEMLDatabase.escape_value>, '__dict__': <attribute '__dict__' of 'IEMLDatabase' objects>, '__weakref__': <attribute '__weakref__' of 'IEMLDatabase' objects>, '__doc__': None})
__init__(folder, cache_folder=None, use_cache=True)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'ieml.ieml_database.ieml_database'
__str__()

Return str(self).

__weakref__

list of weak references to the object (if defined)

add_descriptor(ieml, language, descriptor, value)
add_structure(ieml, key, value)
escape_value(v)
filename_of(ieml)
get_descriptors(**kwargs)
get_dictionary(**kwargs)
get_list(**kwargs)
get_structure(**kwargs)
list(**kwargs)
path_of(_ieml, descriptor=True, mkdir=False, normalize=True)
remove_descriptor(**kwargs)
remove_structure(ieml, key=None, value=None, normalize=True)
class ieml.ieml_database.ieml_database.Structure(df)

Bases: object

__dict__ = mappingproxy({'__module__': 'ieml.ieml_database.ieml_database', '__init__': <function Structure.__init__>, 'get_values': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, 'get_values_partial': <function monitor_decorator.<locals>.decorator.<locals>.wrapper>, '__dict__': <attribute '__dict__' of 'Structure' objects>, '__weakref__': <attribute '__weakref__' of 'Structure' objects>, '__doc__': None})
__init__(df)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'ieml.ieml_database.ieml_database'
__weakref__

list of weak references to the object (if defined)

get_values(**kwargs)
get_values_partial(**kwargs)
class ieml.ieml_database.transactions.DBTransaction.DBTransactions(gitdb, signature, cache_folder=None, use_cache=True)

Bases: object

__dict__ = mappingproxy({'__module__': 'ieml.ieml_database.transactions.DBTransaction', '__init__': <function DBTransactions.__init__>, 'create_root_paradigm': <function DBTransactions.create_root_paradigm>, 'add_morpheme_paradigm': <function DBTransactions.add_morpheme_paradigm>, 'delete_morpheme_root_paradigm': <function DBTransactions.delete_morpheme_root_paradigm>, 'delete_morpheme_paradigm': <function DBTransactions.delete_morpheme_paradigm>, 'update_morpheme_paradigm': <function DBTransactions.update_morpheme_paradigm>, 'set_descriptors': <function DBTransactions.set_descriptors>, 'set_inhibitions': <function DBTransactions.set_inhibitions>, 'update_all_ieml': <function DBTransactions.update_all_ieml>, '__dict__': <attribute '__dict__' of 'DBTransactions' objects>, '__weakref__': <attribute '__weakref__' of 'DBTransactions' objects>, '__doc__': None})
__init__(gitdb, signature, cache_folder=None, use_cache=True)

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'ieml.ieml_database.transactions.DBTransaction'
__weakref__

list of weak references to the object (if defined)

add_morpheme_paradigm(script: ieml.dictionary.script.script.Script, translations, comments)
create_root_paradigm(root, inhibitions, translations, comments)
delete_morpheme_paradigm(script: ieml.dictionary.script.script.Script)
delete_morpheme_root_paradigm(script: ieml.dictionary.script.script.Script, empty_descriptors=True)
set_descriptors(ieml, descriptor, value)
set_inhibitions(ieml, inhibitions)
update_all_ieml(f, message: str)
update_morpheme_paradigm(script_old: ieml.dictionary.script.script.Script, script_new: ieml.dictionary.script.script.Script)
ieml.ieml_database.transactions.DBTransaction.append_idx_to_dict(d, idx)