Skip to content
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

Clean up codegen export with quoted symbols #151

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ezmiller
Copy link
Collaborator

@ezmiller ezmiller commented May 18, 2024

Goal

@joinr pointed out that the Column API MVP merged in #100 had codegen that exported many qualified symbols, which made the generated functions a little bit messier than they need to be.

Also in this PR

A small fix to the docstrings in tablecloth.api.operators. See this diff: https://github.com/scicloj/tablecloth/pull/151/files#diff-079771ab2c8ad3559f9e8c2b23758b662d9062bb2f32a2cf61013595a2c4da93L42-L51

(if (>= ~max-cols cols-count#)
(apply ~fn-sym (apply vector selected-cols#))
(throw (Exception. (str "Exceeded maximum number of columns allowed for operation."))))))]
(~'if (>= ~max-cols cols-count#)
Copy link
Member

@genmeblog genmeblog May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>= is missed

(->> args-to-pass#
(apply ~fn-sym)
args-to-pass# (~'concat selected-cols# [~@(drop 3 args)])]
(~'if (>= ~max-cols (~'count selected-cols#))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here: >=

(fn [ds#]
(~let [ds-with-selected-cols#
(~'let [aggregator#
(~'fn [ds#]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ds# -> ~'ds - it will generate more clean code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants