-
Notifications
You must be signed in to change notification settings - Fork 34
MSVC: Windows compatibility #351
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #351 +/- ##
==========================================
- Coverage 89.41% 89.35% -0.06%
==========================================
Files 64 64
Lines 10143 10172 +29
==========================================
+ Hits 9069 9089 +20
- Misses 1074 1083 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ad14685 to
c78d65a
Compare
|
Should add a Windows build here to prove this PR works. 😉 stcal/.github/workflows/ci.yml Line 31 in 583930c
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing!
ae3ccef to
0630d2e
Compare
c5853b4 to
3cbe979
Compare
|
Of course the moment I decide to add Windows into the mix: |
27e394b to
2b6e18b
Compare
|
You finally get to the fun stuff:
and |
* On Windows opening a directory as a file results in a "PermissionError" exception * Here we trap the exception, and if we're on Windows, check whether the file name is a directory. If so raise an "IsADirectoryError" exception
* "fname" gives us the absolute path to the file, so there's no need to list the destination directory to see if the file is in there. fname.exists will suffice.
|
Maybe this warrants a change log so Windows user can read it and be happy. |
Removes noqa comment Co-authored-by: P. L. Lim <[email protected]>
|
FWIW green job is good enough for merge. We can always follow-up later if there is any Windows intricacies to fix later (I think that is going to get smoke out if downstream also start doing regression tests in Windows 👹). But since I am not maintainers, I'll leave approval and merge to someone else. Thanks! |
Resolves SCSB-201
This PR makes it possible to compile
stcalusing MSVC/MSBuild on Windows.sys/resource.h, etc.).Tasks
docs/pageno-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see below for change types)"git+https://github.com/<fork>/stcal@<branch>")jwstregression testromancalregression testnews fragment change types...
changes/<PR#>.apichange.rst: change to public APIchanges/<PR#>.bugfix.rst: fixes an issuechanges/<PR#>.general.rst: infrastructure or miscellaneous change