-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0faf3b
commit 3ac6950
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9, "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install build dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install numpy pandas setuptools wheel | ||
sudo apt-get update | ||
sudo apt-get install -y g++ | ||
- name: Create package structure | ||
run: | | ||
mkdir -p utils | ||
mkdir -p pattern_causality/utils | ||
cat > utils/__init__.py << 'EOL' | ||
from .statespace import statespace | ||
from .patternhashing import patternhashing | ||
from .signaturespace import signaturespace | ||
from .distancematrix import distancematrix | ||
from .patternspace import patternspace | ||
from .pastNNs import pastNNs | ||
from .projectedNNs import projectedNNs | ||
from .predictionY import predictionY | ||
from .fillPCMatrix import fillPCMatrix | ||
from .natureOfCausality import natureOfCausality | ||
from .databank import databank | ||
from .fcp import fcp | ||
__all__ = [ | ||
'statespace', 'patternhashing', 'signaturespace', 'distancematrix', | ||
'patternspace', 'pastNNs', 'projectedNNs', 'predictionY', | ||
'fillPCMatrix', 'natureOfCausality', 'databank', 'fcp' | ||
] | ||
EOL | ||
touch pattern_causality/utils/__init__.py | ||
- name: Install package | ||
run: | | ||
pip install pytest pytest-cov | ||
pip install -e . | ||
- name: List directory structure | ||
run: | | ||
echo "Current directory structure:" | ||
find . -type f -name "*.py" -o -name "*.cpp" | ||
- name: Run tests | ||
run: | | ||
python -m pytest tests/ --cov=pattern_causality -v |