Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE #85 : Base64-Encoder Executable #93

Open
wants to merge 14 commits into
base: devel
Choose a base branch
from

Conversation

nav-mohan
Copy link

@nav-mohan nav-mohan commented Jan 21, 2025

Fixes issue #85
Currently, we use xxd and a native cmake implementation to encode parameter files for linking into a shared-library.
base64-encode is an executable meant to replace both.
It will be installed in the CMAKE_INSTALL_RELOC_BINDIR.

ipcamit and others added 8 commits January 20, 2025 19:10
A utility for base64 encoding and decoding of model and model-driver parameter files.
This biary executable will be used for compiling shared-libraries of model and model-driver.
This utility will be installed in the CMAKE_INSTALL_RELOC_BINDIR.
Specify build and installation instructions for kim_base64_encode.
kim_base64_encode is a critical dependant for building model/model-driver shared-libraries.
kim_base64_encode must be built before kim-api.
kim_base64_encode will be installed in the CMAKE_INSTALL_RELOC_BINDIR for system-wide access during compile-time of model/model-driver shared-libraries.
…ible now.

Stylistic changes:
   base64.hpp moved to KIM_Base64.hpp
   KIM_Base64.hpp edited to have 2 space indent
   Function names/variable names to follow PascalCase or camelCase (like other KIM-API files)
   Doxygen style docstrings
TODO:
   Licensing issue discussion with Ryan
This is a work in progress and the code is not expected to compile at this stage.
A number of small changes have been made to port the code from c++11 to c++98.
A pending change is to replace the string-literals with escaped characters.
Create the command-line-interface for kim-base64-encode following the docopt.org format keeping inline with other utils/kim-api-* binary executables
@ipcamit
Copy link

ipcamit commented Jan 21, 2025

@nav-mohan I think the Open suse error stems from the fact that it is using newer OpenSUSE with newer libasan, so now libasan6 should be updated to libasan8. Not sure if that will solve it but probably worth a shot.

See here: https://opensuse.pkgs.org/tumbleweed/opensuse-oss-x86_64/libasan8-14.2.1+git10750-1.2.x86_64.rpm.html

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 91.30435% with 10 lines in your changes missing coverage. Please review.

Project coverage is 45.96%. Comparing base (378406f) to head (27200f5).

Files with missing lines Patch % Lines
utils/base64-encode.cpp 78.26% 8 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel      #93      +/-   ##
==========================================
+ Coverage   45.29%   45.96%   +0.67%     
==========================================
  Files         140      142       +2     
  Lines       13059    13279     +220     
  Branches     1338     1352      +14     
==========================================
+ Hits         5915     6104     +189     
- Misses       6476     6501      +25     
- Partials      668      674       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +4 to +8
`base64-encode` is a simple xxd replacement to convert files
into embeddable C++ source code. Instead of using binary array
it used base64 strings, which makes it much more performant
for large files. Currently only -i option is supported for
compatibility. More options to be released in future. C++ 98 compliant.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`base64-encode` is a simple xxd replacement to convert files
into embeddable C++ source code. Instead of using binary array
it used base64 strings, which makes it much more performant
for large files. Currently only -i option is supported for
compatibility. More options to be released in future. C++ 98 compliant.
`base64-encode` is a straightforward replacement for xxd,
designed to convert files into embeddable C++ source code.
Unlike binary arrays, it utilizes base64 strings, significantly
enhancing performance for large files. Currently, only the -i
option is supported for compatibility, with more options
planned for future releases. It is compliant with C++98 standards.

This will enable the "Run Workflow" button for our Github Actions on the Github Web Interface.
The Fortran compiler was not included in the installation of mingw-w64-x86_64-toolchain.
It must be explicitly installed through mingw-w64-x86_64-gcc-fortran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants