Skip to content

Commit 100578c

Browse files
authored
Add contributor guidelines & documentation (#144)
Fixes #4
1 parent 03578ea commit 100578c

File tree

3 files changed

+156
-0
lines changed

3 files changed

+156
-0
lines changed

CODE_OF_CONDUCT.md

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

CONTRIBUTING.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Contributing to speedscope
2+
3+
Hi! This is a short guide & set of guidelines for contributing to speedscope.
4+
Contributors of all skill levels are welcome to submit pull requests.
5+
6+
This project adheres to the Contributor Covenant [code of conduct](./CODE_OF_CONDUCT.md).
7+
All contributors are expected to uphold this code of conduct.
8+
9+
## Setting up for development
10+
11+
To start running speedscope locally, run the following:
12+
13+
git clone https://github.com/jlfwong/speedscope.git
14+
cd speedscope
15+
npm install
16+
npm run serve
17+
18+
This should open up a running version of speedscope in your default browser.
19+
20+
In your terminal, you should see something like this:
21+
22+
$ npm run serve
23+
> [email protected] serve /Users/jlfwong/code/speedscope
24+
> parcel assets/index.html --open --no-autoinstall
25+
26+
Server running at http://localhost:1234
27+
✨ Built in 7.30s.
28+
29+
Most of speedscope is written in TypeScript. If you're unfamiliar with
30+
TypeScript, then you can either just try to learn it as you go, then the
31+
[official TypeScript
32+
documentation](https://www.typescriptlang.org/docs/home.html) may be of use
33+
to you!
34+
35+
If you're not sure where the code you want to modify lives, the [`README.md`
36+
in the `src/` directory](./src/README.md) might be helpful.
37+
38+
## Code formatting
39+
40+
All TypeScript code in speedscope is automatically formatted with
41+
[Prettier](https://prettier.io/). This means that while you're writing your code,
42+
you don't have to worry about following a formatting guide, because a program will
43+
format your code for you!
44+
45+
The easiest way to use Prettier is via an editor integration. See the [Editor
46+
Integration](https://prettier.io/docs/en/editors.html) page from Prettier's
47+
documentation for help with that.
48+
49+
If you don't want to do that, you can alternatively run the autoformatter by
50+
running `npm run prettier`.
51+
52+
## Running tests
53+
54+
All TypeScript tests are written use [Jest](https://jestjs.io/). To run the
55+
tests, run `npm run jest`.
56+
57+
## Contributing new features
58+
59+
Before contributing code to implement a new feature, please open an issue to
60+
discuss it first. Large pull requests that are submitted without first getting
61+
maintainer buy-in are unlikely to be reviewed or merged.
62+
63+
For features that will cause a visual change, please include visual mockups of
64+
the change you're planning on making.
65+
66+
## Contributing bug fixes
67+
68+
If you discover a bug, please file an issue. If the code change required to
69+
fix it is small (< ~20 lines), then feel free to just open a PR to fix the
70+
issue without trying to get buy-in ahead of time.

src/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Speedscope TypeScript source
2+
3+
This directory contains the bulk of speedscope's source code.
4+
5+
## Subdirectories
6+
7+
* `gl/`: WebGL code. This includes e.g. the code to render flamecharts.
8+
* `import/`: Code to import profiles from varous profilers into speedscope. This include e.g. the code to import Chrome performance profiles.
9+
* `lib/`: Mostly dependency-less utilities. This includes e.g. an LRU cache implementation, basic linear algebra classes,
10+
and the definition of speedscope's file format.
11+
* `store/`: Speedscope's application state management. Implemented using [`redux`](https://redux.js.org/).
12+
* `typings/`: [TypeScript definition files](https://basarat.gitbooks.io/typescript/docs/types/ambient/d.ts.html)
13+
* `views/`: View code to generate the HTML & CSS used to construct the UI. Implemented using [`preact`](https://preactjs.com/) and [`aphrodite`](https://github.com/Khan/aphrodite). Also contains code mapping from the `redux` store to views using [`preact-redux`](https://github.com/developit/preact-redux)

0 commit comments

Comments
 (0)