https://github.com/mr-ndi/ai-experts-assignment
Minimal Python HTTP client with OAuth2 token refresh, reproducible tests, and Dockerized CI-ready setup
https://github.com/mr-ndi/ai-experts-assignment
http pytest python3 venv
Last synced: 25 days ago
JSON representation
Minimal Python HTTP client with OAuth2 token refresh, reproducible tests, and Dockerized CI-ready setup
- Host: GitHub
- URL: https://github.com/mr-ndi/ai-experts-assignment
- Owner: Mr-Ndi
- Created: 2026-02-18T03:43:20.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-02-18T06:55:33.000Z (4 months ago)
- Last Synced: 2026-02-18T11:28:01.548Z (4 months ago)
- Topics: http, pytest, python3, venv
- Language: Python
- Homepage: https://hub.docker.com/r/ninshuti/ai-expert-assignment
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Experts Assignment (Python)
This assignment evaluates your ability to:
- set up a small Python project to run reliably (locally + in Docker),
- pin dependencies for reproducible installs,
- write focused tests to reproduce a bug,
- implement a minimal, reviewable fix.
## What you will do
### 1) Dockerfile (required)
Create a `Dockerfile` so the project can run the test suite in a non-interactive, CI-style environment.
Requirements:
- requirements.txt exists and is used during build (pip install -r requirements.txt)
- pytest must be included/pinned in requirements.txt
- The image must run tests by default (use: `CMD ["python", "-m", "pytest", "-v"]`).
- The build must install dependencies from `requirements.txt`.
### 2) requirements.txt (required)
Create a `requirements.txt` with pinned versions, using this format:
- `package==x.y.z`
### 3) README updates (required)
Update this README to include:
- how to run the tests locally,
- how to build and run tests with Docker.
### 4) Find + fix a bug (required)
There is a bug somewhere in this repository.
Your tasks:
- Identify the bug.
- Apply the smallest possible fix to make the tests pass.
- Keep the change minimal and reviewable (no refactors).
## Constraints
- Keep changes minimal and reviewable.
- Do not refactor unrelated code.
- Do not introduce extra tooling unless required.
- You may add tests and the smallest code change needed to fix the bug.
## Running tests
### Local
1. Install dependencies: `python -m pip install -r requirements.txt`
2. Run tests: `python -m pytest -v`
### Docker
1. Build the image: `docker build -t ai-experts .`
2. Run tests: `docker run --rm ai-experts`
3. Docker Hub image: https://hub.docker.com/r/ninshuti/ai-expert-assignment
### 5) EXPLANATION.md (required)
Create `EXPLANATION.md` (max 250 words) containing:
- **What was the bug?**
- **Why did it happen?**
- **Why does your fix solve it?**
- **One realistic case / edge case your tests still don’t cover**
## Submission
- done