Libmagicxx v8.2.1
A C++ wrapper library over the Magic Number Recognition Library.
|
Welcome to the Libmagicxx project! We appreciate your interest in contributing. Whether you are fixing bugs, adding features, improving documentation, or suggesting enhancements, your contributions are valuable and help make Libmagicxx better for everyone.
We expect all contributors to adhere to the Code of Conduct. Please read it to understand the standards of behavior we expect from our community.
main
branch is the development branch for the next feature release. The main
branch contains the tags of the feature releases (e.g., v5.2.0
).v5.2.x
). These branches contain the tags of the bugfix releases, (e.g., v5.2.1
).main
branch.To build Libmagicxx, ensure you have the following tools and dependencies installed:
The recommended way to build Libmagicxx is to use the provided development container, which ensures a consistent and fully supported build environment. To do this, follow the steps in the Getting Started section above. This will set up the container with all required dependencies and tools, allowing you to build, test, and develop Libmagicxx seamlessly.
Alternatively, you may attempt to build Libmagicxx by manually installing all the required dependencies listed in the Build Requirements for Libmagicxx section. However, this method is not tested or officially supported, and you may encounter issues related to missing or incompatible dependencies.
For best results, always use the development container workflow described in this guide.
The current development environment is a container image built on top of the latest stable release of Fedora.
Install Visual Studio Code
Download and install Visual Studio Code from the official website.
Ctrl+Shift+X
.Dev Containers
.Install
on the Dev Containers extension.Install Podman
Follow the installation guide to install Podman.
Install Git & Git Large File Storage
Download and install Git from the official website. Download and install Git Large File Storage from the official website.
Install Python
Download and install Python from the official website.
Fork & Clone the Repository
Fork the repository on GitHub and clone it to your local machine:
Run the Launch Container Script
Open the project in Visual Studio Code and run the following script in a terminal to launch the development container:
On Linux/MacOS;
On Windows;
Attach to the Container
Press Ctrl+Shift+P
in Visual Studio Code, then select Remote-Containers: Attach to Running Container...
and choose the container libmagicxx_dev_env
you just launched.
Install Extensions in the Container
Once you have attached to the container, you need to install the necessary Visual Studio Code extensions within the container environment as well. Follow these steps:
Ctrl+Shift+X
.These extensions will enhance your development experience within the container by providing features like code completion, debugging, and CMake integration.
Initialize the Project
Open a new terminal initialize the project using the initialize.sh
bash script;
./scripts/initialize.sh
Now You Are Ready for Your Changes
You can commit your changes, build the project, run tests, and execute scripts within the container. However, you cannot perform git push
, git pull
, or git fetch
operations directly from the container. Once you are done, close the container connection and perform these git
operations from your local machine (the host). This is necessary because authentication restrictions in the container environment prevent these operations from working correctly.
main
if your change is scheduled for the next feature release. If you are fixing an issue for a supported release, create your branch from the supported release branch (e.g., v5.2.x
).bugfix/brief_description
document/brief_description
enhancement/brief_description
quality/brief_description
snake_case
naming convention. The only exception is template parameters, which should use PascalCase
.Doxygen
. For more information on how to write Doxygen comments, refer to the Doxygen Manual.Build and Test:
Use the workflows.sh
script to configure, build and test the project via CMake workflow presets:
For more options, use:
Ensure that your changes do not break any existing tests. If you are adding new features or fixing bugs, add the necessary unit tests to cover your changes.
Format Code:
Ensure your code is properly formatted using the CMake workflow preset format-source-code
:
Update the Changelog:
Add a summary of your changes to the CHANGELOG.md
file under the appropriate section (e.g., Next Release). This helps keep track of all improvements, bug fixes, and new features for each release.
main
branch if your change is scheduled for the next feature release. If you are fixing an issue for a supported release, create a pull request to the supported release branch (e.g., v5.2.x
) and also the main
branch.BUGFIX: Brief Description, Fixes issue #????.
DOCUMENTATION: Brief Description, Fixes issue #????.
ENHANCEMENT: Brief Description, Fixes issue #????.
QUALITY: Brief Description, Fixes issue #????.
If you find a bug or have a feature request, please create an issue on the GitHub Issues page. Provide as much detail as possible to help us understand and address the issue.
Our CI pipeline runs automated tests and checks on each pull request to ensure code quality and correctness.
main
or a supported release branch).Thank you for contributing to Libmagicxx! Your efforts help improve the project for everyone.