You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Cursor** users: start at the repo root **[`AGENTS.md`](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`** (universal for any editor or tool).
3
+
**Cursor** users: start at **[AGENTS.md](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**.
4
4
5
-
This folder only points contributors here so nothing editor-specific duplicates the canonical docs.
5
+
This folder only points contributors to **`AGENTS.md`**so editor-specific config does not duplicate the canonical docs.
**Universal entry point** for anyone automating or assisting work in this repo—AI agents (Cursor, Copilot, CLI tools), reviewers, and contributors. Conventions and detailed guidance live in **`skills/*/SKILL.md`**, not in editor-specific config, so the same instructions apply whether or not you use Cursor.
3
+
**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
|**Purpose**| Python client for the **Content Management API (CMA)**: organizations, stacks, content types, entries, assets, webhooks, workflows, OAuth, and related resources. Uses **`requests`** via **`_APIClient`**. |
|**Purpose:**| Python client for the **Content Management API (CMA)**: organizations, stacks, content types, entries, assets, webhooks, workflows, OAuth, and related resources. Uses **`requests`** via **`_APIClient`**. |
Loaded via **`tests/cred.py`** (`load_dotenv()`). Examples include **`HOST`**, **`APIKEY`**, **`AUTHTOKEN`**, **`MANAGEMENT_TOKEN`**, **`ORG_UID`**, and resource UIDs (**`CONTENT_TYPE_UID`**, **`ENTRY_UID`**, …). See that file for the full list.
50
48
51
49
Do not commit secrets.
52
50
53
-
## Where the real documentation lives: skills
54
-
55
-
Read these **`SKILL.md` files** for full conventions—**this is the source of truth** for implementation and review:
51
+
## Where the documentation lives: skills
56
52
57
53
| Skill | Path | What it covers |
58
54
|-------|------|----------------|
@@ -63,10 +59,10 @@ Read these **`SKILL.md` files** for full conventions—**this is the source of t
|**Framework / HTTP**|[`skills/framework/SKILL.md`](skills/framework/SKILL.md)|**`requests`**, retries, OAuth interceptor, where to change transport |
65
61
66
-
An index with short “when to use” hints is in [`skills/README.md`](skills/README.md).
62
+
An index with “when to use” hints is in [`skills/README.md`](skills/README.md).
67
63
68
-
## Using Cursor
64
+
## Using Cursor (optional)
69
65
70
-
If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same source of truth as everyone else; no separate `.mdc` rule files.
66
+
If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.
**This directory is the source of truth** for conventions (workflow, SDK API, style, tests, review, HTTP layer). Read **`AGENTS.md`**at the repo root for the index and quick commands; each skill is a folder with **`SKILL.md`** (YAML frontmatter: `name`, `description`).
3
+
Source of truth for detailed guidance. Read **[`AGENTS.md`](../AGENTS.md)**first, then open the skill that matches your task.
4
4
5
5
## When to use which skill
6
6
@@ -13,7 +13,4 @@
13
13
|**code-review**| PR checklist, API semver, HTTP regressions, secrets |
description: Install, pytest unit/API/mock, versioning, pylint, hooks—standard workflow for this SDK repo.
3
+
description: Use for install, pytest suites, versioning, pylint, hooks, and PR baseline in contentstack-management-python.
4
4
---
5
5
6
-
# Development workflow — Contentstack Management Python
6
+
# Development workflow – Contentstack Management Python
7
7
8
8
## When to use
9
9
10
10
- Setting up locally, opening a PR, or matching CI expectations.
11
-
- Answering “how do we run tests?” or “what runs in CI?”
11
+
- Answering "how do we run tests?" or "what runs in CI?"
12
12
13
-
## Branches & releases
13
+
## Instructions
14
+
15
+
### Branches & releases
14
16
15
17
-**Flow:** merge work to **`development`**; **release PRs** are **`development` → `main`**. After **`main`** moves, [`.github/workflows/back-merge-pr.yml`](../../.github/workflows/back-merge-pr.yml) can open **`main` → `development`** to resync.
16
18
-**PyPI:** publish a **GitHub Release** (`release: published`) to run [`.github/workflows/release.yml`](../../.github/workflows/release.yml). PRs that touch **`contentstack_management/`** or **`setup.py`** must bump **`__version__`** and **`CHANGELOG.md`** per [`.github/workflows/check-version-bump.yml`](../../.github/workflows/check-version-bump.yml).
17
19
18
-
## Before a PR
20
+
###Before a PR
19
21
20
22
1.**Install** — `pip install -e ".[dev]"` or install **`requirements.txt`** plus **pytest** / **pytest-cov** as needed.
21
23
2.**`pytest tests/unit/`** — required baseline (matches CI **`coverage run -m pytest tests/unit/`**).
22
24
3.**API tests** — `pytest tests/api/` when your change affects live CMA behavior; configure **`.env`** per **`tests/cred.py`**. Never commit tokens.
23
25
4.**Mock tests** — `pytest tests/mock/` when extending mocked HTTP or fixtures.
24
26
25
-
## Packaging
27
+
###Packaging
26
28
27
29
- Bump **`contentstack_management/__init__.py`****`__version__`** and align **`setup.py`** versioning if release-facing.
28
30
29
-
## Tooling
31
+
###Tooling
30
32
31
33
-**pylint** is listed in **`requirements.txt`**; follow existing style in touched files.
32
34
-**Husky / Talisman / Snyk** — see **README.md** for local hook setup.
33
35
34
-
## Pull requests
36
+
###Pull requests
35
37
36
38
- Build passes: **`pytest tests/unit/`** at minimum; run **API** / **mock** when your change touches those layers.
37
39
- Follow **`skills/code-review/SKILL.md`** before merge.
38
40
- Prefer backward-compatible public API; call out breaking changes and semver.
- Editing **`contentstack_management/_api_client.py`** or OAuth interceptor/handler wiring.
11
11
- Changing retry policy, timeouts, or how **`requests`** is invoked.
12
12
13
-
## Integration point
13
+
## Instructions
14
+
15
+
### Integration point
14
16
15
17
-**`_APIClient`** uses **`requests`** in **`_call_request`**, honors **timeout** and **max_retries**, and delegates to **`oauth_interceptor`** when configured.
16
18
17
-
## When to change
19
+
###When to change
18
20
19
21
-**Retry or transport behavior** — keep logic centralized in **`_APIClient`** unless a resource truly needs a documented exception.
20
22
-**Auth headers** — prefer extending **`Client`** / **`user_agents`** patterns rather than scattering header merges.
21
23
22
-
## Testing
24
+
###Testing
23
25
24
26
-**Unit** — mock **`requests`** or **`_APIClient`** at the boundary used by existing tests.
25
27
-**API** — full stack via credentials from **`tests/cred.py`**.
-**`contentstack_management/stack/`** — stack-scoped API surface.
18
20
-**Domain modules** — **`entries/`**, **`assets/`**, **`webhooks/`**, **`oauth/`**, etc.
19
21
20
-
## Style
22
+
###Style
21
23
22
24
- Match existing modules: naming, docstrings, and patterns already used in the same directory.
23
25
- Prefer small, focused changes; keep **`__init__.py`** exports consistent with public API intent (**`README`**, **`contentstack_management.__all__`**).
24
26
25
-
## Imports
27
+
###Imports
26
28
27
29
- Use **`requests`** (and **`requests-toolbelt`** where already used) through **`_APIClient`** patterns rather than ad-hoc clients in domain modules unless justified.
28
30
29
-
## Security
31
+
###Security
30
32
31
33
- Do not log **authtokens**, **management tokens**, **passwords**, or **API keys**; preserve existing header handling in **`Client`**.
0 commit comments