Skip to content

Commit f892492

Browse files
authored
Main updates (#12)
* fixed testing * updated workflow * fixing docs * cleaning tests * cleaning * remove swarm * added pytest
1 parent 91492ba commit f892492

File tree

7 files changed

+9
-49
lines changed

7 files changed

+9
-49
lines changed

.github/workflows/build_docs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
name: Docs
22
on: [push, pull_request, workflow_dispatch]
33
permissions:
4-
contents: write
4+
contents: write
5+
56
jobs:
67
docs:
78
runs-on: ubuntu-latest
89
steps:
910
- uses: actions/checkout@v3
1011
- uses: actions/setup-python@v3
12+
with:
13+
python-version: '3.8' # Use Python 3.8
1114
- name: Install dependencies
1215
run: |
1316
pip install -r requirements.txt
@@ -20,4 +23,4 @@ jobs:
2023
uses: peaceiris/actions-gh-pages@v3
2124
with:
2225
personal_token: ${{ secrets.GITHUB_TOKEN }}
23-
publish_dir: ./docs/_build/html
26+
publish_dir: ./docs/_build/html

.github/workflows/run_tests.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,13 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v3
13-
- name: Set up Python 3.10
13+
- name: Set up Python 3.8 # Set Python version to 3.8 or 3.9
1414
uses: actions/setup-python@v3
1515
with:
16-
python-version: '3.10'
17-
- name: Add conda to system path
18-
run: |
19-
# $CONDA is an environment variable pointing to the root of the miniconda directory
20-
echo $CONDA/bin >> $GITHUB_PATH
16+
python-version: '3.8' # Change to a version compatible with TensorFlow
2117
- name: Install dependencies
2218
run: |
2319
pip install -r requirements.txt
24-
- name: Lint with flake8
25-
run: |
26-
conda install flake8
27-
# stop the build if there are Python syntax errors or undefined names
28-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
30-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3120
- name: Test with pytest
3221
run: |
3322
python setup.py install

docs/Swarm_Observer.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313
import os
1414
import sys
1515
sys.path.insert(0, os.path.abspath('../Adversarial_Observation'))
16-
sys.path.insert(1, os.path.abspath('../Swarm_Observer'))
1716
sys.path.insert(2, os.path.abspath('../'))
1817
from Adversarial_Observation.Attacks import *
1918
from Adversarial_Observation.utils import *
2019
from Adversarial_Observation.visualize import *
21-
import Swarm_Observer
2220

2321
# -- Project information -----------------------------------------------------
2422

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Welcome to Adversarial_Observation's documentation!
1111
:caption: Contents:
1212

1313
Adversarial_Observation
14-
Swarm_Observer
1514
examples
1615

1716

docs/modules.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ Adversarial_Observation
55
:maxdepth: 4
66

77
Adversarial_Observation
8-
Swarm_Observer
98
setup

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ torch
1313
torchvision
1414
sphinx_rtd_theme
1515
tensorflow
16-
imageio[pyav]
16+
imageio[pyav]
17+
pytest

0 commit comments

Comments
 (0)