Skip to content

Commit

Permalink
Updating "CONTRIBUTING" policies ad instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Aug 29, 2019
1 parent dfe786c commit fd3971d
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
For all pull requests:

- [ ] Confirm you have read the [contribution guidelines](https://github.com/GeoNode/geonode/blob/master/CONTRIBUTING)
- [ ] Confirm you have read the [contribution guidelines](https://github.com/GeoNode/geonode/blob/master/CONTRIBUTING.md)
- [ ] You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in documentation)
- [ ] Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

Expand Down
36 changes: 36 additions & 0 deletions CLA_INDIVIDUAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# Agreement for GeoNode/geonode

OSGeo Individual Contributor License Agreement (“Agreement”) v1.0

Thank you for your interest in The Open Source Geospatial Foundation (the “Foundation”). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Foundation must have a Contributor License Agreement (“CLA”) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Foundation and its users; it does not change your rights to use your own Contributions for any other purpose. If you have not already done so, please complete and send an original signed Agreement to The Open Source Geospatial Foundation, [address]. If necessary, you may send it by facsimile to the Foundation at [fax]. Please read this document carefully before signing and keep a copy for your records.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Foundation. In return, the Foundation shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its nonprofit status and bylaws in effect at the time of the Contribution. Except for the license granted herein to the Foundation and recipients of software distributed by the Foundation, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions. “You” (or “Your”) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the Foundation. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. “Contribution” shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Foundation for inclusion in, or documentation of, any of the products owned or managed by the Foundation (the “Work”). For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Foundation or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Foundation for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as “Not a Contribution.”

2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to the Foundation and to recipients of software distributed by the Foundation a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to the Foundation and to recipients of software distributed by the Foundation a perpetual, worldwide, non-exclusive, fully-paid, royalty-free, irrevocable (except as stated in this section) patent license to have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) were submitted, as such Work existed as of the date of your Contribution(s). This patent license shall not apply to any other combinations which include the Contribution(s). If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Foundation, or that your employer has executed a separate Corporate CLA with the Foundation.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may submit it to the Foundation separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as “Submitted on behalf of a third-party:”.

8. You agree to notify the Foundation of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.

`Name: ___________________________________________`

`E-mail: _________________________________________`

`Date: ___________________________________________`

`Corporate Contributor Information: ______________`

`_________________________________________________`

If you are employed as a software engineer, or if your employer is in the business of developing software, or otherwise may claim rights in the Contributions, please provide information about your employer's policy on contributing to open source projects, including the name of the supervisor to contact in connection with such contributions.
1 change: 0 additions & 1 deletion CONTRIBUTING

This file was deleted.

158 changes: 158 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Contributing

When submitting pull request:

* **Small Contribution / Single Source Code File:** For a small change to a single source file a project committer can review and apply the change on your behalf. This is a quick workaround allowing us to correct spelling mistakes in the documentation, clarify a doc, or accept a very small fix.

We understand that fixing a single source file may require changes to several test case files to verify the fix addresses its intended problem.

