Lemmons / pytest-raises

An implementation of pytest.raises as a pytest.mark fixture
MIT License
19 stars 8 forks source link

Release a new version to silence pytest mark register warnings #19

Closed madison-ookla closed 4 years ago

madison-ookla commented 5 years ago

Hello! Would it be possible to release a new version of this package to silence the PytestUnknownMarkWarnings that are being emitted by v0.10? I'm currently getting this:

============================================================================================================================== warnings summary ===============================================================================================================================
/Users/matthew/programs/anaconda3/envs/extracts/lib/python3.7/site-packages/_pytest/mark/structures.py:332
  /Users/matthew/programs/anaconda3/envs/extracts/lib/python3.7/site-packages/_pytest/mark/structures.py:332: PytestUnknownMarkWarning: Unknown pytest.mark.raises - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html

I see that you've already update the code to register these marks appropriately: https://github.com/Lemmons/pytest-raises/blob/master/pytest_raises/pytest_raises.py#L293-L307

madison-ookla commented 4 years ago

@Lemmons Wanted to bump this :) I just ran into this again and found my way back here in an attempt to identify the issue

ChrisBarker-NOAA commented 4 years ago

Ping! One more time -- a new release would be nice.

Do you want help? Or will we need to make a fork?

-CHB

svenevs commented 4 years ago

@Lemmons deployment is currently impossible without your intervention. Options I see:

  1. Add me as a maintainer on PyPI so I can manually release, and at a later time fix the tagged deployment with Travis. I am svenevs on PyPI. The travis deployment is failing on bad authentication (maybe you changed your PyPI password?).
  2. If you create a PyPI token and add it to the "secret store" (Settings -> Secrets) and save it as pypi_password then I can create a GitHub action using ${{ secrets.pypi_password }} without ever knowing or seeing it (also never visible in the logs, they did a great job with the secrets in GH Actions). We can continue to do tagged releases and deploy to pypi on pushed tag.
  3. If you do not desire to be bothered by this repo anymore, transfer it to me.

I would prefer (2), the GitHub Actions capabilities are really quite slick :slightly_smiling_face: But right now I cannot get a new release out. Thanks for your help!

svenevs commented 4 years ago

Also worth mentioning in the meantime that since this is indeed currently fixed on master, in your CI you can use pip install git+https://github.com/Lemmons/pytest-raises.git (or put git+https://github.com/Lemmons/pytest-raises.git in your requirements.txt etc) to get pytest to be more happy.

ChrisBarker-NOAA commented 4 years ago

I know, but I really don't like having production code depend on install-master-from-git projects!

And I'd like to get a conda-forge package up to date as well, which I also do not want to do with a master version!

Now that I think about it -- a release on giHub would be great, if we can't get PyPi updated just yet.

madison-ookla commented 4 years ago

Another workaround I've found is to add the following to your pytest.ini:

[pytest]
markers = raises: check exception on parametrization

This silences the warnings from pytest under the current PyPI version.

madison-ookla commented 4 years ago

@svenevs Do you have any way to contact @Lemmons outside of GitHub? They appear to be unresponsive here...I wonder if it might be best just to fork at this point.

svenevs commented 4 years ago

I have a reminder set to reach out on Wednesday. Given the above workaround(s) and lack of knowledge of how the pandemic may be affecting Scott, I don't want to do anything hasty.

That said, if we end up forking let's do it together / have a couple people "on staff". This package doesn't need much maintenance other than making sure it continues to work with newer pytest which has so far been a non-issue :slightly_smiling_face:

madison-ookla commented 4 years ago

I have a reminder set to reach out on Wednesday. Given the above workaround(s) and lack of knowledge of how the pandemic may be affecting Scott, I don't want to do anything hasty.

Fair point!

That said, if we end up forking let's do it together / have a couple people "on staff". This package doesn't need much maintenance other than making sure it continues to work with newer pytest which has so far been a non-issue 🙂

I totally agree. If you're alright with having me "on staff" (albeit under a different account, @AetherUnbound) I would be more than happy to contribute to any further maintenance this library would need! And we can set that repo up with GitHub Actions so none of us have to worry about sharing secrets 🙂

ChrisBarker-NOAA commented 4 years ago

Agreed -- no need to be in a hurry.

But if it comes to a fork, I'm happy to be a maintainer.

Lemmons commented 4 years ago

Appogies. It's been a crazy few months, as everyone is aware. I'll try to get to this tonight. Also I will be happy to add some maintainers.

On Tue, Apr 21, 2020 at 09:55 Chris Barker notifications@github.com wrote:

Agreed -- no need to be in a hurry.

But if it comes to a fork, I'm happy to be a maintainer.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Lemmons/pytest-raises/issues/19#issuecomment-617283433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR4F6XBQI5OELCFPM5XNV3RNXFXHANCNFSM4IJ2JX4Q .

ChrisBarker-NOAA commented 4 years ago

Good news, good to hear you are well and active :-)

Lemmons commented 4 years ago

alright, @svenevs I have done both, made you a collaborator on pypi and added a token for pypi to the secret store. Honestly, its been a long time since I have focused on python development and package deployment, and it's showing in the neglect here.

AetherUnbound commented 4 years ago

alright, @svenevs I have done both, made you a collaborator on pypi and added a token for pypi to the secret store. Honestly, its been a long time since I have focused on python development and package deployment, and it's showing in the neglect here.

We all greatly appreciate your effort! Thanks for taking the time to set this up :)

ChrisBarker-NOAA commented 4 years ago

So will someone be able to do a release on gitHub?

Thanks, -CHB

svenevs commented 4 years ago

Quick update before next meeting, thanks for adding me Scott glad to hear you are OK!!! I will setup tagged deployment via GitHub Actions this afternoon :slightly_smiling_face:

svenevs commented 4 years ago

Sorry for delay, been a long day... and also for spamming this repo if you are watching it. It probably shouldn't have taken #22, #23, #24, #25, #26 to get to this point LOL! But we are alas deployed!!!

CI stuff often ends up being trial-by-fire.

@ChrisBarker-NOAA the 0.11 tag will remain here now / the associated .zip or .tar.gz. My understanding is you are maintaining the conda release, is there anything that should be added to this repo to make that easier?

Honestly, its been a long time since I have focused on python development and package deployment, and it's showing in the neglect here.

@Lemmons totally understandable, I love python dearly but the packaging stuff is still rather divided right now ... it can be hard to keep up. Thanks again for helping us get this out :heart:

ChrisBarker-NOAA commented 4 years ago

@svenevs: Thanks! the gitHub release is fine.

conda-forge can pull from gitHub or PyPi (Or others) -- so we're good to go. I jsut merged the build for this version.

Thanks All!