Skip to content

Commit 26391c6

Browse files
committed
Code of conduct, contribution and license
1 parent 5b84468 commit 26391c6

File tree

4 files changed

+570
-0
lines changed

4 files changed

+570
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at hello@expand.org. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Contributing to expandorg/assignment
2+
3+
:+1: First off, thanks for taking the time to contribute! :+1:
4+
5+
We're excited to hear and learn from you. Your experiences will benefit others who read and use these guides.
6+
We've put together the following guidelines to help you figure out where you can best be helpful. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
7+
8+
9+
## Table of Contents
10+
11+
0. [Types of contributions we're looking for](#types-of-contributions-were-looking-for)
12+
0. [How Can I Contribute?](#how-can-i-contribute)
13+
0. [Setting up your environment](#setting-up-your-environment)
14+
0. [Pull requests](#pull-requests)
15+
0. [License](#license)
16+
17+
## Types of contributions we're looking for
18+
19+
There are many ways you can directly contribute to the guides (in descending order of need):
20+
21+
- Reporting a bug
22+
- Discussing the current state of the code
23+
- Submitting a fix
24+
- suggesting enhancements
25+
26+
## How Can I Contribute?
27+
28+
### Report bugs using Github's [issues](https://github.com/expandorg/assignment/issues)
29+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy! Write bug reports with detail, background, and sample code.
30+
31+
**Great Bug Reports** tend to have:
32+
33+
- A quick summary and/or background
34+
- Steps to reproduce
35+
- Be specific!
36+
- Give sample code if you can.
37+
- What you expected would happen
38+
- What actually happens
39+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
40+
41+
### Suggesting Enhancements
42+
How Do I Submit A Enhancement Suggestion?
43+
44+
Enhancement suggestions are tracked as GitHub [issues](https://github.com/expandorg/assignment/issues). Create an issue on this repository and provide the following information:
45+
46+
- Use a clear and descriptive title for the issue to identify the suggestion.
47+
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
48+
- Describe the current behavior and explain which behavior you expected to see instead** and why.
49+
50+
## Setting up your environment
51+
52+
Clone the repository with:
53+
54+
`go get -u github.com/expandorg/assignment`
55+
56+
or create a directory `$GOPATH/src/github/expandorg` and execute: git clone git@github.com:expandorg/assignment.git
57+
58+
Run the project dependencies (db, etc.) with `make up`
59+
Run the latest migration with `make migrate-latest`
60+
Run the project with `make run`
61+
62+
### Dependencies
63+
64+
We use `dep` to manage our dependencies. To add a new vendor, use:
65+
66+
`deps ensure -add DEPENDENCY`
67+
68+
To update vendors for built project, run:
69+
70+
`make update-deps`
71+
72+
#### Add a new migration
73+
74+
```make add-migration name="migration_name"```
75+
76+
For migration names be descriptive and start with verbs: `create_`, `drop_`, `add_`, etc. This will look at the latest migrated version (1, 2, 3) and creates 2 files with new version:
77+
78+
`2_migration_name.up.sql` and `2_migration_name.down.sql`
79+
80+
#### Migrate
81+
82+
You can migrate to latest:
83+
84+
```make migrate-latest```
85+
86+
OR You can migrate up and migrate down a version:
87+
88+
```make run-migrations action="goto" version="1"```
89+
90+
When you migrate up, you can see in the `schema_migrations` the last migrated version. When you migrate down, it updates the the version column in `schema_migrations`.
91+
92+
### Tests
93+
```make run-tests```
94+
95+
## Pull Requests
96+
We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
97+
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
98+
99+
1. Fork the repo and create your branch from `master`.
100+
2. If you've added code that should be tested, add tests.
101+
3. If you've changed APIs, update the documentation.
102+
4. Ensure the test suite passes.
103+
5. Make sure your code lints.
104+
6. Issue that pull request!
105+
106+
## License
107+
By contributing, you agree that your contributions will be licensed under its MLP-2 License.
108+
109+
Thanks! :heart:
110+
111+
Expand.org Team

0 commit comments

Comments
 (0)