|
| 1 | +## Contributing |
| 2 | + |
| 3 | +A big welcome and thank you for considering contributing to this project. |
| 4 | + |
| 5 | +This project is a community effort and lives off your contributions, be it in |
| 6 | +the form of bug reports, feature requests, discussions, or fixes and other |
| 7 | +code changes. |
| 8 | + |
| 9 | +Reading and following these guidelines will help us make the contribution |
| 10 | +process easy and effective for everyone involved. It also communicates that you |
| 11 | +agree to respect the time of the developers managing and developing these open |
| 12 | +source projects. In return, we will reciprocate that respect by addressing your |
| 13 | +issue, assessing changes, and helping you finalize your pull requests. |
| 14 | + |
| 15 | +## Quicklinks |
| 16 | + |
| 17 | +- [Code of Conduct](#code-of-conduct) |
| 18 | +- [Getting Started](#getting-started) |
| 19 | + - [Issues](#issues) |
| 20 | + - [Pull Requests](#pull-requests) |
| 21 | + - [Setup Development Environment](#setup-development-environment) |
| 22 | + - [HTML Preview](#html-preview) |
| 23 | + - [Testing](#testing) |
| 24 | +- [Release Procedure](#release-procedure) |
| 25 | +- [Getting Help](#getting-help) |
| 26 | + |
| 27 | +## Code of Conduct |
| 28 | + |
| 29 | +We take our open source community seriously and hold ourselves and other |
| 30 | +contributors to high standards of communication. By participating and |
| 31 | +contributing to this project, you agree to uphold our [Code of Conduct]. |
| 32 | + |
| 33 | +## Getting Started |
| 34 | + |
| 35 | +Contributions are made to this repo via Issues and Pull Requests (PRs). A few |
| 36 | +general guidelines that cover both: |
| 37 | + |
| 38 | +- Search for existing Issues and PRs before creating your own. |
| 39 | +- We work hard to makes sure issues are handled in a timely manner but, |
| 40 | + depending on the impact, it could take a while to investigate the root cause. |
| 41 | + A friendly ping in the comment thread to the submitter or a contributor can |
| 42 | + help draw attention if your issue is blocking. |
| 43 | + |
| 44 | +### Issues |
| 45 | + |
| 46 | +Issues should be used to report problems with this project, request a new |
| 47 | +feature, or to discuss potential changes before a PR is created. When you |
| 48 | +create a new Issue, a template will be loaded that will guide you through |
| 49 | +collecting and providing the information we need to investigate. |
| 50 | + |
| 51 | +If you find an Issue that addresses the problem you're having, please add your |
| 52 | +own reproduction information to the existing issue rather than creating a new |
| 53 | +one. Adding a [reaction] can also help be indicating to our maintainers that a |
| 54 | +particular problem is affecting more than just the reporter. |
| 55 | + |
| 56 | +### Pull Requests |
| 57 | + |
| 58 | +PRs to our repositories are always welcome and can be a quick way to get your |
| 59 | +fix or improvement slated for the next release. In general, PRs should: |
| 60 | + |
| 61 | +- Only fix/add the functionality in question **OR** address wide-spread |
| 62 | + whitespace/style issues, not both. |
| 63 | +- Add unit or integration tests for fixed or changed functionality |
| 64 | + (if a test suite already exists). |
| 65 | +- Address a single concern in the least number of changed lines as possible. |
| 66 | +- Include documentation in the repo or on our [docs site]. |
| 67 | +- Be accompanied by a complete Pull Request template (loaded automatically |
| 68 | + when a PR is created). |
| 69 | + |
| 70 | +For changes that address core functionality or would require breaking changes |
| 71 | +(e.g. a major release), it's best to open an Issue to discuss your proposal |
| 72 | +first. This is not required but can save time creating and reviewing changes. |
| 73 | + |
| 74 | +In general, we follow the [Forking Workflow]: |
| 75 | + |
| 76 | +1. Fork the repository to your own Github account |
| 77 | +2. Clone the project to your machine |
| 78 | +3. Create a branch locally with a succinct but descriptive name |
| 79 | +4. Commit changes to the branch |
| 80 | +5. Following any formatting and testing guidelines specific to this repo |
| 81 | +6. Push changes to your fork |
| 82 | +7. Open a PR in our repository and follow the PR template so that we can |
| 83 | + efficiently review the changes. |
| 84 | + |
| 85 | +We recommend that you add this repository as an [upstream remote] to your local |
| 86 | +git repository so that you can fetch the latest updates. |
| 87 | + |
| 88 | +On your local machine make sure you have the latest version of the `develop` |
| 89 | +branch from this upstream repository: |
| 90 | + |
| 91 | + git checkout develop |
| 92 | + git pull upstream develop |
| 93 | + |
| 94 | +### Setup Development Environment |
| 95 | + |
| 96 | +This project relies on Node tools and project-specific commands defined in |
| 97 | +[package.json] to streamline the development and testing. The command below will |
| 98 | +install the required development tools. |
| 99 | + |
| 100 | + npm ci |
| 101 | + |
| 102 | +### HTML Preview |
| 103 | + |
| 104 | +The command below builds and serves a preview of the HTML documentation of one |
| 105 | +of the APIs defined in this repository: |
| 106 | + |
| 107 | + npm run start --api=<name> |
| 108 | + |
| 109 | +where `<name>` is the name of one of the API folders included in |
| 110 | +[openapi/](openapi/) for which you want to see the HTML documentation. The HTML |
| 111 | +page will be available at http://localhost:8080. |
| 112 | + |
| 113 | +### Testing |
| 114 | + |
| 115 | +Before submitting a PR, please check that the content of the branch that you |
| 116 | +plan to submit passes with the tests defined for this project: |
| 117 | + |
| 118 | + npm run lint:all |
| 119 | + npm run validate --api=<name> |
| 120 | + |
| 121 | +where `<name>` is the name of the API folder in [openapi/](openapi/) that you |
| 122 | +want to test. |
| 123 | + |
| 124 | +## Release Procedure |
| 125 | + |
| 126 | +Maintainers are required to follow the procedure below when creating a new |
| 127 | +release. |
| 128 | + |
| 129 | +TBA |
| 130 | + |
| 131 | +## Getting Help |
| 132 | + |
| 133 | +Join us on the [NLP Sandbox Discord server] and post your question to the |
| 134 | +channel that best matches the topic of your request. |
| 135 | + |
| 136 | +<!-- Links --> |
| 137 | + |
| 138 | +[Code of Conduct]: https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md |
| 139 | +[upstream remote]: https://help.github.com/en/articles/configuring-a-remote-for-a-fork |
| 140 | +[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/ |
| 141 | +[docs site]: https://github.com/nlpsandbox/nlpsandbox-website-synapse |
| 142 | +[Forking Workflow]: https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow |
| 143 | +[package.json]: package.json |
| 144 | +[NLP Sandbox Discord server]: https://discord.gg/Zb4ymtF |
0 commit comments