feat: Expose dhatu code in vidyut.kosha.DhatuEntry#222
Open
VedantMadane wants to merge 2 commits intoambuda-org:mainfrom
Open
feat: Expose dhatu code in vidyut.kosha.DhatuEntry#222VedantMadane wants to merge 2 commits intoambuda-org:mainfrom
VedantMadane wants to merge 2 commits intoambuda-org:mainfrom
Conversation
75539c9 to
5f03725
Compare
Fixes ambuda-org#164 Add code field to DhatuMeta and expose it through Python API Following the same pattern as ambuda-org#163 (artha field implementation)
5b2d497 to
3da6d74
Compare
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
Fixes #164 - Exposes the Dhatupatha code (e.g.,
01.0001for भू) in the Python API'sDhatuEntryclass.Implementation
Following the exact same pattern as #163 (artha field implementation), this PR adds the
codefield to make dhatu codes accessible from Python.Changes
Modified
vidyut-kosha/src/entries.rscode: Option<String>field toDhatuMetastructcode: Option<String>field toDhatuMetaBuilderstructcode()accessor method toDhatuEntrycode()builder method toDhatuMetaBuilderbuild()method to includecodefieldModified
bindings-python/src/kosha/entries.rscode: Option<String>field toPyDhatuEntrystruct with documentationcodeparameter__repr__()to include code in outputFrom<&DhatuEntry>implementation to mapcodefieldModified
bindings-python/test/unit/kosha/test_entries.pytest_dhatu_entry_with_code()test function__repr__tests to expectcode=Nonein outputExample Usage