-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add code of conduct and contributing documentation #671
Conversation
Codecov Report
@@ Coverage Diff @@
## master #671 +/- ##
=======================================
Coverage 92.38% 92.38%
=======================================
Files 180 180
Lines 1996 1996
=======================================
Hits 1844 1844
Misses 152 152 Continue to review full report at Codecov.
|
642cbcd
to
9a55646
Compare
fix: duplicate source materials entry in contributing.md docs: add preliminary content to code of conduct dx: add .nvmrc file (#672) docs: add build and test steps to contributing.md docs: add issue template docs: fix linter error for issue template docs: add docs for making documentation contributions docs: add link to rfcs repository in contributing.md docs: update readme and remove roadmap in favor of lux-rfcs repo style: whitespace change in contributing.md docs: left align column 2 of the commit style table in contributing.md docs: missing punctuation in code of conduct dx: add .nvmrc file (#672) docs: change irc to gitter in code of conduct
67d56c3
to
8ba3ce6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My two cents on the open questions:
Should the language in the Code of Conduct be generalized for all open-source projects at Postlight?
Eventually yes, but doing it now is probably a premature optimization. The CoC is an evolving document that we will iterate on to meet community needs as it grows -- maybe we can add language about the fact that it will change over time, and when the next Postlight OSS project needs a CoC we can start from here.
Does the Postlight Charter fit into the Code of Conduct? If so, what parts?
Yes -- off the top, the part about inclusivity for sure, probably some others as well. Once the charter is published, at that point we could add language to the CoC about how Postlight Labs maintains Lux, and here are how Postlight's values are reflected within Lux's CoC.
When should the document speak from the perspective of Postlight/Postlight Labs vs the Lux Community?
Always default to the Lux Community, and refer to Postlight Labs as the project maintainers.
Is lux@postlight.com the appropriate contact address to list in the Code of Conduct?
Maybe lux+moderators@postlight.com? Then we could use the plus notation to accept email about different issues to the same inbox (ie, security, moderation, anything else that comes up).
Is sending an email to lux@postlight.com the appropriate contact method to report violations of the Code of Conduct?
Would go with lux+moderators@postlight.com here, too.
CODE_OF_CONDUCT.md
Outdated
|
||
**Contact**: [lux@postlight.com](mailto:lux@postlight.com) | ||
|
||
* We are committed to providing a friendly, safe and welcoming environment for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The Lux community is committed" ("we" a bit unspecific)
CODE_OF_CONDUCT.md
Outdated
|
||
## Conduct | ||
|
||
**Contact**: [lux@postlight.com](mailto:lux@postlight.com) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Contact Lux moderators:" ?
CODE_OF_CONDUCT.md
Outdated
sexual orientation, disability, personal appearance, body size, race, ethnicity, | ||
age, religion, nationality, or other similar characteristic. | ||
|
||
* On Gitter, please avoid using overtly sexual nicknames or other nicknames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: "avoid using racist, sexually explicit or otherwise hostile nicknames that might detract from a friendly, safe and welcoming environment for all."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion! I'll make the change.
others. | ||
|
||
In the Lux community we strive to go the extra step to look out for each other. | ||
Don't just aim to be technically unimpeachable, try to be your best self. In |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This is one of my favorite parts of the Rust CoC.
CODE_OF_CONDUCT.md
Outdated
they're off-topic; this all too often leads to unnecessary fights, hurt feelings, | ||
and damaged trust; worse, it can drive people away from the community entirely. | ||
|
||
And if someone takes issue with something you said or did, resist the urge to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the opening And on this sentence.
always work, and sometimes it's hard to know what to search for, so consider | ||
this extra credit. We won't mind if you accidentally file a duplicate report. | ||
|
||
Opening an issue is as easy as following [this link](https://github.com/postlight/lux/issues/new) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a different process for reporting a security vulnerability that we would not want documented publicly? Perhaps a lux+security@postlight.com email for sensitive security issues? This is what we did at ThinkUp: http://thinkup.readthedocs.io/en/latest/install/security.html#how-to-report-a-security-bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great suggestion. I included an adapted version of the language in the ThinkUp docs in CONTRIBUTING.md. I also added ThinkUp Security and Data Privacy to the acknowledgements at the bottom of the document.
CONTRIBUTING.md
Outdated
Want to make a change to Lux? Submit a pull request! We use the "fork and pull" | ||
model [described here](https://help.github.com/articles/creating-a-pull-request-from-a-fork). | ||
|
||
**Before submitting a pull request**, please make sure you do the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove everything after "make sure:" here or you could do "make sure you have:" and delete "You have" from the start of each bullet.
CONTRIBUTING.md
Outdated
that you may have changed. | ||
* [X] You have no linter errors to correct after running `npm run lint`. | ||
* [X] You have no type errors to correct after running `npm run flow`. | ||
* [X] You have ran the test suite via `npm test` and it passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: run not ran
|
||
If you have never written JavaScript with [Flow](https://flowtype.org) or | ||
[TypeScript](https://www.typescriptlang.org/) before, you may have a bit of a | ||
learning curve. If you get stuck on something, feel free to ask a question in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we suggest any starter resources here to get up to speed with Flow/Typescript? I really like how we're suggesting editor plugins below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great idea! I added a link to the Flow documentation at the bottom of this section.
in community.* | ||
|
||
## Contents | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: include a definition of what we consider a contribution to Lux, a broad definition. Code for sure--and most of this document will address that type of contribution--but also: updating and writing documentation, answering questions and chatting with the community in the Gitter room, filing, organizing, commenting on issues, teaching others how to use Lux, making suggestions on branding, building community, outreach, etc. I think one of the most common mistakes OSS projects make is focusing on code when so much more goes into writing software as a community.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't agree more! I'll get something basic written up and check in with you once it's pushed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a Ways to Contribute section. I had a tough time wording it for some reason. For the sake of tone, I tried to express that the list is not exhaustive without directly saying it. I'm not sure that came across correctly. Suggestions/feedback would be appreciated. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new section looks great. Related, this is pretty interesting: https://github.com/kentcdodds/all-contributors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Great idea!
…into docs-contributing
docs: copy changes in code of conduct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall!
Small suggestion and typo fix.
CONTRIBUTING.md
Outdated
* [flow-for-vscode (Visual Studio Code)](https://github.com/flowtype/flow-for-vscode) | ||
* [flow-for-emacs (Emacs)](https://github.com/flowtype/flow-for-emacs) | ||
* [vim-flow (Vim)](https://github.com/flowtype/vim-flow) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add WebStorm too? I feel that with that one included you've covered the most popular text-editors/IDE's. Unfortunately the link is version specific (though official flow support has only been added in that (the most recent) version).
Link: https://www.jetbrains.com/help/webstorm/2016.3/using-the-flow-type-checker.html
If you use [nvm](https://github.com/creationix/nvm) to manage Node.js versions | ||
and zsh (like [Oh-My-ZSH](https://github.com/robbyrussell/oh-my-zsh)), you can | ||
have nvm switch to the correct Node.js version automatically when you cd into | ||
this repository. To do so, add the following to your `~/.zshrc` file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great tip/script!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This has been a life saver for me. 😃
CONTRIBUTING.md
Outdated
## Writing Documentation | ||
|
||
Improvements to documentation are a great way to start contributing to Lux. The | ||
sources for the official documentation is generated from source code comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sources for the official documentation
isare generated from source code comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I think this all looks good :) I added a few thoughts, all relatively minor things...
CODE_OF_CONDUCT.md
Outdated
sexual orientation, disability, personal appearance, body size, race, ethnicity, | ||
age, religion, nationality, or other similar characteristic. | ||
|
||
* On Gitter, please avoid avoid using racist, sexually explicit or otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why limit this to just on gitter? these seem like good rules of the road generally speaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't agree more! 😃
CONTRIBUTING.md
Outdated
#### JavaScript | ||
|
||
We use a slightly modified version of the Airbnb JavaScript [Style Guide](https://github.com/airbnb/javascript). | ||
To enforce this, all pull requests that must pass [ESLint](http://eslint.org/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have an unneeded 'that' in this sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
* [X] You have no linter errors to correct after running `npm run lint`. | ||
* [X] You have no type errors to correct after running `npm run flow`. | ||
* [X] You have run the test suite via `npm test` and it passed. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some mention here about lux's opinion about squashing commits seems warranted to me also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point. I'm not sure that we have to explicitly mention it since GitHub introduced the squash and merge button. I'm open to discussing this more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that button works, I'd say it isn't an issue. You'll have to press to merge anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. @nickschot
@nickschot I have updated this PR based on you comments. Whenever you have a moment and this looks good to you, can you update your "approval status"? 😃 |
* docs: add code of conduct and contributing documentation fix: duplicate source materials entry in contributing.md docs: add preliminary content to code of conduct dx: add .nvmrc file (#672) docs: add build and test steps to contributing.md docs: add issue template docs: fix linter error for issue template docs: add docs for making documentation contributions docs: add link to rfcs repository in contributing.md docs: update readme and remove roadmap in favor of lux-rfcs repo style: whitespace change in contributing.md docs: left align column 2 of the commit style table in contributing.md docs: missing punctuation in code of conduct dx: add .nvmrc file (#672) docs: change irc to gitter in code of conduct * docs: use lux+moderators@postlight.com instead of lux@postlight.com * docs: copy changes in code of conduct docs: copy changes in code of conduct * docs: typo in contribting.md * docs: copy changes in contributing.md * docs: add instructions for reporting security vulnerabilities * docs: add a link to flow documentation in contributing.md * docs: typo in contributing.md * docs: add webstorm flow docs to contributing.md * docs: remove unecessary "that" in contributing.md * docs: widen the scope of the second bullet in the code of conduct * docs: add pull request template * docs: add "ways to contribute" section to contributing.md
* refactor: use jest instead of mocha + chai * feat: add http and mock adapters * tests: updated failing test suites * fix: continued updates to unit tests * refactor: more test updates * refactor: more test updates * refactor: more test updates * feat: use jest-junit reporter * fix: attempt to set node_env in child processes * test: set node_env in circle.yml * fix: update junit output * refactor: toJSON() -> toObject() * fix: typo in recursive calls to model.toObject() * fix: typo in recursive calls to model.toObject() * fix: missing --skip-build flag on serve command * fix: move test setup to ci yml files * fix: syntax error in circle.yml * fix: cache test-app instances * fix: increase default timeout * fix: run tests serially * fix: update method in controller * fix: properly set database driver in circleci * fix: integrate codecov with jest * feat: use mocks for fs tests * style: remove excess whitespace in watcher module * fix: enable eslint in test files * fix: use utc dates in serializer snapshots * deps: remove sinon in favor of jest mocks * test: run jest on appveyor * fix: syntax error in appveyor.yml * fix: remove ids from fixtures * test: do not use junit reporter * fix: ensure serializer snapshots have consistent sorting * fix: ensure serializer snapshots have consistent sorting * fix: ensure relationship snapshots have consistent sorting * fix: do not use snapshots in relationships module * deps: update flow-bin to version 0.39.0 * test: add unit test for adapters * test: add unit test for adapter utils * refactor: rename test directories to follow jest conventions * deps: update to jest 19 * test: improve coverage for controller * deps: update flow to version 0.40.0 * test: improve test coverage for fs package * test: improve coverage for parse path method * test: upload coverage results from appveyor * fix: cleanup connections after each test * chore: use yarn instead of npm * fix: wrap destroys in controller test in a transaction * fix: install yarn via powershell during appveyor builds * fix: do not use transactions without a connection pool * fix: use preinstalled yarn on appveyor builds * fix: run yarn commands in powershell in appveyor builds * fix: use npm link instead of yarn link on appveyor * fix: increase heap size for tests * fix: disable jest cache in appveyor builds * fix: run tests in parallel * feat: use in memory db with sqlite driver * fix: properly set worker count in ci * feat: cache test-app dependencies in ci * fix: do not specify worker count in circle.yml * deps: update outdated dependencies * fix: cleanup application instance methods * style: use block comment for flow files * style: add no-irregular-whitespace eslint rule * style: remove excess whitespace * deps: update dependencies * deps: update dependencies * deps: update test-app dependencies * fix: eslint errors in debugger * test: use circleci 2 * fix: syntax error in circle.yml * fix: change working directory in circle.yml * fix: move working directory entry in circle.yml * test: run tests synchronously in circleci * fix: migrate and seed database in circleci * fix: errors in circle.yml * fix: errors in circle.yml * fix: missing then in circle.yml seed database command * fix: use root database user in circleci * test: update appveyor.yml * test: use visual studio 2017 build image in appveyor.yml * fix: increase js heap size in appveyor builds * test: log heap usage in appveyor builds * test: run tests in parallel during appveyor builds * test: disable cache in appveyor builds * test: output color from jest in circleci builds * fix: remove force exit in circleci.yml * fix: force postgres builds to exit during circleci builds * test: use 2 runners during circleci builds * test: use 3 runners during circleci builds * test: use 4 runners during circleci builds * test: do not force postgres builds to exit during circleci builds * test: specify parallelism in circle.yml * test: cache dependencies during circleci builds * test: reuse yarn cache in circleci * test: use eslint cache in circleci * test: use better cache keys in circle.yml * test: reuse jest cache between circleci builds * fix: typo in circle.yml * fix: typo in circle.yml * test: rearrange build steps in circle.yml * test: rearrange build steps in circle.yml * test: do not specify number of workers during circleci builds * test: do not specify number of workers during circleci builds * test: do not specify number of workers during circleci builds * test: use 6 runners during circleci builds * test: use 8 runners during circleci builds * refactor: simplify pool logic in test-app database config * test: use cache in appveyor builds * test: use 4 runners during appveyor builds * test: remove unnecessary env var in circle.yml * test: change database pool config for appveyor builds * test: use 4 runners during appveyor builds * test: conditionally seed database during appveyor builds * test: use 2 runners during appveyor builds * test: do not use watchman in appveyor builds * test: use 3 runners during appveyor builds * test: use 2 runners during appveyor builds * test: try to set memory limit during appveyor builds * test: try to set memory limit during appveyor builds * test: try to set memory limit during appveyor builds * test: do not call jest directly in appveyor.yml * docs: add code of conduct and contributing documentation (#671) * docs: add code of conduct and contributing documentation fix: duplicate source materials entry in contributing.md docs: add preliminary content to code of conduct dx: add .nvmrc file (#672) docs: add build and test steps to contributing.md docs: add issue template docs: fix linter error for issue template docs: add docs for making documentation contributions docs: add link to rfcs repository in contributing.md docs: update readme and remove roadmap in favor of lux-rfcs repo style: whitespace change in contributing.md docs: left align column 2 of the commit style table in contributing.md docs: missing punctuation in code of conduct dx: add .nvmrc file (#672) docs: change irc to gitter in code of conduct * docs: use lux+moderators@postlight.com instead of lux@postlight.com * docs: copy changes in code of conduct docs: copy changes in code of conduct * docs: typo in contribting.md * docs: copy changes in contributing.md * docs: add instructions for reporting security vulnerabilities * docs: add a link to flow documentation in contributing.md * docs: typo in contributing.md * docs: add webstorm flow docs to contributing.md * docs: remove unecessary "that" in contributing.md * docs: widen the scope of the second bullet in the code of conduct * docs: add pull request template * docs: add "ways to contribute" section to contributing.md * test: do not report test coverage in appveyor * test: report coverage after appveyor builds * refactor: reduce usage of test app in unit tests * test: develop against node 7 * fix: failing snapshot tests for loader module * fix: failing postgres tests * refactor: develop against node 6.10.0 * fix: do not cache node_modules * fix: use epoch timestamp in circleci dependency cache key * test: lock appveyor node version to 6.10.0 * test: run test script in powershell in appveyor * style: use "test" instead of "it" in test files * chore: add back missing tests and upgrade flow * fix: eslint errors * deps: update outdated packages * docs: add jest to the useful links section of readme.md
This PR aims to make contributing to Lux less vague and improve the overall sense of community around Lux.
The Lux Code of Conduct
This document outlines our expectations for participants within the Lux community, as well as steps to reporting unacceptable behavior.
Contributing to Lux
This document explains how to be an effective participant in the Lux community. In this document you can expect to find answers to high level questions such as how to report a bug or request feature. Also, you can find information for some lower level topics such as how to set up a local development environment and the process of submitting a pull request.
Support Materials
* RFCs will be submitted in the form of a pull request to the postlight/lux-rfcs repository. Once an RFC has been accepted, it will be merged into the master branch. If an RFC has been merged to master, a member of the community can implement it in Lux core.
To Do
Pre Merge
Post Merge
Questions
Here are a few questions that came up when writing the documents in this pull request. This list is not exhaustive. This pull request itself is asking the question, "what policies should we have and what should these document contain?".
Should the language in the Code of Conduct be generalized for all open-source projects at Postlight?Does the Postlight Charter fit into the Code of Conduct? If so, what parts?When should the document speak from the perspective of Postlight/Postlight Labs vs the Lux Community?Islux@postlight.com
the appropriate contact address to list in the Code of Conduct?Is sending an email tolux@postlight.com
the appropriate contact method to report violations of the Code of Conduct?Acknowledgement
A lot of what you will find has been adapted from documents of the Node.js Foundation and Rust Community. I found this to be the easiest way to begin to form the blueprint for documentation and policies of our own. In the event that the unoriginal content is cited in an unethical way, leave a comment in the source view and it will be corrected.
Closes #51