* **Large Contributions / Multiple Files / New Files:** To contribute a new file, or if your change effects several files, sign a [Code Contribution License](https://raw.githubusercontent.com/GeoNode/geonode/master/CLA_INDIVIDUAL.md). It does not take long and you can send it via email.

The process of getting community commit access is as follows:

1. Email the developer list.

This first step is all about communication. In order to grant commit access the other developers on the project must first know what the intention is. Therefore any developer looking for commit access must first describe what they want to commit (usually a community module), and what it does.

2. Sign up for a GitHub account.

GeoNode source code is hosted on Github and you’ll need an account in order to access it. You can sign-up [here](https://github.com/signup/).

3. Print, sign, scan and send the contributor agreement
[CLA_INDIVIDUAL](https://raw.githubusercontent.com/GeoNode/geonode/master/CLA_INDIVIDUAL.md).

Scanned assignment agreement can be emailed info@osgeo.org at OSGeo.

4. Notify the developer list.

After a developer has signed up on Github they must notify the developer list. A project despot will then add them to the group of GeoNode committers and grant write access to the canonical repository.

5. Fork the canonical GeoNode repository.

All committers maintain a fork of the GeoNode repository that they work from. Fork the canonical repository into your own account.

6. Configure your local setup

## Pull Requests

Issuing a pull request requires that you [fork the GeoNode git repository](https://github.com/GeoNode/geonode) into
your own account.

Assuming that `origin` points to your GitHub repository then the workflow becomes:

1. Make the change.

```
git checkout -b my_bugfix master
git add .
git commit -m "fixed bug xyz"
```
2. Push the change up to your GitHub repository.
```
git push origin my_bugfix
```
3. Visit your GitHub repository page and issue the pull request.

4. At this point the core developers will be notified of the pull request and review it at the earliest convenience. Core developers will review the patch and might require changes or improvements to it; it will be up to the submitter to amend the pull request and keep it alive until it gets merged.

> Please be patient, pull requests are often reviewed in spare time so turn-around can be a little slow. If a pull request becomes stale with no feedback from the submitter for a couple of months, it will linked to from a Github issue (to avoid losing the partial work) and then be closed.
## Pull Request Guidelines

The following guidelines are meant to ensure that your pull request is as easy as possible to review.

* Ensure your IDE/editor is properly configured

Ensure that your development environment is properly configured for GeoNode development. A common issue is a text editor is configured to use tabs rather than spaces.

* Include only relevant changes

Ensure the patch only contains changes relevant to the issue you are trying to fix. A common mistake is to include whitespace and formatting changes along with the relevant changes. These changes, while they may seem harmless, make the patch much harder to read.

* Fix one thing at a time

Do not batch up multiple unrelated changes into a single patch. If you want to fix multiple issues work on them separately and submit separate patches for them.

* Always add a test

Given a large code base, the large number of external contributors, and the fast evolution of the code base, tests are really the only line of defense against accidental breakage of the contributed functionality. That is why we always demand to have at least one test, it's not a "punishment", but a basic guarantee your changes will still be there, and working, in future releases.

* Referer to a GitHub ticket from the commit message

Release managers generate a changelog by checking the tickets resolved for a given target version, if there is none, your contribution won't show up. So always create a ticket associated to your commits, and refer to it from your commit message.

* Be patient

The core developers review community patches in spare time. Be cognizant of this and realize that just as you are contributing your own free time to the project, so is the developer who is reviewing and applying your patch.

* Tips

Include a test case that shows your patch fixes an issue (or adds new functionality). If you do not include a test case the developer reviewing your work will need to create one.

[Github Issue](https://github.com/GeoNode/geonode/issues) are used to list your fix in the release notes each release. You can link to the Issue number in your pull request description.

## Commit Guidelines

GeoNode does not have much in the way of strict commit policies. Our current conventions are:

1. **Add copyright headers:**
* Remember to add a copyright header with the year of creation to any new file. As an example, if you are adding a file in 2016 the copyright header would be:

```
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2019 Open Source Geospatial Foundation - all rights reserved
#
# 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 3 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 <http://www.gnu.org/licenses/>.
#
#########################################################################
```

* If you are modifying an existing file that does not have a copyright header, add one as above.

* Updates to existing files with copyright headers do not require updates to the copyright year.

* When adding content from another organisation maintain copyright history and original license. Only add Open Source Geospatial Foundation if you have made modifications to the file for GeoNode:

```
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 Open Source Geospatial Foundation - all rights reserved
# Copyright (C) 2014 OpenPlans
# Copyright (C) 2008-2010 GeoSolutions
#
# 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 3 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 <http://www.gnu.org/licenses/>.
#
#########################################################################
```

2. **Do not commit large amounts of binary data:** In general do not commit any binary data to the repository. There are cases where it is appropriate like some data for a test case, but in these cases the files should be kept as small as possible.

3. **Do not commit archives or libs, use PyPi instead:** In general never commit a depending library directly into the repository, this is what we use PyPi for. If you have a jar that is not present in any PyPi repositories, ask on the developer list to get it uploaded to one of the project repositories.

4. **Ensure code is properly formatted:** We use Flake8 and PEP-8 to check automatically that the code have been correctly formatted.

0 comments on commit fd3971d

Please sign in to comment.