Skip to content

docs(societies): unify docstrings to CAMEL standard - #4307

Open
mrsparkle-70 wants to merge 2 commits into
camel-ai:masterfrom
mrsparkle-70:docstring/societies-911
Open

mrsparkle-70 wants to merge 2 commits into
camel-ai:masterfrom
mrsparkle-70:docstring/societies-911

Conversation

@mrsparkle-70

@mrsparkle-70 mrsparkle-70 commented Aug 29, 2026

Copy link
Copy Markdown

Description

This PR standardizes the docstrings in the camel/societies/ scope as part of #911.

Changes:

  • events.py: added compliant docstrings (raw r""" prefix, Attributes: sections following the style used for pydantic models elsewhere in the codebase, e.g. MemoryRecord) to all 14 event classes
  • workforce.py: added missing r""" prefixes on 14 methods; documented WorkforceSnapshot constructor params in the class docstring Args: section per the guideline
  • utils.py: added missing r""" prefixes on 10 PipelineTaskBuilder methods (Args/Returns sections already present)
  • workforce_logger.py: moved the Args: section into the class docstring per guideline point 8 (pattern matches BaseModelBackend), fixed raw prefix
  • workforce_metrics.py: added docstrings to the ABC and all abstract methods
  • workflow_memory_manager.py: fixed one nested helper docstring

No runtime behavior is changed — docstrings only.

Testing

  • All modified modules compile and import successfully on Python 3.12
  • Runtime sanity checks pass: WorkforceLogger instantiation, PipelineTaskBuilder add/fork/join/build chaining, event instantiation
  • Ran test/workforce/ suite before and after the change with identical results (34 passed; the 15 failures are pre-existing on master and require live LLM API access), confirming no regressions
  • All added docstring lines respect the 79-character limit

Refs #911

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 484b7bbb-e736-4c69-8144-be3d8276a36d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mrsparkle-70

Copy link
Copy Markdown
Author

Note on CI failures: the 7 failing checks are pre-existing upstream issues unrelated to this PR (which is docstrings-only):

  • All pytest_* jobs and the Minimal dependency check fail with ImportError: cannot import name 'FastMCP' from 'mcp.server' during collection of test/agents/, apps/, and examples/ modules — this is an upstream mcp>=1.3.0 pin resolving to mcp 2.x (which moved FastMCP), and reproduces on clean master. The failures do not touch any file in this PR.
  • add-labels fails with a 403 permission error in the label automation workflow (no permissions on fork PRs), also unrelated.

pre-commit passes. All modified modules compile, import, and pass the test/workforce/ suite identically to master (34 passed; the 15 failures require live LLM API access and are also pre-existing).

@mrsparkle-70

Copy link
Copy Markdown
Author

I opened #4308 which fixes the root cause of the collection-time failures on this PR.

Finding: all pytest_* jobs and the Minimal dependency check failed because mcp>=1.3.0 now resolves to mcp 2.x, which renamed FastMCPMCPServer (breaking camel/toolkits/base.py). PR #4308 pins mcp<2 in pyproject.toml, following the official mcp migration guide recommendation for v1 code.

Verified on PR #4308's CI: the FastMCP ImportError is gone everywhere and the Minimal dependency check now passes. The only remaining failures on fork PRs are ValueError: Missing or empty required API keys (OPENAI_API_KEY, ...) — expected, since forks don't inherit repository secrets. This PR is docstrings-only and unrelated.

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