pytest-html icon indicating copy to clipboard operation
pytest-html copied to clipboard

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

Open Kuper101 opened this issue 2 years ago • 13 comments

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_redact_list

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

Kuper101 avatar Apr 13 '22 15:04 Kuper101

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

The-Compiler avatar Apr 13 '22 15:04 The-Compiler

@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

Kuper101 avatar Apr 14 '22 05:04 Kuper101

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

asottile avatar Apr 18 '22 14:04 asottile

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.

Zac-HD avatar Apr 19 '22 03:04 Zac-HD

@Zac-HD Thanks for the clarification.

Kuper101 avatar Apr 19 '22 06:04 Kuper101

I wonder how to solve this. 🤔

BeyondEvil avatar Apr 19 '22 07:04 BeyondEvil

@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.

BeyondEvil avatar Jul 02 '22 00:07 BeyondEvil

@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?

davehunt avatar Jul 04 '22 14:07 davehunt

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.

ssbarnea avatar Jul 04 '22 14:07 ssbarnea

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

BeyondEvil avatar Jul 04 '22 14:07 BeyondEvil

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.

ssbarnea avatar Jul 04 '22 14:07 ssbarnea

Which server on IRC?

BeyondEvil avatar Jul 04 '22 14:07 BeyondEvil

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.

ssbarnea avatar Jul 04 '22 14:07 ssbarnea