Skip to content

Commit d5f091f

Browse files
committed
add
1 parent 5a1163c commit d5f091f

25 files changed

Lines changed: 2180 additions & 12 deletions

.github/copilot-instructions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# GitHub Copilot Instructions
2+
3+
Use `/home/mhaya/weko/AGENTS.md` as the canonical instruction file for this
4+
repository.
5+
6+
Before starting work, read these files in order:
7+
8+
1. `/home/mhaya/weko/AGENTS.md`
9+
2. `/home/mhaya/weko/task_plan.md`
10+
3. `/home/mhaya/weko/findings.md`
11+
4. `/home/mhaya/weko/progress.md`
12+
13+
Rules:
14+
15+
- Avoid repeating full-repository exploration for routine tasks.
16+
- Append reusable discoveries to `/home/mhaya/weko/findings.md`.
17+
- Record actions taken, tests run, and failures in
18+
`/home/mhaya/weko/progress.md`.
19+
- For multi-step work, update `/home/mhaya/weko/task_plan.md`.
20+
- Keep durable repository instructions in `AGENTS.md` and keep task-specific
21+
notes in the project-root persistent context files.

.github/pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Summary
2+
3+
Describe the change and its purpose.
4+
5+
## Persistent Context
6+
7+
- [ ] I reviewed `AGENTS.md`
8+
- [ ] I reviewed `task_plan.md`
9+
- [ ] I reviewed `findings.md`
10+
- [ ] I reviewed `progress.md`
11+
- [ ] I updated the persistent context files that changed because of this work
12+
13+
Updated files:
14+
15+
- [ ] `task_plan.md`
16+
- [ ] `findings.md`
17+
- [ ] `progress.md`
18+
- [ ] No persistent context update was needed
19+
20+
Reason if no update was needed:
21+
22+
## Validation
23+
24+
- [ ] I ran relevant tests
25+
- [ ] I did not run tests and explained why below
26+
27+
Tests run:
28+
29+
## Notes
30+
31+
Known gaps, assumptions, follow-up work, or review guidance:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Legacy SQL Policy Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
legacy-sql-policy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Check for newly added legacy SQL files
18+
run: |
19+
chmod +x scripts/check_no_new_legacy_sql.sh
20+
scripts/check_no_new_legacy_sql.sh "$BASE_REF" "$HEAD_REF"
21+
env:
22+
BASE_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
23+
HEAD_REF: ${{ github.sha }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Persistent Context Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
persistent-context:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Check persistent context updates
18+
run: |
19+
chmod +x scripts/check_persistent_context.sh
20+
scripts/check_persistent_context.sh "$BASE_REF" "$HEAD_REF"
21+
env:
22+
BASE_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
23+
HEAD_REF: ${{ github.sha }}

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,20 @@ jobs:
4747
- weko-items-ui
4848
- weko-itemtypes-ui
4949
- weko-logging
50+
- weko-notifications
5051
- weko-plugins
5152
- weko-records-ui
5253
- weko-records
5354
- weko-redis
5455
- weko-schema-ui
5556
- weko-search-ui
57+
- weko-signposting
5658
- weko-sitemap
5759
- weko-swordserver
5860
- weko-theme
5961
- weko-user-profiles
6062
- weko-workflow
63+
- weko-workspace
6164

6265
steps:
6366
- name: Checkout code

AGENTS.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,26 @@
88
- **主要ライブラリ**: Invenio 3 Framework(API,Web API用), Celery + RabbitMQ(タスクキュー)
99
- **環境設定**: 環境変数は `docker-compose2.yml` ファイルで管理(機密情報はコードに直書きしない)。サーバ固有の設定は `scripts/instance.cfg` に記載する。
1010

11+
## 継続作業の進め方 / Persistent Working Context
12+
- 今後のタスクでは、まず `AGENTS.md` を確認し、その後にプロジェクト直下の `task_plan.md``findings.md``progress.md` を読んで既存の調査結果と進捗を引き継ぐこと。
13+
- リポジトリ全体の再調査は毎回行わず、モジュール固有の追加発見のみを `findings.md` に追記すること。
14+
- 長い調査や複数ステップの改修では、`task_plan.md` にフェーズを追加し、`progress.md` に実行内容・テスト結果・失敗履歴を残すこと。
15+
- `AGENTS.md` には恒久的で高レベルな指示だけを置き、細かい調査メモや一時的な判断は `findings.md``progress.md` に残すこと。
16+
17+
## リポジトリ構造の要点 / Repository Shape
18+
- このリポジトリは単一アプリではなく、`modules/` 配下に多数の `invenio-*` / `weko-*` パッケージを含むモノレポとして扱う。
19+
- 主要な起点は `install.sh``docker-compose2.yml``run-tests.sh``README.rst``README-TEST.md` である。
20+
- 改修依頼では、まず対象モジュールを特定し、必要な範囲だけを読む。全体探索は新しい領域に入るときだけ行う。
21+
1122
## 開発環境セットアップ / Development Setup
1223
- dockerを利用する。
1324
- リポジトリのクローン後、`install.sh` コマンドを実行すると、環境構築が開始される。
1425
- 環境構築後、`https://127.0.0.1/` でサーバにアクセスすることができる。
1526

1627
## テストの実行方法 / Testing
17-
- ユニットテストを実行: `python manage.py test`
18-
(またはpytest使用時: `pytest`
28+
- リポジトリ全体の代表的なテスト入口は `./run-tests.sh` である。
29+
- 単一モジュールのテストは `python -m pytest modules/<module>` または `cd modules/<module> && python setup.py test` を基本とする。
30+
- Docker環境での手順や依存関係の補足は `README-TEST.md` を参照する。
1931
- 新機能を追加した際は必ず対応するテストコードを追加してください
2032
- テストが全てパスすることを確認してから変更を確定します
2133

@@ -36,4 +48,4 @@
3648
- **タイトル形式**: `feat: 機能概要` のように、プレフィックスと簡潔な説明を書いてください
3749
- **事前チェック**: コードを提出する前に `flake8``pytest` を実行し、エラーやテスト失敗がないことを確認しましょう
3850
- **差分の範囲**: 1つのPRは関連する変更に留め、小さくまとまった変更を心がけてください(大規模な変更は分割を検討)
39-
- **説明コメント**: PRの説明欄には変更内容と目的、動作確認の方法を簡潔に記述してください
51+
- **説明コメント**: PRの説明欄には変更内容と目的、動作確認の方法を簡潔に記述してください

CLAUDE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Claude Code Workflow
2+
3+
Use `/home/mhaya/weko/AGENTS.md` as the canonical instruction file for this
4+
repository.
5+
6+
Before starting work, read these files in order:
7+
8+
1. `/home/mhaya/weko/AGENTS.md`
9+
2. `/home/mhaya/weko/task_plan.md`
10+
3. `/home/mhaya/weko/findings.md`
11+
4. `/home/mhaya/weko/progress.md`
12+
13+
Rules:
14+
15+
- Do not repeat broad repository discovery unless the task enters a new area.
16+
- Add reusable discoveries to `/home/mhaya/weko/findings.md`.
17+
- Add actions taken, test results, and failure history to
18+
`/home/mhaya/weko/progress.md`.
19+
- For multi-step work, update `/home/mhaya/weko/task_plan.md`.
20+
- Keep durable instructions in `AGENTS.md`; keep task-specific knowledge in the
21+
persistent context files.

CONTRIBUTING.rst

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,14 @@ Ready to contribute? Here's how to set up `weko` for local development.
6262
6363
$ git clone git@github.com:your_name_here/weko.git
6464
65-
3. Install your local copy into a virtualenv. Assuming you have
66-
virtualenvwrapper installed, this is how you set up your fork for local
67-
development:
65+
3. Set up the local development environment with Docker. The current
66+
repository workflow uses ``install.sh`` to build containers, initialize
67+
services, and populate the instance:
6868

6969
.. code-block:: console
7070
71-
$ mkvirtualenv weko
7271
$ cd weko/
73-
$ pip install -e .[all]
72+
$ ./install.sh
7473
7574
4. Create a branch for local development:
7675

@@ -86,9 +85,8 @@ Ready to contribute? Here's how to set up `weko` for local development.
8685
8786
$ ./run-tests.sh
8887
89-
The tests will provide you with test coverage and also check PEP8
90-
(code style), PEP257 (documentation), flake8 as well as build the Sphinx
91-
documentation and run doctests.
88+
For targeted module work, you can also use the module-level commands
89+
documented in ``README-TEST.md``.
9290

9391
6. Commit your changes and push your branch to GitHub:
9492

@@ -116,3 +114,30 @@ Before you submit a pull request, check that it meets these guidelines:
116114
3. The pull request should work for Python 2.7, 3.5 and 3.6. Check
117115
https://travis-ci.org/wekosoftware/weko/pull_requests
118116
and make sure that the tests pass for all supported Python versions.
117+
118+
AI-Assisted Development Workflow
119+
--------------------------------
120+
121+
When using coding agents such as Codex, Claude Code, Gemini CLI, or GitHub
122+
Copilot, follow a
123+
single shared workflow so repository knowledge accumulates instead of being
124+
rediscovered in each session.
125+
126+
1. Treat ``AGENTS.md`` as the canonical agent instruction file.
127+
2. Before starting work, read ``AGENTS.md`` and then the project-root files
128+
``task_plan.md``, ``findings.md``, and ``progress.md``.
129+
3. Do not repeat full-repository exploration on every task. Read only the
130+
target module and the files needed for the current change.
131+
4. Append reusable discoveries to ``findings.md``.
132+
5. Record actions taken, tests run, and failures encountered in
133+
``progress.md``.
134+
6. For multi-step work, add or update phases in ``task_plan.md``.
135+
7. Keep ``AGENTS.md`` short and durable. Store temporary investigation notes in
136+
``findings.md`` and ``progress.md`` instead of expanding ``AGENTS.md``.
137+
138+
Pull requests should state:
139+
140+
* Which persistent context files were reviewed.
141+
* Which persistent context files were updated.
142+
* What tests were run.
143+
* Any known gaps, assumptions, or follow-up work.

GEMINI.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Gemini CLI Workflow
2+
3+
Use `/home/mhaya/weko/AGENTS.md` as the canonical instruction file for this
4+
repository.
5+
6+
Before starting work, read these files in order:
7+
8+
1. `/home/mhaya/weko/AGENTS.md`
9+
2. `/home/mhaya/weko/task_plan.md`
10+
3. `/home/mhaya/weko/findings.md`
11+
4. `/home/mhaya/weko/progress.md`
12+
13+
Rules:
14+
15+
- Avoid repeating full-repository exploration for routine tasks.
16+
- Append reusable project discoveries to `/home/mhaya/weko/findings.md`.
17+
- Record actions, tests, and errors in `/home/mhaya/weko/progress.md`.
18+
- Update `/home/mhaya/weko/task_plan.md` for multi-step work.
19+
- Treat `AGENTS.md` as the durable source of instructions and the three
20+
project-root markdown files as persistent working memory.

docs/ci_test_inventory.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# CI Test Inventory
2+
3+
<!-- This file is generated by `python3 scripts/generate_ci_test_inventory.py`. -->
4+
5+
This page compares the current unit-test workflow matrix with actual module test assets.
6+
Use it as the starting point when deciding what should run in CI and what still needs cleanup.
7+
8+
## Summary
9+
10+
- Total modules under `modules/`: 47
11+
- Modules with `tox.ini`: 47
12+
- Modules with `tests/`: 46
13+
- Modules in `.github/workflows/unit-tests.yml`: 47
14+
- Modules selected by `run-tests.sh`: 46
15+
- Unit CI covered modules (`tox.ini` + `tests/` + matrix entry): 46
16+
- Missing from unit CI despite `tox.ini` + `tests/`: 0
17+
- Matrix entries without `tests/`: 1
18+
- `tox.ini` without `tests/`: 0
19+
- `tests/` without `tox.ini`: 0
20+
21+
## Modules Missing From The Unit-Test Matrix
22+
23+
- None
24+
25+
## Matrix Entries Without tests/
26+
27+
- `weko-redis`: CI matrix should explicitly justify this module or remove it from unit scope.
28+
29+
## Modules With tests/ But No tox.ini
30+
31+
- None
32+
33+
## Module Inventory
34+
35+
| Module | tox.ini | tests/ | unit matrix | run-tests.sh | status |
36+
|--------|---------|--------|-------------|--------------|--------|
37+
| invenio-accounts | yes | yes | yes | yes | covered-by-unit-ci |
38+
| invenio-communities | yes | yes | yes | yes | covered-by-unit-ci |
39+
| invenio-db | yes | yes | yes | yes | covered-by-unit-ci |
40+
| invenio-deposit | yes | yes | yes | yes | covered-by-unit-ci |
41+
| invenio-files-rest | yes | yes | yes | yes | covered-by-unit-ci |
42+
| invenio-iiif | yes | yes | yes | yes | covered-by-unit-ci |
43+
| invenio-indexer | yes | yes | yes | yes | covered-by-unit-ci |
44+
| invenio-mail | yes | yes | yes | yes | covered-by-unit-ci |
45+
| invenio-oaiharvester | yes | yes | yes | yes | covered-by-unit-ci |
46+
| invenio-oaiserver | yes | yes | yes | yes | covered-by-unit-ci |
47+
| invenio-oauth2server | yes | yes | yes | yes | covered-by-unit-ci |
48+
| invenio-previewer | yes | yes | yes | yes | covered-by-unit-ci |
49+
| invenio-queues | yes | yes | yes | yes | covered-by-unit-ci |
50+
| invenio-records | yes | yes | yes | yes | covered-by-unit-ci |
51+
| invenio-records-rest | yes | yes | yes | yes | covered-by-unit-ci |
52+
| invenio-resourcesyncclient | yes | yes | yes | yes | covered-by-unit-ci |
53+
| invenio-resourcesyncserver | yes | yes | yes | yes | covered-by-unit-ci |
54+
| invenio-s3 | yes | yes | yes | yes | covered-by-unit-ci |
55+
| invenio-stats | yes | yes | yes | yes | covered-by-unit-ci |
56+
| weko-accounts | yes | yes | yes | yes | covered-by-unit-ci |
57+
| weko-admin | yes | yes | yes | yes | covered-by-unit-ci |
58+
| weko-authors | yes | yes | yes | yes | covered-by-unit-ci |
59+
| weko-bulkupdate | yes | yes | yes | yes | covered-by-unit-ci |
60+
| weko-deposit | yes | yes | yes | yes | covered-by-unit-ci |
61+
| weko-gridlayout | yes | yes | yes | yes | covered-by-unit-ci |
62+
| weko-groups | yes | yes | yes | yes | covered-by-unit-ci |
63+
| weko-handle | yes | yes | yes | yes | covered-by-unit-ci |
64+
| weko-index-tree | yes | yes | yes | yes | covered-by-unit-ci |
65+
| weko-indextree-journal | yes | yes | yes | yes | covered-by-unit-ci |
66+
| weko-items-autofill | yes | yes | yes | yes | covered-by-unit-ci |
67+
| weko-items-ui | yes | yes | yes | yes | covered-by-unit-ci |
68+
| weko-itemtypes-ui | yes | yes | yes | yes | covered-by-unit-ci |
69+
| weko-logging | yes | yes | yes | yes | covered-by-unit-ci |
70+
| weko-notifications | yes | yes | yes | yes | covered-by-unit-ci |
71+
| weko-plugins | yes | yes | yes | yes | covered-by-unit-ci |
72+
| weko-records | yes | yes | yes | yes | covered-by-unit-ci |
73+
| weko-records-ui | yes | yes | yes | yes | covered-by-unit-ci |
74+
| weko-redis | yes | no | yes | no | matrix-entry-without-tests |
75+
| weko-schema-ui | yes | yes | yes | yes | covered-by-unit-ci |
76+
| weko-search-ui | yes | yes | yes | yes | covered-by-unit-ci |
77+
| weko-signposting | yes | yes | yes | yes | covered-by-unit-ci |
78+
| weko-sitemap | yes | yes | yes | yes | covered-by-unit-ci |
79+
| weko-swordserver | yes | yes | yes | yes | covered-by-unit-ci |
80+
| weko-theme | yes | yes | yes | yes | covered-by-unit-ci |
81+
| weko-user-profiles | yes | yes | yes | yes | covered-by-unit-ci |
82+
| weko-workflow | yes | yes | yes | yes | covered-by-unit-ci |
83+
| weko-workspace | yes | yes | yes | yes | covered-by-unit-ci |

0 commit comments

Comments
 (0)