-
Notifications
You must be signed in to change notification settings - Fork 156
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
Rename floris.simulation, floris.tools to floris.core, floris #830
Conversation
# Conflicts: # floris/core/core.py
@paulf81 @misi9170 @bayc @ejsimley @jfrederik-nrel Please see this pull request, and any conceptual feedback would be helpful. There are a lot of files changed, but the content of the changes is relatively small. Rather than reviewing each file, it would be best to mostly focus on the following locations:
|
@rafmudaf I agree with these changes, but I'm not a good data point because we already spoke about this. One thing though: is there any reason that the floris module containing FlorisModel shouldn't just be called floris_model.py? That would stick to the convention of the file containing a class of the same name, and would also help get rid of this |
No reason, I just didn't think about it, but I agree and I'll make that change. |
Hi @rafmudaf , taking on the first set of points:
This works for me, but I might also put forward fm, or even fi as in FlorIs, just keep smaller. But maybe this is a case of just preferring things the way they are and fmodel is much clearer. Also fmodel goes nicely with findex, so maybe I talked myself into fmodel
yes, these are great, and make me like fmodel more
Yes |
# Conflicts: # examples/01_opening_floris_computing_power.py # examples/02_visualizations.py # examples/03_making_adjustments.py # examples/04_sweep_wind_directions.py # examples/32_plot_velocity_deficit_profiles.py # floris/floris_model.py # floris/flow_visualization.py # floris/layout_functions.py # floris/layout_visualization.py # floris/tools/__init__.py # floris/tools/visualization.py # floris/uncertainty_interface.py # floris/visualization.py # tests/floris_model_integration_test.py
Generally, it would be good to keep the scope of this pull request to changing the variable, class, and file names, and then we can do clean up etc in another pull request. This way, when we review the changes here, we can be on the lookout for only a specific set of things. |
Sounds good, I think with that I've finished going through and updating all the class references and imports to the new style and all tests and examples are running |
# Conflicts: # floris/floris_model.py # floris/flow_visualization.py
# Conflicts: # floris/floris_model.py # floris/flow_visualization.py # tests/floris_model_integration_test.py
Working through the changes for
|
… use; access from ParallelFlorisModel.
Now addresses #834. Note that support from |
Rename FLORIS packages
This pull request restructures the packages within FLORIS.
v3 Architecture
Currently, the software has the following high-level architecture:
The
floris.tools.FlorisInterface
class is the entry point for most use-cases, and it usesfloris.simulation
as a library for computing the wake calculation with theFloris
class as the central data structure. This architecture has been around since at least v2, but it has some issues. One problem is that the word "floris" is used in these contexts:floris.simulation
package, i.e.from floris.simulation.floris import Floris
. Note that the second "floris" in the import statement was hidden by the__init__
imports at the top levelfloris.simulation
packageFlorisInterface
as the primary user entry was contextually relevant when FLORIS included interfaces to other simulators like SOWFA, but that functionality was left out in the upgrade to v3. The "Interface" portion remained in the name mostly as a relic but without the context of the other interfaces.v4 Module-level Redesign
As part of the transition to v4, the directory structure and package architecture of the FLORIS project is redesigned to the following:
Here, the user-facing component is
floris.FlorisModel
, and the former tools package is moved up to the top level.v3 / v4 API Compared
Here's a comparison of the old and new API's for a simple script:
Related issues, discussions, PRs
Impacted areas of the software
This touches most files within the
floris/
directory. I've tried to keep this pull request scope to variable and class name changes, and I've tried to exclude other minor refactoring.Things to do
FlorisModel
instance, currentlyfmodel
UncertaintyInterface
andParallelComputingInterface
, suggestedFlorisUncertaintyModel
/umodel
andFlorisParallelModel
/pmodel
FlorisModel
as the main entry point good for everyone?