Skip to content

Commit 2ac631e

Browse files
committed
Fix edge cases for installation
1 parent 70060c3 commit 2ac631e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ setup() {
3737
clone_repo() {
3838
mkdir -p "$repo_dir/repo"
3939
(
40+
export GIT_LFS_SKIP_SMUDGE=1
4041
cd "$repo_dir/repo"
4142
git init -b checkout
4243
git fetch --depth=1 "https://github.com/$repo" "$commit"
@@ -51,6 +52,9 @@ _build() {
5152
echo "==== Building $1 ===="
5253
"$repo_dir/venv/bin/pip" freeze > "$repo_dir/freeze-$1.txt"
5354
(
55+
if grep -q mkdocstrings "$info_dir/requirements.txt"; then
56+
export PYTHONPATH="src:.:${PYTHONPATH:+:${PYTHONPATH}}"
57+
fi
5458
cd "$repo_dir/repo"
5559
../venv/bin/mkdocs build --no-strict -f "$mkdocs_yml" -d "$(pwd)/../site-$1"
5660
)

normalize_file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
html = re.sub(r'\b(0x)[a-f0-9]+\b', r'\1...', html)
1515
html = re.sub(r'^(Build Date UTC ?:).+', r'\1...', html, flags=re.MULTILINE)
1616
html = re.sub(r'\b[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\b', r'...', html)
17+
html = re.sub(r'(?<=id="cell-id=)\w+(?=")', r'...', html)
1718

1819
path.write_text(html)

populate_projects.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for d in */; do (
1515
mkdocs_yml="${BASH_REMATCH[3]}"
1616
else
1717
repo="${d//--//}"
18-
branch=''
18+
branch=$(curl -sfL "https://api.github.com/repos/$repo" | jq -r '.default_branch')
1919
mkdocs_yml='mkdocs.yml'
2020
fi
2121
commit=$(curl -sfL "https://api.github.com/repos/$repo/commits?per_page=1&sha=$branch" | jq -r '.[0].sha')
@@ -26,4 +26,4 @@ for d in */; do (
2626
mv requirements.in.new requirements.in
2727
); done
2828

29-
echo */requirements.in | xargs -t -n1 -P4 pip-compile -q --no-annotate --no-header -U
29+
echo */requirements.in | xargs -t -n1 -P4 pip-compile -q --allow-unsafe --strip-extras --no-annotate --no-header -U

0 commit comments

Comments
 (0)