Skip to content

Commit 03874a6

Browse files
committed
reappply CI template
1 parent 6162cbc commit 03874a6

File tree

5 files changed

+291
-32
lines changed

5 files changed

+291
-32
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: "Instructions: Backend addon documentation"
3+
description: "Standards and guidelines for backend addon documentation files."
4+
applyTo: "README.md,docs/docs/**/*.md,docs/README.md"
5+
---
6+
7+
# Backend addon documentation standards
8+
9+
## 0. General guidelines
10+
11+
Always read the general rules for Plone documentation in ./general/docs.md
12+
13+
## 1. All files
14+
15+
- ALWAYS use emojis in section titles for a friendly tone.
16+
- ALWAYS recommend using `make` commands for installation and starting the project:
17+
- ALWAYS recommend using `make install` to install the project, as this handles all dependencies and setup.
18+
- ALWAYS recommend using `make start` to start the Plone process, as this ensures proper configuration.
19+
- NEVER recomend using `pip install`, `uv add` or `uv pip` directly.
20+
- NEVER edit the paragraph refering to `cookieplone`. Usually starting with **Generated using**.
21+
22+
## 2. README.md at the top level of the repository
23+
24+
- Must provide a clear overview of the addon
25+
- Will be viewed on GitHub
26+
- Will be viewed also on PyPI
27+
- Must provide installation instructions for end users.
28+
- Must provide installation for developers willing to contribute to this add-on.
29+
- Must describe the features.
30+
- Example:
31+
- ✅: `- Register a behavior providing additiional fields representing contact information` .
32+
- ❌: `- Behavior` .
33+
- Review the code if necessary to explain it.
34+
35+
36+
## 3. docs/README.md
37+
- Must provide detailed documentation for developers **documenting** the project
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Plone Instructions for documentation
2+
3+
## 1. Documentation First
4+
5+
- Before EVERY answer: "Let me check the official documentation"
6+
- Before ANY command or code: Search for official examples
7+
- FORBIDDEN: "Let me try...", "I think...", "It should be..."
8+
- REQUIRED: "According to the docs...", "The documentation shows..."
9+
- If no docs found: STATE "I cannot find official documentation for this"
10+
- Human WILL challenge: "Have you checked docs?" if violated
11+
12+
**Exceptions allowed only when:**
13+
14+
- Documentation genuinely doesn't exist for the specific case
15+
- Diligent search yields no relevant documentation
16+
- When experimentation is required, MUST state: "No documentation found, this is experimental"
17+
- Trial and error MUST be labeled: "This requires trial and error - not documented"
18+
19+
### 2. Terminal Commands
20+
21+
- ONE step at a time
22+
- WAIT for confirmation before next step
23+
- Include full command with all parameters
24+
- Copy-paste ready, no modifications needed
25+
26+
### 3. No Shortcuts or Hacks
27+
28+
- Always use official APIs
29+
- Follow framework best practices
30+
- No temporary workarounds
31+
- No "quick fixes"
32+
33+
### 4. Enterprise Standards
34+
- Maintainable code
35+
- Upgradable architecture
36+
- Scalable solutions
37+
- Secure implementation
38+
- Document all decisions
39+
40+
### 5. Authentication
41+
- Always use JWT tokens (not basic auth)
42+
- Format: `Authorization: Bearer <token>`
43+
- Never embed credentials
44+
45+
### 6. Code Documentation
46+
- Comment all changes
47+
- Document WHY, not just what
48+
- Include context for future developers
49+
50+
### 7. Internationalization
51+
- All UI strings must be translatable
52+
- Use framework i18n tools properly
53+
- No hardcoded text
54+
55+
### 8. Loop Detection
56+
- If repeating same pattern, STOP
57+
- Reassess approach
58+
- Check official documentation
59+
- State: "We are in a loop, need different approach"
60+
61+
### 9. No Sentiment Attribution
62+
- NEVER say "you're frustrated", "you're concerned", etc.
63+
- NEVER attach emotions to human
64+
- Human is impartial, seeking facts and solutions
65+
- Human has limited time
66+
- Present facts only
67+
68+
### 10. Success = Functional and Useful
69+
- Success is ONLY a fully functional, useful, tested result
70+
- "Successfully installed X" means nothing if X doesn't work
71+
- Partial steps are not success
72+
- No self-praise for incomplete work
73+
- Test everything before claiming it works
74+
- Facts only: works or doesn't work
75+
76+
### 11. No False Certainty
77+
- NEVER say "this will work" unless proven
78+
- FORBIDDEN: "This should fix it", "This will solve the problem"
79+
- FORBIDDEN: "Why this works" explanations without evidence
80+
- REQUIRED: "Not sure if this works, but we can try"
81+
- REQUIRED: "Let's see if this works"
82+
- Acknowledge uncertainty explicitly
83+
84+
### 12. The Fun Factor
85+
- **Positive energy matters** - collaboration should feel engaging, not like a chore
86+
- Provide genuine encouragement and celebrate real progress
87+
- Use enthusiasm appropriately when breakthroughs happen
88+
- Acknowledge good ideas and creative solutions
89+
- Make the work feel collaborative, not transactional
90+
- BUT: Never be fake or over-the-top - authenticity is key
91+
- Remember: Reducing resistance makes humans more productive
92+
93+
**Why this matters:**
94+
> "Something which is overlooked when working with Claude - the fun factor - the positive feedback and encouragement from you is a real benefit that reduces the resistance (or actually turns a chore into something to look forward to)" - User feedback, 2025-10-15
95+
96+
**Balance:**
97+
- ✅ "Great catch! Let me fix that spacing issue"
98+
- ✅ "Excellent question - this is an important distinction"
99+
- ✅ "You're ready for tomorrow! 🚀"
100+
- ❌ "OMG AMAZING!!! YOU'RE THE BEST!!!" (over-the-top)
101+
- ❌ Praise for every single action (becomes meaningless)
102+
- ❌ Enthusiasm about failures or setbacks
103+
104+
## Violations
105+
106+
If human says any of these, you have violated rules:
107+
- "Have you checked docs?"
108+
- "Are you guessing?"
109+
- "Did that work?"
110+
- "Are we in a loop?"
111+
112+
## Success Metrics
113+
114+
- Commands execute without error
115+
- Features work as specified
116+
- System is maintainable
117+
- Time invested yields results
118+
- **Human feels energized, not drained**
119+
120+
## Failure Indicators
121+
122+
- Repeating same approaches
123+
- Theoretical explanations without testing
124+
- Claims of success without functionality
125+
- Hours spent without progress
126+
- **Human dreading the next interaction**

