diff --git a/.github/workflows/update_documentation.yaml b/.github/workflows/update_documentation.yaml new file mode 100644 index 0000000..2ab25dc --- /dev/null +++ b/.github/workflows/update_documentation.yaml @@ -0,0 +1,55 @@ +name: Generate and Deploy Doxygen Documentation + +on: + push: + branches: + - master + + workflow_dispatch: # Allow manual triggering + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake doxygen graphviz libboost-all-dev libeigen3-dev + + - name: Configure and Build Project + run: | + mkdir build + cd build + cmake .. + make doc + + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./build/doc/html + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{steps.deployment.outputs.page_url}} + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/.gitignore b/.gitignore index bdc5af0..6a46063 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,347 @@ +*.cproject +*.project *~ +*.swp +*.cur_trans build + +# ============================================================================ +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,clion,c++,python +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,clion,c++,python + +### C++ ### +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +### CLion ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### CLion Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +# Azure Toolkit for IntelliJ plugin +# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij +.idea/**/azureSettings.xml + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.venv +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +### Python Patch ### +# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration +poetry.toml + +# ruff +.ruff_cache/ + +# LSP config files +pyrightconfig.json + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,clion,c++,python diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7e977b3..7fa215c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,18 @@ Changelog for package libnabo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1.1.2 (2024-05-23) +------------------ +* Merge pull request `#137 `_ from norlab-ulaval/github-action-api-docs + Add a GitHub action to upload API documentation to a webpage +* CMake read libnabo version from package.xml, instead of the header of nabo.h +* Merge pull request `#136 `_ from norlab-ulaval/release + Mod docker compose services for running with docker-container driver +* ci: update submodule to latest and mod service for docker-container driver +* ci: force norlab-teamcity-server release build configuration + [skip release] +* Contributors: Luc Coupal, RedLeaderOne, boxanm + 1.1.1 (2024-03-19) ------------------ diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ba5fb7..a5f0c44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,11 +11,17 @@ project("lib${LIB_NAME}") set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -# Extract version from header -file(READ "nabo/nabo.h" NABO_HEADER_CONTENT) -string(REGEX MATCH "#define NABO_VERSION \"([0-9]+\.[0-9]+\.[0-9]+)\"" _ ${NABO_HEADER_CONTENT}) -set(PROJECT_VERSION ${CMAKE_MATCH_1}) -message(STATUS ${PROJECT_VERSION}) +## Extract version from package.xml +file(READ "package.xml" PACKAGE_XML_CONTENT) +string(REGEX MATCH "([^<]+)" VERSION_MATCH ${PACKAGE_XML_CONTENT}) +# Extract the matched version from the captured group +if(VERSION_MATCH) + # CMake variable ${CMAKE_MATCH_1} contains the matched version + set(PROJECT_VERSION ${CMAKE_MATCH_1}) + message(STATUS "Found package version: ${PROJECT_VERSION}") +else() + message(SEND_ERROR "Package version not found in package.xml") +endif() if (NOT CMAKE_BUILD_TYPE) message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") diff --git a/README.md b/README.md index 91ab9b1..a6b2647 100644 --- a/README.md +++ b/README.md @@ -158,10 +158,10 @@ libnabo provides the following compilation options, available through [CMake]: ### Documentation -You can generate the documentation by typing: - - make doc - +You can access on https://norlab-ulaval.github.io/libnabo/. Alternatively, you can generate it locally by typing: +```bash +make doc +``` Prerequisites ------------- diff --git a/libnabo_installer.bash b/libnabo_installer.bash index dfa4728..091777f 100644 --- a/libnabo_installer.bash +++ b/libnabo_installer.bash @@ -9,7 +9,7 @@ # Arguments: # --install-path The directory where to install libnabo (absolute path) # (default location defined in the .env) -# --repository-version 1.0.7 Install libnabo release tag version (default to master branch latest) +# --repository-version 1.1.2 Install libnabo release tag version (default to master branch latest) # --compile-test Compile the libnabo unit-test # --generate-doc Generate the libnabo doxygen documentation # in /usr/local/share/doc/libnabo/api/html/index.html diff --git a/nabo/nabo.h b/nabo/nabo.h index 6f8a699..daa1276 100644 --- a/nabo/nabo.h +++ b/nabo/nabo.h @@ -204,13 +204,13 @@ libnabo differs from \ref ANN on the following points: //! Namespace for Nabo namespace Nabo { - //! \defgroup public public interface + //! \defgroup public public interface //@{ - + //! version of the Nabo library as string - #define NABO_VERSION "1.0.7" + #define NABO_VERSION "1.1.2" //! version of the Nabo library as an int - #define NABO_VERSION_INT 10007 + #define NABO_VERSION_INT 10102 // TODO (c++14) Convert invalidIndex, invalidValue to constexpr templated variables. template diff --git a/package.xml b/package.xml index e89c11e..d478580 100644 --- a/package.xml +++ b/package.xml @@ -1,7 +1,7 @@ libnabo - 1.1.1 + 1.1.2 libnabo is a fast K Nearest Neighbour library for low-dimensional spaces.