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

Merge some changes of CROWN_tutorial branch with main #286

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

Conversation

tvoigtlaender
Copy link
Contributor

  • Replace "is not None" checks as lists/sets/dicts are not seen as "None", even when empty.

  • Allow for renaming of global scope and usage of no global scope by changing the setting in the analysis config.

  • Add empty build dir.

.gitignore Show resolved Hide resolved
@@ -88,7 +89,7 @@ def __init__(
self.available_scopes = set(available_scopes)
self.available_outputs: Dict[str, QuantitiesStore] = {}
self.available_shifts: Dict[str, Set[str]] = {}
self.global_scope = "global"
self.global_scope = global_scope
Copy link
Contributor

@nshadskiy nshadskiy Dec 6, 2024

Choose a reason for hiding this comment

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

If you want to do this you probably also need propagate this everywhere where "global" is explicitly used. Like here

if (scope == "global" and self.defined_for_scopes == []) or (

if producer.get_outputs("global") is not None:

as just a few examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intended change here is to only provide the option to not have a global scope at all. A more direct choice for this was implemented in Link. As of now, there is no documentation for this feature.

Renaming the global scope is not really needed in my opinion.
It is currently not possible to only have a global scope due to a separate bug that is out of the scope of this PR.
The two cases lead to a very similar outcome (Only having a single scope), but the option to not have a global scope at all leaves more options for the naming of scopes. It also works with the case in which all scopes are treated differently from the very start and no global scope would be used.

…l', False->None). Introduce more coverage for potential types in multiple 'if cases'. The handling of empty lists and boolean variables can be somewhat finicky due to the way some cases are set up. Treat with caution.
@tvoigtlaender
Copy link
Contributor Author

Some of the 'if cases' in the code make assumptions that lead to unintended consequences.

One such example:
A check of whether a variable is 'None'.
The actual value is an empty list and is therefore not 'None'.
In most cases, the handling for an empty list and a 'None' would be the same.
However, a few select places explicitly check for non-'None' empty values (like an empty list) later on and have to be treated accordingly.

tvoigtlaender and others added 8 commits December 9, 2024 04:12
…->'global', False->None). Introduce more coverage for potential types in multiple 'if cases'. The handling of empty lists and boolean variables can be somewhat finicky due to the way some cases are set up. Treat with caution."

This reverts commit 542ca2c.
…e->'global', False->None). Introduce more coverage for potential types in multiple 'if cases'. The handling of empty lists and boolean variables can be somewhat finicky due to the way some cases are set up. Treat with caution."

This reverts commit f34aa06.
* Update introduction.rst

* Update changelog.rst

* Update changelog.rst

* Update postprocessing.rst

* Update friend_trees.rst

* Update build_root.rst

* Update contrib.rst

* added missing reference

* Update contrib.rst

* Fixed references

---------

Co-authored-by: jannikdemand <[email protected]>
Co-authored-by: jannikdemand <[email protected]>
Revert "Merge changes to main in PR branch (#289)"

This reverts commit a9037aa.
@tvoigtlaender tvoigtlaender self-assigned this Dec 13, 2024
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