Skip to content

Commit e71fcd8

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

7 files changed

Lines changed: 144 additions & 129 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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."

Makefile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
srcs = src docs/modules/ROOT/examples tests setup.py
1+
srcs = src docs/modules/ROOT/examples tests
22
isort = isort --quiet \
33
--skip docs/modules/ROOT/examples/app_types \
44
--skip docs/modules/ROOT/examples/logging/tutorial001.py \
@@ -16,23 +16,19 @@ help: Makefile
1616

1717
## install: Install all requirements.
1818
.PHONY: install
19-
install: install-corva-sdk install-test install-lint
19+
install: install-corva-sdk install-dev
2020

2121
## install-corva-sdk: Install corva-sdk requirements.
2222
.PHONY: install-corva-sdk
2323
install-corva-sdk:
2424
@pip install -U pip
2525
@pip install -U -e .
2626

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

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

3733
## test: Run tests.
3834
.PHONY: test
@@ -66,16 +62,16 @@ coverage-html: test
6662
## lint: Run linter.
6763
.PHONY: lint
6864
lint:
69-
@flake8 $(srcs)
65+
@ruff check $(srcs)
7066
@$(black) --check
7167
@mypy --check-untyped-defs $(srcs)
7268

7369
## format: Format all files.
7470
.PHONY: format
7571
format:
7672
@$(isort) --force-single-line-imports
77-
@autoflake --remove-all-unused-imports --recursive --remove-unused-variables \
78-
--in-place $(srcs)
73+
@ruff check --fix $(srcs)
74+
@ruff format $(srcs)
7975
@$(black) --quiet
8076
@$(isort)
8177

@@ -107,6 +103,7 @@ clean:
107103
release:
108104
@echo "Checkout the master branch."
109105
@echo "Update src/version.py with new version."
106+
@echo "Update pyproject.toml version"
110107
@echo "Update docs/antora.yml 'version' with new version like '1.6.0'."
111108
@echo "Update docs/antora-playbook.yml 'content.sources.tags'."
112109
@echo "Update CHANGELOG.md."

pyproject.toml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
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.8,<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.8",
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+
"black==22.3.0",
39+
"ruff==0.12.11",
40+
"isort==5.8.0",
41+
"mypy==0.950",
42+
"types-freezegun~=1.1.9",
43+
"types-redis~=4.2.4",
44+
"types-requests~=2.27.27",
45+
"coverage==7.6.1",
46+
"freezegun==1.5.1",
47+
"pytest==6.2.5",
48+
"pytest-mock==3.3.1",
49+
"requests-mock==1.8.0",
50+
]
51+
52+
[tool.setuptools]
53+
package-dir = { "" = "src" }
54+
packages = { find = { where = ["src"] } }
55+
py-modules = ["plugin"]
56+
57+
[project.entry-points."pytest11"]
58+
corva = "plugin"
59+
60+
[tool.ruff]
61+
line-length = 88
62+
exclude = ["__init__.py"]
63+
lint.select = ["C", "E", "W", "F", "I"]
64+
lint.extend-ignore = ["E203", "Q000"]
65+
format.exclude = ["__init__.py"]
66+
67+
[tool.coverage.run]
68+
source = ["corva", "docs/modules/ROOT/examples", "tests"]
69+
branch = true
70+
parallel = true
71+
72+
[tool.coverage.report]
73+
precision = 2
74+
fail_under = 97.68
75+
skip_covered = true
76+
show_missing = true
77+
exclude_lines = [
78+
"@abc.abstractmethod",
79+
"if TYPE_CHECKING",
80+
"class .*Protocol.*",
81+
"@overload"
82+
]
83+
omit = [
84+
"docs/modules/ROOT/examples/logging/tutorial003.py",
85+
"docs/modules/ROOT/examples/logging/tutorial004.py",
86+
"docs/modules/ROOT/examples/logging/tutorial005.py",
87+
"docs/modules/ROOT/examples/followable/tutorial001.py",
88+
"src/corva/__init__.py",
89+
"src/version.py",
90+
"src/plugin.py"
91+
]
92+
93+
[tool.isort]
94+
profile = "black"
95+
96+
[tool.mypy]
97+
exclude = '''(?x)(
98+
^docs/modules/ROOT/examples/cache/tutorial004\.py$
99+
| ^docs/modules/ROOT/examples/cache/tutorial005\.py$
100+
)'''
101+
102+
[[tool.mypy.overrides]]
103+
module = "setuptools.*"
104+
ignore_missing_imports = true
105+
106+
[[tool.mypy.overrides]]
107+
module = "docs.*"
108+
ignore_missing_imports = true
109+
110+
[[tool.mypy.overrides]]
111+
module = "requests_mock.*"
112+
ignore_missing_imports = true
113+
114+
[[tool.mypy.overrides]]
115+
module = "raygun4py.*"
116+
ignore_missing_imports = true
117+
118+
[[tool.mypy.overrides]]
119+
module = "rollbar.*"
120+
ignore_missing_imports = true
121+
122+
[[tool.mypy.overrides]]
123+
module = "sentry_sdk.*"
124+
ignore_missing_imports = true
125+
126+
[[tool.mypy.overrides]]
127+
module = "fakeredis.*"
128+
ignore_missing_imports = true
129+

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)