Howto: Contribute to Gramps

From Gramps

How can I contribute to Gramps?

There are a variety ways in which one can contribute to Gramps, but there a few constraints that Gramps (or any open source project) must ensure to protect the project. This page discusses these issues.

GNU General Public License

Gramps is distributed under the GNU General Public License (GPL), version 2 or later.

A brief statement appears at the top of every Python file in Gramps:

# Copyright (C) YEAR  YOUR-NAME-HERE <CONTACT-EMAIL>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.

Gramps source code is released under the GPLv2 or later license (see 1). In order for code submissions to be accepted, they must conform to this license. Here is some additional guidance:

General

  • Contributors must add their real name and contact information at the top of any file they wish to contribute.
  • The contributor attests that they wrote the code and release the code under the Gramps license.

Third-party code

  • Contributors are responsible for disclosing any copyrighted materials in their code.
  • Third-party code can be used with the permission of the copyright holder and in compliance with the other source license terms. This license must be compatible with the Gramps license (GPL v2, MIT, public domain, etc.)
  • Third-party code must be properly attributed and a source license included where applicable.
  • When using code from sites such such as StackOverflow, a link to the answer used should be included in the commit message. Small code snippets that are non-copyrightable can be included without attribution.

AI generated code

  • AI code assistants and generators can be used, but their use must be disclosed.
  • Contributors should ensure that the terms and conditions of the AI tool do not place any restrictions on the use of the code that is inconsistent with the Gramps license.
  • Contributors should include a statement in the commit message to include the fully-qualified name of the AI tool, the provider, and the version/release used.
  • Code substantially written by an AI tool should use the “Generated-by:” tag and include an indication of the prompts used to generate the code.
  • When a commit includes assistance from an AI tool, such as a GitHub CoPilot review, then the “Co-authored-by:” tag should be used.
  • Contributors should be familiar with the features of their AI tool and use them to avoid unintentionally including copyrighted material. For example, this might involve enabling options to suppress code that is similar the training data and/or employ code scanning.

These guidelines may be subject to change as the technology advances and copyright law is clarified.

See also

References

  1. OSS Watch - Can you contribute code to an open source project?
  2. The GNU General Public License - GNU Project - Free Software Foundation (FSF)
  3. 3.2 Can I look at source code distributed with other implementations to get inspiration? - GNU Classpath FAQ - GNU Project - Free Software Foundation (FSF)
  4. GitHub Terms & Conditions - 6. Contributions Under Repository License