Skip to content
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

merge master(parent-> improvements) to mongo-rdkit #9

Merged
merged 14 commits into from
Jul 16, 2021
Merged

Conversation

vvrubel
Copy link
Owner

@vvrubel vvrubel commented Jul 14, 2021

Этот pr будет о том как смержила ветку mongo-rdkit и improvements
poetry.lock опять за свое ~1,122

@vvrubel vvrubel requested a review from churnikov July 14, 2021 07:56
.env.sample Outdated
Comment on lines 10 to 11
MONGO_TEST_COLLECTION=""
MONGO_TEST_SCHEMA_COLLECTION=""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А
Что?
Почему так?

Если хочешь другие значения для тестирования использовать, то просто другой .env файл используй

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А
Что?
Почему так?

Если хочешь другие значения для тестирования использовать, то просто другой .env файл используй

а есть где посмотреть, как settinngs.py примерно будет выглядеть с двумя .env файлами?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ты можешь менять в тестах на нужный .env файл, как описано в пункте 2
https://pydantic-docs.helpmanual.io/usage/settings/#dotenv-env-support

README.md Outdated
@@ -196,8 +192,23 @@ Options:
`conda` для разрешения своих зависимостей. Но в данном проекте было решено реализовать
управление зависимостями этих библиотек с использованием `poetry`.
Если вы хотите использовать окружение конды и вам хочется узнать, как установить `conda` рядом с
`pyenv` наиболее безболезненно – читайте [тут](https://confluence.biocad.ru/x/vi1QCw).
`pyenv` наиболее безболезненно – читайте [тут](https://confluence.biocad.ru/x/vi1QCw).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`pyenv` наиболее безболезненно – читайте [тут](https://confluence.biocad.ru/x/vi1QCw).
`pyenv` наиболее безболезненно – читайте [тут](https://confluence.biocad.ru/x/vi1QCw).

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pyenv наиболее безболезненно – читайте тут.
pyenv наиболее безболезненно – читайте тут.

ты пробел убрал?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да
Это видно по этой фиговине
Удалено 2 пробела
image



@cli.command(
@pubchem_to_db.command(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ох уж эти мелкие рефакторинги

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ох уж эти мелкие рефакторинги

каюсь...

q_mol = Chem.MolFromSmiles(sub_smiles)
substructure.AddPatternFingerprints(rdkit_schema)
index_lst = substructure.SubSearch(q_mol, rdkit_schema, chirality=False)
# index_lst = substructure.SubSearchNaive(q_mol, rdkit_schema, chirality=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну ты поняла, да?)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну ты поняла, да?)

ды

molecad/data/db.py Outdated Show resolved Hide resolved
``build_url``; по умолчанию - ``Out.JSON``.
.. note:: В текущей версии сервиса получение ответа от сервера возможно только в формате JSON.
:return: URL-адрес, который используется для запроса в базу данных Pubchem.
:param ids: Последовательность из значений одинакового типа, которые интерпретируются как
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему так сильно поменялось
Тут есть что-то важное?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему так сильно поменялось
Тут есть что-то важное?

было много функций, которые делали одно и тоже, и затрудняли понимание кода на мой взгляд, я их сжала в одну. Только почему-то git не показывает удаленные кроме докстрингов у меня..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Понятно

molecad/main.py Outdated
Comment on lines 27 to 29
@app.get("/v1/compound", response_model=List[Molecule])
def get_compounds(smiles: str, skip: int, limit: int) -> List[Molecule]:
return search(smiles)[skip:][:limit]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если эта ручка ещё не актуальна, то убери этот код вообще отсюда

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если эта ручка ещё не актуальна, то убери этот код вообще отсюда

ок

.env.sample Outdated
Comment on lines 10 to 11
MONGO_TEST_COLLECTION=""
MONGO_TEST_SCHEMA_COLLECTION=""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ты можешь менять в тестах на нужный .env файл, как описано в пункте 2
https://pydantic-docs.helpmanual.io/usage/settings/#dotenv-env-support

README.md Outdated
@@ -196,8 +192,23 @@ Options:
`conda` для разрешения своих зависимостей. Но в данном проекте было решено реализовать
управление зависимостями этих библиотек с использованием `poetry`.
Если вы хотите использовать окружение конды и вам хочется узнать, как установить `conda` рядом с
`pyenv` наиболее безболезненно – читайте [тут](https://confluence.biocad.ru/x/vi1QCw).
`pyenv` наиболее безболезненно – читайте [тут](https://confluence.biocad.ru/x/vi1QCw).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да
Это видно по этой фиговине
Удалено 2 пробела
image

q_mol = Chem.MolFromSmiles(sub_smiles)
substructure.AddPatternFingerprints(rdkit_schema)
index_lst = substructure.SubSearch(q_mol, rdkit_schema, chirality=False)
# index_lst = substructure.SubSearchNaive(q_mol, rdkit_schema, chirality=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну ты поняла, да?)

``build_url``; по умолчанию - ``Out.JSON``.
.. note:: В текущей версии сервиса получение ответа от сервера возможно только в формате JSON.
:return: URL-адрес, который используется для запроса в базу данных Pubchem.
:param ids: Последовательность из значений одинакового типа, которые интерпретируются как
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Понятно

"""
#TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что за TODO?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что за TODO?

тоже забыла убрать заметку

Copy link
Owner Author

@vvrubel vvrubel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

скоро будет коммит

"""
#TODO
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что за TODO?

тоже забыла убрать заметку

q_mol = Chem.MolFromSmiles(sub_smiles)
substructure.AddPatternFingerprints(rdkit_schema)
index_lst = substructure.SubSearch(q_mol, rdkit_schema, chirality=False)
# index_lst = substructure.SubSearchNaive(q_mol, rdkit_schema, chirality=False)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну ты поняла, да?)

ды

NEW: теперь при загрузке данных в базу с помощью команды `populate`, сразу генерируются предварительные настройки базы для api
@vvrubel vvrubel requested a review from churnikov July 15, 2021 21:30
Copy link
Collaborator

@churnikov churnikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можешь забить на коменты, если что
Время поджимает


Options:
--help Show this message and exit.
--setup [PROD|DEV] Опция, позволяющая выбирать конфигурационный файл,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--setup [PROD|DEV] Опция, позволяющая выбирать конфигурационный файл,
--env [PROD|DEV] Опция, позволяющая выбирать конфигурационный файл,

Принято так это называть

"сохранения полученной информации в файлы формата JSON. Также с помощью утилиты можно "
"загружать полученные данные в базу MongoDB и подготавливать их для поиска молекул."
"Для выполнения команд, которые устанавливают соединение с базой данных, необходимо "
"указать опцию --prod/--dev для выбора рабочей базы.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ошибка

return all(isinstance(tag, PropertyTags) for tag in tags)


def check_smiles(smiles) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тип

@vvrubel vvrubel merged commit f6ea810 into master Jul 16, 2021
@vvrubel vvrubel deleted the db_requests branch August 8, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants