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

Conda forge #56

Open
thewchan opened this issue Aug 28, 2022 · 6 comments
Open

Conda forge #56

thewchan opened this issue Aug 28, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@thewchan
Copy link

Hello! I have successfully put this package on to Conda Forge, and I have extending the invitation for the owner/maintainers of this package to be maintainers on Conda Forge as well. Let me know if you are interested! Thanks.
https://github.com/conda-forge/redmail-feedstock

@thewchan thewchan added the enhancement New feature or request label Aug 28, 2022
@Miksus
Copy link
Owner

Miksus commented Aug 29, 2022

Hi!

Thanks a lot! I once tried to include Red Mail to Conda but that attempt failed.

A minor thing but it seems the tests for some reason thinks Pandas is installed even if it is not:

conda create --name py38 python=3.8
conda activate py38
conda install --channel=conda-forge redmail
conda install pytest
python -m pytest --pyargs redmail

image

Note the importorskip. All of the failures are because of this and if you install pandas, then all my tests passed. It seems this error has no impact on using the library (with or without Pandas).

@thewchan
Copy link
Author

I will look into this. I take this as you'd @Miksus like be a maintainer on the Redmail feedstock on Conda Forge? It requires very little work as all updates are done automatically, our role is just checking the PRs as they are generated by bots and update them as necessary.

@thewchan
Copy link
Author

@Miksus I am unable to reproduce this?

image

@thewchan
Copy link
Author

it did skip a handful of tests and I'm not sure if that is intended

@Miksus
Copy link
Owner

Miksus commented Aug 29, 2022

@thewchan thanks and I can indeed be a maintainer in that as well. I have a habit of doing some sanity checks to a build after a release so I can also check the Conda version every once in a while. Did the release in Conda require any additional steps by the way?

And about the issue: the tests include also tests related to Matplotlib, Pandas and Pillow. These are not hard dependencies (as this is just an email sender) but Red Mail allows you to pass Pandas dataframe as an attachment (which is converted to bytes of corresponding file format) or Matplotlib figure/Pillow image as an embedded image. There are tests for these cases as well which are skipped in case these optional dependencies are not installed. This is the reason for the skipped tests you see above and that's indeed intended (if those dependencies are not installed).

The error seems to be on my end though. I just created a new empty environment and I can still import pandas in it but the package has nothing inside, so basically it's just an empty namespace for some reason also in a fresh environment. Seems I have simply messed again my Anaconda somehow, Maybe the sys.path points to an odd place where there is an empty Pandas package.

Thanks again for spending the time and effort for having Red Mail to Conda Forge! Shall I close the ticket or do you think there is more to discuss/missing?

@thewchan
Copy link
Author

@Miksus I can add you as a maintainer, thanks!

As for optional dependencies; different contributors have different a philosophy about this on Conda Forge, but I tend to NOT package in optional dependencies into the prebuild binaries in cases like this. However, in the Conda recipe, there is an option to tell the CI to install addition dependencies for testing purposes, which would not impact the package on Conda itself.

As for your error, it seems like something might be leaking between your conda environments, I would do a conda clean and check your environment in the file system and see if there are any remnants that could have caused this. Also (sorry if this seems obvious) be sure to check you are on the newest version of conda by doing conda update conda!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants