- Where Developers Learn, Share, & Build Careers
I have a bunch of Python scripts that I use to read files in a pipeline, and to create data And converts data to change Sqlite3 database.
I use a mess file to do this; Because some of my input files are quite large, i.e. 5 GB and so takes a lot of time to process, I do not want to run the whole file in the file to run the whole pipeline when I just edit one file.
However, because they all edit the same file, i.e. the database file, they are making all the impressive fake targets, there is a way to do this, by which only the targets that modify those files Can be prepared: who had their files?
Here is the messy I am using:
.PHONY: Everything: blogs.db blogs.db: User likes posts blogs blog_likes Peano: Create Create: create.py $ (Python) .py: User Users: users.py $ (Python) users.py Phone: Posting posts: posts.py $ (PYTHON). Like: Likes: likes, make $ $ (Python). Blog: blog blog: blogs.py $ (PYTHON) blogs.py .PHONY: Blog_likes blog_likes: blog_likes.py $ (python) blog_likes.py
You do not need dummy files, nothing other than these scripts is modifying the database:
SCRIPTS = create.py users.py posts.py likes.py blogs.py blog_likes.py .PHONY: Everything: Blogs.db blogs.db: $ (SCRIPTS) @ for $ ?; Do $ (python) $$ s; Done
Comments
Post a Comment