Skip to content

Commit e462c08

Browse files
author
Ahram Oh
committed
add(profile): add practice profiling with cProfile in stdlib.
1 parent 4439b93 commit e462c08

File tree

7 files changed

+504
-137
lines changed

7 files changed

+504
-137
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,3 +332,6 @@ practice_with_work/
332332
poetry.lock
333333

334334
# End of https://www.toptal.com/developers/gitignore/api/osx,windows,visualstudiocode,pycharm+all,python
335+
336+
# Custom list on device
337+
.ignored

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
default_language_version:
2+
python: python3.13
3+
4+
repos:
5+
# ────────────────────────────────────────────────────────────────
6+
# Black — Code Formatter
7+
# ────────────────────────────────────────────────────────────────
8+
- repo: https://github.com/psf/black
9+
rev: 25.12.0
10+
hooks:
11+
- id: black
12+
language_version: python3.13
13+
args:
14+
- --target-version=py313
15+
16+
# ────────────────────────────────────────────────────────────────
17+
# detect-secrets — Secret Scanner
18+
# ────────────────────────────────────────────────────────────────
19+
- repo: https://github.com/Yelp/detect-secrets
20+
rev: v1.5.0
21+
hooks:
22+
- id: detect-secrets
23+
language_version: python3.13
24+
args:
25+
- --baseline
26+
- .secrets.baseline
27+
28+
# ────────────────────────────────────────────────────────────────
29+
# Bandit — Security Linter
30+
# ────────────────────────────────────────────────────────────────
31+
- repo: https://github.com/PyCQA/bandit
32+
rev: 1.9.2
33+
hooks:
34+
- id: bandit
35+
language_version: python3.13
36+
args:
37+
- -ll

.secrets.baseline

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"version": "1.5.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "GitLabTokenDetector"
31+
},
32+
{
33+
"name": "HexHighEntropyString",
34+
"limit": 3.0
35+
},
36+
{
37+
"name": "IbmCloudIamDetector"
38+
},
39+
{
40+
"name": "IbmCosHmacDetector"
41+
},
42+
{
43+
"name": "IPPublicDetector"
44+
},
45+
{
46+
"name": "JwtTokenDetector"
47+
},
48+
{
49+
"name": "KeywordDetector",
50+
"keyword_exclude": ""
51+
},
52+
{
53+
"name": "MailchimpDetector"
54+
},
55+
{
56+
"name": "NpmDetector"
57+
},
58+
{
59+
"name": "OpenAIDetector"
60+
},
61+
{
62+
"name": "PrivateKeyDetector"
63+
},
64+
{
65+
"name": "PypiTokenDetector"
66+
},
67+
{
68+
"name": "SendGridDetector"
69+
},
70+
{
71+
"name": "SlackDetector"
72+
},
73+
{
74+
"name": "SoftlayerDetector"
75+
},
76+
{
77+
"name": "SquareOAuthDetector"
78+
},
79+
{
80+
"name": "StripeDetector"
81+
},
82+
{
83+
"name": "TelegramBotTokenDetector"
84+
},
85+
{
86+
"name": "TwilioKeyDetector"
87+
}
88+
],
89+
"filters_used": [
90+
{
91+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92+
},
93+
{
94+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
95+
"min_level": 2
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_lock_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
108+
},
109+
{
110+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
111+
},
112+
{
113+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
114+
},
115+
{
116+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
117+
},
118+
{
119+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
120+
},
121+
{
122+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
123+
}
124+
],
125+
"results": {
126+
"src/practice_files/practice_django/practice_site/practice_site/settings.py": [
127+
{
128+
"type": "Secret Keyword",
129+
"filename": "src/practice_files/practice_django/practice_site/practice_site/settings.py",
130+
"hashed_secret": "d19b11c9f75aa90d4e3cdbb011ce1434e100ae79",
131+
"is_verified": false,
132+
"line_number": 23
133+
}
134+
],
135+
"tests/model_test/model_fixtures_v1.py": [
136+
{
137+
"type": "Secret Keyword",
138+
"filename": "tests/model_test/model_fixtures_v1.py",
139+
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
140+
"is_verified": false,
141+
"line_number": 39
142+
}
143+
],
144+
"tests/model_test/model_fixtures_v2.py": [
145+
{
146+
"type": "Secret Keyword",
147+
"filename": "tests/model_test/model_fixtures_v2.py",
148+
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
149+
"is_verified": false,
150+
"line_number": 25
151+
}
152+
]
153+
},
154+
"generated_at": "2025-12-26T09:25:02Z"
155+
}

pyproject.toml

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,83 @@ packages = [
99
{ include = "problems", from="src" }
1010
]
1111

12-
1312
[tool.poetry.dependencies]
14-
python = "^3.8"
15-
requests = "^2.31.0"
13+
python = "^3.11"
1614
pytz = { version="^2023.3", python = "<3.9"}
1715
PyYAML = "^6.0.1"
18-
beautifulsoup4 = "^4.12.2"
19-
selenium = "^4.7.2"
20-
redis = "^4.6.0"
21-
opencv-python = "^4.8.0.74"
2216
tblib = "^2.0.0"
23-
SQLAlchemy = "^2.0.19"
2417
psycopg = "^3.1.9"
18+
redis = "^4.6.0"
2519
mysql-connector-python = "^8.1.0"
26-
fastapi-plugins = "^0.12.0"
20+
python-crontab = "^3.2.0"
21+
apscheduler = "^3.11.0"
22+
gevent = "^25.5.1"
23+
croniter = "^6.0.0"
24+
datamodel-code-generator = "^0.39.0"
25+
llama-index = "^0.14.10"
26+
llama-index-llms-ollama = "^0.9.1"
27+
langchain = "^1.2.0"
28+
langchain-ollama = "^1.0.1"
29+
30+
[tool.poetry.group.web.dependencies]
31+
beautifulsoup4 = "^4.12.2"
32+
selenium = "^4.7.2"
33+
SQLAlchemy = "^2.0.19"
2734
django = "^4.2.3"
28-
pandas = "^2.0.3"
35+
fastapi = "^0.115.12"
36+
uvicorn = {extras = ["standard"], version = "^0.34.2"}
37+
crawlee = {extras = ["all"], version = "^0.6.9"}
38+
aiohttp = "^3.12.14"
39+
requests = "^2.31.0"
2940

3041
[tool.poetry.group.dev.dependencies]
31-
mypy = "^1.4.1"
32-
black = "^23.7.0"
42+
mypy = "^1.19.1"
43+
black = "^25.12.0"
3344
hypothesis = "^6.82.0"
3445
pytest-factoryboy = "^2.5.1"
3546
pytest = "^7.4.0"
3647
pytest-cov = "^4.1.0"
37-
pre-commit = "^3.3.3"
38-
bandit = "^1.7.5"
48+
pre-commit = "^4.5.0"
49+
bandit = "^1.9.2"
3950
pytest-mock-resources = "^2.9.0"
4051
isort = "^5.12.0"
41-
detect-secrets = "^1.4.0"
52+
detect-secrets = "^1.5.0"
4253
ipykernel = "^6.24.0"
4354

55+
[tool.poetry.group.ai.dependencies]
56+
kiwipiepy = {extras = ["konlpy"], version = "^0.22.1"}
57+
opencv-python = "^4.12.0.88"
58+
llama-index = "^0.14.9"
59+
llama-index-llms-ollama = "^0.9.0"
60+
langchain = "^1.1.0"
61+
langchain-ollama = "^1.0.0"
62+
networkx = "^3.6"
63+
matplotlib = "^3.10.7"
64+
polyglot = "^16.7.4"
65+
pandas = "^2.2"
66+
67+
[tool.mypy]
68+
python_version = "3.13"
69+
70+
# Strictness
71+
strict = true
72+
warn_unused_configs = true
73+
warn_return_any = true
74+
warn_unused_ignores = true
75+
warn_redundant_casts = true
76+
77+
# Import handling
78+
ignore_missing_imports = true
79+
follow_imports = "silent"
80+
81+
# Output
82+
show_error_codes = true
83+
pretty = true
84+
color_output = true
4485

4586
[tool.black]
46-
line-lengh = 79
47-
target-version = ['py38', 'py39', 'py310', 'py311']
87+
line-length = 79
88+
target-version = ['py313']
4889

4990
[tool.pytest.ini_options]
5091
minversion = "6.0"

0 commit comments

Comments
 (0)