-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python module refactor #158
Conversation
kavitharaju
commented
Aug 9, 2022
- Uses python 3.10 and match-case Use python 3.10 #154
- Changes the API names as per discussion here API names in python and javascript #155 and update the API guide jupyter notebook accordingly
- Uses the lxml library instead of the python's standard xml library Use lxml library instead of xml in python module #156
- Enum Format.ST = "syntax-tree" - Class data member USFMParser.syntax_tree - Class data member USFMParser.USFM_bytes - Class member function USFMParser.to_syntax_tree() - Class member function USFMParser.to_dict() - Class member function USFMParser.to_list() - Class member function USFMParser.to_markdown() - Class member function USFMParser.to_usx()
@@ -1,2 +1,4 @@ | |||
tree-sitter==0.20.0 | |||
jupyterlab==3.3.2 | |||
jupyterlab==3.4.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is okay for now. But maybe you should move jupyterlab
to a dev-requirements.txt
file so that it doesn't get mixed up with the actual package dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am looking into how python modules are packaged for publishing on pypi. I think this file is not used there. But I shall make changes if required to separate it as dev dependency in a later PR
python-usfm-parser/usfm_grammar.py
Outdated
def __init__(self, usfm_string): | ||
# super(USFMParser, self).__init__() | ||
self.USFM = usfm_string | ||
self.USFMbytes = None | ||
self.AST = None | ||
self.USFM_bytes = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep all the attribute names in lowercase for consistency sake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done