Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Documentation #261

Merged
merged 8 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 53 additions & 50 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to volesti,
which are hosted in the [GeomScale Organization](https://github.com/GeomScale) on GitHub.
These are mostly guidelines, not rules.
The following is a set of guidelines for contributing to volesti,
which are hosted in the [GeomScale Organization](https://github.com/GeomScale) on GitHub.
These are mostly guidelines, not rules.
Use your best judgment, and feel free to propose changes to this document in a pull request.

## Table of Contents

* [Prerequisites (how to start)](#prerequisites--how-to-start-)
* [Testing the development branch of volesti (get the tools ready)](#testing-the-development-branch-of-volesti--get-the-tools-ready-)
* [Fork volesti repository (this is your repo now!)](#fork--volesti-repository--this-is-your-repo-now--)
+ [Verify if your fork works (optional)](#verify-if-your-fork-works--optional-)
* [Working with volesti (get ready to contribute)](#working-with-volesti--get-ready-to-contribute-)
+ [GitFlow workflow](#gitflow-workflow)
+ [Create new branch for your work](#create-new-branch-for-your-work)
+ [Verify your new branch (optional)](#verify-your-new-branch--optional-)
* [Modify the branch (implement, implement, implement)](#modify-the-branch--implement--implement--implement-)
+ [Tests](#tests)
+ [Push](#push)
* [Pull request (the joy of sharing)](#pull-request--the-joy-of-sharing-)
* [Review (ok this is not an exam)](#review--ok-this-is-not-an-exam-)
- [Prerequisites (how to start)](#prerequisites--how-to-start-)
- [Testing the development branch of volesti (get the tools ready)](#testing-the-development-branch-of-volesti--get-the-tools-ready-)
- [Fork volesti repository (this is your repo now!)](#fork--volesti-repository--this-is-your-repo-now--)
- [Verify if your fork works (optional)](#verify-if-your-fork-works--optional-)
- [Working with volesti (get ready to contribute)](#working-with-volesti--get-ready-to-contribute-)
- [GitFlow workflow](#gitflow-workflow)
- [Create new branch for your work](#create-new-branch-for-your-work)
- [Verify your new branch (optional)](#verify-your-new-branch--optional-)
- [Modify the branch (implement, implement, implement)](#modify-the-branch--implement--implement--implement-)
- [Tests](#tests)
- [Push](#push)
- [Pull request (the joy of sharing)](#pull-request--the-joy-of-sharing-)
- [Review (ok this is not an exam)](#review--ok-this-is-not-an-exam-)

## Prerequisites (how to start)

* git (see [Getting Started with Git](https://help.github.com/en/github/using-git/getting-started-with-git-and-github))
* a compiler to run tests - gcc, clang, etc.
* configured GitHub account
- git (see [Getting Started with Git](https://help.github.com/en/github/using-git/getting-started-with-git-and-github))
- a compiler to run tests - gcc, clang, etc.
- configured GitHub account

Other helpful links:

* http://git-scm.com/documentation
* https://help.github.com/articles/set-up-git
* https://opensource.com/article/18/1/step-step-guide-git
- http://git-scm.com/documentation
- https://help.github.com/articles/set-up-git
- https://opensource.com/article/18/1/step-step-guide-git

## Testing the development branch of volesti (get the tools ready)

Clone the repository,
Clone the repository,

git clone [email protected]:GeomScale/volume_approximation.git volesti
cd volesti
Expand All @@ -52,21 +52,23 @@ To compile the `C++` code you have to specify the path to external library `libl
# e.g. on linux: cmake -DLP_SOLVE=/usr/lib/lp_solve/liblpsolve55.so ..
make

Run the tests,
You can check [here](/docs/getting_started/install.md) to see more installation guide.

ctest -jK
Run the tests,

where `K` is the number of CPU threads. By adding the option `--verbose` to `ctest` you get more information about the tests,
*e.g.* time per test, volume computed and the name of the polytope or convex body.
ctest -jK

where `K` is the number of CPU threads. By adding the option `--verbose` to `ctest` you get more information about the tests,
_e.g._ time per test, volume computed and the name of the polytope or convex body.

![test_cube](https://user-images.githubusercontent.com/3660366/72348403-0524df00-36e3-11ea-9b6d-288a2bddc22c.png)

If everything works for you, you may move forward.

## Fork volesti repository (this is your repo now!)

You can't work directly in the original volesti repository, therefore you should create your fork of this library.
This way you can modify the code and when the job is done send a pull request to merge your changes with the original
You can't work directly in the original volesti repository, therefore you should create your fork of this library.
This way you can modify the code and when the job is done send a pull request to merge your changes with the original
repository.

![fork](https://user-images.githubusercontent.com/3660366/72348562-57fe9680-36e3-11ea-9746-385ff61c752a.png)
Expand All @@ -90,9 +92,10 @@ clone your repository and checkout develop branch

git clone [email protected]:vissarion/volume_approximation.git volesti_fork
cd volesti_fork
git checkout develop
git remote add upstream [email protected]:GeomScale/volesti.git
git fetch upstream
git checkout upstream/develop
git branch -vv
git pull

see commits

Expand All @@ -105,17 +108,17 @@ For now you should see exactly the same commits as in `volesti` repository.

### GitFlow workflow

Volesit is using the [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/) workflow.
It's because it is very well suited to collaboration and scaling the development team.
Volesit is using the [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/) workflow.
It's because it is very well suited to collaboration and scaling the development team.
Each repository using this model should contain two main branches:

* master - release-ready version of the library
* develop - development version of the library
and could contain various supporting branches for new features and hotfixes.
- master - release-ready version of the library
- develop - development version of the library

and could contain various supporting branches for new features and hotfixes.

As a contributor you'll most likely be adding new features or fixing bugs in the development version of the library.
This means that for each contribution you should create a new branch originating from the develop branch,
As a contributor you'll most likely be adding new features or fixing bugs in the development version of the library.
This means that for each contribution you should create a new branch originating from the develop branch,
modify it and send a pull request in order to merge it, again with the develop branch.

### Create new branch for your work
Expand All @@ -128,15 +131,15 @@ you should see

![branch -vv](https://user-images.githubusercontent.com/3660366/72348696-a1e77c80-36e3-11ea-93ec-70f5622c0675.png)

Now you should pick a name for your new branch that doesn't already exist.
Now you should pick a name for your new branch that doesn't already exist.
The following checks for existing remote branches

git branch -a

![List of branches](https://user-images.githubusercontent.com/3660366/72348763-c5aac280-36e3-11ea-8f2c-c66e2c107929.png)
Alternatively, you can check them on `GitHub`.

Assume you want to add some new functionality (i.e. a new feature) for example a new sampling algorithm. Then you have
Assume you want to add some new functionality (i.e. a new feature) for example a new sampling algorithm. Then you have
to create a new branch e.g. `feature/the_fastest_sampling_algo_ever`

Create new local branch
Expand Down Expand Up @@ -168,12 +171,12 @@ Alternatively, your newly created remote branch is also available on GitHub

## Modify the branch (implement, implement, implement)

Before contributiong to a library by adding a new feature, or a bugfix, or improving documentation,
Before contributiong to a library by adding a new feature, or a bugfix, or improving documentation,
it is always wise to interact with the community of developers, for example by opening an issue.

### Tests

Tests are placed in the `test` directory and use the [doctest](https://github.com/onqtam/doctest) library.
Tests are placed in the `test` directory and use the [doctest](https://github.com/onqtam/doctest) library.

It is recommended to add new test whenever you contribute a new functionality/feature.
Also if your contribution is a bugfix then consider adding this case to the test-suite.
Expand Down Expand Up @@ -202,16 +205,16 @@ and click the "Create pull request" button.

## Review (ok this is not an exam)

After creating a pull request your code will be reviewed. You can propose one or more reviewers
After creating a pull request your code will be reviewed. You can propose one or more reviewers
by clicking on the "Reviewers" button

![reviewer](https://user-images.githubusercontent.com/3660366/72349476-44ecc600-36e5-11ea-81cd-d0938d923529.png)

If there are no objections your changes will be merged.
If there are no objections your changes will be merged.
Otherwise you'll see some comments under the pull request and/or under specific lines of your code.
Then you have to make the required changes, commit them and push to your branch.
Those changes will automatically be a part of the same pull request. This procedure will be repeated until the code
Then you have to make the required changes, commit them and push to your branch.
Those changes will automatically be a part of the same pull request. This procedure will be repeated until the code
is ready for merging.

If you're curious how it looks like you may see one of the open or closed
If you're curious how it looks like you may see one of the open or closed
[pull requests](https://github.com/GeomScale/volume_approximation/pulls).
15 changes: 15 additions & 0 deletions docs/getting_started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ make
```
For example: `-DLP_SOLVE=/usr/lib/lpsolve/liblpsolve55.so`

In WSL (Windows Subsystem Linux), you can run the following command to install libc6-dev-i386. This will be required for `ieeefp.h` which is used by `qd` library,

sudo apt-get install libc6-dev-i386

Also to install `mkl` related dependencies, run the following,

wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt-get update
sudo apt-get install intel-mkl-2020.4-912
sudo sh -c "echo /opt/intel/mkl/lib/intel64 > /etc/ld.so.conf.d/intel-mkl.conf"
sudo ldconfig
export CPLUS_INCLUDE_PATH="/opt/intel/mkl/include:$CPLUS_INCLUDE_PATH"

You can run the tests by `cmake test` or `ctest -jK` where `K` the number of `CPU` threads. By adding the option `--verbose` to `ctest` you get more information about the tests, *e.g.* time per test, volume computed and the name of the polytope or convex body.

### Development environment from Docker container
Expand Down