feat(parser): add entrypoint infrastructure for multiple stream types - #56
Merged
Conversation
Split parser into pluggable entrypoints to support different ingestion loops: - parser/entrypoints/sftp_push — current logic (watch local directory) - parser/entrypoints/sftp_pull — stub for future SFTP polling - parser/entrypoints/api_pull — stub for future HTTP/API polling Changes: - parser/main.py becomes thin shim delegating to sftp_push - generate_config.py emits 'command:' based on new 'entrypoint' field in users.yml - users.yml schema extended with 'entrypoint' documentation - Tests updated to import from parser.entrypoints.sftp_push Backward compatible: existing services default to 'sftp_push' entrypoint.
- Remove unused load_api_json_bundle import from sftp_push.py (imported locally in main() where needed) - Apply black formatting to test_main.py for consistency
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.
What
Splits the parser into pluggable entrypoints to support different data ingestion loops (SFTP push, SFTP pull, API pull) while reusing the same parser infrastructure.
Changes
New entrypoint modules
parser/entrypoints/sftp_push— Current logic (watch local directory for files)parser/entrypoints/sftp_pull— Stub for future remote SFTP pollingparser/entrypoints/api_pull— Stub for future HTTP/API pollingCore changes
parser/main.pybecomes a thin shim that delegates tosftp_pushentrypointgenerate_config.pyemitscommand:based on newentrypointfield inusers.ymlsftp_push,sftp_pull,api_pull)users.ymlschema extended withentrypointdocumentationTests
parser.entrypoints.sftp_pushConfiguration
New optional field in
users.yml:Future stream types will use:
entrypoint: sftp_pull— for remote SFTP pollingentrypoint: api_pull— for HTTP/API pollingBackward compatibility
Existing services default to
sftp_pushentrypoint when not specified. No breaking changes to deploy repo configuration.