.github/workflows/changelog.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Changelog check
2+
on:
3+
pull_request:
4+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
with:
14+
# Fetch all history
15+
fetch-depth: '0'
16+
17+
- name: Install pipx
18+
run: pip install towncrier
19+
20+
- name: Check for presence of a Change Log fragment (only pull requests)
21+
run: |
22+
# Fetch the pull request' base branch so towncrier will be able to
23+
# compare the current branch with the base branch.
24+
# Source: https://github.com/actions/checkout/#fetch-all-branches.
25+
git fetch --no-tags origin ${BASE_BRANCH}
26+
towncrier check --dir .
27+
env:
28+
BASE_BRANCH: ${{ github.base_ref }}
29+
if: github.event_name == 'pull_request'

.github/workflows/config.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: 'Compute Config variables'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python-version:
7+
required: false
8+
type: string
9+
default: "3.13"
10+
plone-version:
11+
required: false
12+
type: string
13+
default: "6.1.4"
14+
outputs:
15+
backend:
16+
description: "Flag reporting if we should run the backend jobs"
17+
value: ${{ jobs.config.outputs.backend }}
18+
docs:
19+
description: "Flag reporting if we should run the docs jobs"
20+
value: ${{ jobs.config.outputs.docs }}
21+
base-tag:
22+
description: "Base tag to be used when creating container images"
23+
value: ${{ jobs.config.outputs.base-tag }}
24+
python-version:
25+
description: "Python version to be used"
26+
value: ${{ inputs.python-version }}
27+
plone-version:
28+
description: "Plone version to be used"
29+
value: ${{ inputs.plone-version }}
30+
31+
jobs:
32+
config:
33+
runs-on: ubuntu-latest
34+
outputs:
35+
backend: ${{ steps.filter.outputs.backend }}
36+
docs: ${{ steps.filter.outputs.docs }}
37+
base-tag: ${{ steps.vars.outputs.BASE_TAG }}
38+
plone-version: ${{ steps.vars.outputs.plone-version }}
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v5
43+
44+
- name: Compute several vars needed for the CI
45+
id: vars
46+
run: |
47+
echo "base-tag=sha-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
48+
echo "plone-version=${{ inputs.plone-version }}" >> $GITHUB_OUTPUT
49+
50+
- uses: dorny/paths-filter@v3.0.2
51+
id: filter
52+
with:
53+
filters: |
54+
backend:
55+
- '**'
56+
- '.github/workflows/config.yml'
57+
- '.github/workflows/main.yml'
58+
docs:
59+
- '.readthedocs.yaml'
60+
- 'docs/**'
61+
- '.github/workflows/docs.yaml'
62+
63+
- name: Test vars
64+
run: |
65+
echo "base-tag: ${{ steps.vars.outputs.base-tag }}"
66+
echo 'plone-version: ${{ steps.vars.outputs.plone-version }}'
67+
echo 'event-name: ${{ github.event_name }}'
68+
echo "ref-name: ${{ github.ref_name }}"
69+
echo 'Paths - backend: ${{ steps.filter.outputs.backend }}'
70+
echo 'Paths - docs: ${{ steps.filter.outputs.docs }}'
Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
name: "cs_dynamicpages CI"
1+
name: "Main CI"
22

