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

v1 base branch #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# project
notebooks/
data/
assets/
.idea

# ci
.gitlab-ci.yml
Expand Down
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
known_first_party = molecad
known_third_party = fastapi,loguru,mongordkit,pathlib,pydantic,pymongo,pytest,rdkit,requests,starlette,starlette_context,typing_extensions,uvicorn
known_third_party = fastapi,loguru,pathlib,pydantic,pymongo,pytest,rdkit,requests,starlette,starlette_context,typing_extensions,uvicorn
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
* changelog
### Changed
* project structure: source code includes three modules – api, cli and db
* project dependencies
* mypy config

## [0.1.0] - 2021-08-08
### Added
* a command-line interface for fetching Pubchem data and uploading it to your local MongoDB server;
* API to interact with local MongoDB data where you can run a substructure search and get the results in two different ways: by page or in the summary form.
1 change: 0 additions & 1 deletion molecad/__init__.py

This file was deleted.

54 changes: 0 additions & 54 deletions molecad/settings.py

This file was deleted.

167 changes: 0 additions & 167 deletions molecad/utils.py

This file was deleted.

20 changes: 14 additions & 6 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
[mypy]
python_version = 3.7
plugins = pydantic.mypy

[mypy-pytest]
ignore_missing_imports = True
follow_imports = silent
warn_redundant_casts = True
warn_unused_ignores = True
disallow_any_generics = True
check_untyped_defs = True
no_implicit_reexport = True

[mypy-pymongo.*]
ignore_missing_imports = True
[pydantic-mypy]
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True
warn_untyped_fields = True

[mypy-rdkit.*]
[mypy-pytest]
ignore_missing_imports = True

[mypy-pandas]
[mypy-rdkit.*]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion molecad/api.py → old/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pydantic import BaseModel, NonNegativeInt, PositiveInt

from .api_db import compound_search, compound_search_summary
from .settings import settings
from src.settings import settings


class Compound(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion molecad/api_db.py → old/api_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pymongo.cursor import Cursor
from rdkit import Chem

from .settings import settings
from src.settings import settings
from .utils import timer

db = settings.get_db()
Expand Down
2 changes: 1 addition & 1 deletion molecad/cli.py → old/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .cli_db import create_molecule, delete_broken, drop_db, upload_data
from .downloader import execute_requests
from .settings import Settings, settings
from src.settings import Settings, settings
from .utils import (
check_dir, chunked, converter, file_path, parse_first_and_last, read_json, timer, write_json,
)
Expand Down
2 changes: 1 addition & 1 deletion molecad/cli_db.py → old/cli_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pymongo.collection import Collection
from rdkit import Chem

from .settings import Settings
from src.settings import Settings


def drop_db(setup: Settings) -> None:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading