Skip to content

Commit 1866cad

Browse files
author
arthosofteq
authored
Merge pull request #7 from RedisInsight/docs
Create required docs
2 parents 51fdcbf + 280626a commit 1866cad

File tree

5 files changed

+254
-98
lines changed

5 files changed

+254
-98
lines changed

CONDUCT

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
Contributor Covenant Code of Conduct
2+
Our Pledge
3+
We as members, contributors, and leaders pledge to make participation in our
4+
community a harassment-free experience for everyone, regardless of age, body
5+
size, visible or invisible disability, ethnicity, sex characteristics, gender
6+
identity and expression, level of experience, education, socio-economic status,
7+
nationality, personal appearance, race, religion, or sexual identity
8+
and orientation.
9+
We pledge to act and interact in ways that contribute to an open, welcoming,
10+
diverse, inclusive, and healthy community.
11+
Our Standards
12+
Examples of behavior that contributes to a positive environment for our
13+
community include:
14+
15+
* Demonstrating empathy and kindness toward other people
16+
* Being respectful of differing opinions, viewpoints, and experiences
17+
* Giving and gracefully accepting constructive feedback
18+
* Accepting responsibility and apologizing to those affected by our mistakes,
19+
and learning from the experience
20+
* Focusing on what is best not just for us as individuals, but for the
21+
overall community
22+
23+
Examples of unacceptable behavior include:
24+
25+
* The use of sexualized language or imagery, and sexual attention or
26+
advances of any kind
27+
* Trolling, insulting or derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others’ private information, such as a physical or email
30+
address, without their explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
Enforcement Responsibilities
35+
Community leaders are responsible for clarifying and enforcing our standards of
36+
acceptable behavior and will take appropriate and fair corrective action in
37+
response to any behavior that they deem inappropriate, threatening, offensive,
38+
or harmful.
39+
Community leaders have the right and responsibility to remove, edit, or reject
40+
comments, commits, code, wiki edits, issues, and other contributions that are
41+
not aligned to this Code of Conduct, and will communicate reasons for moderation
42+
decisions when appropriate.
43+
Scope
44+
This Code of Conduct applies within all community spaces, and also applies when
45+
an individual is officially representing the community in public spaces.
46+
Examples of representing our community include using an official e-mail address,
47+
posting via an official social media account, or acting as an appointed
48+
representative at an online or offline event.
49+
Enforcement
50+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
51+
reported to the community leaders responsible for enforcement at
52+
this email address: [email protected].
53+
All complaints will be reviewed and investigated promptly and fairly.
54+
All community leaders are obligated to respect the privacy and security of the
55+
reporter of any incident.
56+
Enforcement Guidelines
57+
Community leaders will follow these Community Impact Guidelines in determining
58+
the consequences for any action they deem in violation of this Code of Conduct:
59+
1. Correction
60+
Community Impact: Use of inappropriate language or other behavior deemed
61+
unprofessional or unwelcome in the community.
62+
Consequence: A private, written warning from community leaders, providing
63+
clarity around the nature of the violation and an explanation of why the
64+
behavior was inappropriate. A public apology may be requested.
65+
2. Warning
66+
Community Impact: A violation through a single incident or series
67+
of actions.
68+
Consequence: A warning with consequences for continued behavior. No
69+
interaction with the people involved, including unsolicited interaction with
70+
those enforcing the Code of Conduct, for a specified period of time. This
71+
includes avoiding interactions in community spaces as well as external channels
72+
like social media. Violating these terms may lead to a temporary or
73+
permanent ban.
74+
3. Temporary Ban
75+
Community Impact: A serious violation of community standards, including
76+
sustained inappropriate behavior.
77+
Consequence: A temporary ban from any sort of interaction or public
78+
communication with the community for a specified period of time. No public or
79+
private interaction with the people involved, including unsolicited interaction
80+
with those enforcing the Code of Conduct, is allowed during this period.
81+
Violating these terms may lead to a permanent ban.
82+
4. Permanent Ban
83+
Community Impact: Demonstrating a pattern of violation of community
84+
standards, including sustained inappropriate behavior, harassment of an
85+
individual, or aggression toward or disparagement of classes of individuals.
86+
Consequence: A permanent ban from any sort of public interaction within
87+
the community.
88+
Attribution
89+
This Code of Conduct is adapted from the Contributor Covenant,
90+
version 2.0, available at
91+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
92+
Community Impact Guidelines were inspired by Mozilla’s code of conduct
93+
enforcement ladder.
94+
For answers to common questions about this code of conduct, see the FAQ at
95+
https://www.contributor-covenant.org/faq. Translations are available at
96+
https://www.contributor-covenant.org/translations.

CONTRIBUTIONING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
Thank you for contributing! Pull requests are always welcome!
4+
5+
## Git Commits
6+
7+
Please ensure your commits are small and focused; they should tell a story of your change. This helps reviewers to follow your changes, especially for more complex changes.
8+
9+
10+
## Submitting an issue
11+
If you find a bug in the source code, you can help us by
12+
submit an issue to our [GitHub Repository](https://github.com/RedisInsight/RedisInsight)
13+
14+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
15+
16+
17+
## Github Pull Requests
18+
19+
Use the following procedure to submit a pull request:
20+
21+
a. Fork RedisInsight on github ( https://docs.github.com/en/github/getting-started-with-github/fork-a-repo )
22+
b. Create a topic branch (git checkout -b my_branch)
23+
c. Push to your branch (git push origin my_branch)
24+
d. Initiate a pull request on github ( https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request )
25+
e. Done :)
26+
27+
Before creating pull request please make sure that [tests](README.md#tests) are passing

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Server Side Public License
1+
Server Side Public License
22
VERSION 1, OCTOBER 16, 2018
33

44
Copyright © 2018 MongoDB, Inc.

README.md

Lines changed: 130 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,32 @@ Awesome Redis GUI written in Electron, NodeJS and React
66

77
## Directory Structure
88

9-
- `redisinsight/ui` - Contains the frontend code.
10-
- `redisinsight/api` - Contains the backend code.
9+
- `redisinsight/ui` - Contains the frontend code
10+
- `redisinsight/api` - Contains the backend code
1111
- `scripts` - Build scripts and other build-related files
1212
- `configs` - Webpack configuration files and other build-related files
13-
- `tests` - Contains the e2e and integration tests.
13+
- `tests` - Contains the e2e
1414

15-
## Development Workflow
15+
## Prerequisites
1616

17-
### Installation
17+
Make sure you have installed following packages:
18+
* [Node](https://nodejs.org/en/download/) >=14.x and <16
19+
* [yarn](https://www.npmjs.com/package/yarn) >=1.21.3
20+
21+
## Installation
22+
23+
Before development or build you have to install required dependencies
1824

1925
```bash
2026
$ yarn install
2127
$ yarn --cwd redisinsight/api/
2228
```
2329

24-
### Packaging the desktop app
30+
## Development
2531

26-
After you have installed all dependencies you can package the app.
27-
Run `yarn package:prod` to package app for the local platform:
32+
There are 2 ways to develop:
2833

29-
```bash
30-
# Production
31-
$ yarn package:prod
32-
```
33-
34-
And packaged installer will be in the folder _release_
35-
36-
### Running the desktop app
34+
### Developing using electron app
3735

3836
After you have installed all dependencies you can now run the app.
3937
Run `yarn start` to start an electron application that will watch and build for you.
@@ -43,32 +41,51 @@ Run `yarn start` to start an electron application that will watch and build for
4341
$ yarn start
4442
```
4543

46-
### Running frontend part of the app
44+
### Developing using web
4745

48-
After you have installed all dependencies you can now run the app.
49-
Run `yarn start:web` to start a local server that will watch and build for you.
46+
#### Running backend part of the app
47+
48+
Run `yarn --cwd redisinsight/api/ start:dev` to start a local API at `localhost:5000`.
5049

5150
```bash
5251
# Development
53-
$ yarn start:web
52+
$ yarn --cwd redisinsight/api/ start:dev
5453
```
5554

56-
### Running backend part of the app
55+
While the API is running, open your browser and navigate to http://localhost:5000/api/docs. You should see the Swagger UI.
56+
57+
#### Running frontend part of the app
5758

58-
After you have installed all dependencies run `yarn --cwd redisinsight/api/ start:dev` to start a local API at `localhost:5000`.
59+
Run `yarn start:web` to start a local server for UI.
5960

6061
```bash
6162
# Development
62-
$ yarn --cwd redisinsight/api/ start:dev
63+
$ yarn start:web
6364
```
6465

65-
While the API is running, open your browser and navigate to http://localhost:5000/api/docs. You should see the Swagger UI.
66+
Web interface will be available at http://localhost:8080
6667

67-
### Building frontend part of the app
68+
Now servers will watch for changes and automatically build for you
6869

69-
Run `yarn build:web` to build fronted to `/redisinsight/ui/dist/`.
70+
## Build
71+
72+
### Packaging the desktop app
7073

71-
## Docker
74+
#### Building statics for enablement area and default plugins
75+
76+
Run `yarn build:statics` or `yarn build:statics:win` for Windows
77+
78+
After you have installed all dependencies you can package the app.
79+
Run `yarn package:prod` to package app for the local platform:
80+
81+
```bash
82+
# Production
83+
$ yarn package:prod
84+
```
85+
86+
And packaged installer will be in the folder _./release_
87+
88+
### Create docker image
7289

7390
There are 2 different docker images available
7491

@@ -97,7 +114,7 @@ Example:
97114
docker run -p 5000:5000 -d --cap-add ipc_lock redisinsight
98115
```
99116

100-
Then api docs and main ui should be available on http://localhost/api/docs and http://localhost
117+
Then api docs and main ui should be available on http://localhost:5000/api/docs and http://localhost:5000
101118

102119
#### Build Docker with API only
103120

@@ -115,16 +132,95 @@ Example:
115132
docker run -p 5000:5000 -d --cap-add ipc_lock api.redisinsight
116133
```
117134

118-
Then api docs and main ui should be available on http://localhost/api/docs
135+
Then api docs and main ui should be available on http://localhost:5000/api/docs
136+
137+
## Tests
119138

120-
## Continuous Integration
139+
### Running frontend tests
121140

122-
## Related Repositories
141+
#### Run UI unit tests
123142

124-
## Running e2e tests in root tests/e2e
143+
```bash
144+
yarn test
145+
```
146+
147+
### Running backend tests
148+
149+
#### Run backend unit tests
150+
151+
```bash
152+
# Plain tests
153+
yarn --cwd redisinsight/api test
154+
155+
# Tests with coverage
156+
yarn --cwd redisinsight/api test:cov
157+
```
158+
159+
### Run backend integration tests (using local server)
160+
161+
```bash
162+
# Plain tests
163+
yarn --cwd redisinsight/api test:api
164+
165+
# Tests with coverage
166+
yarn --cwd redisinsight/api test:api:cov
167+
```
168+
169+
> **_NOTE_**: Using `yarn test:api*` scripts you should have redis server up and running.
170+
By default tests will look on `localhost:6379` without any auth
171+
To customize tests configs you should run test with proper environment variables
172+
173+
Example:
174+
175+
If you have redis server running on a different host or port `somehost:7777` with default user pass `somepass`
176+
177+
You should run test commands with such environment variables
178+
179+
```bash
180+
# Plain tests
181+
TEST_REDIS_HOST=somehost \
182+
TEST_REDIS_PORT=7777 \
183+
TEST_REDIS_PASSWORD-somepass \
184+
yarn --cwd redisinsight/api test:api
185+
```
186+
187+
You can find all possible environment variable available in the [constants.ts](redisinsight/api/test/helpers/constants.ts) file
188+
189+
### Run backend integration tests (using docker)
190+
191+
Here you should not care about tests and local redis database configuration
192+
193+
We will spin up server inside docker container and run tests over it
194+
195+
```bash
196+
# run this this command
197+
./redisinsight/api/test/test-runs/start-test-run.sh -r oss-st-6
198+
```
199+
- -r - is the Redis Test Environment name
200+
201+
We are supporting several test environments to run tests on various Redis databases:
202+
- **oss-st-5** - _OSS Standalone v5_
203+
- **oss-st-5-pass** - _OSS Standalone v5 with admin pass required_
204+
- **oss-st-6** - _OSS Standalone v6 and all modules_
205+
- **oss-st-6-tls** - _OSS Standalone v6 with TLS enabled_
206+
- **oss-st-6-tls-auth** - _OSS Standalone v6 with TLS auth required_
207+
- **oss-clu** - _OSS Cluster_
208+
- **oss-clu-tls** - _OSS Cluster with TLS enabled_
209+
- **oss-sent** - _OSS Sentinel_
210+
- **re-st** - _Redis Enterprise with Standalone inside_
211+
- **re-clu** - _Redis Enterprise with Cluster inside_
212+
213+
214+
### Running E2E tests
215+
216+
Install E2E tests deps
217+
218+
```bash
219+
yarn --cwd tests/e2e
220+
```
125221

126-
- To run E2E tests run command:
222+
Run E2E tests
127223

128224
```bash
129-
yarn test-chrome
225+
yarn --cwd tests/e2e test:chrome
130226
```

0 commit comments

Comments
 (0)