You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+35-10Lines changed: 35 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,25 +4,34 @@ Contributing
4
4
Development Environment Setup
5
5
--------------------------------
6
6
7
-
The project has no external dependencies so your environment setup is pretty much up to you. If you are running Python 2.6 you will need to `pip install unitest2` in order to run the tests.
7
+
There are some exernal dependencies required in order to run the
8
+
tests, located in the dev-requirements.txt file.
9
+
10
+
pip install -r dev-requirements.txt
11
+
12
+
If you are running Python 2.6 you will also need to `pip install unitest2`
The GitHub project is set up with Travis CI. Tests are run automatically against new code pushes to any branch in the main repository. Test results may be viewed here:
20
+
The GitHub project is set up with Travis CI. Tests are run
21
+
automatically against new code pushes to any branch in the main
22
+
repository. Test results may be viewed here:
15
23
16
24
https://travis-ci.org/derek73/python-nameparser
17
25
18
26
Running Tests
19
27
---------------
20
28
21
-
To run the tests locally, just run `python tests.py`.
29
+
To run the tests locally, run `python tests.py`.
22
30
23
31
24
32
python tests.py
25
33
34
+
26
35
You can also pass a name string to `tests.py` to see how it will be parsed.
27
36
28
37
$ python tests.py "Secretary of State Hillary Rodham-Clinton"
@@ -38,20 +47,36 @@ You can also pass a name string to `tests.py` to see how it will be parsed.
38
47
Writing Tests
39
48
----------------
40
49
41
-
If you make changes, please make sure you include tests with example names that you want to be parsed correctly.
50
+
If you make changes, please make sure you include tests with example
51
+
names that you want to be parsed correctly.
52
+
53
+
It's a good idea to include tests of alternate comma placement formats
54
+
of the name to ensure that the 3 code paths for the 3 formats work in
55
+
the same way.
42
56
43
-
It's a good idea to include tests of alternate comma placement formats of the name to ensure that the 3 code paths for the 3 formats work in the same way.
57
+
The tests could be MUCH better. If the spirit moves you to design or
58
+
implement a much more intelligent test strategy, please know that your
59
+
efforts will be welcome and appreciated.
44
60
45
-
The tests could be MUCH better. If the spirit moves you to design or implement a much more intelligent test strategy, please know that your efforts will be welcome and appreciated.
61
+
Unless you add better coverage someplace else, add a few examples of
62
+
your names to `TEST_NAMES`. A test attempts to try the 3 different
63
+
comma variations of these names automatically and make sure things
64
+
don't blow up, so it can be a helpful regression indicator.
46
65
47
-
Unless you add better coverage someplace else, add a few examples of your names to `TEST_NAMES`. A test attempts to try the 3 different comma variations of these names automatically and make sure things don't blow up, so it can be a helpful regression indicator.
48
66
49
67
Provide Example Data
50
68
----------------------
51
69
52
-
We humans are the learning machine behind this code, and we can't do it without real world data. If it doesn't work, start a new issue because we probably don't know.
70
+
We humans are the learning machine behind this code, and we can't do
71
+
it without real world data. If it doesn't work, start a new issue
72
+
because we probably don't know.
53
73
54
-
If you have a dataset that has lots of issues, add the data to a [gist](https://gist.github.com) and [create a new issue](https://github.com/derek73/python-nameparser/issues) so we can try to get it working as expected.
74
+
If you have a dataset that has lots of issues, add the data to a
75
+
[gist](https://gist.github.com) and [create a new
76
+
issue](https://github.com/derek73/python-nameparser/issues) so we can
77
+
try to get it working as expected.
55
78
56
-
Feel free to update this documentation to address any questions that I missed. GitHub makes it pretty easy to edit it right on the web site now.
79
+
Feel free to update this documentation to address any questions that I
80
+
missed. GitHub makes it pretty easy to edit it right on the web site
0 commit comments