Skip to content

Commit 33e4937

Browse files
authored
Merge pull request #34 from pyiron/binder_dir
[nit] Keep binder dir clean
2 parents 7773c17 + db26d93 commit 33e4937

File tree

4 files changed

+22
-28
lines changed

4 files changed

+22
-28
lines changed

.binder/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
channels:
22
- conda-forge
33
dependencies:
4+
- python >=3.11, <3.14
45
- numpy =2.3.3
56
- setuptools >=68
67
- semantikon =0.0.22

.binder/postBuild

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
1-
# pip install main
2-
pip install --no-deps .
3-
# Note: This produces build and flowrep.egg-info directories
1+
#!/bin/bash
2+
pip install . --no-deps
43

5-
# clean up
6-
if [ -d "notebooks" ]; then
7-
mv notebooks/* .
8-
fi
9-
if [ -d "${HOME}/flowrep" ]; then
10-
rm -r ${HOME}/.binder \
11-
${HOME}/.ci_support \
12-
${HOME}/.github \
13-
${HOME}/build \
14-
${HOME}/docs \
15-
${HOME}/notebooks \
16-
${HOME}/flowrep \
17-
${HOME}/flowrep.egg-info \
18-
${HOME}/tests \
19-
${HOME}/.gitattributes \
20-
${HOME}/.gitignore \
21-
${HOME}/.gitpod \
22-
${HOME}/.readthedocs.yml \
23-
${HOME}/CODE_OF_CONDUCT.md \
24-
${HOME}/CONTRIBUTING.rst \
25-
${HOME}/LICENSE \
26-
${HOME}/MANIFEST.in \
27-
${HOME}/pyproject.toml \
28-
${HOME}/setup.py
29-
fi
4+
# Save the stuff we actually need for binder
5+
KEEP=("notebooks")
6+
mkdir -p ${HOME}/.temp_keep
7+
for item in "${KEEP[@]}"; do
8+
[ -e "${HOME}/${item}" ] && mv "${HOME}/${item}" ${HOME}/.temp_keep/
9+
done
10+
11+
# Now clean up everything else
12+
find ${HOME} -mindepth 1 -maxdepth 1 ! -name '.temp_keep' -exec rm -rf {} +
13+
14+
# Restore the kept material
15+
mv ${HOME}/.temp_keep/* ${HOME}/
16+
rmdir ${HOME}/.temp_keep
17+
18+
# Manipulate kept material
19+
mv ${HOME}/notebooks/* ${HOME}
20+
rmdir ${HOME}/notebooks

.ci_support/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
channels:
22
- conda-forge
33
dependencies:
4+
- python >=3.11, <3.14
45
- numpy =2.3.3
56
- setuptools >=68
67
- semantikon =0.0.22

docs/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies:
77
- sphinx-gallery
88
- sphinx-rtd-theme
99
- versioneer
10+
- python >=3.11, <3.14
1011
- numpy =2.3.3
1112
- setuptools >=68
1213
- semantikon =0.0.22

0 commit comments

Comments
 (0)