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

Packaging QuadDType #100

Open
wants to merge 185 commits into
base: main
Choose a base branch
from
Open

Conversation

SwayamInSync
Copy link
Contributor

This PR adds the workflow for building wheels and making release for quaddtype

@@ -1,20 +1,72 @@
project('quaddtype', 'c', 'cpp', default_options : ['cpp_std=c++17', 'b_pie=true'])
project('quaddtype', 'c', 'cpp', default_options : ['cpp_std=c++20', 'b_pie=true'])
Copy link
Member

Choose a reason for hiding this comment

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

Why C++20?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting this error in windows build (MSVC)

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if that will be problematic on visual studio 2019, which is still supported aiui. If it's not an issue here on CI I think it's fine, definitely something to check about with someone who has more experience distributing wheels that depend on C++ code.

quaddtype/meson.build Outdated Show resolved Hide resolved
quaddtype/meson.build Show resolved Hide resolved
quaddtype/meson.build Outdated Show resolved Hide resolved
quaddtype/meson.build Outdated Show resolved Hide resolved
quaddtype/pyproject.toml Outdated Show resolved Hide resolved
.github/workflows/build_wheel.yml Outdated Show resolved Hide resolved
.github/workflows/build_wheel.yml Outdated Show resolved Hide resolved
- uses: actions/upload-artifact@v3
with:
path: ./quaddtype/wheelhouse/*.whl
name: wheels-windows-${{ matrix.architecture }}
Copy link
Member

@ngoldbaum ngoldbaum Aug 28, 2024

Choose a reason for hiding this comment

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

I noted the duplication about the test commands, but there's a lot of other duplication as well. Can you try to unify the logic a bit? I think in principle you could make the Mac and Linux builds identical, only conditionally setting a few environment variables differently. The Windows build needs it own separate build section, but I don't think the dependency setup, testing, or upload steps need to be repeated.

It's OK to have architecture-specific steps within a longer workflow by branching on the build platform in the build matrix like e.g. if: matrix.platform == 'win32'.

.github/workflows/build_wheel.yml Outdated Show resolved Hide resolved
.github/workflows/build_wheel.yml Outdated Show resolved Hide resolved
commit 1a6618a
Author: swayaminsync <[email protected]>
Date:   Sun Sep 22 02:19:59 2024 +0530

    missed the comma :)

commit 87a7891
Author: swayaminsync <[email protected]>
Date:   Sun Sep 22 02:16:24 2024 +0530

    updated meson.build

commit 77e25b6
Author: swayaminsync <[email protected]>
Date:   Sun Sep 22 00:53:57 2024 +0530

    made ufunc return actual value instead of 0

commit 600b2c8
Author: swayaminsync <[email protected]>
Date:   Sat Sep 21 03:06:36 2024 +0530

    fixed inter-backend cast segment fault

commit 672be17
Author: swayaminsync <[email protected]>
Date:   Sat Sep 21 00:01:39 2024 +0530

    added aligned and unaligned casting loops

commit 2fd9cad
Author: swayaminsync <[email protected]>
Date:   Fri Sep 20 21:00:45 2024 +0530

    refactoring

commit 41ca3f9
Author: swayaminsync <[email protected]>
Date:   Fri Sep 20 20:58:08 2024 +0530

    added 128-bit common constants

commit 012e90f
Merge: 082b64b bbc99a6
Author: swayaminsync <[email protected]>
Date:   Fri Sep 20 19:30:53 2024 +0530

    Merge branch 'dragon4' into constants

commit bbc99a6
Author: swayaminsync <[email protected]>
Date:   Fri Sep 20 19:27:55 2024 +0530

    fixing constant error

commit e53edba
Author: swayaminsync <[email protected]>
Date:   Fri Sep 20 17:03:24 2024 +0530

    resolved reviews

commit 082b64b
Author: swayaminsync <[email protected]>
Date:   Thu Sep 19 21:43:48 2024 +0530

    exposing constants

commit 0052e16
Author: swayaminsync <[email protected]>
Date:   Thu Sep 19 13:17:01 2024 +0530

    Creating Quad with Quad

commit 0a75b91
Author: swayaminsync <[email protected]>
Date:   Wed Sep 18 15:39:46 2024 +0530

    aligned and unaligned comparison loops

commit 707d5d6
Author: swayaminsync <[email protected]>
Date:   Wed Sep 18 13:47:32 2024 +0530

    fixed longdouble comparison casting issue

commit 4f0a604
Author: swayaminsync <[email protected]>
Date:   Tue Sep 17 21:51:17 2024 +0530

    WIP

commit 0fba040
Author: swayaminsync <[email protected]>
Date:   Tue Sep 17 18:01:14 2024 +0530

    added separate aligned and unaligned ufunc support

commit fe6cabc
Author: swayaminsync <[email protected]>
Date:   Mon Sep 16 18:40:47 2024 +0530

    removed unnecessary prints

commit b719ba4
Author: swayaminsync <[email protected]>
Date:   Mon Sep 16 18:35:54 2024 +0530

    fixing import statements

commit 25dd6b3
Author: swayaminsync <[email protected]>
Date:   Mon Sep 16 18:02:42 2024 +0530

    removing testing files

commit 0ac5464
Author: swayaminsync <[email protected]>
Date:   Mon Sep 16 15:16:12 2024 +0530

    added more unary func

commit 755e2cd
Author: swayaminsync <[email protected]>
Date:   Tue Sep 10 08:30:15 2024 +0530

    fixing base

commit 04480ce
Author: swayaminsync <[email protected]>
Date:   Sat Sep 7 18:23:20 2024 +0530

    np.dot WIP

commit 7b43f3b
Author: swayaminsync <[email protected]>
Date:   Sat Sep 7 12:58:45 2024 +0530

    fixing reduction redorderable issue

commit 22982a4
Author: swayaminsync <[email protected]>
Date:   Fri Sep 6 19:09:12 2024 +0530

    adding dragon4

commit 01e9b7e
Author: swayaminsync <[email protected]>
Date:   Fri Sep 6 12:04:01 2024 +0530

    post-cleaning

commit e8cba6a
Author: swayaminsync <[email protected]>
Date:   Thu Sep 5 14:58:47 2024 +0530

    temporary solution to handle both backends

commit 7a85fbf
Author: swayaminsync <[email protected]>
Date:   Mon Sep 2 00:24:29 2024 +0530

    removed todo comment: umath.cpp

commit d664a59
Author: swayaminsync <[email protected]>
Date:   Mon Sep 2 00:23:12 2024 +0530

    added backend parameter in default descriptor

commit 7fd8da6
Author: swayaminsync <[email protected]>
Date:   Sun Sep 1 21:14:11 2024 +0530

    failing: londouble with different dtype

commit a652985
Author: swayaminsync <[email protected]>
Date:   Sun Sep 1 12:34:59 2024 +0530

    added multi backend support to scalar operations

commit 8408227
Author: swayaminsync <[email protected]>
Date:   Sun Sep 1 04:17:31 2024 +0530

    added ld backend support to casting

commit d56e592
Author: swayaminsync <[email protected]>
Date:   Sat Aug 31 22:37:00 2024 +0530

    renaming module and adding initial longdouble backend support

commit 0a36a9d
Author: swayaminsync <[email protected]>
Date:   Sun Aug 25 12:02:33 2024 +0530

    added readme
Copy link
Member

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

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

All the build changes look much cleaner now, thanks for removing all the hardcoding. I'm glad you were able to get the wheel builds working as well.

Another followup task after this is to create a new feedstock for numpy_quaddtype on conda-forge. Since SLEEF is already packaged that should be straightforward I think. If you've never set up a conda package before I can point you at the relevant docs.

Once that's done and we have wheels up on PyPI I think we can make an announcement on the numpy mailing list asking for feedback.

user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: dist/*
Copy link
Member

Choose a reason for hiding this comment

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

@mattip when you have time, can you coordinate with Swayam to add the configuration necessary to upload to pypi at https://pypi.org/project/numpy_quaddtype/? I think these are the relevant docs.

@SwayamInSync you should also probably manually upload a numpy_quaddtype release to pypi with a tarball containingnthe current state of the main branch. Mostly just to claim the name, but I think the project may have to exist already on pypi before you can set up trusted publishing.

@SwayamInSync
Copy link
Contributor Author

All the build changes look much cleaner now, thanks for removing all the hardcoding. I'm glad you were able to get the wheel builds working as well.

Another followup task after this is to create a new feedstock for numpy_quaddtype on conda-forge. Since SLEEF is already packaged that should be straightforward I think. If you've never set up a conda package before I can point you at the relevant docs.

Once that's done and we have wheels up on PyPI I think we can make an announcement on the numpy mailing list asking for feedback.

Yeah make sense, I never set-up a conda package in past, so it'll be very helpful with the relevant docs :)

@ngoldbaum
Copy link
Member

I'll try to look at this again soon, sorry for letting it fall of my radar.

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.

2 participants