Skip to content

Commit 657f3c7

Browse files
author
Maneesh-Relanto
committed
test: add complex test-project2 covering all edge cases
1 parent 8a07587 commit 657f3c7

19 files changed

Lines changed: 875 additions & 0 deletions

File tree

tests/test-project2/CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Changelog
2+
3+
All notable changes to Acme Platform are documented here.
4+
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](https://semver.org/).
7+
8+
---
9+
10+
## [2.1.0] — 2026-01-15
11+
12+
### Added
13+
- New GraphQL subscription support for real-time events
14+
- `acme watch` CLI command for live log tailing
15+
- Prometheus metrics endpoint at `/metrics`
16+
17+
### Fixed
18+
- Race condition in background job queue under high load
19+
- Incorrect UTC offset in scheduled tasks running after DST change
20+
21+
### Changed
22+
- Default timeout increased from 30s to 60s
23+
- Log format now includes trace ID for distributed tracing
24+
25+
---
26+
27+
## [2.0.0] — 2025-09-01
28+
29+
### Breaking Changes
30+
- Dropped Python 3.9 support; minimum is now 3.11
31+
- Renamed `acme.utils.helpers` to `acme.core.utils`
32+
33+
### Added
34+
- Complete REST API rewrite using FastAPI
35+
- OpenAPI 3.1 spec auto-generated at `/openapi.json`
36+
- First-class async support throughout
37+
38+
---
39+
40+
## [1.4.2] — 2025-06-10
41+
42+
### Fixed
43+
- Memory leak in connection pool under sustained traffic
44+
- Crash on empty config file
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to Acme Platform!
4+
5+
## Development Setup
6+
7+
```bash
8+
git clone https://github.com/acme/platform.git
9+
cd platform
10+
python -m venv .venv
11+
source .venv/bin/activate
12+
pip install -r requirements-dev.txt
13+
```
14+
15+
## Code Style
16+
17+
- Follow PEP 8 for Python code
18+
- Run `ruff check .` before committing
19+
- All public functions must have docstrings
20+
21+
## Pull Request Process
22+
23+
1. Fork the repository
24+
2. Create a feature branch: `git checkout -b feature/my-feature`
25+
3. Commit your changes with clear messages
26+
4. Open a pull request against `main`
27+
28+
## Reporting Bugs
29+
30+
Open an issue using the bug report template.
31+
Include repro steps, expected behaviour, and observed behaviour.
32+
33+
## Questions?
34+
35+
Join our Discord server or open a discussion on GitHub.

tests/test-project2/LICENSE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# License
2+
3+
MIT License
4+
5+
Copyright (c) 2026 Acme Corp
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

tests/test-project2/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Acme Platform
2+
3+
A fictional multi-service platform used to exercise every link and discovery
4+
edge case in MD Files Connector.
5+
6+
---
7+
8+
## Quick Links
9+
10+
- [Contributing Guide](CONTRIBUTING.md)
11+
- [Changelog](CHANGELOG.md)
12+
- <a href="LICENSE.md">License</a>
13+
- [REST API Reference](docs/api/REST.md)
14+
- [Quickstart Guide](docs/guides/quickstart.md)
15+
- [Architecture Overview](./docs/internal/ARCHITECTURE.md)
16+
17+
<!-- Duplicate link — should count REST.md only once -->
18+
- [REST API Reference (mirror)](docs/api/REST.md)
19+
20+
<!-- Dangling link — file does not exist on disk -->
21+
- [Deprecated API v1](docs/deprecated/OLD_API.md)
22+
23+
---
24+
25+
## Installation
26+
27+
```bash
28+
pip install acme-platform
29+
```
30+
31+
---
32+
33+
## Usage
34+
35+
```bash
36+
acme start --config config.yml
37+
```
38+
39+
---
40+
41+
## API Examples
42+
43+
```bash
44+
# Fetch all users
45+
curl -H "Authorization: Bearer $TOKEN" https://api.acme.example.com/v2/users
46+
47+
# Submit a background job
48+
curl -X POST -H "Authorization: Bearer $TOKEN" \
49+
-d '{"type":"report","params":{"month":"2026-01"}}' \
50+
https://api.acme.example.com/v2/jobs
51+
```
52+
53+
> **GraphQL:** A GraphQL API is available alongside REST. See the internal
54+
> team wiki for schema details (not yet public-facing documentation).
55+
56+
---
57+
58+
## External Resources
59+
60+
- [Official Python Docs](https://docs.python.org/3/)
61+
- [PyPI](https://pypi.org/project/acme-platform/)
62+
- Hosted API spec at https://acme.example.com/openapi.md
63+
64+
---
65+
66+
## License
67+
68+
© 2026 Acme Corp — see <a href="LICENSE.md">LICENSE.md</a> for details.

tests/test-project2/SCRATCH.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
brainstorming notes — ignore

tests/test-project2/docs/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Docs
2+
3+
Welcome to the Acme Platform documentation hub.
4+
5+
This nested README exists inside the `docs/` folder and is intentionally
6+
**not linked from the root README**. It represents a common pattern where
7+
teams add a README inside a docs directory but forget to surface it from
8+
the root. The MD Files Connector should flag this as isolated.
9+
10+
## Contents
11+
12+
- `api/` — REST and GraphQL API reference
13+
- `guides/` — User guides and tutorials
14+
- `internal/` — Internal architecture and decision records
15+
- `adr/` — Architecture Decision Records
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# ADR 0001 — Initial Architecture and Tech Stack
2+
3+
**Date:** 2024-03-01
4+
**Status:** Accepted
5+
**Deciders:** Platform Team
6+
7+
---
8+
9+
## Context
10+
11+
We are building a new multi-tenant SaaS platform from scratch. We need to
12+
choose the core technology stack, API style, data store, and deployment
13+
approach before writing any product code.
14+
15+
## Decision
16+
17+
We will use the following stack:
18+
19+
- **Language:** Python 3.11+ (familiar to the whole team; strong async support)
20+
- **API framework:** FastAPI (native async, auto-OpenAPI, Pydantic validation)
21+
- **Database:** PostgreSQL 16 (battle-tested, rich feature set, full ACID)
22+
- **Cache / queue:** Redis 7 (used for both ephemeral caching and job queues)
23+
- **Deployment:** Docker + Kubernetes on AWS EKS
24+
- **CI/CD:** GitHub Actions with multi-stage Docker builds
25+
26+
## Consequences
27+
28+
### Positive
29+
- FastAPI's automatic OpenAPI generation eliminates manual spec maintenance
30+
- PostgreSQL's JSONB support gives flexibility for semi-structured payloads
31+
- Kubernetes enables zero-downtime deploys and auto-scaling
32+
33+
### Negative
34+
- Kubernetes operational overhead; requires team upskilling on cluster management
35+
- Python GIL limits CPU-bound parallelism; addressed by multi-process workers
36+
37+
## Alternatives Considered
38+
39+
- **Node.js / NestJS** — rejected; team is more fluent in Python
40+
- **MongoDB** — rejected; relational data model is clearer for this domain
41+
- **Serverless (Lambda)** — rejected; cold-start latency unacceptable for sync API
42+
43+
## Review Date
44+
45+
Revisit this decision when team size exceeds 20 engineers or annual request
46+
volume exceeds 1 billion.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Architecture Decision Records
2+
3+
Index of all ADRs for Acme Platform.
4+
5+
| # | Title | Status | Date |
6+
|---|-------|--------|------|
7+
| [0001](0001-initial-setup.md) | Initial architecture and tech stack | Accepted | 2024-03-01 |
8+
9+
New ADRs should be added to this index and linked from here.
10+
Use the template in `0001-initial-setup.md` as a starting point.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# GraphQL API Reference
2+
3+
The Acme Platform GraphQL API provides a flexible query interface for all
4+
platform resources.
5+
6+
## Endpoint
7+
8+
`POST https://api.acme.example.com/graphql`
9+
10+
Include `Authorization: Bearer <token>` in the request header.
11+
12+
## Schema Overview
13+
14+
### Queries
15+
16+
```graphql
17+
# Fetch a user by ID
18+
query GetUser($id: ID!) {
19+
user(id: $id) {
20+
id
21+
email
22+
name
23+
createdAt
24+
organizations {
25+
id
26+
name
27+
}
28+
}
29+
}
30+
31+
# List jobs with status filter
32+
query ListJobs($status: JobStatus) {
33+
jobs(status: $status) {
34+
edges {
35+
node {
36+
id
37+
type
38+
status
39+
createdAt
40+
completedAt
41+
}
42+
}
43+
pageInfo {
44+
hasNextPage
45+
endCursor
46+
}
47+
}
48+
}
49+
```
50+
51+
### Mutations
52+
53+
```graphql
54+
# Create a new organization
55+
mutation CreateOrg($input: CreateOrgInput!) {
56+
createOrganization(input: $input) {
57+
organization {
58+
id
59+
name
60+
slug
61+
}
62+
}
63+
}
64+
```
65+
66+
## Subscriptions
67+
68+
Real-time job status updates are available via WebSocket subscriptions.
69+
70+
```graphql
71+
subscription OnJobUpdate($jobId: ID!) {
72+
jobStatusChanged(jobId: $jobId) {
73+
status
74+
progress
75+
message
76+
}
77+
}
78+
```
79+
80+
## Introspection
81+
82+
GraphQL introspection is enabled on non-production environments only.
83+
In production, use the published schema file from the CI artifacts.

0 commit comments

Comments
 (0)