nind 2.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. nind-2.0.3/.github/workflows/docker-publish.yml +94 -0
  2. nind-2.0.3/.github/workflows/publish-pypi.yml +116 -0
  3. nind-2.0.3/.gitignore +5 -0
  4. nind-2.0.3/.travis.yml +76 -0
  5. nind-2.0.3/AGENTS.md +32 -0
  6. nind-2.0.3/CLAUDE.md +107 -0
  7. nind-2.0.3/CMakeLists.txt +146 -0
  8. nind-2.0.3/Dockerfile-debian11 +22 -0
  9. nind-2.0.3/Dockerfile-debian9.4 +20 -0
  10. nind-2.0.3/Dockerfile-ubuntu16.04 +20 -0
  11. nind-2.0.3/Dockerfile-ubuntu18.04 +29 -0
  12. nind-2.0.3/LICENCE.md +165 -0
  13. nind-2.0.3/NindConfig.cmake +78 -0
  14. nind-2.0.3/PKG-INFO +24 -0
  15. nind-2.0.3/README.md +17 -0
  16. nind-2.0.3/SystemSpecificInformations.cmake +140 -0
  17. nind-2.0.3/gbuild.sh +188 -0
  18. nind-2.0.3/pyproject.toml +51 -0
  19. nind-2.0.3/src/CMakeLists.txt +2 -0
  20. nind-2.0.3/src/cpp/CMakeLists.txt +8 -0
  21. nind-2.0.3/src/cpp/Doxyfile +2303 -0
  22. nind-2.0.3/src/cpp/NindAmose/CMakeLists.txt +25 -0
  23. nind-2.0.3/src/cpp/NindAmose/NindLexiconAmose.cpp +135 -0
  24. nind-2.0.3/src/cpp/NindAmose/NindLexiconAmose.h +89 -0
  25. nind-2.0.3/src/cpp/NindAmose/NindLocalAmose.cpp +140 -0
  26. nind-2.0.3/src/cpp/NindAmose/NindLocalAmose.h +82 -0
  27. nind-2.0.3/src/cpp/NindAmose/NindTermAmose.cpp +248 -0
  28. nind-2.0.3/src/cpp/NindAmose/NindTermAmose.h +114 -0
  29. nind-2.0.3/src/cpp/NindBasics/CMakeLists.txt +20 -0
  30. nind-2.0.3/src/cpp/NindBasics/NindFile.cpp +624 -0
  31. nind-2.0.3/src/cpp/NindBasics/NindFile.h +334 -0
  32. nind-2.0.3/src/cpp/NindBasics/NindPadFile.cpp +350 -0
  33. nind-2.0.3/src/cpp/NindBasics/NindPadFile.h +138 -0
  34. nind-2.0.3/src/cpp/NindCommonExport.h +35 -0
  35. nind-2.0.3/src/cpp/NindExceptions.h +231 -0
  36. nind-2.0.3/src/cpp/NindIndex/CMakeLists.txt +24 -0
  37. nind-2.0.3/src/cpp/NindIndex/NindIndex.cpp +332 -0
  38. nind-2.0.3/src/cpp/NindIndex/NindIndex.h +102 -0
  39. nind-2.0.3/src/cpp/NindIndex/NindLexiconIndex.cpp +353 -0
  40. nind-2.0.3/src/cpp/NindIndex/NindLexiconIndex.h +132 -0
  41. nind-2.0.3/src/cpp/NindIndex/NindLexiconIndexK.cpp +351 -0
  42. nind-2.0.3/src/cpp/NindIndex/NindLexiconIndexK.h +125 -0
  43. nind-2.0.3/src/cpp/NindIndex/NindLocalIndex.cpp +344 -0
  44. nind-2.0.3/src/cpp/NindIndex/NindLocalIndex.h +123 -0
  45. nind-2.0.3/src/cpp/NindIndex/NindTermIndex.cpp +220 -0
  46. nind-2.0.3/src/cpp/NindIndex/NindTermIndex.h +104 -0
  47. nind-2.0.3/src/cpp/NindLexicon/CMakeLists.txt +21 -0
  48. nind-2.0.3/src/cpp/NindLexicon/NindLexicon.cpp +328 -0
  49. nind-2.0.3/src/cpp/NindLexicon/NindLexicon.h +157 -0
  50. nind-2.0.3/src/cpp/NindLexicon/NindLexiconFile.cpp +201 -0
  51. nind-2.0.3/src/cpp/NindLexicon/NindLexiconFile.h +103 -0
  52. nind-2.0.3/src/cpp/NindPy/CMakeLists.txt +54 -0
  53. nind-2.0.3/src/cpp/NindPy/bindings.cpp +195 -0
  54. nind-2.0.3/src/cpp/NindRetrolexicon/CMakeLists.txt +18 -0
  55. nind-2.0.3/src/cpp/NindRetrolexicon/NindRetrolexicon.cpp +227 -0
  56. nind-2.0.3/src/cpp/NindRetrolexicon/NindRetrolexicon.h +98 -0
  57. nind-2.0.3/src/py/CMakeLists.txt +3 -0
  58. nind-2.0.3/src/py/nind/NindFile.py +302 -0
  59. nind-2.0.3/src/py/nind/NindIndex.py +155 -0
  60. nind-2.0.3/src/py/nind/NindLexiconindex.py +413 -0
  61. nind-2.0.3/src/py/nind/NindLocalindex.py +326 -0
  62. nind-2.0.3/src/py/nind/NindPadFile.py +362 -0
  63. nind-2.0.3/src/py/nind/NindRetrolexicon.py +253 -0
  64. nind-2.0.3/src/py/nind/NindTermindex.py +313 -0
  65. nind-2.0.3/src/py/nind/Nind_dumpDocument.py +86 -0
  66. nind-2.0.3/src/py/nind/Nind_search.py +102 -0
  67. nind-2.0.3/src/py/nind/Nind_trouveMotsSansOccurrence.py +75 -0
  68. nind-2.0.3/src/py/nind/Nind_trouveNombresPremiers.py +51 -0
  69. nind-2.0.3/src/py/nind/__init__.py +0 -0
  70. nind-2.0.3/src/py/nind/amose/CMakeLists.txt +5 -0
  71. nind-2.0.3/src/py/nind/amose/LatXmlParser.py +128 -0
  72. nind-2.0.3/src/py/nind/amose/NindIdentifiantsClef.py +127 -0
  73. nind-2.0.3/src/py/nind/amose/Nind_convertitLuceneDump.py +100 -0
  74. nind-2.0.3/src/py/nind/amose/Nind_convertitSampleDump.py +116 -0
  75. nind-2.0.3/src/py/nind/amose/Nind_convertitXmlClef.py +126 -0
  76. nind-2.0.3/src/py/nind/nind_engine.py +348 -0
  77. nind-2.0.3/tst/CMakeLists.txt +1 -0
  78. nind-2.0.3/tst/cpp/CMakeLists.txt +16 -0
  79. nind-2.0.3/tst/cpp/NindAmose/CMakeLists.txt +77 -0
  80. nind-2.0.3/tst/cpp/NindAmose/NindAmose_effaceDocument.cpp +80 -0
  81. nind-2.0.3/tst/cpp/NindAmose/NindAmose_indexeCorpus.cpp +245 -0
  82. nind-2.0.3/tst/cpp/NindAmose/NindAmose_litTexteAnalysej.cpp +111 -0
  83. nind-2.0.3/tst/cpp/NindAmose/NindAmose_litTexteAnalysej.h +65 -0
  84. nind-2.0.3/tst/cpp/NindAmose/NindAmose_testLecteur.cpp +143 -0
  85. nind-2.0.3/tst/cpp/NindAmose/NindAmose_testSynchro.cpp +195 -0
  86. nind-2.0.3/tst/cpp/NindAmose/Nind_indexeCorpus.cpp +218 -0
  87. nind-2.0.3/tst/cpp/NindBasics/CMakeLists.txt +13 -0
  88. nind-2.0.3/tst/cpp/NindBasics/NindBasics_testLecture.cpp +50 -0
  89. nind-2.0.3/tst/cpp/NindIndex/CMakeLists.txt +90 -0
  90. nind-2.0.3/tst/cpp/NindIndex/NindDate.cpp +32 -0
  91. nind-2.0.3/tst/cpp/NindIndex/NindDate.h +38 -0
  92. nind-2.0.3/tst/cpp/NindIndex/NindFichiers.cpp +49 -0
  93. nind-2.0.3/tst/cpp/NindIndex/NindFichiers.h +42 -0
  94. nind-2.0.3/tst/cpp/NindIndex/NindIndexTest.cpp +123 -0
  95. nind-2.0.3/tst/cpp/NindIndex/NindIndexTest.h +81 -0
  96. nind-2.0.3/tst/cpp/NindIndex/NindIndex_indexe.cpp +297 -0
  97. nind-2.0.3/tst/cpp/NindIndex/NindIndex_indexe.h +135 -0
  98. nind-2.0.3/tst/cpp/NindIndex/NindIndex_litDumpS2.cpp +212 -0
  99. nind-2.0.3/tst/cpp/NindIndex/NindIndex_litDumpS2.h +91 -0
  100. nind-2.0.3/tst/cpp/NindIndex/NindIndex_testEcrivain.cpp +125 -0
  101. nind-2.0.3/tst/cpp/NindIndex/NindIndex_testLecteur.cpp +135 -0
  102. nind-2.0.3/tst/cpp/NindIndex/NindIndex_testSynchro.cpp +169 -0
  103. nind-2.0.3/tst/cpp/NindIndex/NindLexiconIndex_testEcrivain.cpp +185 -0
  104. nind-2.0.3/tst/cpp/NindIndex/NindLexiconIndex_testLecteur.cpp +126 -0
  105. nind-2.0.3/tst/cpp/NindIndex/NindTermIndex_testEcrivain.cpp +189 -0
  106. nind-2.0.3/tst/cpp/NindIndex/NindTermIndex_testLecteur.cpp +109 -0
  107. nind-2.0.3/tst/cpp/NindIndex/Nind_testLateconNumber.cpp +120 -0
  108. nind-2.0.3/tst/cpp/NindIndex/Nind_testNumbersInLocalIndexes.cpp +154 -0
  109. nind-2.0.3/tst/cpp/NindLexicon/CMakeLists.txt +81 -0
  110. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testEcrivain.cpp +172 -0
  111. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testInter.cpp +271 -0
  112. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testLecteur.cpp +168 -0
  113. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testLimites.cpp +140 -0
  114. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testLimitesB.cpp +169 -0
  115. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testLimitesC.cpp +175 -0
  116. nind-2.0.3/tst/cpp/NindLexicon/NindLexicon_testMemoire.cpp +113 -0
  117. nind-2.0.3/tst/cpp/NindSearch/CMakeLists.txt +37 -0
  118. nind-2.0.3/tst/cpp/NindSearch/NindGetDocTerms.cpp +102 -0
  119. nind-2.0.3/tst/cpp/NindSearch/NindSearch.cpp +135 -0
  120. nind-2.0.3/tst/cpp/NindSearch/NindSearchAmose.cpp +172 -0
  121. nind-2.0.3/tst/cpp/NindTests/CMakeLists.txt +27 -0
  122. nind-2.0.3/tst/cpp/NindTests/Nind_test1.cpp +53 -0
  123. nind-2.0.3/tst/cpp/NindTests/Nind_testSynchro.cpp +85 -0
  124. nind-2.0.3/tst/cpp/unit/CMakeLists.txt +11 -0
  125. nind-2.0.3/tst/cpp/unit/NindAmose/CMakeLists.txt +7 -0
  126. nind-2.0.3/tst/cpp/unit/NindAmose/NindLexiconAmoseTest.cpp +74 -0
  127. nind-2.0.3/tst/cpp/unit/NindAmose/NindLocalAmoseTest.cpp +109 -0
  128. nind-2.0.3/tst/cpp/unit/NindAmose/NindTermAmoseTest.cpp +104 -0
  129. nind-2.0.3/tst/cpp/unit/NindBasics/CMakeLists.txt +6 -0
  130. nind-2.0.3/tst/cpp/unit/NindBasics/NindFileTest.cpp +257 -0
  131. nind-2.0.3/tst/cpp/unit/NindBasics/NindPadFileTest.cpp +138 -0
  132. nind-2.0.3/tst/cpp/unit/NindIndex/CMakeLists.txt +7 -0
  133. nind-2.0.3/tst/cpp/unit/NindIndex/NindLexiconIndexTest.cpp +123 -0
  134. nind-2.0.3/tst/cpp/unit/NindIndex/NindLocalIndexTest.cpp +178 -0
  135. nind-2.0.3/tst/cpp/unit/NindIndex/NindTermIndexTest.cpp +173 -0
  136. nind-2.0.3/tst/cpp/unit/NindLexicon/CMakeLists.txt +6 -0
  137. nind-2.0.3/tst/cpp/unit/NindLexicon/NindLexiconFileTest.cpp +111 -0
  138. nind-2.0.3/tst/cpp/unit/NindLexicon/NindLexiconTest.cpp +113 -0
  139. nind-2.0.3/tst/cpp/unit/NindRetrolexicon/CMakeLists.txt +5 -0
  140. nind-2.0.3/tst/cpp/unit/NindRetrolexicon/NindRetrolexiconTest.cpp +132 -0
  141. nind-2.0.3/tst/cpp/unit/TestTempDir.h +62 -0
  142. nind-2.0.3/tst/py/test_native.py +85 -0
  143. nind-2.0.3/tst/py/test_nind_engine.py +130 -0
  144. nind-2.0.3/tst/py/test_nindfile.py +184 -0
  145. nind-2.0.3/tst/py/test_nindlexiconindex.py +66 -0
  146. nind-2.0.3/tst/py/test_nindlocalindex.py +76 -0
  147. nind-2.0.3/tst/py/test_nindretrolexicon.py +123 -0
  148. nind-2.0.3/tst/py/test_nindtermindex.py +63 -0
  149. nind-2.0.3/uv.lock +272 -0
@@ -0,0 +1,94 @@
1
+ name: Docker
2
+
3
+ # This workflow uses actions that are not certified by GitHub.
4
+ # They are provided by a third-party and are governed by
5
+ # separate terms of service, privacy policy, and support
6
+ # documentation.
7
+
8
+ on:
9
+ schedule:
10
+ - cron: '19 8 * * *'
11
+ push:
12
+ branches: [ master ]
13
+ # Publish semver tags as releases.
14
+ tags: [ 'v*.*.*' ]
15
+ pull_request:
16
+ branches: [ master ]
17
+
18
+ env:
19
+ # Use docker.io for Docker Hub if empty
20
+ REGISTRY: ghcr.io
21
+ # github.repository as <account>/<repo>
22
+ IMAGE_NAME: ${{ github.repository }}
23
+
24
+
25
+ jobs:
26
+ build:
27
+
28
+ runs-on: ubuntu-latest
29
+ permissions:
30
+ contents: read
31
+ packages: write
32
+ # This is used to complete the identity challenge
33
+ # with sigstore/fulcio when running outside of PRs.
34
+ id-token: write
35
+
36
+ steps:
37
+ - name: Checkout repository
38
+ uses: actions/checkout@v2
39
+
40
+ # Install the cosign tool except on PR
41
+ # https://github.com/sigstore/cosign-installer
42
+ - name: Install cosign
43
+ if: github.event_name != 'pull_request'
44
+ uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422
45
+ with:
46
+ cosign-release: 'v1.4.0'
47
+
48
+
49
+ # Workaround: https://github.com/docker/build-push-action/issues/461
50
+ - name: Setup Docker buildx
51
+ uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
52
+
53
+ # Login against a Docker registry except on PR
54
+ # https://github.com/docker/login-action
55
+ - name: Log into registry ${{ env.REGISTRY }}
56
+ if: github.event_name != 'pull_request'
57
+ uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
58
+ with:
59
+ registry: ${{ env.REGISTRY }}
60
+ username: ${{ github.actor }}
61
+ password: ${{ secrets.GITHUB_TOKEN }}
62
+
63
+ # Extract metadata (tags, labels) for Docker
64
+ # https://github.com/docker/metadata-action
65
+ - name: Extract Docker metadata
66
+ id: meta
67
+ uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
68
+ with:
69
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70
+
71
+ # Build and push Docker image with Buildx (don't push on PR)
72
+ # https://github.com/docker/build-push-action
73
+ - name: Build and push Docker image
74
+ id: build-and-push
75
+ uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
76
+ with:
77
+ context: .
78
+ file: Dockerfile-debian11
79
+ push: ${{ github.event_name != 'pull_request' }}
80
+ tags: ${{ steps.meta.outputs.tags }}
81
+ labels: ${{ steps.meta.outputs.labels }}
82
+
83
+ # Sign the resulting Docker image digest except on PRs.
84
+ # This will only write to the public Rekor transparency log when the Docker
85
+ # repository is public to avoid leaking data. If you would like to publish
86
+ # transparency data even for private images, pass --force to cosign below.
87
+ # https://github.com/sigstore/cosign
88
+ - name: Sign the published Docker image
89
+ if: ${{ github.event_name != 'pull_request' }}
90
+ env:
91
+ COSIGN_EXPERIMENTAL: "true"
92
+ # This step uses the identity token to provision an ephemeral certificate
93
+ # against the sigstore community Fulcio instance.
94
+ run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
@@ -0,0 +1,116 @@
1
+ name: Publish Python package
2
+
3
+ # Builds the `nind` wheel (with its compiled nind._native extension) for
4
+ # Linux/macOS/Windows plus an sdist, then publishes them to PyPI.
5
+ #
6
+ # Triggered by pushing a version tag, which `bumpver update` creates and
7
+ # pushes automatically (see [tool.bumpver] in pyproject.toml) - so a release
8
+ # is just:
9
+ # uvx bumpver update --patch # or --minor / --major
10
+ #
11
+ # PyPI auth is via Trusted Publishing (OIDC): no stored secret, but the repo
12
+ # must first be registered as a trusted publisher for the `nind` project at
13
+ # https://pypi.org/manage/project/nind/settings/publishing/ pointing at this
14
+ # workflow file and the `pypi` environment used below.
15
+
16
+ on:
17
+ push:
18
+ tags:
19
+ - 'v*.*.*'
20
+ workflow_dispatch:
21
+
22
+ permissions:
23
+ contents: read
24
+
25
+ jobs:
26
+ test:
27
+ name: Run Python test suite
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: Checkout repository
31
+ uses: actions/checkout@v4
32
+
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@v5
35
+
36
+ - name: Run tests
37
+ run: uv run pytest tst/py -v
38
+
39
+ build_wheels:
40
+ name: Build wheels (${{ matrix.os }})
41
+ needs: test
42
+ runs-on: ${{ matrix.os }}
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ os: [ubuntu-latest, macos-14, windows-latest]
47
+ steps:
48
+ - name: Checkout repository
49
+ uses: actions/checkout@v4
50
+
51
+ # cibuildwheel's own uv auto-provisioning isn't reliable on every
52
+ # platform (seen failing with "uv not found" on macOS/Windows); putting
53
+ # a real uv on PATH first avoids depending on that.
54
+ - name: Install uv
55
+ uses: astral-sh/setup-uv@v5
56
+
57
+ - name: Build wheels
58
+ uses: pypa/cibuildwheel@v4.2.1
59
+ env:
60
+ CIBW_BUILD: "cp3*"
61
+ CIBW_SKIP: "*-musllinux*"
62
+ CIBW_BUILD_FRONTEND: "uv"
63
+ CIBW_ARCHS_MACOS: "auto"
64
+ # cibuildwheel's default also builds 32-bit (win32) wheels; nobody
65
+ # targets 32-bit Windows Python for this, and it's a strictly worse
66
+ # environment for the LLP64-vs-LP64 "long is 32-bit" class of bugs.
67
+ CIBW_ARCHS_WINDOWS: "AMD64"
68
+
69
+ - name: Upload wheels
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: wheels-${{ matrix.os }}
73
+ path: wheelhouse/*.whl
74
+
75
+ build_sdist:
76
+ name: Build source distribution
77
+ needs: test
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - name: Checkout repository
81
+ uses: actions/checkout@v4
82
+
83
+ - name: Install uv
84
+ uses: astral-sh/setup-uv@v5
85
+
86
+ - name: Build sdist
87
+ run: uv build --sdist
88
+
89
+ - name: Upload sdist
90
+ uses: actions/upload-artifact@v4
91
+ with:
92
+ name: sdist
93
+ path: dist/*.tar.gz
94
+
95
+ publish:
96
+ name: Publish to PyPI
97
+ needs: [build_wheels, build_sdist]
98
+ runs-on: ubuntu-latest
99
+ environment:
100
+ name: pypi
101
+ url: https://pypi.org/p/nind
102
+ permissions:
103
+ id-token: write
104
+ steps:
105
+ - name: Download built distributions
106
+ uses: actions/download-artifact@v4
107
+ with:
108
+ pattern: '*'
109
+ path: dist
110
+ merge-multiple: true
111
+
112
+ - name: Install uv
113
+ uses: astral-sh/setup-uv@v5
114
+
115
+ - name: Publish to PyPI
116
+ run: uv publish --trusted-publishing always
nind-2.0.3/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.kdev4
2
+ build/
3
+ *~
4
+ *.pyc
5
+ Dist*/
nind-2.0.3/.travis.yml ADDED
@@ -0,0 +1,76 @@
1
+ sudo: required
2
+ language: cpp
3
+ cache: ccache
4
+ branches:
5
+ except:
6
+ - "/^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d-[\\da-f]+$/"
7
+ env:
8
+ global:
9
+ - secure: FlsmywHiGR6VKejCGcEd59rhvk5YI1f+FUAWfBLVxzqG4haLGT0MQwyxDr2EPS3Iu+v16nsMxHT2dwMCotC8zTPSmHUr6evE4jpNcqs+vIOAz7VLjdqwD0jweeguOR4JxL1XcgFZMAPTnoQFBFZlEOFu8OxaDjOoG7Oj0iGH+Fo=
10
+ - secure: 89MWEONx9hRT4aMMxqTcwHVfErXx7lYuL2jirVk5qhdZhJ7GzuOgd/FjDNhyJmZxy77BcYe60vvvPsRwjst1XOUKLQ35QnIaGcN29GVhZksyW1K0qSqRr/gjf+2yDLuqZZ/OmCHDEzoNaKD3BC+weKA5J2j4qmeBEB05HKOAVZQ=
11
+ - USE_TENSORFLOW=false
12
+ services:
13
+ - docker
14
+ jobs:
15
+ include:
16
+ - stage: test
17
+ script: docker build --tag ubuntu18.04 --build-arg JOB_NUMBER=$TRAVIS_JOB_NUMBER
18
+ -f ./Dockerfile-ubuntu18.04 . && docker run -t -d ubuntu18.04 && docker cp $(docker
19
+ ps -n 1 -q):/usr/share/apps/nind/packages/ $HOME && ls $HOME/packages/
20
+ before_deploy: git config --local user.name "Gael de Chalendar" git config --local
21
+ user.email "kleagg@gmail.com" git tag "$(git log --date=iso -1 | grep Date
22
+ | sed -e 's/Date:\ *//' -e 's/\+.*//' -e 's/[- :]//g')-$(git log --format=%h
23
+ --abbrev=8 -1)" || true
24
+ deploy:
25
+ provider: releases
26
+ api_key:
27
+ secure: YBHi+kyNbnpWb4/P1apH06nwvUWhe9mnu1E08jN898DaKSCXhuss7JiLuaP5ogWAlRcGVHAO/9ntC91WWryfYp+qSDudrOZu7AQFvIpHAfE8WX8G6bGov74+sjA5YptdKaQ1QyAg2D2JfsghdPwR9JSqYaeSqVRYSs0P/GlnZw0cNgCWVIOMgv4wJZ8IpTMItSlHu4CVqgDMfcCivylhyUP9kccqD7itPaxUgOhD2ftAjdPf8eJoPdr7jpvWwGDiv0kwDoDGBUR1HPc3XT8/Vr5CX7Yy0AhTEgPzWcTbp6+Njw5MzttfEQaUXpdVKlJnmgBYJ8Fn/8tXpnySsGvcozwD29O7mHWB68f91m5ZKMQFDWwXpJ95m45MLIi4UzSYqUNUSTREnAI0o75+vcPNodETwpFPYvWgwQzgQIIsuw+svIvjtBYNKVLsJCoBuxCjFcwMXXD7Hug4vkx9v2RIjK4zn9AU/P8605uh03Ht/gKfJ8WGY5iND0+aVm7M6vPPuK1iCoWpOsI8Rayw5NP1Sj+AbK5ysrcO0ytnKfKFhzuZLq/0t6yDcsKjQeWxPNSbiIDIpYDigqJYHcA8yWJREGe3biFq/+T+He1BcATV1+FSMPMojnJ4xEvnvIYUTwsULwh7jCTTuevdcWVqiTcE5kP9V9Jn9ZEmXuHbDXPJ7tA=
28
+ file_glob: true
29
+ file: "$HOME/packages/*.deb"
30
+ skip_cleanup: true
31
+ on:
32
+ repo: aymara/nind
33
+ tags: false
34
+ branches:
35
+ except:
36
+ - "/^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d-[\\da-f]+$/"
37
+ - script: docker build --tag ubuntu16.04 --build-arg JOB_NUMBER=$TRAVIS_JOB_NUMBER
38
+ -f ./Dockerfile-ubuntu16.04 . && docker run -t -d ubuntu16.04 && docker cp $(docker
39
+ ps -n 1 -q):/usr/share/apps/nind/packages/ $HOME && ls $HOME/packages/
40
+ before_deploy: git config --local user.name "Gael de Chalendar" git config --local
41
+ user.email "kleagg@gmail.com" git tag "$(git log --date=iso -1 | grep Date
42
+ | sed -e 's/Date:\ *//' -e 's/\+.*//' -e 's/[- :]//g')-$(git log --format=%h
43
+ --abbrev=8 -1)" || true
44
+ deploy:
45
+ provider: releases
46
+ api_key:
47
+ secure: YBHi+kyNbnpWb4/P1apH06nwvUWhe9mnu1E08jN898DaKSCXhuss7JiLuaP5ogWAlRcGVHAO/9ntC91WWryfYp+qSDudrOZu7AQFvIpHAfE8WX8G6bGov74+sjA5YptdKaQ1QyAg2D2JfsghdPwR9JSqYaeSqVRYSs0P/GlnZw0cNgCWVIOMgv4wJZ8IpTMItSlHu4CVqgDMfcCivylhyUP9kccqD7itPaxUgOhD2ftAjdPf8eJoPdr7jpvWwGDiv0kwDoDGBUR1HPc3XT8/Vr5CX7Yy0AhTEgPzWcTbp6+Njw5MzttfEQaUXpdVKlJnmgBYJ8Fn/8tXpnySsGvcozwD29O7mHWB68f91m5ZKMQFDWwXpJ95m45MLIi4UzSYqUNUSTREnAI0o75+vcPNodETwpFPYvWgwQzgQIIsuw+svIvjtBYNKVLsJCoBuxCjFcwMXXD7Hug4vkx9v2RIjK4zn9AU/P8605uh03Ht/gKfJ8WGY5iND0+aVm7M6vPPuK1iCoWpOsI8Rayw5NP1Sj+AbK5ysrcO0ytnKfKFhzuZLq/0t6yDcsKjQeWxPNSbiIDIpYDigqJYHcA8yWJREGe3biFq/+T+He1BcATV1+FSMPMojnJ4xEvnvIYUTwsULwh7jCTTuevdcWVqiTcE5kP9V9Jn9ZEmXuHbDXPJ7tA=
48
+ file_glob: true
49
+ file: "$HOME/packages/*.deb"
50
+ skip_cleanup: true
51
+ on:
52
+ repo: aymara/nind
53
+ tags: false
54
+ branches:
55
+ except:
56
+ - "/^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d-[\\da-f]+$/"
57
+ - script: docker build --tag debian9.4 --build-arg JOB_NUMBER=$TRAVIS_JOB_NUMBER
58
+ -f ./Dockerfile-debian9.4 . && docker run -t -d debian9.4 && docker cp $(docker
59
+ ps -n 1 -q):/usr/share/apps/nind/packages/ $HOME && ls $HOME/packages/
60
+ before_deploy: git config --local user.name "Gael de Chalendar" git config --local
61
+ user.email "kleagg@gmail.com" git tag "$(git log --date=iso -1 | grep Date
62
+ | sed -e 's/Date:\ *//' -e 's/\+.*//' -e 's/[- :]//g')-$(git log --format=%h
63
+ --abbrev=8 -1)" || true
64
+ deploy:
65
+ provider: releases
66
+ api_key:
67
+ secure: YBHi+kyNbnpWb4/P1apH06nwvUWhe9mnu1E08jN898DaKSCXhuss7JiLuaP5ogWAlRcGVHAO/9ntC91WWryfYp+qSDudrOZu7AQFvIpHAfE8WX8G6bGov74+sjA5YptdKaQ1QyAg2D2JfsghdPwR9JSqYaeSqVRYSs0P/GlnZw0cNgCWVIOMgv4wJZ8IpTMItSlHu4CVqgDMfcCivylhyUP9kccqD7itPaxUgOhD2ftAjdPf8eJoPdr7jpvWwGDiv0kwDoDGBUR1HPc3XT8/Vr5CX7Yy0AhTEgPzWcTbp6+Njw5MzttfEQaUXpdVKlJnmgBYJ8Fn/8tXpnySsGvcozwD29O7mHWB68f91m5ZKMQFDWwXpJ95m45MLIi4UzSYqUNUSTREnAI0o75+vcPNodETwpFPYvWgwQzgQIIsuw+svIvjtBYNKVLsJCoBuxCjFcwMXXD7Hug4vkx9v2RIjK4zn9AU/P8605uh03Ht/gKfJ8WGY5iND0+aVm7M6vPPuK1iCoWpOsI8Rayw5NP1Sj+AbK5ysrcO0ytnKfKFhzuZLq/0t6yDcsKjQeWxPNSbiIDIpYDigqJYHcA8yWJREGe3biFq/+T+He1BcATV1+FSMPMojnJ4xEvnvIYUTwsULwh7jCTTuevdcWVqiTcE5kP9V9Jn9ZEmXuHbDXPJ7tA=
68
+ file_glob: true
69
+ file: "$HOME/packages/*.deb"
70
+ skip_cleanup: true
71
+ on:
72
+ repo: aymara/nind
73
+ tags: false
74
+ branches:
75
+ except:
76
+ - "/^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d-[\\da-f]+$/"
nind-2.0.3/AGENTS.md ADDED
@@ -0,0 +1,32 @@
1
+ # AGENTS.md - Nind Indexing Module
2
+
3
+ ## Developer Commands
4
+
5
+ ### Build
6
+ Requires `NIND_DIST` environment variable to be set.
7
+ - Default build: `NIND_DIST=/path/to/dist ./gbuild.sh`
8
+ - Address Sanitizer: `./gbuild.sh -a ON`
9
+ - Native architecture optimizations: `./gbuild.sh -n native`
10
+ - Linear build (disable parallel): `./gbuild.sh -p false`
11
+ - Change build mode: `./gbuild.sh -m Release` or `./gbuild.sh -m RelWithDebInfo`
12
+ - Change CMake generator: `./gbuild.sh -G Unix` (default is `Ninja`)
13
+
14
+ ### Verification
15
+ - Build and test (via `gbuild.sh` if generator supports it): `./gbuild.sh`
16
+ - Manual test execution: `ctest` within the build directory (`build/<branch>/<mode>/nind`)
17
+
18
+ ## Architecture & Conventions
19
+
20
+ - **Language**: C++ (targets C++14, falls back to C++11/0x).
21
+ - **Build System**: CMake.
22
+ - **Project Structure**:
23
+ - `src/`: Core implementation.
24
+ - `tst/`: Test suites (mostly in `tst/cpp/`).
25
+ - **Debug Mode**: The `-DDEBUG_NIND` flag is automatically added in `Debug` and `RelWithDebInfo` modes to enable debug output.
26
+ - **Binary Format**: Nind uses an EBNF grammar to specify binary file formats. These are verified by Python programs (not in this repo's main source but referenced in README).
27
+
28
+ ## Toolchain Quirks
29
+
30
+ - **NIND_DIST**: This variable is mandatory for `gbuild.sh` to define the installation prefix.
31
+ - **Build Artifacts**: Builds are isolated by branch and mode in `build/<branch>/<mode>/nind`.
32
+ - **Linker Flags**: Uses `-Wl,-z,defs,--no-as-needed` to support a plugin mechanism where symbols must remain visible even if not explicitly used.
nind-2.0.3/CLAUDE.md ADDED
@@ -0,0 +1,107 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project overview
6
+
7
+ NIND ("nouvelle indexation") is a flat-file inverted-index module originally built for the `Amose` search engine (replacing the deprecated `S2` and `Lucene` indexers). It has two parallel implementations of the same binary formats:
8
+
9
+ - **C++** (`src/cpp/`): the production indexing/search libraries.
10
+ - **Python** (`src/py/nind/`): a pure-Python re-implementation used both as a standalone frontend and, per the original design intent, to independently verify the C++ binary output against the format's EBNF grammar (no shared code between the two — they are two independent readers/writers of the same file formats).
11
+
12
+ The repo is mid-refactor (branch `refactoring-for-codecommons`): the Python package was recently moved from `src/py/*.py` into a proper `src/py/nind/` package, and a new higher-level `nind_engine.py` (BM25-style search API) is being layered on top of the low-level Python classes.
13
+
14
+ The `nind` wheel additionally bundles a compiled extension, `nind._native` (pybind11 bindings over the core C++ index stack — `NindLexiconIndex`, `NindTermIndex`, `NindLocalIndex`, `NindRetrolexicon`, `NindLexicon`). This does *not* change the cross-verification design above: the pure-Python classes remain independent readers/writers with no shared code, and `nind._native` is an optional third, native code path (full read/write, unlike the read-only pure-Python classes) — see `src/cpp/NindPy/`.
15
+
16
+ ## Build & test — C++
17
+
18
+ Requires the `NIND_DIST` env var (install prefix). Build via the wrapper script, not raw `cmake`/`make` directly:
19
+
20
+ ```
21
+ NIND_DIST=/path/to/dist ./gbuild.sh # Debug build (default), builds + runs ctest + installs
22
+ ./gbuild.sh -m Release # Release or RelWithDebInfo
23
+ ./gbuild.sh -a ON # with AddressSanitizer (+ UB/leak sanitizers where supported)
24
+ ./gbuild.sh -n native # -march=native instead of generic tuning
25
+ ./gbuild.sh -p false # disable parallel build (build with -j1)
26
+ ./gbuild.sh -G Unix # use Unix Makefiles instead of Ninja
27
+ ```
28
+
29
+ Build artifacts land in `build/<git-branch>/<mode>/<project>` (isolated per branch/mode, so switching branches doesn't require a clean).
30
+
31
+ To run tests manually instead of via the full `gbuild.sh` cycle: `ctest` from inside that build directory (only applies to generators that produce a `make test`/ctest target, e.g. `Unix Makefiles`; Ninja builds skip the automatic test step in `gbuild.sh`).
32
+
33
+ `-DDEBUG_NIND` is added automatically in `Debug` and `RelWithDebInfo` modes (and in `Release` if configured with `-DWITH_DEBUG_MESSAGES=ON`) to enable conditional debug output.
34
+
35
+ ## Build & test — Python
36
+
37
+ The Python package (`nind`, in `src/py/nind`) is managed with `pyproject.toml`/`scikit-build-core` (the old `src/py/CMakeLists.txt` build path is kept only for compatibility). `uv sync`/`uv build` compiles `nind._native` (via CMake — see `src/cpp/NindPy/CMakeLists.txt`) and installs the package (editable for `sync`) plus dev dependencies (pytest) into `.venv`. Building requires a C++14 compiler; `scikit-build-core`, `pybind11`, `cmake`, and `ninja` themselves are all pulled automatically as PEP 517 build requirements (the latter two so builds work even in containers with no system CMake/Ninja, e.g. manylinux in CI) — no manual install needed.
38
+
39
+ Tests live in `tst/py/` (one file per module, mirroring `tst/cpp/unit/`), configured via `[tool.pytest.ini_options]` in `pyproject.toml`:
40
+
41
+ ```
42
+ uv sync # first time / after touching pyproject.toml or src/cpp/NindPy/**
43
+ uv run pytest tst/py -v
44
+ uv build # produce the platform wheel (nind-*.whl) + sdist in dist/
45
+ ```
46
+
47
+ `src/cpp/NindPy/CMakeLists.txt` is a standalone CMake project (separate from the top-level `CMakeLists.txt`/`gbuild.sh` flow) that compiles the relevant `NindBasics`/`NindRetrolexicon`/`NindLexicon`/`NindIndex` sources directly into the `_native` extension module — not linked against the shared libraries `gbuild.sh` produces — so the wheel ships one self-contained `.so` with no internal RPATH/dlopen. It is not wired into `gbuild.sh`/ctest; touching the core C++ sources may require rebuilding both independently.
48
+
49
+ Verification of the Python readers/writers against the C++-produced binary files (the project's original EBNF-grammar cross-check design, see README) isn't automated yet — the current suite validates the Python implementation against itself (round-trips through `nind_engine.NindIndexer`'s writers, plus hand-built fixtures for formats it doesn't write, like `.nindretrolexicon`).
50
+
51
+ ### Releasing
52
+
53
+ Version bumps are managed by `bumpver` (config: `[tool.bumpver]` in `pyproject.toml`) — it keeps `current_version` (git-tag form, `vX.Y.Z`) and the PEP 440 form in sync everywhere it appears: `[project] version` in `pyproject.toml` and every `__version__ = "..."` across `src/py/nind/`. Cutting a release is:
54
+
55
+ ```
56
+ uvx bumpver update --patch # or --minor / --major; add --dry to preview first
57
+ ```
58
+
59
+ This commits, tags (`vX.Y.Z`), and *pushes* in one step (`push = true` in config) — pushing the tag is what kicks off `.github/workflows/publish-pypi.yml`, which builds wheels for Linux/macOS/Windows (via `cibuildwheel`, using `uv` as its build frontend) plus an sdist (`uv build --sdist`), and publishes them to PyPI with `uv publish --trusted-publishing always`. That workflow authenticates via PyPI Trusted Publishing (OIDC) against the `pypi` GitHub Environment — no stored token — but this only works once the `nind` PyPI project has that repo+workflow+environment registered as a trusted publisher (pypi.org project settings → Publishing); until then the `publish` job's `id-token` exchange will fail.
60
+
61
+ ## Architecture
62
+
63
+ ### C++ library layering (`src/cpp/`)
64
+
65
+ Each subdirectory builds one shared library; dependencies flow strictly downward (see each module's `CMakeLists.txt` `target_link_libraries`):
66
+
67
+ ```
68
+ NindBasics (no deps) — NindFile: buffered binary sequential file I/O; NindPadFile: ident <-> data mapping on top of it
69
+ ^
70
+ ├── NindRetrolexicon — flat-file reverse lexicon (id -> string)
71
+ ├── NindLexicon — in-memory lexicon (asymmetric maps), NindLexiconFile for its on-disk form
72
+
73
+ NindIndex (deps: NindBasics, NindRetrolexicon)
74
+ — NindLexiconIndex/NindLexiconIndexK: lexicon as an index file (K variant uses two 32-bit keys instead of strings)
75
+ — NindTermIndex: the inverted file itself, as an index file
76
+ — NindLocalIndex: per-document local index file
77
+ — NindIndex: ties the above into a full inverted/local index file
78
+
79
+ NindAmose (deps: NindIndex, NindRetrolexicon)
80
+ — adapts nind to Amose's richer term-type model (see internal doc refs "LAT2015.JYS.448")
81
+
82
+ NindPy (deps: NindBasics, NindRetrolexicon, NindLexicon, NindIndex sources, compiled in directly)
83
+ — pybind11 bindings, built only through the Python wheel (scikit-build-core), not gbuild.sh
84
+ ```
85
+
86
+ All C++ code lives in namespace `latecon::nindex`. Class/file naming mirrors the binary format they implement (e.g. `NindLexiconIndex` reads/writes the `.nindlexiconindex` file format) — this naming convention holds across both the C++ and Python trees, so a class name tells you both its role and its file extension.
87
+
88
+ Design docs are referenced by internal report codes in file header comments (e.g. `LAT2014.JYS.440` = "nind, indexation post-S2", `LAT2015.JYS.448` = "Adaptation de l'indexation nind au moteur de recherche Amose") — these aren't in the repo, so treat the header comments above each class as the closest available spec.
89
+
90
+ Linker flags (`-Wl,-z,defs,--no-as-needed`) are set project-wide because these libraries are loaded dynamically via a plugin/factory mechanism, so symbols must stay visible even when not directly referenced by the linking binary — don't "clean up" apparently-unused exports without checking for this.
91
+
92
+ `tst/cpp/` mirrors the module structure for test binaries, but note `tst/cpp/CMakeLists.txt` currently only builds `NindIndex`, `NindSearch`, and `NindAmose` tests — the `NindLexicon`, `NindTests`, and `NindBasics` test subdirectories are commented out.
93
+
94
+ ### Python package (`src/py/nind/`)
95
+
96
+ Parallels the C++ layering with lowercase-suffixed module names for the index classes:
97
+
98
+ - `NindFile.py` — low-level binary codec. Historically read-only-oriented (the `litXxx` getters have long existed for every format), but now has a full writer counterpart too: `ejcritNombre1/3/4/5`, `ejcritNombreULat`/`ejcritNombreSLat` (both varint encodings, full tier range matching the readers and the C++ implementation), `ejcritChaine`, `ejcritZejros`.
99
+ - `NindPadFile.py` — the shared "pad file" envelope (header, indirection block(s), specifics, identification trailer); read-only, no writer (mirrors `NindBasics::NindPadFile`, but nothing in Python subclasses it as a writer the way `NindIndex`/`NindRetrolexicon` do in C++).
100
+ - `NindRetrolexicon.py`, `NindLexiconindex.py`, `NindTermindex.py`, `NindLocalindex.py` — read-only mirrors of the corresponding `NindIndex`-family C++ classes; `NindLexiconindex` is hash-bucketed (`clefB(word) % nombreIndirection`), the other two are directly indexed by id.
101
+ - `nind_engine.py` — `NindIndexer` (writer) and `NindEngine` (BM25-style search) built on top of the above. `NindIndexer` is the *only* Python writer for the index-family formats (`.nindlexiconindex`/`.nindtermindex`/`.nindlocalindex`) — it hand-rolls the binary layout directly via `NindFile`, replicating what `NindPadFile`/`NindIndex` do in C++, since there's no Python writer class to build on. It does not write `.nindretrolexicon` (not needed by `NindEngine`, which only supports simple, non-compound words).
102
+ - `Nind_*.py` at the package root — standalone CLI scripts (dump a document, convert corpora, search, diagnostics)
103
+ - `amose/` — Amose-specific conversion/parsing scripts (Lucene dump, XML-CLEF, sample corpora)
104
+
105
+ ## Binary format verification
106
+
107
+ Binary file formats are specified in EBNF grammar (see README). The intended workflow is: C++ writes the files, Python (independently implementing the same grammar) reads/checks them — this is why the Python and C++ implementations must be kept in sync at the file-format level even though they share no code.
@@ -0,0 +1,146 @@
1
+ project(nind)
2
+ cmake_minimum_required(VERSION 3.5)
3
+
4
+ option(WITH_ASAN "Enable address sanitizer" OFF)
5
+ message("WITH_ASAN=${WITH_ASAN}")
6
+ option(WITH_ARCH "Enable architecture optimizations" OFF)
7
+ message("WITH_ARCH=${WITH_ARCH}")
8
+ option(WITH_DEBUG_MESSAGES "Enable debug messages" OFF)
9
+ message("WITH_DEBUG_MESSAGES=${WITH_DEBUG_MESSAGES}")
10
+
11
+ include(SystemSpecificInformations.cmake)
12
+
13
+
14
+ message("System name is ${CMAKE_SYSTEM_NAME}")
15
+ if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
16
+ message("Linux flags")
17
+
18
+ # In debug mode, adds the -DDEBUG_INDEX to the compiler command line.
19
+ # Allows to build with conditionally built debug output
20
+ set(DEBUG_FLAGS "-DDEBUG_NIND")
21
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEBUG_FLAGS}" )
22
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${DEBUG_FLAGS}" )
23
+ if (WITH_DEBUG_MESSAGES)
24
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${DEBUG_FLAGS}" )
25
+ endif()
26
+
27
+ if (WITH_ARCH)
28
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
29
+ else()
30
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse4.2")
31
+ endif()
32
+
33
+ # Flags needed for the plugins mechanism to work: our libs are dynamically loaded by
34
+ # factories, thus their symbols must be known even if not used by the binary
35
+ set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,defs,--no-as-needed")
36
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,defs,--no-as-needed")
37
+ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,defs,--no-as-needed")
38
+
39
+ include(CheckCXXCompilerFlag)
40
+ CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_STDCPP0X)
41
+ CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STDCPP11)
42
+ CHECK_CXX_COMPILER_FLAG(-std=c++14 HAVE_STDCPP14)
43
+ CHECK_CXX_COMPILER_FLAG(-fsanitize=undefined HAVE_SANITIZE_UNDEFINED)
44
+ CHECK_CXX_COMPILER_FLAG(-fno-omit-frame-pointer HAVE_NO_OMIT_FRAME_POINTER)
45
+ if (HAVE_NO_OMIT_FRAME_POINTER)
46
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
47
+ endif()
48
+
49
+ if (HAVE_STDCPP14)
50
+ message("C++14 supported ")
51
+ set(CMAKE_CXX_STANDARD 14)
52
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
53
+ set(CMAKE_CXX_EXTENSIONS OFF)
54
+ elseif (HAVE_STDCPP11)
55
+ message("C++11 supported")
56
+ set(CMAKE_CXX_FLAGS "-std=c++11 -DBOOST_NO_HASH ${CMAKE_CXX_FLAGS}")
57
+ CHECK_CXX_COMPILER_FLAG(-Wsuggest-override HAVE_SUGGEST_OVERRIDE)
58
+ if (HAVE_SUGGEST_OVERRIDE)
59
+ # set(CMAKE_CXX_FLAGS "-Wsuggest-override -Werror=suggest-override ${CMAKE_CXX_FLAGS}")
60
+ set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}")
61
+ endif()
62
+ elseif (HAVE_STDCPP0X)
63
+ message("C++0x supported")
64
+ set(CMAKE_CXX_FLAGS "-std=c++0x -DBOOST_NO_HASH ${CMAKE_CXX_FLAGS}")
65
+ else ()
66
+ message("C++0x NOT supported")
67
+ set(CMAKE_CXX_FLAGS "-DNO_STDCPP0X ${CMAKE_CXX_FLAGS}")
68
+ endif ()
69
+ set(CMAKE_CXX_FLAGS "-W -Wall ${CMAKE_CXX_FLAGS}")
70
+
71
+ if (WITH_ASAN)
72
+ # NOTE: check -fsanitize=address flag failed if this flag is not set also
73
+ # for the linker (use CMAKE_REQUIRED_FLAGS to set linker flag for
74
+ # CHECK_CXX_COMPILER_FLAG macro).
75
+ set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
76
+ set(CMAKE_REQUIRED_FLAGS "-fsanitize=address")
77
+ CHECK_CXX_COMPILER_FLAG(-fsanitize=address HAVE_SANITIZE_ADDRESS)
78
+ set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
79
+ if (HAVE_SANITIZE_ADDRESS)
80
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
81
+ endif()
82
+ CHECK_CXX_COMPILER_FLAG(-fsanitize=undefined HAVE_SANITIZE_UNDEFINED)
83
+ if (HAVE_SANITIZE_UNDEFINED)
84
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined")
85
+ endif()
86
+ CHECK_CXX_COMPILER_FLAG(-fsanitize=leak HAVE_SANITIZE_LEAK)
87
+ if (HAVE_SANITIZE_LEAK)
88
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=leak")
89
+ endif()
90
+ endif ()
91
+
92
+ set(LIB_INSTALL_DIR "lib")
93
+ else ()
94
+ message("Windows flags")
95
+ add_definitions(-D WIN32)
96
+
97
+ # By default, do not warn when built on machines using only VS Express:
98
+ if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
99
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
100
+ endif ()
101
+
102
+ set(CMAKE_C_FLAGS "/Zc:wchar_t- /EHsc /GR ${CMAKE_C_FLAGS}")
103
+ set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /EHsc /GR /W4 /MP /FAu ${CMAKE_CXX_FLAGS}")
104
+
105
+ set(LIB_INSTALL_DIR "bin")
106
+ endif ()
107
+
108
+
109
+ enable_testing()
110
+
111
+ add_subdirectory(src)
112
+ add_subdirectory(tst)
113
+
114
+ install(FILES NindConfig.cmake DESTINATION share/apps/nind/cmake/Modules)
115
+
116
+ ########### packaging ###############
117
+ INCLUDE(InstallRequiredSystemLibraries)
118
+
119
+ set(CPACK_MONOLITHIC_INSTALL 1)
120
+ set(CPACK_PACKAGE_NAME "nind")
121
+ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Nind Inverted file index")
122
+ set(CPACK_PACKAGE_VENDOR "Latejcon")
123
+ set(CPACK_PACKAGE_CONTACT "Jean-Yves Sage <jean-yves.sage@orange.fr>")
124
+ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
125
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE.md")
126
+ set(CPACK_PACKAGE_VERSION_MAJOR "0")
127
+ set(CPACK_PACKAGE_VERSION_MINOR "1")
128
+ set(CPACK_PACKAGE_VERSION_PATCH "0")
129
+ SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
130
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "nind-${AMOSE_VERSION_MAJOR}.${AMOSE_VERSION_MINOR}")
131
+ set(CPACK_STRIP_FILES "")
132
+ set(CPACK_SOURCE_STRIP_FILES "")
133
+ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
134
+ set(CPACK_GENERATOR ${SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR})
135
+
136
+
137
+ set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
138
+
139
+ # set of commands to define component based packaging
140
+ # notify cpack of component all names
141
+ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "runtime")
142
+ SET(CPACK_COMPONENTS_ALL lib devel runtime)
143
+ set(CPACK_RPM_COMPONENT_INSTALL ON)
144
+ set(CPACK_DEB_COMPONENT_INSTALL ON)
145
+
146
+ INCLUDE(CPack)
@@ -0,0 +1,22 @@
1
+ FROM debian:11
2
+
3
+ ARG TRAVIS_JOB_NUMBER
4
+
5
+ # Setup
6
+ RUN apt-get update -y -qq
7
+ RUN apt-get install -y apt-utils build-essential file wget bzip2 git gcc g++ cmake cmake-data ninja-build qtbase5-dev-tools qtdeclarative5-dev -qq
8
+
9
+
10
+ RUN mkdir -p /src/
11
+ RUN git clone https://github.com/aymara/nind /src/nind
12
+
13
+ RUN mkdir -p /src/nind/build
14
+
15
+ # Build
16
+ WORKDIR /src/nind/build
17
+ RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
18
+ RUN ninja package
19
+ RUN install -D /src/nind/build/nind-0.1.0.deb /usr/share/apps/nind/packages/nind-0.1.0-debian11.deb
20
+
21
+ # install github-release to be able to deploy packages
22
+ RUN /usr/bin/wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && /bin/tar xjf linux-amd64-github-release.tar.bz2 && /bin/cp bin/linux/amd64/github-release /usr/bin
@@ -0,0 +1,20 @@
1
+ FROM debian:9.4
2
+
3
+ ARG TRAVIS_JOB_NUMBER
4
+
5
+ # Setup
6
+ RUN apt-get update -y -qq
7
+ RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
8
+ RUN mkdir -p /src/
9
+ RUN git clone https://github.com/aymara/nind /src/nind
10
+
11
+ RUN mkdir -p /src/nind/build
12
+
13
+ # Build
14
+ WORKDIR /src/nind/build
15
+ RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
16
+ RUN ninja package
17
+ RUN install -D /src/nind/build/nind-0.1.0-Linux.deb /usr/share/apps/nind/packages/nind-0.1.0-debian9.4.deb
18
+
19
+ # install github-release to be able to deploy packages
20
+ RUN /usr/bin/wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && /bin/tar xjf linux-amd64-github-release.tar.bz2 && /bin/cp bin/linux/amd64/github-release /usr/bin
@@ -0,0 +1,20 @@
1
+ FROM ubuntu:16.04
2
+
3
+ ARG TRAVIS_JOB_NUMBER
4
+
5
+ # Setup
6
+ RUN apt-get update -y -qq
7
+ RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
8
+ RUN mkdir -p /src/
9
+ RUN git clone https://github.com/aymara/nind /src/nind
10
+
11
+ RUN mkdir -p /src/nind/build
12
+
13
+ # Build
14
+ WORKDIR /src/nind/build
15
+ RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
16
+ RUN ninja package
17
+ RUN install -D /src/nind/build/nind-0.1.0-Linux.deb /usr/share/apps/nind/packages/nind-0.1.0-ubuntu16.04.deb
18
+
19
+ # install github-release to be able to deploy packages
20
+ RUN /usr/bin/wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && /bin/tar xjf linux-amd64-github-release.tar.bz2 && /bin/cp bin/linux/amd64/github-release /usr/bin