Skip to content

Commit 97f2fba

Browse files
authored
Merge pull request #22 from quantmind/ls-bump
Bump dependencies
2 parents 1c5c3bc + 1084dc2 commit 97f2fba

File tree

14 files changed

+820
-743
lines changed

14 files changed

+820
-743
lines changed
File renamed without changes.

.dev/lint

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
BLACK_ARG="--check"
5+
RUFF_ARG=""
6+
7+
if [ "$1" = "fix" ] ; then
8+
BLACK_ARG=""
9+
RUFF_ARG="--fix"
10+
fi
11+
12+
echo "run black"
13+
black metablock tests ${BLACK_ARG}
14+
echo "run ruff"
15+
ruff check metablock tests ${RUFF_ARG}
16+
echo "run mypy"
17+
mypy metablock tests

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
env:
1414
PYTHON_ENV: ci
1515
METABLOCK_API_TOKEN: ${{ secrets.METABLOCK_API_TOKEN }}
16-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
16+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1717
strategy:
1818
matrix:
19-
python-version: ["3.10", "3.11"]
19+
python-version: ["3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v3
@@ -31,11 +31,11 @@ jobs:
3131
- name: run tests
3232
run: make test
3333
- name: upload coverage
34-
if: matrix.python-version == '3.11'
34+
if: matrix.python-version == '3.12'
3535
uses: codecov/codecov-action@v3
3636
with:
3737
token: ${{ secrets.CODECOV_TOKEN }}
3838
files: ./build/coverage.xml
3939
- name: release
40-
if: ${{matrix.python-version == '3.11' && github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release'}}
40+
if: ${{matrix.python-version == '3.12' && github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release'}}
4141
run: make publish

Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Minimal makefile for Sphinx documentation
22
#
33

4-
.PHONY: help clean install lint mypy test test-lint publish
5-
4+
.PHONY: help
65
help:
76
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
87

8+
.PHONY: clean
99
clean: ## remove python cache files
1010
find . -name '__pycache__' | xargs rm -rf
1111
find . -name '*.pyc' -delete
@@ -16,27 +16,27 @@ clean: ## remove python cache files
1616
rm -rf .mypy_cache
1717
rm -rf .coverage
1818

19-
19+
.PHONY: install
2020
install: ## install packages with poetry
21-
@./dev/install
22-
21+
@./.dev/install
2322

23+
.PHONY: lint
2424
lint: ## run linters
25-
poetry run ./dev/lint
26-
25+
poetry run ./.dev/lint fix
2726

27+
.PHONY: test
2828
test: ## test with coverage
2929
@poetry run \
3030
pytest -v --cov --cov-report xml --cov-report html
3131

32-
32+
.PHONY: test-lint
3333
test-lint: ## run linters
34-
poetry run ./dev/lint --check
35-
34+
poetry run ./.dev/lint
3635

36+
.PHONY: publish
3737
publish: ## release to pypi and github tag
38-
@poetry publish --build -u lsbardel -p $(PYPI_PASSWORD)
39-
38+
@poetry publish --build -u __token__ -p $(PYPI_TOKEN)
4039

40+
.PHONY: outdated
4141
outdated: ## show outdated packages
4242
poetry show -o -a

dev/lint

Lines changed: 0 additions & 5 deletions
This file was deleted.

metablock/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import click
66
import yaml
7+
78
from metablock import Metablock
89

910
METABLOCK_SPACE = os.environ.get("METABLOCK_SPACE", "")

metablock/components.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ async def _head(self, response: ClientResponse) -> bool:
245245
raise MetablockResponseError(response)
246246

247247
async def _paginated(self, response: ClientResponse) -> Any:
248-
next = response.links.get("next")
249-
if isinstance(next, Mapping):
250-
url = next.get("url")
248+
next_ = response.links.get("next")
249+
if isinstance(next_, Mapping):
250+
url = next_.get("url")
251251
else:
252252
url = None
253253
data = await self.cli.handle_response(response)

poetry.lock

Lines changed: 764 additions & 695 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
[tool.poetry]
22
name = "metablock"
3-
version = "0.7.1"
3+
version = "0.8.0"
44
description = "Metablock cloud python client"
55
authors = ["Luca <luca@quantmind.com>"]
66
license = "BSD"
77
readme = "readme.md"
88

99
[tool.poetry.dependencies]
10-
python = ">=3.10,<3.12"
11-
aiohttp = "^3.8.3"
12-
click = "^8.1.3"
13-
pyyaml = "^6.0"
10+
python = ">=3.10"
11+
aiohttp = "^3.10.10"
12+
click = "^8.1.7"
13+
pyyaml = "^6.0.2"
1414

1515
[tool.poetry.group.dev.dependencies]
16-
pytest-asyncio = "^0.21.0"
17-
pytest = "^7.0.1"
18-
pytest-cov = "^4.0.0"
19-
mypy = "^1.3.0"
20-
black = "^23.3.0"
16+
pytest-asyncio = "^0.24.0"
17+
pytest = "^8.3.3"
18+
pytest-cov = "^5.0.0"
19+
mypy = "^1.12.0"
20+
black = "^24.10.0"
2121
isort = "^5.11.3"
22-
flake8 = "^6.0.0"
23-
flake8-builtins = "^2.0.1"
2422
python-dotenv = "^1.0.0"
25-
types-pyyaml = "^6.0.12.10"
23+
types-pyyaml = "^6.0.12.20240917"
24+
ruff = "^0.7.0"
2625

2726
[build-system]
2827
requires = ["poetry-core>=1.0.0"]
@@ -38,6 +37,9 @@ testpaths = [
3837
"tests"
3938
]
4039

40+
[tool.ruff]
41+
lint.select = ["A", "E", "W", "F", "I", "B", "N"]
42+
line-length = 88
4143

4244
[tool.mypy]
4345
disallow_untyped_calls = true

setup.cfg

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
22

33
import pytest
4+
45
from metablock import Metablock
56

67

tests/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from click.testing import CliRunner
2+
23
from metablock.cli import main
34

45

tests/test_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from metablock import Metablock, MetablockResponseError
34

45

tests/test_spaces.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from metablock import Metablock, MetablockResponseError
34

45

0 commit comments

Comments
 (0)