|
1 | | -# Development |
| 1 | +# Contributing Guide |
2 | 2 |
|
3 | | -To explore the source code, start with [src/App.tsx](./src/App.tsx). |
| 3 | +Welcome! There are many ways to contribute, including submitting bug |
| 4 | +reports, improving documentation, submitting feature requests, reviewing |
| 5 | +new submissions, or contributing code that can be incorporated into the |
| 6 | +project. |
4 | 7 |
|
5 | | -## How to run |
| 8 | +## Review process |
6 | 9 |
|
7 | | -After having cloned the Rentgen repository, run the following commands at the root directory: |
| 10 | +For any **significant** changes please create a new GitHub issue and |
| 11 | +enhancements that you wish to make. Describe the feature you would like |
| 12 | +to see, why you need it, and how it will work. Discuss your ideas |
| 13 | +transparently and get community feedback before proceeding. |
| 14 | + |
| 15 | +Small changes can directly be crafted and submitted to the GitHub |
| 16 | +Repository as a Pull Request. This requires creating a **repo fork** using |
| 17 | +[instruction](https://docs.github.com/en/get-started/quickstart/fork-a-repo). |
| 18 | + |
| 19 | +## Initial setup for local development |
| 20 | + |
| 21 | +### Install Git |
| 22 | + |
| 23 | +Please follow |
| 24 | +[instruction](https://docs.github.com/en/get-started/quickstart/set-up-git). |
| 25 | + |
| 26 | +### Clone the repo |
| 27 | + |
| 28 | +Open terminal and run these commands: |
| 29 | + |
| 30 | +```bash |
| 31 | +git clone [email protected]:myuser/data-rentgen-ui.git |
| 32 | + |
| 33 | +cd data-rentgen-ui |
| 34 | +``` |
| 35 | + |
| 36 | +### Setup environment |
| 37 | + |
| 38 | +To install all necessary dependencies, run these commands: |
8 | 39 |
|
9 | 40 | ```bash |
10 | 41 | npm ci |
| 42 | +npm run pre-commit-install |
| 43 | +``` |
| 44 | + |
| 45 | +# How to |
| 46 | + |
| 47 | +## Run development server |
| 48 | + |
| 49 | +```bash |
11 | 50 | npm run dev |
12 | 51 | ``` |
13 | 52 |
|
14 | | -These commands will install dependencies and launch the dev server, by going to localhost:3000 you can go to the Rentgen UI interface. |
| 53 | +### Create pull request |
| 54 | + |
| 55 | +Commit your changes: |
| 56 | + |
| 57 | +```bash |
| 58 | +git commit -m "Commit message" |
| 59 | +git push |
| 60 | +``` |
| 61 | + |
| 62 | +Then open Github interface and [create pull request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-a-pull-request). |
| 63 | +Please follow guide from PR body template. |
15 | 64 |
|
16 | | -## How to format code |
| 65 | +After pull request is created, it get a corresponding number, e.g. 123 |
| 66 | +(`pr_number`). |
17 | 67 |
|
18 | | -Run the following command at the root directory: |
| 68 | +## Release Process |
| 69 | + |
| 70 | +Note: this is only for repo maintainers |
| 71 | + |
| 72 | +0. Checkout to ``develop`` branch and update it to the actual state |
19 | 73 |
|
20 | 74 | ```bash |
21 | | -npm run prettier-format |
| 75 | +git checkout develop |
| 76 | +git pull -p |
22 | 77 | ``` |
23 | 78 |
|
24 | | -## How to run linters |
| 79 | +1. Merge ``develop`` branch to ``master``, **WITHOUT** squashing |
25 | 80 |
|
26 | | -Run the following command at the root directory: |
| 81 | +```bash |
| 82 | +git checkout master |
| 83 | +git pull |
| 84 | +git merge develop |
| 85 | +git push |
| 86 | +``` |
| 87 | + |
| 88 | +2. Add git tag to the latest commit in ``master`` branch |
27 | 89 |
|
28 | 90 | ```bash |
29 | | -npm run lint |
| 91 | +git tag "$VERSION" |
| 92 | +git push origin "$VERSION" |
30 | 93 | ``` |
31 | 94 |
|
32 | | -## How to install pre-commit hooks |
| 95 | +VERSION should be the same as for backend. |
| 96 | + |
| 97 | +3. Update version in ``develop`` branch **after release**: |
33 | 98 |
|
34 | 99 | ```bash |
35 | | -npm run pre-commit-install |
| 100 | +sed -i "s#\"version\": \"[[:digit:]]\.[[:digit:]]\.[[:digit:]]\"#\"version\": \"$VERSION\"#" package.json package-lock.json |
| 101 | +npm i |
36 | 102 | ``` |
0 commit comments