コード例 #1
0
def test_invalid_version_file(gitdir):
    "Invalid output in version.txt is similarly a failure."
    with gitdir.join('version.txt').open('w') as outfile:
        outfile.write('foob')
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=empty)
    assert excinfo.value.args[0] == 2
コード例 #2
0
def test_custom_git_args_substitutions(tmpdir):
    "The command arguments have some substitutions performed."
    tmpdir.chdir()
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen, git_args=('foo', 'bar', '%(pwd)s', '%(root)s'))
    assert popen.args[0] == ['foo', 'bar', tmpdir.strpath, tmpdir.strpath]
コード例 #3
0
def test_when_Popen_raises(tmpdir):
    "If *spawning* git fails and there's no version.txt, abort."
    tmpdir.chdir()
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=RaisingFakePopen())
    assert excinfo.value.args[0] == 2
    assert not tmpdir.join('version.txt').check()
コード例 #4
0
def test_version_file_disabled_git_failed(tmpdir):
    "If version.txt is disabled and git fails, nothing can be done."
    tmpdir.chdir()
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=empty, version_file=None)
    assert excinfo.value.args[0] == 2
    assert not tmpdir.join('version.txt').check()
コード例 #5
0
def test_no_git(tmpdir):
    "If git fails and there's no version.txt, abort."
    tmpdir.chdir()
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=empty)
    assert excinfo.value.args[0] == 2
    assert not tmpdir.join('version.txt').check()
コード例 #6
0
def test_version_file_path_translation(gitdir, monkeypatch):
    "/ is translated into the correct path separator for version.txt."
    monkeypatch.setattr(os, 'sep', ':')
    open = FakeOpen()
    with pytest.raises(OSError):
        vcversioner.find_version(Popen=basic_version, open=open, version_file='spam/eggs', vcs_args=[])
    assert open.args[0] == 'spam:eggs'
コード例 #7
0
def test_version_file_disabled_Popen_raises(tmpdir):
    "If version.txt is disabled and git fails to spawn, abort as well."
    tmpdir.chdir()
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=RaisingFakePopen(), version_file=None)
    assert excinfo.value.args[0] == 2
    assert not tmpdir.join('version.txt').check()
コード例 #8
0
def test_invalid_version_file(gitdir):
    "Invalid output in version.txt is similarly a failure."
    with gitdir.join('version.txt').open('w') as outfile:
        outfile.write('foob')
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=empty)
    assert excinfo.value.args[0] == 2
コード例 #9
0
def test_no_output_on_version_file_success(gitdir, capsys):
    "There is no output if everything succeeded, even if the version was read from a version file."
    gitdir.join('version.txt').write('1.0-0-gbeef')
    vcversioner.find_version(Popen=git_failed)
    out, err = capsys.readouterr()
    assert not out
    assert not err
コード例 #10
0
def test_custom_vcs_args_substitutions_with_different_root(tmpdir):
    "Specifying a different root will cause that root to be substituted."
    tmpdir.chdir()
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen, root='/spam', vcs_args=('%(root)s',))
    assert popen.args[0] == ['/spam']
コード例 #11
0
def test_git_arg_path_translation(gitdir, monkeypatch):
    "/ is translated into the correct path separator in git arguments."
    monkeypatch.setattr(os, 'sep', ':')
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen, vcs_args=['spam/eggs'], version_file=None)
    assert popen.args[0] == ['spam:eggs']
コード例 #12
0
def test_no_output_on_version_file_success(gitdir, capsys):
    "There is no output if everything succeeded, even if the version was read from a version file."
    gitdir.join('version.txt').write('1.0-0-gbeef')
    vcversioner.find_version(Popen=git_failed)
    out, err = capsys.readouterr()
    assert not out
    assert not err
コード例 #13
0
def test_custom_git_args(tmpdir):
    "The command to execute to get the version can be customized."
    tmpdir.chdir()
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen, git_args=('foo', 'bar'))
    assert popen.args[0] == ['foo', 'bar']
