Skip to content

Commit

Permalink
Finish fluctmatch-3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Click committed May 15, 2018
2 parents e27ccd7 + a1869f9 commit f886472
Show file tree
Hide file tree
Showing 22 changed files with 203 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.3.0
current_version = 3.3.1
commit = True
tag = True

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
Changelog
=========

3.3.1 (2018-05-15)
------------------

* Fixes bug in writing average coordinate file
* Added log file command-line option

3.3.0 (2018-05-15)
------------------

* Uses MDAnalysis 0.18.0
* Fix Merge bug
* Added logging features
* Formatted according to PEP8

3.1.0 (2017-11-07)
------------------

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Overview
:alt: PyPI Package latest release
:target: https://pypi.python.org/pypi/fluctmatch

.. |commits-since| image:: https://img.shields.io/github/commits-since/tclick/python-fluctmatch/v3.3.0.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/tclick/python-fluctmatch/v3.3.1.svg
:alt: Commits since latest release
:target: https://github.com/tclick/python-fluctmatch/compare/v3.3.0...master
:target: https://github.com/tclick/python-fluctmatch/compare/v3.3.1...master

.. |wheel| image:: https://img.shields.io/pypi/wheel/fluctmatch.svg
:alt: PyPI Wheel
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
year = u'2014-2017'
author = u'Timothy Click'
copyright = '{0}, {1}'.format(year, author)
version = release = u'3.3.0'
version = release = u'3.3.1'

pygments_style = 'trac'
templates_path = ['.']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def read(*names, **kwargs):

