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

Release 23.3.2+ features hidden #123

Merged
merged 17 commits into from
Jan 18, 2024
Merged

Release 23.3.2+ features hidden #123

merged 17 commits into from
Jan 18, 2024

Conversation

awkrupka
Copy link
Contributor

No description provided.

Comment on lines 784 to 785
if Flags.beta_features():
heat_flux: HeatFluxType = pd.Field()
Copy link
Collaborator

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

Copy link
Contributor Author

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

Comment on lines 805 to 806
if Flags.beta_features():
_dim_names.append("heat_flux")
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

Comment on lines 924 to 925
if Flags.beta_features():
flow360_heat_flux_unit = Flow360HeatFluxUnit()
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

Comment on lines 964 to 965
if Flags.beta_features():
base_heat_flux: float = pd.Field(np.inf, target_dimension=Flow360HeatFluxUnit)
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

Comment on lines 1002 to 1003
if Flags.beta_features():
conversion_system["heat_flux"] = "flow360_heat_flux_unit"
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

Comment on lines 1035 to 1036
if Flags.beta_features():
heat_flux: HeatFluxType = pd.Field(exclude=True)
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

Comment on lines 189 to 196
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
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

Comment on lines 1 to 4
"""
Turbulence quantities parameters
"""
from abc import ABCMeta
from typing import Optional, Union
from globals.flags import Flags
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

@awkrupka awkrupka Jan 15, 2024

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

  1. Set beta_features to True
  2. Import flow360, run tests
  3. Set beta_features to False
  4. 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

Copy link
Contributor Author

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):
Copy link
Collaborator

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?

Copy link
Contributor Author

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

config/flags.py Outdated
Copy link
Collaborator

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

@awkrupka awkrupka force-pushed the release-23.3.2 branch 2 times, most recently from 7f803b3 to cb3a55b Compare January 18, 2024 01:56
@maciej-flexcompute maciej-flexcompute merged commit e63486e into develop Jan 18, 2024
15 checks passed
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