コード例 #14
0
def test_version_module_paths(gitdir):
    "Version modules can be written out too."
    paths = ['foo.py', 'bar.py']
    vcversioner.find_version(Popen=basic_version, version_module_paths=paths)
    for path in paths:
        with open(path) as infile:
            assert infile.read() == """
コード例 #15
0
def test_invalid_git(tmpdir):
    "Invalid output from git is a failure too."
    tmpdir.chdir()
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=invalid)
    assert excinfo.value.args[0] == 2
    assert not tmpdir.join('version.txt').check()
コード例 #16
0
def test_custom_vcs_args_substitutions(gitdir):
    "The command arguments have some substitutions performed."
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen,
                                 vcs_args=('foo', 'bar', '%(pwd)s',
                                           '%(root)s'))
    assert popen.args[0] == ['foo', 'bar', gitdir.strpath, gitdir.strpath]
コード例 #17
0
def test_version_module_paths(gitdir):
    "Version modules can be written out too."
    paths = ['foo.py', 'bar.py']
    vcversioner.find_version(
        Popen=basic_version, version_module_paths=paths)
    for path in paths:
        with open(path) as infile:
            assert infile.read() == """
コード例 #18
0
def test_no_git_output_on_version_unparsable(capsys):
    "The output from git is not shown if git succeeded but the version couldn't be parsed."
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=invalid, version_file='version.txt', vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: %r (from VCS) couldn't be parsed into a version.\n" % ('foob',))
コード例 #19
0
def test_hg_detection(hgdir):
    ".hg directories get detected and the appropriate hg command gets run."
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen)
    assert popen.args[0] == [
        'hg', 'log', '-R', hgdir.strpath, '-r', '.', '--template',
        '{latesttag}-{latesttagdistance}-hg{node|short}']
コード例 #20
0
def test_no_vcs_no_version_file(tmpdir, capsys):
    "If no VCS is detected with no version_file, vcversioner aborts."
    tmpdir.chdir()
    with pytest.raises(SystemExit):
        vcversioner.find_version(version_file=None, Popen=basic_version)
    out, err = capsys.readouterr()
    assert not err
    assert out == ('vcversioner: no VCS could be detected in %r.\n' %
                   (unicode(tmpdir.strpath), ))
コード例 #21
0
def test_hg_detection(hgdir):
    ".hg directories get detected and the appropriate hg command gets run."
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen)
    assert popen.args[0] == [
        'hg', 'log', '-R', hgdir.strpath, '-r', '.', '--template',
        '{latesttag}-{latesttagdistance}-hg{node|short}'
    ]
コード例 #22
0
def test_git_arg_path_translation(gitdir, monkeypatch):
    "/ is translated into the correct path separator in git arguments."
    monkeypatch.setattr(os, 'sep', ':')
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen,
                                 vcs_args=['spam/eggs'],
                                 version_file=None)
    assert popen.args[0] == ['spam:eggs']
コード例 #23
0
def test_custom_vcs_args_substitutions_with_different_root(tmpdir):
    "Specifying a different root will cause that root to be substituted."
    tmpdir.chdir()
    popen = RaisingFakePopen()
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=popen,
                                 root='/spam',
                                 vcs_args=('%(root)s', ))
    assert popen.args[0] == ['/spam']
コード例 #24
0
def test_no_vcs_no_version_file(tmpdir, capsys):
    "If no VCS is detected with no version_file, vcversioner aborts."
    tmpdir.chdir()
    with pytest.raises(SystemExit):
        vcversioner.find_version(version_file=None, Popen=basic_version)
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        'vcversioner: no VCS could be detected in %r.\n' % (unicode(tmpdir.strpath),))
コード例 #25
0
def test_version_file_path_translation(gitdir, monkeypatch):
    "/ is translated into the correct path separator for version.txt."
    monkeypatch.setattr(os, 'sep', ':')
    open = FakeOpen()
    with pytest.raises(OSError):
        vcversioner.find_version(Popen=basic_version,
                                 open=open,
                                 version_file='spam/eggs',
                                 vcs_args=[])
    assert open.args[0] == 'spam:eggs'
コード例 #26
0
def test_git_output_on_no_version_file(gitdir, capsys):
    "The output from git is shown if it failed and the version file is disabled."
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=git_failed, version_file=None, vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        'vcversioner: [] failed.\n'
        'vcversioner: -- VCS output follows --\n'
        'vcversioner: fatal: whatever\n')
コード例 #27
0
def test_no_vcs_absent_version_file(tmpdir, capsys):
    "If no VCS is detected with an absent version_file, vcversioner aborts."
    tmpdir.chdir()
    with pytest.raises(SystemExit):
        vcversioner.find_version(version_file='version.txt', Popen=basic_version)
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: no VCS could be detected in %r and %r isn't present.\n"
        "vcversioner: are you installing from a github tarball?\n" % (
            unicode(tmpdir.strpath), 'version.txt'))
