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

Upgrade to Julia 1.0 #104

Merged
merged 8 commits into from
Aug 22, 2018
Merged

Upgrade to Julia 1.0 #104

merged 8 commits into from
Aug 22, 2018

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Aug 18, 2018

Prepare a for a new release of DataFramesMeta.jl working on Julia 1.0.

@bkamins bkamins changed the title Upgrade to Julia 1.0 WIP: Upgrade to Julia 1.0 Aug 18, 2018
@bkamins
Copy link
Member Author

bkamins commented Aug 18, 2018

This is WIP. Depends on fixing DataArrays for Julia 1.0 first. Also some macros like @by_row are not fixed yet (I am trying to work out why row is not added in calls by byrow_replce in Julia 1.0 so any hints are appreciated).

@bkamins bkamins changed the title WIP: Upgrade to Julia 1.0 Upgrade to Julia 1.0 Aug 18, 2018
@bkamins
Copy link
Member Author

bkamins commented Aug 18, 2018

Now it is good for a review. I have it working under 1.0 with all core functionality.

I did not do support (and they are commented out in tests) for two things:

  • DataArrays package dependencies (in tests) - do we need to test against it (I do not know how much this package is used, but for sure it is not updated for Julia 1.0 and it will require many changes to provide support);
  • CompositeDataFrame which uses eval in other module, which is problematic AFAIK (I am not sure if support for CompositeDataFrame is needed as it does not keep up with changes in DataFrames.jl functionality anyway and we have JuliaDB that provides type stable column access).

Therefore, I would drop those two things (the second is more problematic as it is breaking in functionality - but maybe there is a simple and safe fix for this?).

@nalimilan Any opinions about the best approach? I would want to tag a release of DataFramesMeta that would support Julia 1.0.

@bkamins
Copy link
Member Author

bkamins commented Aug 18, 2018

CC @tshort (as this is a major discussion point what I propose)

@tshort
Copy link
Contributor

tshort commented Aug 18, 2018

I'm good with dropping those two items. Thanks for all the work here!

@bkamins
Copy link
Member Author

bkamins commented Aug 18, 2018

Thank you for a prompt response. After thinking about it I have made two additional commits that clean up everything of DataArrays and CompositeDataFrame. The first one cleans the code, and the second one is an update of the documentation.

The rationale is that DataArrays are an unnecessary dependency in tests, while CompositeDataFrame is an independent code from core macro-targeted functionality of the package. I think it is better - if someone wants to maintain CompositeDataFrame to keep it in a separate package, as then DataFramesMeta will be easier to maintain (and they do not work "as is" anyway on Julia 1.0 so there is some work to be done to port them).

If this proposal would be acceptable I would recommend merging the PR and tagging a release.

@tshort
Copy link
Contributor

tshort commented Aug 18, 2018

I'm good with deleting all the CI tests on nightly, including Travis.

@bkamins
Copy link
Member Author

bkamins commented Aug 18, 2018

I would leave them for now if you are OK with this as I expect that soon some minor bug release of Julia 1.0 might come out.

@tshort
Copy link
Contributor

tshort commented Aug 18, 2018

That's fine.

@pdeffebach
Copy link
Collaborator

If this update is going to have breaking changes in it, should we consider #100. Since semantic versioning is so strict now its worth going over proposed breaking changes.

@tshort
Copy link
Contributor

tshort commented Aug 18, 2018

I'm good with #100 and a semantic version bump.

@pdeffebach
Copy link
Collaborator

Cool! also keep in mind that #101 is essentially a bug-fix (fixing some edge cases that throw errors with @transdorm), so it can be added in at any time.

@tshort
Copy link
Contributor

tshort commented Aug 18, 2018

Sorry, I'm a bit lost in the #101 thread :).

@pdeffebach
Copy link
Collaborator

Yup it got lost in the weeds a bit. A rebase might be in order for it since I think its trying to do too much.

@bkamins
Copy link
Member Author

bkamins commented Aug 19, 2018

@pdeffebach I agree that it would be good to have #100 (I left a small comment there) and #101 in the release.

I would propose the following process:

@@ -1,9 +1,10 @@
language: julia
julia:
- 0.6
- 0.7
Copy link
Member

Choose a reason for hiding this comment

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

Maybe also add 1.0?

Copy link
Member Author

Choose a reason for hiding this comment

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

added

README.md Outdated
@@ -5,7 +5,7 @@
[![Travis](https://travis-ci.org/JuliaStats/DataFramesMeta.jl.svg?branch=master)](https://travis-ci.org/JuliaStats/DataFramesMeta.jl)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/juliastats/dataframesmeta.jl?branch=master&svg=true)](https://ci.appveyor.com/project/tshort/dataframesmeta-jl/branch/master)

Metaprogramming tools for DataFrames and Associative objects.
Metaprogramming tools for DataFrames and AbstractDict objects.
Copy link
Member

Choose a reason for hiding this comment

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

Could add backticks while you're at it.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

README.md Outdated
the original `df` is not affected. Here is an example where two new columns are
added:

```julia
df = DataFrame(A = 1:3, B = [2, 1, 2])
df2 = @byrow! df begin
@newcol colX::Array{Float64}
@newcol colY::DataArray{Int}
@newcol colY::Array{Int}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use Union{Int,Missing} to illustrate that missing values are supported?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed and added a case with missing to show that it actually works.

@@ -155,28 +149,10 @@ functions.
@select select Select


Chaining operations is a useful way to manipulate data. There are
Copy link
Member

Choose a reason for hiding this comment

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

Is this no longer supported? I haven't followed the updates on this.

Copy link
Member Author

Choose a reason for hiding this comment

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

It does not work on Julia 1.0 due to Lazy.jl issues. The relevant test are also commented out. When it starts working again it should be reinserted after tests are uncommented (I have added a note there).

REQUIRE Outdated
Compat 0.57.0
julia 0.7
DataFrames 0.13
Compat 1.0
Copy link
Member

Choose a reason for hiding this comment

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

Can't we get rid of the dependency on Compat?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

appveyor.yml Outdated
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: 0.7
- julia_version: 1
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 say better test 1.0, since we already have nightly to test recent versions. That way we ensure we still really support 1.0 (I know there's a debate going on about that).

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@@ -50,21 +50,6 @@ DMA = DataFrame(
v3 = Array{Union{Float64, Missing}}(rand(N)) # numeric e.g. 23.5749
);

# DataArray version
Copy link
Member

Choose a reason for hiding this comment

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

Better keep this to benchmark Array{Union{T, Missing}}?

Copy link
Member Author

Choose a reason for hiding this comment

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

We have a benchmark for Union{T, Missing} in DataFrame named DMA.

@bkamins
Copy link
Member Author

bkamins commented Aug 21, 2018

@nalimilan if you approve this PR can you merge it so that #100 can be rebased? After #100 is merged I think we should tag a release. Thanks!

@nalimilan nalimilan merged commit e309357 into JuliaData:master Aug 22, 2018
@nalimilan
Copy link
Member

Sure!

@bkamins
Copy link
Member Author

bkamins commented Aug 22, 2018

Thanks! 😄

@@ -1,3 +1,2 @@
julia 0.6
DataFrames 0.11
Compat 0.57.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR takes out Compat, but src/DataFramesMeta.jl still imports it.

Copy link
Member Author

Choose a reason for hiding this comment

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

#107 fixes this

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.

5 participants