bot-for-opensource-funding 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bot_for_opensource_funding-1.0.0/AGENTS.md +74 -0
- bot_for_opensource_funding-1.0.0/ARCHITECTURE.md +637 -0
- bot_for_opensource_funding-1.0.0/CHANGELOG.md +76 -0
- bot_for_opensource_funding-1.0.0/CODE_OF_CONDUCT.md +128 -0
- bot_for_opensource_funding-1.0.0/CONTRIBUTING.md +121 -0
- bot_for_opensource_funding-1.0.0/LICENSE +21 -0
- bot_for_opensource_funding-1.0.0/MANIFEST.in +21 -0
- bot_for_opensource_funding-1.0.0/PKG-INFO +606 -0
- bot_for_opensource_funding-1.0.0/README.md +573 -0
- bot_for_opensource_funding-1.0.0/SECURITY.md +62 -0
- bot_for_opensource_funding-1.0.0/bot_for_opensource_funding.egg-info/PKG-INFO +606 -0
- bot_for_opensource_funding-1.0.0/bot_for_opensource_funding.egg-info/SOURCES.txt +77 -0
- bot_for_opensource_funding-1.0.0/bot_for_opensource_funding.egg-info/dependency_links.txt +1 -0
- bot_for_opensource_funding-1.0.0/bot_for_opensource_funding.egg-info/entry_points.txt +2 -0
- bot_for_opensource_funding-1.0.0/bot_for_opensource_funding.egg-info/requires.txt +8 -0
- bot_for_opensource_funding-1.0.0/bot_for_opensource_funding.egg-info/top_level.txt +18 -0
- bot_for_opensource_funding-1.0.0/config.example.yaml +596 -0
- bot_for_opensource_funding-1.0.0/config_loader.py +614 -0
- bot_for_opensource_funding-1.0.0/content_engine.py +936 -0
- bot_for_opensource_funding-1.0.0/content_store.py +637 -0
- bot_for_opensource_funding-1.0.0/discovery.py +927 -0
- bot_for_opensource_funding-1.0.0/llm.py +335 -0
- bot_for_opensource_funding-1.0.0/logging_setup.py +98 -0
- bot_for_opensource_funding-1.0.0/main.py +1828 -0
- bot_for_opensource_funding-1.0.0/models.py +694 -0
- bot_for_opensource_funding-1.0.0/platforms.py +401 -0
- bot_for_opensource_funding-1.0.0/promoter.py +617 -0
- bot_for_opensource_funding-1.0.0/prompt_engine.py +441 -0
- bot_for_opensource_funding-1.0.0/publishers/__init__.py +122 -0
- bot_for_opensource_funding-1.0.0/publishers/base.py +521 -0
- bot_for_opensource_funding-1.0.0/publishers/bluesky.py +189 -0
- bot_for_opensource_funding-1.0.0/publishers/coderlegion.py +36 -0
- bot_for_opensource_funding-1.0.0/publishers/devdojo.py +33 -0
- bot_for_opensource_funding-1.0.0/publishers/devto.py +121 -0
- bot_for_opensource_funding-1.0.0/publishers/ghost.py +185 -0
- bot_for_opensource_funding-1.0.0/publishers/hashnode.py +208 -0
- bot_for_opensource_funding-1.0.0/publishers/manual.py +90 -0
- bot_for_opensource_funding-1.0.0/publishers/markdown_html.py +259 -0
- bot_for_opensource_funding-1.0.0/publishers/medium.py +166 -0
- bot_for_opensource_funding-1.0.0/publishers/substack.py +32 -0
- bot_for_opensource_funding-1.0.0/publishers/webhook.py +205 -0
- bot_for_opensource_funding-1.0.0/publishers/wordpress.py +212 -0
- bot_for_opensource_funding-1.0.0/pyproject.toml +98 -0
- bot_for_opensource_funding-1.0.0/requirements.txt +2 -0
- bot_for_opensource_funding-1.0.0/scheduler.py +348 -0
- bot_for_opensource_funding-1.0.0/senders/__init__.py +46 -0
- bot_for_opensource_funding-1.0.0/senders/email_sender.py +243 -0
- bot_for_opensource_funding-1.0.0/senders/forum_sender.py +236 -0
- bot_for_opensource_funding-1.0.0/setup.cfg +4 -0
- bot_for_opensource_funding-1.0.0/sources.py +203 -0
- bot_for_opensource_funding-1.0.0/state.py +314 -0
- bot_for_opensource_funding-1.0.0/tests/conftest.py +108 -0
- bot_for_opensource_funding-1.0.0/tests/driver.js +100 -0
- bot_for_opensource_funding-1.0.0/tests/test_config_loader.py +63 -0
- bot_for_opensource_funding-1.0.0/tests/test_content_engine.py +82 -0
- bot_for_opensource_funding-1.0.0/tests/test_content_store.py +165 -0
- bot_for_opensource_funding-1.0.0/tests/test_discovery.py +441 -0
- bot_for_opensource_funding-1.0.0/tests/test_harnesses.py +39 -0
- bot_for_opensource_funding-1.0.0/tests/test_llm.py +250 -0
- bot_for_opensource_funding-1.0.0/tests/test_main_exit_codes.py +94 -0
- bot_for_opensource_funding-1.0.0/tests/test_markdown_html.py +82 -0
- bot_for_opensource_funding-1.0.0/tests/test_new_platforms.py +394 -0
- bot_for_opensource_funding-1.0.0/tests/test_promoter.py +181 -0
- bot_for_opensource_funding-1.0.0/tests/test_publisher_payloads.py +219 -0
- bot_for_opensource_funding-1.0.0/tests/test_sources.py +145 -0
- bot_for_opensource_funding-1.0.0/tests/test_tracker.py +62 -0
- bot_for_opensource_funding-1.0.0/tests/test_web_api.py +432 -0
- bot_for_opensource_funding-1.0.0/tests/test_web_security.py +318 -0
- bot_for_opensource_funding-1.0.0/tests/test_webhook.py +295 -0
- bot_for_opensource_funding-1.0.0/tracker.py +343 -0
- bot_for_opensource_funding-1.0.0/webapp/__init__.py +13 -0
- bot_for_opensource_funding-1.0.0/webapp/auth.py +860 -0
- bot_for_opensource_funding-1.0.0/webapp/jobs.py +184 -0
- bot_for_opensource_funding-1.0.0/webapp/profiles.py +702 -0
- bot_for_opensource_funding-1.0.0/webapp/server.py +1198 -0
- bot_for_opensource_funding-1.0.0/webapp/service.py +941 -0
- bot_for_opensource_funding-1.0.0/webapp/static/app.css +324 -0
- bot_for_opensource_funding-1.0.0/webapp/static/app.js +2312 -0
- bot_for_opensource_funding-1.0.0/webapp/static/index.html +44 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Guidance for AI agents (and humans driving them) working in this repository.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
A dependency-light Python tool that promotes one open-source project two ways:
|
|
8
|
+
sponsor **outreach** (`discover → track → generate → send`) and **content
|
|
9
|
+
syndication** (`brief → draft → approve → publish → confirm`), plus an optional
|
|
10
|
+
standard-library local web wizard. Read `ARCHITECTURE.md` before changing code;
|
|
11
|
+
its *Cross-cutting invariants* section is binding.
|
|
12
|
+
|
|
13
|
+
## Environment
|
|
14
|
+
|
|
15
|
+
Python 3.10+. There is a virtualenv at `.venv`; use it directly. Runtime deps are
|
|
16
|
+
only `pyyaml` and `requests`. Node is needed only for `tests/driver.js`.
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
python -m venv .venv
|
|
20
|
+
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
Always run these on the `.venv` interpreter and from the repo root.
|
|
26
|
+
|
|
27
|
+
| Task | Command |
|
|
28
|
+
| ---- | ------- |
|
|
29
|
+
| Test | `.\.venv\Scripts\python.exe -m pytest -q` |
|
|
30
|
+
| Lint | `.\.venv\Scripts\python.exe -m ruff check .` |
|
|
31
|
+
| Run (smoke) | `.\.venv\Scripts\python.exe main.py platforms` |
|
|
32
|
+
| Run (dry, safe) | `.\.venv\Scripts\python.exe main.py run --once --dry-run` |
|
|
33
|
+
| Package | `.\.venv\Scripts\python.exe -m build` then `.\.venv\Scripts\python.exe -m twine check dist\*` |
|
|
34
|
+
| Self-tests | `.\.venv\Scripts\python.exe _selftest.py` and `_spatest.py` and `_webtest.py` |
|
|
35
|
+
| JS probe | `node tests\driver.js` |
|
|
36
|
+
|
|
37
|
+
`pytest` runs the harnesses above as subprocess guards, so the single `pytest`
|
|
38
|
+
command is the source of truth. Ruff is configured for `F` + `E9` with
|
|
39
|
+
line-length 110; `UP` is intentionally off.
|
|
40
|
+
|
|
41
|
+
Before finishing any change, run **both** `pytest` and `ruff check`, and keep
|
|
42
|
+
them green. Add or update tests for behaviour you touch.
|
|
43
|
+
|
|
44
|
+
## Conventions (do not violate)
|
|
45
|
+
|
|
46
|
+
- No new mandatory runtime dependencies. Prefer the standard library (an LLM is
|
|
47
|
+
optional and must never be required).
|
|
48
|
+
- Secrets only from environment variables; config stores env var *names*. Never
|
|
49
|
+
log or persist a secret. Use `config_loader.resolve_secret()`.
|
|
50
|
+
- JSON writes go through `state.write_json_atomic` / `AtomicJsonStore`, never in
|
|
51
|
+
place.
|
|
52
|
+
- A dry run has **no** side effects: no quota, attempts or cooldowns.
|
|
53
|
+
- Fail soft per item: record an error and continue; one bad item must not abort a
|
|
54
|
+
batch.
|
|
55
|
+
- Do **not** add comments unless asked; use clear names. Existing
|
|
56
|
+
`typing.Dict` / `typing.List` style is deliberate.
|
|
57
|
+
- The web UI and CLI call the same modules; never duplicate pipeline logic.
|
|
58
|
+
- Authorisation is decided server-side (`webapp/server.py::required_role`); the
|
|
59
|
+
SPA only hides UI.
|
|
60
|
+
|
|
61
|
+
## Extension points
|
|
62
|
+
|
|
63
|
+
- **New syndication target:** add the id to `models.PLATFORM_IDS`, a
|
|
64
|
+
`PlatformSpec` to `platforms.py`, and `publishers/<id>.py` with
|
|
65
|
+
`build(config, *, dry_run)`. Config validation, CLI and UI pick it up
|
|
66
|
+
automatically.
|
|
67
|
+
- **New prospect source:** implement the `ProspectSource` protocol in
|
|
68
|
+
`discovery.py`, returning GitHub-shaped repo dicts, and register the id in
|
|
69
|
+
`models.PROSPECT_SOURCES` + `discovery.sources_from_config`.
|
|
70
|
+
|
|
71
|
+
## Git
|
|
72
|
+
|
|
73
|
+
Do not commit, amend, push or open PRs unless explicitly asked. When asked,
|
|
74
|
+
inspect `git status` and `git diff` first and stage only intended files.
|