Skip to content

Commit 33926f1

Browse files
committed
added sge test
1 parent a2cc4d6 commit 33926f1

File tree

4 files changed

+61
-21
lines changed

4 files changed

+61
-21
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[run]
22
branch = True
3+
omit =
4+
*/tests/*
5+
conftest.py

.github/workflows/ci-cd.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,62 @@ jobs:
222222
token: ${{ secrets.CODECOV_TOKEN }}
223223
files: ./cov.xml
224224

225+
test-sge:
226+
needs: ["build"]
227+
strategy:
228+
matrix:
229+
python-version: [3.11]
230+
fail-fast: false
231+
runs-on: ubuntu-latest
232+
env:
233+
VERSION: 8.1.9
234+
steps:
235+
- name: Install system packages
236+
run: |
237+
sudo apt-get update
238+
sudo apt-get install -y build-essential libssl-dev libncurses5-dev wget
239+
- name: Download SGE
240+
run: |
241+
mkdir -p ~/sge-build && cd ~/sge-build
242+
wget -c https://github.com/sge-network/sge/archive/refs/tags/v${{ env.VERSION }}.tar.gz
243+
tar zxvf v${{ env.VERSION }}.tar.gz
244+
cd sge-v${{ env.VERSION }}
245+
- name: Prepare build
246+
run: |
247+
sudo mkdir -p /opt/sge
248+
sudo useradd -r -m -U -d /home/sgeadmin -s /bin/bash -c "SGE Admin" sgeadmin
249+
sudo usermod -a -G sudo sgeadmin
250+
- name: Build SGE
251+
run: |
252+
sh scripts/bootstrap.sh && ./aimk -no-qmon -no-qtcsh && ./aimk -
253+
- name: Install SGE
254+
run: |
255+
echo Y | ./scripts/distinst -local -allall -libs -noexit
256+
sudo touch /opt/sge/default/common/settings.sh
257+
sudo ln -s /opt/sge/default/common/settings.sh /etc/profile.d/sge_settings.sh
258+
echo . /etc/profile.d/sge_settings.sh >> /etc/bash.bashrc
259+
- name: Checkout repository
260+
uses: actions/checkout@v4
261+
with:
262+
repository: ${{ github.repository }}
263+
- name: Fetch tags
264+
run: git fetch --prune --unshallow
265+
- name: Setup Python version ${{ matrix.python-version }}
266+
uses: actions/setup-python@v5
267+
with:
268+
python-version: ${{ matrix.python-version }}
269+
- name: Install package
270+
run: |
271+
pip install -e ".[test]"
272+
- name: Run tests for Dask
273+
run: |
274+
pytest -v pydra/engine/tests/test_submitter.py --only-worker=sge --rootdir pydra --cov pydra --cov-config .coveragerc --cov-report xml:cov.xml
275+
- name: Upload coverage to Codecov
276+
uses: codecov/codecov-action@v2
277+
with:
278+
fail_ci_if_error: true
279+
token: ${{ secrets.CODECOV_TOKEN }}
280+
225281
# test-sge:
226282
# needs: ['build']
227283
# strategy:

empty-docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. meta::
22
:http-equiv=Refresh: 0; url='https://nipype.github.io/pydra/'
33

4-
The docs for Nipype have been moved to GitHub, if you aren't redirected automatically
5-
go to https://nipype.github.io/pydra/.
4+
The docs for Pydra have been moved to GitHub pages, if you aren't redirected automatically
5+
go to `https://nipype.github.io/pydra/ <https://nipype.github.io/pydra/>`__.

pydra/engine/state.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -122,25 +122,6 @@ def __str__(self):
122122
f"and combiner: {self.combiner}"
123123
)
124124

125-
@property
126-
def names(self):
127-
"""Return the names of the states."""
128-
previous_states_keys = {
129-
f"_{v.name}": v.keys_final for v in self.inner_inputs.values()
130-
}
131-
names = []
132-
# iterating splitter_rpn
133-
for token in self.splitter_rpn:
134-
if token in [".", "*"]: # token is one of the input var
135-
continue
136-
# adding variable to the stack
137-
if token.startswith("_"):
138-
new_keys = previous_states_keys[token]
139-
names += new_keys
140-
else:
141-
names.append(token)
142-
return names
143-
144125
def depth(self, before_combine: bool = False) -> int:
145126
"""Return the number of splits of the state, i.e. the number nested
146127
state arrays to wrap around the type of lazy out fields

0 commit comments

Comments
 (0)