Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2

updates:
- package-ecosystem: uv
directory: /
schedule:
interval: daily
time: "06:00"
timezone: Etc/UTC
groups:
minor-and-patch:
update-types: [minor, patch]
reviewers:
- Aureliolo
labels:
- type:chore

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
time: "06:00"
timezone: Etc/UTC
groups:
minor-and-patch:
update-types: [minor, patch]
reviewers:
- Aureliolo
labels:
- type:ci
41 changes: 41 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ci:
autoupdate_schedule: weekly
autofix_prs: true
autofix_commit_msg: "style: auto-fix pre-commit hooks"
autoupdate_commit_msg: "chore: update pre-commit hooks"
skip: [commitizen, gitleaks]

default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=1024]
- id: no-commit-to-branch
args: [--branch, main]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.3
hooks:
- id: gitleaks

- repo: https://github.com/commitizen-tools/commitizen
rev: v4.13.9
hooks:
- id: commitizen
stages: [commit-msg]
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .pre-commit-config.yaml does not include mypy as a hook, even though issue #52's acceptance criteria mentions "type checking" as one of the hooks to include. Consider adding mypy to the pre-commit hooks to catch type errors before commit. This can be done by adding a hook entry like:

- repo: https://github.com/pre-commit/mirrors-mypy
  rev: v1.19.1
  hooks:
    - id: mypy
      additional_dependencies: [pydantic]

If the omission is intentional (e.g., because mypy is slow or should only run in CI), this should be documented.

Suggested change
stages: [commit-msg]
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies: [pydantic]

Copilot uses AI. Check for mistakes.
118 changes: 118 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,121 @@ path = "src/ai_company/__init__.py"

[tool.hatch.build.targets.wheel]
packages = ["src/ai_company"]

[dependency-groups]
dev = [
"commitizen>=4.13.9",
"mypy>=1.19.1",
"pre-commit>=4.5.1",
"pre-commit-uv>=4.2.1",
"pydantic>=2.12.5",
"ruff>=0.15.4",
]
Comment on lines +27 to +35
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pydantic 2.12.5 is listed only in dev dependencies, but the mypy configuration uses the pydantic plugin suggesting it will be used in production code. According to the stored project memories, the project will use "Pydantic validation for company structure, agents, and settings" (from configuration format memory). Consider moving pydantic to the main dependencies list in pyproject.toml if it will be used in production code, not just for development/type-checking purposes.

Copilot uses AI. Check for mistakes.

# ---------------------------------------------------------------------------
# Ruff — linter + formatter (replaces flake8, isort, pyupgrade, etc.)
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py314"
line-length = 88
src = ["src", "tests"]

[tool.ruff.lint]
select = [
"F", # pyflakes
"E", "W", # pycodestyle
"C90", # mccabe complexity
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"PIE", # flake8-pie
"T20", # flake8-print
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PERF", # perflint
"FURB", # refurb
"RUF", # ruff-specific rules
"S", # flake8-bandit (security)
"FAST", # fastapi
"ASYNC", # flake8-async
"FBT", # flake8-boolean-trap
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"D", # pydocstyle
]
ignore = [
"D100", # missing docstring in public module
"D104", # missing docstring in public package
"D107", # missing docstring in __init__
"ISC001", # conflicts with ruff formatter
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert allowed in tests
"ARG", # unused arguments (fixtures)
"FBT", # boolean trap (parametrize)
"D", # no docstrings required in tests
"PLR2004", # magic values in tests
"SLF001", # private member access in tests
]
"__init__.py" = ["F401", "F403"]

[tool.ruff.lint.isort]
known-first-party = ["ai_company"]

[tool.ruff.format]
docstring-code-format = true

# ---------------------------------------------------------------------------
# mypy — static type checker (strict mode)
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.14"
strict = true
warn_return_any = true
warn_unused_configs = true
plugins = ["pydantic.mypy"]

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false

# ---------------------------------------------------------------------------
# pyright — IDE type checking only (not used in CI)
# ---------------------------------------------------------------------------
[tool.pyright]
pythonVersion = "3.14"
typeCheckingMode = "basic"
venvPath = "."
venv = ".venv"

# ---------------------------------------------------------------------------
# commitizen — conventional commits
# ---------------------------------------------------------------------------
[tool.commitizen]
name = "cz_conventional_commits"
version = "0.1.0"
version_files = ["src/ai_company/__init__.py:__version__"]
tag_format = "v$version"
Loading