Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit d15ea51

Browse files
authored
Template updates (#391)
* Updated issue and PR templates * Updated CONTRIBUTING information
1 parent 271c4bd commit d15ea51

4 files changed

Lines changed: 197 additions & 91 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1-
Please include the following information in your ticket.
1+
Please [read these guidelines](http://ibm.biz/cdt-issue-guide) before opening an issue.
22

3-
- Cloudant (python-cloudant) version(s) that are affected by this issue.
4-
- Python version
5-
- A small code sample that demonstrates the issue.
3+
<!-- Issues will be CLOSED IMMEDIATELY if the following template is not completed. -->
4+
5+
## Bug Description
6+
7+
### 1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
8+
<!--
9+
Outline the steps you take to make the problem happen.
10+
Provide the simplest code sample you can, in context, that reproduces the issue.
11+
-->
12+
13+
### 2. What you expected to happen
14+
15+
### 3. What actually happened
16+
17+
## Environment details
18+
<!--
19+
- Version(s) that are affected by this issue.
20+
> 2.0.2
21+
- Python version
22+
> 3.6.2
23+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 91 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,102 @@
1+
<!--
12
Thanks for your hard work, please ensure all items are complete before opening.
3+
-->
4+
## Checklist
25

3-
- [ ] Tick to sign-off your agreement to the [Developer Certificate of Origin (DCO) 1.1](https://github.com/cloudant/python-cloudant/blob/master/DCO1.1.txt)
4-
- [ ] You have added tests for any code changes
5-
- [ ] You have updated the [CHANGES.md](https://github.com/cloudant/python-cloudant/blob/master/CHANGES.md)
6-
- [ ] You have completed the PR template below:
6+
- [ ] Tick to sign-off your agreement to the [Developer Certificate of Origin (DCO) 1.1](../blob/master/DCO1.1.txt)
7+
- [ ] Added tests for code changes _or_ test/build only changes
8+
- [ ] Updated the change log file (`CHANGES.md`|`CHANGELOG.md`) _or_ test/build only changes
9+
- [ ] Completed the PR template below:
710

8-
## What
11+
## Description
12+
<!--
13+
Provide a short description; saving the detail for the `Approach` section
914
10-
What was changed, e.g. Added support for querying views.
15+
Also EITHER:
16+
Link to issue this PR is resolving, use the Fixes #nnn form so that the
17+
issue closes automatically when the PR merges e.g.:
1118
12-
## How
19+
Fixes #23
1320
14-
How the change was implemented and reasoning behind it, e.g. Added create_index API to allow
15-
the creation of text and json indexes.
21+
OR
22+
23+
For PRs without an associated issue and/or test/build issues
24+
25+
### 1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
26+
### 2. What you expected to happen
27+
### 3. What actually happened
28+
-->
29+
30+
## Approach
31+
32+
<!--
33+
Be brief: which component(s) of the code base does the fix focus on.
34+
35+
A place to note whether the part of the code base that is being worked is
36+
particularly sensitive.
37+
-->
38+
39+
## Schema & API Changes
40+
41+
<!--
42+
EITHER:
43+
44+
- "No change"
45+
46+
OR
47+
48+
For public API (as opposed to internal) changes
49+
50+
- "Fixing bug in API, will change x in such-and-such way"
51+
-->
52+
53+
## Security and Privacy
54+
55+
<!--
56+
EITHER:
57+
58+
- "No change"
59+
60+
OR
61+
62+
"Making changes in e.g. auth|https|encryption|io
63+
need to be careful about..."
64+
65+
-->
1666

1767
## Testing
1868

19-
How to test your changes work, not required for documentation changes.
69+
<!--
70+
EITHER:
71+
72+
- Added new tests:
73+
- test x
74+
- test y
75+
- test z
76+
77+
OR
78+
79+
- Modified existing tests because ...
80+
81+
OR
82+
83+
- N/A build or packaging only changes
84+
85+
OR
86+
87+
In exceptional circumstances there may be a good reason we can't add automated
88+
tests, for example if a specific device is required to reproduce a problem.
89+
90+
- No new tests because...
91+
-->
92+
93+
## Monitoring and Logging
94+
<!--
95+
EITHER:
96+
97+
- "No change"
2098
21-
## Issues
99+
OR
22100
23-
Links to the github issue(s) (if present) that this pull request is resolving.
101+
- "Added new log line X..."
102+
-->

CONTRIBUTING.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Contributing
2+
3+
## Issues
4+
5+
Please [read these guidelines](http://ibm.biz/cdt-issue-guide) before opening an issue.
6+
If you still need to open an issue then we ask that you complete the template as
7+
fully as possible.
8+
9+
## Pull requests
10+
11+
We welcome pull requests, but ask contributors to keep in mind the following:
12+
13+
* Only PRs with the template completed will be accepted
14+
* We will not accept PRs for user specific functionality
15+
16+
### Developer Certificate of Origin
17+
18+
In order for us to accept pull-requests, the contributor must sign-off a
19+
[Developer Certificate of Origin (DCO)](DCO1.1.txt). This clarifies the
20+
intellectual property license granted with any contribution. It is for your
21+
protection as a Contributor as well as the protection of IBM and its customers;
22+
it does not change your rights to use your own Contributions for any other purpose.
23+
24+
Please read the agreement and acknowledge it by ticking the appropriate box in the PR
25+
text, for example:
26+
27+
- [x] Tick to sign-off your agreement to the Developer Certificate of Origin (DCO) 1.1
28+
29+
## General information
30+
31+
Python-Cloudant Client Library is written in Python.
32+
33+
## Requirements
34+
35+
- Python
36+
- pip
37+
38+
It is recommended to use a [virtual environment](https://virtualenv.pypa.io/en/latest) during development. The
39+
python-cloudant dependencies can be installed via the `requirements.txt` file using pip.
40+
41+
For example to create a virtualenv and install requirements:
42+
43+
```sh
44+
virtualenv .
45+
./bin/activate
46+
pip install -r requirements.txt
47+
pip install -r test-requirements.txt
48+
```
49+
50+
## Testing
51+
52+
The tests need an Apache CouchDB or Cloudant service to run against.
53+
54+
The tests create databases in your CouchDB instance, these are `db-<uuid4()>`.
55+
They also create and delete documents in the `_replicator` database.
56+
57+
The tests are run with the `nosetests` runner. In this example the `ADMIN_PARTY` environment variable is used to tell
58+
the tests not to use any authentication. See below for the full set of variables that can be used.
59+
60+
```sh
61+
$ ADMIN_PARTY=true nosetests -w ./tests/unit
62+
```
63+
64+
There are several environment variables which affect
65+
test behaviour:
66+
67+
- `RUN_CLOUDANT_TESTS`: set this to run the tests that use Cloudant-specific features. If
68+
you set this, you must set one of the following combinations of other variables:
69+
- `DB_URL`, `DB_USER` and `DB_PASSWORD`.
70+
- `CLOUDANT_ACCOUNT`, `DB_USER` and `DB_PASSWORD`.
71+
- If you set both `DB_URL` and `CLOUDANT_ACCOUNT`, `DB_URL` is used as the
72+
URL to make requests to and `CLOUDANT_ACCOUNT` is inserted into the `X-Cloudant-User`
73+
header.
74+
- Without `RUN_CLOUDANT_TESTS`, the following environment variables have an effect:
75+
- Set `DB_URL` to set the root URL of the CouchDB/Cloudant instance. It defaults
76+
to `http://localhost:5984`.
77+
- Set `ADMIN_PARTY` to `true` to not use any authentication details.
78+
- Without `ADMIN_PARTY`, set `DB_USER` and `DB_PASSWORD` to use those
79+
credentials to access the database.
80+
- Without `ADMIN_PARTY` and `DB_USER`, the tests assume CouchDB is in
81+
admin party mode, but create a user via `_config` to run tests as.
82+
This user is deleted at the end of the test run, but beware it'll
83+
break other applications using the CouchDB instance that rely on
84+
admin party mode being in effect while the tests are running.

CONTRIBUTING.rst

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)