Skip to content

Commit

Permalink
Changed to cmayes and modified test files to read from a base dir bas…
Browse files Browse the repository at this point in the history
…ed on the test file's location.
  • Loading branch information
cmayes committed Sep 13, 2015
1 parent c59bdf2 commit 096c6da
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Credits
Development Lead
----------------

* Heather Mayes <hmayes@hmayes.com>
* Chris Mayes <cmayes@cmayes.com>

Contributors
------------

* Chris Mayes <cmayes@cmayes.com>
* Heather Mayes <hmayes@hmayes.com>
7 changes: 4 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/hmayes/md_utils/issues.
Report bugs at https://github.com/cmayes/md_utils/issues.

If you are reporting a bug, please include:

Expand Down Expand Up @@ -43,7 +43,7 @@ articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/hmayes/md_utils/issues.
The best way to send feedback is to file an issue at https://github.com/cmayes/md_utils/issues.

If you are proposing a feature:

Expand Down Expand Up @@ -100,7 +100,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, and for PyPy. Check
https://travis-ci.org/hmayes/md_utils/pull_requests
https://travis-ci.org/cmayes/md_utils/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
Expand All @@ -109,3 +109,4 @@ Tips
To run a subset of tests::

$ python -m unittest tests.test_md_utils

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015, Heather Mayes
Copyright (c) 2015, Chris Mayes
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
MD Utilities
============

.. image:: https://img.shields.io/travis/hmayes/md_utils.svg
:target: https://travis-ci.org/hmayes/md_utils
.. image:: https://img.shields.io/travis/cmayes/md_utils.svg
:target: https://travis-ci.org/cmayes/md_utils

.. image:: https://img.shields.io/pypi/v/md_utils.svg
:target: https://pypi.python.org/pypi/md_utils
Expand Down
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# General information about the project.
project = u'MD Utilities'
copyright = u'2015, Heather Mayes'
copyright = u'2015, Chris Mayes'

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down Expand Up @@ -210,7 +210,7 @@
latex_documents = [
('index', 'md_utils.tex',
u'MD Utilities Documentation',
u'Heather Mayes', 'manual'),
u'Chris Mayes', 'manual'),
]

# The name of an image file (relative to this directory) to place at
Expand Down Expand Up @@ -241,7 +241,7 @@
man_pages = [
('index', 'md_utils',
u'MD Utilities Documentation',
[u'Heather Mayes'], 1)
[u'Chris Mayes'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -256,7 +256,7 @@
texinfo_documents = [
('index', 'md_utils',
u'MD Utilities Documentation',
u'Heather Mayes',
u'Chris Mayes',
'md_utils',
'One line description of project.',
'Miscellaneous'),
Expand Down
4 changes: 2 additions & 2 deletions md_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Molecular dynamics utilities.
"""

__author__ = 'Heather Mayes'
__email__ = '[email protected]'
__author__ = 'Chris Mayes'
__email__ = '[email protected]'
__version__ = '0.3.0'
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
version=md_utils.__version__,
description="Utility scripts for MD data",
long_description=readme + '\n\n' + history,
author="Heather Mayes",
author_email='hmayes@hmayes.com',
url='https://github.com/hmayes/md_utils',
author="Chris Mayes",
author_email='cmayes@cmayes.com',
url='https://github.com/cmayes/md_utils',
packages=[
'md_utils',
],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_calc_pka.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('test_calc_pka')

DATA_DIR = 'test_data'
DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data')
PKA_DATA_DIR = os.path.join(DATA_DIR, 'calc_pka')
GOOD_RAD_PATH = os.path.join(PKA_DATA_DIR, 'rad_PMFlast2ns3_1.txt')
NO_MAX_RAD_PATH = os.path.join(PKA_DATA_DIR, 'rad_no_max.txt')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_calc_split_avg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

BINNED_FILES = {'02': ['rad_PMF.02_01', 'rad_PMF.02_02', 'rad_PMF.02_03'], '01': ['rad_PMF.01_02', 'rad_PMF.01_01']}

DATA_DIR = os.path.join('test_data', 'post_rad_wham')
DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data', 'post_rad_wham')

INFILES = [os.path.join(DATA_DIR, radf) for radf in ['rad_PMF.02_01', 'rad_PMF.02_02', 'rad_PMF.02_03']]

Expand Down
2 changes: 1 addition & 1 deletion tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


# Constants #
DATA_DIR = 'test_data'
DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data')
FES_OUT_DIR = 'fes_out'
CALC_PKA_DIR = 'calc_pka'
CSV_FILE = os.path.join(DATA_DIR, CALC_PKA_DIR, 'rad_PMFlast2ns3_1.txt')
Expand Down
7 changes: 6 additions & 1 deletion tests/test_fes_combo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding=utf-8

import logging
import os
import unittest
Expand All @@ -12,7 +14,7 @@
logger = logging.getLogger('test_fes_combo')
logger.setLevel(logging.INFO)

DATA_DIR = 'test_data'
DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data')
FES_OUT_DIR = 'fes_out'
FES_ALL_DIR = 'fes_all'
FES_MULTI_DIR = 'multi'
Expand All @@ -33,6 +35,7 @@
# Target writers #
FES_ALL_MULTI_FILE = os.path.join(FES_OUT_BASE, FES_MULTI_DIR, DEF_TGT)


def header_lines(tgt_file):
"""
Extracts and returns a list of the header lines from the given file location.
Expand All @@ -53,11 +56,13 @@ def header_lines(tgt_file):
hlines.append(tline)
return hlines


# Tests #
class TestFesCombo(unittest.TestCase):
"""
Tests for the functions in fes_combo.
"""

def test_single(self):
test_dict = find_files_by_dir(FES_OUT_SINGLE, DEF_FILE_PAT)
self.assertEqual(1, len(test_dict))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wham.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
SUB_WHAM_BASE_TPL = os.path.join(TPL_LOC, DEF_BASE_SUBMIT_TPL)
SUB_WHAM_LINE_TPL = os.path.join(TPL_LOC, DEF_LINE_SUBMIT_TPL)

DATA_DIR = os.path.join('test_data', 'wham_test_data')
DATA_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), 'test_data', 'wham_test_data'))
META_00_FNAME = 'meta.00'
META_PATH = os.path.join(DATA_DIR, META_00_FNAME)
SUBMIT_05_PATH = os.path.join(DATA_DIR, 'submit_wham_05.sh')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wham_rad.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('test_wham_rad')

DATA_DIR = 'test_data'
DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data')

ORIG_WHAM_FNAME = "PMFlast2ns3_1.txt"
ORIG_WHAM_PATH = os.path.join(DATA_DIR, ORIG_WHAM_FNAME)
Expand Down

0 comments on commit 096c6da

Please sign in to comment.