Skip to content

Commit

Permalink
Bump neuro cli 24.5.0, release 24.5.0 (#602)
Browse files Browse the repository at this point in the history
* Bump neuro-cli=24.5.0

* Release v24.5.0

* fix tests

* bump pyyaml to 6.0.1

* update pre-commit, fix formatter
  • Loading branch information
YevheniiSemendiak authored May 24, 2024
1 parent 1b88d24 commit f43742f
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 36 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,14 @@ jobs:
credentials_json: ${{ secrets.E2E_COOKIECUTTER_GCP_SA_KEY }}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v1
with:
export_default_credentials: true

- name: Configure AWS access
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.E2E_COOKIECUTTER_AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.E2E_COOKIECUTTER_AWS_ACCESS_KEY }}
aws-region: us-east-1

- name: Run tests on MacOS and Linux
if: matrix.os != 'windows'
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ jobs:

- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v1
with:
export_default_credentials: true

- name: Configure AWS access
uses: aws-actions/configure-aws-credentials@v2
Expand Down
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ repos:
entry: make docs
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.4.0'
rev: 'v4.6.0'
hooks:
- id: check-merge-conflict
exclude: "rst$"
- repo: https://github.com/asottile/yesqa
rev: v1.4.0
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/PyCQA/isort
rev: '5.12.0'
rev: '5.13.2'
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: '23.3.0'
rev: '24.4.2'
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.4.0'
rev: 'v4.6.0'
hooks:
- id: check-case-conflict
- id: check-json
Expand All @@ -40,24 +40,24 @@ repos:
- id: debug-statements
# Another entry is required to apply file-contents-sorter to another file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.4.0'
rev: 'v4.6.0'
hooks:
- id: file-contents-sorter
files: |
docs/spelling_wordlist.txt|
.gitignore
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.3.1'
rev: 'v3.15.2'
hooks:
- id: pyupgrade
args: ['--py38-plus']
- repo: https://github.com/PyCQA/flake8
rev: '6.0.0'
rev: '7.0.0'
hooks:
- id: flake8
exclude: "^docs/"
- repo: https://github.com/rhysd/actionlint
rev: v1.6.24
rev: v1.7.0
hooks:
- id: actionlint-docker
args:
Expand All @@ -70,7 +70,7 @@ repos:
- -ignore
- 'SC2193:'
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.22.0
rev: 0.28.4
hooks:
- id: check-github-actions
ci:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

[comment]: # (towncrier release notes start)

neuro-extras v24.5.0 (2024-05-22)
=================================


No significant changes.


neuro-extras v24.2.0 (2024-02-13)
=================================

Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/archive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for archive management operations (compression and extraction)"""

import abc
import logging

Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/azure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for copying files from/to Azure"""

import logging
import os
from urllib import parse
Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for common functionality and key abstractions related to data copy"""

import abc
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/fs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for copying files on local filesystem"""

import os
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/gcs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for copying files from/to Google Cloud Storage"""

from ..utils import CLIRunner
from .common import Copier, DataUrlType, Resource

Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- LocalToCloudCopier
- CloudToLocalCopier
"""

import logging
import os
import tempfile
Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Provides:
- CopyOperation
"""

import logging
from pathlib import Path
from typing import List, Optional, Tuple
Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/remote.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for copying files by running neu.ro jobs"""

import logging
from dataclasses import dataclass, replace
from typing import List, Mapping, Optional, Tuple
Expand Down
1 change: 1 addition & 0 deletions neuro_extras/data/web.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for copying files from HTTP(S) sources"""

from ..utils import CLIRunner
from .common import Copier, DataUrlType, Resource

Expand Down
10 changes: 0 additions & 10 deletions neuro_extras/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def select_job_preset(
if (
cluster_preset_info.cpu >= min_cpu
and cluster_preset_info.memory_mb >= min_mem
and cluster_preset_info.gpu is None
and not cluster_preset_info.scheduler_enabled
):
good_presets.append((cluster_preset_name, cluster_preset_info))
Expand Down Expand Up @@ -257,15 +256,6 @@ def select_job_preset(
f"satisfy recommended minimum hardware requirements. "
f"Consider using '{good_presets[0][0]}'"
)
elif client.presets[preset].gpu is None:
# The message is only displayed if user selected a bad non-GPU preset
logger.warning(
f"Selected resource preset {preset} does not satisfy "
f"minimal hardware requirements. "
"The job might take long time to accomplish. "
"Consider contacting your cluster manager or admin "
"to adjust the cluster configuration"
)
return preset


Expand Down
2 changes: 1 addition & 1 deletion neuro_extras/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "24.2.0"
__version__ = "24.5.0"
6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
click==8.1.2
neuro-cli==24.2.0
neuro-sdk==24.2.0
pyyaml==6.0
neuro-cli==24.5.0
neuro-sdk==24.5.0
pyyaml==6.0.1
toml==0.10.2
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude =
venv
__pycache__
; see error codes: https://flake8.pycqa.org/en/latest/user/error-codes.html
ignore = F541,W503,E203
ignore = F541,W503,E203,E704

[isort]
line_length = 88
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
url="https://github.com/neuro-inc/neuro-extras",
packages=find_packages(),
install_requires=[
"neuro-cli>=21.11.4",
"neuro-cli>=24.5.0",
"click>=8.0",
"toml>=0.10.0",
"pyyaml>=3.0",
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
class CLIRunner(Protocol):
def __call__(
self, args: List[str], enable_retry: bool = False
) -> "CompletedProcess[str]":
...
) -> "CompletedProcess[str]": ...


def get_tested_archive_types() -> List[str]:
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/image/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def _get_mock_presets() -> t.Dict[str, neuro_sdk.Preset]:
credits_per_hour=Decimal(1),
cpu=5,
memory=3 * 1024 * 1024,
gpu=1,
gpu_model="mygpu",
nvidia_gpu=1,
),
}

Expand All @@ -39,6 +38,7 @@ def _get_mock_clusters() -> t.Dict[str, neuro_sdk.Cluster]:
secrets_url=URL("https://mycluster.noexists/api/v1/secrets"),
disks_url=URL("https://mycluster.noexists/api/v1/disks"),
buckets_url=URL("https://mycluster.noexists/api/v1/buckets"),
resource_pools={},
presets=_get_mock_presets(),
orgs=[],
),
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_select_job_preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_user_selection_is_respected(mock_client: MockNeuroClient, preset: str)
def test_when_nothing_fits_first_preset_is_used(mock_client: MockNeuroClient) -> None:
presets = {
"bad": Preset(cpu=1, memory=9999, credits_per_hour=Decimal("5")),
"gpu": Preset(cpu=4, memory=9999, credits_per_hour=Decimal("15"), gpu=1),
"gpu": Preset(cpu=4, memory=9999, credits_per_hour=Decimal("15"), nvidia_gpu=1),
}
selected_preset = select_job_preset(
preset=None, client=mock_client, min_mem=4096, min_cpu=2
Expand Down

0 comments on commit f43742f

Please sign in to comment.