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 new plugin_name to DocSchema #242

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

sivel
Copy link
Contributor

@sivel sivel commented Jan 30, 2024

In ansible/ansible@bec27fb we added a new plugin_name field to the ansible-doc output. This PR adds this new field to the DocSchema class

See ansible/ansible-documentation#1079

@gotmax23
Copy link
Collaborator

@felixfontein, we should also consider getting rid of the extra="forbid" config. I don't think we need to be that strict here.

@sivel
Copy link
Contributor Author

sivel commented Jan 30, 2024

I'm not sure what is going on with the lint job:

nox > pylint --rcfile .pylintrc.automated src/antsibull_docs src/sphinx_antsibull_ext
************* Module antsibull_docs._pydantic_compat
src/antsibull_docs/_pydantic_compat.py:19:27: E1101: Function 'version' has no 'VERSION' member (no-member)

This seems to be indicating a change to pydantic, and nothing I've done.

@@ -619,6 +619,7 @@ class DocSchema(BaseModel):
collection: str = REQUIRED_COLLECTION_NAME_OR_EMPTY_STR_F
description: list[str]
name: str
plugin_name: str = ""
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it'd make more sense to set this to None if it's not part of the docs schema.

Suggested change
plugin_name: str = ""
plugin_name: t.Optional[str] = None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

filename is also the same, it's added by ansible-doc and not part of the docs schema itself, was following that as my example.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, fair enough.

@gotmax23
Copy link
Collaborator

This seems to be indicating a change to pydantic, and nothing I've done.

There was a new pydantic release yesterday that's likely the culprit. pydantic does some funky module-level __getattr__() stuff that sometimes confuses static analysis tools. I'm not sure why pylint thinks a module is a function...

@sivel
Copy link
Contributor Author

sivel commented Jan 30, 2024

I've pushed a fix for the pylint issue in this PR. Except for now some codecov stuff...

@gotmax23 gotmax23 requested a review from felixfontein January 30, 2024 18:33
@felixfontein
Copy link
Collaborator

@felixfontein, we should also consider getting rid of the extra="forbid" config. I don't think we need to be that strict here.

For the docs rendering part, ok. For the linting part, we must be strict.

@felixfontein
Copy link
Collaborator

Looks OK, except that it's missing a changelog fragment. I can push one.

@felixfontein felixfontein merged commit 66e3562 into ansible-community:main Jan 30, 2024
12 checks passed
@felixfontein
Copy link
Collaborator

@sivel thanks for fixing this!
@gotmax23 thanks for reviewing!

@gotmax23
Copy link
Collaborator

Thanks everyone!

jooola referenced this pull request in ansible-collections/hetzner.hcloud Feb 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[antsibull-docs](https://github.com/ansible-community/antsibull-docs)
| `>=2.6,<2.7` -> `>=2.7,<2.8` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/antsibull-docs/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/antsibull-docs/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/antsibull-docs/2.6.1/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/antsibull-docs/2.6.1/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ansible-community/antsibull-docs (antsibull-docs)</summary>

###
[`v2.7.0`](https://github.com/ansible-community/antsibull-docs/blob/HEAD/CHANGELOG.rst#v270)

[Compare
Source](https://github.com/ansible-community/antsibull-docs/compare/2.6.1...2.7.0)

\======

## Release Summary

Bugfix and refactoring release.

## Minor Changes

- Explicitly set up Galaxy context instead of relying on deprecated
functionality
([https://github.com/ansible-community/antsibull-docs/pull/234](https://github.com/ansible-community/antsibull-docs/pull/234)).

## Bugfixes

- Fix schema for `seealso` in role entrypoints. Plugin references now
work
([https://github.com/ansible-community/antsibull-docs/issues/237](https://github.com/ansible-community/antsibull-docs/issues/237),
[https://github.com/ansible-community/antsibull-docs/pull/240](https://github.com/ansible-community/antsibull-docs/pull/240)).
- Make error reporting for invalid references in `plugin` `seealso`
entries more precise
([https://github.com/ansible-community/antsibull-docs/pull/240](https://github.com/ansible-community/antsibull-docs/pull/240)).
- Support new `ansible-doc --json` output field `plugin_name`
([https://github.com/ansible-community/antsibull-docs/pull/242](https://github.com/ansible-community/antsibull-docs/pull/242)).
- Use certain fields from library context instead of app context that
are deprecated in the app context and will be removed from
antsibull-core 3.0.0
([https://github.com/ansible-community/antsibull-docs/pull/233](https://github.com/ansible-community/antsibull-docs/pull/233)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ansible-collections/hetzner.hcloud).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

3 participants