Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_entry_point_version(capfd):
subprocess.call('mc3 -v'.split())
if sys.version_info.major == 3:
captured = capfd.readouterr().out
else:
captured = capfd.readouterr().err
assert captured == 'MC3 version {:s}.\n'.format(mc3.__version__)
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'MC3'
copyright = u'2015-{:d}, Patricio Cubillos'.format(date.today().year)
author = u'Patricio Cubillos'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = mc3.__version__
# The full version, including alpha/beta/rc tags.
release = mc3.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
def parse():
"""
MC3 command-line argument parser.
"""
# Parse the config file from the command line:
parser = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
# Configuration-file option:
parser.add_argument("-c", "--cfile",
help="Configuration file.", metavar="FILE")
parser.add_argument("-v", "--version", action="version",
help="Show MC3's version.",
version='MC3 version {:s}.'.format(mc3.__version__))
# MCMC Options:
group = parser.add_argument_group("MCMC General Options")
group.add_argument("--nsamples", dest="nsamples", action="store",
type=eval, default=None,
help="Number of MCMC samples.")
group.add_argument("--nchains", dest="nchains", action="store",
type=int, default=7,
help="Number of chains [default: %(default)s]")
group.add_argument("--ncpu", dest="ncpu", action="store",
type=int, default=None,
help="Number of CPUs for the chains [default: nchains+1]")
group.add_argument("--sampler", dest="sampler", action="store",
type=str, default=None,
help="Sampler algorithm, select from: ['mrw', 'demc', 'snooker'].")
group.add_argument("--wlike", dest="wlike", action="store",
type=eval, default=False,
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'MC3'
copyright = u'2015-{:d}, Patricio Cubillos'.format(date.today().year)
author = u'Patricio Cubillos'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = mc3.__version__
# The full version, including alpha/beta/rc tags.
release = mc3.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.