Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
ce96a66
adding pip mirror config
Dmitry-Grachev May 7, 2025
58186b9
adding build and deploy workflow
Dmitry-Grachev May 13, 2025
dc57c9e
Merge branch 'LeonDeTur:main' into main
LeonDeTur May 14, 2025
0046faf
Merge pull request #1 from IDUclub/dev
LeonDeTur May 23, 2025
f980cd8
fix(effects_api_gateway):
LeonDeTur May 26, 2025
b7789a0
Merge pull request #2 from IDUclub/dev
LeonDeTur May 26, 2025
410df8b
fix(effects_api_gateway):
LeonDeTur May 26, 2025
8139aa4
Merge pull request #3 from IDUclub/dev
LeonDeTur May 26, 2025
d70e051
fix(docker-compose.actions):
LeonDeTur May 26, 2025
810461b
Merge pull request #4 from IDUclub/dev
LeonDeTur May 26, 2025
fcd37d6
chore(ToDo):
LeonDeTur May 27, 2025
b5af7e8
feat(effects_api_gateway):
LeonDeTur May 28, 2025
b00d35b
Merge pull request #5 from IDUclub/dev
LeonDeTur May 28, 2025
c051fb5
fixing workflow
Dmitry-Grachev May 28, 2025
535eaf0
fixing workflow
Dmitry-Grachev May 28, 2025
2cda2cd
fix(effects_api_gateway):
LeonDeTur May 28, 2025
2424a35
Merge pull request #6 from IDUclub/dev
LeonDeTur May 28, 2025
0ec32d6
chore(effects_api_gateway):
LeonDeTur Jun 25, 2025
a9f9bdc
Merge pull request #7 from IDUclub/dev
LeonDeTur Jun 25, 2025
71780b7
fix(effects_api_gateway):
LeonDeTur Jun 25, 2025
ca5ac0d
fix(data_restorator):
LeonDeTur Jun 25, 2025
d2923ac
Merge pull request #8 from IDUclub/dev
LeonDeTur Jun 25, 2025
51137d2
fix(effects_service):
LeonDeTur Jun 25, 2025
b74b0bd
fix(main):
LeonDeTur Jun 25, 2025
8fc8046
fix(main):
LeonDeTur Jun 25, 2025
b5c0973
fix(effects_controller):
LeonDeTur Jun 25, 2025
70982d0
Merge pull request #9 from IDUclub/dev
LeonDeTur Jun 25, 2025
a6c8ed7
Update build_and_deploy.yml
Dmitry-Grachev Jun 25, 2025
1774c34
fix(effects_service):
LeonDeTur Jun 30, 2025
87a396e
Merge pull request #10 from IDUclub/dev
LeonDeTur Jun 30, 2025
da9d0c2
fix(attribute_parser):
LeonDeTur Jul 2, 2025
b6d55dc
Merge pull request #11 from IDUclub/dev
LeonDeTur Jul 2, 2025
b0257a7
fix(effects_service):
LeonDeTur Aug 6, 2025
7d3f555
Merge pull request #12 from IDUclub/fix/context
LeonDeTur Aug 6, 2025
dae268e
Merge pull request #13 from IDUclub/dev
LeonDeTur Aug 6, 2025
2c1dd2d
fix(objectnat_calculator):
LeonDeTur Oct 2, 2025
d7e667d
Merge pull request #14 from IDUclub/dev
LeonDeTur Oct 2, 2025
18846d2
fix(effects_api_gateway):
LeonDeTur Oct 7, 2025
4d1d550
Merge pull request #15 from IDUclub/dev
LeonDeTur Oct 7, 2025
2ae9bac
fix(effects_controller):
LeonDeTur Oct 21, 2025
2023adc
Merge pull request #16 from IDUclub/dev
LeonDeTur Oct 21, 2025
87ab6ec
pypi mirror config changed
Dmitry-Grachev Oct 31, 2025
70b735a
fix(auth):
LeonDeTur Nov 10, 2025
ab90ebe
Merge pull request #17 from IDUclub/dev
LeonDeTur Nov 10, 2025
49f639f
fix(calculate effects):
LeonDeTur Nov 11, 2025
9fd03e2
Merge pull request #18 from IDUclub/dev
LeonDeTur Nov 11, 2025
bf42f65
fix(api_handler):
LeonDeTur Nov 14, 2025
0b0a94e
Merge pull request #19 from IDUclub/dev
LeonDeTur Nov 14, 2025
27397cb
fix(effects_service):
LeonDeTur Dec 22, 2025
514062d
style:
LeonDeTur Dec 22, 2025
19596b8
Merge pull request #20 from IDUclub/dev
LeonDeTur Dec 22, 2025
c6024b5
feat(effects_service):
LeonDeTur Dec 24, 2025
1325f83
Merge pull request #21 from IDUclub/feat/atttribute_mapping
LeonDeTur Dec 24, 2025
7783dee
Merge pull request #22 from IDUclub/dev
LeonDeTur Dec 24, 2025
d2ce484
feat(otel_agent):
LeonDeTur Jan 19, 2026
92cd386
Merge pull request #23 from IDUclub/feat/prometheus
LeonDeTur Jan 19, 2026
edfb83d
feat(prometheus):
LeonDeTur Feb 19, 2026
8334045
Merge pull request #24 from IDUclub/feat/BACKEND-11-prometheus
LeonDeTur Feb 19, 2026
bbbd2f5
Merge pull request #25 from IDUclub/dev
LeonDeTur Feb 19, 2026
e58d186
fix(prometheus):
LeonDeTur Apr 3, 2026
5a0855b
Merge pull request #26 from IDUclub/fix/prometheus-on-startup
LeonDeTur Apr 3, 2026
c3c5452
fix(prometheus): (#27)
LeonDeTur Apr 3, 2026
38a302f
Merge remote-tracking branch 'origin/main' into dev
LeonDeTur Apr 3, 2026
a3a0388
fix(prometheus):
LeonDeTur Apr 3, 2026
db34ac0
Merge pull request #28 from IDUclub/dev
LeonDeTur Apr 3, 2026
8ce6ed3
feat(dependencies):
LeonDeTur Apr 20, 2026
6be14a6
feat(mcp):
LeonDeTur Apr 20, 2026
0ac78bd
feat(provision, mcp):
LeonDeTur Apr 22, 2026
9fe42bc
Merge pull request #29 from IDUclub/feat/mcp
LeonDeTur Apr 22, 2026
70842d4
Dev (#30)
LeonDeTur Apr 22, 2026
0b68af4
Merge branch 'main' into dev
LeonDeTur Apr 22, 2026
669c845
fix(effects_service):
LeonDeTur May 18, 2026
143bb23
Merge pull request #31 from IDUclub/fix/mcp-server
LeonDeTur May 18, 2026
5adbf60
Dev (#32)
LeonDeTur May 18, 2026
e185bb2
Merge branch 'main' into dev
LeonDeTur May 18, 2026
4a8824d
refacto(oop-style-service):
LeonDeTur May 18, 2026
804015f
feat(env):
LeonDeTur May 18, 2026
21f0c38
Merge pull request #33 from IDUclub/refactor/remove-static-classes
LeonDeTur May 18, 2026
8dcbf68
v0.1.4 (#34)
LeonDeTur May 18, 2026
521a7e4
Merge branch 'main' into dev
LeonDeTur May 18, 2026
5ae31c4
feat(env):
LeonDeTur May 28, 2026
87ae67d
Merge pull request #35 from IDUclub/refactor/mcp-meta-params
LeonDeTur May 28, 2026
79562fa
v0.2.4 (#36)
LeonDeTur May 28, 2026
ba8c209
Merge remote-tracking branch 'origin/main' into dev
LeonDeTur May 28, 2026
0fe9ff0
refactor(meta):
LeonDeTur May 29, 2026
6be8c24
version(0.3.4):
LeonDeTur May 29, 2026
04f9534
v0.3.4 (#38)
LeonDeTur May 29, 2026
4a3c273
Merge branch 'main' into dev
LeonDeTur Jun 1, 2026
334955d
Merge pull request #37 from IDUclub/refactor/meta
LeonDeTur Jun 1, 2026
a7f8550
Merge branch 'main' into dev
LeonDeTur Jun 1, 2026
41c99f6
Feat/objectnamt v1 (#39)
LeonDeTur Jul 7, 2026
70699fb
Merge pull request #40 from IDUclub/dev
LeonDeTur Jul 7, 2026
eda8fe7
chore(deps): update dependencies within minor/patch (#41)
LeonDeTur Aug 1, 2026
2378dc2
feat(auth): require service tokens (#42)
LeonDeTur Aug 18, 2026
49ffc3e
Merge pull request #43 from IDUclub/dev
LeonDeTur Aug 18, 2026
2c76c50
Merge pull request #44 from IDUclub/fix/deploy-env-scope
LeonDeTur Aug 19, 2026
f04ba4a
Merge pull request #45 from IDUclub/dev
LeonDeTur Aug 19, 2026
c1d3a5f
Merge pull request #46 from IDUclub/codex/fix-m2m-user-context
LeonDeTur Aug 19, 2026
915fd9e
Merge pull request #46 from IDUclub/codex/fix-m2m-user-context (#47)
LeonDeTur Aug 19, 2026
ea53b82
- feat: ci dev pipeline
Jesusya-26 Sep 7, 2026
0e7ad1f
Merge pull request #48 from IDUclub/feat/ci-dev
Jesusya-26 Sep 7, 2026
bb697ec
fix: allow unauthenticated log downloads (#50)
LeonDeTur Sep 17, 2026
9254b42
fix: configure environment for CI tests (#51)
LeonDeTur Sep 17, 2026
70dbb08
fix: respect configured Urban API roots behind load balancers (#52)
LeonDeTur Sep 18, 2026
6284e52
Merge pull request #53 from IDUclub/dev
LeonDeTur Sep 18, 2026
9a20a45
ci: (#54)
LeonDeTur Sep 18, 2026
6935565
ci: (#54) (#55)
LeonDeTur Sep 18, 2026
0ecf834
ci: (#56)
LeonDeTur Sep 18, 2026
3e015bb
Merge pull request #57 from IDUclub/dev
LeonDeTur Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
LOGS_FILE="object_effects"
# Explicit API roots (e.g. https://host/urban_api) are preserved; bare origins use /api.
URBAN_API="https://urban-api.testing"
MCP_URBAN_API="https://urban-api.testing"
PROMETHEUS_PORT=9464
SERVICE_AUTH_SERVER_URL=https://keycloak.example.com
SERVICE_AUTH_REALM=IDU
SERVICE_AUTH_CLIENT_ID=object-effects
SERVICE_AUTH_CLIENT_SECRET=change-me
61 changes: 61 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build_and_deploy
on: workflow_dispatch
env:
IMAGE_NAME: ${{secrets.REGISTRY}}/object_effects
CONTAINER_NAME: object_effects

jobs:
build:
runs-on: 65_runner
outputs:
now: ${{steps.date.outputs.NOW}}
steps:
- name: Set current date as env variable
id: date
run: echo "NOW=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_OUTPUT
- name: checkout
uses: actions/checkout@v4
- name: copy_env
env:
ENV_PATH: ${{secrets.ENV_PATH}}
run: cp "$ENV_PATH"/.env.development ./
- name: build
env:
NOW: ${{steps.date.outputs.now}}
run: docker build -t "$IMAGE_NAME":"$NOW" .
- name: push_to_registry
env:
NOW: ${{steps.date.outputs.now}}
run: docker push "$IMAGE_NAME":"$NOW"
stop_container:
runs-on: 65_runner
needs: build
steps:
- name: stop_container
run: docker rm -f "$CONTAINER_NAME"
run_container:
runs-on: 65_runner
needs: [build, stop_container]
# Required so the SERVICE_AUTH_* vars/secrets of the "production" environment resolve:
# without it they come out empty and docker-compose.actions.yml aborts on ${VAR:?...}.
environment: production
env:
NOW: ${{needs.build.outputs.now}}
steps:
- name: set env
run: echo "IMAGE=$IMAGE_NAME:$NOW" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@v4
- name: copy_env
env:
ENV_PATH: ${{secrets.ENV_PATH}}
run: cp "$ENV_PATH"/.env.development ./
- name: run
env:
SERVICE_AUTH_SERVER_URL: ${{ vars.SERVICE_AUTH_SERVER_URL }}
SERVICE_AUTH_REALM: ${{ vars.SERVICE_AUTH_REALM }}
SERVICE_AUTH_CLIENT_ID: ${{ vars.SERVICE_AUTH_CLIENT_ID }}
SERVICE_AUTH_CLIENT_SECRET: ${{ secrets.SERVICE_AUTH_CLIENT_SECRET }}
URBAN_API: ${{ vars.URBAN_API }}
# run: docker run -d --name "$CONTAINER_NAME" --env-file ./.env.development -p 8210:8000 "$IMAGE_NAME":"$NOW"
run: docker compose -f docker-compose.actions.yml up -d
27 changes: 27 additions & 0 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Kubernetes dev release

on:
push:
branches:
- dev

permissions:
contents: read

jobs:
release:
uses: IDUclub/urban-assistant-deploy/.github/workflows/reusable-application-release.yaml@main
with:
service: object-effects
test-command: |
python -m pip install --disable-pip-version-check uv==0.12.10
uv python install 3.11
uv venv --python 3.11
uv pip install --python .venv/bin/python \
--requirement requirements.txt \
--requirement requirements-auth.txt \
pytest \
pytest-asyncio
cp .env.example .env.test
APP_ENV=test .venv/bin/python -m pytest --verbose tests
secrets: inherit
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ celerybeat.pid
*.sage.py

# Environments
.env*
.env.development
.env.production
.venv
env/
venv/
Expand Down Expand Up @@ -160,4 +161,8 @@ cython_debug/
.idea/

# Notebooks
*.ipynb
*.ipynb

# Agents
CLAUDE.md
AGENTS.md
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 26.3.1
hooks:
- id: black
language_version: python3.11

- repo: https://github.com/pycqa/isort
rev: 8.0.1
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ ENV PYTHONUNBUFFERED=1

# Enables env file
ENV APP_ENV=development

# add pyppi mirror to config
COPY pip.conf /etc/xdg/pip/pip.conf
# Install pip requirements
COPY requirements.txt .
RUN python -m pip install -r requirements.txt
COPY requirements-auth.txt .
RUN python -m pip install -r requirements.txt -r requirements-auth.txt

WORKDIR /app
COPY . /app

# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["gunicorn", "--bind", "0.0.0.0:80", "-k", "uvicorn.workers.UvicornWorker", "--workers", "4", "app.main:app"]
CMD ["gunicorn", "--bind", "0.0.0.0:80", "-k", "uvicorn.workers.UvicornWorker", "--workers", "1", "app.main:app"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# ObjectEffectsAPI
Repository for evaluation effects by ObjectNat library

### Logs

`GET /logs` downloads the application log file without authorization.
6 changes: 6 additions & 0 deletions app/__dev_runner__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import uvicorn

from app.main import app

if __name__ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=8020)
1 change: 1 addition & 0 deletions app/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_VERSION = "0.4.0"
Loading