Skip to content

Commit

Permalink
ressources renamed to resources (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
PennyHow committed Jun 19, 2024
1 parent 48817e6 commit 48f6823
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include src/pypromice/test/*
include src/pypromice/resources/*
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
packages=setuptools.find_packages(where="src"),
python_requires=">=3.8",
package_data={
"pypromice.ressources": ["variables.csv", "file_attributes.csv", "variable_aliases_GC-Net.csv"],
"pypromice.tx": ["payload_formats.csv", "payload_types.csv"],
"pypromice.qc.percentiles": ["thresholds.csv"],
"pypromice.postprocess": ["station_configurations.toml", "positions_seed.csv"],
Expand Down
2 changes: 1 addition & 1 deletion src/pypromice/process/join_l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def readNead(infile):
ds.attrs = meta

# renaming variables
file_path = pkg_resources.resource_stream('pypromice', 'ressources/variable_aliases_GC-Net.csv')
file_path = pkg_resources.resource_stream('pypromice', 'resources/variable_aliases_GC-Net.csv')
var_name = pd.read_csv(file_path)
var_name = var_name.set_index('old_name').GEUS_name
msk = [v for v in var_name.index if v in ds.data_vars]
Expand Down
6 changes: 3 additions & 3 deletions src/pypromice/process/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def getVars(v_file=None):
Variables dataframe
'''
if v_file is None:
with pkg_resources.resource_stream('pypromice', 'ressources/variables.csv') as stream:
with pkg_resources.resource_stream('pypromice', 'resources/variables.csv') as stream:
return pd.read_csv(stream, index_col=0, comment="#", encoding='utf-8')
else:
return pd.read_csv(v_file, index_col=0, comment="#")
Expand All @@ -160,7 +160,7 @@ def getMeta(m_file=None, delimiter=','):
'''
meta={}
if m_file is None:
with pkg_resources.resource_stream('pypromice', 'ressources/file_attributes.csv') as stream:
with pkg_resources.resource_stream('pypromice', 'resources/file_attributes.csv') as stream:
lines = stream.read().decode("utf-8")
lines = lines.split("\n")
else:
Expand All @@ -171,4 +171,4 @@ def getMeta(m_file=None, delimiter=','):
meta[l.split(',')[0]] = l.split(delimiter)[1].split('\n')[0].replace(';',',')
except IndexError:
pass
return meta
return meta
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 48f6823

Please sign in to comment.