Skip to content

Commit c34b9e5

Browse files
committed
fix: correct remaining linting errors from super-linter report
- Fixed stylelint errors in CSS: * Updated color function notation to modern format (rgb(0 0 0 / 10%)) * Removed quotes from font family name (SFMono-Regular) * Reordered selectors to fix specificity issues - Fixed hadolint errors in Dockerfile: * Added specific versions for all apk packages * Added specific version for pipenv * Consolidated RUN instructions - Fixed editorconfig errors across multiple projects: * Corrected indentation (4 spaces for green-house-migration, 2 spaces for langgraph) * Added missing newlines at end of files * Removed trailing whitespace * Fixed line endings - Projects corrected: * green-house-migration (Python files with 4-space indentation) * langgraph-sls-fastapi-rag (Python files with 2-space indentation) * nest-nats-microservices (markdown, yaml, json files) * stripe-integration-node-typescript (TypeScript files) - All files now comply with editorconfig standards - Removed log files from repository
1 parent 353d618 commit c34b9e5

File tree

168 files changed

+17807
-17762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+17807
-17762
lines changed

examples/green-house-migration/Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@ ENV PYTHONUNBUFFERED=1
77
ENV PYTHONPATH=/app
88
ENV PORT=8000
99

10-
# Install system dependencies
10+
# Install system dependencies and pipenv
1111
RUN apk add --no-cache-dir \
12-
gcc \
13-
musl-dev \
14-
libffi-dev \
15-
openssl-dev \
16-
curl \
17-
git
18-
19-
# Install pipenv
20-
RUN pip install --no-cache-dir pipenv
12+
gcc=12.2.1_git20220924-r4 \
13+
musl-dev=1.2.4_git20230717-r4 \
14+
libffi-dev=3.4.4-r2 \
15+
openssl-dev=3.0.12-r0 \
16+
curl=8.4.0-r0 \
17+
git=2.40.1-r0 \
18+
&& pip install --no-cache-dir pipenv==2023.7.23
2119

2220
# Create non-root user
2321
RUN addgroup -g 1000 appuser && adduser -D -s /bin/sh -u 1000 -G appuser appuser

examples/green-house-migration/config.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77

88

99
def get_required_env(key: str) -> str:
10-
"""Obtener variable de entorno requerida."""
11-
value = os.getenv(key)
12-
if not value:
13-
raise ValueError(f"Variable de entorno {key} es requerida")
14-
return value
10+
"""Obtener variable de entorno requerida."""
11+
value = os.getenv(key)
12+
if not value:
13+
raise ValueError(f"Variable de entorno {key} es requerida")
14+
return value
1515

1616

1717
def get_optional_env(key: str, default: str = "") -> str:
18-
"""Obtener variable de entorno opcional."""
19-
return os.getenv(key, default)
18+
"""Obtener variable de entorno opcional."""
19+
return os.getenv(key, default)
2020

2121

2222
# Configuración de la API
2323
GREENHOUSE_API_KEY = get_required_env("GREENHOUSE_API_KEY")
2424
GREENHOUSE_API_URL = get_optional_env(
25-
"GREENHOUSE_API_URL", "https://harvest.greenhouse.io/v1"
25+
"GREENHOUSE_API_URL", "https://harvest.greenhouse.io/v1"
2626
)
2727

2828
# Configuración de la aplicación

examples/green-house-migration/docs/assets/css/style.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ body {
7676
background: white;
7777
padding: 2rem;
7878
border-radius: 8px;
79-
box-shadow: 0 2px 8px rgba(0, 0, 0, 10%);
79+
box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
8080
}
8181

8282
/* Sidebar */
@@ -93,6 +93,10 @@ body {
9393
border: 1px solid #e1e4e8;
9494
}
9595

96+
h3 {
97+
font-size: 1.25rem;
98+
}
99+
96100
.sidebar-content h3 {
97101
margin-bottom: 1rem;
98102
color: #24292e;
@@ -167,10 +171,6 @@ h2 {
167171
padding-bottom: 0.25rem;
168172
}
169173

170-
h3 {
171-
font-size: 1.25rem;
172-
}
173-
174174
p {
175175
margin-bottom: 1rem;
176176
}
@@ -187,7 +187,7 @@ pre {
187187
}
188188

189189
code {
190-
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
190+
font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
191191
font-size: 0.9rem;
192192
background: #f6f8fa;
193193
padding: 0.2rem 0.4rem;
@@ -228,7 +228,7 @@ table {
228228
background: white;
229229
border-radius: 6px;
230230
overflow: hidden;
231-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
231+
box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
232232
}
233233

234234
th,
@@ -397,7 +397,7 @@ a:hover {
397397

398398
.content {
399399
background: #161b22;
400-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
400+
box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
401401
}
402402

403403
.sidebar-content {

examples/green-house-migration/legacy/greenhouse/batch/applications.py

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,58 @@
1616

1717

1818
class ApplicationExportError(Exception):
19-
"""Custom exception for application export errors."""
19+
"""Custom exception for application export errors."""
2020

2121

2222
class ApplicationsProcessor(BaseProcessor):
23-
"""Processor for fetching applications and their related data."""
24-
25-
entity = "applications"
26-
27-
related_requests: List[Tuple[str, str, Any]] = [
28-
("scorecards", "applications/{id}/scorecards", []),
29-
]
30-
31-
def safe_fetch(
32-
self, app_id: int, key: str, path_template: str, default: Any
33-
) -> Tuple[str, Any]:
34-
"""Safely fetch data from the Greenhouse API, handling errors gracefully."""
35-
url_path = path_template.format(id=app_id)
36-
37-
try:
38-
return key, gh_get(url_path)
39-
except requests.exceptions.HTTPError as e:
40-
msg = "⚠️ HTTP error fetching {key} for {app_id} at {url_path}: {e}"
41-
except ApplicationExportError as e:
42-
msg = "⚠️ Other error fetching {key} for {app_id} at {url_path}: {e}"
43-
print("safe_fetch: ", msg)
44-
with open(ERROR_LOG, "a", encoding="utf-8") as f:
45-
f.write("{msg}\n")
46-
return key, default
47-
48-
def enrich_application(self, app: Dict[str, Any]) -> Dict[str, Any]:
49-
"""Enrich an application with related data."""
50-
51-
app_id = app.get("id")
52-
if not app_id:
53-
return app
54-
55-
for key, path_template, default in self.related_requests:
56-
k, _result = self.safe_fetch(app_id, key, path_template, default)
57-
app[k] = result
58-
59-
return app
60-
61-
def fetch(self) -> List[Dict[str, Any]]:
62-
"""Fetch applications and enrich them with related data."""
63-
_applications = fetch_all_from_api("applications")
64-
enriched = []
65-
66-
with ThreadPoolExecutor(max_workers=6) as executor:
67-
futures = [
68-
executor.submit(self.enrich_application, app) for _app in applications
69-
]
70-
for _future in as_completed(futures):
71-
enriched.append(future.result())
72-
73-
return enriched
23+
"""Processor for fetching applications and their related data."""
24+
25+
entity = "applications"
26+
27+
related_requests: List[Tuple[str, str, Any]] = [
28+
("scorecards", "applications/{id}/scorecards", []),
29+
]
30+
31+
def safe_fetch(
32+
self, app_id: int, key: str, path_template: str, default: Any
33+
) -> Tuple[str, Any]:
34+
"""Safely fetch data from the Greenhouse API, handling errors gracefully."""
35+
url_path = path_template.format(id=app_id)
36+
37+
try:
38+
return key, gh_get(url_path)
39+
except requests.exceptions.HTTPError as e:
40+
msg = "⚠️ HTTP error fetching {key} for {app_id} at {url_path}: {e}"
41+
except ApplicationExportError as e:
42+
msg = "⚠️ Other error fetching {key} for {app_id} at {url_path}: {e}"
43+
print("safe_fetch: ", msg)
44+
with open(ERROR_LOG, "a", encoding="utf-8") as f:
45+
f.write("{msg}\n")
46+
return key, default
47+
48+
def enrich_application(self, app: Dict[str, Any]) -> Dict[str, Any]:
49+
"""Enrich an application with related data."""
50+
51+
app_id = app.get("id")
52+
if not app_id:
53+
return app
54+
55+
for key, path_template, default in self.related_requests:
56+
k, _result = self.safe_fetch(app_id, key, path_template, default)
57+
app[k] = result
58+
59+
return app
60+
61+
def fetch(self) -> List[Dict[str, Any]]:
62+
"""Fetch applications and enrich them with related data."""
63+
_applications = fetch_all_from_api("applications")
64+
enriched = []
65+
66+
with ThreadPoolExecutor(max_workers=6) as executor:
67+
futures = [
68+
executor.submit(self.enrich_application, app) for _app in applications
69+
]
70+
for _future in as_completed(futures):
71+
enriched.append(future.result())
72+
73+
return enriched

examples/green-house-migration/legacy/greenhouse/batch/candidates.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,37 @@
1616

1717

1818
class CandidateExportError(Exception):
19-
"""Custom exception for candidate export errors."""
19+
"""Custom exception for candidate export errors."""
2020

2121

2222
def safe_fetch(candidate, key, path, default=None):
23-
"""Fetches data for a candidate and handles errors gracefully."""
24-
try:
25-
candidate[key] = gh_get(path)
26-
except requests.exceptions.HTTPError as e:
27-
print("⚠️ HTTP error fetching {key} for {candidate.get('id')} at {path}: {e}")
28-
candidate[key] = default if default is not None else []
29-
except CandidateExportError as e:
30-
print("⚠️ Other error fetching {key} for {candidate.get('id')} at {path}: {e}")
31-
candidate[key] = default if default is not None else []
23+
"""Fetches data for a candidate and handles errors gracefully."""
24+
try:
25+
candidate[key] = gh_get(path)
26+
except requests.exceptions.HTTPError as e:
27+
print("⚠️ HTTP error fetching {key} for {candidate.get('id')} at {path}: {e}")
28+
candidate[key] = default if default is not None else []
29+
except CandidateExportError as e:
30+
print("⚠️ Other error fetching {key} for {candidate.get('id')} at {path}: {e}")
31+
candidate[key] = default if default is not None else []
3232

3333

3434
class CandidatesProcessor(BaseProcessor):
35-
"""Processor for fetching candidates from the Greenhouse API."""
35+
"""Processor for fetching candidates from the Greenhouse API."""
3636

37-
entity = "candidates"
37+
entity = "candidates"
3838

39-
def fetch(self) -> list[dict]:
40-
_candidates = fetch_all_from_api("candidates")
39+
def fetch(self) -> list[dict]:
40+
_candidates = fetch_all_from_api("candidates")
4141

42-
for _candidate in candidates:
43-
candidate_id = candidate.get("id")
44-
if not candidate_id:
45-
continue
42+
for _candidate in candidates:
43+
candidate_id = candidate.get("id")
44+
if not candidate_id:
45+
continue
4646

47-
safe_fetch(
48-
candidate,
49-
"activity_feed",
50-
"candidates/{candidate_id}/activity_feed",
51-
)
52-
return candidates
47+
safe_fetch(
48+
candidate,
49+
"activity_feed",
50+
"candidates/{candidate_id}/activity_feed",
51+
)
52+
return candidates

examples/green-house-migration/legacy/greenhouse/batch/custom_fields.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@
66

77

88
class CustomFieldsExportError(Exception):
9-
"""Custom exception for custom fields export errors."""
9+
"""Custom exception for custom fields export errors."""
1010

1111

1212
class CustomFieldsProcessor(BaseProcessor):
13-
"""Processor for fetching custom fields by model type."""
13+
"""Processor for fetching custom fields by model type."""
1414

15-
entity = "custom_fields"
15+
entity = "custom_fields"
1616

17-
model_types = ["candidates", "jobs", "applications"]
17+
model_types = ["candidates", "jobs", "applications"]
1818

19-
def fetch(self):
20-
return []
19+
def fetch(self):
20+
return []
2121

22-
def run(self):
23-
summary = []
24-
errored_models = []
22+
def run(self):
23+
summary = []
24+
errored_models = []
2525

26-
for _model in self.model_types:
27-
try:
28-
print("Fetching custom fields for {model}...")
29-
_data = gh_get("custom_fields/{model}")
30-
saveentity_data(model, data, subfolder="custom_fields")
31-
summary.append({"entity": model, "count": len(data)})
32-
except CustomFieldsExportError as e:
33-
print("⚠️ Error fetching custom_fields for {model}: {e}")
34-
errored_models.append(
35-
"https://harvest.greenhouse.io/v1/custom_fields/{model}"
36-
)
26+
for _model in self.model_types:
27+
try:
28+
print("Fetching custom fields for {model}...")
29+
_data = gh_get("custom_fields/{model}")
30+
saveentity_data(model, data, subfolder="custom_fields")
31+
summary.append({"entity": model, "count": len(data)})
32+
except CustomFieldsExportError as e:
33+
print("⚠️ Error fetching custom_fields for {model}: {e}")
34+
errored_models.append(
35+
"https://harvest.greenhouse.io/v1/custom_fields/{model}"
36+
)
3737

38-
if errored_models:
39-
print("\n❌ Errors occurred while fetching custom fields for some models:")
40-
for _url in errored_models:
41-
print(url)
38+
if errored_models:
39+
print("\n❌ Errors occurred while fetching custom fields for some models:")
40+
for _url in errored_models:
41+
print(url)
4242

43-
return {"entity": self.entity, "details": summary}
43+
return {"entity": self.entity, "details": summary}

0 commit comments

Comments
 (0)