Skip to main content

Updates copyright notices.

Project description

===============================
copyrite
===============================


.. image:: https://img.shields.io/pypi/v/copyrite.svg
:target: https://pypi.python.org/pypi/copyrite

.. image:: https://img.shields.io/travis/PCManticore/copyrite.svg
:target: https://travis-ci.org/PCManticore/copyrite


Updates copyright notices.


* Free software: MIT license


About
=====

This is a short tool I've built for handling missing copyright
notices in my open source projects (mostly pylint_ and astroid_).
The problem was that the copyright notices were too coarse,
belonging only to the initial author of those two projects (Logilab),
who stopped contributing that much in the past years.
Since some contributors weren't willing to rennounce the copyright for a
commercial entity, we found the need of a tool for updating the
copyright notices across the board in order to reflect the reality
of the contributions from the last year.

**copyrite** is extremely simple: it just need a repository
and, driven by a couple of options, it goes into each file and
replaces the copyright notices it finds with more up-to-date notices.

Features
--------

* `concurrent`.

You can use the ``--jobs`` flag for controlling
the number of processes it should use for processing your file.
Defaults to 1.

* can support multiple VCSes.

It could support multiple VCSes easily, although right now it
has only ``git`` support.

* supports aliases

If a contributor used multiple emails for contributing to a project,
you can use the ``--aliases`` option. It requires a JSON file with
a certain structure, as seen below.

Each entry in the alias should be a dictionary, containing two
required fields, ``mails`` and ``name`` and one optional field,
``authoritative_mail``.

If the ``authoritative_mail`` is not given, the generated copyright
will look as in::

# Copyright (c) {year_span} {name}

If the ``authoritative_name`` is given, then this will look as::

# Copyright (c) {year_span} {name} <{mail}>

The ``year_span`` represents the years in which a contributor
made their contributions to that particular file.

.. code-block:: js

[
{
"mails": [
"cpopa@cloudbasesolutions.com"
],
"authoritative_mail": "ala@bala.com",
"name": "Claudiu Popa"
},
{
"mails": [
"george@oops.com"
],
"name": "Oops",
},
]

* supports thresholds for contributions

There are two flags which control if a contribution should be
considered. ``--contribution-threshold`` is specifying how many
commits a contributor should have for a file in order for the
contributions to be taken in consideration.
``--change-threshold`` specifies what is the least amount of
added lines that a change should have. These two are exclusive,
which means that a change threshold of 100 can have more
importance than a contribution threshold of 2.


And here is an example::

$ copyrite --contribution-threshold 10 --change-threshold 4 --backend-type git my_repo --aliases=aliases_file


Credits
---------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _pylint: https://github.com/PyCQA/pylint
.. _astroid: https://github.com/PyCQA/astroid)


=======
History
=======

0.1.0 (2016-07-21)
------------------

* First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copyrite-0.1.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

copyrite-0.1.0-py2.py3-none-any.whl (13.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file copyrite-0.1.0.tar.gz.

File metadata

  • Download URL: copyrite-0.1.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for copyrite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dabbc823d5199dfaddbd1f944b944277eb6b3c27fb3fecd6edc3661b6a1229e7
MD5 e06ae549c43b48916d5780b2e0e2dac0
BLAKE2b-256 483e6fd75105addd21bd0410e5ae5c4c3590e37c596f3c15bf845e33fadf4c77

See more details on using hashes here.

File details

Details for the file copyrite-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for copyrite-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eb0417e55c158c13a825d949b509cf378d5e01754310e0d663bee9916b9a18f7
MD5 15b7c2772bfc86fe4bf4a539961f212c
BLAKE2b-256 3b10c6c4817c9149b052b0550c2298586cce6c0e6411791bfb9d3da7b5736c59

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page