* Initial plan
* Implement no_parse filter syntax for preventing recursive parsing
Co-authored-by: ntindle <[email protected]>
* Add comprehensive test cases for self-closing tags and unmatched tags with no_parse filter
Co-authored-by: ntindle <[email protected]>
* Merge best features from both no_parse filter implementations
Co-authored-by: ntindle <[email protected]>
* Apply Black code formatting to fix style issues
Co-authored-by: ntindle <[email protected]>
* fix: move re import to module level, improve docstrings
- Move 'import re' from inline in method to module level
- Add docstring explaining underscore→space reversal in _reconstruct_original_tag
- Clarify test docstring for token fallback whitespace behavior
* fix: update self-closing tag tests for new text-outside-tags validation
Tests now expect ValueError when self-closing tags result in text outside
of proper tags, aligning with PR #15's stricter validation.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: ntindle <[email protected]>
Co-authored-by: Nick Tindle <[email protected]>
- Added environment declaration for release
- Added permissions for trusted publishing
- Updated step for publishing package distributions to PyPI using a GitHub action
- Update the versions of actions/checkout to v4 in the CI/CD configuration file. This ensures that the latest version of the action is used for checking out the repository.
- Also update the versions of actions/setup-python to v4 in the CI/CD configuration file. This ensures that the latest version of the action is used for setting up Python.
- The matrix configuration is updated to use Python versions 3.11 and 3.12 for the jobs.
- With these changes, the CI/CD workflow is now using the latest versions of the actions for checking out the repository and setting up Python, improving the reliability and efficiency of the workflow.
- Bumped the minimum supported version of Python from 3.8 to 3.11 and 3.12 in the CI/CD workflow file. This aligns with the project's updated requirements.
- Fixed the Python version in the build, lint, test, and publish jobs
- Added a strategy matrix for the Python version
- Added a new step to build the project using Poetry
- Added a new step to lint the code using black
- Updated the test step to run pytest with verbose and capture mode
- Added a new step to set up Python and install Poetry in the publish job
- Updated the publish job to use the build and publish commands of Poetry
- Added black version 23.11.0 for code formatting
- Updated pyproject.toml file to include black as a dependency
- Added linter for code quality checks
- Add tests to test_parser.py to test pydantic functionality
- Add tests for parsing and converting to pydantic models
- Add tests for nested tags and nested pydantic models
- Add test for double duplicate tags nested duplicate
- Add `.vscode/settings.json` configuration file for vscode
- Enable unittest in python.testing.unittestEnabled
- Set unittestArgs to run tests in the `./tests` directory with `test_*.py` pattern
- Disable pytest in python.testing.pytestEnabled
- Create Token class to represent individual tokens in the markup language
- Create tokenize function to split the markup into a list of tokens
- Implement Parser class to parse the tokens and generate a dictionary or list
- Add support for nested tags and multiple root tags
- Handle whitespace and escaped characters correctly
- Write unit tests to verify the functionality of the tokenizer and parser
This commit implements the tokenizer and parser for an HTML-like markup language. It includes the following changes:
- Added token.py and parser.py to the gravitasml package
- Implemented the Token class with attributes for type, value, line_num, and column
- Implemented the tokenize function to split the markup into a list of tokens based on regular expressions
- Implemented the Parser class with methods for parsing the tokens and generating a dictionary or list
- Added support for nested tags and multiple root tags in the parsed output
- Handled whitespace and escaped characters correctly in the tokenization process
- Created unit tests for both the tokenizer and parser to verify their functionality
This implementation allows for the parsing of HTML-like markup into a structured dictionary or list, providing the foundation for further processing and manipulation of the markup data.
- Adds README.md file with details about the GravitasML library
- Provides information about features, installation, quick start, limitations, documentation, tests, contributing, and license