Skip to content

Commit

Permalink
Rename cim-codebase-generator artefacts to CIMgen
Browse files Browse the repository at this point in the history
  • Loading branch information
richardmarston committed May 14, 2020
1 parent 6f2b437 commit e45d0ff
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion documentation/images/cimCodebaseGenerator.py → CIMgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def _merge_profiles(profiles_array):
# Iterate over classes and check for multiple class definitions
for class_key in elem_dict[profile_key]:
if class_key in profiles_dict[profile_key].keys():
# If class allready exists in packageDict add attributes to attributes array
# If class already exists in packageDict add attributes to attributes array
if len(elem_dict[profile_key][class_key].attributes()) > 0:
attributes_array = elem_dict[profile_key][class_key].attributes()
profiles_dict[profile_key][class_key].addAttributes(attributes_array)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(cim-codebase-generator)
project(CIMgen)

set(CMAKE_CXX_STANDARD 14)

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.c++
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run apk add python3 git py3-pip py3-lxml file
run pip3 install --upgrade pip
run pip3 install xmltodict chevron

copy cpp/ /cim-codebase-generator/cpp/
copy cimCodebaseGenerator.py build.py cpp/templates/ /cim-codebase-generator/
workdir /cim-codebase-generator
cmd python3 build.py cgmes_v2_4_15 /cim-codebase-generator/cgmes_schema/cgmes_v2_4_15_schema cpp
copy cpp/ /CIMgen/cpp/
copy CIMgen.py build.py cpp/templates/ /CIMgen/
workdir /CIMgen.py
cmd python3 build.py cgmes_v2_4_15 /CIMgen/cgmes_schema/cgmes_v2_4_15_schema cpp
8 changes: 4 additions & 4 deletions Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run apk add python3 git py3-pip py3-lxml file
run pip3 install --upgrade pip
run pip3 install xmltodict chevron

copy python /cim-codebase-generator/python/
copy cimCodebaseGenerator.py build.py python/templates /cim-codebase-generator/
workdir /cim-codebase-generator
cmd python3 build.py cgmes_v2_4_15 /cim-codebase-generator/cgmes_schema/cgmes_v2_4_15_schema python
copy python /CIMgen/python/
copy CIMgen.py build.py python/templates /CIMgen/
workdir /CIMgen
cmd python3 build.py cgmes_v2_4_15 /CIMgen/cgmes_schema/cgmes_v2_4_15_schema python
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ cimpp:
docker-cpp: SCHEMA_DIR ?= cgmes_schema/CGMES_2.4.15_27JAN2020
docker-cpp: OUTPUT_DIR ?= ${DIR}/cimpp
docker-cpp: cimpp
docker build -t cim-codebase-generator . -f Dockerfile.c++
docker build -t CIMgen . -f Dockerfile.c++

docker-python: SCHEMA_DIR ?= cgmes_schema/CGMES_2.4.15_27JAN2020
docker-python: OUTPUT_DIR ?= ${DIR}/cimpy
docker-python: cimpy
docker build -t cim-codebase-generator-python -f Dockerfile.python .
docker run -v ${OUTPUT_DIR}:/cim-codebase-generator/cgmes_v2_4_15 \
-v ${DIR}/${SCHEMA_DIR}:/cim-codebase-generator/cgmes_schema/cgmes_v2_4_15_schema \
cim-codebase-generator-python
docker build -t CIMgen-python -f Dockerfile.python .
docker run -v ${OUTPUT_DIR}:/CIMgen/cgmes_v2_4_15 \
-v ${DIR}/${SCHEMA_DIR}:/CIMgen/cgmes_schema/cgmes_v2_4_15_schema \
CIMgen-python

clean: OUTPUT_DIR ?= ${DIR}/cimpp
clean:
Expand All @@ -33,9 +33,9 @@ clean:

run: ${OUTPUT_DIR} ${SCHEMA_DIR}
cp -a ../static/* ${OUTPUT_DIR}
docker run -v ${OUTPUT_DIR}:/cim-codebase-generator/cgmes_v2_4_15 \
-v ${DIR}/${SCHEMA_DIR}:/cim-codebase-generator/cgmes_schema/cgmes_v2_4_15_schema \
cim-codebase-generator
docker run -v ${OUTPUT_DIR}:/CIMgen/cgmes_v2_4_15 \
-v ${DIR}/${SCHEMA_DIR}:/CIMgen/cgmes_schema/cgmes_v2_4_15_schema \
CIMgen

build-cpp: OUTPUT_DIR ?= ${DIR}/cimpp
build-cpp: SCHEMA_DIR ?= cgmes_schema/CGMES_2.4.15_27JAN2020
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Python tool for code generation from CIM data model for several programming lang

## Concept overview

![Overview Codebase Generator](documentation/images/CIMCodebaseGenerator.svg)
![Overview CIMgen](documentation/images/CIMgen.svg)
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import cimCodebaseGenerator
import CIMgen
import os
import argparse
import importlib
Expand All @@ -14,7 +14,7 @@
langPack = importlib.import_module(args.langdir + ".langPack")

schema_path = os.path.join(os.getcwd(), args.schemadir)
cimCodebaseGenerator.cim_generate(schema_path, args.outdir, "cgmes_v2_4_15", langPack)
CIMgen.cim_generate(schema_path, args.outdir, "cgmes_v2_4_15", langPack)

if args.langdir == "cpp":
langPack.resolve_headers(args.outdir)
1 change: 0 additions & 1 deletion documentation/images/CIMCodebaseGenerator.svg

This file was deleted.

1 change: 1 addition & 0 deletions documentation/images/CIMgen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e45d0ff

Please sign in to comment.