Skip to content

Project tooling: pyproject.toml, ruff, pre-commit, community files#74

Merged
Olshansk merged 6 commits into
mainfrom
pr/tooling
Apr 13, 2026
Merged

Project tooling: pyproject.toml, ruff, pre-commit, community files#74
Olshansk merged 6 commits into
mainfrom
pr/tooling

Conversation

@oborchers
Copy link
Copy Markdown
Collaborator

Summary

Modernize project tooling with pyproject.toml as single source of truth, ruff as the single linter+formatter (replacing black+isort), and standard community/governance files.

Changes

Config

  • pyproject.toml: PEP 621 metadata, dependencies (replaces requirements.txt), ruff config, dev dependency group
  • .pre-commit-config.yaml: ruff lint+format, trailing whitespace, end-of-file fixer, YAML/TOML checks
  • .editorconfig: 4-space Python, 2-space YAML, tab Makefiles

Community files

  • CONTRIBUTING.md: dev setup, running feeds, code style, recommends Claude Code + Playwright MCP for new feed development
  • dependabot.yml: weekly updates for GitHub Actions and pip deps
  • pull_request_template.md: summary + changes + test plan
  • CODEOWNERS: @Olshansk and @oborchers

Dev workflow

  • Makefile: dev_setup (uv sync + pre-commit install), dev_lint (ruff check), dev_lint_fix (ruff fix + format), dev_format (alias)
  • env.mk: simplified to uv sync
  • All CI workflows: uv sync replaces uv venv + uv pip install -r requirements.txt
  • requirements.txt: deleted (pyproject.toml + uv.lock is the source of truth now)

Code quality

  • lint.yml: new CI workflow, runs ruff on PRs and pushes to main (only on .py/toml changes)
  • Ruff formatting: applied across all 22 generators + utils.py
  • Fixed SIM103 (return condition directly) in 3 files
  • Fixed SIM105 (contextlib.suppress) in anthropic_news_blog.py
  • AGENTS.md: updated dev_format reference from black/isort to ruff

Git hygiene

  • Fixed stray G character in .gitignore
  • Added feeds/.gitkeep

Test plan

  • ruff check . passes with zero errors
  • ruff format --check . passes
  • uv sync works (no build-system, non-package project)
  • Trigger Run Feeds workflow on PR branch
  • Lint CI passes on PR

🤖 Generated with Claude Code

OliverB and others added 3 commits April 13, 2026 08:22
- pyproject.toml: PEP 621 metadata, hatchling backend, ruff config,
  dependency groups for dev tooling (ruff + pre-commit)
- .pre-commit-config.yaml: ruff lint+format, trailing whitespace,
  end-of-file fixer, YAML/TOML/merge-conflict checks
- .editorconfig: 4-space Python, 2-space YAML, tab Makefiles

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CONTRIBUTING.md: dev setup, running feeds, code style, PR process,
  recommends Claude Code + Playwright MCP for new feed development
- dependabot.yml: weekly updates for GitHub Actions and pip deps
- pull_request_template.md: summary + changes + test plan checklist
- CODEOWNERS: @Olshansk and @oborchers as maintainers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- dev_setup: uv sync + pre-commit install
- dev_lint: ruff check + format check
- dev_lint_fix: ruff check --fix + format
- dev_format: alias for dev_lint_fix (backwards compatible)
- dev_deps_sync: regenerate requirements.txt from pyproject.toml
- Use uv run for all commands (consistent with CI)
- Remove check_venv guards (uv handles environments)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix pyproject.toml: remove build-system (not a package), fix
  dependencies placement, add SIM108/N812 to ignore list
- Run ruff check --fix and ruff format across all 22 generators
- Fix SIM103 (return condition directly) in 3 files
- Fix SIM105 (contextlib.suppress) in anthropic_news_blog.py
- Add .github/workflows/lint.yml: ruff check on PRs and pushes
  to main (only triggers on .py and pyproject.toml changes)
- Add feeds/.gitkeep to preserve feeds directory
- Fix stray G character in .gitignore line 2
- Update uv.lock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@oborchers oborchers marked this pull request as ready for review April 13, 2026 07:24
Olshansk and others added 2 commits April 13, 2026 09:53
…e to uv run (#75)

_tl;dr Fix generator bugs, replace `time.sleep` with proper Selenium waits, and migrate all remaining bare `python` calls to `uv run`._

## Summary

- **Fix `claude_blog.py` cache bug**: Add missing `deserialize_entries()` call — cached ISO date strings weren't converted back to datetimes before merge/sort
- **Fix `dagster_blog.py` crash**: Wrap bare `strptime` calls in try/except so unexpected date formats log a warning instead of crashing the generator
- **Replace `time.sleep` with `WebDriverWait`**: Swap fixed sleeps for explicit waits in `anthropic_news_blog.py`, `openai_research_blog.py`, and `xainews_blog.py`
- **Migrate to `uv run`**: Replace all 26 bare `python` calls in `feeds.mk`, fix `validate_feeds.yml` to install uv, update `AGENTS.md` and skill docs
- **Improve `CONTRIBUTING.md`**: Add `make help` callout, link to lint CI workflow, document agent skills

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Olshansk
Copy link
Copy Markdown
Owner

Did a review of this in #75. Going to squash & merge this into main now!

@Olshansk Olshansk merged commit 0d40401 into main Apr 13, 2026
1 check passed
@Olshansk Olshansk deleted the pr/tooling branch April 13, 2026 18:31
@oborchers oborchers mentioned this pull request Apr 18, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants