Skip to content

Commit

Permalink
remove.jl from deploy docs location
Browse files Browse the repository at this point in the history
  • Loading branch information
drizk1 committed Apr 7, 2024
1 parent ff356a2 commit f4affe9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
46 changes: 23 additions & 23 deletions docs/examples/UserGuide/key_differences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,63 @@
# value = repeat(1:5, 2),
# percent = 0.1:0.1:1.0);

#mem = duckdb_open(":memory:");
#db = duckdb_connect(mem);
# mem = duckdb_open(":memory:");
# db = duckdb_connect(mem);
# For these examples we will use DuckDB, the default backend, although SQLite, Postgres, MySQL, MSSQL, and ClickHouse are possible.
#copy_to(db, df, "df_mem"); # copying over the df to memory
# copy_to(db, df, "df_mem"); # copying over the df to memory

#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @group_by(groups)
# @summarise(mean = mean(percent))
# @slice_max(percent)
# @collect
#end
# end

#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @group_by(groups)
# @mutate(max = maximum(percent), min = minimum(percent))
# @group_by(groups)
# @summarise(mean = mean(percent))
# @collect
#end
# end

## Joining
# There are 2 key differences for joining:
# 1. When joining 2 tables, the new table you are choosing to join must be prefixed with a colon.
# 2. The column on both the new and old table must be specified. They do not need to be the same, and given SQL behavior where both columns are kept when joining two tables, it is preferrable if they have different names. This avoids "ambiguous reference" errors that would otherwise come up and complicate the use of tidy selection for columns.

#df2 = DataFrame(id2 = ["AA", "AC", "AE", "AG", "AI", "AK", "AM"],
# df2 = DataFrame(id2 = ["AA", "AC", "AE", "AG", "AI", "AK", "AM"],
# category = ["X", "Y", "X", "Y", "X", "Y", "X"],
# score = [88, 92, 77, 83, 95, 68, 74]);

#copy_to(db, df2, "df_join");
# copy_to(db, df2, "df_join");

#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @left_join(:df_join, id2, id)
# @collect
#end

## `case_when`
# In TidierDB, after the clause is completed, the result for the new column should is separated by comma ( , )
# this is in contrast to TidierData.jl, where the result for the new column is separated by a =>
#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @mutate(new_col = case_when(percent > .5, "Pass", # in TidierData, percent > .5 => "Pass",
# percent <= .5, "Try Again", # percent <= .5 => "Try Again"
# true, "middle"))
# @collect
#end
# end

## Interpolation
# To use !! Interpolation, instead of being able to define the alternate names/value in the global context, the user has to `add_interp_parameter!`. This will hopefully be fixed in future versions. Otherwise behavior is the same.
# Also, when using interpolation with exponenents, the interpolated value must go inside of parenthesis.
#add_interp_parameter!(:test, :percent) # this still supports strings, vectors of names, and values
# add_interp_parameter!(:test, :percent) # this still supports strings, vectors of names, and values

#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @mutate(new_col = case_when((!!test)^2 > .5, "Pass",
# (!!test)^2 < .5, "Try Again",
# "middle"))
# @collect
#end
# end

## Slicing Ties
# Slice will always return ties due to SQL behavior
Expand All @@ -76,38 +76,38 @@
# 1. When joining 2 tables, the new table you are choosing to join must be prefixed with a colon.
# 2. The column on both the new and old table must be specified. They do not need to be the same, and given SQL behavior where both columns are kept when joining two tables, it is preferrable if they have different names. This avoids "ambiguous reference" errors that would otherwise come up and complicate the use of tidy selection for columns.

#df2 = DataFrame(id2 = ["AA", "AC", "AE", "AG", "AI", "AK", "AM"],
# df2 = DataFrame(id2 = ["AA", "AC", "AE", "AG", "AI", "AK", "AM"],
# category = ["X", "Y", "X", "Y", "X", "Y", "X"],
# score = [88, 92, 77, 83, 95, 68, 74]);

#copy_to(db, df2, "df_join");

#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @left_join(:df_join, id2, id)
# @collect
#end
# end

## `case_when`
# In TidierDB, after the clause is completed, the result for the new column should is separated by comma ( , )
# this is in contrast to TidierData.jl, where the result for the new column is separated by a =>
#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @mutate(new_col = case_when(percent > .5, "Pass", # in TidierData, percent > .5 => "Pass",
# percent <= .5, "Try Again", # percent <= .5 => "Try Again"
# true, "middle"))
# @collect
#end
# end

## Interpolation
# To use !! Interpolation, instead of being able to define the alternate names/value in the global context, the user has to `add_interp_parameter!`. This will hopefully be fixed in future versions. Otherwise behavior is the same.
# Also, when using interpolation with exponenents, the interpolated value must go inside of parenthesis.
#add_interp_parameter!(:test, :percent) # this still supports strings, vectors of names, and values
# add_interp_parameter!(:test, :percent) # this still supports strings, vectors of names, and values

#@chain db_table(db, :df_mem) begin
# @chain db_table(db, :df_mem) begin
# @mutate(new_col = case_when((!!test)^2 > .5, "Pass",
# (!!test)^2 < .5, "Try Again",
# "middle"))
# @collect
#end
# end

## Slicing Ties
# Slice will always return ties due to SQL behavior
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ makedocs(
build=joinpath(@__DIR__, "docs")
)

deploydocs(; repo="github.com/TidierOrg/TidierDB.jl.git", push_preview=true,
deploydocs(; repo="github.com/TidierOrg/TidierDB.git", push_preview=true,
deps=Deps.pip("mkdocs", "pygments", "python-markdown-math", "mkdocs-material",
"pymdown-extensions", "mkdocstrings", "mknotebooks",
"pytkdocs_tweaks", "mkdocs_include_exclude_files", "jinja2"),
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ plugins:
nav:
- "Home": "index.md"
- "Key Differences from TidierData.jl" : "examples/generated/UserGuide/key_differences.md"
- "Getting Started": "examples/generated/UserGuide/getting_started.md"
- "Getting Started" : "examples/generated/UserGuide/getting_started.md"
- "Reference" : "reference.md"

0 comments on commit f4affe9

Please sign in to comment.