Skip to content

Commit 404698b

Browse files
Merge pull request #750 from ElectionDataAnalysis/issue731-community-guidelines
Issue731 community guidelines
2 parents 2a48467 + 7b06361 commit 404698b

4 files changed

Lines changed: 93 additions & 23 deletions

File tree

CODE_OF_CONDUCT.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# Contributor Code of Conduct
3+
4+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
5+
6+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
7+
8+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
9+
10+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
11+
12+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
13+
14+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html

CONTACT_US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Contact [Stephanie Singer](http://symmetrysinger.com/index.php?id=contact).

CONTRIBUTING.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Please note that electiondata is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
2+
By contributing to this project,
3+
you agree to abide by its terms.
4+
5+
# Contributing to electiondata development
6+
7+
## Report a Problem
8+
9+
To report a problem, [file an issue on GitHub](https://github.com/ElectionDataAnalysis/electiondata/issues). When filing an issue, the most important thing is to include a minimal
10+
reproducible example so that we can quickly verify the problem, and then figure
11+
out how to fix it. Please include
12+
13+
1. Link to the exact version of electiondata you are using.
14+
15+
1. A copy of your working directory, following the model in the [Sample Session](docs/Sample_Session.md). Include:
16+
* a `run_time.ini` file (Feel free to redact the login information for your local postgres instance.)
17+
* all subdirectories referenced in the `run_time.ini` file.
18+
* If the issue involves loading a particular results data file, be sure to include that file. If possible, avoid submitting large results files -- if your file is precinct-based, for example, see if you can demonstrate the issue with a truncated results file.
19+
* all error and warnings files placed by the system into the `reports_and_plots_dir` specified in `run_time.ini`.
20+
21+
1. A transcript of the python session, where python is called from the working directory.
22+
23+
You can check you have actually made a reproducible example by:
24+
1. creating a virtual environment
25+
1. installing the indicated version of electiondata
26+
1. if files or folders were moved by the system to the archive directory, move them back to the input directory, removing any timestamps from directory names.
27+
1. navigating to the working directory, calling python, and producing the behavior in question.
28+
29+
## Revise the Code
30+
31+
To contribute a change to `electiondata` follow these steps:
32+
33+
1. Create a branch in git and make your changes.
34+
1. Run unit tests to check for broken functionality. See [pytest instructions](docs/Testing_Code_with_pytest.md).
35+
1. Run python `black` to format your code to our standard.
36+
1. Push branch to github and issue pull request (PR).
37+
1. Discuss the pull request.
38+
1. Iterate until either we accept the PR or decide that it's not
39+
a good fit for `electiondata`.
40+
41+
Each of these steps are described in more detail below. This might feel
42+
overwhelming the first time you get set up, but it gets easier with practice.
43+
If you get stuck at any point, feel free to [contact us](CONTACT_US.md) for help.
44+
45+
If you're not familiar with git or github, please read a tutorial such as [https://realpython.com/python-git-github-intro/](https://realpython.com/python-git-github-intro/).
46+
47+
48+
Pull requests will be evaluated against this checklist:
49+
50+
1. __Motivation__. Your pull request should clearly and concisely motivate the
51+
need for change.
52+
53+
1. __Only related changes__. Before you submit your pull request, please
54+
check to make sure that you haven't accidentally included any unrelated
55+
changes. These make it harder to see exactly what's changed, and to
56+
evaluate any unexpected side effects.
57+
58+
Each PR corresponds to a git branch, so if you expect to submit
59+
multiple changes make sure to create multiple branches. If you have
60+
multiple changes that depend on each other, start with the first one
61+
and don't submit any others until the first one has been processed.
62+
63+
1. __Documentation__ Any new parameters or a new functions must be documented both in the code and in the [User Guide](docs/User_Guide.md), [Sample Session](docs/Sample_Session.md) and any other relevant documents. If you're adding a new graphical or analytical feature, please add a short example to [Sample Session](docs/Sample_Session.md).
64+
65+
1. __Tests__ If fixing a bug or adding a new feature to a non-graphical function,
66+
please add a [pytest](https://docs.pytest.org) unit test. Document the new test in [pytest instructions](docs/Testing_Code_with_pytest.md).
67+
68+
This seems like a lot of work but don't worry if your pull request isn't perfect.
69+
Unless you've submitted a few in the
70+
past it's unlikely that your pull request will be accepted as is. All PRs require
71+
review and approval from at least one member of the `electiondata` development team
72+
before merge.
73+

README.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4078/badge)](https://bestpractices.coreinfrastructure.org/projects/4078)
22

3-
43
# Overview
54
This repository provides tools for consolidation and analysis of raw election results from the most reliable sources -- the election agencies themselves.
65
* Consolidation: take as input election results files from a wide variety of sources and load the data into a relational database
@@ -16,35 +15,18 @@ This repository provides tools for consolidation and analysis of raw election re
1615
* Bar charts
1716

1817
# Target Audience
19-
This system is intended to be of use to news media, campaigns, election officials, students of politics and elections, and anyone else who is interested in assembling and understanding election results.
20-
21-
# How to Contribute Code
22-
Please contribute code that works in python 3.9, with the package versions specified in [requirements.txt](requirements.txt). We follow the [black](https://pypi.org/project/black/) format.
23-
24-
# How to Help in Other Ways
25-
If you have skills to contribute to building the system, we can definitely use your help:
26-
* Creating visualizations
27-
* Preparing for intake of specific states' results files
28-
* Managing collection of data files in real time
29-
* Writing documentation
30-
* Merging other data sets of interest (e.g., demographics)
31-
* Building our open source community
32-
* What else? Let us know!
33-
34-
If you are a potential end user -- an election official, political scientist or campaign consultant, for instance -- let us know what you want to from this system.
35-
36-
If you are interested in contributing, or just staying updated on the progress of this project, please [contact Stephanie Singer](http://symmetrysinger.com/index.php?id=contact).
18+
This system is intended to be of use to news media, campaigns, election officials, students of politics and elections, and anyone else who is interested in assembling and understanding election results. If you have ideas for using this system or if you would like to stay updated on the progress of this project, [we'd like to hear from you](CONTACT_US.md).
3719

3820
# How to use the app
3921
See [documentation directory](docs), which includes
4022
* for users
4123
* [Installation instructions](docs/Installation.md)
4224
* Instructions for a [sample dataloading session](docs/Sample_Session.md)
4325
* Detailed [User Guide](docs/User_Guide.md)
44-
* for developers
45-
* [Information about the code](docs/About_the_Code.md)
46-
* [Information about the tests](docs/Testing_Code_with_pytest.md)
47-
26+
27+
# How to Contribute Code
28+
See [CONTRIBUTING.MD](CONTRIBUTING.md).
29+
4830
# Contributors
4931
* [Stephanie Singer](http://campaignscientific.com/), Hatfield School of Government (Portland State University), former Chair, Philadelphia County Board of Elections
5032
* Janaki Raghuram Srungavarapu, Hatfield School of Government (Portland State University)

0 commit comments

Comments
 (0)