diff --git a/.github/build.yml b/.github/build.yml index 47eb8aa..32cd6bc 100644 --- a/.github/build.yml +++ b/.github/build.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.11' - name: Install Poetry uses: abatilo/actions-poetry@v3 with: @@ -383,7 +383,7 @@ jobs: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . file: ./docker/lambdaDockerfileArm @@ -411,7 +411,7 @@ jobs: github.event.head_commit.message == '/deploy sit' || github.event.head_commit.message == '/deploy uat' || github.event.head_commit.message == '/deploy sandbox' - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . file: ./docker/lambdaDockerfileArm diff --git a/.github/release-created.yml b/.github/release-created.yml index 739367b..cec5647 100644 --- a/.github/release-created.yml +++ b/.github/release-created.yml @@ -21,7 +21,7 @@ jobs: ref: 'refs/heads/develop' - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.11' - name: Install Poetry uses: abatilo/actions-poetry@v3 with: diff --git a/podaac/lambda_handler/lambda_handler.py b/podaac/lambda_handler/lambda_handler.py index f4ef3e7..3ac4c78 100644 --- a/podaac/lambda_handler/lambda_handler.py +++ b/podaac/lambda_handler/lambda_handler.py @@ -76,13 +76,11 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.logger = cumulus_logger - def clean_all(self): """ Removes anything saved to self.path """ rmtree(self.path) clean_tmp() - def download_file_from_s3(self, s3file, working_dir): """ Download s3 file to local @@ -104,7 +102,6 @@ def download_file_from_s3(self, s3file, working_dir): self.logger.error("Error downloading file %s: %s" % (s3file, working_dir), exc_info=True) raise ex - def upload_file_to_s3(self, filename, uri): """ Upload a local file to s3 if collection payload provided @@ -121,7 +118,6 @@ def upload_file_to_s3(self, filename, uri): self.logger.error("Error uploading file %s: %s" % (os.path.basename(os.path.basename(filename)), str(ex)), exc_info=True) raise ex - @staticmethod def get_file_type(filename, files): """Get custom file type, default to metadata @@ -139,7 +135,6 @@ def get_file_type(filename, files): return collection_file['type'] return 'metadata' - @staticmethod def get_bucket(filename, files, buckets): """Extract the bucket from the files @@ -165,7 +160,6 @@ def get_bucket(filename, files, buckets): break return buckets[bucket_type] - def get_config(self): """Get configuration file for image generations Returns @@ -193,7 +187,6 @@ def get_config(self): return cfg_file_full_path - def process(self): """Main process to generate images for granules @@ -229,13 +222,11 @@ def process(self): return self.input - @classmethod def handler(cls, event, context=None, path=None, noclean=False): """ General event handler """ return cls.run(path=path, noclean=noclean, context=context, **event) - @classmethod def run(cls, *args, **kwargs): """ Run this payload with the given Process class """ diff --git a/poetry.lock b/poetry.lock index 60f647c..412924b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "alphashape" @@ -615,7 +615,10 @@ files = [ ] [package.dependencies] -numpy = {version = ">=1.26.0", markers = "python_version >= \"3.12\""} +numpy = [ + {version = ">=1.23.2", markers = "python_version == \"3.11\""}, + {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, +] python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.7" @@ -722,7 +725,10 @@ files = [ [package.dependencies] astroid = ">=3.1.0,<=3.2.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = {version = ">=0.3.7", markers = "python_version >= \"3.12\""} +dill = [ + {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, +] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" @@ -1146,5 +1152,5 @@ viz = ["matplotlib", "nc-time-axis", "seaborn"] [metadata] lock-version = "2.0" -python-versions = "^3.12" -content-hash = "e1f8313a6b5c67a23c0ba351536d3c40d5926d0e3ce04d25cf29ecaa26ff8d40" +python-versions = "^3.11" +content-hash = "622922015f64b96dcb03cca3252e2c2ed65d24f32f30eb6a1196a4e9dc2c478e" diff --git a/pyproject.toml b/pyproject.toml index 3a86c9f..ee127d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.12" +python = "^3.11" pyyaml = "^6.0" alphashape = "^1.3.1" np = "^1.0.2"