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

WIP: Add spanish translation, Literate.jl backend #30

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

Conversation

miguelraz
Copy link

@miguelraz miguelraz commented Apr 18, 2021

This PR is a WIP with at least 2 goals:

  1. Add a spanish translation of the soon-to-be 1.0 DataFrames tutorials
  2. Add Literate.jl based notebooks for easier source control

Rationale:

  1. Spanish translation I will add as I go, and can rebase if needed.
  2. Because I used a very handy ipynyb -> .jl Literate.jl converter, I already have the files that Literate.jl would use to produce the current .ipynb notebooks. It seems silly to use them for Spanish and not make them available to the rest of the tutorials (as a Portuguese translation was also suggested, this will reduce shared work.)

@bkamins
Copy link
Owner

bkamins commented Apr 18, 2021

This is very nice. I understand that this is still WIP (but having checked this it could just be merged - right?, as in the PR you just provide the .jl files that would reproduce what we have now - right?)

@storopoli
Copy link

I will fork miguelraz:spanish-tutorials as storopoli:portuguese-tutorials and start from the commit a200be1 (add literate jl files) and work out the portuguese translation. Since I am working at the University during the week I will do it during this week. So I'll probably have it done by Wednesday. Thank you!

@miguelraz
Copy link
Author

PHEW! All done! I will ping some spanish speaking friends to look over it.

@miguelraz miguelraz changed the title WIP: Add spanish translation, Pluto + Literate.jl backend WIP: Add spanish translation, Literate.jl backend Apr 18, 2021
literate_notebooks/src-ES/01_constructors.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/01_constructors.jl Outdated Show resolved Hide resolved

DataFrame([rand(3) for i in 1:3])

# Por ahora podemos construir un `DataFrame` de un `Vector` de átomos, creando un `DataFrame` con una sola hilera. En versiones futuras de DataFrames.jl, esto arrojará un error.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we delete this? Since it will be a 1.0 compatible anyway so there's no need to talk about deprecations.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah there's a couple of pre DataFrames 1.0 kinks that can be cleaned up. I'm waiting to run the notebooks and test that everything works to filter many of these out. I still don't know much about DataFrames so I don't know what is/isn't design yet.

literate_notebooks/src-ES/01_constructors.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/01_constructors.jl Outdated Show resolved Hide resolved
miguelraz and others added 5 commits April 18, 2021 12:43
Co-authored-by: pdeffebach <23196228+pdeffebach@users.noreply.github.com>
Co-authored-by: pdeffebach <23196228+pdeffebach@users.noreply.github.com>
Co-authored-by: pdeffebach <23196228+pdeffebach@users.noreply.github.com>
Co-authored-by: pdeffebach <23196228+pdeffebach@users.noreply.github.com>
literate_notebooks/src-ES/06_rows.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/07_factors.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/07_factors.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/09_reshaping.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/09_reshaping.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/10_transforms.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/12_pitfalls.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/12_pitfalls.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/13_extras.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/13_extras.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/13_extras.jl Outdated Show resolved Hide resolved
literate_notebooks/src-ES/13_extras.jl Outdated Show resolved Hide resolved
@bkamins
Copy link
Owner

bkamins commented Apr 20, 2021

@miguelraz: please let me know when this is good to merge

@miguelraz
Copy link
Author

miguelraz commented Apr 20, 2021

I have to fix some errors on the main source files:
There's some missing exports like randstring -> Random.randstring in 01_constructors and DataFrame(rand(3)) breaking Tables.jl AbstractRow interface.

@bkamins
Copy link
Owner

bkamins commented Apr 20, 2021

OK. Thank you!

@storopoli
Copy link

Also there is some funky stuff with srand (at least in my Julia 1.6.0)

@bkamins
Copy link
Owner

bkamins commented Apr 20, 2021

Where is srand used? There is no such function AFAICT.


# Podemos reorganizar el vector `names(x)` como sea necesario, creando un nuevo DataFrame en el proceso.

srand(1234)

Choose a reason for hiding this comment

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

Here is one example @bkamins, but they are everywhere...

Copy link
Owner

@bkamins bkamins Apr 20, 2021

Choose a reason for hiding this comment

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

This should be Random.seed!(1234). Where did you get srand from? Here is the source (from my notebooks on master):

using Random
Random.seed!(1234)
x[:, shuffle(names(x))]

Choose a reason for hiding this comment

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

We can easily replace with a regex in both portuguese and spanish. I just followed the .jl converted by @miguelraz

Copy link
Owner

Choose a reason for hiding this comment

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

As commented on Slack it seems that @miguelraz did not use master for doing the conversion. The fix should be easy hopefully.

# (Traducción por Miguel Raz, Abril 18, 2021)

using DataFrames # cargar paquete
srand(1);

Choose a reason for hiding this comment

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

another one @bkamins (it shows 16 times in the files)

@miguelraz
Copy link
Author

Yup, it's my bad @storopoli - I forked the master on github but had a stale repo locally which I made the notebooks from. I'm changing the src/*.jl files now to update them manually.

@bkamins
Copy link
Owner

bkamins commented May 12, 2021

@miguelraz - I am back to this PR. Is it ready to merge or there are still some issues to resolve.
I recall that there was some problem with handling of lines of code that produced an error - how do we stand with this?

@miguelraz
Copy link
Author

Still issues. I'll get to it today and ping you.

@bkamins
Copy link
Owner

bkamins commented May 12, 2021

Sure - no rush. I am porting other tutorials to DataFrames.jl 1.1, so I have my pipeline filled with work :).

@bkamins
Copy link
Owner

bkamins commented May 14, 2021

To avoid blocking users I have updated the Jupyter Notebooks to 1.1.1 release of DataFrames.jl. Fortunately the changes are minor:

  • Notebook 4, comment under cell 6 about memory mapping
  • Notebook 4, instructions for JDF.jl
  • Notebook 4, exclude one JSON timing in reading plot as it is very slow
  • Notebook 6, added an example of subset
  • Notebook 7, changes in comparing of categorical vs underlying type; and change of get to unwrap

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.

6 participants