Skip to content

Commit 691afe0

Browse files
authored
Added github workflow to check if submodules have missing __init__.py files. (#45)
Solves #44 by adding a github workflow to check if submodules have missing `__init__.py` files.
1 parent 64d18b4 commit 691afe0

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jobs:
5959
echo "No changed files to check."
6060
fi
6161
62+
- name: check missing __init__ files
63+
run: bash build_tools/fail_on_missing_init_files.sh
64+
6265
run-tests-no-extras:
6366
needs: code-quality
6467
strategy:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Script to search for missing init FILES.
4+
set -euxo pipefail
5+
6+
FILES=$( find ./pyaptamer -type d '!' -exec test -e "{}/__init__.py" ";" -not -path "**/__pycache__" -print )
7+
8+
if [[ -n "$FILES" ]]
9+
then
10+
echo "Missing __init__.py files detected in the following modules:"
11+
echo "$FILES"
12+
exit 1
13+
fi

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ quote-style = "double"
3838
line-ending = "lf"
3939
indent-style = "space"
4040
docstring-code-format = true
41+
42+
[tool.setuptools.packages.find]
43+
include = ["pyaptamer*"]

0 commit comments

Comments
 (0)