Skip to main content

A scientific computing toolbox

Project description

ADVANCED PROGRAMMING HOMEWORK 3: Extension of the scientific computing Toolbox

All files and folders for the third assignment of the Advanced Programming course at UniTS, A.2024/45.

Group Members

Project Description

Original project

Python bindings were added for both modules, allowing for seamless use of C++ functions in python. On the other hand, less performance-intensive functions like those generating random vectors to generate a graph of interpolation errors were implemented in oython.

Some functionalities were added and extended:

  • Better structure, modularization and code organisation.
  • Possibility to build the entire unified ToolBox with setuptools.
  • more getter and setter methods for DataFrameWrapper
  • python function with C++ callback to reduce the size of the dataframe
  • Enhance functor which polimorphically allows classes from both modules to use some magic methods and plot data.
  • Easy installation with pip

Individual contributions

Giovanni Billo

  • Python bindings for the DataFrameWrapper module
  • improved project structure
  • added methods and functionalities to DataFrameWrapper in both languages
  • Enhance functor
  • comparison file
  • pip packaging

Tommaso Piscitelli

  • Python bindings for the DataFrameWrapper module
  • Interpolation part of the Enhance functor
  • python tests for interpolation

Performance comparison

The file comparison.py leverages decorators and the functor Compare() to time the speed of our C++ bindings against some popular python libraries like NumPy and SciPy. As the DataFrame, our implementation lags behind pandas when it also has to format the file the right way. However, once a file is in the right format, it performs just as good and sometimes even slightly faster than Pandas.

This is also the case with the InterpolateWrapper module, which is tested against SciPy implementations of the linear, Lahgrange and Cubic splines.

Testing

All tests available for the C++ module were implemented also for python bindings. There is the possibility to enable automated testing frameworks when building the project (see BUILD INSTRUCTIONS below)

BUILD INSTRUCTIONS

The library can be directly installed via pip from here:

pip install APToolBox

Various other build options are also available:

  • using setuptools, after cloning the repository, run the following commands in the main folder:
python3 setup.py build_ext

It is also possible to enable continuous integration by enabling automated tests via pytest and pytest-watch:

python3 setup.py build_ext watch_tests

This setup will run all of the tests again each time a change is made in any part of the code, ensuring continuous integration and early catching of bugs.

  • using Cmake:
cmake -B build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aptoolbox-1.0.2.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

APToolBox-1.0.2-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file aptoolbox-1.0.2.tar.gz.

File metadata

  • Download URL: aptoolbox-1.0.2.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for aptoolbox-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b518a147d179d13780dcbb6e2f0181226443f1f42ac59a705a76327a05214e20
MD5 051e61cfced73d6c77507bc937fb8fd9
BLAKE2b-256 ab6803cd62d3700b6579be735bbc6fb8d8a5810a17b565e59b254258b3cb828c

See more details on using hashes here.

File details

Details for the file APToolBox-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: APToolBox-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for APToolBox-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30a387e337b1783292bc7430c52bd47d1fc197f47e3beb1cdc87f4a2aa7aa9b9
MD5 5d7ca10b4101b812624e92620b9f3894
BLAKE2b-256 da30b43540cabc9c2d43809c32f29ffe44e32dd9d61c58568d4281fc426233a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page