1
1
..
2
2
RERO ILS
3
- Copyright (C) 2019 RERO
3
+ Copyright (C) 2019-2022 RERO+
4
4
5
5
This program is free software: you can redistribute it and/or modify
6
6
it under the terms of the GNU Affero General Public License as published by
@@ -24,13 +24,13 @@ little bit helps, and credit will always be given.
24
24
Types of Contributions
25
25
----------------------
26
26
27
- Security Reports
28
- ~~~~~~~~~~~~~~~~~
27
+ Security reports
28
+ ~~~~~~~~~~~~~~~~
29
29
30
30
In case you identified a security issue on the project, please report it to the
31
31
e-mail address given in the `security policy `_.
32
32
33
- Report Bugs
33
+ Bug reports
34
34
~~~~~~~~~~~
35
35
36
36
Report bugs at https://github.com/rero/rero-ils/issues.
@@ -41,8 +41,8 @@ If you are reporting a bug, please include:
41
41
* Any details about your local setup that might be helpful in troubleshooting.
42
42
* Detailed steps to reproduce the bug.
43
43
44
- Fix Bugs
45
- ~~~~~~~~
44
+ Bug fixes
45
+ ~~~~~~~~~
46
46
47
47
Look through the GitHub issues for bugs. Anything tagged with "bug"
48
48
is open to whoever wants to implement it.
@@ -76,71 +76,76 @@ If you are proposing a feature:
76
76
Get Started!
77
77
------------
78
78
79
- Ready to contribute? Here's how to set up ``rero-ils `` for local development.
79
+ Ready to contribute? See the `installation procedure `_ to setup a local
80
+ development environment.
80
81
81
- 1. Fork the ``rero/rero-ils `` repo on GitHub.
82
- 2. Clone your fork locally:
83
82
84
- .. code-block :: console
85
83
86
- $ git clone [email protected] :your_name_here/rero-ils.git
87
-
88
- 3. Install your local using the `installation procedure `_.
89
-
90
- 4. Create a branch for local development:
91
-
92
- .. code-block :: console
93
-
94
- $ git checkout -b name-of-your-bugfix-or-feature
95
-
96
- Now you can make your changes locally.
97
-
98
- 5. When you're done making changes, check that your changes pass tests:
84
+ Pull Request Guidelines
85
+ -----------------------
99
86
100
- .. code-block :: console
87
+ Before you submit a pull request, check that it meets these guidelines:
101
88
102
- $ ./run-tests.sh
89
+ 1. The pull request should include tests and should not decrease test coverage.
90
+ 2. Your code is as clear as possible and sufficiently documented (comments,
91
+ docstrings, ...).
92
+ 3. All tests on GitHub Actions should pass before merging.
103
93
104
- The tests will provide you with test coverage and also check PEP8
105
- (code style), PEP257 (documentation), flake8 as well as build the Sphinx
106
- documentation and run doctests.
94
+ Commit message style
95
+ ~~~~~~~~~~~~~~~~~~~~
107
96
108
- 6. Add the ``.gitmessage.txt `` file to your ``git `` configuration:
97
+ Your commit message should follow Invenio's `style guide `_. Commit message is first and foremost about the content. You are communicating
98
+ with fellow developers, so be clear and brief.
109
99
110
- .. code-block :: console
100
+ (Inspired by `How to Write a Git Commit Message
101
+ <https://chris.beams.io/posts/git-commit/> `_)
111
102
112
- # globally
113
- $ git config --global commit.template /path/.gitmessage.txt
103
+ 1. `Separate subject from body with a blank line.
104
+ <https://chris.beams.io/posts/git-commit/#separate> `_
105
+ 2. `Limit the subject line to 50 characters.
106
+ <https://chris.beams.io/posts/git-commit/#limit-50> `_
107
+ 3. Indicate the component followed by a short description
108
+ 4. `Do not end the subject line with a period.
109
+ <https://chris.beams.io/posts/git-commit/#end> `_
110
+ 5. `Use the imperative mood in the subject line.
111
+ <https://chris.beams.io/posts/git-commit/#imperative> `_
112
+ 6. `Wrap the body at 72 characters.
113
+ <https://chris.beams.io/posts/git-commit/#wrap-72> `_
114
+ 7. `Use the body to explain what and why vs. how, using bullet points. <https://chris.beams.io/posts/git-commit/#why-not-how >`_
114
115
115
- # locally
116
- $ git config --local commit.template .gitmessage.txt
116
+ For example::
117
117
118
- The ``Signed-off-by `` message is not used anymore, so you can avoid ``-s ``
119
- parameters when committing. But of course, you can modify your own version
120
- of the ``.gitcommit.txt `` in order to add you own ``Co-Authored-by `` message.
118
+ component: summarize changes in 50 char or less
121
119
122
- 7. Commit your changes and push your branch to GitHub:
120
+ * More detailed explanatory text, if necessary. Formatted using
121
+ bullet points, preferably `*`. Wrapped to 72 characters.
123
122
124
- .. code-block :: console
123
+ * Explain the problem that this commit is solving. Focus on why you
124
+ are making this change as opposed to how (the code explains that).
125
+ Are there side effects or other unintuitive consequences of this
126
+ change? Here's the place to explain them.
125
127
126
- $ git add .
127
- $ git commit -s
128
- $ git push origin name-of-your-bugfix-or-feature
128
+ * Data Migration Instructions: if your PR makes changes to the data model
129
+ or needs an action when updating an existing instance, include
130
+ migration instructions (e.g. needs item reindexing, needs update mapping).
131
+ It is even better if you can also include an Alembic script directly in
132
+ your PR.
129
133
130
- 8. Submit a pull request through the GitHub website.
134
+ * Use words like "Adds", "Fixes" or "Breaks" in the listed bullets to help
135
+ others understand what you did.
131
136
132
- Pull Request Guidelines
133
- -----------------------
137
+ * If your commit closes or addresses an issue in the same project, you can
138
+ mention it in any of the bullets after the dot (closes #XXX). If it
139
+ addresses an issue from another project, mention the full issue URL
140
+ (Closes https://github.com/rero/rero-ils/issues/XXX).
134
141
135
- Before you submit a pull request, check that it meets these guidelines:
142
+ Co-authored-by: John Doe <[email protected] >
136
143
137
- 1. The pull request should include tests and must not decrease test coverage.
138
- 2. If the pull request adds functionality, the docs should be updated. Put
139
- your new functionality into a function with a docstring.
140
- 3. The pull request should work for Python 2.7, 3.3, 3.4 and 3.5. Check
141
- https://travis-ci.org/rero/rero-ils/pull_requests
142
- and make sure that the tests pass for all supported Python versions.
144
+ **Git signature: ** The only signature we use is ``Co-authored-by `` (see above)
145
+ to provide credit to co-authors. Previously we required a ``Signed-off-by ``
146
+ signature, however this is no longer required.
143
147
144
148
.. References:
145
149
.. _installation procedure : INSTALL.rst
146
150
.. _security policy : SECURITY.rst
151
+ .. _style guide : https://github.com/inveniosoftware/invenio/blob/master/CONTRIBUTING.rst#commit-messages
0 commit comments