コード例 #28
0
def test_no_git_output_on_version_unparsable(capsys):
    "The output from git is not shown if git succeeded but the version couldn't be parsed."
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=invalid,
                                 version_file='version.txt',
                                 vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: %r (from VCS) couldn't be parsed into a version.\n" %
        ('foob', ))
コード例 #29
0
def test_git_output_on_version_file_absent(gitdir, capsys):
    "The output from git is shown if it failed and the version file doesn't exist."
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=git_failed, version_file='version.txt', vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: [] failed and %r isn't present.\n"
        'vcversioner: are you installing from a github tarball?\n'
        'vcversioner: -- VCS output follows --\n'
        'vcversioner: fatal: whatever\n' % ('version.txt',))
コード例 #30
0
def test_git_output_on_version_unparsable(gitdir, capsys):
    "The output from git is shown if it failed and the version couldn't be parsed."
    gitdir.join('version.txt').write('doof')
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=git_failed, version_file='version.txt', vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: %r (from %r) couldn't be parsed into a version.\n"
        'vcversioner: -- VCS output follows --\n'
        'vcversioner: fatal: whatever\n' % ('doof', 'version.txt'))
コード例 #31
0
def test_git_output_on_no_version_file(gitdir, capsys):
    "The output from git is shown if it failed and the version file is disabled."
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=git_failed,
                                 version_file=None,
                                 vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == ('vcversioner: [] failed.\n'
                   'vcversioner: -- VCS output follows --\n'
                   'vcversioner: fatal: whatever\n')
コード例 #32
0
def test_no_vcs_absent_version_file(tmpdir, capsys):
    "If no VCS is detected with an absent version_file, vcversioner aborts."
    tmpdir.chdir()
    with pytest.raises(SystemExit):
        vcversioner.find_version(version_file='version.txt',
                                 Popen=basic_version)
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: no VCS could be detected in %r and %r isn't present.\n"
        "vcversioner: are you installing from a github tarball?\n" %
        (unicode(tmpdir.strpath), 'version.txt'))
コード例 #33
0
def test_namedtuple():
    "The output namedtuple has attribute names too."

    version = vcversioner.find_version(Popen=basic_version, version_file=None)
    assert version.version == '1.0'
    assert version.commits == '0'
    assert version.sha == 'gbeef'

    version = vcversioner.find_version(Popen=dev_version, version_file=None)
    assert version.version == '1.0.dev2'
    assert version.commits == '2'
    assert version.sha == 'gfeeb'
コード例 #34
0
def test_git_output_on_version_file_absent(gitdir, capsys):
    "The output from git is shown if it failed and the version file doesn't exist."
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=git_failed,
                                 version_file='version.txt',
                                 vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == ("vcversioner: [] failed and %r isn't present.\n"
                   'vcversioner: are you installing from a github tarball?\n'
                   'vcversioner: -- VCS output follows --\n'
                   'vcversioner: fatal: whatever\n' % ('version.txt', ))
コード例 #35
0
def test_git_output_on_version_unparsable(gitdir, capsys):
    "The output from git is shown if it failed and the version couldn't be parsed."
    gitdir.join('version.txt').write('doof')
    with pytest.raises(SystemExit):
        vcversioner.find_version(Popen=git_failed,
                                 version_file='version.txt',
                                 vcs_args=[])
    out, err = capsys.readouterr()
    assert not err
    assert out == (
        "vcversioner: %r (from %r) couldn't be parsed into a version.\n"
        'vcversioner: -- VCS output follows --\n'
        'vcversioner: fatal: whatever\n' % ('doof', 'version.txt'))
コード例 #36
0
def test_dev_version(tmpdir):
    ".dev version numbers are automatically created."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=dev_version)
    assert version == ('1.0.dev2', '2', 'gfeeb')
    with tmpdir.join('version.txt').open() as infile:
        assert infile.read() == '1.0-2-gfeeb'
コード例 #37
0
def test_astounding_success(tmpdir):
    "Successful output from git is cached and returned."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=basic_version)
    assert version == ('1.0', '0', 'gbeef')
    with tmpdir.join('version.txt').open() as infile:
        assert infile.read() == '1.0-0-gbeef'
コード例 #38
0
def test_Popen_raises_but_version_file(tmpdir):
    "If spawning git fails but there's a version.txt, that's similarly fine."
    tmpdir.chdir()
    with tmpdir.join('version.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(Popen=RaisingFakePopen())
    assert version == ('1.0', '0', 'gbeef')
コード例 #39
0
def test_version_file_with_root(tmpdir):
    "version.txt gets read from the project root by default."
    with tmpdir.join('version.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(
        root=tmpdir.strpath, Popen=RaisingFakePopen())
    assert version == ('1.0', '0', 'gbeef')
コード例 #40
0
def test_version_file_with_root(gitdir):
    "version.txt gets read from the project root by default."
    with gitdir.join('version.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(root=gitdir.strpath,
                                       Popen=RaisingFakePopen())
    assert version == ('1.0', '0', 'gbeef')
コード例 #41
0
def test_custom_version_file(gitdir):
    "The version.txt file can have a unique name."
    version = vcversioner.find_version(Popen=basic_version,
                                       version_file='custom.txt')
    assert version == ('1.0', '0', 'gbeef')
    with gitdir.join('custom.txt').open() as infile:
        assert infile.read() == '1.0-0-gbeef'
コード例 #42
0
def test_dev_version_disabled(tmpdir):
    ".dev version numbers can also be disabled."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=dev_version, include_dev_version=False)
    assert version == ('1.0', '2', 'gfeeb')
    with tmpdir.join('version.txt').open() as infile:
        assert infile.read() == '1.0-2-gfeeb'
コード例 #43
0
def test_custom_version_file(tmpdir):
    "The version.txt file can have a unique name."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=basic_version, version_file='custom.txt')
    assert version == ('1.0', '0', 'gbeef')
    with tmpdir.join('custom.txt').open() as infile:
        assert infile.read() == '1.0-0-gbeef'
コード例 #44
0
def test_no_git_but_version_file(tmpdir):
    "If git fails but there's a version.txt, that's fine too."
    tmpdir.chdir()
    with tmpdir.join('version.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(Popen=empty)
    assert version == ('1.0', '0', 'gbeef')
コード例 #45
0
def test_dev_version_disabled(gitdir):
    ".post version numbers can also be disabled."
    version = vcversioner.find_version(Popen=dev_version,
                                       include_dev_version=False)
    assert version == ('1.0', '2', 'gfeeb')
    with gitdir.join('version.txt').open() as infile:
        assert infile.read() == '1.0-2-gfeeb'
コード例 #46
0
def test_custom_version_file_reading(tmpdir):
    "The custom version.txt can be read from as well."
    tmpdir.chdir()
    with tmpdir.join('custom.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(Popen=empty, version_file='custom.txt')
    assert version == ('1.0', '0', 'gbeef')
コード例 #47
0
def test_namedtuple_nonzero_commits(tmpdir):
    "The output namedtuple can have a nonzero number of commits."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=dev_version, version_file=None, vcs_args=[])
    assert version.version == '1.0.post2'
    assert version.commits == '2'
    assert version.sha == 'gfeeb'
コード例 #48
0
def test_dev_suffix_with__long_alpha(gitdir):
    "If long alpha suffix, bump alpha number and add dev suffix."
    version = vcversioner.find_version(decrement_dev_version=False,
                                       use_dev_not_post=True,
                                       Popen=FakePopen(b'1.0.0a25-1-gbeef'))
    assert version == ('1.0.0a26.dev1', '1', 'gbeef')
    with gitdir.join('version.txt').open() as infile:
        assert infile.read() == '1.0.0a25-1-gbeef'
コード例 #49
0
def test_namedtuple(tmpdir):
    "The output namedtuple has attribute names too."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=basic_version,
                                       version_file=None,
                                       vcs_args=[])
    assert version.version == '1.0'
    assert version.commits == '0'
    assert version.sha == 'gbeef'
コード例 #50
0
def test_namedtuple_nonzero_commits(tmpdir):
    "The output namedtuple can have a nonzero number of commits."
    tmpdir.chdir()
    version = vcversioner.find_version(Popen=dev_version,
                                       version_file=None,
                                       vcs_args=[])
    assert version.version == '1.0.post2'
    assert version.commits == '2'
    assert version.sha == 'gfeeb'
コード例 #51
0
# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'Weasyl 3'
copyright = u'2014, Weasyl LLC'

# 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.

version = release = vcversioner.find_version(
    root=pardir,
    version_file=None,
).version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#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.
exclude_patterns = []
コード例 #52
0
# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'txsocksx'
copyright = u'2010-2013, Aaron Gallagher'

# 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.
#
version = release = vcversioner.find_version(root='..').version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#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.
exclude_patterns = ['_build']
コード例 #53
0
def test_astounding_success(gitdir):
    "Successful output from git is cached and returned."
    version = vcversioner.find_version(Popen=basic_version)
    assert version == ('1.0', '0', 'gbeef')
    with gitdir.join('version.txt').open() as infile:
        assert infile.read() == '1.0-0-gbeef'
コード例 #54
0
def test_when_Popen_raises(gitdir):
    "If *spawning* git fails and there's no version.txt, abort."
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=RaisingFakePopen())
    assert excinfo.value.args[0] == 2
    assert not gitdir.join('version.txt').check()
コード例 #55
0
def test_no_git(gitdir):
    "If git fails and there's no version.txt, abort."
    with pytest.raises(SystemExit) as excinfo:
        vcversioner.find_version(Popen=empty)
    assert excinfo.value.args[0] == 2
    assert not gitdir.join('version.txt').check()
コード例 #56
0
def test_no_git_but_version_file(gitdir):
    "If git fails but there's a version.txt, that's fine too."
    with gitdir.join('version.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(Popen=empty)
    assert version == ('1.0', '0', 'gbeef')
コード例 #57
0
def test_Popen_raises_but_version_file(gitdir):
    "If spawning git fails but there's a version.txt, that's similarly fine."
    with gitdir.join('version.txt').open('w') as outfile:
        outfile.write('1.0-0-gbeef')
    version = vcversioner.find_version(Popen=RaisingFakePopen())
    assert version == ('1.0', '0', 'gbeef')
コード例 #58
0
ファイル: setup.py プロジェクト: normalex/vcversioner
# Copyright (c) Aaron Gallagher <*****@*****.**>
# See COPYING for details.

import vcversioner

# not this again
from setuptools import setup

with open('README.rst', 'r') as infile:
    long_description = infile.read()

setup(
    name='vcversioner',
    version=vcversioner.find_version().version,
    description='Use version control tags to discover version numbers',
    long_description=long_description,
    author='Aaron Gallagher',
    author_email='*****@*****.**',
    url='https://github.com/habnabit/vcversioner',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Topic :: Software Development :: Version Control',
コード例 #59
0
sys.path.insert(0, base_dir)

# Project information

service_name = 'SampleDB'
service_description = 'SampleDB is a web-based sample and measurement metadata database developed at PGI and JCNS. Scientists can use SampleDB to store and retrieve information on samples, measurements and simulations, analyze them using Jupyter notebooks, track sample locations and responsibilities and view sample lifecycles. As a tool for reproducible and sustainable science, it facilitates long-term storage of research data with clear benefits to scientists, interfaces with dedicated JupyterHub instances and can be integrated in instrument systems to automate data entry. A schema system allows users to store and search even complex types of metadata, and the powerful permission system ensures that information stays secure while simplifying collaboration with external users.'
service_url = 'https://iffsamples.fz-juelich.de'
service_imprint = 'https://pgi-jcns.fz-juelich.de/portal/pages/imprint.html'
contact_email = '*****@*****.**'

project = service_name
copyright = '{}, PGI / JCNS Scientific IT-Systems'.format(datetime.date.today().year)
author = 'Florian Rhiem'

# The full version, including alpha/beta/rc tags
release = vcversioner.find_version(root=base_dir).version

# The short X.Y version
version = '.'.join(release.split('.', 2)[:2])

# General configuration

source_suffix = '.rst'

master_doc = 'index'

exclude_patterns = []

language = None

templates_path = ['templates']
コード例 #60
0
ファイル: conf.py プロジェクト: mintchkin/tox-docker
import os

import vcversioner


ROOT_DIR = os.path.dirname(
    os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


# -- Project information -----------------------------------------------------

project = 'tox-docker'
copyright = '2019, Dan Crosta'
author = 'Dan Crosta'
version = release = vcversioner.find_version(root=ROOT_DIR).version

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'