Skip to content

Commit

Permalink
ARM64 MacOS build (#782)
Browse files Browse the repository at this point in the history
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
  • Loading branch information
geofjamg authored Aug 29, 2024
1 parent 86ed2c0 commit 984e527
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 12 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ jobs:
- {
name: darwin,
os: macos-12,
macosx_deployment_target: "10.16", # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0
bdist_wheel_args: "--plat-name macosx-11.0-x86_64", # needed to avoid the wheel to be named -universal2
}
- {
name: darwin-arm64,
os: macos-14,
macosx_deployment_target: "11", # first arm64 version of macosx
bdist_wheel_args: "--plat-name macosx-11.0-arm64", # needed to avoid the wheel to be named -universal2
}
- {
name: windows,
Expand Down Expand Up @@ -139,8 +147,8 @@ jobs:
- name: Build wheel
env:
MACOSX_DEPLOYMENT_TARGET: "10.16" # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0
run: python setup.py bdist_wheel
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.macosx_deployment_target }}
run: python setup.py bdist_wheel ${{ matrix.config.bdist_wheel_args }}

- name: Install wheel
shell: bash
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ jobs:
- {
name: darwin,
os: macos-12,
macosx_deployment_target: "10.16", # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0
bdist_wheel_args: "--plat-name macosx-11.0-x86_64", # needed to avoid the wheel to be named -universal2
}
- {
name: darwin-arm64,
os: macos-14,
macosx_deployment_target: "11", # first arm64 version of macosx
bdist_wheel_args: "--plat-name macosx-11.0-arm64", # needed to avoid the wheel to be named -universal2
}
- {
name: windows,
Expand Down Expand Up @@ -185,8 +193,8 @@ jobs:
- name: Build wheel
env:
MACOSX_DEPLOYMENT_TARGET: "10.16" # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0
run: python setup.py bdist_wheel
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.macosx_deployment_target }}
run: python setup.py bdist_wheel ${{ matrix.config.bdist_wheel_args }}

- name: Install wheel
shell: bash
Expand Down
21 changes: 14 additions & 7 deletions docs/user_guide/flowdecomposition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,28 @@ To illustrate X node flow, we need a network with unmerged x nodes.
Those x nodes might represent HVDCs, outside countries, etc.
Merged X nodes will not be considered here.

.. doctest::
.. testsetup:: flowdecomposition.unmerged

pd.options.display.float_format = '{:,.3f}'.format

.. doctest:: flowdecomposition.unmerged
:options: +NORMALIZE_WHITESPACE

>>> network = pp.network.load(DATA_DIR.joinpath('19700101_0000_FO4_UX1.uct'))
>>> flow_decomposition = pp.flowdecomposition.create_decomposition().add_interconnections_as_monitored_elements()
>>> flow_decomposition.run(network)
branch_id contingency_id country1 country2 ac_reference_flow dc_reference_flow commercial_flow x_node_flow pst_flow internal_flow loop_flow_from_be loop_flow_from_de loop_flow_from_fr
xnec_id
XBD00011 BD000011 1 + XBD00011 DB000011 1 XBD00011 BD000011 1 + XBD00011 DB000011 1 BE DE 121.821917 124.685261 171.516849 -33.155274 2.951653 0.0 0.226369 -8.994903e-09 -16.854336
XBD00012 BD000011 1 + XBD00012 DB000011 1 XBD00012 BD000011 1 + XBD00012 DB000011 1 BE DE 121.821917 124.685261 171.516849 -33.155274 2.951653 0.0 0.226369 -8.994903e-09 -16.854336
XBF00011 BF000011 1 + XBF00011 FB000011 1 XBF00011 BF000011 1 + XBF00011 FB000011 1 BE FR -775.578124 -764.445217 679.262024 170.472453 7.112098 0.0 -124.052946 -6.713719e-09 31.651588
XBF00021 BF000021 1 + XBF00021 FB000021 1 XBF00021 BF000021 1 + XBF00021 FB000021 1 BE FR -234.032855 -242.462652 169.385837 44.108499 -0.604396 0.0 62.252842 -1.954504e-09 -32.680130
XBF00022 BF000021 1 + XBF00022 FB000022 1 XBF00022 BF000021 1 + XBF00022 FB000022 1 BE FR -234.032855 -242.462652 169.385837 44.108499 -0.604396 0.0 62.252842 -1.954504e-09 -32.680130
XDF00011 DF000011 1 + XDF00011 FD000011 1 XDF00011 DF000011 1 + XDF00011 FD000011 1 DE FR -1156.356167 -1150.629478 906.966302 216.310548 -5.903306 0.0 -0.452738 -2.032061e-08 33.708672
XBD00011 BD000011 1 + XBD00011 DB000011 1 XBD00011 BD000011 1 + XBD00011 DB000011 1 BE DE 121.822 124.685 171.517 -33.155 2.952 0.000 0.226 -0.000 -16.854
XBD00012 BD000011 1 + XBD00012 DB000011 1 XBD00012 BD000011 1 + XBD00012 DB000011 1 BE DE 121.822 124.685 171.517 -33.155 2.952 0.000 0.226 -0.000 -16.854
XBF00011 BF000011 1 + XBF00011 FB000011 1 XBF00011 BF000011 1 + XBF00011 FB000011 1 BE FR -775.578 -764.445 679.262 170.472 7.112 0.000 -124.053 -0.000 31.652
XBF00021 BF000021 1 + XBF00021 FB000021 1 XBF00021 BF000021 1 + XBF00021 FB000021 1 BE FR -234.033 -242.463 169.386 44.108 -0.604 0.000 62.253 -0.000 -32.680
XBF00022 BF000021 1 + XBF00022 FB000022 1 XBF00022 BF000021 1 + XBF00022 FB000022 1 BE FR -234.033 -242.463 169.386 44.108 -0.604 0.000 62.253 -0.000 -32.680
XDF00011 DF000011 1 + XDF00011 FD000011 1 XDF00011 DF000011 1 + XDF00011 FD000011 1 DE FR -1,156.356 -1,150.629 906.966 216.311 -5.903 0.000 -0.453 -0.000 33.709

.. testcleanup:: flowdecomposition.unmerged

pd.options.display.float_format = None

Adder functions
---------------
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ sphinx==7.1.2
furo==2024.1.29

# CI dependencies
wheel==0.38.1
setuptools==73.0.1
wheel==0.44.0
coverage==7.3.2
pytest>=6.2.5
mypy==0.982
Expand Down

0 comments on commit 984e527

Please sign in to comment.