Skip to content

Commit

Permalink
add flake8 gha
Browse files Browse the repository at this point in the history
  • Loading branch information
nnaakkaaii committed Jun 15, 2024
1 parent bd526a1 commit 9ebbbfc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Flake8 Lint

on: [push, pull_request]

jobs:
flake8-lint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8
run: |
flake8 hrdae/
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
12 changes: 6 additions & 6 deletions test/models/networks/test_r_ae.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_decoder2d():
]
* 2,
debug_show_dim=False,
)
)
x = net(m)
assert x.size() == (b * n, c_, h, w)

Expand All @@ -53,7 +53,7 @@ def test_decoder3d():
]
* 2,
debug_show_dim=False,
)
)
x = net(m)
assert x.size() == (b * n, c_, d, h, w)

Expand Down Expand Up @@ -84,9 +84,9 @@ def test_rae2d():
}
]
* 2,
),
),
upsample_size=[h // 4, w // 4],
)
)
out = net(
randn((b, n, s, h)),
randn((b, 2, h, w)),
Expand Down Expand Up @@ -120,9 +120,9 @@ def test_rae3d():
}
]
* 2,
),
),
upsample_size=[d // 4, h // 4, w // 4],
)
)
out = net(
randn((b, n, s, d, h)),
randn((b, 2, d, h, w)),
Expand Down
18 changes: 9 additions & 9 deletions test/models/networks/test_r_dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_normal_content_encoder2d():
]
* 2,
debug_show_dim=False,
)
)
c = net(x)
assert c.size() == (b, latent, h // 4, w // 4)

Expand Down Expand Up @@ -87,7 +87,7 @@ def test_normal_decoder2d__concat():
* 2,
aggregation_method="concat",
debug_show_dim=False,
)
)
x = net(m, c)
assert x.size() == (b * n, c_, h, w)

Expand All @@ -112,7 +112,7 @@ def test_normal_decoder2d__sum():
* 2,
aggregation_method="sum",
debug_show_dim=False,
)
)
x = net(m, c)
assert x.size() == (b * n, 1, h, w)

Expand All @@ -137,7 +137,7 @@ def test_normal_decoder3d__concat():
* 2,
aggregation_method="concat",
debug_show_dim=False,
)
)
x = net(m, c)
assert x.size() == (b * n, c_, d, h, w)

Expand All @@ -162,7 +162,7 @@ def test_normal_decoder3d__sum():
* 2,
aggregation_method="sum",
debug_show_dim=False,
)
)
x = net(m, c)
assert x.size() == (b * n, c_, d, h, w)

Expand Down Expand Up @@ -194,8 +194,8 @@ def test_rdae2d():
}
]
* 2,
),
)
),
)
out = net(
randn((b, n, s, h)),
randn((b, 2, h, w)),
Expand Down Expand Up @@ -230,8 +230,8 @@ def test_rdae3d():
}
]
* 2,
),
)
),
)
out = net(
randn((b, n, s, d, h)),
randn((b, 2, d, h, w)),
Expand Down

0 comments on commit 9ebbbfc

Please sign in to comment.