Stellarium is constantly benefiting from open source artifacts and being enriched with text/data/source files that are copy-pasted from places outside Stellarium.
This document discusses vendor branching issues in Stellarium.
The Stellarium project regularly "copy-pastes" files from the outside.
An attempt was made to bring the attention to the issue in this discussion.
A solution to this problem is called Vendor Branching.
Often this will be easier than CPM. For example, read the root MAINTAINER_BUSINESS.md; notice that the proposed approach becomes complicated when changes need to be made.
Please note: this was a common, if not standard approach by most contributors.
Notice how it is not always obvious to trace back original files. In the case of ephemeride routines, these reside in "ancient", core Stellarium files, it is extremely likely that they were copied (and maybe recent changes have been manually and painfully incorporated in Stellarium). One aspect of the recommended vendor branch procedure details how to include such meta information so as to help find back the (original, root) source at all times.
All URLs below link to the master version, which - ideally - may have dealt with the VB issue...
Here are several existing artifacts that (still) get copy-pasted in Stellarium:
jpleph.cpp, elp82b.h, gust86.h, htc20b.c and vsop87.c). Their vendor is JPL and VSOP (FTP).VSOP87 is outdated, but the approach remains the same for VSOP2013 (as well as JPL).
The data available as VSOP FTP has - a long time ago - been manually (and heroically) merged/transformed into a sourcecode file. Such a transformed file is very difficult to update should a change appear in the original. Note that the current VSOP87 artifacts seem to be the ultimate (maybe only) version (and at first sight there were no modifications - wow, code without bugs...), later ephemeris iterations seem to take a different approach (eg VSOP2010, VSOP2013 using Chebyshev polynomials rather than elliptic elements). In 2013 (after VSOP2013), a small change happened in VSOP2010; such a change could have been identified with correct vendor branching (but was also announced.
Including the raw data files would be ideal, but a massive overkill with an unacceptable impact on executable size as well as startup time.
A solution could be to use scripts that process the original data files available via ftp, and convert the data files in a form than can be included in Stellarium; this is what very likely occurred when creating vsop87.c: notice how that file is in fact a huge data file with a small executable "appendix". Scripts should be run that "somehow" transform the VSOP data files into an .hpp file that is then included in the vsop87.c file, that in itself refers to the example Fortran code that will be managed in the vendor branch (see below). Normally, generated files (such as the proposed .hpp) should not be versioned, but it would be too heavy to put the burden to recompile those files every time. Instead, the generation should be left to the core Stellarium team. The generated header file should certainly bear a big warning "THIS IS A GENERATED FILE" (with sufficient explanation by what script it was generated).
What belongs in the vendor branch of (eg) VSOP2013 (e.g. branch AND directory vendor/IMCCE.FR/ephem/planets/VSOP/2013) ?
.f)These files describe formats and algorithms and therefore represent the essential documentation that developers need in order to maintain the transformation scripts and .C files, without having to dig for them on the Internet (assuming these will not disappear...). (It is unlikely that these files will change, nevertheless they are managed by an outside entity and therefore should be tracked with a vendor branch.)
Optionally, a copy of the data files could be stored at Stellarium-data, but we may assume that IMCCE (L’Institut de mécanique céleste et de calcul des éphémérides) can offer sufficient guarantees to maintain the data for a very long time.
A typical example is the set of JPL DExxx development ephemerides, that are accompanied by important documentation that is to be stored in the vendor branch too:
Should any of those "other readers" be used in any way in Stellarium, then these belong in separate vendor branches.
The vendor branch approach could also works for users that want to keep track of other user's configuration data (e.g. Ocular config) or scripts while at the same time apply local changes. However, this works better for file formats that are easily merged because being insensitive to line numbers, such as YAML or - even better, but neither are supported by Qt - KVN; a bad example is the (Qt backed) INI numbering format (e.g. Ocular config files). An improvement is to use Qt XML. See also https://www.surfsidemedia.in/post/what-are-some-alternatives-to-ini-files-for-configuration-management.
parse_hip_catalog.pysimbad_query_hipsaohdhr.pypy/geodesic.py
Note: Henry Leung - whose repo is forked by SceneryMC - has a bad habit of renaming files. This makes vendoring more difficult although Git should be able to handle it.
A branch has been pushed here to convert the Gaia DR3 PR to a "vendor compliant" approach.
Some random googling shows that the VB problem exists in other projects too (e.g. Celestia):
https://github.com/Stellarium/stellarium/wiki/Branching-Strategy (defunct but a copy exists)
https://github.com/Stellarium/stellarium/issues?q=vendor_branching
Maybe https://github.com/Stellarium/stellarium/issues?q=label%3A%22dependencies%22
https://github.com/Stellarium/stellarium/issues/5170#issuecomment-6446431672
contributing sky cultures, landscapes, scripts
https://github.com/CelesTrak/fundamentals-of-astrodynamics/discussions/173