From ab676d79a95bced8be1d33479e77d884a97e5b03 Mon Sep 17 00:00:00 2001 From: Calum Meikle Date: Sun, 24 Nov 2024 15:03:09 +0100 Subject: [PATCH] Changes to the install that builds a wheel when running pip install --- mapies/grids/monarch.py | 5 +---- mapies/mapies.py | 2 +- mapies/tropomi.py | 4 ++-- mapies/viirs.py | 7 +++---- requirements.txt | 1 + run/run-nord3.sh | 25 ------------------------- run/run_viirs.py | 2 +- setup.py | 6 +++++- 8 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 run/run-nord3.sh diff --git a/mapies/grids/monarch.py b/mapies/grids/monarch.py index 1e8b52d6..7f165568 100644 --- a/mapies/grids/monarch.py +++ b/mapies/grids/monarch.py @@ -10,13 +10,10 @@ from functools import partial, wraps import geopandas as gpd from geopandas import GeoDataFrame from shapely.geometry import Polygon, Point -from util.func_tools import * +from mapies.util.func_tools import * import logging -#from nes import * -# Grid without using NES - @dataclass class Grid: diff --git a/mapies/mapies.py b/mapies/mapies.py index d8b64edf..ce32fbf8 100644 --- a/mapies/mapies.py +++ b/mapies/mapies.py @@ -4,7 +4,7 @@ from functools import wraps from datetime import datetime, timedelta import sys -from util.func_tools import timeit, time_domain_selection, frequency_int, error_estimation +from mapies.util.func_tools import timeit, time_domain_selection, frequency_int, error_estimation import time import logging import numpy as np diff --git a/mapies/tropomi.py b/mapies/tropomi.py index 888a1396..aaf5cdc6 100644 --- a/mapies/tropomi.py +++ b/mapies/tropomi.py @@ -6,8 +6,8 @@ from datetime import datetime, timedelta from functools import wraps -from mapies import MAPIES -from util.func_tools import timeit, get_file_list, time_converter, inflate_array +from mapies.mapies import MAPIES +from mapies.util.func_tools import timeit, get_file_list, time_converter, inflate_array import time import numpy as np import pandas as pd diff --git a/mapies/viirs.py b/mapies/viirs.py index 090c2a75..7c931cc6 100644 --- a/mapies/viirs.py +++ b/mapies/viirs.py @@ -11,15 +11,14 @@ import numpy as np import pandas as pd import xarray as xr -from mapies import MAPIES -from util.func_tools import * +from mapies.mapies import MAPIES +from mapies.util.func_tools import * #timeit, get_file_list, time_converter, frequency_int, error_estimation, time_domain_selection, geo_to_rot -from grids.monarch import RotatedGrid +from mapies.grids.monarch import RotatedGrid from pathlib import Path - # TODO: still need to do a load of filtering huuuhhh # TODO: Create Yaml config file for time, lat, lon, uncertainty const etc. diff --git a/requirements.txt b/requirements.txt index e7a51743..7ad86ce9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +./ attrs==24.2.0 Cartopy==0.21.1 certifi==2024.8.30 diff --git a/run/run-nord3.sh b/run/run-nord3.sh deleted file mode 100644 index 2234324d..00000000 --- a/run/run-nord3.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -#SBATCH -A bsc32 -# -# -#SBATCH --cpus-per-task=1 -#16 -#SBATCH -n 1 -#SBATCH -t 0-01:00:00 -#SBATCH -J mapies -#SBATCH -e /esarchive/scratch/cmeikle/out-logs/mapies-%j.err -#SBATCH -o /esarchive/scratch/cmeikle/out-logs/mapies-%j.out -#BSUB -x - -export PYTHONPATH=../mapies - -module load xarray/0.19.0-foss-2019b-Python-3.7.4 -module load pandas/1.3.5-foss-2019b-Python-3.7.4 -module load geopandas/0.10.2-foss-2019b-Python-3.7.4 -module load dask/2022.2.0-foss-2019b-Python-3.7.4 -module load NES/1.1.3-nord3-v2-foss-2019b-Python-3.7.4 -module load Cartopy/0.20.3-foss-2019b-Python-3.7.4 -module load netcdf4-python/1.5.3-foss-2019b-Python-3.7.4 - - -python3 run_viirs.py \ No newline at end of file diff --git a/run/run_viirs.py b/run/run_viirs.py index 379cedbc..1743ac4f 100644 --- a/run/run_viirs.py +++ b/run/run_viirs.py @@ -1,4 +1,4 @@ -from viirs import VIIRS +from mapies.viirs import VIIRS if __name__ == "__main__": diff --git a/setup.py b/setup.py index ec3ed241..e8e35673 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import find_packages from setuptools import setup # Could update this using versioneer -version="0.0.3" +version="0.0.4" setup( name="mapies", @@ -20,5 +20,9 @@ setup( author="Calum Meikle", author_email="calum.meikle@bsc.es", packages=find_packages(), + # Include all YAML files inside the 'config' folder + package_data={"mapies": ["config/*.yaml"]}, + include_package_data=True, ) + -- GitLab