Skip to content

Commit

Permalink
Mod: Re-activate pytests, exclude SPICE computation tests on windows …
Browse files Browse the repository at this point in the history
…workflow.
  • Loading branch information
Labbeti committed Sep 25, 2023
1 parent da3f8e8 commit df12588
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 17 deletions.
11 changes: 0 additions & 11 deletions src/aac_metrics/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,6 @@ def _download_spice(
with ZipFile(fpath, "r") as file:
file.extractall(parent_tgt_dpath)

# TODO: rm
# mv $SPICELIB/$CORENLP/stanford-corenlp-3.6.0.jar $SPICELIB/
# mv $SPICELIB/$CORENLP/stanford-corenlp-3.6.0-models.jar $SPICELIB/
# dpath_unzip="$dpath_spice/SPICE-1.0"
# mv "$dpath_unzip/lib" "$dpath_spice"
# mv "$dpath_unzip/spice-1.0.jar" "$dpath_spice"

spice_lib_dpath = osp.join(spice_cache_dpath, "lib")
spice_unzip_dpath = osp.join(spice_cache_dpath, "SPICE-1.0")
corenlp_dname = "stanford-corenlp-full-2015-12-09"
Expand Down Expand Up @@ -301,10 +294,6 @@ def _download_spice(
pylog.info(f"Moving '{src_path}' to '{parent_tgt_dpath}'...")
shutil.move(src_path, parent_tgt_dpath)

# TODO: rm
# rm -f stanford-corenlp-full-2015-12-09.zip
# rm -rf $SPICELIB/$CORENLP/

shutil.rmtree(corenlp_dpath)
if clean_archives:
spice_zip_fname = DATA_URLS["spice_zip"]["fname"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def _get_example_0(self) -> tuple[list[str], list[list[str]]]:

def _test_with_example(self, cands: list[str], mrefs: list[list[str]]) -> None:
if platform.system() == "Windows":
# Skip this setup on windows
return None

corpus_scores, _ = evaluate(cands, mrefs, metrics="dcase2020")
Expand Down
File renamed without changes.
7 changes: 2 additions & 5 deletions tests/test_doc_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@

class TestReadmeExamples(TestCase):
def test_example_1(self) -> None:
# TODO : rm or redo ?
# if platform.system() == "Windows":
# # Skip this setup on windows
# return None
if platform.system() == "Windows":
return None

candidates: list[str] = ["a man is speaking", "rain falls"]
mult_references: list[list[str]] = [
Expand Down Expand Up @@ -61,7 +59,6 @@ def test_example_1(self) -> None:

def test_example_2(self) -> None:
if platform.system() == "Windows":
# Skip this setup on windows
return None

candidates: list[str] = ["a man is speaking", "rain falls"]
Expand Down

0 comments on commit df12588

Please sign in to comment.