Skip to content

Commit

Permalink
release: v0.0.7 (#34)
Browse files Browse the repository at this point in the history
* docs: OpenApi Specification (#9)

* chore: Update docker-compose (#12)

* chore: Add missing env variables and services to docker-compose

* chore: Use worker default env variables

* ci: Linter and formatter (#14)

* chore: Add recommended vscode extensions

* chore(deps): Install black formatter and ruff linter

* style: Lint and format files

* docs: Add linting and formatting commands to README

* ci: Add linter and style checks to integration pipeline

* feat: endpoint login (#15)

* feat: endpoint challenge (#33)

---------

Co-authored-by: Antonio Donis <[email protected]>
Co-authored-by: Pedro Andrés Chaparro Quintero <[email protected]>
  • Loading branch information
3 people authored Oct 8, 2023
1 parent f200835 commit 45d3519
Show file tree
Hide file tree
Showing 23 changed files with 957 additions and 69 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Integration

on:
pull_request:
branches: ["dev"]

jobs:
check-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Check format
run: black --check .

check-linter:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Check linter
run: ruff check .

test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up docker environment
run: docker-compose up -d

- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run tests
run: pytest
env:
PYTHONPATH: "."

- name: Clean docker environment
run: docker compose down --rmi all -v --remove-orphans
30 changes: 0 additions & 30 deletions .github/workflows/testing.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Python files
venv
__pycache__

# Vscode files
.vscode/*
!.vscode/extensions.json

# Pipelines files
.coverage
node_modules
coverage.xml
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"ms-python.python",
"ms-python.black-formatter",
"charliermarsh.ruff",
"usernamehw.errorlens"
]
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### 0.0.6 (2023-10-08)


### Features

* endpoint challenge ([#33](https://github.com/hawks-atlanta/proxy-python/issues/33)) ([ee78fb6](https://github.com/hawks-atlanta/proxy-python/commit/ee78fb6864d0f6616464439c5c177884e514cf29))

### 0.0.5 (2023-10-04)


### Features

* endpoint login ([#15](https://github.com/hawks-atlanta/proxy-python/issues/15)) ([4921ca1](https://github.com/hawks-atlanta/proxy-python/commit/4921ca11b886d950d7811f67ac573b7a9adc6831))

### 0.0.4 (2023-08-24)

### 0.0.3 (2023-08-24)


Expand Down
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,34 @@ docker compose up -d
coverage run -m pytest
```

### Formatting and linting

If you installed the recommended extensions for VSCode, you may have the formatting and linting configured out of the box.

Additionally, you may need to configure `black` to format `python` files with the following steps:

- Open the command palette (Ctrl + Shift + P)
- Search Format Document With...
- Search Configure Default Formatter...
- Select "Black Formatter"

You can also run the following commands to format and lint the code from the console:

```bash
# Check format
black --check .

# Format all python files
black .

# Check lint
ruff check .

# Fix lint (if possible)
ruff check --fix .
```

## Coverage

| [![circle](https://codecov.io/gh/hawks-atlanta/proxy-python/graphs/sunburst.svg?token=JODBEVCYCF)](https://app.codecov.io/gh/hawks-atlanta/proxy-python) | [![square](https://codecov.io/gh/hawks-atlanta/proxy-python/graphs/tree.svg?token=JODBEVCYCF)](https://app.codecov.io/gh/hawks-atlanta/proxy-python) |
| ------------------------------------------------------------ | ------------------------------------------------------------ |

| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
51 changes: 40 additions & 11 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.1'
version: "3.1"

services:
# Gateway
Expand All @@ -11,21 +11,38 @@ services:
environment:
METADATA_BASEURL: http://metadata:8080
AUTHENTICATION_BASEURL: http://authentication:8080
# TODO: Worker
WORKER_HOST: worker
WORKER_PORT: 1099
depends_on:
- worker
- metadata
- authentication
# Microservices
# TODO: Add worker service
worker:
image: ghcr.io/hawks-atlanta/worker-java:latest
container_name: worker
restart: on-failure
ports:
- "127.0.0.1:1099:1099"
environment:
METADATA_BASEURL: http://metadata:8080/api/v1
# Use the default directory that is created in the worker container
# VOLUME_BASE_PATH: /tmp
# VOLUME_COUNT: 3
metadata:
image: ghcr.io/hawks-atlanta/metadata-scala:latest
container_name: metadata
restart: on-failure
ports:
- "127.0.0.1:8082:8080"
environment:
DATABASE_HOST: "postgres-db"
DATABASE_HOST: "metadata-db"
DATABASE_PORT: "5432"
DATABASE_NAME: "database"
DATABASE_USER: "username"
DATABASE_PASSWORD: "password"
depends_on:
- metadata-db
authentication:
image: ghcr.io/hawks-atlanta/authentication-go:latest
container_name: authentication
Expand All @@ -34,19 +51,30 @@ services:
- "127.0.0.1:8083:8080"
environment:
DATABASE_ENGINE: postgres
DATABASE_DSN: "host=postgres-db user=username password=password dbname=database port=5432 sslmode=disable"
# Database
postgres-db:
image: postgres:latest
container_name: postgres-db
DATABASE_DSN: "host=authentication-db user=username password=password dbname=database port=5432 sslmode=disable"
depends_on:
- authentication-db
# Databases
authentication-db:
image: postgres:alpine3.18
container_name: authentication-db
restart: on-failure
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=database

metadata-db:
image: postgres:alpine3.18
container_name: metadata-db
restart: on-failure
ports:
- "127.0.0.1:5434:5432"
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=database
postgres-admin:
image: dpage/pgadmin4
container_name: postgres-admin
Expand All @@ -56,4 +84,5 @@ services:
- [email protected]
- PGADMIN_DEFAULT_PASSWORD=postgres
depends_on:
- postgres-db
- authentication-db
- metadata-db
Loading

0 comments on commit 45d3519

Please sign in to comment.