Skip to content

Commit 3c85338

Browse files
committed
chore:initialize python-modern-toolkit
0 parents  commit 3c85338

17 files changed

Lines changed: 715 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
version: "latest"
19+
20+
- name: Set up Python
21+
run: uv python install 3.12
22+
23+
- name: Install dependencies
24+
run: uv sync --all-extras
25+
26+
- name: Lint with ruff
27+
run: uv run ruff check .
28+
29+
- name: Run tests
30+
run: uv run pytest --cov=src --cov-report=term-missing

‎.gitignore‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# Virtual environments
10+
.venv
11+
12+
# Python
13+
__pycache__/
14+
*.py[cod]
15+
*.egg-info/
16+
.pytest_cache/
17+
.mypy_cache/
18+
.ruff_cache/
19+
.coverage
20+
htmlcov/
21+
*.cover
22+
23+
# Entornos
24+
.venv/
25+
.env
26+
venv/
27+
28+
# Editores
29+
.vscode/
30+
.idea/
31+
*.swp
32+
33+
# OS
34+
.DS_Store
35+
36+
# Datos locales
37+
data/
38+
*.csv
39+
*.parquet
40+
!tests/**/*.csv

‎.python-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

‎README.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Python Modern Toolkit
2+
3+
Exploración del stack Python 2026: types, async, performance, data engineering moderno, packaging y deploy.
4+
Combina ejercicios algorítmicos, notas técnicas de investigación y mini-proyectos integradores.
5+
6+
## Estructura
7+
8+
- `src/week_01_basics/` — Strings, listas, diccionarios (hash maps).
9+
- `src/week_02_arrays/` — Two pointers, sliding window, arrays.
10+
- `src/week_03_search_recursion/` — Búsqueda binaria, recursión, árboles, linked lists.
11+
- `src/week_04_dp_pandas/` — DP, Pandas, NumPy.
12+
- `tests/` — Tests con pytest, espejo de la estructura de `src/`.
13+
- `notes/` — Apuntes técnicos.
14+
15+
## Setup
16+
17+
\`\`\`bash
18+
uv sync --all-extras
19+
\`\`\`
20+
21+
## Ejecutar tests
22+
23+
\`\`\`bash
24+
pytest # todos
25+
pytest tests/week_01_basics # una semana
26+
pytest tests/week_01_basics/test_day_01_two_sum.py -v # un ejercicio
27+
pytest --cov=src # con coverage
28+
\`\`\`
29+
30+
## Lint
31+
32+
\`\`\`bash
33+
ruff check .
34+
ruff format .
35+
\`\`\`
36+
37+
## Convenciones
38+
39+
- Un módulo por ejercicio: `src/week_NN/day_NN_slug.py`
40+
- Un test por módulo: `tests/week_NN/test_day_NN_slug.py`
41+
- Cada solución tiene docstring con: URL, dificultad, complejidad temporal/espacial, decisiones clave.
42+
- Type hints en todas las funciones públicas.
43+
44+
## Progreso
45+
46+
- [ ] Semana 1 — Strings,listas,diccionarios
47+
- [ ] Semana 2 — Two pointers, sliding window, arrays (Medium)
48+
- [ ] Semana 3 — Recursión, búsqueda, ordenamiento (Medium)
49+
- [ ] Semana 4 - DP, Pandas/NumPy, casos DS (Hard / aplicado)

‎pyproject.toml‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[project]
2+
name = "python-modern-toolkit"
3+
version = "0.1.0"
4+
description = "Soluciones a ejercicios diarios de Python (LeetCode, HackerRank, StrataScratch)"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
dependencies = [
8+
"numpy>=1.26",
9+
"pandas>=2.2",
10+
]
11+
12+
[project.optional-dependencies]
13+
dev = [
14+
"pytest>=8.0",
15+
"pytest-cov>=5.0",
16+
"hypothesis>=6.100",
17+
"ruff>=0.6",
18+
"mypy>=1.11",
19+
]
20+
21+
[build-system]
22+
requires = ["hatchling"]
23+
build-backend = "hatchling.build"
24+
25+
[tool.ruff]
26+
line-length = 100
27+
target-version = "py312"
28+
29+
[tool.ruff.lint]
30+
select = [
31+
"E", # pycodestyle errors
32+
"W", # pycodestyle warnings
33+
"F", # pyflakes
34+
"I", # isort
35+
"B", # flake8-bugbear
36+
"UP", # pyupgrade
37+
"SIM", # flake8-simplify
38+
]
39+
40+
[tool.pytest.ini_options]
41+
testpaths = ["tests"]
42+
python_files = ["test_*.py"]
43+
addopts = "-v --tb=short"
44+
45+
[tool.mypy]
46+
python_version = "3.12"
47+
strict = true
48+
ignore_missing_imports = true

‎src/__init__.py‎

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def main() -> None:
2+
print("Hello from python-daily-practice!")

‎src/week_01_basics/__init__.py‎

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""
2+
Day 01 — Two Sum.
3+
4+
Plataforma: LeetCode (Easy)
5+
URL: https://leetcode.com/problems/two-sum/
6+
7+
Enunciado:
8+
Dado un array de enteros `nums` y un entero `target`, devolver los
9+
índices de los dos números cuya suma sea igual a `target`.
10+
Se asume que existe exactamente una solución y no se puede usar el
11+
mismo elemento dos veces.
12+
13+
Complejidad de la solución implementada:
14+
Tiempo: O(n) — single pass con hash map.
15+
Espacio: O(n) — el hash map almacena hasta n-1 elementos.
16+
17+
Decisiones:
18+
- Usamos dict en lugar de doble loop O(n²) porque target lookup en
19+
hash map es O(1) amortizado.
20+
- Iteramos con enumerate para tener (índice, valor) sin lookup extra.
21+
"""
22+
23+

‎src/week_02_arrays/__init__.py‎

Whitespace-only changes.

0 commit comments

Comments
 (0)