-
Notifications
You must be signed in to change notification settings - Fork 1
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
NEW: data/core/downloader.py; data/core/utils.py; errors.py; types_.p… #4
Conversation
…y; validator.py добавлены для реализации запросов в базы данных Pubchem
return isinstance(operation, OperationComplex) and check_tags(tags) | ||
|
||
|
||
def check_tags(tags) -> bool: |
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.
Тип?
.. note:: В текущей версии сервиса доступен поиск только по базе данных ``Compound``. | ||
:param namespace: принимает значения в зависимости от определенного ранее параметра | ||
``domain``. В общем случае может иметь простой и составной характер, поэтому значение должно | ||
быть предварительно обработано функцией ``joined_namespaces``. |
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.
Можно, кстати, так сослаться на функцию, чтобы она стала кликабельной
https://stackoverflow.com/questions/22700606/how-would-i-cross-reference-a-function-generated-by-autodoc-in-sphinx
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cross-referencing-python-objects
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.
Можно, кстати, так сослаться на функцию, чтобы она стала кликабельной
https://stackoverflow.com/questions/22700606/how-would-i-cross-reference-a-function-generated-by-autodoc-in-sphinx
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cross-referencing-python-objects
о, я кстати, хотела насчет этой доки спросить: мне почему-то просто показалось, что лучше ее в конце делать (чутье это ничем не обосновано) - вопрос в том, что имеет ли это смысл или можно вне зависимости о степени завершенности инициализировать?
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.
Я в целом написал, что так можно)
Не надо сейчас это делать
return f"{domain}/{namespace}/{identifiers}" | ||
|
||
|
||
def operation_specification(operation: str, tags: str = None) -> str: |
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.
def operation_specification(operation: str, tags: str = None) -> str: | |
def operation_specification(operation: str, tags: Optional[str] = None) -> str: |
return f"{BASE_URL}/{input_spec}/{operation_spec}/{output_format}" | ||
|
||
|
||
def joined_namespace(prefix: str, suffix: Optional[str] = None) -> str: |
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.
Просто на будущее, если эти функции не предполагаются для публичного использования, состоит их именовать так:
def joined_namespace(prefix: str, suffix: Optional[str] = None) -> str: | |
def __joined_namespace(prefix: str, suffix: Optional[str] = None) -> str: |
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.
Просто на будущее, если эти функции не предполагаются для публичного использования, состоит их именовать так:
все, которые не импортируются? я кажется припоминаю что-то такое... а там именно два подчеркивания, а не одно?
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.
Я не настаиваю, просто можно так явно обозначить, что предполагается использовать вне этого модуля, а что нет
файлы, необходимые для реализации запросов в базы данных Pubchem