Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable Building ANA C extension on windows (and other tweaks)#8372

Merged
nabobalis merged 16 commits into
sunpy:mainfrom
nabobalis:ana_wind
Oct 29, 2025
Merged

Enable Building ANA C extension on windows (and other tweaks)#8372
nabobalis merged 16 commits into
sunpy:mainfrom
nabobalis:ana_wind

Conversation

@nabobalis
Copy link
Copy Markdown
Member

@nabobalis nabobalis commented Oct 8, 2025

This PR fixes the runtime error on windows that's stopped us compiling the ANA C extension for windows.

It also reverts the API changes in #8376 as they are not compatible with our deprecation policy and they don't add enough to do a deprecation (in @Cadair's opinion).

@nabobalis nabobalis added io Affects the io submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers) labels Oct 8, 2025
Comment thread .pre-commit-config.yaml Outdated
@nabobalis nabobalis requested a review from Copilot October 8, 2025 19:26

This comment was marked as outdated.

@nabobalis nabobalis requested a review from Copilot October 8, 2025 19:47

This comment was marked as outdated.

@nabobalis nabobalis requested a review from Copilot October 8, 2025 19:50
@nabobalis nabobalis changed the title lmao ANA Updates Oct 8, 2025

This comment was marked as outdated.

Comment thread pyproject.toml
@nabobalis nabobalis marked this pull request as ready for review October 8, 2025 22:17
Comment thread sunpy/io/setup_package.py Outdated
Comment thread sunpy/io/setup_package.py Outdated
Comment thread sunpy/io/setup_package.py Outdated
Comment thread .github/workflows/ci.yml Outdated
Copy link
Copy Markdown
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, one big stumbling block for this:

The local developer experience on windows just got real bad. I tried to compile this on my pet windows VM and it was a nightmare, I'm still not entirely sure how I managed to make it work after fumbling around in the dark for a while.

I think we need one or both of these two things before we can merge this:

  • Tested install instructions on how to get a functioning toolchain on windows.
  • An automatic way to skip building the C extension on windows if it can't find a compiler.

@nabobalis
Copy link
Copy Markdown
Member Author

Thats just how windows is. So either we drop this idea or we just tell people to suck it up.

@Cadair
Copy link
Copy Markdown
Member

Cadair commented Oct 9, 2025

I mean to a small extent yes, but also no. By merging this we are going to get a lot more questions for people on windows trying to setup a dev env for the first time. For the sake of our future selves we want to mitigate this somehow.

@nabobalis
Copy link
Copy Markdown
Member Author

By telling people to not use windows.

@Cadair
Copy link
Copy Markdown
Member

Cadair commented Oct 9, 2025

Some of the tests are being skipped on windows:

[gw3] [  7%] PASSED ..\..\.tox\py312\Lib\site-packages\sunpy\io\_fits.py::sunpy.io._fits.extract_waveunit 
..\..\.tox\py312\Lib\site-packages\sunpy\io\ana.py::sunpy.io.ana.get_header 
[gw3] [  7%] SKIPPED ..\..\.tox\py312\Lib\site-packages\sunpy\io\ana.py::sunpy.io.ana.get_header 
..\..\.tox\py312\Lib\site-packages\sunpy\io\ana.py::sunpy.io.ana.read 
[gw3] [  7%] SKIPPED ..\..\.tox\py312\Lib\site-packages\sunpy\io\ana.py::sunpy.io.ana.read 
[gw0] [  7%] PASSED ..\..\.tox\py312\Lib\site-packages\sunpy\coordinates\tests\test_frames.py::test_angular_radius 
..\..\.tox\py312\Lib\site-packages\sunpy\io\ana.py::sunpy.io.ana.write 
..\..\.tox\py312\Lib\site-packages\sunpy\coordinates\tests\test_frames.py::test_angular_radius_no_observer 
[gw3] [  7%] SKIPPED ..\..\.tox\py312\Lib\site-packages\sunpy\io\ana.py::sunpy.io.ana.write 

Perhaps we want to disable automatic ana test skipping now they should always run on all 3 platforms?

@nabobalis
Copy link
Copy Markdown
Member Author

THose examples in the docstrings are just bad anyway, I will remove them. They should be skipped on all platforms

@nabobalis nabobalis requested a review from Cadair October 9, 2025 18:37
@nabobalis nabobalis modified the milestone: 7.1.0 Oct 9, 2025
@Cadair Cadair self-assigned this Oct 22, 2025
@Cadair Cadair added this to the 7.1.0 milestone Oct 22, 2025
@Cadair Cadair changed the title ANA Updates Enable Building ANA C extension on windows (and other tweaks) Oct 29, 2025
@Cadair Cadair added the Run publish Run publish CI on this PR. label Oct 29, 2025
Comment thread docs/dev_guide/contents/newcomers.rst Outdated
Comment thread docs/dev_guide/contents/newcomers.rst Outdated
Copy link
Copy Markdown
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I addressed my own concerns with documentation, it would be nice if people could check it.

@nabobalis nabobalis merged commit 47ffcdd into sunpy:main Oct 29, 2025
54 of 59 checks passed
@nabobalis nabobalis deleted the ana_wind branch October 29, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

io Affects the io submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers) Run publish Run publish CI on this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants