-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
703 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ env: | |
- [email protected]:mordred-descriptor/documentation.git | ||
- secure: IrmS3kBWNvkC/bFObF0jIHUpdFTasEH8QXXK9mh6M+mfdy34qvpnWffzDcuS2ZD1oyLE1YsMxA9MDVmw/PBY27q1wxmQ1ZQFpBoMDsjmczZ4bI/5oiaAekVktAGc4lX3knmQju2nqqb/MZRB9qmpiPFM3xNRDVikSBdOw92SHwGOIsq5r9Rlp0o5vzj0Qo9HREmlAtpbhtdWpWRU94hnDTgwlQJyd4xBq9Y0CLO45KDV6gkq5sEkfiKQnUzElMPEy8NNGKmK3pLD1PCwLt/42dNSEdIXSw9w/pMWk/fGiS2ebsf+Ch/8jTFTdW3Oq3P/NxJuA8t3aYrdcvDy5lmQHrEr+bf4D/xsMtAVS3igIQHKBBp2fSqwIm+KpMyHmA3//jG76+kmE8j1GpBjctdz4ExbCyRlQFhI3r7qQ/tQ9pHHwcZwx8MX/hzslpNhSuBRTIR/4mi3wckYU2kq7UjKbwuHUkcbMwgkKrH1D2cjhQypOnzEBindd+T9mPQYoewdtSQLAbpPsmJbFE/q9SgG/XjmH4k/mlItFLZiOIKTKFGTkXNY1Wqbht95365O4uSbnmzDEwTSISR0qhtjoDVBMowY/1ZBQUM9/Y9aS5KD5uU8FBUbQ3lR641zD14kGBallpCCRTRxgRt19q5R469jKoBA5eWWzRGp86Q19Ywdnbc= | ||
matrix: | ||
- PYTHON_VERSION=3.6 COVERAGE=true DOCUMENTATION=true LINT=true | ||
- PYTHON_VERSION=3.6 COVERAGE=true DOCUMENTATION=true | ||
- PYTHON_VERSION=3.5 COVERAGE=true | ||
- PYTHON_VERSION=2.7 COVERAGE=true | ||
os: | ||
- linux | ||
- osx | ||
sudo: false | ||
before_install: "./extra/ci/before_install.sh" | ||
install: "./extra/ci/install.sh" | ||
script: "./extra/ci/test_script.sh" | ||
after_success: "./extra/ci/after_success.sh" | ||
before_install: travis_retry ./extra/ci/before_install.sh | ||
install: travis_retry ./extra/ci/install.sh | ||
script: travis_retry ./extra/ci/test_script.sh | ||
after_success: travis_retry ./extra/ci/after_success.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
networkx = "*" | ||
six = "*" | ||
numpy = "*" | ||
tqdm = "*" | ||
pandas = "*" | ||
enum34 = {version = "*", markers="python_version < '3.4'"} | ||
|
||
[dev-packages] | ||
pyyaml = "*" | ||
nose = "*" | ||
coverage = "*" | ||
sphinx = "*" | ||
sphinx-rtd-theme = "*" | ||
sphinxcontrib-bibtex = "*" | ||
coveralls = "*" | ||
"pep8" = "*" | ||
isort = "*" | ||
"flake8" = "*" | ||
"flake8-quotes" = "*" | ||
"flake8-print" = "*" | ||
"flake8-commas" = "*" | ||
"flake8-comprehensions" = "*" | ||
"flake8-docstrings" = "*" | ||
"flake8-sorted-keys" = "*" | ||
"flake8-regex" = "*" | ||
"flake8-string-format" = "*" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from distutils.version import StrictVersion | ||
import sys | ||
|
||
|
||
def main(version): | ||
(major, minor, patch) = StrictVersion(version).version | ||
print("{}.{}.{}a1".format(major, minor, patch + 1)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
def main(data, os, pyver): | ||
d = { | ||
(os, pyver): ver | ||
for os, pyver, ver | ||
in (line.strip().split() for line in open(data)) | ||
} | ||
|
||
print(d[(os, pyver)]) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
import os | ||
|
||
data = os.path.join(os.path.dirname(__file__), "rdkit-versions.txt") | ||
main(data, *sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,49 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
REQUIREMENTS=./extra/requirements | ||
CONDA_REQ_FILE=requirements-conda.txt | ||
PIP_REQ_FILE=requirements-pip.txt | ||
source ./extra/ci/common.sh | ||
|
||
# install conda | ||
|
||
if [[ "$TRAVIS_OS_NAME" == osx ]]; then | ||
export OS_NAME=MacOSX | ||
elif [[ "$TRAVIS_OS_NAME" == linux ]]; then | ||
export OS_NAME=Linux | ||
if [[ -n "$TRAVIS_OS_NAME" ]]; then | ||
if [[ "$TRAVIS_OS_NAME" == osx ]]; then | ||
export OS_NAME=MacOSX | ||
elif [[ "$TRAVIS_OS_NAME" == linux ]]; then | ||
export OS_NAME=Linux | ||
fi | ||
if [[ ! -f "miniconda.sh" ]]; then | ||
info wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-${OS_NAME}-x86_64.sh -O miniconda.sh | ||
fi | ||
rm -rf $HOME/miniconda | ||
info bash miniconda.sh -b -p $HOME/miniconda | ||
elif [[ -n "$APPVEYOR" ]]; then | ||
export OS_NAME=Windows | ||
fi | ||
|
||
if [[ -n "$TRAVIS_OS_NAME" ]]; then | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS_NAME}-x86_64.sh -O miniconda.sh | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
fi | ||
|
||
source ./extra/ci/conda.sh | ||
|
||
# setup conda | ||
|
||
hash -r | ||
|
||
conda config --set always_yes yes --set changeps1 no | ||
conda config --add channels rdkit --add channels mordred-descriptor | ||
info conda config --set always_yes yes --set changeps1 no | ||
info conda config --add channels rdkit --add channels mordred-descriptor | ||
info conda update -y --all | ||
|
||
info conda install python=$PYTHON_VERSION | ||
|
||
# install requirements | ||
info pip install pipenv | ||
|
||
cat $REQUIREMENTS/requirements-conda.txt $REQUIREMENTS/requirements.txt > $CONDA_REQ_FILE | ||
pipenv lock -r > requirements.txt | ||
info python ./extra/ci/scrub-requirements.py requirements.txt | ||
|
||
if [[ "$PYTHON_VERSION" < 3.4 ]]; then | ||
echo enum34 >> $CONDA_REQ_FILE | ||
fi | ||
banner "requirements.txt start" | ||
cat requirements.txt | ||
banner "requirements.txt end " | ||
|
||
[[ "$PYTHON_VERSION" < 3.4 ]] && echo enum34 >> $CONDA_REQ_FILE | ||
RDKIT="rdkit==$(python ./extra/ci/get-rdkit-version.py $OS_NAME $PYTHON_VERSION)" | ||
info conda install $RDKIT --file requirements.txt --file ./extra/ci/requirements-conda.txt | ||
|
||
if [[ -n "$LINT" ]]; then | ||
cat $REQUIREMENTS/requirements-flake8.txt >> $PIP_REQ_FILE | ||
fi | ||
pipenv lock -r --dev > requirements.txt | ||
banner "requirements.txt(dev) start" | ||
cat requirements.txt | ||
banner "requirements.txt(dev) end " | ||
|
||
if [[ -n "$DOCUMENTATION" ]]; then | ||
cat $REQUIREMENTS/requirements-documentation.txt >> $PIP_REQ_FILE | ||
fi | ||
|
||
conda install python=$PYTHON_VERSION --file $CONDA_REQ_FILE | ||
|
||
if [[ -f $PIP_REQ_FILE ]]; then | ||
pip install -r $PIP_REQ_FILE | ||
fi | ||
info pip install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MacOSX 3.6 2018.03.1.0 | ||
MacOSX 3.5 2018.03.1.0 | ||
MacOSX 2.7 2018.03.1.0 | ||
Linux 3.6 2018.03.1.0 | ||
Linux 3.5 2018.03.1.0 | ||
Linux 2.7 2018.03.1.0 | ||
Windows 3.6 2018.03.1.1 | ||
Windows 3.5 2017.09.2.0 | ||
Windows 2.7 2017.09.3.0 |
1 change: 0 additions & 1 deletion
1
extra/requirements/requirements-conda.txt → extra/ci/requirements-conda.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
rdkit>=2015.09.2 | ||
conda-build | ||
anaconda-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from __future__ import print_function | ||
import sys | ||
import re | ||
|
||
|
||
def main(path): | ||
contents = [line.rstrip() for line in open(path)] | ||
with open(path, 'w') as dst: | ||
for line in contents: | ||
if '-' == line[0]: | ||
continue | ||
|
||
vs = re.split(r'\s*;\s*', line) | ||
if len(vs) == 1: | ||
print(line, file=dst) | ||
continue | ||
|
||
if len(vs) > 2: | ||
raise ValueError("#field > 2") | ||
|
||
v = sys.version_info | ||
pkg, cond = vs | ||
cond = cond.replace("python_version", '{}.{}'.format(v.major, v.minor)) | ||
cond = re.sub(r"'(\d+\.\d+)'", r'\1', cond) | ||
if eval(cond): | ||
print(pkg, file=dst) | ||
|
||
|
||
if __name__ == "__main__": | ||
main(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
source ./extra/ci/conda.sh | ||
source ./extra/ci/common.sh | ||
|
||
PYTHON=python | ||
|
||
conda list | ||
|
||
if [[ -n "$COVERAGE" ]]; then | ||
python -m mordred.tests -q --with-coverage | ||
info $PYTHON -m mordred.tests -q --with-coverage | ||
else | ||
python -m mordred.tests -q | ||
info $PYTHON -m mordred.tests -q | ||
fi | ||
|
||
echo "test README.rst" >&2 | ||
python -m doctest README.rst | ||
info $PYTHON -m doctest README.rst | ||
|
||
for example in `find examples -name '*.py'`; do | ||
echo "test $example" >&2 | ||
PYTHONPATH=. python $example > /dev/null | ||
PYTHONPATH=. info $PYTHON $example > /dev/null | ||
done | ||
|
||
if [[ -n "$LINT" ]]; then | ||
python setup.py flake8 | ||
python setup.py isort | ||
fi | ||
info $PYTHON setup.py flake8 | ||
info $PYTHON setup.py isort |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.