Skip to content

Commit

Permalink
docs configured
Browse files Browse the repository at this point in the history
  • Loading branch information
stsouko committed Jun 4, 2020
1 parent 5528db6 commit 19cd864
Show file tree
Hide file tree
Showing 18 changed files with 1,894 additions and 69 deletions.
5 changes: 4 additions & 1 deletion CIMtools/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018 Ramil Nugmanov <nougmanoff@protonmail.com>
# Copyright 2018, 2020 Ramil Nugmanov <nougmanoff@protonmail.com>
# This file is part of CIMtools.
#
# CIMtools is free software; you can redistribute it and/or modify
Expand All @@ -17,3 +17,6 @@
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
from .molconvert_chemaxon import *


__all__ = ['molconvert_chemaxon']
5 changes: 4 additions & 1 deletion CIMtools/metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018 Ramil Nugmanov <nougmanoff@protonmail.com>
# Copyright 2018, 2020 Ramil Nugmanov <nougmanoff@protonmail.com>
# This file is part of CIMtools.
#
# CIMtools is free software; you can redistribute it and/or modify
Expand All @@ -18,3 +18,6 @@
#
from .pairwise import *
from .applicability_domain_metrics import *


__all__ = ['balanced_accuracy_score_with_ad', 'rmse_score_with_ad', 'tanimoto_kernel']
3 changes: 3 additions & 0 deletions CIMtools/metrics/pairwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@


def tanimoto_kernel(x, y):
"""
"""
x_dot = np.dot(x, y.T)

x2 = (x**2).sum(axis=1)
Expand Down
5 changes: 4 additions & 1 deletion CIMtools/model_selection/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018, 2019 Ramil Nugmanov <nougmanoff@protonmail.com>
# Copyright 2018-2020 Ramil Nugmanov <nougmanoff@protonmail.com>
# This file is part of CIMtools.
#
# CIMtools is free software; you can redistribute it and/or modify
Expand All @@ -19,3 +19,6 @@
from .group_out import *
from .reaction_type_control_selection import *
from .transformation_out import *


__all__ = ['LeaveOneGroupOut', 'TransformationOut', 'rtc_env_selection']
8 changes: 8 additions & 0 deletions CIMtools/preprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@
from .graph_to_matrix import *
from .solvent import *
from .standardize import *


__all__ = ['Conditions', 'DictToConditions', 'ConditionsToDataFrame', 'SolventVectorizer', 'EquationTransformer',
'CGR', 'MoleculesToMatrix', 'CGRToMatrix']

if 'Fragmentor' in locals():
__all__.append('Fragmentor')
__all__.append('FragmentorFingerprint')
50 changes: 15 additions & 35 deletions README.md → README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,98 +10,78 @@ INSTALL
Linux Debian based
------------------

* Install python3.7, virtualenv and git
* Install python3.7, virtualenv and git::

```
sudo apt install python3.7 python3.7-dev git python3-virtualenv
```
* Create new environment and activate it.
* Create new environment and activate it::

```
virtualenv -p python3.7 venv
source venv/bin/activate
```

Mac
---
* Install python3.7 and git using [brew](<https://brew.sh>)
* Install python3.7 and git using <https://brew.sh>::

```
brew install git
brew install python3
```
* Install virtualenv.

```
* Install virtualenv::

pip install virtualenv
```

* Create new environment and activate it.
* Create new environment and activate it::

```
virtualenv -p python3.7 venv
source venv/bin/activate
```

Windows
-------

* Install python3.7 and git using [Chocolatey](<https://chocolatey.org/>)
* Install python3.7 and git using <https://chocolatey.org/>::

```
choco install git
choco install python3
```
* Install virtualenv.
* Install virtualenv::

```
pip install virtualenv
```

* Create new environment and activate it.
* Create new environment and activate it::

```
virtualenv venv
venv\Scripts\activate
```

General part
------------

* **stable version will be available through PyPI**
* **stable version will be available through PyPI**::

```
pip install CIMtools
```

* Install CGRtools library DEV version for features that are not well tested. Git lfs installation required https://git-lfs.github.com/.
* Install CGRtools library DEV version for features that are not well tested. Git lfs installation required <https://git-lfs.github.com/>::

```
pip install -U git+https://github.com/stsouko/CIMtools.git@master#egg=CIMtools
```

**If you still have questions, please open issue within github.**

SETUP
=====

For ChemAxon standardizer used pyjnius. First of all install JDK (not JRE) OpenJDK or Oracle.
Some times it can't to find java installation properly. Just set environment variables.
Some times it can't to find java installation properly. Just set environment variables::

JAVA_HOME = '/path/to/dir/which/contain/bin/dir'. for example /usr/lib/jvm/java-11-openjdk-amd64
JVM_PATH = '/path/to/lib/server/libjvm.so'. For example '/usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so'

PACKAGING
=========

For wheel generation just type next command in source root
For wheel generation just type next command in source root::

python setup.py bdist_wheel

On Linux additionally do repairing of package
On Linux additionally do repairing of package::

pip install auditwheel
auditwheel repair dist/CIMtools-<version>-<python_version>-linux_x86_64.whl
Expand Down
6 changes: 4 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
project = 'CIMtools'

needs_sphinx = '1.8'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'numpydoc', 'm2r']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'numpydoc', 'nbsphinx']


exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Expand All @@ -24,7 +24,7 @@
todo_include_todos = False
autoclass_content = 'both'

html_theme_options = {'github_user': 'stsouko', 'github_repo': 'CIMtools', 'show_related': True}
html_theme_options = {'github_user': 'cimm_kzn', 'github_repo': 'CIMtools', 'show_related': True}
html_show_copyright = True
html_show_sourcelink = False
html_sidebars = {
Expand All @@ -35,3 +35,5 @@
'searchbox.html',
]
}

nbsphinx_execute = 'never'
8 changes: 8 additions & 0 deletions doc/datasets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CIMtools\.datasets package
==========================

.. automodule:: CIMtools.datasets
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
24 changes: 11 additions & 13 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
.. mdinclude:: ../README.md

CIMtools package
================

.. automodule:: CIMtools
:members:
:undoc-members:
:show-inheritance:
.. include:: ../README.rst

Subpackages
-----------
===========

.. toctree::
:maxdepth: 4
:maxdepth: 2

applicability_domain
model_selection
metrics
datasets
preprocessing
standardize

Tutorial
--------
========

.. toctree::
:maxdepth: 4
:maxdepth: 1

tutorial/metric_constants
tutorial/applicability_domain.ipynb
8 changes: 8 additions & 0 deletions doc/metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CIMtools\.metrics package
=========================

.. automodule:: CIMtools.metrics
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
8 changes: 8 additions & 0 deletions doc/model_selection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CIMtools\.model_selection package
=================================

.. automodule:: CIMtools.model_selection
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
8 changes: 8 additions & 0 deletions doc/preprocessing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CIMtools\.preprocessing package
===============================

.. automodule:: CIMtools.preprocessing
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
8 changes: 8 additions & 0 deletions doc/standardize.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CIMtools\.preprocessing.standardize package
===========================================

.. automodule:: CIMtools.preprocessing.standardize
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
Loading

0 comments on commit 19cd864

Please sign in to comment.