Conversation
eb2257d to
a255f22
Compare
|
Please, you should better organize your commits by squashing some of them. |
Added Path to flag Added get_commit_hash function refactored into functions implemented error handling for rusqlite errors mod for sqlite
added hash for diffs sha2 dependency filepath functionality sqlite storing mutants into db bug fix in folder_path for sqlite
implemented update_status_mutant, change to snake case in variable, adition of a file_name colunm on mutants table implemented update command_to_test_mutant fix fullpath bug without -f flag on analysis --run_id necessary for --sqlite flag
Error handling for unwrap() parts MissingDbPath handler for MutationError enum
a255f22 to
c02ed02
Compare
Thanks for the suggestion. I’ve done the squash as recommended. If you have any further tips on how to better organize the commits, I’d be happy to hear them. |
There was a problem hiding this comment.
I think the approach went to a wrong direction. The idea of having sqlite persistence is not relaying on muts-* folder anymore. When generating the mutants and storing them, you don't need the muts-* folder, you could do it in the source code. Again, the idea is not having these folders anymore.
Also, some points we could take in consideration - here or in a follow-up:
- The README says
--run_idbut the correct one is--runid. - Analysis should run only for the "pending" mutants. Imagine a scenario where the power went out right in the middle of the analysis, and you'd like to resume it. Therefore, you would need to run the analysis for the mutants that haven't been analyzed yet, not for all of them.
- It would be great if we had a new command, something like "report" that would generate the .json file (the result as we have now) based on unkilled mutants from a specified run_id or (even better) from a date range.
- Would be great to print the
run idafter runningmutate. This way I know the run id to then run theanalysis. Without it, I would have to check the database by myself.
|
Also, it needs rebase. |
|
Closing in favor of #35. |
SQLite feature developed based on #11
*Development Summary:
[sqlite.rs file (NEW FILE)]:
Implemented the following functions:
Implemented the following tests:
[main.rs file (MODIFICATIONS)]:
Implemented the following logic:
[lib.rs file (MODIFICATIONS)]:
[git_changes.rs file (MODIFICATIONS)]:
[error.rs file (MODIFICATIONS)]:
[analyze.rs file (MODIFICATIONS)]:
[Cargo.toml file (MODIFICATIONS)]:
*Additional comments:
strategy, config_json from the current execution config -> NOT IMPLEMENTED
The database schema follows the issue documentation entirely, with only one exception on table mutant that was inserted an additional column called file_name to query on analyze section
Apart from the code tests, the following functional tests were performed manually:
(mutate) -> --sqlite flag optional, normal behavior {OK}
(mutate --sqlite ) -> Creates/open "db/mutation.db" and uses it {OK}
(mutate --sqlite results.db) -> Creates/open "db/results.db" and uses it {OK}
(mutate --sqlite ...) -> Verify INSERT OR IGNORE INTO projects (name, repository_url) VALUES ('Bitcoin Core', 'https://github.com/bitcoin/bitcoin'); {OK}
(mutate --sqlite...) -> General behavior: Open DB (create if missing) Ensure projects seed (bitcoin core), create run, insert mutants {OK}
(analyze --sqlite) -> Asks for run_id {OK}
(analyze --sqlite <db_file> <run_id> ) -> Record standard commands {OK}
(analyze <without file (-f ...)> --sqlite <run_id> ...) -> Record only for run_id, behave like analyze normally {OK}
*Further implementations suggestion: