Skip to content

Commit b5c994d

Browse files
feat: [CINF-4627] Bump urllib version
1 parent b467c0d commit b5c994d

8 files changed

Lines changed: 146 additions & 142 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on: push
44

55
env:
6-
PYTHON_VERSIONS: '[ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.3" ]'
6+
PYTHON_VERSIONS: '[ "3.9", "3.10", "3.11", "3.12", "3.13.3" ]'
77

88
jobs:
99

@@ -33,7 +33,7 @@ jobs:
3333
python-version: ${{ matrix.python-version }}
3434

3535
- name: Install
36-
run: make install-lint
36+
run: make install-dev
3737

3838
- name: Run
3939
run: make lint
@@ -56,7 +56,7 @@ jobs:
5656
python-version: ${{ matrix.python-version }}
5757

5858
- name: Install
59-
run: make install-test
59+
run: make install-dev
6060

6161
- name: Run
6262
run: make coverage
@@ -72,19 +72,19 @@ jobs:
7272
run: |
7373
# Initialize a flag to track failures
7474
FAILED=0
75-
75+
7676
# Check the result of the 'static' job
7777
if [ "${{ needs.static.result }}" == "failure" ]; then
7878
echo "Static analysis job failed."
7979
FAILED=1
8080
fi
81-
81+
8282
# Check the result of the 'test' job
8383
if [ "${{ needs.test.result }}" == "failure" ]; then
8484
echo "Test job failed."
8585
FAILED=1
8686
fi
87-
87+
8888
# Exit with status 1 if any job failed
8989
if [ "$FAILED" -ne 0 ]; then
9090
echo "One or more jobs failed."
@@ -107,7 +107,7 @@ jobs:
107107

108108
- uses: actions/setup-python@v2
109109
with:
110-
python-version: 3.8
110+
python-version: 3.9
111111

112112
- name: Install dependencies
113113
run: pip install -U setuptools wheel

Makefile

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
srcs = src docs/modules/ROOT/examples tests setup.py
2-
isort = isort --quiet \
3-
--skip docs/modules/ROOT/examples/app_types \
4-
--skip docs/modules/ROOT/examples/logging/tutorial001.py \
5-
$(srcs)
6-
black = black --skip-string-normalization $(srcs)
1+
srcs = src docs/modules/ROOT/examples tests
72

83
## all: Run linter and tests.
94
.PHONY: all
@@ -16,23 +11,19 @@ help: Makefile
1611

1712
## install: Install all requirements.
1813
.PHONY: install
19-
install: install-corva-sdk install-test install-lint
14+
install: install-corva-sdk install-dev
2015

2116
## install-corva-sdk: Install corva-sdk requirements.
2217
.PHONY: install-corva-sdk
2318
install-corva-sdk:
2419
@pip install -U pip
2520
@pip install -U -e .
2621

27-
## install-test: Install test requirements.
28-
.PHONY: install-test
29-
install-test: install-corva-sdk
30-
@pip install -U -r requirements-test.txt
22+
## install-dev: Install dev requirements.
23+
.PHONY: install-dev
24+
install-dev: install-corva-sdk
25+
@pip install -U '.[dev]'
3126

32-
## install-lint: Install lint requirements.
33-
.PHONY: install-lint
34-
install-lint: install-test
35-
@pip install -U -r requirements-lint.txt
3627

3728
## test: Run tests.
3829
.PHONY: test
@@ -66,18 +57,14 @@ coverage-html: test
6657
## lint: Run linter.
6758
.PHONY: lint
6859
lint:
69-
@flake8 $(srcs)
70-
@$(black) --check
60+
@ruff check $(srcs)
7161
@mypy --check-untyped-defs $(srcs)
7262

7363
## format: Format all files.
7464
.PHONY: format
7565
format:
76-
@$(isort) --force-single-line-imports
77-
@autoflake --remove-all-unused-imports --recursive --remove-unused-variables \
78-
--in-place $(srcs)
79-
@$(black) --quiet
80-
@$(isort)
66+
@ruff check --fix $(srcs)
67+
@ruff format $(srcs)
8168

8269
## docs: Generate docs.
8370
.PHONY: docs
@@ -107,6 +94,7 @@ clean:
10794
release:
10895
@echo "Checkout the master branch."
10996
@echo "Update src/version.py with new version."
97+
@echo "Update pyproject.toml version"
11098
@echo "Update docs/antora.yml 'version' with new version like '1.6.0'."
11199
@echo "Update docs/antora-playbook.yml 'content.sources.tags'."
112100
@echo "Update CHANGELOG.md."

docs/modules/ROOT/pages/index.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Documentation for version *{page-version}*.
2929

3030
== Install
3131

