Skip to content

Commit 922e258

Browse files
Merge pull request #80 from eo-tools/TejasMorbagal-xxx-fix-encoding-issues
fix encoding errors in appligator
2 parents 5be537e + 2bd315f commit 922e258

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## Changes in version 0.1.0 (in development)
22

3+
### Fixes
4+
5+
- Fixed Windows encoding errors in `appligator` Dockerfile generation, replaced
6+
non-ASCII characters with plain ASCII equivalents, and added `encoding="utf-8"`
7+
to `write_text`/`read_text` calls in `gen_dockerfile.py`.
8+
39
### Enhancements
410

511
- Enhanced `appligator` with Dockerfile generation and improved Airflow integration:

appligator/src/appligator/airflow/gen_dockerfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def generate(
186186
)
187187

188188
dockerfile = output_dir / "Dockerfile"
189-
dockerfile.write_text(content)
189+
dockerfile.write_text(content, encoding="utf-8")
190190
return dockerfile
191191

192192

appligator/src/appligator/airflow/templates/Dockerfile.pixi.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Generated by appligator do not edit by hand.
1+
# Generated by appligator - do not edit by hand.
22

3-
# ── Stage 1: build ────────────────────────────────────────────
3+
# -- Stage 1: build ---------------------------------------------------
44
FROM ghcr.io/prefix-dev/pixi:{{ pixi_version }}-bookworm-slim AS build
55

66
RUN apt-get update \
@@ -23,7 +23,7 @@ RUN pixi install --locked -e {{ pixi_env }}
2323
{{ cmd }}
2424
{% endfor %}
2525

26-
# ── Stage 2: runtime ──────────────────────────────────────────
26+
# -- Stage 2: runtime -------------------------------------------------
2727
FROM {{ base_image }}
2828
WORKDIR {{ workdir }}
2929

appligator/tests/airflow/test_gen_dockerfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _gen(tmp_path: Path, **kwargs) -> tuple[Path, str]:
3737
df = generate(output_dir=out, **kwargs)
3838
finally:
3939
os.chdir(old)
40-
return df, df.read_text()
40+
return df, df.read_text(encoding="utf-8")
4141

4242

4343
class TestValidation:

0 commit comments

Comments
 (0)