Skip to content

Commit c5b7e3e

Browse files
Ensure gFTL is installed with Pyccel (pyccel#1809)
- Add `https://github.com/Goddard-Fortran-Ecosystem/gFTL` as a git submodule. - Update the `pyproject.toml` file to include essential files from gFTL. - Implement a GitHub Action in `check_for_gftl` to verify gFTL installation. This fixes pyccel#1656. --------- Co-authored-by: Yaman Güçlü <[email protected]>
1 parent 78d56de commit c5b7e3e

File tree

8 files changed

+42
-9
lines changed

8 files changed

+42
-9
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Ensure gFTL is installed with Pyccel'
2+
inputs:
3+
not_editable:
4+
description: 'not_editable installation'
5+
default: 'True'
6+
runs:
7+
using: "composite"
8+
steps:
9+
- name: check gFTL installation
10+
shell: python
11+
run: |
12+
import pyccel
13+
from os.path import exists, join
14+
pyccel_loc = pyccel.__path__[0]
15+
print(pyccel_loc)
16+
assert exists(join(pyccel_loc,'extensions/gFTL/include/v2'))
17+
if ${{ inputs.not_editable }}:
18+
assert not exists(join(pyccel_loc,'extensions/gFTL/doc'))
19+

.github/actions/check_for_stc/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ runs:
1414
pyccel_loc = pyccel.__path__[0]
1515
print(pyccel_loc)
1616
print("${{ inputs.not_editable }}")
17-
assert(exists(join(pyccel_loc,'extensions/STC/include/stc')))
17+
assert exists(join(pyccel_loc,'extensions/STC/include/stc'))
1818
if ${{ inputs.not_editable }}:
19-
assert(not exists(join(pyccel_loc,'extensions/STC/docs')))
19+
assert not exists(join(pyccel_loc,'extensions/STC/docs'))
20+

.github/workflows/pickle.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,13 @@ jobs:
9393
uses: ./.github/actions/check_for_stc
9494
with:
9595
not_editable: "${{ matrix.editable_string == '-e' && 'False' || 'True'}}"
96+
- name: Check for gFTL installation
97+
id: gFTL_check
98+
uses: ./.github/actions/check_for_gftl
99+
with:
100+
not_editable: "${{ matrix.editable_string == '-e' && 'False' || 'True' }}"
96101
- name: "Post completed"
97102
if: always()
98103
run: |
99-
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} --reasons "Installation failed." "Pickled files were not found in installaion." "STC was not found during installation."
100-
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }}
104+
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}} --reasons "Installation failed." "Pickled files were not found in installaion." "STC was not found during installation." "gFTL was not found during installation."
105+
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}}

.github/workflows/pickle_wheel.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ jobs:
8282
- name: Check for STC installation
8383
id: stc_check
8484
uses: ./.github/actions/check_for_stc
85+
- name: Check for gFTL installation
86+
id: gFTL_check
87+
uses: ./.github/actions/check_for_gftl
8588
- name: "Post completed"
8689
if: always()
8790
run: |
88-
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} --reasons "Installation failed." "Pickled files were not found in installaion." "STC was not found during installation."
89-
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }}
91+
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}} --reasons "Installation failed." "Pickled files were not found in installaion." "STC was not found during installation." "gFTL was not found during installation."
92+
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "pyccel/extensions/STC"]
22
path = pyccel/extensions/STC
33
url = https://github.com/Stclib/STC/
4+
[submodule "pyccel/extensions/gFTL"]
5+
path = pyccel/extensions/gFTL
6+
url = https://github.com/Goddard-Fortran-Ecosystem/gFTL

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ All notable changes to this project will be documented in this file.
1212
- #1739 : Add Python support for set method `clear()`.
1313
- #1740 : Add Python support for set method `copy()`.
1414
- #1750 : Add Python support for set method `remove()`.
15-
- #1787 : Ensure `STC` is installed with Pyccel.
1615
- #1743 : Add Python support for set method `discard()`.
16+
- #1787 : Ensure `STC` is installed with Pyccel.
17+
- #1656 : Ensure `gFTL` is installed with Pyccel.
1718
- #1830 : Add a `pyccel.lambdify.lambdify` function to accelerate SymPy expressions.
1819
- \[INTERNALS\] Added `container_rank` property to `ast.datatypes.PyccelType` objects.
1920
- \[DEVELOPER\] Added an improved traceback to the developer-mode errors for errors in function calls.

pyccel/extensions/gFTL

Submodule gFTL added at 5367705

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ artifacts = [
5050
"*.pyccel",
5151
]
5252
include = [
53-
"include",
5453
"*.py",
5554
"*.pyh",
5655
"*.pyccel",
5756
"pyccel/parser/grammar/*.tx",
5857
"pyccel/stdlib/*/*.h",
5958
"pyccel/stdlib/*/*.c",
6059
"pyccel/stdlib/*/*.f90",
61-
"pyccel/extensions/STC/include/*/*.c"
60+
"pyccel/extensions/STC/include",
61+
"pyccel/extensions/gFTL/include/v2"
6262
]
6363
exclude = [
6464
"pyccel/extensions/STC/src",

0 commit comments

Comments
 (0)