Skip to content

Commit f900dc9

Browse files
Add paths for future work to config.py.
1 parent c564ac4 commit f900dc9

File tree

7 files changed

+121
-1
lines changed

7 files changed

+121
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
exclude: .*\.ipynb$
23
repos:
34
- repo: meta
45
hooks:

environment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ dependencies:
3535

3636
# Install project
3737
- pip: [-e ., pdbp, kaleido]
38+
39+
# Extras
40+
- openpyxl # to open xlsx files

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ extend-ignore = [
9393
"RET504", # Don't force to calculate upon return
9494
"S101", # Use of `assert` detected.
9595
"S301", # pickle module is unsafe
96+
"E501", # Line too long
97+
"ARG001", # Unused function
9698
]
9799

98100
[tool.ruff.lint.per-file-ignores]

src/project_mbb/config.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,26 @@
33
from pathlib import Path
44

55
SRC = Path(__file__).parent.resolve()
6+
PROJECT = Path(__file__).resolve()
67
ROOT = SRC.joinpath("..", "..").resolve()
78

89
BLD = ROOT.joinpath("bld").resolve()
910

11+
# Folders inside project_mbb
12+
DATA = PROJECT.joinpath("data").resolve()
13+
DATA_MGT = PROJECT.joinpath("data_management").resolve()
14+
FINAL = PROJECT.joinpath("final").resolve()
1015

1116
DOCUMENTS = ROOT.joinpath("documents").resolve()
1217

13-
TEMPLATE_GROUPS = ["marital_status", "highest_qualification"]
18+
19+
VARIABLES = [
20+
"enc_rpc",
21+
"rph_ID",
22+
"idhogar",
23+
"enc_idr",
24+
"enc_region",
25+
"rph_nivel",
26+
"rph_ciuo",
27+
"rph_nse",
28+
]

src/project_mbb/data/.DS_Store

0 Bytes
Binary file not shown.

src/project_mbb/data_management/task_data_management_template.py renamed to src/project_mbb/data_management/no_task_data_management_template.py

File renamed without changes.

tests_maren.ipynb

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Pendientes /To Do"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"- Change the names of the other stuff--> for this see video\n",
15+
"- Select more variables that are relevant"
16+
]
17+
},
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {},
21+
"source": [
22+
"## To Do at end of project"
23+
]
24+
},
25+
{
26+
"cell_type": "markdown",
27+
"metadata": {},
28+
"source": [
29+
"- put E501, ARG001 hook back"
30+
]
31+
},
32+
{
33+
"cell_type": "code",
34+
"execution_count": null,
35+
"metadata": {},
36+
"outputs": [],
37+
"source": [
38+
"from pathlib import Path\n",
39+
"\n",
40+
"import pandas as pd"
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"execution_count": null,
46+
"metadata": {},
47+
"outputs": [],
48+
"source": [
49+
"path = Path(\"src\")\n",
50+
"DATA = path.joinpath(\"project_mbb\").resolve()\n",
51+
"DATA = DATA.joinpath(\"data\").resolve()\n",
52+
"DATA"
53+
]
54+
},
55+
{
56+
"cell_type": "code",
57+
"execution_count": null,
58+
"metadata": {},
59+
"outputs": [],
60+
"source": [
61+
"variables_desc_path = DATA / \"Diccionario_variables_ENUSC_2023.xlsx\""
62+
]
63+
},
64+
{
65+
"cell_type": "code",
66+
"execution_count": null,
67+
"metadata": {},
68+
"outputs": [],
69+
"source": [
70+
"path = Path(\"src\")\n",
71+
"DATA = path.joinpath(\"project_mbb\").resolve()\n",
72+
"DATA = DATA.joinpath(\"data\").resolve()\n",
73+
"DATA\n",
74+
"\n",
75+
"data_path = \"/Users/marenbermudez/Desktop/Python_Projects/EPP/final-project-MarenBermudezBoeckle/src/project_mbb/data/Diccionario_variables_ENUSC_2023.xlsx\"\n",
76+
"\n",
77+
"variables_desc_path = DATA / \"Diccionario_variables_ENUSC_2023.xlsx\"\n",
78+
"variables_desc = pd.read_excel(variables_desc_path)\n",
79+
"\n",
80+
"variables_desc"
81+
]
82+
}
83+
],
84+
"metadata": {
85+
"language_info": {
86+
"codemirror_mode": {
87+
"name": "ipython",
88+
"version": 3
89+
},
90+
"file_extension": ".py",
91+
"mimetype": "text/x-python",
92+
"name": "python",
93+
"nbconvert_exporter": "python",
94+
"pygments_lexer": "ipython3"
95+
}
96+
},
97+
"nbformat": 4,
98+
"nbformat_minor": 2
99+
}

0 commit comments

Comments
 (0)