Skip to content

Commit

Permalink
Merge pull request #8 from CMCC-Foundation/no-shell
Browse files Browse the repository at this point in the history
Low and Medium severity bandit reports handling
  • Loading branch information
atakeigor authored Dec 11, 2024
2 parents de30697 + 726ccf9 commit b9204fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 116 deletions.
113 changes: 0 additions & 113 deletions src/model/RUN/MODEL_SRC/ReadSatData_EMSA.py

This file was deleted.

9 changes: 6 additions & 3 deletions src/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,13 @@ def parallel_processing_mrc(concat, exp_folder=None):
def run_process_gebco(gebco, grid, output_dir):
script_name = "scripts/pre_processing/preproc_gebco_mdk2.py"
# Run the external Python script as a subprocess
subprocess.run([f"{sys.executable}", script_name, gebco, grid, output_dir])
subprocess.run([f"{sys.executable}", script_name, gebco, grid, output_dir]) # nosec

@staticmethod
def run_process_gshhs(gshhs, grid, output_dir):
script_name = "scripts/pre_processing/preproc_gshhs_mdk2.py"
# Run the external Python script as a subprocess
subprocess.run([f"{sys.executable}", script_name, gshhs, grid, output_dir])
subprocess.run([f"{sys.executable}", script_name, gshhs, grid, output_dir]) # nosec

def rename_netcdf_variables_mdk3(ds):
"""
Expand Down Expand Up @@ -506,5 +506,8 @@ def oil_volume_shapefile(config, dens=0.922, thick=0.00001):
print(Utils.set_product("mercator_daily"))
result = Utils.compute_domain(120, 33, 41, 35, 10)
result2 = Utils.compute_domain(480, 33, 41, 35, 10)
assert result2 == result

if result2 != result:
raise AssertionError(f"Validation failed: result2 ({result2}) != result ({result})")

print(result)

0 comments on commit b9204fd

Please sign in to comment.