Skip to content

Commit 60ba916

Browse files
committed
Add readme, templates, and contributing guide
This initial README already includes Tidelift and Patreon sections, because they were already added to the quantmod and xts README files.
1 parent cd48c89 commit 60ba916

File tree

6 files changed

+577
-0
lines changed

6 files changed

+577
-0
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
R/pivots.R
2+
LICENSE
23
WISHLIST
34
^.*\.Rproj$
45
^\.Rproj\.user$

.github/CONTRIBUTING.md

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
### Have a question?
2+
3+
Please do not open an issue to ask a question about how to use the package.
4+
Instead, ask your question on [Stack Overflow](http://stackoverflow.com/questions/tagged/r)
5+
or the [R-SIG-Finance](https://stat.ethz.ch/mailman/listinfo/r-sig-finance)
6+
mailing list (you must subscribe to post).
7+
8+
----
9+
10+
### Have a bug report or feature request?
11+
12+
1. Determine which repository the bug/feature should be reported in. The process
13+
of creating a [*minimal*, reproducible example](http://stackoverflow.com/q/5963269/271616)
14+
should identify the package that contains the bug or should contain the
15+
feature. Please email the maintainer if you're unsure where to create an
16+
issue.
17+
2. Search current open GitHub [issues](https://github.com/joshuaulrich/TTR/issues)
18+
to check if the bug/feature has already been reported/requested.
19+
3. Ensure your fork and local copy are up-to-date, and verify the bug still
20+
exists in the HEAD of the master branch.
21+
4. If the bug exists in the HEAD of master, and you can't find an open issue,
22+
then [open a new issue](https://github.com/joshuaulrich/TTR/issues).
23+
Please be sure to:
24+
* Use an informative and descriptive title,
25+
* Describe the expected behavior and why you think the current behavior is
26+
a bug.
27+
* Include as much relevant information as possible; at minimum:
28+
* a [*minimal*, reproducible example](http://stackoverflow.com/q/5963269/271616)
29+
* the output from `sessionInfo()`
30+
31+
----
32+
33+
### Want to submit a pull request?
34+
35+
1. Changes that are purely cosmetic in nature (e.g. whitespace changes, code
36+
formatting, etc) will generally not be accepted because they do not add to
37+
the stability, functionality, or testability of the project.
38+
2. Unless the change is extremely trivial (e.g. typos), please
39+
[create an issue](#have-a-bug-report-or-feature-request) and wait for
40+
feedback *before* you start work on a pull request. That will avoid the
41+
possibility you spend time on a patch that won't be merged.
42+
3. Create a branch for the feature/bug fix reported in the issue. Please use a
43+
short and descriptive branch name that starts with the issue number (e.g.
44+
123_custom_function). Use that branch as the base for your pull request.
45+
Pull requests on your version of `master` will not be accepted, because
46+
they can make it difficult for you to update your fork if your pull request
47+
isn't incorporated verbatim.
48+
4. A pull request should only be for one issue, so please `git rebase -i` and
49+
squash the commits on your feature branch into one commit before creating
50+
the pull request. Please use `git commit --amend` to amend your commit if
51+
you are asked to make changes. It's okay to force update your pull request
52+
with `git push --force`.
53+
5. Please write a great [commit message](#commit-messages).
54+
6. It would be much appreciated if you also add tests that cover your changes.
55+
56+
----
57+
58+
### Commit Messages
59+
60+
Follow the [The Seven Rules](http://chris.beams.io/posts/git-commit/#seven-rules)
61+
of [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/).
62+
Pay particular attention to [rule 7: Use the body to explain what and why
63+
versus how](http://chris.beams.io/posts/git-commit/#why-not-how). The body
64+
should also include the motivation for the change and how it compares to prior
65+
behavior.
66+
67+
If the commit is to fix a bug or add a feature, the commit message should
68+
contain enough information to understand the bug/feature without having to
69+
reference an external tracker (e.g. GitHub issues). But please *do reference
70+
the GitHub issue* on the last line of your commit message body. For example,
71+
here is a great [xts commit message](https://github.com/joshuaulrich/xts/commit/ce1b667ab7c38cb2633fca0075652a69e5d2a343):
72+
73+
```text
74+
Correct endpoints when index is before the epoch
75+
76+
The endpoints C code casts the double index to long, which truncates
77+
it toward zero. This behavior is desired when the index is positive,
78+
because it moves the endpoint *back* in time. But when the index is
79+
negative, truncating toward zero moves the endpoint *forward* in time.
80+
81+
This is also an issue if the index value is stored as integer, since the
82+
C99 specification states that integer division truncates toward zero.
83+
84+
If the first index value is less than zero, branch into a special case
85+
to handle pre-epoch index values. This avoids performance degradation
86+
if all index values are after the epoch.
87+
88+
If the index value is less than zero, simply add 1 to offset the
89+
truncation toward zero. We also need to furthre adjust the potential
90+
endpoint value if the index is exactly equal to zero.
91+
92+
Fixes #144.
93+
```
94+
95+
----
96+
97+
### References:
98+
1. The [data.table Contributing Guide](https://github.com/Rdatatable/data.table/blob/master/Contributing.md).
99+
2. The [Atom Contributing Guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md).
100+
3. How to create a [minimal, reproducible example](http://stackoverflow.com/q/5963269/271616).
101+
4. [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/).
102+
5. The [Mercurial Contributing Guide](https://www.mercurial-scm.org/wiki/ContributingChanges).
103+
6. The [Hugo Contributing Guide](https://github.com/spf13/hugo/blob/master/CONTRIBUTING.md).
104+

.github/issue_template.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Description
2+
3+
[Describe the issue]
4+
5+
### Expected behavior
6+
7+
[Describe the behavior/output you expected]
8+
9+
### Minimal, reproducible example
10+
11+
```r
12+
[Insert sample data and code]
13+
```
14+
15+
### Session Info
16+
17+
```r
18+
[Insert your sessionInfo() output]
19+
```
20+

.github/pull_request_template.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please review the [contributing guide](CONTRIBUTING.md) before submitting your pull request. Please pay special attention to the [pull request](CONTRIBUTING.md#want-to-submit-a-pull-request) and [commit message](CONTRIBUTING.md#commit-messages) sections. Thanks for your contribution and interest in the project!

0 commit comments

Comments
 (0)