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 support for Map to load from a generator #7024
Conversation
Looks like this change has failed on the CI, this will need debugging. This will need a unit test as well to check that pathlib.glob works. |
Could you please guide me on how to write unit tests for this? |
You will want to add a unit test to https://github.com/sunpy/sunpy/blob/main/sunpy/map/tests/test_map_factory.py that basically runs some version of this code:
with the path correctly changed to use some test data. You will want to add extra unit tests to https://github.com/sunpy/sunpy/blob/main/sunpy/util/tests/test_util.py to ensure that we skip over strings correctly. Hopefully that helps. |
There are already two unit test cases for string, list, and tuples. Do you want me to add extra on top of that? |
If the tests for those are already there, then its ok. But what if you just pass in a string? The other unit tests are failing with these changes, we need to debug this. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
The last set of pushes broke the pull request, can you revert it or fix it please? |
Is it possible to delete the last commit? |
Do we not need the changes in that commit? |
The entire commit history is a bit strange right now. Seems to be repeated? |
This reverts commit fcdd7a6.
I pushed from an old branch I had locally. Not sure if it was up to date tho. |
Thanks, let me check |
I guess everything is working fine now |
Is there anything else to work on regarding this pr? |
No, it needs reviews from the other mainainters before a merge. |
Thanks for the PR @Jett-Code, sorry it took so long on our side. |
PR Description
Fixes #7022