Skip to content

Commit

Permalink
today()
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jul 4, 2024
1 parent f57bcd2 commit 235924f
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 71 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SET(MSVC_BASE_OPTIONS "/W3 /permissive- /EHsc /bigobj /Zc:__cplusplus /std:c++la

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (MSVC)
SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Od /fsanitize=address /Zi")
SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Od /fsanitize=address /Zi /FAcs")
else()
SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} -Og -g3 -ggdb --fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=bounds") # -fsanitize=hwaddress
endif()
Expand Down
26 changes: 13 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pya2l/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__version__ = "0.10.2"


import pickle # nosec
# import pickle # nosec
import pkgutil
import sys
from pathlib import Path
Expand Down Expand Up @@ -143,11 +143,11 @@ def import_a2l(
self.db, listener_result = a2l_parser.parse(filename=filenames.a2l, dbname=str(self._dbfn), encoding=encoding)
self.session = self.db.session

self.logger.info("Parsing AML section ...")
aml_parser = parsers.aml(prepro_result=prepro_result)
aml_result = aml_parser.parseFromFile(filename=filenames.aml, dbname=str(self._dbfn), encoding=encoding).listener_result
aml_parsed = pickle.dumps(aml_result)
aml_text = open(filenames.aml).read()
# self.logger.info("Parsing AML section ...")
# aml_parser = parsers.aml(prepro_result=prepro_result)
# aml_result = aml_parser.parseFromFile(filename=filenames.aml, dbname=str(self._dbfn), encoding=encoding).listener_result
# aml_parsed = pickle.dumps(aml_result)
# aml_text = open(filenames.aml).read()
"""
self.session.add(model.AMLSection(text=aml_text, parsed=aml_parsed))
self.logger.info("Parsing IF_DATA sections ...")
Expand All @@ -160,7 +160,7 @@ def import_a2l(
"""
self.session.commit()

self.session.add(model.AMLSection(text=aml_text, parsed=aml_parsed))
# self.session.add(model.AMLSection(text=aml_text, parsed=aml_parsed))

# self.session.commit()
self.logger.info(f"Done [Elapsed time {perf_counter() - start_time:.2f}s].")
Expand Down
Loading

0 comments on commit 235924f

Please sign in to comment.