Skip to content

Commit

Permalink
The parrot's name is now Kesha
Browse files Browse the repository at this point in the history
  • Loading branch information
lowitea committed May 22, 2021
1 parent afecc86 commit 027c760
Show file tree
Hide file tree
Showing 39 changed files with 3,070 additions and 526 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ exclude =

application-import-names =
http_stubs,
parrot,
kesha,
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
with:
username: ${{ secrets.CI_DOCKER_HUB_USER }}
password: ${{ secrets.CI_DOCKER_HUB_TOKEN }}
repository: umahighload/parrot-app
repository: nextuptechnologies/kesha
tags: ${{ github.event.release.tag_name }}, latest
dockerfile: ./deploy/app/Dockerfile
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
postgres:
image: postgres:12.3
env:
POSTGRES_USER: parrot
POSTGRES_PASSWORD: parrot
POSTGRES_USER: kesha
POSTGRES_PASSWORD: kesha
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand All @@ -39,8 +39,8 @@ jobs:
- name: Run autotests
env:
PARROT_DB_HOST: postgres
PARROT_SECRET_KEY: secret
KESHA_DB_HOST: postgres
KESHA_SECRET_KEY: secret
run: |
poetry run pytest --cov=./ --cov-report=xml
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How to contribute

## First steps
1. Fork [our repo](https://github.com/Uma-Tech/parrot),
1. Fork [our repo](https://github.com/NUTtech/Kesha),
here's the [guide on forking](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
1. [Clone your new repo](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) (forked repo) to have a local copy of the code
1. Apply the required changes!
Expand Down Expand Up @@ -104,5 +104,5 @@ git flow init
git push origin master develop --follow-tags
```

1. [Create](https://github.com/Uma-Tech/parrot/releases/new)
1. [Create](https://github.com/NUTtech/Kesha/releases/new)
a new release specifying pushed tag
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright Uma.Media
Copyright Nut.Tech

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ lock-deps: ## Make poetry.lock
-f deploy/docker-compose.develop.yml \
${OVERRIDE} \
--project-directory . \
run --rm parrot-app poetry lock
run --rm kesha poetry lock

shell: ## Shell (bash) intro the app's container
docker-compose \
Expand All @@ -33,7 +33,7 @@ shell: ## Shell (bash) intro the app's container
-f deploy/docker-compose.develop.yml \
${OVERRIDE} \
--project-directory . \
run --rm parrot-app bash
run --rm kesha bash

autotests: ## Start project's tests on docker
docker-compose \
Expand All @@ -42,25 +42,25 @@ autotests: ## Start project's tests on docker
-f deploy/docker-compose.autotests.yml \
${OVERRIDE} \
--project-directory . \
run --rm parrot-app-tests
run --rm kesha-tests

lint: ## Start project's lint on docker
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
run --rm parrot-app \
run --rm kesha \
flake8 --count

build: ## Build docker image
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
build parrot-app
build kesha

envfile: ## Generate env file with variables with prefix PARROT_
$(shell env | egrep '^PARROT_' > .gen.env && echo '.gen.env has been generated' || touch .gen.env)
envfile: ## Generate env file with variables with prefix KESHA_
$(shell env | egrep '^KESHA_' > .gen.env && echo '.gen.env has been generated' || touch .gen.env)
$(shell test -f .env && cat .env > .gen.env)

runserver: envfile ## Local startup the app on docker with required services
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Parrot
# Kesha
_Web-service for testing http requests and webhooks._

Project info:
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/umahighload/parrot-app/latest)](https://registry.hub.docker.com/r/umahighload/parrot-app)
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/nextuptechnologies/kesha/latest)](https://registry.hub.docker.com/r/nextuptechnologies/kesha)
![Python Version](https://img.shields.io/static/v1?label=python&message=3.8&color=blue)
![License](https://img.shields.io/static/v1?label=license&message=Apache+2&color=blue)

Build:
![autotests](https://github.com/Uma-Tech/parrot/workflows/autotests/badge.svg)
![build](https://github.com/Uma-Tech/parrot/workflows/build/badge.svg)
![autotests](https://github.com/NUTtech/Kesha/workflows/autotests/badge.svg)
![build](https://github.com/NUTtech/Kesha/workflows/build/badge.svg)

Code quality:
[![codecov](https://codecov.io/gh/Uma-Tech/parrot/branch/develop/graph/badge.svg)](https://codecov.io/gh/Uma-Tech/parrot)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Uma-Tech/parrot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Uma-Tech/parrot/context:python)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Uma-Tech_parrot&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=Uma-Tech_parrot)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Uma-Tech_parrot&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=Uma-Tech_parrot)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Uma-Tech_parrot&metric=security_rating)](https://sonarcloud.io/dashboard?id=Uma-Tech_parrot)
[![codecov](https://github.com/NUTtech/Kesha/branch/develop/graph/badge.svg)](https://codecov.io/gh/NUTtech/Kesha)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/NUTtech/Kesha.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/NUTtech/Kesha/context:python)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=NUTtech_Kesha&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=NUTtech_Kesha)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=NUTtech_Kesha&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=NUTtech_Kesha)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=NUTtech_Kesha&metric=security_rating)](https://sonarcloud.io/dashboard?id=NUTtech_Kesha)

<br>
<br>
<br>

<p align="center">
<img src="https://github.com/Uma-Tech/parrot/raw/master/static/parrot_icon.png">
<img src="https://github.com/NUTtech/Kesha/raw/master/static/kesha_icon.png">
</p>

## Links:
1. Repository: [https://github.com/Uma-Tech/parrot](https://github.com/Uma-Tech/parrot)
1. Documentation: [https://uma-tech.github.io/parrot/](https://uma-tech.github.io/parrot/)
1. Docker Hub: [https://registry.hub.docker.com/r/umahighload/parrot-app](https://registry.hub.docker.com/r/umahighload/parrot-app)
1. Issue tracker: [https://github.com/Uma-Tech/parrot/issues](https://github.com/Uma-Tech/parrot/issues)
1. Changelog: [https://github.com/Uma-Tech/parrot/blob/develop/CHANGELOG.md](https://github.com/Uma-Tech/parrot/blob/develop/CHANGELOG.md)
1. Repository: [https://github.com/NUTtech/Kesha](https://github.com/NUTtech/Kesha)
1. Documentation: [https://nuttech.github.io/Kesha/](https://nuttech.github.io/Kesha/)
1. Docker Hub: [https://registry.hub.docker.com/r/nextuptechnologies/kesha](https://registry.hub.docker.com/r/nextuptechnologies/kesha)
1. Issue tracker: [https://github.com/NUTtech/Kesha/issues](https://github.com/NUTtech/Kesha/issues)
1. Changelog: [https://github.com/NUTtech/Kesha/blob/master/CHANGELOG.md](https://github.com/NUTtech/Kesha/blob/master/CHANGELOG.md)

## Components
1. Database postgres.
Expand All @@ -40,5 +40,5 @@ Code quality:
## Contributing
We welcome all contributions!
See [CONTRIBUTING.md](CONTRIBUTING.md) if you want to contribute.
You can start with [issues that need some help](https://github.com/Uma-Tech/parrot/issues)
You can start with [issues that need some help](https://github.com/NUTtech/Kesha/issues)
right now.
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from _pytest.fixtures import FixtureFunctionMarker

from parrot import celery_app
from kesha import celery_app

celery_app.conf['CELERY_ALWAYS_EAGER'] = True

Expand Down
2 changes: 1 addition & 1 deletion deploy/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN poetry config virtualenvs.create false && \
COPY ./ /app/src

# Build static
ARG PARROT_SECRET_KEY=no_secret
ARG KESHA_SECRET_KEY=no_secret
RUN /app/src/manage.py collectstatic --noinput

# Move scripts to /app
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/start-autotests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

wait-for-it "${PARROT_DB_HOST:-parrot-database}":5432 -s -t 180 \
wait-for-it "${KESHA_DB_HOST:-kesha-database}":5432 -s -t 180 \
&& pytest --cov
2 changes: 1 addition & 1 deletion deploy/app/start-django-dev.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

wait-for-it "${PARROT_DB_HOST:-parrot-database}":5432 -s -t 180 \
wait-for-it "${KESHA_DB_HOST:-kesha-database}":5432 -s -t 180 \
&& python /app/src/manage.py migrate --noinput \
&& python /app/src/manage.py runserver 0.0.0.0:8042
4 changes: 2 additions & 2 deletions deploy/app/start-django-uvicorn.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

wait-for-it "${PARROT_DB_HOST:-parrot-database}":5432 -s -t 180 \
wait-for-it "${KESHA_DB_HOST:-kesha-database}":5432 -s -t 180 \
&& python /app/src/manage.py migrate --noinput \
&& uvicorn parrot.asgi:application --host '0.0.0.0' --port 8042
&& uvicorn kesha.asgi:application --host '0.0.0.0' --port 8042
6 changes: 3 additions & 3 deletions deploy/docker-compose.autotests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ version: "3.8"

services:

parrot-app-tests:
image: umahighload/parrot-app:latest
kesha-tests:
image: nextuptechnologies/kesha:latest
volumes:
- ".:/app/src"
command: bash /app/start-autotests.sh
depends_on:
- "parrot-database"
- "kesha-database"
18 changes: 9 additions & 9 deletions deploy/docker-compose.db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@ version: "3.8"

services:

parrot-app:
kesha:
depends_on:
- "parrot-database"
- "kesha-database"

parrot-database:
kesha-database:
image: postgres:12.3
restart: unless-stopped
container_name: parrot-database
container_name: kesha-database
environment:
- POSTGRES_USER=parrot
- POSTGRES_PASSWORD=parrot
- POSTGRES_USER=kesha
- POSTGRES_PASSWORD=kesha
ports:
- "5432"
volumes:
- "${PARROT_DB_VOLUME:-db-volume}:/var/lib/postgresql/data"
- "${KESHA_DB_VOLUME:-db-volume}:/var/lib/postgresql/data"
networks:
app:
celery:

parrot-celery-broker:
kesha-celery-broker:
image: redis:6
restart: unless-stopped
container_name: parrot-celery-broker
container_name: kesha-celery-broker
networks:
app:
celery:
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-compose.develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:

parrot-app:
kesha:
command: bash /app/start-django-dev.sh
privileged: true
environment:
Expand Down
12 changes: 6 additions & 6 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.8"

x-service-base: &service-base
image: umahighload/parrot-app:${PARROT_APP_VERSION:-latest}
image: nextuptechnologies/kesha:${KESHA_VERSION:-latest}
restart: unless-stopped
env_file:
- .gen.env
Expand All @@ -11,19 +11,19 @@ x-service-base: &service-base

services:

parrot-app:
kesha:
<<: *service-base
container_name: parrot-app
container_name: kesha
command: bash /app/start-django-uvicorn.sh
ports:
- "8042:8042"
networks:
app:

parrot-celery-worker:
kesha-celery-worker:
<<: *service-base
container_name: parrot-celery-worker
command: celery -A parrot worker -l INFO -c 8
container_name: kesha-celery-worker
command: celery -A kesha worker -l INFO -c 8
networks:
celery:

Expand Down
2 changes: 1 addition & 1 deletion docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["lowit"]
language = "en"
multilingual = false
src = "src"
title = "Parrot"
title = "Kesha"

[output.html]
theme = "src/theme"
4 changes: 2 additions & 2 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Summary
# Parrot
# Kesha

- [About Parrot!](index.md)
- [About Kesha!](index.md)
- [Quick Start](quick-start/index.md)
- [System requires](quick-start/system-requires.md)
- [Local run](quick-start/local-run.md)
Expand Down
24 changes: 12 additions & 12 deletions docs/src/quick-start/local-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Quickstart (with Docker)
1. Clone the repo
```shell
git clone git@github.com:Uma-Tech/parrot.git
cd parrot
git clone git@github.com:NUTtech/Kesha.git
cd Kesha
```

1. Build or download the docker image
Expand All @@ -14,7 +14,7 @@
```
_for download_
```shell script
docker pull umahighload/parrot-app:latest
docker pull nextuptechnologies/kesha:latest
```

1. Apply migrations and create a superuser:
Expand All @@ -36,8 +36,8 @@
## Start the project for development without Docker
1. Clone the repo and go to the project directory
```shell
git clone git@github.com:Uma-Tech/parrot.git
cd parrot
git clone git@github.com:NUTtech/Kesha.git
cd Kesha
```

1. Install dependencies
Expand All @@ -53,10 +53,10 @@
--name postgres \
-d \
--rm \
-e POSTGRES_PASSWORD=parrot \
-e POSTGRES_USER=parrot \
-e POSTGRES_PASSWORD=kesha \
-e POSTGRES_USER=kesha \
--network host \
-v parrot_db:/var/lib/postgresql/data \
-v kesha_db:/var/lib/postgresql/data \
postgres
# start redis
Expand All @@ -70,9 +70,9 @@

1. Setting required environment variables
```shell
export PARROT_DB_HOST=127.0.0.1
export PARROT_SECRET_KEY=NO_SECRET
export PARROT_CELERY_BROKER_URL=redis://127.0.0.1
export KESHA_DB_HOST=127.0.0.1
export KESHA_SECRET_KEY=NO_SECRET
export KESHA_CELERY_BROKER_URL=redis://127.0.0.1
```
_Alternatively, you can create a local `.env` file with the variables_

Expand All @@ -99,5 +99,5 @@
1. Start the celery worker
_Run in a separate terminal window_
```shell
poetry run celery -A parrot worker -l INFO -c 4
poetry run celery -A kesha worker -l INFO -c 4
```
2 changes: 1 addition & 1 deletion docs/src/usage/request-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For more examples, see the official documentation [https://requests.readthedocs.

### Parsing the request body in json format
For example, use the preset variable `request_body`.
`request_body` is a variable containing a body of the request received by Parrot.
`request_body` is a variable containing a body of the request received by Kesha.
```python
parsed_data = json.loads(request_body)
requests.post(
Expand Down
Binary file modified docs/theme/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 027c760

Please sign in to comment.