Repository navigation
Read the data files from the data repository in cxx/data - #28
Merged
Merged
Conversation
Between 4.5.100 and 4.5.102, 51degrees-cxx removed the two EngineHash process overloads and the three EngineIpi process overloads that take required property indexes. The committed wrappers still called them, so neither on-premise package compiled against 4.5.102, which the nightly submodule update brings in #26. This moves the cxx submodule from 4110d681, the 4.5.100 release, to 1bec7b57, the 4.5.102 release, and generates hash_python_wrap.cxx, DeviceDetectionHashEngineModule.py, ipi_python_wrap.cxx and IpIntelligenceEngineModule.py again with SWIG 4.4.1 built from its v4.4.1 tag. Run against 4110d681, the same command gives files byte for byte the same as the ones committed before, so every difference here comes from cxx. Both engines call only process(evidence), which cxx keeps.
The examples, tests, packaging and CI now read the data files from cxx/data/device-detection and cxx/data/ip-intelligence. That is the data repository, which cxx has as a submodule. They no longer read cxx/device-detection-data, or this repository's own ip-intelligence/ip-intelligence-data submodule, which is removed. - cxx moves to f03dbfd6, the head of its pull request that adds the data submodule. - The examples' shared helpers, the two example_utils.py files, run the data repository's script for a linked file that is missing, then look again, and print the command if the file is still missing. - The device detection helper looks in cxx/data/device-detection before searching by file name, so it does not pick up an older copy with the same name. - CI downloads the ASN file with the data repository's script, because it is now a link rather than a committed file. - AsnDataFileTests replaces CommittedDataFileTests and checks that the downloaded ASN file is present and opens. - The translation package copies its YAML files from cxx/data/ip-intelligence/Translations, and a new test checks that the built package holds them. - The web example and the on-premise readme no longer link the Azure blob storage. They use the data repository's script, or the Distributor's free download. - The two ExtraPaths entries for the removed submodule are removed, because a folder inside cxx never shows in this repository's diffs.
This was referenced Nov 4, 2026
rc has taken the regenerated SWIG wrappers (#27), release #30 and the nightly submodule update (#26) since this branch started. This branch already held the commits of #27, with the same result, so the wrappers merge cleanly. - cxx stays at f03dbfd6. rc has 1bec7b57, the 4.5.102 release, and f03dbfd6 is 9 commits ahead of it with nothing changed under src/, so it has the same sources plus the data submodule. - ip-intelligence/ip-intelligence-data stays removed. The nightly moved it to b8b3d7d4, which only adds a workflow to that repository, and this branch reads the IP Intelligence data from cxx/data instead. - js_templates takes the nightly's move to c773ce22.
cxx moves from f03dbfd6, the head of the cxx change that adds the data submodule (51Degrees/51degrees-cxx#96), to e866f6d3, the 4.5.103 release on cxx main that carries it. Both have the same src/ tree and the same data, device-detection-data and ip-intelligence-data commits, so nothing this repository builds or reads changes. They differ only in cxx's AGENTS.md, README.md and two C Hash examples. The nightly submodule update moves cxx to the head of cxx main, which now has the data folder.
jwrosewell
added a commit
that referenced
this pull request
Nov 4, 2026
#28 moves the examples and tests to the data repository in cxx/data, and removes ip-intelligence/ip-intelligence-data, and merges before this. The run steps now give only that layout. The steps and pitfalls for the old data submodules and Git LFS are gone, and so is the choice between two layouts. Both examples, run with no argument, look for cxx/data from the folder they run in upwards and download a missing file, and a path given as the argument is used as it is. So the Device Detection example now runs with no argument, and the Lite IP Intelligence file is downloaded before it is given. The Asn file is a download now, not a committed file. The line endings pitfall is gone, because the data repository keeps its shell script LF.
jwrosewell
marked this pull request as ready for review
November 4, 2026 17:24
Merged
jwrosewell
added a commit
that referenced
this pull request
Nov 4, 2026
Releases what has collected on `rc` since #30: - [#26](#26) Update submodules - [#28](#28) Read the data files from the data repository in cxx/data - [#34](#34) Say in AGENTS.md how to get the data, build and run the examples - [#35](#35) Point package metadata and package READMEs at the right pages - [#32](#32) Ask the country property for its no value message in the location example - [#29](#29) Describe the rc approach to releases in AGENTS.md - [#31](#31) Check the callback URL before the JavaScript builder writes it - [#36](#36) Let FlowData and pipelines release native memory, and close them in the tests and examples ## Release note From [#36](#36): - `FlowData` and `Pipeline` now have `close()` and work in a `with` statement. Closing a FlowData releases the native results its element data holds. Closing a pipeline closes its flow elements, unless it was built with `auto_close_elements` set to false. - The on-premise Device Detection and IP Intelligence packages now require `fiftyone_pipeline_core>=4.5.42` and `fiftyone_pipeline_engines>=4.5.42`, the versions this release publishes with `close()`. ## Notes The cxx submodule moves from [4.5.102](https://github.com/51Degrees/51degrees-cxx/releases/tag/4.5.102) to [4.5.103](https://github.com/51Degrees/51degrees-cxx/releases/tag/4.5.103). That release adds the [data](https://github.com/51Degrees/data) repository at `cxx/data` and changes nothing under `src/`. No commit asks for a major or minor version change, so the publish moves only patch numbers. The last release into `main` was #30, merged at 09:23 UTC on 4 November 2026.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
This moves the examples, tests, packaging and CI from the old device-detection-data and ip-intelligence-data repositories to the public data repository. It is step 4 of the run book in 51Degrees/data#1 (version 2), and it moves every link to the old Azure blob storage to the data repository's script or the Distributor.
The data repository reaches this repository through cxx, as the
cxx/datasubmodule. Each free data file there is a<file>.linkholding the address it is downloaded from, andget-data-files.ps1andget-data-files.shat its root download them.cxxmoves to e866f6d3, the 4.5.103 release on cxxmain, which carries the cxx change that adds the data submodule (Add the data repository as a submodule and move the examples, tests and CI to it 51degrees-cxx#96). This repository's ownip-intelligence/ip-intelligence-datasubmodule is removed from.gitmodulesand from the index.cxx/device-detection-datapath is nowcxx/data/device-detection, indevice-detection/ci/fetch-assets.ps1, the device detection on-premise tests,fiftyone_devicedetection/examples/gettingstarted.pyandperformance.py. Everything that readip-intelligence/ip-intelligence-datanow readscxx/data/ip-intelligence. That is the translation package'ssetup.pyandresources.py, the on-premise test constants and the IP Intelligenceexample_utils.py.example_utils.py, so no example has its own copy. When a file isn't found and<file>.linkis in the data folder, the helper prints the command and runs it. On Windows that ispowershell -NoProfile -ExecutionPolicy Bypass -File <data>\get-data-files.ps1 <file> -Source examples-51degrees-python, and elsewheresh <data>/get-data-files.sh -s examples-51degrees-python <file>. Then it looks again. If the file is still missing, the helper prints the command to run and returnsNone, and the example prints its own message.cxx/data/device-detectionfirst. It used to search the whole tree by file name and take the first match. cxx keeps its olddevice-detection-datasubmodule for one release. In CI, and in any clone without Git LFS, the files there are Git LFS pointers with the same names. So the helper now checkscxx/data/device-detection, in the working directory and each folder above it, before that search.device-detection-dataorip-intelligence-datasubmodule now say to get the data submodule withgit submodule update --init --recursiveand run the example again. The age warnings name the download script. The device detection readme's Git LFS steps are replaced by the script.51ddatafiles.blob.core.windows.net. The web example now looks for51Degrees-LiteV41.ipi, the name the data repository links the Lite file under, so it downloads the file as the other examples do.LITE_DATAFILE_NAMEinfiftyone_ipintelligence_sharedchanges to that name. Nothing else in the repository uses that constant. The readme gives the script, and gives the Distributor's free download https://distributor.51degrees.com/api/v2/free/ipi-lite-v41 for anyone without a checkout.51Degrees-IPIV4AsnIpiV41.ipiwas committed to ip-intelligence-data and is now a link.ip-intelligence/ci/fetch-assets.ps1downloads it with the data repository's script.device-detection/ci/fetch-assets.ps1runs the script for its folder after linking in the assets, which the script keeps, as cxx does.CommittedDataFileTestsis nowAsnDataFileTests. It checks that the downloaded ASN file is present, and fails with the command that gets it if not. Then it checks the engine opens the file. The Distributor always serves the latest ASN file, so the test now fails when the engine can't read the format 51Degrees publishes.ci/packages.json. The twoExtraPathsentries for the removed submodule are removed rather than renamed. A folder insidecxxnever shows in this repository's diffs, socxx/data/ip-intelligencewould match nothing. Namingcxxitself would make a cxx update test only IP Intelligence, becauseResolve-AffectedProductscounts a path in a package's folders as touching only that package's product and the products that depend on it. So a cxx update releases neither package, just as it already releases neither on-premise package.AGENTS.mdnow says so.AGENTS.mdand the product readmes describe the new layout.The translations in the built package
setup.pycopies the YAML files from../../cxx/data/ip-intelligence/Translations, relative to itself. It still returns early when that folder is missing, because a build from the source distribution has nocxxfolder but already holds the files. It still ignores errors while copying, too. So a wrong path would build a package without the YAML files, and give no error.The new test
PackagedTranslationsTests.test_translations_are_packagedchecks that the package itself holdscountrycodes.en_GB.ymlandcountries.de_DE.yml. tox builds a wheel and installs it before the tests run, so in the full build this test reads the installed package. The other translation tests can't show this on their own. When the package holds no YAML files,resources.pylooks forcxx/data/ip-intelligence/Translationsin up to eight folders above the installed package, and that search can reach the checkout.At e866f6d3, cxx pins data at e448dcf, a commit on data's
main. It hasip-intelligence/Translations/countrycodes.en_GB.ymland 16 files inip-intelligence/Translations/OSM, which is whatsetup.pycopies.Merging
rcinto this branchrcmoved on after this branch was made. It took the regenerated SWIG wrappers (#27) and released them in #30, and the nightly submodule update (#26) moved two submodules. The merge commit fd49236 brings those in. Two paths conflicted, both of them submodules.rccxxip-intelligence/ip-intelligence-datacxx. f03dbfd6 is 9 commits ahead of 1bec7b57 and none behind, with the samesrc/tree (e2adedf2). So it has the 4.5.102 sourcesrcmoved to, plus thedatasubmodule this change needs.ip-intelligence/ip-intelligence-data. The nightly's move only adds.github/workflows/only-rc-into-main.ymlto that repository (compare). This change reads the IP Intelligence files fromcxx/data/ip-intelligenceinstead, so the submodule stays removed.The rest merged without conflict.
rc(4fc6676). So both sides made the same change.js_templatestakes the nightly's move from d3f96049 to c773ce22, which changes only the workflows and README of javascript-templates (compare).After the merge, the tree differs from ce3e12f, this branch's last commit before the merge, only in
js_templates. The diff againstrcis the same 44 files as before.The cxx release
cxx released the data submodule change to
mainin its release pull request (51Degrees/51degrees-cxx#103), as e866f6d3, tagged 4.5.103. The commit after the merge, 5e5ba20, movescxxfrom f03dbfd6 to e866f6d3. The two have the samesrc/tree (e2adedf2), the same.gitmodules, and the samedata(e448dcf),device-detection-dataandip-intelligence-datacommits. They differ only in cxx'sAGENTS.md,README.md,examples/dd/C/Hash/GettingStarted.candexamples/dd/C/Hash/OfflineProcessing.c. This repository reads onlycxx/srcandcxx/data, so nothing it builds or reads changes. cxxmainnow has thedatafolder, so the nightly submodule update, which movescxxto the head of cxxmain, keeps it.Order
Nothing has to merge first any more.
rcand released in Release candidate #30.cxxhere points at that release.What was checked
device-detection-data,ip-intelligence-data,51ddatafiles,blob.core.windows, Git LFS andCommittedDataFile. What remains is the README note for old clones and one code comment about LFS pointers. The two.gitattributesfiles still mark built.soand.pydfiles for Git LFS. No tracked file matches them and they have nothing to do with the data, so they are unchanged.git diff --name-only ce3e12f~1 ce3e12f -- cxxlistscxx, andgit diff --name-only ce3e12f~1 ce3e12f -- cxx/data/ip-intelligencelists nothing.rcand e866f6d3 (4.5.103) all have thesrc/tree e2adedf2, so the wrappers Generate both SWIG wrappers again for 51degrees-cxx 4.5.102 #27 generated for 4.5.102 still apply. f03dbfd6, cxxrcand e866f6d3 all pin data at e448dcf.--recurse-submodulesand then runsgit submodule update --init --recursive, in the configure job that fills the asset cache and in every build job. Socxx/dataand its scripts are there whenfetch-assets.ps1runs.fetch-assets.ps1scripts parse in PowerShell 7. Line endings are unchanged.rc(run 41807348984) suite by suite on all 15 legs, with the same number of tests skipped in each suite. The one difference is the translation package's tests, 26 passed rather than 25, which is the newtest_translations_are_packaged.cxxpointer, to a commit with the samesrc/tree and data as f03dbfd6.Still to do
git clone --recurse-submodules, running the download script and then each getting-started example, and running each example with its files deleted. This hasn't been tried.main, the ASN file can come from the asset cache instead.gettingstarted_web/app.py. This changes the error message inmain(), and Let FlowData and pipelines release native memory, and close them in the tests and examples #36 puts the two lines after it insidewith build_pipeline(data_file):. Whichever merges second keeps both.ip-intelligence/ip-intelligence-datain$NativePathsinci/select-options.ps1. That path is gone once this merges, andcxxalready counts on its own.