Skip to content

Commit

Permalink
Merge pull request #142 from xylar/drop-python-3.8
Browse files Browse the repository at this point in the history
Drop python 3.8
  • Loading branch information
xylar authored Oct 20, 2023
2 parents 03a2cfe + 69333ff commit 5789b34
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
Expand Down
2 changes: 1 addition & 1 deletion deploy/conda-dev-spec.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# $ conda create --name <env> --file <this file>

# Base
python>=3.8
python>=3.9,<3.12
cartopy
cartopy_offlinedata
cmocean
Expand Down
2 changes: 1 addition & 1 deletion polaris/cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import importlib.resources as imp_res
import json
import os
import pickle
Expand All @@ -9,7 +10,6 @@

from polaris import Step
from polaris.config import PolarisConfigParser
from polaris.io import imp_res


def update_cache(step_paths, date_string=None, dry_run=False):
Expand Down
3 changes: 1 addition & 2 deletions polaris/component.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import importlib.resources as imp_res
import json

from polaris.io import imp_res


class Component:
"""
Expand Down
8 changes: 0 additions & 8 deletions polaris/io.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import os
import sys
import tempfile
from typing import TYPE_CHECKING # noqa: F401
from urllib.parse import urlparse

if TYPE_CHECKING or sys.version_info >= (3, 9, 0):
import importlib.resources as imp_res # noqa: F401
else:
# python <= 3.8
import importlib_resources as imp_res # noqa: F401

import progressbar
import requests

Expand Down
3 changes: 1 addition & 2 deletions polaris/job/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import importlib.resources as imp_res
import os

import numpy as np
from jinja2 import Template

from polaris.io import imp_res


def write_job_script(config, machine, target_cores, min_cores, work_dir,
suite=''):
Expand Down
2 changes: 1 addition & 1 deletion polaris/list.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import argparse
import importlib.resources as imp_res
import os
import re
import sys

from polaris.components import get_components
from polaris.io import imp_res


def list_cases(task_expr=None, number=None, verbose=False):
Expand Down
8 changes: 1 addition & 7 deletions polaris/machines/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import importlib.resources as imp_res
import os
import socket
import sys
from typing import TYPE_CHECKING # noqa: F401

if TYPE_CHECKING or sys.version_info >= (3, 9, 0):
import importlib.resources as imp_res # noqa: F401
else:
# python <= 3.8
import importlib_resources as imp_res # noqa: F401

from mache import discover_machine as mache_discover_machine

Expand Down
3 changes: 1 addition & 2 deletions polaris/namelist.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import importlib.resources as imp_res
from typing import Dict

from polaris.io import imp_res


def parse_replacements(package, namelist):
"""
Expand Down
3 changes: 1 addition & 2 deletions polaris/ocean/vertical/grid_1d.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import importlib.resources as imp_res
import json

import numpy
import numpy as np
from netCDF4 import Dataset
from scipy.optimize import root_scalar

from polaris.io import imp_res


def generate_1d_grid(config):
"""
Expand Down
9 changes: 1 addition & 8 deletions polaris/seaice/tasks/single_column/standard_physics/viz.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import sys
from typing import TYPE_CHECKING # noqa: F401

if TYPE_CHECKING or sys.version_info >= (3, 9, 0):
import importlib.resources as imp_res # noqa: F401
else:
# python <= 3.8
import importlib_resources as imp_res # noqa: F401
import importlib.resources as imp_res

import matplotlib.pyplot as plt
import xarray as xr
Expand Down
3 changes: 2 additions & 1 deletion polaris/step.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import grp
import importlib.resources as imp_res
import logging
import os
import shutil
Expand All @@ -8,7 +9,7 @@
from mache import MachineInfo

from polaris.config import PolarisConfigParser
from polaris.io import download, imp_res, symlink
from polaris.io import download, symlink
from polaris.validate import compare_variables


Expand Down
3 changes: 1 addition & 2 deletions polaris/streams.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import importlib.resources as imp_res
from copy import deepcopy

from jinja2 import Template
from lxml import etree

from polaris.io import imp_res


def read(package, streams_filename, tree=None, replacements=None):
"""
Expand Down
2 changes: 1 addition & 1 deletion polaris/suite.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import argparse
import importlib.resources as imp_res
import sys
from typing import List

from polaris.io import imp_res
from polaris.setup import setup_tasks


Expand Down
9 changes: 1 addition & 8 deletions polaris/viz/style.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import sys
from typing import TYPE_CHECKING # noqa: F401

if TYPE_CHECKING or sys.version_info >= (3, 9, 0):
import importlib.resources as imp_res # noqa: F401
else:
# python <= 3.8
import importlib_resources as imp_res # noqa: F401
import importlib.resources as imp_res

import matplotlib.pyplot as plt

Expand Down
3 changes: 1 addition & 2 deletions polaris/yaml.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import argparse
import importlib.resources as imp_res
from collections import OrderedDict
from typing import Dict

from jinja2 import Template
from lxml import etree
from ruamel.yaml import YAML

from polaris.io import imp_res


class PolarisYaml:
"""
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ project_urls =
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Expand All @@ -22,7 +21,7 @@ classifiers =
[options]
packages = find:
include_package_data = True
python_requires = >=3.8,<3.12
python_requires = >=3.9,<3.12
install_requires =
cartopy
cmocean
Expand Down

0 comments on commit 5789b34

Please sign in to comment.