Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 2.05 KB

README.md

File metadata and controls

37 lines (25 loc) · 2.05 KB

libcsv

License: MIT Python Version from PEP 621 TOML Pytest Docker Make Ruff Checked with mypy

Overview

This project demonstrates an efficient integration of Python and C (using Cython) for building a shared library for CSV processing, developed as part of a code challenge in a recruitment process.

The original challenge contained the Dockerfile, libcsv.h and test_libcsv files. These files should not be modified. Instead, the build.sh script should contain the steps to build a shared object, containing functions declared in libcsv.h.

test_libcsv was an ELF executable containing a single test to verify if the shared object was loaded correctly. The company requested not to share it (nor the challenge requirements) for security reasons. As such, the original docker run command is now invalid.

Installation and Execution

  1. Build the Docker image (make build):

    docker build -t libcsv .
  2. Run the Docker image (no longer valid) (make run):

    docker run -it libcsv
  3. Execute Python tests (make tests):

    docker run -it libcsv /bin/sh -c "source /app/.venv/bin/activate && pytest"