Skip to content

Commit

Permalink
Update airfoil URL (#231)
Browse files Browse the repository at this point in the history
* Update airfoil URL

* fix columns headers
  • Loading branch information
robsdavis authored Sep 4, 2023
1 parent 373a223 commit 7c1d9b5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
5 changes: 2 additions & 3 deletions tests/plugins/core/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

def get_airfoil_dataset() -> pd.DataFrame:
df = pd.read_csv(
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
sep=";",
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
sep="\t",
engine="python",
)
df.columns = df.columns.astype(str)
Expand Down
5 changes: 2 additions & 3 deletions tests/plugins/domain_adaptation/da_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ def from_serde() -> Plugin:

def get_airfoil_dataset() -> pd.DataFrame:
df = pd.read_csv(
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
sep=";",
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
sep="\t",
engine="python",
)
df.columns = df.columns.astype(str)
Expand Down
5 changes: 2 additions & 3 deletions tests/plugins/generic/generic_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ def from_serde() -> Plugin:

def get_airfoil_dataset() -> pd.DataFrame:
df = pd.read_csv(
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
sep=";",
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
sep="\t",
engine="python",
)
df.columns = df.columns.astype(str)
Expand Down
5 changes: 2 additions & 3 deletions tests/plugins/privacy/fhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ def from_serde() -> Plugin:

def get_airfoil_dataset() -> pd.DataFrame:
df = pd.read_csv(
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
sep=";",
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
sep="\t",
engine="python",
)
df.columns = df.columns.astype(str)
Expand Down
17 changes: 11 additions & 6 deletions tests/utils/test_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@

def get_airfoil_dataset() -> pd.DataFrame:
df = pd.read_csv(
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
sep=";",
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
sep="\t",
engine="python",
header=None,
names=[
"frequency",
"angle_of_attack",
"chord_length",
"free_stream_velocity",
"suction_side_displacement_thickness",
"scaled_sound_pressure_level",
],
)
df.columns = df.columns.astype(str)

Expand Down Expand Up @@ -77,10 +85,7 @@ def test_compression_sanity2() -> None:
def test_compression_sanity_airfoil() -> None:
df = get_airfoil_dataset()
df["chord_length"] = df["chord_length"].astype(str)
print(df.head())
compressed_df, context = compress_dataset(df)
print(compressed_df)
print(context)

assert len(compressed_df) == len(df)
assert compressed_df.shape[1] > 0
Expand Down

0 comments on commit 7c1d9b5

Please sign in to comment.