Repository navigation
Say in AGENTS.md how to get the data, build and run the examples - #34
Merged
Merged
Conversation
AGENTS.md now opens with "Run the examples", which takes a fresh clone to the output of the on-premise Device Detection and IP Intelligence getting-started examples in order. It covers the prerequisites for building the native engines, the free data files in the layout on rc today and in the cxx/data layout that #28 brings, the virtual environment and install commands the product READMEs give, how each example finds its data file, what the output looks like, the resource keys the cloud examples read, and the pitfalls found in the repository. The Releases section from #29 is added with the same text in the same place, so either pull request merges cleanly after the other.
#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:25
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.
Merge order
Merge this after #28, which moves the examples and tests to the data
repository in
cxx/dataand removesip-intelligence/ip-intelligence-data.The run steps here describe only that layout, so they are wrong on
rcuntil#28 is in.
Why
AGENTS.mdheld notes for changing the code, and nothing on running anexample. Someone new to the repository, asked only to get an example running
and show it, had to piece the steps together from the root README, two product
READMEs, the package READMEs, the CI scripts and the example sources, and
would meet the problems listed under "Pitfalls" by trial and error.
What changes
AGENTS.mdopens with a new section, "Run the examples", in the same shape asthe one in 51degrees-cxx#98,
for the on-premise
gettingstarted_consoleof Device Detection and of IPIntelligence.
to 3.14 (
ci/options.json). The compiler requirements are the DeviceDetection README's, with C11 and C++17 from the
-std=gnu11and-std=gnu++17flags in the on-premisesetup.pyfiles. A compiler isneeded even from PyPI, because PyPI has only source distributions of
fiftyone-devicedetection-onpremise(4.5.100) andfiftyone-ipintelligence-onpremise(4.5.1), as its JSON API lists. Thedata file tools are the ones the data repository's scripts need,
curl,gzipandmd5sum(md5on macOS) on Linux and macOS, and WindowsPowerShell 5.1 or PowerShell 7 on Windows.
cxx/data, andcxx/data/get-data-files.shorget-data-files.ps1downloads them, as Read the data files from the data repository in cxx/data #28's README says. On Windows the step runs the script
with
powershell -NoProfile -ExecutionPolicy Bypass -File, as__downloadin both
example_utils.pyfiles does, because the policy Windows sets bydefault can refuse a script file.
("Build from Source") and the IP Intelligence README ("From source") give,
run in a virtual environment as CI runs the examples
(
device-detection/ci/run-integration-tests.ps1).requirements.txtisinstalled first, as
device-detection/setup.ps1does, withsetuptools,which
ip-intelligence/ci/setup-environment.ps1installs because Python3.12 and later no longer do.
find_filein the Device Detectionexample_utils.pylooks forcxx/data/device-detectionin the workingfolder and each folder above it, and downloads the Lite file there when it
is missing, so the example runs from the root with no argument. With no
argument, the IP Intelligence example looks for the Asn file in
.,assetsandcxx/data/ip-intelligenceof the working folder and the sevenabove it, and downloads it the same way. A path given as the first argument
is used as it is (
mainin eachgettingstarted_console.py), so the LiteIP Intelligence file is downloaded with the script before it is given.
gettingstarted_console.pyfiles, bothexample_utils.pyfiles, bothexample_constants.pyfiles andpipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/logger.py,which logs through Python's
logging.mainandexample_utils.py. The Device Detection key link is theconfiguration
1QWJwHxlthat the example's own error message names.C:\tmpworkaround in
device-detection/ci/run-integration-tests.ps1and theREADME's
pipenv installwith noPipfileanywhere.The second commit removes what the first said about the layout
rchadbefore #28, being the steps for the old data submodules and Git LFS, the
committed Asn file, the choice between two layouts, the Git LFS pointer
pitfall and the line endings pitfall. The data repository's
.gitattributeskeeps its shell script and its links LF, so the line endings pitfall no longer
applies. The search pitfall now describes running outside the repository or
without the submodules, the only cases in which the Device Detection example
still searches.
The "Releases" section from #29 is added with the same text in the same
place. Every other section is unchanged. #28 rewrites the "Submodules" notes
further down, which this pull request leaves alone.
How it was checked
Read the data files from the data repository in cxx/data #28's head (5e5ba20), being both
example_utils.pyfiles, bothgettingstarted_console.pyfiles, bothexample_constants.pyfiles, bothci/fetch-assets.ps1files and the IP Intelligence example tests, andagainst the data repository at the commit cxx 4.5.103 pins (e448dcf) for
the scripts and their options.
git merge-treemerges this branch with Read the data files from the data repository in cxx/data #28's head, with Describe the rc approach to releases in AGENTS.md #29's head(a9732af) and with
rc, each with no conflict, and the mergedAGENTS.mdnames neither old data folder.
AGENTS.mdalone.Commands that neither CI nor the README gives
python3 -m venv .venvand its activation. CI makes a virtual environmentfor the examples with
python3 -m venv .virtualenvand calls its Pythondirectly.
python -m pip install -r requirements.txt setuptools, which joins whatdevice-detection/setup.ps1andip-intelligence/ci/setup-environment.ps1install.
resource_key=<key>in front of the IP Intelligence cloud example, as theDevice Detection README writes it for its own.
Wrong outside AGENTS.md, left for another change
device-detection/readme.mdrecommends Pipenv, and there is noPipfilein the repository.
Still to do
files. A run from a fresh clone, following only
AGENTS.md, is the check.