This pull request aims to improve the overall quality and maintainability of the project by refactoring the code base and implementing common best practices. The following changes have been made:
Linting: Added ruff, isort, and black as linting tools to ensure that the code adheres to PEP8 standards. Configured the tools to run automatically via pre-commit hooks. Currently it is not very strict as the existing code base produces a lot of warnings and errors. This needs to be refactored in-depth, which is planned next. Furthermore, all files inside the scalpel directory are now linted.
Makefile: Introduced a Makefile to simplify and standardize common tasks such as linting and testing the application. This will make it easier for contributors to work on the project.
Test Scripts: Created a test script to run all tests in the tests directory. Integrated test script execution into the Makefile. Currently, Scalpel uses both pytest and unittest as raised in issue #81. This is planned to be made uniform going forward. Furthermore, the ground truth for type inference test cases are now consolidated into different files for easy debugging.
Pre-commit: Installed pre-commit to manage pre-commit hooks. Configured hooks to run linting tasks automatically before committing changes.
Setup Scripts: Created setup.sh and requirements.txt to manage dependencies, install pre-commit hooks, and streamline the installation process for contributors. This will help ensure that all developers work with the same package versions and minimize issues related to package version discrepancies.
Documentation: Updated the README.md file with instructions on how to set up the development environment, use the Makefile, and run tests.
These changes will help maintain a clean, consistent, and more maintainable code base, while also making it easier for new contributors to get started with the project.
Please review the changes and let me know if you have any suggestions or concerns.
This pull request aims to improve the overall quality and maintainability of the project by refactoring the code base and implementing common best practices. The following changes have been made:
Linting: Added
ruff
,isort
, andblack
as linting tools to ensure that the code adheres to PEP8 standards. Configured the tools to run automatically via pre-commit hooks. Currently it is not very strict as the existing code base produces a lot of warnings and errors. This needs to be refactored in-depth, which is planned next. Furthermore, all files inside thescalpel
directory are now linted.Makefile: Introduced a
Makefile
to simplify and standardize common tasks such as linting and testing the application. This will make it easier for contributors to work on the project.Test Scripts: Created a test script to run all tests in the tests directory. Integrated test script execution into the
Makefile
. Currently, Scalpel uses bothpytest
andunittest
as raised in issue #81. This is planned to be made uniform going forward. Furthermore, the ground truth for type inference test cases are now consolidated into different files for easy debugging.Pre-commit: Installed pre-commit to manage pre-commit hooks. Configured hooks to run linting tasks automatically before committing changes.
Setup Scripts: Created
setup.sh
andrequirements.txt
to manage dependencies, install pre-commit hooks, and streamline the installation process for contributors. This will help ensure that all developers work with the same package versions and minimize issues related to package version discrepancies.Documentation: Updated the
README.md
file with instructions on how to set up the development environment, use the Makefile, and run tests.These changes will help maintain a clean, consistent, and more maintainable code base, while also making it easier for new contributors to get started with the project.
Please review the changes and let me know if you have any suggestions or concerns.