Code Monkey home page Code Monkey logo

foiamail's People

Contributors

brandonrobertz avatar christopher-hacker avatar mattkiefer avatar phjudge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

foiamail's Issues

check for agency labels before sending initial batch

I forgot to init_labels before init_msg, leading to a couple hours of manual fixing. Let's protect against these sorts of brain farts.

Either:

  • set up an input prompt (don't see any agency labels... are you sure you want to send?)
  • create agency label on send

end-to-end testing

assigning to patrick pending invite acceptance

TODO:
come up with a testing checklist. make sure to verify functionality of new features, including:

monitor rate-limiting

Occasionally the application has run into rate limits. These incidents were rare and typically self-resolving. But I've tried to document incidents and then either optimize API calls or tune back crontab frequency. See #16 & #36.

test contacts

todo: verify contacts load correctly

(see race condition described in issue #18 )

allow for label generation when new contacts are added mid-project

Adding new contacts mid-project would not generate corresponding labels.

See MK/JG emails 10/31/19

Maybe init labels as contacts are loaded (currently via UI) or as drafts are prepped to ensure labels and agencies stay in sync.

Alternatively, quick fix could involve re-running init_labels(). (Untested)

Bug with auth scopes?

I'm working on building a similar (but not identical) project to this one and came across this line in the get_cred method of the auth.py script:

if ... sorted([x for x in credentials.scopes]) != sorted([x for x in scopes]):
    # create credentials

Is there a compelling reason to mandate that the list of scopes in the auth.py file be exactly the same as the list of scopes you have permission for?

Changing this line to

if ... not credentials.has_scopes(scopes)

should take care of this if you only want to make sure that you have all of the permissions you need.

gmail rate limits exceeded

HttpError: <HttpError 429 when requesting https://www.googleapis.com/gmail/v1/users/me/labels?alt=json returned "User-rate limit exceeded. Retry after 2018-04-27T17:20:36.724Z">

The error hits on labels but it appears the root issue is greedy gmail.users.threads.list
screenshot from 2018-04-27 12 21 22

TODO: optimize threads.list calls

apostrophes are bad for api calls

So far, only seems to affect attachment collection for a small number of agencies, e.g.

skipping Troy FPD
Governor's State University failed <HttpError 400 when requesting https://www.googleapis.com/drive/v3/files?q=name%3D%27Governor%27s+State+University%27&alt=json returned "Invalid Value">
skipping DeWitt County

TODO: fix

address caching

e.g.., test contacts may get returned even after deleted and replaced

TODO: document this or find a code workaround

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.