setup(
name="fluctmatch",
version="3.3.0",
version="3.3.1",
license="BSD license",
description="Elastic network model using fluctuation matching.",
long_description="%s\n%s" % (
Expand Down
2 changes: 1 addition & 1 deletion src/fluctmatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import logging

__version__ = "3.3.0"
__version__ = "3.3.1"

_MODELS = dict()
_DESCRIBE = dict()
Expand Down
13 changes: 11 additions & 2 deletions src/fluctmatch/commands/cmd_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Trajectory file (e.g. xtc trr dcd)",
)
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "convert.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-o",
"--outdir",
Expand Down Expand Up @@ -155,14 +164,14 @@
help="Convert the trajectory file",
)
@click.option(
"-l",
"--list",
"model_list",
is_flag=True,
help="List available models with their descriptions")
def cli(
topology,
trajectory,
logfile,
outdir,
prefix,
rmin,
Expand Down Expand Up @@ -202,7 +211,7 @@ def cli(
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "convert.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
13 changes: 11 additions & 2 deletions src/fluctmatch/commands/cmd_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@


@click.command("diff", short_help="Calculate differences between two tables.")
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "diff.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-o",
"--outdir",
Expand Down Expand Up @@ -71,7 +80,7 @@
resolve_path=True,
),
)
def cli(outdir, ressep, table1, table2):
def cli(logfile, outdir, ressep, table1, table2):
logging.config.dictConfig({
"version": 1,
"disable_existing_loggers": False, # this fixes the problem
Expand All @@ -95,7 +104,7 @@ def cli(outdir, ressep, table1, table2):
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "diff.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
13 changes: 11 additions & 2 deletions src/fluctmatch/commands/cmd_entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@

@click.command(
"entropy", short_help="Calculate the Shannon entropy of residues.")
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "entropy.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-o",
"--outdir",
Expand Down Expand Up @@ -64,7 +73,7 @@
resolve_path=True,
),
)
def cli(outdir, ressep, table):
def cli(logfile, outdir, ressep, table):
# Setup logger
logging.config.dictConfig({
"version": 1,
Expand All @@ -89,7 +98,7 @@ def cli(outdir, ressep, table):
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "entropy.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
13 changes: 11 additions & 2 deletions src/fluctmatch/commands/cmd_framediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
@click.command(
"framediff",
short_help="Calculate differences between consecutive frames.")
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "framediff.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-o",
"--outdir",
Expand Down Expand Up @@ -65,7 +74,7 @@
resolve_path=True,
),
)
def cli(outdir, ressep, table):
def cli(logfile, outdir, ressep, table):
# Setup logger
logging.config.dictConfig({
"version": 1,
Expand All @@ -90,7 +99,7 @@ def cli(outdir, ressep, table):
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "framediff.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
13 changes: 11 additions & 2 deletions src/fluctmatch/commands/cmd_normdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@

@click.command(
"normdiff", short_help="Normalize the differences between t and t - dt/2.")
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "normdiff.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-o",
"--outdir",
Expand Down Expand Up @@ -76,7 +85,7 @@
resolve_path=True,
),
)
def cli(outdir, ressep, kb, b0):
def cli(logfile, outdir, ressep, kb, b0):
# Setup logger
logging.config.dictConfig({
"version": 1,
Expand All @@ -101,7 +110,7 @@ def cli(outdir, ressep, kb, b0):
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "normdiff.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
12 changes: 11 additions & 1 deletion src/fluctmatch/commands/cmd_run_fm.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Trajectory file (e.g. xtc trr dcd)",
)
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "charmmfm.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-o",
"outdir",
Expand Down Expand Up @@ -142,6 +151,7 @@
def cli(
topology,
trajectory,
logfile,
outdir,
nma_exec,
temperature,
Expand Down Expand Up @@ -177,7 +187,7 @@ def cli(
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "charmmfm.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
14 changes: 12 additions & 2 deletions src/fluctmatch/commands/cmd_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import logging
import logging.config
import os
from os import path

import click
Expand All @@ -39,6 +40,15 @@
@click.command(
"sca",
short_help="Statistical coupling analysis (SCA) on coupling strength")
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "fluctsca.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-n",
"--ntrials",
Expand Down Expand Up @@ -123,7 +133,7 @@
file_okay=True,
resolve_path=True,
))
def cli(ntrials, std, kpos, pcut, ressep, output, subset, transformation,
def cli(logfile, ntrials, std, kpos, pcut, ressep, output, subset, transformation,
filename):
# Setup logger
logging.config.dictConfig({
Expand All @@ -149,7 +159,7 @@ def cli(ntrials, std, kpos, pcut, ressep, output, subset, transformation,
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(path.dirname(filename), "fluctsca.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
14 changes: 5 additions & 9 deletions src/fluctmatch/commands/cmd_splittraj.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,11 @@
)
@click.option(
"-l",
"logfile",
metavar="FILE",
default="split.log",
"--logfile",
metavar="LOG",
show_default=True,
type=click.Path(
exists=False,
file_okay=True,
resolve_path=False,
),
default=path.join(os.getcwd(), "splittraj.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
Expand Down Expand Up @@ -181,7 +177,7 @@ def cli(program, toppar, topology, trajectory, data, index, outfile, logfile,
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(path.dirname(outfile), "splittraj.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
13 changes: 11 additions & 2 deletions src/fluctmatch/commands/cmd_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@


@click.command("stats", short_help="Calculate statistics of a table.")
@click.option(
"-l",
"--logfile",
metavar="LOG",
show_default=True,
default=path.join(os.getcwd(), "convert.log"),
type=click.Path(exists=False, file_okay=True, resolve_path=True),
help="Log file",
)
@click.option(
"-s",
"--stats",
Expand Down Expand Up @@ -86,7 +95,7 @@
resolve_path=True,
),
)
def cli(stats, hist, outdir, ressep, tbltype, table):
def cli(logfile, stats, hist, outdir, ressep, tbltype, table):
# Setup logger
logging.config.dictConfig({
"version": 1,
Expand All @@ -111,7 +120,7 @@ def cli(stats, hist, outdir, ressep, tbltype, table):
},
"file": {
"class": "logging.FileHandler",
"filename": path.join(outdir, "stats.log"),
"filename": logfile,
"level": "INFO",
"mode": "w",
"formatter": "detailed",
Expand Down
Loading

0 comments on commit f886472

Please sign in to comment.