Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI to add 3.12 and change yapf check to use 3.8 #972

Merged
merged 5 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Pip cache
uses: actions/cache@v2
with:
Expand All @@ -30,11 +30,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Pip cache
uses: actions/cache@v2
with:
Expand All @@ -53,15 +53,16 @@ jobs:

strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Pip cache
uses: actions/cache@v2
with:
Expand All @@ -79,11 +80,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Pip cache
uses: actions/cache@v2
with:
Expand All @@ -101,11 +102,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Pip cache
uses: actions/cache@v2
with:
Expand Down
14 changes: 12 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,25 @@ def coverage(session):
session.run('coverage', 'report')


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
def test(session):
session.run('python', '-m', 'ensurepip', '--upgrade')
session.install('-U', 'setuptools')
session.install(".[test]")

options = session.posargs
# -W=error raises pytest warnings to errors so they are caught by CI
# to exclude some warnings, see
# https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings
session.run('pytest', '--ignore', 'examples/', '-v', '-W=error', *options)
session.run('python',
'-m',
'pytest',
'--ignore',
'examples/',
'-v',
'-Werror',
'-Wignore::DeprecationWarning:tqdm.std',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tqdm is using a datetime method that is deprecated in Python 3.12.

*options)


@nox.session
Expand Down
2 changes: 1 addition & 1 deletion planet/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.3'
__version__ = '2.1.0dev'
16 changes: 8 additions & 8 deletions planet/cli/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ async def list_subscription_results_cmd(ctx,
'--notifications',
type=types.JSON(),
help='Notifications JSON. Can be a string, filename, or - for stdin.')
@click.option('--tools',
type=types.JSON(),
help='Toolchain JSON. Can be a string, filename, or - for stdin.'
)
@click.option(
'--tools',
type=types.JSON(),
help='Toolchain JSON. Can be a string, filename, or - for stdin.')
@pretty
def request(name, source, delivery, notifications, tools, pretty):
"""Generate a subscriptions request."""
Expand Down Expand Up @@ -247,10 +247,10 @@ def request(name, source, delivery, notifications, tools, pretty):
@click.option('--rrule',
type=str,
help='iCalendar recurrance rule to specify recurrances.')
@click.option('--filter',
type=types.JSON(),
help='Search filter. Can be a string, filename, or - for stdin.'
)
@click.option(
'--filter',
type=types.JSON(),
help='Search filter. Can be a string, filename, or - for stdin.')
@pretty
def request_catalog(item_types,
asset_types,
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/test_data_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,11 +875,11 @@ async def _stream_img():

@respx.mock
@pytest.mark.anyio
@pytest.mark.parametrize("hashes_match, md5_entry, expectation",
[(True, True, does_not_raise()),
(False, True, pytest.raises(exceptions.ClientError)),
(True, False, pytest.raises(exceptions.ClientError))]
)
@pytest.mark.parametrize(
"hashes_match, md5_entry, expectation",
[(True, True, does_not_raise()),
(False, True, pytest.raises(exceptions.ClientError)),
(True, False, pytest.raises(exceptions.ClientError))])
async def test_validate_checksum(hashes_match, md5_entry, expectation, tmpdir):
test_bytes = b'foo bar'
testfile = Path(tmpdir / 'test.txt')
Expand Down