Implement initial LMD Core parser#1
Merged
Merged
Conversation
4 tasks
…al, fix test harness - Rewrite _extract_frontmatter to support all LMD format markers: ---, ---yaml, ---json, ---toml, +++, = yaml =, = json =, = toml = - Auto-detect JSON vs YAML for plain --- delimiter - Add extract() public API that returns raw attrs + frontMatter + body - Remove mandatory @id and @type guards (missing is valid per spec) - Strip UTF-8 BOM before parsing - Catch JSON/YAML/TOML parse errors and wrap as LMD_INVALID_FRONTMATTER - Fix test harness: properly test extract() against conformance suite
acdb7fc to
8817b2a
Compare
…MarkdownError - Remove rdf.py, links.py, types.py (over-engineering) - Remove parse() and all helper functions - Rename LmdError to LinkedMarkdownError (matches TS naming) - Strip pydantic and rdflib dependencies from pyproject.toml - Update README API example
- Python: rdflib dev dep, 5 tests proving extract() attrs load into Graph - TypeScript: 5 tests using jsonld.toRDF() proving attrs produce valid quads - No changes to distributed src/ — tests only
- Add ruff dev dependency and config (select E/F/I/N/W, line-length 100) - Remove unused pytest import in test_rdf.py - Auto-format parser.py - Add ruff check + ruff format --check to CI
- Keep our CI (ruff + workflow_dispatch) and .gitignore - Merge pyproject.toml: main's uv_build/structure + our ruff/rdflib/ruff dev deps - Merge README.md: main's badges + our simplified API example - Keep main's errors.py/extract.py/ExtractResult dataclass - Update test_rdf.py to use .attrs (dataclass) instead of ['attrs'] (dict) - Regenerate uv.lock after dependency resolution
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.
Summary
Tests