Skip to content

Refactor project structure and enhance documentation#9

Open
atellier2 wants to merge 4 commits into
gedcom7code:mainfrom
atellier2:main
Open

Refactor project structure and enhance documentation#9
atellier2 wants to merge 4 commits into
gedcom7code:mainfrom
atellier2:main

Conversation

@atellier2
Copy link
Copy Markdown

I need a library for a Gedcom project and I need to have a beter understanding of your library. So I used AI to generate documentation, test.

atellier2 and others added 4 commits May 4, 2026 08:23
…ques (#2)

- Déplace les modules cœur dans src/ (gedcstruct.js, g7datatypes.js, g7lookups.js, g7structure.js)
- Renomme demo/ en examples/ pour plus de clarté
- Met à jour les chemins d'import dans simpleValidator.js et examples/test_findOrCreate.js
- Ajoute package.json avec les exports ES module et les métadonnées du projet
- Ajoute .gitignore

https://claude.ai/code/session_01HoKHaY5SWQ9aCmxPvqWTKP

Co-authored-by: Claude <[email protected]>
…ques (#4)

- Déplace les modules cœur dans src/ (gedcstruct.js, g7datatypes.js, g7lookups.js, g7structure.js)
- Renomme demo/ en examples/ pour plus de clarté
- Met à jour les chemins d'import dans simpleValidator.js et examples/test_findOrCreate.js
- Ajoute package.json avec les exports ES module et les métadonnées du projet
- Ajoute .gitignore

https://claude.ai/code/session_01HoKHaY5SWQ9aCmxPvqWTKP

Co-authored-by: Claude <[email protected]>
* docs: refonte du README et création du répertoire docs/

- README.md réécrit pour être orienté utilisateur : introduction GEDCOM,
  architecture en 3 couches, quick start, description des modules, liens
  vers la doc détaillée
- docs/architecture.md : explication du flux de données entre les couches,
  rôle de chaque classe, types de payloads
- docs/api.md : référence complète de GEDCStruct, G7Dataset, G7Structure,
  G7Lookups, G7Datatypes et des objets de configuration
- docs/examples.md : 10 exemples concrets (parsing, validation, création,
  find-or-create, familles, extensions, round-trip, JSON, GEDCOM 5.x)


* docs: translate all documentation to English

README.md and all docs/ files (architecture, api, examples) were written
in French by mistake; translated to English throughout.

https://claude.ai/code/session_019gWQ4DPdsTsLPoNNK9z4j3

* refactor: reorganize project structure following best practices

- src/       library source files (gedcstruct, g7datatypes, g7lookups, g7structure)
- examples/  runnable examples, replacing the root-level validator and demo/
  - examples/validator/      GEDCOM 7 validator web app (index.html + validator.js)
  - examples/find-or-create/ programmatic dataset demo (index.html + find-or-create.js)
- docs/      documentation (unchanged)
- Root kept clean: README.md and LICENSE files only

Update all import paths and script src references accordingly.

https://claude.ai/code/session_019gWQ4DPdsTsLPoNNK9z4j3

* test: add complete test suite and fix G7Dataset.fromString bug

- Add unit tests for GEDCStruct (parsing, CONT/CONC, pointers, escaping,
  querySelector, toString, JSON round-trip)
- Add unit tests for all G7 datatypes (G7Age, G7Date, G7DateValue, G7Time,
  G7Datatype dispatch, checkDatatype) with a minimal mock lookup
- Add integration tests for G7Dataset (construction, record creation,
  substructure creation, find/findOrCreate, pointers, validation,
  serialisation, JSON round-trip, fromString)
- Add integration end-to-end round-trip tests (GEDCStruct and G7Dataset)
- Add test infrastructure: spec downloader (tests/setup.js), spec loader
  helper (tests/helpers/spec.js), GEDCOM fixture (tests/fixtures/minimal.ged)
- Add package.json with test scripts (test, test:unit, test:integration,
  test:setup)
- Add .gitignore excluding the downloaded spec fixture
- Fix bug in G7Dataset.fromString: variable was named `src` before being
  assigned, causing a ReferenceError — corrected to use parameter `str`
- Update README with testing instructions

All 137 tests pass (29 suites).

https://claude.ai/code/session_019gWQ4DPdsTsLPoNNK9z4j3

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: atellier2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant