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

Update docstring examples and code #970

Merged
merged 3 commits into from
May 6, 2024
Merged

Update docstring examples and code #970

merged 3 commits into from
May 6, 2024

Conversation

abhro
Copy link
Contributor

@abhro abhro commented Apr 22, 2024

Fence/indent/dedent code samples in docstrings with proper language tags so that built-in julia help and Documenter.jl can pick them up.

Fence/indent/dedent code samples in docstrings with proper language
tags so that built-in julia help and Documenter.jl can pick them up.
X = source(1:10)
Y = @node selectrows(X, 3:4)
julia> X = source(1:10)
julia> Y = @node selectrows(X, 3:4)
julia> Y()
Copy link
Member

Choose a reason for hiding this comment

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

Ditto previous comment.

julia> @load LogisticClassifier pkg=MLJLinearModels
julia> X, y = @load_crabs;
julia> pipe = Standardizer() |> LogisticClassifier();
julia> mach = machine(pipe, X, y) |> fit!;

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to revert these. See previous comments on including julia> prompt.

src/show.jl Outdated

"""
function _recursive_show end
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this?

2

```julia-repl
julia> object = (X = (x = 1, y = 2), Y = 3);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
julia> object = (X = (x = 1, y = 2), Y = 3);
object = (X = (x = 1, y = 2), Y = 3);

@@ -293,7 +298,7 @@ column cycle fastest, those in the last clolumn slowest.

### Example

```julia
```julia-repl
julia> iterators = ([1, 2], ["a","b"], ["x", "y", "z"]);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
julia> iterators = ([1, 2], ["a","b"], ["x", "y", "z"]);
iterators = ([1, 2], ["a","b"], ["x", "y", "z"]);

```
existing_names = []
```julia-repl
julia> existing_names = [];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
julia> existing_names = [];
existing_names = [];

@ablaom
Copy link
Member

ablaom commented Apr 23, 2024

I'll investigate the fail. Its does not immediately appear to be related.

@ablaom
Copy link
Member

ablaom commented Apr 23, 2024

Yes, I can confirm that the fails here are orthogonal; see #972 .

@ablaom ablaom closed this Apr 23, 2024
@ablaom ablaom reopened this Apr 23, 2024
@ablaom
Copy link
Member

ablaom commented Apr 23, 2024

Closed-reopened to re-trigger tests.

@ablaom
Copy link
Member

ablaom commented Apr 26, 2024

Thanks @abhro for the rebase. Let's come back to this after:

  • Resolve this discussion on julia> prompt.

Copy link
Member

@ablaom ablaom left a comment

Choose a reason for hiding this comment

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

Thanks @abhro for your work on this.

@ablaom ablaom merged commit e0ca155 into JuliaAI:dev May 6, 2024
3 checks passed
@abhro abhro deleted the docstring-patch-1 branch May 6, 2024 01:46
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