Let’s Make(file) it more replicable! Part 2

Hello back! So, to make things more replicable, yesterday we worked on the Makefile. Today we’ll continue this work!

In retrospect, I realized it’s not the best practice to set the Python virtual environment in the Makefile, as not every user may want to do that (or maybe not specifically that way.) Let’s start fixing that:

ifndef IG_USER
$(error IG_USER is not set)
endif

PYTHON=../venv/bin/python    # <-- we'll change this
SRC=../src

all: shortcodes

shortcodes:
	$(PYTHON) $(SRC)/get-shortcodes.py

clean:
	rm -rf \#100daysofpractice/

becomes

ifndef IG_USER
$(error IG_USER is not set)
endif

PYTHON=python
SRC=../src

all: shortcodes

shortcodes:
	$(PYTHON) $(SRC)/get-shortcodes.py

clean:
	rm -rf \#100daysofpractice/

It would also be nice to

  • [X] use variables for filenames
  • [X] change the name of the target to reflect the output filename
  • [X] add target for test file; get it directly from the original
  • [X] add target for sort file
  • [X] add target for uniq file
  • [X] update the clean target to reflect the changes

Something very important is to update the instructions on how to obtain the several shortcode files.

  • [X] Use Org format for the main README
  • [X] have the instructions in the main README
  • [X] add description of the shortcodes
  • [X] add quick installation instructions
  • [X] add a usage example
  • [X] do not set environment variables for Instagram user and password

Well, that took a while… If you want to see the results, they’re (mainly) in the project’s main README file. You can also open the hood and look at the list of commits for all that was done!

All I can say is that it was really humbling to test all the changes below in a clean new clone… But now I’m pretty sure that anyone can replicate the process, which is great for Science! Cheesy, but true LOL!

See ya!

Published by eglur

I have a B.Sc. in Computer Science and a M.Sc. in Computer Engineering, both from the University of São Paulo, and have been programming for 16 years.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: