New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support (tempita/template) based code generation #2596

Open
jbrockmendel opened this Issue Sep 7, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@jbrockmendel

jbrockmendel commented Sep 7, 2018

We semi-recently started using cythonize in pandas, and I'm thinking some of the wrapping code used there might be worth pushing upstream. I'd like to get opinions before making PR(s) here.

Further ideas:

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Sep 7, 2018

Contributor

I think enabling coverage/tracing support via an environment variable would be nice. There's always a certain risk that people might naively/accidentally export it globally and then get unexpected results from their next pip installation, but I guess that's just their fault then.

Regarding tempita templates, well, we ship the template engine, so making that a general feature seems like it could help some use cases. People have been requesting some kind of code generation support in the past, although that was also before fused types existed. Note that this would suggest some kind of original source line tracking, because error reporting on generated code can be confusing. Not sure if it's worth going down that road …

Finally, clean isn't the only command where compilation gets in the way. setup.py --help-commands lists quite a few, especially when setuptools is used. I think that basically brings us back to wanting better integration with setuptools in general.

Contributor

scoder commented Sep 7, 2018

I think enabling coverage/tracing support via an environment variable would be nice. There's always a certain risk that people might naively/accidentally export it globally and then get unexpected results from their next pip installation, but I guess that's just their fault then.

Regarding tempita templates, well, we ship the template engine, so making that a general feature seems like it could help some use cases. People have been requesting some kind of code generation support in the past, although that was also before fused types existed. Note that this would suggest some kind of original source line tracking, because error reporting on generated code can be confusing. Not sure if it's worth going down that road …

Finally, clean isn't the only command where compilation gets in the way. setup.py --help-commands lists quite a few, especially when setuptools is used. I think that basically brings us back to wanting better integration with setuptools in general.

@robertwb

This comment has been minimized.

Show comment
Hide comment
@robertwb

robertwb Sep 7, 2018

Contributor
Contributor

robertwb commented Sep 7, 2018

@jbrockmendel

This comment has been minimized.

Show comment
Hide comment
@jbrockmendel

jbrockmendel Sep 7, 2018

Certainly worth writing up a proposal.

Great. Is there a particular process for that? Usually after discussing in an Issue I'd open a PR, but it sounds like that isn't what you have in mind.

jbrockmendel commented Sep 7, 2018

Certainly worth writing up a proposal.

Great. Is there a particular process for that? Usually after discussing in an Issue I'd open a PR, but it sounds like that isn't what you have in mind.

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Sep 7, 2018

Contributor

I think the coverage envvar is ready for a PR, but the template engine idea deserves some more discussion first. We can continue it here and I'll rename the ticket.

Better build system support is being discussed in #2531.

Contributor

scoder commented Sep 7, 2018

I think the coverage envvar is ready for a PR, but the template engine idea deserves some more discussion first. We can continue it here and I'll rename the ticket.

Better build system support is being discussed in #2531.

@scoder scoder changed the title from ENH: upstream tempita/cythonize wrappers to Support (tempita/template) based code generation Sep 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment