-
Notifications
You must be signed in to change notification settings - Fork 6
Setting Up the Development Environment
-
An IDE with support for C++ and CMake
-
Visual Studio 2022
- Make sure you enable C/C++ development tools at installation
-
Visual Studio Code
- Also install C/C++ Extension Pack
- In Windows: Also install Build Tools for Visual Studio
-
Visual Studio 2022
-
A Java development kit (JDK)
-
A MPI Development Kit:
-
A bison and flex Development Kit: optional
- Necessary only if the src/Learning/KWData lex and yac files need to be recompiled for Khiops dictionary analysis
- Windows
- install last version of win bison and flex
- set the the directory for the bison and flex binaries in the path
- optional: cohabitation with Gow - The lightweight alternative to Cygwin
- when Gow is installed, Gow's bison and flex binaries are used by mistake
- fix: in the gow bin directory, rename flex.exe to NO_flex.exe and bison.exe to NO_bison.exe
-
A Git installation
- Windows: Git for Windows
- Includes Git Bash and Terminal
- Windows: Git for Windows
-
A Python distribution with
pip
tool installed- For example: Anaconda Python Distribution
- Windows: make sure you have enabled
core.autocrlf
git config --global core.autocrlf true
- Linux/macOS: set
core.autocrlf
toinput
so any files with CRLF endings will be committed to the repo with only LF endings.
git config --global core.autocrlf input
- Create and configure a public-private key pair
# Use Git Bash in windows
ssh-keygen -t ed25519 -C "[email protected]"
- This creates the files
id_ed25519
andid_ed25519.pub
in~/.ssh
. If they are create elsewhere move them to.ssh
. - Copy the contents of the file containing the public key:
~/.ssh/id_ed25519.pub
- In GitHub, click your icon and go to Settings. There go to the SSH and GPG section and click on New SSH key
- Then copy the contents of your public key in the input text.
Note: If you have problems with a proxy (Connection timeout
or Connection refused
) configure to connect SSH over HTTPS
- Create an access token
- Click on your icon, then Settings, then Developer Settings, then Personal Access Tokens and finally Fine-grained Tokens
TODO
Open a terminal and execute
git clone [email protected]:KhiopsML/khiops.git
cd khiops
# Install the pre-commit Python package
pip install pre-commit
# This installs the hooks on the repo and runs them on all files
# It may take a bit of time the first time
pre-commit install
pre-commit run --all-files
Note for Anaconda + Windows: You must add the Scripts
directory of your Anaconda installation to the PATH
. That way pre-commit will be available in any shell. With conda you can use conda install -c conda-forge identify pre-commit
- Open Visual Studio and select Open Local Folder and select your local
khiops
folder- This may take a few minutes to finish, you can see the current status by selecting the
CMake
output in the output sub-window.
- This may take a few minutes to finish, you can see the current status by selecting the
- At the top bar you can select a debug or release preset (ex: Windows MSVC Release) and select the menu Build -> Build All.
To run the MODL or MODL_Coclustering executable from the IDE, you must have a launch.vs.json
parameter file under the .vs
directory :
launch.vs.json
Note that this parameter file sets the KhiopsFastExitMode
environment variable to false
in order to use the scenario files and execute all instructions without an exit after the first error.
- Make sure you have installed the extension mentioned above.
- Open VS Code go to the menu File -> Open Folder and select your local
khiops
folder - At the bottom bar you can select a debug or release preset (ex: Windows MSVC Release) and then click on the "⚙ Build" button nearby.
- Go to the
khiops
folder - For a given preset (ex:
windows-msvc-release
) execute
cmake --preset windows-msvc-release # add --fresh to regenerate
cmake --build --preset windows-msvc-release # add --clean-build to clean