Skip to content

Commit

Permalink
Merge pull request #130 from norlab-ulaval/dev-feat-integrate-norlab-…
Browse files Browse the repository at this point in the history
…build-system-library-and-implement-linabo-build-system-NMO-405

Implement linabo-build-system
  • Loading branch information
RedLeader962 authored Jan 18, 2024
2 parents ab1ebec + 652d010 commit 54dc055
Show file tree
Hide file tree
Showing 78 changed files with 3,628 additions and 15 deletions.
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Note:
# - libnabo cmake install require that the README.md file exist in the docker image
# - libnaboer-CI doc related step require that .svg, .png and .md be copied in the docker image

# Graphic/image related
*.svg
*.svgz
*.png
*.drawio

# Text related
*.pdf

# Files


# Directories
drawio/*
visual/*

# IDE
.run/*
35 changes: 35 additions & 0 deletions .env.libnabo
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# =================================================================================================
#
# Set project related environment variables. Those are available for convenience
# and are also required by 'norlab-shell-script-tools' library.
#
# Usage:
#
# Important! Source this file from 'libnabo' repository root
# $ cd <path/to/libnabo/>
# $ set -o allexport && source .env.libnabo && set +o allexport
#
# =================================================================================================

PROJECT_PROMPT_NAME='NABO'

# ....Programaticaly fetch source code information.................................................
PROJECT_GIT_REMOTE_URL="https://github.com/norlab-ulaval/libnabo"
PROJECT_GIT_NAME=$( basename "${PROJECT_GIT_REMOTE_URL}" .git )
PROJECT_PATH=$( git rev-parse --show-toplevel )
PROJECT_SRC_NAME="$( basename ${PROJECT_PATH} )"

# ....Set NABO related environment variable with their own prefix..................................
# Note: Those with "PROJECT_" prefix will get eventualy overiden in the case where N2ST is used
# as a library. Using generic testing logic require that environment variables with
# "PROJECT_" prefix be available.
NABO_PROMPT_NAME="${PROJECT_PROMPT_NAME}"
NABO_GIT_REMOTE_URL="${PROJECT_GIT_REMOTE_URL}"
NABO_GIT_NAME="${PROJECT_GIT_NAME}"
NABO_PATH="${PROJECT_PATH}"
NABO_SRC_NAME="${PROJECT_SRC_NAME}"

# ....Set dependencies path........................................................................
NABO_BUILD_SYSTEM_PATH="${PROJECT_PATH}/build_system"
N2ST_PATH="${PROJECT_PATH}/build_system/utilities/norlab-shell-script-tools"
NBS_PATH="${PROJECT_PATH}/build_system/utilities/norlab-build-system"
37 changes: 37 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# =================================================================================================
# Files or directories with designated code owner.
#
# Note:
# - Each line is a file pattern followed by one or more owners.
# - Branch with branch protection rule "Require review from Code Owners"
# will automaticaly trigger a request to a designated code owner
# =================================================================================================

# ....Repository wide code owner...................................................................
# These owners will be the default owners for everything in the repo.
#* @pomerlef


# ....High level files.............................................................................
/README.md @pomerlef
/LICENSE @pomerlef

# ....Core directories and files...................................................................
/examples @boxanm @simonpierredeschenes
/nabo @boxanm @simonpierredeschenes
/python @boxanm @simonpierredeschenes
/tests @boxanm @simonpierredeschenes
/contributing @RedLeader962

# ....User install tools...........................................................................
/.env.libnabo @RedLeader962
/libnabo_dependencies_installer.bash @RedLeader962
/libnabo_installer.bash @RedLeader962

# ....DevOps related...............................................................................
/.github/ @RedLeader962
/build_system/ @RedLeader962
/.gitmodules @RedLeader962
/.gitignore @RedLeader962
/.dockerignore @RedLeader962

39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Description

### Summary:

### Changes and type of changes (quick overview):

-
-
-

---

# Checklist:

### Code related

- [ ] I have made corresponding changes to the documentation
(i.e.: function, class, script header, README.md)
- [ ] I have commented hard-to-understand code
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] All tests pass locally with my changes
(Check [contributing/contributing_instructions.md](/contributing/contributing_instructions.md) for local testing procedure using _libnabo-build-system_)


### PR creation related

- [ ] My pull request `base ref` branch is set to the `develop` branch
(the _build-system_ won't be triggered otherwise)
- [ ] My pull request branch is up-to-date with the `develop` branch
(the _build-system_ will reject it otherwise)

### PR description related

- [ ] I have included a quick summary of the changes
- [ ] I have indicated the related issue's id with `# <issue-id>` if changes are of type `fix`
- [ ] I have included a high-level list of changes and their corresponding types
(See [contributing/commit_msg_reference.md](/contributing/commit_msg_reference.md) for details)

---
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "build_system/utilities/norlab-build-system"]
path = build_system/utilities/norlab-build-system
url = https://github.com/norlab-ulaval/norlab-build-system.git
[submodule "utilities/norlab-shell-script-tools"]
path = build_system/utilities/norlab-shell-script-tools
url = https://github.com/norlab-ulaval/norlab-shell-script-tools.git
154 changes: 139 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,116 @@
libnabo is a fast K Nearest Neighbour library for low-dimensional spaces.
It provides a clean, legacy-free, scalar-type–agnostic API thanks to C++ templates.
Its current CPU implementation is strongly inspired by [ANN], but with more compact data types.
On the average, libnabo is 5% to 20% faster than [ANN].
<div align="center">

[//]: # ( ==== Logo ================================================== )
<br>
<br>
<a href="https://norlab.ulaval.ca">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/visual/norlab_logo_acronym_light.png">
<source media="(prefers-color-scheme: light)" srcset="/visual/norlab_logo_acronym_dark.png">
<img alt="Shows an the dark NorLab logo in light mode and light NorLab logo in dark mode." src="/visual/norlab_logo_acronym_dark.png" width="175">
</picture>
</a>
<br>
<br>

[//]: # ( ==== Title ================================================= )

# _libnabo_


[//]: # ( ==== Hyperlink ============================================= )
<sup>
<a href="http://132.203.26.125:8111">NorLab TeamCity GUI</a>
(VPN/intranet access) &nbsp;&nbsp;
<a href="https://hub.docker.com/repositories/norlabulaval">norlabulaval</a>
(Docker Hub) &nbsp;
</sup>
<br>
<br>

[//]: # ( ==== Description =========================================== )
**libnabo is a fast K Nearest Neighbour library for low-dimensional spaces.**
<br>
<br>

[//]: # (====GitHub badges========================================================================)

<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/norlab-ulaval/libnabo">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/norlab-ulaval/libnabo">
<img alt="GitHub License" src="https://img.shields.io/github/license/norlab-ulaval/libnabo">
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/norlab-ulaval/libnabo">
<a href="http://132.203.26.125:8111"><img src="https://img.shields.io/static/v1?label=JetBrains TeamCity&message=CI/CD&color=green?style=plastic&logo=teamcity" /></a>
<a href="https://hub.docker.com/repository/docker/norlabulaval/libnabo/"> <img alt="Docker Image Version (latest semver)" src="https://img.shields.io/docker/v/norlabulaval/libnabo?logo=docker&label=libnabo"> </a>
<br>
<br>
<hr style="color:lightgray;background-color:lightgray">
</div>


libnabo provides a clean, legacy-free, scalar-type–agnostic API thanks to C++ templates.
Its current CPU implementation is strongly inspired by [ANN], but with more compact data types. On the average, libnabo is 5% to 20% faster than [ANN].

**Dependencies:**
- libnabo depends on [Eigen], a modern C++ matrix and linear-algebra library.
- libnabo works with either version 2 or 3 of Eigen.
- libnabo also optionally depends on [Boost], a C++ general library, for Python bindings.

**Credit:**
- libnabo was developed by [Stéphane Magnenat](http://stephane.magnenat.net) as part of his work at [ASL-ETH](http://www.asl.ethz.ch)
- libnabo is now maintained by [NorLab](https://github.com/norlab-ulaval)

libnabo depends on [Eigen], a modern C++ matrix and linear-algebra library.
libnabo works with either version 2 or 3 of Eigen.
libnabo also optionally depends on [Boost], a C++ general library, for Python bindings.

libnabo was developed by [Stéphane Magnenat](http://stephane.magnenat.net) as part of his work at [ASL-ETH](http://www.asl.ethz.ch) and is now maintained by [Simon Lynen](https://github.com/simonlynen).

If you are interested in a pure-[Rust](https://www.rust-lang.org/) version, check [that repository](https://github.com/enlightware/nabo-rs) out.

---

[//]: # (====Supported OS and aarch===============================================================)

### Supported OS And Architecture
libnabo is tested on our build system under the following architecture and OS:

- x86 and arm64/v8
- Ubuntu bionic (18.04) and focal (20.04)

[//]: # (- jammy &#40;22.04&#41;)

Note:

- libnabo reportedly works on MacOs OsX (latest) and Windows (latest)

---

[//]: # (====Release note=========================================================================)

### ★ Version `1.1.0` Release Note

This release of _libnabo_ introduces the integration
of [norlab-build-system (NBS)](https://github.com/norlab-ulaval/norlab-build-system) as a _git
submodule_ for codebase development and testing.

Execute the following to clone the repository with its submodule:

```shell
git clone --recurse-submodules https://github.com/norlab-ulaval/libnabo.git
```

If _libnabo_ was previously cloned, execute the following to fetch its new submodule

```shell
git submodule update --remote --recursive --init
```

### ★ Contributing Instructions

See [contributing_instructions.md](contributing/contributing_instructions.md)
for instructions related to bug reporting, code contribution and for setting up
the `libnabo-build-system`
on your workstation to speed up your local development workflow.


---


Download
========

Expand All @@ -19,8 +119,29 @@ They provide a package with the shared library, another with the development hea

The source code is available from github, you can clone the git tree by doing:

git clone git://github.com/ethz-asl/libnabo.git
```shell
git clone --recurse-submodules https://github.com/norlab-ulaval/libnabo.git
```


Docker images
========
Run the following commands to pull and run libnabo in a docker container
```shell
docker pull norlabulaval/libnabo:latest-ubuntu-focal

docker run -it --rm norlabulaval/libnabo:latest-ubuntu-focal
```
See available [libnabo image tags](https://hub.docker.com/repository/docker/norlabulaval/libnabo/) on dockerhub.

To install docker related dependencies on ubuntu, execute the following

```shell
cd ./build_system/nabo_utility_script

# Execute docker tools install script i.e. docker daemon, docker compose, docker buildx
bash nabo_install_docker_tools.bash
```

Compilation
===========
Expand All @@ -29,6 +150,14 @@ libnabo uses [CMake] as build system.
The complete compilation process depends on the system you are using (Linux, Mac OS X or Windows).
You will find a nice introductory tutorial in [this video](http://www.youtube.com/watch?v=CLvZTyji_Uw).

For conveniences, you can use the provided installer script for ubuntu
```shell
bash libnabo_dependencies_installer.bash

# Use the --help flag to see the list of optional flag
bash libnabo_installer.bash [<optional flag>]
```

Prerequisites
-------------

Expand Down Expand Up @@ -147,11 +276,6 @@ If you use libnabo in the academic context, please cite this paper that evaluate
}


Bug reporting
=============

Please use [github's issue tracker](http://github.com/ethz-asl/libnabo/issues) to report bugs.


License
=======
Expand Down
43 changes: 43 additions & 0 deletions build_system/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

#
# Dockerhub or self hosted hub domain name
#
NBS_DOCKERHUB_NAMESPACE=norlabulaval

#
# Repository url
#
# Note:
# - Main repo: https://github.com/norlab-ulaval/libnabo
# - Legacy repo: https://github.com/ethz-asl/libnabo

NBS_REPOSITORY_DOMAIN=norlab-ulaval

NBS_REPOSITORY_NAME=libnabo

#
# Install script variables
#
NBS_LIB_INSTALL_PATH=/opt/percep3d_libraries

#
# Path to the NBS build system directory (.env.build_matrix should be there)
#
NBS_SUPERPROJECT_BUILD_SYSTEM_DIR=./build_system

#
# NorLab-build-system & NorLab-sheel-script-tools
#
PROJECT_PROMPT_NAME=NABO
NBS_SPLASH_NAME="Libnabo"
NBS_SPLASH_NAME_BUILD_SYSTEM="Libnabo Build System"

#
# Docker built-in environment variable (do not change the variable name
#
COMPOSE_PROJECT_NAME=libnabo

## Unmute BUILDKIT_PROGRESS to set globaly for debugging dockerfile
## For debuging docker build localy, use `docker build --progress=plain --no-cache` flags instead
#BUILDKIT_PROGRESS=plain

Loading

0 comments on commit 54dc055

Please sign in to comment.