techouse / mysql-to-sqlite3

Transfer data from MySQL to SQLite
https://techouse.github.io/mysql-to-sqlite3/
MIT License
217 stars 31 forks source link

Feature update -exclude to exclude tables #28

Closed AceScottie closed 2 years ago

AceScottie commented 2 years ago

Merged queries and added option to filter out tables using exclude keyword.

May need to be fixed to allow for correct use of -exclude tag with --without-foreign-keys May be worth adding an else statement to remove 'exclude' filter if 'mysql_tables' filter is set. Code formatting may be needed.

Merged --mysql-tables and --exclude (or none) into single query.

techouse commented 2 years ago

Looks like you've got some syntax errors in your PR. Please run the supplied test suite locally before committing to the PR again.

codecov[bot] commented 2 years ago

Codecov Report

Merging #28 (d2765f2) into master (8558f1c) will decrease coverage by 0.37%. The diff coverage is 87.50%.

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   89.81%   89.43%   -0.38%     
==========================================
  Files           7        7              
  Lines         422      426       +4     
==========================================
+ Hits          379      381       +2     
- Misses         43       45       +2     
Impacted Files Coverage Δ
mysql_to_sqlite3/transporter.py 97.58% <85.71%> (-0.79%) :arrow_down:
mysql_to_sqlite3/cli.py 95.55% <100.00%> (+0.10%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8558f1c...d2765f2. Read the comment docs.

AceScottie commented 2 years ago

Looks like you've got some syntax errors in your PR. Please run the supplied test suite locally before committing to the PR again.

sorry I'm not really use to GitHub yet. I fixed the error (forgot f-strings were not in py < 3.6) and re-ran tests but not sure what the error is about ?

techouse commented 2 years ago

I see you closed the PR. I've gone ahead and have written a simpler table exclusion mechanism. Just adding more tests now to make sure it works as expected. I'll post the PR soon.

AceScottie commented 2 years ago

Yes I am trying to figure out how to do local test. Every time I published changes it tried to run checks on the PR so I closed it. I'm not use to using GitHub and I am hoping to add in some more stuff (at least to my local version) so can you please tell me the correct way to run local tests without committing to the PR.

techouse commented 2 years ago

Hey,

To run local tests simply run this command in the terminal:

pip install -r requirements_dev.txt
tox