Skip to content

Commit

Permalink
Merge pull request #207 from salabs/develop
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
turso authored Jun 15, 2021
2 parents 2e2e871 + 56c8596 commit e2b45c9
Show file tree
Hide file tree
Showing 271 changed files with 6,219 additions and 4,629 deletions.
6 changes: 6 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ This code of conduct applies to Epimetheus GitHub space. This includes issue tra
If you believe someone is violating the code of conduct, we ask that you report it by sending feedback using [feedback form](https://siili.com/salabs).

* Be friendly and patient.

* Be welcoming. We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.

* Be considerate. Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.

* Be respectful. Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the Epimetheus community should be respectful when dealing with other members as well as with people outside the Epimetheus community.

* Be careful in the words that you choose. We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:

* Violent threats or language directed against another person.
* Discriminatory jokes and language.
* Posting sexually explicit or violent material.
Expand All @@ -23,6 +28,7 @@ If you believe someone is violating the code of conduct, we ask that you report
* Unwelcome sexual attention.
* Advocating for, or encouraging, any of the above behavior.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.

* When we disagree, try to understand why. Disagreements, both social and technical, happen all the time and Epimetheus is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of Epimetheus comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.

Original text courtesy of the [Speak Up! project](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html).
Expand Down
74 changes: 58 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ As an open source project, Epimetheus welcomes contributions of many forms.

Examples of contributions include:

* Code patches
* Documentation improvements
* Bug reports and patch reviews
- Code patches
- Documentation improvements
- Bug reports and patch reviews

Patches can be submitted as pull requests, but if you don't file an issue, it may be ignored. Please file an issue to suggest changes.

## Branch naming and commit messages
Please start a new branch name with ```feature```, ```bug``` or ```hotfix``` depending on the type of the issue, and then add the related issue's number. The rest of the branch’s name should be short and descriptive.<br>
Please start a new branch name with `feature`, `bug` or `hotfix` depending on the type of the issue, and then add the related issue's number. The rest of the branch’s name should be short and descriptive.<br>
**Example:**
>```“feature/21-more-documentation”```
> `“feature/21-more-documentation”`
Commit messages should always start with the number of the issue that they're related to. Please avoid commits that are not related to any issue.
- If you have a small fix that's somehow related to the current issue on hand, feel free to fix it as well.
Expand All @@ -22,7 +22,7 @@ Commit messages should always start with the number of the issue that they're re
- Small and general fixes like correcting a typo or updating the documentation don't require an issue number.

## Pull requests
Before making a pull request, please rebase the local branch to the [```develop```](https://github.com/salabs/Epimetheus/tree/develop) branch and squash any unnecessary commits.
Before making a pull request, please rebase the local branch to the [`develop`](https://github.com/salabs/Epimetheus/tree/develop) branch and squash any unnecessary commits.

Pull request's title should contain the related issue's number, and the pull request should be linked to the related issue.

Expand All @@ -39,36 +39,78 @@ Epimetheus project uses [EditorConfig](https://editorconfig.org/) to manage the
for settings.

## Release strategy
Project uses semantic versioning, and all the pull requests are first created in to ```develop``` branch. Releases are done regularly when there are new commits in the development branch. The releases are done with a merge commit that has release version numbering in semantic order (Major, Minor, Patch) (Semantic versioning: <https://semver.org/>)
Project uses semantic versioning, and all the pull requests are first created in to `develop` branch. `develop` is our trunk branch and can be considered the bleeding edge. `master` branch is for our stable semantically versioned releases. Releases are done regularly when there are new commits in the development branch. The releases are done with a merge commit that has release version numbering in semantic order (Major, Minor, Patch) (Semantic versioning: <https://semver.org/>)

![image](./release_strategy.png)

## Step-by-step example of contributing
1. Checkout to ```develop``` branch:
```
1. Checkout to `develop` branch:
```bash
git checkout develop
```

2. Checkout to a new branch and name it according to the issue's type and number:
```
```bash
git checkout -b <issuetype/issuenumber-description>
```

3. Commit changes with a clear and descriptive note that starts with the issue number:
```
```bash
git add
git commit -m "issuenumber - description of changes"
```
4. Sync with ```develop``` branch:
```

4. Sync with `develop` branch:
```bash
git checkout develop
git pull
```
5. Rebase the ```develop``` branch into the local branch. Use ```--interactive/--i``` flag to reword or squash commits:
```

5. Rebase the `develop` branch into the local branch. Use `--interactive/--i` flag to reword or squash commits:
```bash
git checkout <issuetype/issuenumber-description>
git rebase develop
```

6. Push the local branch:
```bash
git push
```

7. Create a pull request and follow the given guidelines. Make sure the `base` is set to `develop`.

## Step-by-step example of making new release
1. Checkout to ```develop``` branch:
```bash
git checkout master
git pull
git checkout develop
git pull
```

2. Check what has changed since previous release. This command shows the commit message oneliners since previous release:
```bash
git log --pretty=%s master..HEAD
```

3. Based on the changes determine the correct version version bump (`major`/`minor`/`patch`). Usually with new features it is `minor`. This command updates the version number for the npm package.
```bash
npm version minor
```

4. Update the same version in backend in `backend_server/server.py`: `VERSION_NUMBER`

5. Update Release notes in `README.md`. You can first broadly characterize the changes and then list the features (i.e. copy the output of `git log --pretty=%s master..HEAD`).

6. Commit the changes
```bash
git add -u
git commit -m "release x.x.x"
```

7. Push the changes and make a pull request to `master`
```bash
git push
```
7. Create a pull request and follow the given guidelines. Make sure the ```base``` is set to ```develop```.

8. Once the release has been merge make a [new Github release](https://github.com/salabs/Epimetheus/releases/new) that will also tag the commit. Set the tag as the new version and make sure it points to current master. Release title is the version. Copy the list of changes to the release notes area below. If issue numbers are prefixed with `#` Github will add a handy link to the corresponding issue. Finally publish release.
9 changes: 5 additions & 4 deletions README-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Alternative way to run project is using docker-compose with provided configurati
### Docker environmental variables

Project uses following variables to access database:
```

```dosini
DATABASE=database_name
HOST=database_server_name
USER=database_user
Expand All @@ -19,7 +20,7 @@ Alternative way is to save these in docker-compose.yml file.

### Running docker-compose

In windows 10 powershell, you can command docker-compose with the following syntax:
In Windows 10 powershell, you can command docker-compose with the following syntax:

`$env:ENV_FILE="configfile.env"; docker-compose -f .\docker-compose.yml up --build`

Expand All @@ -29,12 +30,12 @@ Frontend runs on: [http://localhost:3000](http://localhost:3000/)

[Dockerfile-prod](./frontend/Dockerfile-prod) has two build arguments; `nginx_port` and `backend_url` with default values `8080` and `http://backend-server:5000`.
The `nginx_port` argument configures the port which the Ngnix service runs inside the Docker and the `backend_url` argument tells the Nginx service
where to route backend server requests. This arguments can be configured when building the Docker image.
where to route backend server requests. These arguments can be configured when building the Docker image.

### Running docker-compose with public images

There are also prebuilt images that you can use by running the command. The yml files for different deployments are located under the deployment-templates folder.

`$env:ENV_FILE="configfile.env"; docker-compose -f .\docker-compose-from-remote.yml up --build`

Note that currently the public images are built with the default arguements as defined in the chapter before.
Note that currently the public images are built with the default arguments as defined in the chapter before.
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Epimetheus Introduction
# Epimetheus Introduction

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2540205769b54d6ab25426c2158a2f70)](https://app.codacy.com/gh/salabs/Epimetheus?utm_source=github.com&utm_medium=referral&utm_content=salabs/Epimetheus&utm_campaign=Badge_Grade_Dashboard)

Expand All @@ -8,20 +8,20 @@ Epimetheus offers a dashboard/UI to visualize data from [TestArchiver](https://g

### Requirements

1. PostgreSQL database with archived result data
2. `Python v3+`
3. `Node.js v10+`
> 1. PostgreSQL database with archived result data
> 2. `Python v3+`
> 3. `Node.js v10+`
### Database

Currently the only supported database engine is PostgreSQL. It can be local or cloud version.
Currently, the only supported database engine is PostgreSQL. It can be local or cloud version.

### Backend

If you have multiple python installations on your machine, remember to use the 'python3' postfix,
also with pip you might need to use 'pip3' to make sure the requirements get installed with the right python.

```
```bash
cd backend-server
pip install -r requirements.txt
python .\server.py --database dbname --host dbhost --user dbuser --pw dbpasswd --port 5000
Expand All @@ -31,7 +31,7 @@ Detailed information in [backend readme](backend_server/README.md).

### Frontend

```
```bash
cd frontend
npm install
npm run start
Expand All @@ -46,6 +46,7 @@ Once you have both frontend and backend running, you can open your browser to [h
Note that there should be some data saved in the database before user interface will show something. For pushing data into database, consult [TestArchiver documentation](https://github.com/salabs/TestArchiver).

## Installation with docker

Running project with [Docker](/README-docker.md)

## Browser Support
Expand All @@ -66,6 +67,18 @@ Supported browsers are "all modern browsers". This means IE and some mobile brow

## Release Notes

- 1.2.0 (2021-06-14)

- Compare page
- Team Name API
- Team filter to series and team API
- Refactoring frontend application state usage
- Unify different component styles
- Contribution and release documentation updates
- Bug fixes:
- <p>#177 offset button reset</p>
- <p>#174 Wrong build status when first fails and rerun passes</p>

- 1.1.0 (2021-03-12)

- Simple build results API
Expand All @@ -75,12 +88,12 @@ Supported browsers are "all modern browsers". This means IE and some mobile brow
- Style and file name refactoring
- Dockerhub publishing for new releases
- Features:
* #141 Style and refactor the keyword analysis table enhancement
* #138 Fix various bugs caused by the grid bug
* #137 Simple single build results API enhancement
* #135 Keyword execution time analysis tool enhancement
* #133 Accessibility fix for checkbox bug
* #131 Check color usage enhancement
- <p>#141 Style and refactor the keyword analysis table enhancement</p>
- <p>#138 Fix various bugs caused by the grid bug</p>
- <p>#137 Simple single build results API enhancement</p>
- <p>#135 Keyword execution time analysis tool enhancement</p>
- <p>#133 Accessibility fix for checkbox bug</p>
- <p>#131 Check color usage enhancement</p>

- 1.0.1 (2020-10-21)

Expand Down
14 changes: 7 additions & 7 deletions backend_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ Python server that connects to database and provides data for frontend.

## Database

Currently the only supported database engine is PostgreSQL. It can be local or cloud version.
Currently, the only supported database engine is PostgreSQL. It can be local or cloud version.

The database should also be initailized and some results archived before the backend server can start serving data.
The database should also be initialized, and some results archived before the backend server can start serving data.

## Running natively with python

First make sure you have `python` and `pip` installed.

Install required pip packages:

```
```bash
pip install -r .\requirements.txt
```

Start python server with environment variables:

```
```bash
python .\server.py --database dbname --host dbhost --user dbuser --pw dbpasswd --port 5000
```

Expand All @@ -30,11 +30,11 @@ If you want to use other port than 5000, set it with `--port` parameter. Note th

## Running in Docker

Use the provided [Dockerfile](Dockerfile) to run python server in container.
Use the provided [Dockerfile](Dockerfile) to run python server in a container.

Docker environment should contain values for following parameters:

```
```dosini
DATABASE: database name
HOST: database host
USER: database user
Expand All @@ -44,7 +44,7 @@ PORT: server port

## Swagger API docs

Backend API has swagger documentation available and it can be viewed at [localhost:5000/data/doc/](http://localhost:5000/data/doc) (with direct access to backend) or proxied through frontend server [localhost:3000/data/doc/](http://localhost:3000/data/doc). It uses [tornado-swagger](https://github.com/mrk-andreev/tornado-swagger).
Backend API has swagger documentation available, and it can be viewed at [localhost:5000/data/doc/](http://localhost:5000/data/doc) (with direct access to backend) or proxied through frontend server [localhost:3000/data/doc/](http://localhost:3000/data/doc). It uses [tornado-swagger](https://github.com/mrk-andreev/tornado-swagger).

Documentation is located in [server.py](server.py).

Expand Down
20 changes: 16 additions & 4 deletions backend_server/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ def __init__(self, host, dbport, dbname, user, password):

self.session = queries.TornadoSession(connection_uri)

def test_series(self, series_id=None):
return self.session.query(sql_queries.test_series(series=series_id)), list_of_dicts
def team_names(self):
return self.session.query(sql_queries.TEAM_NAMES), list_of_values

def teams(self):
def test_series(self, series_id=None, team=None):
sql = sql_queries.test_series(series=series_id, team=team)
return self.session.query(sql, {'team': team}), list_of_dicts

def teams(self, team=None):
def series_by_team(rows):
all_series = list_of_dicts(rows)
teams = []
Expand All @@ -60,7 +64,8 @@ def series_by_team(rows):
if current_team:
teams.append(current_team)
return teams
return self.session.query(sql_queries.test_series(by_teams=True)), series_by_team
sql = sql_queries.test_series(by_teams=True, team=team)
return self.session.query(sql, {'team': team}), series_by_team

def history_page_data(self, test_series, start_from, num_of_builds, offset):
history_sql = sql_queries.history_page_data(test_series, start_from, num_of_builds, offset)
Expand Down Expand Up @@ -127,6 +132,13 @@ def list_of_dicts(rows):
def single_dict(rows):
return list_of_dicts(rows)[0] if rows else None

def list_of_values(rows):
results = []
for row in rows:
values = [row[key] for key in row]
results.append(values if len(values) > 1 else values[0])
return results

def history_data(history_rows):
suites = []
current_suite = None
Expand Down
Loading

0 comments on commit e2b45c9

Please sign in to comment.