Skip to content

A pretty rough and ready way of updating the allow list#213

Merged
jon-betts merged 1 commit into
mainfrom
add-to-allow-list-script
Mar 9, 2021
Merged

A pretty rough and ready way of updating the allow list#213
jon-betts merged 1 commit into
mainfrom
add-to-allow-list-script

Conversation

@jon-betts
Copy link
Copy Markdown
Contributor

@jon-betts jon-betts commented Mar 4, 2021

For: #195

Review notes

I was thinking this would end up with something we could have tests for, but honestly all the interesting stuff here already does and we just re-use it. I'm not sure testing would add much.

I was also hoping we could re-use some of this for the pages, but we won't. It's all very this CSV procedure specific:

The script does accept arguments if you pass them, but for convenience with make (which has a quite lame way of passing arguments) I thought it was easier to just have a convention instead.

Testing notes

Github doesn't allow CSV for some reason, so you'll need to rename this:
allow_list.csv.txt

  • Copy this to the root as allow_list.csv
  • Run make allow-list
  • This should generate a allow_list.done.csv with results for giving feedback to support
  • It should also make allow_list.sql which we can upload to

@jon-betts jon-betts requested review from marcospri and seanh March 4, 2021 17:09
@jon-betts jon-betts self-assigned this Mar 4, 2021
Comment thread bin/add_to_allow_list.py
"result",
]

class Row(list):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really just want a mutable namedtuple. I think Python 3.8 data classes might be what I want?

Comment thread Makefile

.PHONY: allow-list
allow-list:
@tox -qe dev --run-command 'python bin/add_to_allow_list.py'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added $(args) at the end locally to test all the scripts options

Copy link
Copy Markdown
Contributor

@marcospri marcospri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run the script locally, got my sql back and parse executed that and got

----+------------------------------------------------------------------+-------------------------+-------+----------
 11 | ba531a147260901a82122006e8d4087535061d6e8cdcc38f0b498d09092f9846 | parishhillcreamery.com/ | f     | {manual}
 12 | 8629e9bd820962b996a7d7b87474ddb7940a24164bcc95c0772ddcd5153f4f42 | alimg.github.io/        | f     | {manual}
 13 | 6cc172ad9e7af2023a5f5c2f307c56dfd90debab7bb24b1c1cf675cf6b527a86 | thaipbsworld.com/       | f     | {manual}
 14 | 547f36b64bada557f35c8bfb41adb76bb52fee3509b53ca4a03a159ceac480a6 | hymnsandchants.com/     | f     | {manual}
 15 | 00f20fe539a81d3c30969bcc73d876322c8dd1ce8182ec3bb7e9e8717c4ab1e0 | noeldemartin.social/    | f     | {manual}
 16 | 68ebd205ce9805d33dd5ede44c215c240fa4e0c0082ff62ce91a12c012ef5d68 | kihealthandwellness.ca/ | f     | {manual}
 17 | 574f623bf1960aef32a32d5f5398de6f265564ea3afc2bf8d76d96c07fc676bb | garlandmag.com/         | f     | {manual}
 18 | 14fdc6f5ecce65a60ebff2a1d1f36777619373bf1b6e6675ee65f4117cd8fd55 | nosokomeiokalamatas.gr/ | f     | {manual}
 19 | ccf40ea589873e1c95c26eb3f8bfbe8be943a58c0d0665824afac4a225526dbb | phnci.org/              | f     | {manual}

so all looks good 👍

@jon-betts jon-betts merged commit a0e4307 into main Mar 9, 2021
@jon-betts jon-betts deleted the add-to-allow-list-script branch March 9, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants