Package: polyversion
Version:0.2.2a1updated:2018-08-07T13:30:07.616687Documentation:http://polyvers.readthedocs.io/en/latest/usage-pvlib.htmlrepository:https://github.com/JRCSTU/polyverspypi-repo:https://pypi.org/project/polyversion/Copyright:2018 JRC.C4(STU), European Commission (JRC)license:MIT LicenseThe python 2.7+ library needed by (sub-)projects managed bypolyvers cmdto derive their version-ids on runtime from Git.Specifically, the configuration file.polyvers.yamlis NOT read -
you have to repeat any non-default configurations as function/method keywords
when calling this API.Here only a very rudimentary documentation is provided - consultpolyversdocuments provided in the link above.NoteOnly this library is (permissive) MIT-licensed, so it can be freely vendorized
by any program - the respectivepolyverscommand-line tool is
“copylefted” under EUPLv1.2.QuickstartThere are 4 ways to use this library:As asetuptools plugin;through its Python-API (to dynamically version your project);through its barebone cmdline tool:polyversion(installation required);through the standalone executable wheel:bin/pvlib.run(no installation, but sources required; behaves identically
topolyversioncommand).setuptoolsusagecurrentmodule: polyversionThepolyversionlibrary function as asetuptools“plugin”, and
adds two newsetup()keywords for deriving subproject versions
from PKG-INFO or git tags  (see func(polyversion.init_plugin_kw)):keyword:polyversion-->(bool | dict)When a dict, its keys roughly mimic those in func(polyversion()),
and can be used like this:fromsetuptoolsimportsetupsetup(project='myname',version=''# omit (or None) to abort if cannot auto-versionpolyversion={# dict or bool'mono_project':True,# false by default...# See `polyversion.init_plugin_kw()` for more keys.},setup_requires=[...,'polyversion'],...)keyword:polyversion_check_bdist_enabled-->boolWhen it is true, thebdist-checkis enabled, and anybdist_*setup-commands
(e.g.bdist_wheel) will abort if not run fromengraved sources
(ie from anrelease tag).To enable this check without editing the sources, add the following into
your$CWD/setup.cfgfile:[global]
polyversion_check_bdist_enabled = true
...API usageAn API sample of using also func(polytime()) from within yourmyproject.git/myproject/__init__.pyfile:frompolyversionimportpolyversion,polytime# no hack, dependency already installed__version__=polyversion()# project assumed equal to this module-name: 'myproject'__updated__=polytime()...TipDepending on your repo’sversioning scheme(eg you have amono-projectrepo,
with version-tags simply likevX.Y.Z), you must add in both invocations
of func(polyversion.polyversion()) above the kw-argmono_project=True.Console usageThe typical command-line usage of this library (assuming you don’t want to install
the full blownpolyverscommand tool) is given below:user@host:~/ $polyversion--helpDescribe the version of a *polyvers* projects from git tags.

USAGE:
    polyversion [PROJ-1] ...
    polyversion [-v | -V ]     # print my version informationuser@host:~/ $polyversionpolyversion# fails, not in a git repob'fatal: not a git repository (or any of the parent directories): .git\n'
  cmd: ['git', 'describe', '--match=cf-v*']
Traceback (most recent call last):
  File "/pyenv/site-packages/pvlib/polyversion/__main__.py", line 18, in main
    polyversion.run(*sys.argv[1:])
  File "/pyenv/site-packages/pvlib/polyversion/__init__.py", line 340, in run
    res = polyversion(args[0], repo_path=os.curdir)
  File "/pyenv/site-packages/pvlib/polyversion/__init__.py", line 262, in polyversion
    pvtag = _my_run(cmd, cwd=repo_path)
  File "/pyenv/site-packages/pvlib/polyversion/__init__.py", line 106, in _my_run
    raise sbp.CalledProcessError(proc.returncode, cmd)
subprocess.CalledProcessError: Command '['git', 'describe', '--match=cf-v*']' returned non-zero exit status 128.user@host:~/ $cdpolyvers.gituser@host:~/polyvers.git (dev) $polyversionpolyverspolyversionpolyvers: 0.0.2a10
polyversion: 0.0.2a9Standalone wheelVarious ways to use the standalone wheel frombash(these will still work without having installed anything):user@host:~/polyvers.git (master) $
user@host:~/polyvers.git (master) $./bin/pvlib.runpolyversionpolyversion: 0.0.2a9user@host:~/polyvers.git (master) $python./bin/pvlib.run--help...user@host:~/polyvers.git (master) $python./bin/pvlib.run-mpolyversion-vversion: 0.0.2a9user@host:~/polyvers.git (master) $PYTHONPATH=./bin/pvlib.runpython-mpolyversion-Vversion: 0.0.2a9
updated: Thu, 24 May 2018 02:47:37 +0300For the rest, consult thepolyversproject:https://polyvers.readthedocs.io