own-pt / delphin-rdf

RDF specifications for DELPH-IN semantic representations and a Pydelphin plugin for RDF generation.
MIT License
2 stars 3 forks source link

Code reuse #13

Closed FredsoNerd closed 3 years ago

FredsoNerd commented 3 years ago

I noticed the delphin.cli.profile_to_*_rdf modules have almost the same code. We should, eventually, invest um code reuse. An auxiliary function/subcomand such like delphin.cli.profile_to_rdf receiving an additional parameter may be enough to solving this issue.

yfaria commented 3 years ago

I agree, but if we think of those serializers as a future codec it would make some sense to keep them separated (maybe not, because we could make a call of the function with a general profile-to-rdf with the parameter in the code)

FredsoNerd commented 3 years ago

Yes. Consider codecs aren't the priority; if fact, they aren't even certain. I've just developed a general purpose solution, a profile-to-rdf subcomand, wich attempts to be modularized, best option for future possible semantic representations.

yfaria commented 3 years ago

See #18. After #20, the only subcommand remaining is delphin.cli.profile_to_rdf. The conformity with PyDelphin codecs may be handled in the future.