# Vendored geogst

This directory is a verbatim copy of the `geogst` package, taken from the release
below. Do not edit it in place: make the change in geogst, release it, and
re-sync, or the next sync will quietly throw the change away.

    version  2.3.1
    tag      v2.3.1
    commit   fc17da5b13bc072628c0fbcb0eeb366757d2be79
    dated    2026-08-26
    source   https://gitlab.com/mauroalberti/geogst

`spatdata/` is left out on purpose. It carries the tutorial datasets, some 50 MB
of DEMs and shapefiles, and nothing in qgSurf outside this directory reads it.

To check the copy still is what it says it is, against a geogst checkout at the
tag above:

    diff -rq --strip-trailing-cr --exclude=__pycache__ --exclude=VENDORED.md \
        external/geogst /path/to/geogst/geogst

`--strip-trailing-cr` is not optional. This repository normalises line endings -
`.gitattributes` says `* text=auto eol=lf` - and geogst does not: a few of its
files are stored with CRLF, so on any fresh clone a byte comparison calls them
different while the code is the same. scripts/check_vendored_geogst.sh does this
for you.

It should name `spatdata` and nothing else:

    Only in /path/to/geogst/geogst: spatdata

Any second line means the copy has drifted. Note that `diff` exits 1 whenever it
reports anything, this expected line included, so a script checking this wants to
compare the output rather than the exit code - and that the wording is localised
(`Solo in` under an Italian locale), so match on `spatdata`, not on `Only`.

## Why this file exists

The three packages beside this one - affine, apsg, mplstereonet - each declare a
`__version__` in their `__init__.py`. geogst does not: its version comes from
setuptools-scm, which reads it off a git tag when the package is built, so a
vendored copy of the source carries no version at all. Without this file there
is no way to tell, from the directory alone, which geogst this is.

The provenance is recorded here rather than as a `__version__` line inside
`__init__.py` because that added line would break the byte-for-byte identity with
the released package - which is the very thing the check above relies on.

This file sits inside the copied directory, not next to it, so that a re-sync
that replaces the directory wholesale shows up in `git status` as a deletion.
A marker that disappears loudly is better than one that goes stale in silence.

Last synced: 2026-08-26.