32-
{corva-sdk} requires Python 3.8.
32+
{corva-sdk} requires Python 3.9.
3333

3434
Installation is as simple as:
3535

@@ -802,7 +802,7 @@ Here are some guidelines to set up your environment.
802802

803803
What's needed:
804804

805-
* Python 3.8.
805+
* Python 3.9.
806806
* Opened terminal inside cloned {corva-sdk} repository.
807807

808808
[source,bash]

pyproject.toml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "corva-sdk"
7+
description = "SDK for building Corva DevCenter Python apps."
8+
readme = "README.md"
9+
version = "1.14.2"
10+
license = { text = "The Unlicense" }
11+
authors = [
12+
{ name = "Jordan Ambra", email = "jordan.ambra@corva.ai" }
13+
]
14+
keywords = ["corva", "sdk"]
15+
requires-python = ">=3.9,<4.0"
16+
dependencies = [
17+
"fakeredis[lua] >=2.26.2, <2.30.0",
18+
"pydantic >=1.8.2, <2.0.0",
19+
"redis >=5.2.1, <6.0.0",
20+
"requests >=2.32.3, <3.0.0",
21+
"urllib3==2.5.0"
22+
]
23+
classifiers = [
24+
"Development Status :: 5 - Production/Stable",
25+
"Intended Audience :: Developers",
26+
"Operating System :: OS Independent",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.9",
30+
"Topic :: Software Development :: Libraries"
31+
]
32+
33+
[project.urls]
34+
Homepage = "https://github.com/corva-ai/python-sdk"
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"ruff==0.12.11",
39+
"mypy==0.950",
40+
"types-freezegun~=1.1.9",
41+
"types-redis~=4.2.4",
42+
"types-requests~=2.27.27",
43+
"coverage==7.6.1",
44+
"freezegun==1.5.1",
45+
"pytest==6.2.5",
46+
"pytest-mock==3.3.1",
47+
"requests-mock==1.8.0",
48+
]
49+
50+
[tool.setuptools]
51+
package-dir = { "" = "src" }
52+
packages = { find = { where = ["src"] } }
53+
py-modules = ["plugin"]
54+
55+
[project.entry-points."pytest11"]
56+
corva = "plugin"
57+
58+
[tool.ruff]
59+
line-length = 88
60+
exclude = ["__init__.py"]
61+
lint.select = ["C", "E", "W", "F", "I"]
62+
lint.extend-ignore = ["E203", "Q000"]
63+
format.exclude = ["__init__.py"]
64+
65+
[tool.coverage.run]
66+
source = ["corva", "docs/modules/ROOT/examples", "tests"]
67+
branch = true
68+
parallel = true
69+
70+
[tool.coverage.report]
71+
precision = 2
72+
fail_under = 97.68
73+
skip_covered = true
74+
show_missing = true
75+
exclude_lines = [
76+
"@abc.abstractmethod",
77+
"if TYPE_CHECKING",
78+
"class .*Protocol.*",
79+
"@overload"
80+
]
81+
omit = [
82+
"docs/modules/ROOT/examples/logging/tutorial003.py",
83+
"docs/modules/ROOT/examples/logging/tutorial004.py",
84+
"docs/modules/ROOT/examples/logging/tutorial005.py",
85+
"docs/modules/ROOT/examples/followable/tutorial001.py",
86+
"src/corva/__init__.py",
87+
"src/version.py",
88+
"src/plugin.py"
89+
]
90+
91+
[tool.isort]
92+
profile = "black"
93+
94+
[tool.mypy]
95+
exclude = '''(?x)(
96+
^docs/modules/ROOT/examples/cache/tutorial004\.py$
97+
| ^docs/modules/ROOT/examples/cache/tutorial005\.py$
98+
)'''
99+
100+
[[tool.mypy.overrides]]
101+
module = "setuptools.*"
102+
ignore_missing_imports = true
103+
104+
[[tool.mypy.overrides]]
105+
module = "docs.*"
106+
ignore_missing_imports = true
107+
108+
[[tool.mypy.overrides]]
109+
module = "requests_mock.*"
110+
ignore_missing_imports = true
111+
112+
[[tool.mypy.overrides]]
113+
module = "raygun4py.*"
114+
ignore_missing_imports = true
115+
116+
[[tool.mypy.overrides]]
117+
module = "rollbar.*"
118+
ignore_missing_imports = true
119+
120+
[[tool.mypy.overrides]]
121+
module = "sentry_sdk.*"
122+
ignore_missing_imports = true
123+
124+
[[tool.mypy.overrides]]
125+
module = "fakeredis.*"
126+
ignore_missing_imports = true
127+

requirements-lint.txt

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

requirements-test.txt

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

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)