Skip to content

Commit ec3c0c3

Browse files
authored
Merge pull request deanmalmgren#501 from deanmalmgren/jazzband-transfer
updating CONTRIBUTING.md to for jazzband
2 parents 102a584 + 4c0b124 commit ec3c0c3

File tree

2 files changed

+11
-115
lines changed

2 files changed

+11
-115
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,5 @@
1-
Any and all contributions are welcome and appreciated. To make it easy
2-
to keep things organized, this project uses the
3-
[general guidelines](https://guides.github.com/introduction/flow/)
4-
for the fork-branch-pull request model for github. Briefly, this means:
1+
[![Jazzband](https://jazzband.co/static/img/jazzband.svg)](https://jazzband.co/)
52

6-
1. Make sure your fork's `master` branch is up to date:
7-
8-
git remote add deanmalmgren https://github.com/deanmalmgren/textract.git
9-
git checkout master
10-
git pull deanmalmgren/master
11-
12-
2. Start a feature branch with a descriptive name about what you're
13-
trying to accomplish:
14-
15-
git checkout -b csv-support
16-
17-
3. Make commits to this feature branch (`csv-support`, in this case)
18-
in a way that other people can understand with good commit messages
19-
to explain the changes you've made:
20-
21-
emacs textract/parsers/csv_parser.py
22-
git add textract/parsers/csv_parser.py
23-
git commit -m 'added csv_parser'
24-
25-
4. If an issue already exists for the code you're contributing, use
26-
[issue2pr](http://issue2pr.herokuapp.com/) to attach your code to
27-
that issue:
28-
29-
git push origin csv-support
30-
chrome http://issue2pr.herokuapp.com
31-
# enter the issue URL, HEAD=yourusername:csv-support, Base=master
32-
33-
If the issue doesn't already exist, just send a pull
34-
request in the usual way:
35-
36-
git push origin csv-support
37-
chrome http://github.com/deanmalmgren/textract/compare
38-
39-
40-
Common contributions: support for new file type
41-
-----------------------------------------------
42-
43-
This project has really taken off, much more so than I would have
44-
thought (thanks everybody!). To help new contributors, I thought I'd
45-
jot down some notes for one of the more common contributions---how to
46-
add support for hitherto unsupported file type `.abc123`:
47-
48-
* write a `Parser` class in `textract/parsers/abc123_parser.py` that
49-
inherits from `textract.parsers.utils.BaseParser` or
50-
`textract.parsers.utils.ShellParser` and implements the
51-
`extract(self, filename, **kwargs)` method.
52-
53-
* add a test file in `tests/abc123/raw_text.abc123`, run textract on
54-
it like this:
55-
56-
```shell
57-
textract tests/abc123/raw_text.abc123 > tests/abc123/raw_text.txt
58-
```
59-
60-
and add the basic test suite by creating
61-
a file called `tests/test_abc123.py` with content that looks
62-
something like this:
63-
64-
```python
65-
# tests/test_abc123.py
66-
import unittest
67-
68-
import base
69-
70-
71-
class Abc123TestCase(unittest.TestCase, base.BaseParserTestCase):
72-
extension = 'abc123'
73-
```
74-
75-
now you should be able to run tests on your parser with `nosetests
76-
tests/test_abc123.py` or the tests for every parser with `nosetests`.
77-
78-
* if your package relies on any external sources, be sure to add them
79-
in either `requirements/python` (for python packages) or
80-
`requirements/debian` (for debian packages) and update the
81-
installation documentation accordingly in `docs/installation.rst`.
82-
83-
* add documentation about the awesome new file format this is being
84-
supported in `docs/index.rst` and be sure to give yourself a pat on
85-
the back by updating the changelog in `docs/changelog.rst`
86-
87-
* finally, make sure the entire test suite passes by running
88-
`./tests/run.py` and fix any lingering problems (usually PEP-8
89-
nonsense).
90-
91-
92-
Style guidelines
93-
----------------
94-
95-
As a general rule of thumb, the goal of this package is to be as
96-
readable as possible to make it easy for novices and experts alike to
97-
contribute to the source code in meaningful ways. Pull requests that
98-
favor cleverness or optimization over readability are less likely to be
99-
incorporated.
100-
101-
To make this notion of "readability" more concrete, here are a few
102-
stylistic guidelines that are inspired by other projects and we
103-
generally recommend:
104-
105-
- write functions and methods that can `fit on a screen or two of a
106-
standard
107-
terminal <https://www.kernel.org/doc/Documentation/CodingStyle>`_
108-
--- no more than approximately 40 lines.
109-
110-
- unless it makes code less readable, adhere to `PEP
111-
8 <http://legacy.python.org/dev/peps/pep-0008/>`_ style
112-
recommendations --- use an appropriate amount of whitespace.
113-
114-
- `code comments should be about *what* is being done, not *how* it is
115-
being done <https://www.kernel.org/doc/Documentation/CodingStyle>`_
116-
--- that should be self-evident from the code itself.
3+
This is a [Jazzband](https://jazzband.co/) project. By contributing you agree to
4+
abide by the [Contributor Code of Conduct](https://jazzband.co/about/conduct)
5+
and follow the [guidelines](https://jazzband.co/about/guidelines).

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ Extract text from any document. No muss. No fuss.
1212

1313
`Full documentation <http://textract.readthedocs.org>`__.
1414

15+
Originally written by @deanmalmgren. Maintained by the good people at
16+
@jazzband |Jazz Band|
17+
1518
|Build Status| |Version| |Downloads| |Test Coverage| |Documentation Status|
1619
|Updates| |Stars| |Forks|
1720

21+
.. |Jazz Band| image:: https://jazzband.co/static/img/badge.svg
22+
:target: https://jazzband.co/
23+
:alt: Jazzband
24+
1825
.. |Build Status| image:: https://travis-ci.org/deanmalmgren/textract.svg?branch=master
1926
:target: https://travis-ci.org/deanmalmgren/textract
2027

0 commit comments

Comments
 (0)