-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
462 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Open Targets Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at support@targetvalidation.org. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# How do I make a contribution? | ||
|
||
👍🎉 **First off, thanks for taking the time to read this and contribute!** 🎉👍 | ||
|
||
Open Targets follows the usual open source project conventions for external contributions. Here is a quick rundown: | ||
|
||
1. Find an [issue](https://github.com/opentargets/platform/issues?q=is%3Aissue+is%3Aopen) you are interested in addressing or a [feature](https://github.com/opentargets/platform/labels/Kind%3A%20New%20feature) you would like to help building in the [issue tracker repo](https://github.com/opentargets/platform). Consider posting in the issue to inform us about the work you are doing. | ||
|
||
2. Fork the relevant repository to your GitHub account. Take a look at the [Development](../README.md#development) section of the readme for more information on how to get the development environment started. | ||
|
||
3. Create a new branch for your work using `git checkout -b branch-name-here`. | ||
|
||
4. Work on your contribution. Be sure to read the [guidelines](#guidelines) to stay on course with our best practices. | ||
|
||
5. When you are done, open a pull request (PR) in the original repository: | ||
|
||
- **The title** should be a short description of the changes made and the issue or bug number associated with your change. For example, you can title a pull request like so: "Removed dollar sign from links to resolve [opentargets/platform#1098](https://github.com/opentargets/platform/issues/1098)". | ||
|
||
- In **the description** of the pull request, explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It's OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it! | ||
|
||
6. Wait for the pull request to be reviewed by a maintainer. | ||
|
||
7. Make changes to the pull request if the reviewing maintainer recommends them. | ||
|
||
8. Celebrate your success after your pull request is merged! | ||
|
||
## <a name="guidelines"></a> General guidelines for contributing | ||
|
||
1. A PR must address a single issue or feature. | ||
2. There must always be an issue number associated with the PR (in the title or description). | ||
3. Only one commit per PR\*. | ||
4. Commit message should include the issue number. | ||
5. The branch should be rebased on `alpha` before opening the PR. | ||
6. No changes to code not directly related to your PR. | ||
7. Includes documentation. | ||
|
||
**\*** This limitation is enforced on most PRs. A large feature or an issue which pertain different logical units can have more than one commit; but the general rule is one issue per PR, one commit per PR. | ||
|
||
## Coding conventions | ||
|
||
We are using [prettier v1.15.1](https://prettier.io/). Setting this up should mostly get you on the right track. Also, if you are using [Visual Studio Code](https://code.visualstudio.com/), you can install the [prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) which enables you to automatically format your code on save. | ||
|
||
# I have questions! | ||
|
||
If you have any questions about contributing to Open Targets Platform you can head to our [Slack](https://opentargets-dev.slack.com/archives/C02UV8545), or post in the [issue tracker repo](https://github.com/opentargets/platform/issues). | ||
|
||
Try to ask your question so it's as easy to answer as possible. If you're not sure how to do that these are some good guides: | ||
|
||
- https://opensource.com/life/16/10/how-ask-technical-questions | ||
|
||
- http://www.catb.org/esr/faqs/smart-questions.html | ||
|
||
# What does the Code of Conduct mean for me? | ||
|
||
Our [Code of Conduct](docs/CODE_OF_CONDUCT.md) means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code. | ||
|
||
# Acknowledgements | ||
|
||
This contributor guidelines document is based on: | ||
|
||
- [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct/) | ||
- [PurpleBooth/Good-CONTRIBUTING.md-template.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) | ||
- [QMK Firmware CONTRIBUTING.md](https://github.com/qmk/qmk_firmware/blob/master/docs/contributing.md) | ||
- [Red Hat Keycloak CONTRIBUTING.md](https://github.com/keycloak/keycloak/blob/master/CONTRIBUTING.md) |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Extending and customising the platform app | ||
|
||
## Section structure | ||
|
||
The target profile tab of the target page is broken up into sections. Each of these sections is encapsulated in one directory. To add a new one, try to follow the following layout guide: | ||
|
||
``` | ||
target/ | ||
sections/ | ||
... | ||
<section-id>/ | ||
custom/ | ||
... // it may help to put any other components you create here, | ||
// to keep them separate from the template/expected ones below | ||
Description.js | ||
index.js | ||
Section.js | ||
sectionQuery.gql [OPTIONAL] | ||
Summary.js | ||
summaryQuery.gql [OPTIONAL] | ||
``` | ||
|
||
The `index.js` file should have a structure as follows: | ||
|
||
```js | ||
// helps to load graphql files | ||
import { loader } from 'graphql.macro'; | ||
|
||
// the name of your new section | ||
export const id = '<section-id>'; | ||
// the nice name you want for your new section | ||
export const name = '<section-name>'; | ||
|
||
// a function of the response of summaryQuery, to determine whether there is data for this target (and therefore whether to load the detail or not) | ||
export const hasSummaryData = <function>; | ||
|
||
// (optional) queries against platform-api, the new graphql api | ||
export const summaryQuery = loader('./summaryQuery.gql'); | ||
export const sectionQuery = loader('./sectionQuery.gql'); | ||
|
||
// react components to render the data: | ||
// typically a string, above the main content section, but could have links | ||
export { default as DescriptionComponent } from './Description'; | ||
// typically a string, in the summary widget, but could be more complex | ||
export { default as SummaryComponent } from './Summary'; | ||
// the main content section | ||
export { default as SectionComponent } from './Section'; | ||
|
||
``` | ||
|
||
The same structure is followed on the disease and drug pages. Any components that you want to reuse can be placed in the `common` directory. | ||
|
||
## Customisation | ||
|
||
To customise the platform app: | ||
|
||
- Clone this repository. | ||
- Create a directory somewhere outside this repository where you will put your customisation files. | ||
- Add an environment variable called `$CUSTOMISATIONS_DIR` that points to the directory created in the step above. | ||
- Inside your customisation directory you can overwrite or add new files following the same directory structure as `src/public`. | ||
- When developing new customisations, you can use the `yarn start:customise` script inside this repository to see your customisations reflected | ||
in the app while developing. When done developing customisations, run the `yarn reset` command. | ||
- For production, you can produce a build containing the customisations by running the `yarn build:customise` script. This will create a `build` | ||
directory that you can deploy. |
Oops, something went wrong.