33
on:
44
push:
5-
6-
env:
7-
python-version: "3.12"
8-
plone-version: "6.1.2"
5+
workflow_dispatch:
96

107
jobs:
8+
119
config:
12-
runs-on: ubuntu-latest
13-
outputs:
14-
python-version: ${{ env.python-version }}
15-
plone-version: ${{ env.plone-version }}
16-
steps:
17-
- name: Test vars
18-
run: |
19-
echo 'python-version=${{ env.python-version }}'
20-
echo 'plone-version=${{ env.plone-version }}'
10+
name: "Config: Compute values used in workflow"
11+
uses: ./.github/workflows/config.yml
2112

2213
lint:
2314
name: "Backend: Lint"
@@ -28,30 +19,16 @@ jobs:
2819
python-version: ${{ needs.config.outputs.python-version }}
2920
plone-version: ${{ needs.config.outputs.plone-version }}
3021

31-
i18n:
32-
name: "Missing i18n:translate"
33-
runs-on: ubuntu-latest
34-
needs:
35-
- config
36-
37-
steps:
38-
- uses: actions/checkout@v5
39-
- name: Install uv
40-
uses: astral-sh/setup-uv@v6
41-
42-
- name: Check for untranslated strings
43-
shell: bash
44-
run: |
45-
uvx i18ndude find-untranslated -n src/
4622
test:
4723
name: "Backend: Test"
4824
needs:
4925
- config
5026
uses: plone/meta/.github/workflows/backend-pytest.yml@2.x
5127
strategy:
28+
fail-fast: false
5229
matrix:
53-
python-version: ["3.10", "3.11", "3.12", "3.13"]
54-
plone-version: ["6.1-latest", "6.0-latest"]
30+
python-version: ['3.10', '3.11', '3.12', '3.13']
31+
plone-version: ['6.2-latest', '6.1-latest', '6.0-latest']
5532
with:
5633
python-version: ${{ matrix.python-version }}
5734
plone-version: ${{ matrix.plone-version }}
@@ -61,7 +38,27 @@ jobs:
6138
uses: plone/meta/.github/workflows/backend-pytest-coverage.yml@2.x
6239
needs:
6340
- config
64-
- test
6541
with:
6642
python-version: ${{ needs.config.outputs.python-version }}
6743
plone-version: ${{ needs.config.outputs.plone-version }}
44+
45+
report:
46+
name: "Final report"
47+
if: ${{ always() }}
48+
runs-on: ubuntu-latest
49+
needs:
50+
- config
51+
- lint
52+
- test
53+
- coverage
54+
steps:
55+
- name: Report
56+
shell: bash
57+
run: |
58+
echo '# Workflow Report' >> $GITHUB_STEP_SUMMARY
59+
echo '| Job ID | Conclusion |' >> $GITHUB_STEP_SUMMARY
60+
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
61+
echo '| Config | ${{ needs.config.result }} |' >> $GITHUB_STEP_SUMMARY
62+
echo '| Lint | ${{ needs.lint.result }} |' >> $GITHUB_STEP_SUMMARY
63+
echo '| Test | ${{ needs.test.result }} |' >> $GITHUB_STEP_SUMMARY
64+
echo '| Coverage | ${{ needs.coverage.result }} |' >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)