pytest-dev / pytest-html

Plugin for generating HTML reports for pytest results
Other
702 stars 235 forks source link

Documentation should not list unreleased features (such as config option `environment_table_redact_list`) #511

Open Kuper101 opened 2 years ago

Kuper101 commented 2 years ago

Hi, I tried setting the environment_table_redact_list in variable in my pytest.ini file order to remove certain rows from the Environment table and got the following error: _PytestConfigWarning: Unknown config option: environment_table_redactlist

pytest.ini content: [pytest] environment_table_redact_list = Packages

Output of pip list: Package Version


attrs 21.4.0 iniconfig 1.1.1 numpy 1.22.3 packaging 21.3 pandas 1.4.2 pexpect 4.8.0 pip 22.0.4 pkg_resources 0.0.0 pluggy 1.0.0 ptyprocess 0.7.0 py 1.11.0 pyparsing 3.0.8 pyserial 3.5 pytest 7.1.1 pytest-html 3.1.1 pytest-metadata 2.0.1 pytest-timeout 2.1.0 python-dateutil 2.8.2 pytz 2022.1 setuptools 44.0.0 six 1.16.0 tomli 2.0.1

python 3.8.10 on Ubuntu 20.04

The-Compiler commented 2 years ago

pytest itself doesn't have a thing called environment_table_redact_list. Where do you expect that to come from?

Kuper101 commented 2 years ago

@The-Compiler I got it from the pytest-html documentation, in the section that specifies how to change the environment table in the html report: https://pytest-html.readthedocs.io/en/latest/user_guide.html#environment

Adding the following to pytest.ini file should remove some of the rows in the table: [pytest] environment_table_redact_list = ^foo$ .*redact.* bar

asottile commented 2 years ago

@Kuper101 I suspect you don't have pytest-html installed then?

Zac-HD commented 2 years ago

They do have pytest-html installed - it's in the provided pip list output - but the new config option was only added very recently and has not yet been released!

I suppose it's a documentation bug for pytest-html to be documenting unreleased config options, so I'll move the issue over there.

Kuper101 commented 2 years ago

@Zac-HD Thanks for the clarification.

BeyondEvil commented 2 years ago

I wonder how to solve this. 🤔

BeyondEvil commented 2 years ago

@davehunt Hey, need some help here.

I see there's a webhook for read-the-docs. Do I need a login or something and fix this from their side? I'm guessing for some reason they're sourcing from master branch instead of the latest tag.

Or am I missing something? I couldn't find anything obvious in the source in the repo.

davehunt commented 2 years ago

@BeyondEvil I don't have pytest-html listed as one of my projects at https://readthedocs.org/dashboard/ so perhaps someone else set that up? I see https://readthedocs.org/projects/pytest-html/ lists @ssbarnea and @gnikonorov. Perhaps they can help?

ssbarnea commented 2 years ago

While I do have limited time, I will try to help. What i find confusing is that i see lots of changes being merged without required labels, so the draft release notes are confusing: https://github.com/pytest-dev/pytest-html/releases

Anything that does not affect what we ship/package, should have skip-changelog, so it does not endup polluting release notes.

BeyondEvil commented 2 years ago

Is the release-drafter and/or notes in any way related to readthedocs?

Because readthedocs shouldn’t source the docs from master but from the latest published tag.

Can you add davehunt and myself to readthedocs for this plugin?

@ssbarnea

ssbarnea commented 2 years ago

Sure, let me check. Also it may prove useful if you can join #pytest on irc/matrix/gitter (they are mirrored) so we can do whatever else is needed.

BeyondEvil commented 2 years ago

Which server on IRC?

ssbarnea commented 2 years ago

I added both of you on RTD. Re irc, I do not know, i think I may have made a mistake, probably the channel works only on matrix and gitter. Main address appears as #pytest:matrix.org.