AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
941 stars 335 forks source link

Introducing "testing" object #1740

Open fabal opened 5 months ago

fabal commented 5 months ago

Introducing a testing object available in late bindings, similar to the building object, but indicating a rez-test context.

linux-foundation-easycla[bot] commented 5 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.71%. Comparing base (e215a77) to head (6fbc8e3). Report is 7 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1740 +/- ## ========================================== + Coverage 58.39% 58.71% +0.32% ========================================== Files 126 126 Lines 17205 17208 +3 Branches 3519 3519 ========================================== + Hits 10047 10104 +57 + Misses 6491 6394 -97 - Partials 667 710 +43 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fabal commented 5 months ago

I think early bound attributes are not relevant to rez-test scenarios because they're flattened upon install, meaning any logic will go away anyway. Unless I'm missing something?

I thought about adding some unit tests but I couldn't find counterparts for building use cases? Unless there aren't any?

fnaum commented 5 months ago

I also think that testing does not make sense in @early, as we early decorated functions are evaluated at build time. so even if we add the object there it would always be false.

JeanChristopheMorinPerso commented 4 months ago

Oh, yeah, you are right about @early, by bad.

As for the tests, I don't think there is any for building and we also don't have tests for rez-test. So it could be a good occasion to add some rez-tests tests.

fabal commented 4 months ago

Sounds good, we've carved out some time to add a few unit tests.

JeanChristopheMorinPerso commented 3 months ago

@fabal @fnaum @nca45 can one of you enable the "allow maintainers to modify the PR" option please? I'll take care of the failing tests.

fabal commented 3 months ago

I can't seem to see or have access to this option @JeanChristopheMorinPerso

JeanChristopheMorinPerso commented 3 months ago

Ah, that only works for user-owned forks, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork. This PR comes from AL's fork. That's unfortunate.

I'll find a way to fix the tests and will post the diff.

JeanChristopheMorinPerso commented 2 months ago

Tests are not working on macOS! I can probably merge the PR as is and I'll handle the linter stuff.

JeanChristopheMorinPerso commented 2 months ago

The windows tests are now failing though. Argh. Anyway, at this point, I think I'll just merge this and will handle the rest in another PR.

fabal commented 1 month ago

Hi @JeanChristopheMorinPerso , did you need something from us to be able to merge this?

JeanChristopheMorinPerso commented 1 month ago

Hi @fabal, thanks for the reminder. The last couple of months have been very busy and intense for us. We didn't have the time to push your PR to the finish line unfortunately.

I'm definitely planning on releasing your PR in the next release.