Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docstrings for autodoc #7436

Merged
merged 40 commits into from
Nov 25, 2022
Merged

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented Nov 14, 2022

Description

Related resources

This PR adds documentation docstring for sphinx' autodoc feature to pull from the source code.

  • In cms/models/pluginmodel.py/ it turns out that a defunct copy_plugin function was left over from versions 3.x
  • This method is not covered by tests and in its original version must fail on each single call since it accesses treebeard properties of a plugin.
  • This PR removes the CMSPlugin.copy_plugin function.
  • For naming consistency, this PR renames the function create_title to create_page_content in cms/api.py. For ensure compatibility, a create_title function is retained. It issues a deprecation warning and calls create_page_content. This will require a change in the monkey patch routine of djangocms-versioning.

Checklist

  • I have opened this pull request against develop
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

fsbraun and others added 30 commits March 23, 2022 11:36
…quest_pass or the toolbar will be wrongly configured
…ne query parameter is given. Needs to work with many
Reverse formatting change

Co-authored-by: Aiky30 <Aiky30@users.noreply.github.com>
Correct formatting

Co-authored-by: Aiky30 <Aiky30@users.noreply.github.com>
Comment above not at end of line

Co-authored-by: Aiky30 <Aiky30@users.noreply.github.com>
Update method doc
Remove trailing space
@fsbraun fsbraun marked this pull request as ready for review November 23, 2022 09:22
Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

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

This looks good @fsbraun

It doesn't need it, but it could also test that the old create_title raises the deprecation warning.

Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

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

Looks good @fsbraun

The only thing I thought of was that there could be a test for ensuring create_title raises the warning.

@fsbraun fsbraun merged commit 9945a0f into django-cms:develop-4 Nov 25, 2022
@fsbraun fsbraun deleted the docs/autosummary branch January 11, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants