homalg-project / CAP_project

CAP project -- Categories, Algorithms, and Programming
https://homalg-project.github.io/docs/CAP_project-based/
24 stars 18 forks source link

Replace operation_weights in CategoryConstructor by a better mechanism #1678

Open zickgraf opened 5 days ago

zickgraf commented 5 days ago

When using the string "default" for createfunc*, one must now set the option underlying_category, from which the weight is determined. If createfunc* is a function, one can (optionally) set a weight by returning a pair of a string and an integer (instead of only a string).

@mohamed-barakat This PR partially implements a suggestion you had: You suggested to pass an underlying category to CategoryConstructor from which the weights can be taken. I argued that this does not make sense in general. However, while working with the weights, I noticed that it indeed does make sense in a specific case, namely when using the string "default" for createfunc*. This PR now requires to set the option underlying_category when using the string "default". This sets the correct weights, which probably requires changes like recompiling code. Please tell me when I can merge, i.e. when you have to time to adjust things in CategoricalTowers.

mohamed-barakat commented 5 days ago

Das gefällt mir sehr gut, vielen Dank. Ich bräuchte allerdings etwas Zeit um die notwendigen Anpassungen zu machen.

codecov[bot] commented 5 days ago

Codecov Report

Attention: Patch coverage is 92.10526% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.76%. Comparing base (a6ea555) to head (1dee6b0).

Files with missing lines Patch % Lines
CAP/gap/CategoryConstructor.gi 80.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1678 +/- ## ========================================== + Coverage 82.73% 82.76% +0.02% ========================================== Files 559 559 Lines 77325 77335 +10 ========================================== + Hits 63977 64006 +29 + Misses 13348 13329 -19 ``` | [Flag](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | Coverage Δ | | |---|---|---| | [ActionsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `64.09% <ø> (ø)` | | | [AttributeCategoryForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `90.45% <ø> (ø)` | | | [CAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `86.24% <92.10%> (-0.02%)` | :arrow_down: | | [CartesianCategories](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `89.43% <ø> (+0.06%)` | :arrow_up: | | [CompilerForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `95.86% <ø> (ø)` | | | [ComplexesAndFilteredObjectsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `73.60% <ø> (ø)` | | | [FreydCategoriesForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `81.98% <ø> (ø)` | | | [GeneralizedMorphismsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `61.81% <ø> (ø)` | | | [GradedModulePresentationsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `44.62% <ø> (ø)` | | | [GroupRepresentationsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `71.92% <ø> (ø)` | | | [HomologicalAlgebraForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `73.21% <ø> (ø)` | | | [InternalExteriorAlgebraForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `93.09% <ø> (ø)` | | | [LinearAlgebraForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `66.54% <ø> (ø)` | | | [ModulePresentationsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `69.88% <ø> (ø)` | | | [ModulesOverLocalRingsForCAP](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `90.70% <ø> (ø)` | | | [MonoidalCategories](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `89.84% <ø> (+0.14%)` | :arrow_up: | | [ToricSheaves](https://app.codecov.io/gh/homalg-project/CAP_project/pull/1678/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `21.79% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project#carryforward-flags-in-the-pull-request-comment) to find out more.

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