-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include isAssociationUsed() only for modernpython (#27)
isAssociationUsed() breaks the cpp and java code generation since the associated langpacks use json.load(). isAssociationUsed() introduces True/False into the json object which is not valid json. In json it would be true/false. Maybe we should only use dicts and avoid json objects entirely. Changing this attribute to true/false does not work with the mustache template. For now, I included the call to isAssociationUsed() only for modernpython. I have also added devcontainer files, fixed the dockerfile and updated the README.
- Loading branch information
Showing
5 changed files
with
60 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM ubuntu:22.04 | ||
RUN apt update | ||
RUN apt install -y python3 git python3-pip libxml2-dev | ||
RUN python3 -m pip install lxml xmltodict chevron beautifulsoup4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "cimgen", | ||
"build": { | ||
"dockerfile": "Dockerfile.dev" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
FROM alpine | ||
FROM alpine:3.19.1 | ||
RUN apk update | ||
RUN apk add python3 git py3-pip py3-lxml file | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install xmltodict chevron | ||
RUN python3 -m pip install --break-system-packages xmltodict chevron pydantic beautifulsoup4 | ||
|
||
COPY cpp/ /CIMgen/cpp/ | ||
COPY java/ /CIMgen/java/ | ||
COPY javascript/ /CIMgen/javascript/ | ||
COPY python/ /CIMgen/python/ | ||
COPY CIMgen.py build.py /CIMgen/ | ||
WORKDIR /CIMgen | ||
ENTRYPOINT [ "/usr/bin/python3", "build.py", "--outdir=/cgmes_output", "--schemadir=/cgmes_schema" ] | ||
CMD [ "--langdir=cpp" ] | ||
WORKDIR /cimgen | ||
COPY ./cpp /cimgen/cpp | ||
COPY ./java /cimgen/java | ||
COPY ./javascript /cimgen/javascript | ||
COPY ./modernpython /cimgen/modernpython | ||
COPY ./python /cimgen/python | ||
COPY ./cgmes_schema /cimgen/cgmes_schema | ||
COPY ./build.py /cimgen/build.py | ||
COPY ./CIMgen.py /cimgen/CIMgen.py | ||
|
||
ENTRYPOINT [ "/usr/bin/python3", "/cimgen/build.py", "--outdir=/cimgen/cgmes_output", "--schemadir=/cimgen/cgmes_schema" ] | ||
CMD [ "--langdir=/cimgen/cpp" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters