generated from quinnj/Example.jl
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sqlite test #7
Open
Farreeda
wants to merge
23
commits into
JuliaDatabases:dev
Choose a base branch
from
Farreeda:sqlite_test
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sqlite test #7
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
526ca48
Attempt to fix JDBC dispatch for DBInterface
TheCedarPrince 9ea3bd1
Creating test for _dbconnect function of SQLite
Farreeda ccb0995
fixing the file_path issue
9f01623
.
8c81230
updating PR
120f262
with github secrets
031dc3c
back to original
d5091ee
.
fa48076
updating the path
2760adc
Added quering
f6e27db
removing database in the test
535ff8b
updates
0e92556
Adding Dataframes and examples
766149a
.
43b80c5
.
6152c9d
allowing the test to access the function for the workflow
106173a
add / for absolute path :)
967e798
.
421f10d
.
5eadd8e
.
2d1ed6c
path problems
fc02a02
.
fdef69c
.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
using Documenter, Example | ||
#using Documenter, Example | ||
|
||
makedocs(modules = [Example], sitename = "Example.jl") | ||
#makedocs(modules = [Example], sitename = "Example.jl") | ||
|
||
deploydocs(repo = "github.com/quinnj/Example.jl.git", push_preview = true) | ||
#deploydocs(repo = "github.com/quinnj/Example.jl.git", push_preview = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
function _dbconnect(connector::Type{SQLite.DB}; file_path) | ||
using SQLite | ||
|
||
return connector(file_path.second) | ||
function _dbconnect(connector::Type{SQLite.DB}, file_path::String) | ||
|
||
return connector(file_path) | ||
|
||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
using Test, Example | ||
using Test, DataFrames, SQLite | ||
include("../src/sqlite.jl") | ||
|
||
@test hello("Julia") == "Hello, Julia" | ||
@test domath(2.0) ≈ 7.0 | ||
@testset "_dbconnect function for SQLite" begin | ||
|
||
conn= _dbconnect(SQLite.DB, "../test/data/sqlite.db") | ||
@test @isdefined conn | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a good test but could you also write a test that:
|
||
output = DBInterface.execute(conn, "SELECT age FROM PERSON WHERE name = 'John Doe'") |> DataFrame | ||
out = output[1,1] | ||
expected_output = 30; | ||
@test out == expected_output | ||
|
||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why this PR's test are failing right now is due to the fact that
_dbconnect
is trying to access the DB file but the DB file is not being sourced properly from the test environment. You will have to add in the db file to the test environment, liketest/data/sqlite_test.db
and then have the test environment find the file.This is also why you got the error email is that I enabled the test suite to run and GitHub sent you an email to say that the test suite failed.
Let me know if you have any questions -- good start! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is updated, thank you for your patience :D