-
Notifications
You must be signed in to change notification settings - Fork 6
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
Release 23.3.2+ features hidden #123
Conversation
… features turned on only in tests)
if Flags.beta_features(): | ||
heat_flux: HeatFluxType = pd.Field() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non blocking, no need to mark as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted, was listed in PRs to remove from 23.3.2 so i figured it should be blocked
if Flags.beta_features(): | ||
_dim_names.append("heat_flux") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non blocking, no need to mark as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
if Flags.beta_features(): | ||
flow360_heat_flux_unit = Flow360HeatFluxUnit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non blocking, no need to mark as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
if Flags.beta_features(): | ||
base_heat_flux: float = pd.Field(np.inf, target_dimension=Flow360HeatFluxUnit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non blocking, no need to mark as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
if Flags.beta_features(): | ||
conversion_system["heat_flux"] = "flow360_heat_flux_unit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non blocking, no need to mark as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
if Flags.beta_features(): | ||
heat_flux: HeatFluxType = pd.Field(exclude=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non blocking, no need to mark as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
if Flags.beta_features(): | ||
|
||
def get_base_heat_flux(): | ||
base_density = get_base_density() | ||
base_velocity = get_base_velocity() | ||
base_heat_flux = base_density * base_velocity**3 | ||
|
||
return base_heat_flux | ||
return base_heat_flux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to mark this as beta feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
""" | ||
Turbulence quantities parameters | ||
""" | ||
from abc import ABCMeta | ||
from typing import Optional, Union | ||
from globals.flags import Flags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just import this file under beta_features() but its definition leave unchanged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but this way the user will be able to import it directly (not from flow360 base module but from flow360.component.flow360_params.turbulence_quantities) and still use it which may not be what we want
globals/flags.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can just use ENV variable to set flag? Then we can run tests in both scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could explore this, but I think what we want would be
- Set beta_features to True
- Import flow360, run tests
- Set beta_features to False
- Import flow360 again, run tests
and its step 4 that's the main issue, as we need to reimport flow360 at some point when running tests. ENV variables would have the advantage of not requiring the globals.flags module, at the cost of setting the state permanently (right now feature flags are disabled by default unless we explicitly set them before import)
it would work if we ran a different command like
(set variable) && pytest -rA && (set variable) && pytest -rA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to environment variable: to run tests with the beta_features on we run
FLOW360_BETA_FEATURES=True pytest -rA
from .unit_system import VelocityType | ||
|
||
if os.environ.get("FLOW360_BETA_FEATURES", False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not exactly what I had in mind. Can we still use some nice wrapper, like flags.beta_features but inside it parse env variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, added a wrapper class so we still call Flags.beta_feature() in checks
741d519
to
e2ccc08
Compare
f75ec81
to
24f2017
Compare
config/flags.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is outside flow360. When publishing to PyPI this path will be excluded so I think the package will not be able to init
421696b
to
3acf056
Compare
7f803b3
to
cb3a55b
Compare
cb3a55b
to
faa3173
Compare
No description provided.