Skip to content

Commit

Permalink
Added testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
UAMCAntwerpen committed Dec 12, 2020
1 parent 93bd486 commit cf330e5
Show file tree
Hide file tree
Showing 16 changed files with 526 additions and 126 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dist/
spectrophore/__pycache__/
uamc_spectrophore.egg-info/
spectrophore/spectrophore_notebook.ipynb
spectrophore/.ipynb_checkpoints/
spectrophore/.ipynb_checkpoints/
__pycache__/
264 changes: 147 additions & 117 deletions README.md

Large diffs are not rendered by default.

Binary file removed exampleplot1.png
Binary file not shown.
Binary file removed exampleplot2.png
Binary file not shown.
Binary file removed exampleplot3.png
Binary file not shown.
Binary file removed exampleplot4.png
Binary file not shown.
3 changes: 3 additions & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python -m unittest -v tests
28 changes: 25 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
import codecs
import os.path



def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()


def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")


with open("README.md", "r") as fh:
long_description = fh.read()


setup(
name = "uamc-spectrophore",
version = "1.1.0",
version = get_version("spectrophore/__init__.py"),
author = "Hans De Winter",
author_email = "hans.dewinter@uantwerpen.be",
description = ("Python implementation of the spectrophore descriptor"),
long_description = long_description,
long_description_content_type="text/markdown",
url = "https://github.com/UAMCAntwerpen/spectrophore",
download_url = "https://github.com/UAMCAntwerpen/spectrophore/releases/tag/1.0.1",
packages = find_packages(include=['spectrophore']),
download_url = "https://github.com/UAMCAntwerpen/spectrophore/releases/tag/1.1.0",
packages = ['spectrophore'],
package_dir = {'spectrophore': 'spectrophore'},
package_data = {'spectrophore': ['images/*']},
keywords = ['uamc', 'spectrophore', 'rdkit', 'cheminformatics'],
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
1 change: 1 addition & 0 deletions spectrophore/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__all__ = ["spectrophore"]
__version__ = "1.1.0"
Binary file added spectrophore/images/exampleplot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spectrophore/images/exampleplot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spectrophore/images/exampleplot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spectrophore/images/exampleplot4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
8 changes: 3 additions & 5 deletions spectrophore/spectrophore.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# of Antwerp

__all__ = ['SpectrophoreCalculator']
__version__ = "1.1.0"

# Numba support
from numba import njit
Expand Down Expand Up @@ -234,11 +233,11 @@ class SpectrophoreCalculator:
# self.BOX[i][2] z-coordinate of the i'th box point (1-12)

####################################################
def __init__(self, resolution=3.0, accuracy=20, stereo='none', normalization='none'):
def __init__(self, resolution=3.0, accuracy=20, stereo='none', normalization='all'):

# Initiate PARMS
self.PARMS = np.array([
0, # 0 Normalisation
3, # 0 Normalisation
20, # 1 Accuracy
0, # 2 Stereo
0, # 3 BeginProbe
Expand Down Expand Up @@ -743,7 +742,7 @@ def __processCommandline():
parser.add_argument('-n', '--norm',
dest = 'norm',
help = 'normalization setting',
default = 'none',
default = 'all',
choices = ['none','mean','all','std'])
parser.add_argument('-s', '--stereo',
dest = 'stereo',
Expand Down Expand Up @@ -813,4 +812,3 @@ def __processCommandline():
if spec is not None: of.write("%s\n" % (spec))

of.close()

Loading

0 comments on commit cf330e5

Please # to comment.