Skip to content

Commit cd6f30f

Browse files
Ensure STC is installed with Pyccel (pyccel#1787)
Fix pyccel#1654: - Add https://github.com/Stclib/STC as a git submodule. - Update file `pyproject.toml` to include essential files from STC. - Implement an action in `check_for_stc` to verify STC installation. --------- Co-authored-by: EmilyBourne <[email protected]>
1 parent 5c170e7 commit cd6f30f

20 files changed

+69
-6
lines changed

.docstr.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
skip_magic: True
22
skip_init: True
33
fail_under: 0
4+
exclude:
5+
".*/pyccel/extensions"
46
ignore_patterns:
57
"syntactic":
68
- "_visit_.*"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Ensure STC 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 stc installation
10+
shell: python
11+
run: |
12+
import pyccel, os
13+
from os.path import exists, join
14+
pyccel_loc = pyccel.__path__[0]
15+
print(pyccel_loc)
16+
print("${{ inputs.not_editable }}")
17+
assert(exists(join(pyccel_loc,'extensions/STC/include/stc')))
18+
if ${{ inputs.not_editable }}:
19+
assert(not exists(join(pyccel_loc,'extensions/STC/docs')))

.github/workflows/anaconda_linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
with:
5757
ref: ${{ env.COMMIT }}
5858
repository: ${{ env.PR_REPO }}
59+
submodules: true
5960
- name: Install dependencies
6061
uses: ./.github/actions/linux_install
6162
- uses: conda-incubator/setup-miniconda@v2

.github/workflows/anaconda_windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
with:
5757
ref: ${{ env.COMMIT }}
5858
repository: ${{ env.PR_REPO }}
59+
submodules: true
5960
- uses: conda-incubator/setup-miniconda@v2
6061
with:
6162
auto-update-conda: true

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
with:
4545
ref: ${{ env.COMMIT }}
4646
repository: ${{ env.PR_REPO }}
47+
submodules: true
4748
- name: Set up Python ${{ inputs.python_version }}
4849
uses: actions/setup-python@v4
4950
with:

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ jobs:
3838
with:
3939
ref: ${{ inputs.base }}
4040
path: base
41+
submodules: true
4142
- uses: actions/checkout@v3
4243
with:
4344
path: compare
4445
ref: ${{ env.COMMIT }}
4546
repository: ${{ env.PR_REPO }}
4647
fetch-depth: 0
48+
submodules: true
4749
- name: Set up Python ${{ inputs.python_version }}
4850
uses: actions/setup-python@v4
4951
with:

.github/workflows/intel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
with:
5959
ref: ${{ env.COMMIT }}
6060
repository: ${{ env.PR_REPO }}
61+
submodules: true
6162
- name: Set up Python ${{ needs.Python_version_picker.outputs.python_version }}
6263
uses: actions/setup-python@v4
6364
with:

.github/workflows/linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
with:
6262
ref: ${{ env.COMMIT }}
6363
repository: ${{ env.PR_REPO }}
64+
submodules: true
6465
- name: Set up Python ${{ matrix.python_version }}
6566
uses: actions/setup-python@v4
6667
with:

.github/workflows/macosx.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
with:
5858
ref: ${{ env.COMMIT }}
5959
repository: ${{ env.PR_REPO }}
60+
submodules: true
6061
- name: Set up Python ${{ needs.Python_version_picker.outputs.python_version }}
6162
uses: actions/setup-python@v4
6263
with:

.github/workflows/pickle.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
with:
6767
ref: ${{ env.COMMIT }}
6868
repository: ${{ env.PR_REPO }}
69+
submodules: true
6970
- name: Set up Python ${{ needs.Python_version_picker.outputs.python_version }}
7071
uses: actions/setup-python@v4
7172
with:
@@ -87,8 +88,13 @@ jobs:
8788
- name: Check for existence of pickled files
8889
id: pickle_check
8990
uses: ./.github/actions/check_for_pickled
91+
- name: Check for STC installation
92+
id: stc_check
93+
uses: ./.github/actions/check_for_stc
94+
with:
95+
not_editable: "${{ matrix.editable_string == '-e' && 'False' || 'True'}}"
9096
- name: "Post completed"
9197
if: always()
9298
run: |
93-
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} --reasons "Installation failed." "Pickled files were not found in installaion."
94-
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }}
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 }}

0 commit comments

Comments
 (0)