jhnnsrs / turms

Turms is a pure python implementation of the awesome graphql-codegen library, following a simliar extensible design.
https://jhnnsrs.github.io/turms/
MIT License
62 stars 16 forks source link

(WIP) Generate field description rather than docstring #54

Open devxoul opened 1 year ago

devxoul commented 1 year ago

This PR resolves #53

I couldn't find a related test case and I'm not sure whether this change could cause side effects.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 :warning:

Comparison is base (5b78fa2) 93.88% compared to head (2c74c54) 93.88%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #54 +/- ## ========================================== - Coverage 93.88% 93.88% -0.01% ========================================== Files 56 56 Lines 3058 3056 -2 ========================================== - Hits 2871 2869 -2 Misses 187 187 ``` | [Impacted Files](https://codecov.io/gh/jhnnsrs/turms/pull/54?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Roos) | Coverage Δ | | |---|---|---| | [turms/recurse.py](https://codecov.io/gh/jhnnsrs/turms/pull/54?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Roos#diff-dHVybXMvcmVjdXJzZS5weQ==) | `87.80% <100.00%> (-0.15%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Roos). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Roos)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jhnnsrs commented 1 year ago

Hi there thanks for the PR :)

Tests seem to like it, however i think it would be great if this could be a bit more configurable, as some people (me for example might prefer the docstring over the description). What would you think about adding a Generator Config variable with field_description = "docstring" | "inline" | "both" ?

devxoul commented 1 year ago

@jhnnsrs that would be awesome. I think I can update the PR this month.