Metadata-Version: 2.1
Name: polyversion
Version: 0.0.2a8
Summary: Lib code deriving subproject versions from tags on git monorepos.
Home-page: https://github.com/jrcstu/polyvers
Author: Kostis Anagnostopoulos
Author-email: ankostis@gmail.com
License: MIT
Download-URL: https://pypi.org/project/polyversion/
Project-URL: Documentation, http://polyvers.readthedocs.io/
Project-URL: Source, https://github.com/jrcstu/polyvers
Project-URL: Tracker, https://github.com/jrcstu/polyvers/issues
Keywords: version-management,configuration-management,versioning,git,monorepo,tool,library
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Provides-Extra: test
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-runner; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: flake8; extra == 'test'
Requires-Dist: flake8-builtins; extra == 'test'
Requires-Dist: flake8-mutable; extra == 'test'

==================================================================
Polyversion: derive subproject versions from tags on git monorepos
==================================================================

..  https://img.shields.io/pypi/v/polyversion.svg
    :alt: Deployed in PyPi?
    :target: https://pypi.org/pypi/polyversion

..  https://img.shields.io/travis/JRCSTU/polyvers.svg
    :alt: TravisCI (linux) build ok?
    :target: https://travis-ci.org/JRCSTU/polyvers

..  https://ci.appveyor.com/api/projects/status/lyyjtmit5ti7tg1n?svg=true
    :alt: Apveyor (Windows) build?
    :scale: 100%
    :target: https://ci.appveyor.com/project/ankostis/polyvers

..  https://img.shields.io/coveralls/github/JRCSTU/polyvers.svg
    :alt: Test-case coverage report
    :scale: 100%
    :target: https://coveralls.io/github/JRCSTU/polyvers?branch=master&service=github

..  https://readthedocs.org/projects/polyvers/badge/?version=latest
    :target: https://polyvers.readthedocs.io/en/latest/?badge=latest
    :alt: Auto-generated documentation status

..  https://api.codacy.com/project/badge/Grade/11b2545fd0264f1cab4c862998833503
    :target: https://www.codacy.com/app/ankostis/polyvers_jrc
    :alt: Code quality metric

.. _coord-start:

:version:       0.0.2a8
:updated:       2018-05-24T00:50:38.794096
:Documentation: file:///D:/Work/polyvers.git/build/sphinx/html/usage.html#usage-of-polyversion-library
:repository:    https://github.com/JRCSTU/polyvers
:pypi-repo:     https://pypi.org/project/polyversion/
:copyright:     2018 JRC.C4(STU), European Commission (`JRC <https://ec.europa.eu/jrc/>`_)
:license:       `MIT License <https://choosealicense.com/licenses/mit/>`_

The python 2.7+ library needed by (sub-)projects managed by `polyvers cmd
<https://github.com/JRCSTU/polyvers>`_ to derive their version-ids on runtime from Git.

.. _coord-end:

Quickstart
==========
.. _usage:

There are 3 ways to use this library:
  - through its Python-API (to dynamically version your project);
  - through its barebone cmdline tool: ``polyversion``
    (installation required);
  - through the standalone executable wheel: ``pvlib/bin/pvlib.whl``
    (no installation, but sources required; behaves identically
    to ``polyversion`` command).

.. Note::
    Only this library is (permissive) MIT-licensed, so it can be freely used
    by any program - the respective `polyvers` command-line tool is
    "copylefted" under EUPLv1.2.

API usage
---------
currentmodule: polyversion

An API sample of using func(`polyversion.polyversion()`) in
a ``myproject.git/setup.py`` file:

.. code-block:: python

    ...
    setup(
        name='myproject',
        version=polyversion('myproject')
        ...
    )

An API sample of using also func(`polytime()`) in
a ``myproject.git/myproject/__init__.py`` file:

.. code-block:: python

    ...
    __version__ = polyversion()  # project assumed equal to module-name 'myproject'
    __updated__ = polytime()
    ...

.. Tip::
   Depending on your repo's *versioning scheme* (eg you have a *mono-project* repo,
   with version-tags simply like ``vX.Y.Z``), you must add in both invocations
   of func(`polyversion.polyversion()`) above the kw-arg ``mono_project=True``.


Console usage
-------------
A sample of command-line usage is given below:

.. code-block:: console


    user@host:~/ $ polyversion --help
    Describe the version of a *polyvers* projects from git tags.

    USAGE:
        polyversion [PROJ-1] ...

    user@host:~/ $ polyversion polyversion
    polyversion: 0.0.2a7+37.g0707a09
    polyvers: 0.0.2a9.post0+7.g0707a09

    user@host:~/polyvers.git (dev) $ polyversion --help
    Describe the version of a *polyvers* projects from git tags.

    USAGE:
        polyversion [PROJ-1] ...

A sample of the standalone wheel:

.. code-block:: console

    user@host:~/ $ cd ~/polyvers.git
    user@host:~/polyvers.git (master) $ polyversion polyversion
    polyversion: 0.0.2a7+37.g0707a09


.. Note:
   You cannot define what is your *versioning-scheme* from console tools - it is
   your repo's ``.polyvers.yaml` configuration file that defines whether
   you have a *mono-project* or a *monorepo* (version-tags like ``proj-vX.Y.Z``).


For the rest, consult the *polyvers* project: https://polyvers.readthedocs.io


