Skip to content

Commit 51fcfb0

Browse files
committed
set up github repo
1 parent fae9a17 commit 51fcfb0

File tree

3 files changed

+256
-0
lines changed

3 files changed

+256
-0
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
[INSERT CONTACT METHOD].
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.0, available at
120+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
121+
122+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
123+
enforcement ladder](https://github.com/mozilla/diversity).
124+
125+
[homepage]: https://www.contributor-covenant.org
126+
127+
For answers to common questions about this code of conduct, see the FAQ at
128+
https://www.contributor-covenant.org/faq. Translations are available at
129+
https://www.contributor-covenant.org/translations.

.github/CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
Contributions include code, documentation, answering user questions, running the
3+
project's infrastructure, and advocating for all types of users.
4+
5+
The project welcomes all contributions from anyone willing to work in good faith
6+
with other contributors and the community. No contribution is too small and all
7+
contributions are valued.
8+
9+
This guide explains the process for contributing to the project's GitHub
10+
Repository.
11+
12+
- [Code of Conduct](#code-of-conduct)
13+
- [Bad Actors](#bad-actors)
14+
15+
## Code of Conduct
16+
The project has a [Code of Conduct](./CODE_OF_CONDUCT.md) that *all*
17+
contributors are expected to follow. This code describes the *minimum* behavior
18+
expectations for all contributors.
19+
20+
As a contributor, how you choose to act and interact towards your
21+
fellow contributors, as well as to the community, will reflect back not only
22+
on yourself but on the project as a whole. The Code of Conduct is designed and
23+
intended, above all else, to help establish a culture within the project that
24+
allows anyone and everyone who wants to contribute to feel safe doing so.
25+
26+
Should any individual act in any way that is considered in violation of the
27+
[Code of Conduct](./CODE_OF_CONDUCT.md), corrective actions will be taken. It is
28+
possible, however, for any individual to *act* in such a manner that is not in
29+
violation of the strict letter of the Code of Conduct guidelines while still
30+
going completely against the spirit of what that Code is intended to accomplish.
31+
32+
Open, diverse, and inclusive communities live and die on the basis of trust.
33+
Contributors can disagree with one another so long as they trust that those
34+
disagreements are in good faith and everyone is working towards a common
35+
goal.
36+
37+
## Bad Actors
38+
All contributors to tacitly agree to abide by both the letter and
39+
spirit of the [Code of Conduct](./CODE_OF_CONDUCT.md). Failure, or
40+
unwillingness, to do so will result in contributions being respectfully
41+
declined.
42+
43+
A *bad actor* is someone who repeatedly violates the *spirit* of the Code of
44+
Conduct through consistent failure to self-regulate the way in which they
45+
interact with other contributors in the project. In doing so, bad actors
46+
alienate other contributors, discourage collaboration, and generally reflect
47+
poorly on the project as a whole.
48+
49+
Being a bad actor may be intentional or unintentional. Typically, unintentional
50+
bad behavior can be easily corrected by being quick to apologize and correct
51+
course *even if you are not entirely convinced you need to*. Giving other
52+
contributors the benefit of the doubt and having a sincere willingness to admit
53+
that you *might* be wrong is critical for any successful open collaboration.
54+
55+
Don't be a bad actor.

.github/workflows/ci.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
env:
10+
RUSTFLAGS: -Dwarnings
11+
12+
jobs:
13+
build_and_test:
14+
name: Build and test
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macOS-latest]
19+
rust: [stable, nightly]
20+
21+
steps:
22+
- uses: actions/checkout@master
23+
24+
- name: Install ${{ matrix.rust }}
25+
uses: actions-rs/toolchain@v1
26+
with:
27+
toolchain: ${{ matrix.rust }}
28+
override: true
29+
30+
- name: check
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: check
34+
args: --all --bins --examples
35+
36+
- name: check avoid-dev-deps
37+
uses: actions-rs/cargo@v1
38+
if: matrix.rust == 'nightly'
39+
with:
40+
command: check
41+
args: --all -Z avoid-dev-deps
42+
43+
- name: tests
44+
uses: actions-rs/cargo@v1
45+
with:
46+
command: test
47+
args: --all
48+
49+
check_fmt_and_docs:
50+
name: Checking fmt, clippy, and docs
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@master
54+
55+
- uses: actions-rs/toolchain@v1
56+
with:
57+
toolchain: stable
58+
override: true
59+
60+
- name: setup
61+
run: |
62+
rustup component add clippy rustfmt
63+
rustc --version
64+
65+
- name: clippy
66+
run: cargo clippy -- -D warnings
67+
68+
- name: fmt
69+
run: cargo fmt --all -- --check
70+
71+
- name: Docs
72+
run: cargo doc --no-deps --features unstable

0 commit comments

Comments
 (0)