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

[python] Add Windows support for the Python API #1811

Merged
merged 34 commits into from
Dec 6, 2023

Conversation

teo-tsirpanis
Copy link
Member

@teo-tsirpanis teo-tsirpanis commented Oct 19, 2023

Issue and/or context:

Changes:

Notes for Reviewer:

SC-35700

Fixes #1360.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #35700: Implement Windows support for SOMA.

// #include "soma_object.h"
// #include "soma_sparse_ndarray.h"

#include "tiledbsoma_export.h"
Copy link
Member

@eddelbuettel eddelbuettel Oct 25, 2023

Choose a reason for hiding this comment

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

I presume that is a cmake generated file? Should we say so? A bit weird to include something not in the sources themselves but only in the build/ tree.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add a comment. We need this file to support exporting symbols in a cross-platform fashion (replacing this). The Core already has one.

Copy link
Member

Choose a reason for hiding this comment

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

Understood from what's in it but I think I have seen many other project have such #define statements in the normal include directories, no?

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for dealing with the Windows build by the way. Much appreciated.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have seen many other project have such #define statements in the normal include directories

We could do that, but having CMake generate the file automatically handles the varying platforms, compilers and static or dynamic linkage.

It now runs on `pull_request` instead of `push`, covering PRs from forks (added `workflow_dispatch` for those that might still want to run it without opening a PR), and adds a Windows matrix job (only for python 3.10 to reduce the jobs of the workflow).
Also fixed two apparent typos.
@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2023

Codecov Report

Merging #1811 (c4e871d) into main (04ab23e) will decrease coverage by 14.86%.
The diff coverage is n/a.

❗ Current head c4e871d differs from pull request most recent head 4570f96. Consider uploading reports for the commit 4570f96 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1811       +/-   ##
===========================================
- Coverage   63.11%   48.26%   -14.86%     
===========================================
  Files         106       72       -34     
  Lines       10056     6458     -3598     
===========================================
- Hits         6347     3117     -3230     
+ Misses       3709     3341      -368     
Flag Coverage Δ
python ?
r 48.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api ∅ <ø> (∅)
libtiledbsoma ∅ <ø> (∅)

@teo-tsirpanis teo-tsirpanis marked this pull request as draft November 17, 2023 15:41
And avoid allocating temporary arrays in some cases.
@teo-tsirpanis
Copy link
Member Author

The only Windows test failure was fixed by TileDB-Inc/TileDB-Py#1863. This is ready for review.

@teo-tsirpanis teo-tsirpanis marked this pull request as ready for review November 20, 2023 14:04
@teo-tsirpanis
Copy link
Member Author

CI on Windows is green. Failures seem to be network-related; one address it showed in the error message gives 404 to me as well.

@eddelbuettel
Copy link
Member

There was an entirely unrelated hickup in the CI we use for R, I just took care of that and am keeping fingers crossed for the re-run that is now happening.

@@ -151,7 +147,10 @@ def find_or_build_package_data(setuptools_cmd):
# cause that cache to fall out of sync.
#
# See `.github/workflows/python-ci-single.yml` for configuration.
subprocess.run(["./bld"], cwd=scripts_dir)
if os.name == "nt":
subprocess.run(["pwsh.exe", "./bld.ps1"], cwd=scripts_dir, check=True)
Copy link
Member

Choose a reason for hiding this comment

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

@beroy is currently working on removing the bld script and porting the cmake commands over into setup.py. I don't think anything needs to be modified in this particular PR but just letting relevant parties be aware.

Copy link
Member

@nguyenv nguyenv left a comment

Choose a reason for hiding this comment

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

Thanks!

@johnkerl
Copy link
Member

johnkerl commented Dec 6, 2023

Merging after discussion with @teo-tsirpanis and @nguyenv . cc @beroy re the additional pwsh.exe script along with bld for his setup.py refactoring.

@johnkerl johnkerl merged commit ff491ab into single-cell-data:main Dec 6, 2023
14 checks passed
@teo-tsirpanis teo-tsirpanis deleted the windows branch December 6, 2023 14:50
johnkerl added a commit that referenced this pull request Dec 6, 2023
johnkerl added a commit that referenced this pull request Dec 6, 2023
teo-tsirpanis added a commit to teo-tsirpanis/TileDB-SOMA that referenced this pull request Dec 6, 2023
teo-tsirpanis added a commit to teo-tsirpanis/TileDB-SOMA that referenced this pull request Dec 6, 2023
johnkerl pushed a commit that referenced this pull request Dec 6, 2023
* Revert "Revert "Add Windows support for the Python API (#1811)" (#1959)"

This reverts commit e231201.

* Roll back Windows CI.
@johnkerl johnkerl changed the title Add Windows support for the Python API [python] Add Windows support for the Python API Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tracker] Windows-native TileDB-SOMA
5 participants