Skip to content

Instantly share code, notes, and snippets.

@edgarcosta
Created February 3, 2026 02:25
Show Gist options
  • Select an option

  • Save edgarcosta/5e2029f79879550b925cbf3bd145cd7e to your computer and use it in GitHub Desktop.

Select an option

Save edgarcosta/5e2029f79879550b925cbf3bd145cd7e to your computer and use it in GitHub Desktop.

MAGMA Repository Structure for Git

Overview

Flatten the SVN-era Prog/ wrapper, convert SVN directory copies to proper Git refs, and reorganize for clarity.

Current → New Mapping

Current Path New Path Notes
Prog/src/ src/ Flatten to root
Prog/package/ package/ Flatten to root
Prog/nonexport/package/ package/Internal/ Merge into main package tree
Prog/nonexport/test/ test/Internal/ Merge into main test tree
Prog/test/ test/ Flatten to root
Prog/libs/ data/ Rename; large files via Git LFS
Prog/scripts/ scripts/ Flatten to root
Prog/mach/ config/ Rename; prune personal configs
Prog/doc/ doc/internal/ Merge under unified doc/
Prog/release/ doc/release/ Move under doc/
Doc/Magma-HB/ doc/handbook/ Merge under unified doc/
Doc/Over/ doc/overview/ Merge under unified doc/
Doc/Rel/ doc/release-notes/ Merge under unified doc/
Doc/Web/ doc/web/ Merge under unified doc/
Doc/Info/ doc/info/ Merge under unified doc/
Doc/Par/ doc/parallel/ Merge under unified doc/
Web/ web/ Lowercase
Tags/* Git tags V2.28-4 → tag v2.28-4
Export/* Git branches V2.28 → branch export/v2.28
Branches/* Git branches allan → branch dev/allan

New Structure

magma/
│
├── src/                            # C source (264 modules, ~6200 .c files)
│   ├── INCLUDE/                    #   Global headers, enums, includes
│   ├── alg/                        #   Core type system, binding
│   ├── bind/                       #   MAGMA binding interface
│   ├── ring/                       #   Ring infrastructure
│   ├── matrix/                     #   Matrix operations
│   ├── ff/                         #   Finite fields
│   ├── lll/                        #   Lattice reduction
│   ├── dpoly/                      #   Distributed polynomials
│   ├── ec/                         #   Elliptic curves
│   ├── group/                      #   Group operations
│   ├── ...                         #   (all other modules unchanged)
│   └── Makefile
│
├── package/                        # MAGMA intrinsics (~3500 .m files)
│   ├── Algebra/                    #   Abstract algebra
│   ├── Aggregate/                  #   Sets, lists, sequences
│   ├── Code/                       #   Coding theory
│   ├── Commut/                     #   Commutative algebra
│   ├── Forms/                      #   Quadratic forms
│   ├── Geometry/                   #   Computational geometry
│   ├── Group/                      #   Group theory
│   ├── HomAlg/                     #   Homological algebra
│   ├── Incidence/                  #   Incidence geometry
│   ├── Internal/                   #   Non-exported intrinsics (was nonexport/)
│   ├── Lattice/                    #   Lattice theory
│   ├── LieThry/                    #   Lie theory
│   ├── Module/                     #   Module theory
│   ├── Opt/                        #   Optimization
│   ├── RepThry/                    #   Representation theory
│   ├── Ring/                       #   Ring/ideal operations
│   ├── Semigroup/                  #   Semigroup theory
│   ├── System/                     #   System intrinsics
│   └── Topology/                   #   Topology
│
├── test/                           # Test suite (517+ .m files)
│   ├── Algebra/
│   ├── Basics/
│   ├── Code/
│   ├── Commut/
│   ├── Geometry/
│   ├── Group/
│   ├── Internal/                   #   Tests for non-exported code (was nonexport/test/)
│   ├── Lat/
│   ├── LieTheory/
│   ├── RepThry/
│   ├── Ring/
│   ├── System/
│   ├── ...
│   ├── run                         #   Perl test runner
│   └── find_err                    #   Error extraction script
│
├── data/                           # Precomputed databases (was libs/)
│   ├── c9lattices/                 #   Class 9 lattices (72 MB → Git LFS)
│   ├── simgps/                     #   Semigroup data (13 MB → Git LFS)
│   ├── galpols/                    #   Galois polynomial data
│   ├── isolgps/                    #   Isolated groups data
│   ├── matgps/                     #   Matrix group data
│   ├── pergps/                     #   Permutation group data
│   ├── solgps/                     #   Solvable groups data
│   ├── intro/                      #   Introductory data
│   ├── prof/                       #   Profile/timing data
│   └── test/                       #   Test databases
│
├── config/                         # Platform build configs (was mach/)
│   ├── template                    #   Documented template for new platforms
│   ├── x86_64-ubuntu-exp           #   Canonical: Ubuntu x86_64
│   ├── x86_64-centos-exp           #   Canonical: CentOS x86_64
│   ├── arm64mac                    #   Canonical: macOS ARM64
│   ├── arm64mac.exp                #   Canonical: macOS ARM64 export
│   └── ...                         #   Other actively-used configs
│
├── scripts/                        # Build utilities
│   ├── make_mf                     #   Makefile generator
│   ├── aproto                      #   Prototype generator wrapper
│   └── cproto-4.7e/                #   cproto source
│
├── doc/                            # All documentation
│   ├── handbook/                   #   MAGMA Handbook (was Doc/Magma-HB/)
│   ├── overview/                   #   Overview docs (was Doc/Over/)
│   ├── release-notes/              #   Release notes (was Doc/Rel/)
│   ├── internal/                   #   Developer docs (was Prog/doc/)
│   │   ├── conventions             #     Coding conventions
│   │   └── ...
│   ├── info/                       #   Information files (was Doc/Info/)
│   ├── parallel/                   #   Parallel docs (was Doc/Par/)
│   └── web/                        #   Web-related docs (was Doc/Web/)
│
├── web/                            # Website (was Web/)
│   ├── www/                        #   Website content
│   ├── php/                        #   PHP scripts
│   └── bin/                        #   Web binaries
│
├── .gitignore
├── .gitattributes                  # Git LFS tracking rules
└── Makefile                        # Top-level build entry point

Git Refs (from SVN directories)

Tags (154)

SVN Tags/V2.28-4 → Git tag v2.28-4

Branches from Export/ (19)

SVN Export/V2.28 → Git branch export/v2.28

Snapshot branches of major releases, diverging from trunk at the release point.

Branches from Branches/ (10)

SVN Branches/nicole → Git branch dev/nicole

SVN Branch Git Branch
Branches/allan dev/allan
Branches/damien_eval dev/damien-eval
Branches/eran-modfrmalg dev/eran-modfrmalg
Branches/geoff_ecdb_big dev/geoff-ecdb-big
Branches/geoff_ring_matp dev/geoff-ring-matp
Branches/geoff_structure_create dev/geoff-structure-create
Branches/nicole dev/nicole
Branches/nicole-tests dev/nicole-tests
Branches/sergei_conj dev/sergei-conj
Branches/Voight-Base dev/voight-base

Git LFS

Track large binary/data files via .gitattributes:

data/c9lattices/** filter=lfs diff=lfs merge=lfs -text
data/simgps/** filter=lfs diff=lfs merge=lfs -text

config/ Cleanup

The original mach/ has 76 platform configurations, most developer-specific (e.g., claus.dev.eeepc, volker.x86_64). Keep only:

  • Canonical configs used for CI and official builds
  • A documented template for developers to copy and customise locally

Developer-personal configs should live outside the repo (e.g., ~/.magma/config or a git-ignored config/local).

What Stays the Same

  • src/ internal module structure (264 modules) — untouched
  • package/ domain organisation (17 domains) — untouched
  • test/ category structure — untouched
  • All .m, .c, .h, .cl file contents — untouched
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment