From 2df40e56c989db040b4891020f6fc3796deb4f77 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Tue, 7 Nov 2023 13:53:48 +0100 Subject: [PATCH 1/6] Add workflow --- .github/workflows/build.yml | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f95c92d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +name: Build benchmark docs + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + #- name: Check out data repository + # uses: actions/checkout@v2 + # with: + # repository: // + # token: ${{ secrets.GIT_TOKEN }} + + - uses: actions/checkout@v2 + + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Cache Pip dependencies + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Check data + id: check-data + run: | + RESULT=$(find data -type f) + echo "::set-output name=check-data::$RESULT" + echo "${RESULT}" + shell: bash + + - name: Verify data + run: | + sample_output="data/CollectedData_Mackenzie.h5 data/CollectedData_Daniel.h5 data/CollectedData_Valentina.h5 data/CollectedData_Mostafizur.h5" + if [ "${{ steps.check-data.outputs.check-data }}" != "$sample_output" ]; then + echo "Data check failed" + exit 1 + fi + + - name: Run tests + run: | + python -m pytest tests + + - name: Run benchmark + run: | + python -m benchmark + + - name: Build documentation + run: | + make deploy \ No newline at end of file From 564a6cac79f3de25da64c5242437432dad58ae52 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Tue, 7 Nov 2023 13:55:44 +0100 Subject: [PATCH 2/6] Add dlc dependency --- .github/workflows/build.yml | 8 ++++---- requirements.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f95c92d..46775f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,10 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt + - name: Run tests + run: | + python -m pytest tests + - name: Check data id: check-data run: | @@ -49,10 +53,6 @@ jobs: exit 1 fi - - name: Run tests - run: | - python -m pytest tests - - name: Run benchmark run: | python -m benchmark diff --git a/requirements.txt b/requirements.txt index b1471f6..3b74388 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,3 +34,4 @@ tabulate==0.8.9 urllib3==1.26.6 sphinx_autodoc_typehints sphinx_copybutton +deeplabcut \ No newline at end of file From 4c682ccee5751ba9085bb1680dc0391e1a362f72 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Tue, 7 Nov 2023 13:57:59 +0100 Subject: [PATCH 3/6] Add more missing deps --- .github/workflows/build.yml | 8 +++++++- requirements.txt | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46775f7..0a49af1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,12 @@ name: Build benchmark docs -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: build: diff --git a/requirements.txt b/requirements.txt index 3b74388..4a978f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,4 +34,5 @@ tabulate==0.8.9 urllib3==1.26.6 sphinx_autodoc_typehints sphinx_copybutton -deeplabcut \ No newline at end of file +deeplabcut +pytest \ No newline at end of file From f2015053ad89bd88061d4a488844f5533aa33ef6 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Tue, 7 Nov 2023 14:02:20 +0100 Subject: [PATCH 4/6] add tf dependency --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4a978f0..eeb297d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,5 +34,5 @@ tabulate==0.8.9 urllib3==1.26.6 sphinx_autodoc_typehints sphinx_copybutton -deeplabcut +'deeplabcut[tf]' pytest \ No newline at end of file From 006ba5ae78278d1b3759d8de27273c7726483d51 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Tue, 7 Nov 2023 23:15:27 +0100 Subject: [PATCH 5/6] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eeb297d..aae43e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,5 +34,5 @@ tabulate==0.8.9 urllib3==1.26.6 sphinx_autodoc_typehints sphinx_copybutton -'deeplabcut[tf]' +deeplabcut[tf] pytest \ No newline at end of file From 888188b4cb7ca59d4d06badea1a41a6e3d5d3948 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Tue, 7 Nov 2023 23:19:51 +0100 Subject: [PATCH 6/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a49af1..d5d5c99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.9' - name: Cache Pip dependencies uses: actions/cache@v2