Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodaigh committed Apr 12, 2021
1 parent e9b64bd commit 9e8c6f6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
7 changes: 0 additions & 7 deletions src/JDF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,13 @@ include("type-writer-loader/substring.jl")
include("column_loader.jl")
include("compress_then_write.jl")

<<<<<<< Updated upstream
include("load-columns.jl")
=======
>>>>>>> Stashed changes
include("loadjdf.jl")
include("savejdf.jl")
include("type_compress.jl")

include("metadata.jl")
include("eachcol.jl")
<<<<<<< Updated upstream
=======
include("getindex-view.jl")
>>>>>>> Stashed changes
include("Tables.jl")

# Blosc.set_num_threads(6)
Expand Down
11 changes: 0 additions & 11 deletions src/JDFFile.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
<<<<<<< Updated upstream
export JDFFile, @jdf_str, path, getindex

import Base: getindex, view

=======
export JDFFile, @jdf_str, path
>>>>>>> Stashed changes

"""
jdf"path/to/JDFfile.jdf"
JDFFile("path/to/JDFfile.jdf")
<<<<<<< Updated upstream
Define a JDF file, which you use with methods like `names` and `size`.
=======
Define a JDF file, which you can apply `names` and `size`.
>>>>>>> Stashed changes
## Example
using JDF, DataFrames
Expand Down Expand Up @@ -70,7 +62,6 @@ end
Return the path of the JDF
"""
path(jdf) = getfield(jdf, :path)
<<<<<<< Updated upstream


function Base.getindex(file::JDFFile, rows, col::String)
Expand All @@ -85,5 +76,3 @@ end
Base.view(file::JDFFile, rows, cols) = getindex(file, rows, cols)

getindex(file::JDFFile, rows, cols) = JDF.load(file)[rows, cols]
=======
>>>>>>> Stashed changes
28 changes: 0 additions & 28 deletions src/Tables.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< Updated upstream
import Tables: rows, columns, istable, rowaccess, columnaccess, schema, Schema

import Base: propertynames, getproperty
Expand Down Expand Up @@ -38,30 +37,3 @@ ncol(t::Table) = length(t.columns)
Tables.columns(t::Table) = t.columns

Tables.istable(t::Table) = true
=======
import Tables: rows, columns, istable, rowaccess, columnaccess, schema, Schema

import Base: propertynames, getproperty

export istable

istable(::Type{JDFFile}) = true
istable(::JDFFile) = true

rowaccess(::JDFFile) = false
columnaccess(::JDFFile) = true

rowaccess(::Type{<:JDFFile}) = false
columnaccess(::Type{<:JDFFile}) = true

propertynames(jdf::JDFFile) = names(jdf)

getproperty(jdf::JDFFile, col::Symbol) = jdf[!, col]

schema(jdf::JDFFile) = begin
meta = metadata(jdf)
Schema(meta.names, map(x -> x.type, meta.metadatas))
end

columns(jdf::JDFFile) = jdf
>>>>>>> Stashed changes

2 comments on commit 9e8c6f6

@xiaodaigh
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request updated: JuliaRegistries/General/34085

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" 9e8c6f6119278b1414cd8c8d9f86fb76f3d4bc9a
git push origin v0.4.0

Please sign in to comment.