diff --git a/.flake8 b/.flake8 index 23d98e4..0091fb3 100644 --- a/.flake8 +++ b/.flake8 @@ -90,4 +90,4 @@ exclude = application-import-names = http_stubs, - parrot, + kesha, diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7269961..652d543 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3563c8..51d1e27 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e290eba..a6e0af7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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! @@ -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 diff --git a/LICENSE b/LICENSE index f66b9c2..9dd7d51 100644 --- a/LICENSE +++ b/LICENSE @@ -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. diff --git a/Makefile b/Makefile index 87da5e8..35b026a 100644 --- a/Makefile +++ b/Makefile @@ -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 \ @@ -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 \ @@ -42,14 +42,14 @@ 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 @@ -57,10 +57,10 @@ build: ## Build docker image -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 diff --git a/README.md b/README.md index f9a7bf0..b7beb2b 100644 --- a/README.md +++ b/README.md @@ -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)


- +

## 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. @@ -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. diff --git a/conftest.py b/conftest.py index 5b6fd51..ef60222 100644 --- a/conftest.py +++ b/conftest.py @@ -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 diff --git a/deploy/app/Dockerfile b/deploy/app/Dockerfile index 582fcf8..ff6f574 100644 --- a/deploy/app/Dockerfile +++ b/deploy/app/Dockerfile @@ -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 diff --git a/deploy/app/start-autotests.sh b/deploy/app/start-autotests.sh index 7005f31..d3c8dc5 100755 --- a/deploy/app/start-autotests.sh +++ b/deploy/app/start-autotests.sh @@ -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 diff --git a/deploy/app/start-django-dev.sh b/deploy/app/start-django-dev.sh index a01796c..55cbe0b 100755 --- a/deploy/app/start-django-dev.sh +++ b/deploy/app/start-django-dev.sh @@ -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 diff --git a/deploy/app/start-django-uvicorn.sh b/deploy/app/start-django-uvicorn.sh index 988b79c..873a827 100755 --- a/deploy/app/start-django-uvicorn.sh +++ b/deploy/app/start-django-uvicorn.sh @@ -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 diff --git a/deploy/docker-compose.autotests.yml b/deploy/docker-compose.autotests.yml index d81ceb3..dc19323 100644 --- a/deploy/docker-compose.autotests.yml +++ b/deploy/docker-compose.autotests.yml @@ -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" diff --git a/deploy/docker-compose.db.yml b/deploy/docker-compose.db.yml index 27b23ac..de7a7d8 100644 --- a/deploy/docker-compose.db.yml +++ b/deploy/docker-compose.db.yml @@ -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: diff --git a/deploy/docker-compose.develop.yml b/deploy/docker-compose.develop.yml index 31f6144..768f184 100644 --- a/deploy/docker-compose.develop.yml +++ b/deploy/docker-compose.develop.yml @@ -2,7 +2,7 @@ version: "3.8" services: - parrot-app: + kesha: command: bash /app/start-django-dev.sh privileged: true environment: diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index c0dd2e9..e9072a9 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -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 @@ -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: diff --git a/docs/book.toml b/docs/book.toml index 4cec6fa..37bcd7d 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -3,7 +3,7 @@ authors = ["lowit"] language = "en" multilingual = false src = "src" -title = "Parrot" +title = "Kesha" [output.html] theme = "src/theme" diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 162f35f..7d95665 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -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) diff --git a/docs/src/quick-start/local-run.md b/docs/src/quick-start/local-run.md index a5474f7..5e655ab 100644 --- a/docs/src/quick-start/local-run.md +++ b/docs/src/quick-start/local-run.md @@ -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 @@ -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: @@ -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 @@ -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 @@ -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_ @@ -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 ``` diff --git a/docs/src/usage/request-scripts.md b/docs/src/usage/request-scripts.md index 67b7f03..6161331 100644 --- a/docs/src/usage/request-scripts.md +++ b/docs/src/usage/request-scripts.md @@ -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( diff --git a/docs/theme/favicon.png b/docs/theme/favicon.png index b360d69..4c4fe26 100644 Binary files a/docs/theme/favicon.png and b/docs/theme/favicon.png differ diff --git a/docs/theme/favicon.svg b/docs/theme/favicon.svg index a360d33..141f270 100644 --- a/docs/theme/favicon.svg +++ b/docs/theme/favicon.svg @@ -1,8 +1,1188 @@ - - - -