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

style all scopes (v2) #2

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

style all scopes (v2) #2

wants to merge 5 commits into from

Conversation

lorenzwalthert
Copy link
Owner

@lorenzwalthert lorenzwalthert commented Apr 18, 2021

Like #1, but with updated style guide.

@lorenzwalthert lorenzwalthert changed the base branch from main to add_strata April 19, 2021 06:46
@lorenzwalthert lorenzwalthert changed the base branch from add_strata to main April 19, 2021 06:46
Comment on lines -77 to +79
~type, ~package, ~task, ~learner, ~prediction, ~measure,
"regr", "mlr3", "TaskRegr", "LearnerRegr", "PredictionRegr", "MeasureRegr",
"classif", "mlr3", "TaskClassif", "LearnerClassif", "PredictionClassif", "MeasureClassif"
~type, ~package, ~task, ~learner, ~prediction, ~measure,
"regr", "mlr3", "TaskRegr", "LearnerRegr", "PredictionRegr", "MeasureRegr",
"classif", "mlr3", "TaskClassif", "LearnerClassif", "PredictionClassif", "MeasureClassif"
Copy link

Choose a reason for hiding this comment

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

Comment on lines +60 to +62
y = factor(rep(c("A", "B"), c(n1, n2)), levels = c("A", "B")),
x1 = 5 * cos(x) + rnorm(n, mean = mu, sd = sigma),
x2 = 10 * sin(x) + rnorm(n, mean = mu, sd = sigma)
Copy link

Choose a reason for hiding this comment

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

@lorenzwalthert This indentation looks off - is this causes because l61/62 start with numbers?

Copy link
Owner Author

Choose a reason for hiding this comment

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

indention or spacing after the first =? It was aligned before and styler does not allow complicated left alignment, so I made it right-aligned. We can also unalign if you want.

Copy link

Choose a reason for hiding this comment

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

Ah now I see - cos and sin were aligned before but complicated left alignment is not possible.

I think right alignment here is somehow non-standard - I think I'd prefer non-matching left alignment after =.

        x1 = 5 * cos(x) + rnorm(n, mean = mu, sd = sigma),
        x2 = 10 * sin(x) + rnorm(n, mean = mu, sd = sigma)

@lorenzwalthert
Copy link
Owner Author

@pat-s let me know when you want this PR to go to the upstream mlr3 repo. I think I can still change the target branch.

@pat-s
Copy link

pat-s commented Apr 24, 2021

@pat-s let me know when you want this PR to go to the upstream mlr3 repo. I think I can still change the target branch.

Thanks. I thought about re-styling the already active PR - what do you think?

@lorenzwalthert
Copy link
Owner Author

Thanks. I thought about re-styling the already active PR - what do you think?

also fine, then just make sure you have the deliberate alignment set as I did.

After that, we can think of zur other new rules introduced in the tidyverse style guide.

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