Skip to content

Conversation

@bryevdv
Copy link
Contributor

@bryevdv bryevdv commented May 2, 2025

This PR modularizes the handling of package dependencies. Package name and dependencies are now specified declaratively as class vars:

class Legion(Package):
    name = "Legion"
    dependencies = (CUDA, GASNet, OpenMP, Python, MPI, UCX, ZLIB)

All transitive dependencies of the main package are automatically collected. Dependency package instances are still available via the deps namespace on packages, e.g. self.deps.CUDA for the Legion package above.

All package definitions except CMake and Python were removed. Once this is merged and tagged 1.2.0 a separate PR will update legate.internal to use define and use them locally from there.

This PR also enables running of unit tests in CI.

@bryevdv bryevdv requested a review from Jacobfaib May 2, 2025 17:05
@bryevdv bryevdv requested a review from Jacobfaib May 2, 2025 17:37
@bryevdv
Copy link
Contributor Author

bryevdv commented May 2, 2025

Huh @Jacobfaib any idea why this would fail only on 3.10? Alternatively, do we need to support 3.10?

=================================== FAILURES ===================================
____________________ TestDebugConfigureValue.test_help_str _____________________
self = <tests.package.test_main_package.TestDebugConfigureValue object at 0x7fd52fffdfc0>
    def test_help_str(self) -> None:
        help_str = DebugConfigureValue.help_str()
        for cmake_flg in ALL_DEBUG_CMAKE_FLAGS:
            assert cmake_flg in help_str
        for flg in ALL_DEBUG_CONFIGURE_FLAGS:
            assert flg.to_flag() in help_str
>           assert str(flg) in help_str
E           assert 'DebugConfigureValue.NONE' in "Possible values:\n- 0: ''\n- 1: '--debug-find'\n- 2: '--trace'\n- 3: '--trace-expand'"
E            +  where 'DebugConfigureValue.NONE' = str(<DebugConfigureValue.NONE: 0>)
tests/package/test_main_package.py:49: AssertionError
=========================== short test summary info ============================
FAILED tests/package/test_main_package.py::TestDebugConfigureValue::test_help_str - assert 'DebugConfigureValue.NONE' in "Possible values:\n- 0: ''\n- 1: '--debug-find'\n- 2: '--trace'\n- 3: '--trace-expand'"
 +  where 'DebugConfigureValue.NONE' = str(<DebugConfigureValue.NONE: 0>)
=================== 1 failed, 474 passed, 6 skipped in 3.17s ===================

@bryevdv
Copy link
Contributor Author

bryevdv commented May 2, 2025

I guess there were some changes to enums (and their formatting) starting in 3.11. Fixed with an explicit __str__ in a837260

@bryevdv
Copy link
Contributor Author

bryevdv commented May 2, 2025

Not sure why actionlint did not pick up the bumped action versions that were changed in the same commit. I think it will resolve when merged, though.

Edit: doh, because there is a second workflow file.... fixed in 1739d09 pushed directly to main

@bryevdv bryevdv merged commit 1a3bab5 into nv-legate:main May 2, 2025
4 of 5 checks passed
@bryevdv bryevdv deleted the bv/modularize branch May 2, 2025 18:12
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