-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
This needs to have the work done so far in #4155 so I'm just gonna grab it from there. |
@aandis Yeah, and we can drop the |
Rebased to remove |
Rebased again on top of #4155 to bring in all work from there. Commits show on https://github.com/gratipay/gratipay.com/pull/4153/commits but not here. weird. |
Actually let's scratch that rebase. I wanted to use Package.insert but we'll need a multi insert statement here. |
@whit537 how do I run the chomp script? |
@aandis Once you |
Got it. |
We may need to think differently about initial load and subsequent updates. For initial load we'll have a lot to do and it might be worth looking at |
I had figured we could pass Fetching and processing readmes is going to add significant expense. It may make sense to decouple that and just load the database with |
I thought |
So maybe we have these three?
I was thinking (1) and (2) could be variants of the same |
Manual work shouldn't be needed.
https://www.postgresql.org/docs/current/static/sql-copy.html |
Okay. I mostly meant that we can just run that script as a one-off rather than having to install it in a long-lived dyno/cronjob/whatever. |
Do we get |
Yes! |
Sounds good. I am gonna start working on 1. Might doze off in an hour. Will pick up tomorrow from where you leave it. |
@whit537 built up a bit on 1. Should need to call copy with the data created to insert it. Gonna head to bed now. Will pick it up tomorrow. :) |
( id bigserial PRIMARY KEY | ||
, package_id bigint NOT NULL REFERENCES packages ON UPDATE CASCADE ON DELETE RESTRICT | ||
, email text NOT NULL | ||
, UNIQUE (package_id, email) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want a UNIQUE
here because a package can have multiple author/maintainer emails, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the emails be different? This is just a way of preventing duplicate inserts of a email for a given package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right. I wasn't thinking straight. :)
|
||
CREATE TABLE packages | ||
( id bigserial PRIMARY KEY | ||
, package_manager_id bigint NOT NULL REFERENCES package_managers ON UPDATE CASCADE ON DELETE RESTRICT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure we don't need the ON UPDATE ... ON DELETE
since we're referencing an immutable field.
|
||
def render(markdown): | ||
return Markup(m.html( | ||
markdown, | ||
extensions=m.EXT_AUTOLINK | m.EXT_STRIKETHROUGH | m.EXT_NO_INTRA_EMPHASIS, | ||
render_flags=m.HTML_SKIP_HTML | m.HTML_TOC | m.HTML_SMARTYPANTS | m.HTML_SAFELINK | ||
)) | ||
|
||
def marky(markdown): | ||
return subprocess.call() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should get rebased on master
now that #4154 is in.
I'm gonna dive into this today on the plane. |
Here's a few commits. More later ... |
Yes! 💃
|
Double yes! 💃 💃
|
Okay! Let's light this candle! 🕯️ |
This location is already in LD_LIBRARY_PATH.
I've set up a 10-minute scheduler job on the test app. If that works then my plan is to:
|
I'm going to land this as-is, and reticket loading up readmes as well as incrementalizing updates. |
Ready to go once Travis is green ... |
Okay! Here we go! ... |
!m @aandis !m * |
Coming back from #4148 (comment)
|
More later! |
Local. 👍
|
Okay! Now what's up with the tests? |
Picking up in #4158 ... |
Part of #4148.
We need to load npm into our database and keep it up to date, in order to enable the
/on/npm/
,/on/npm/foo/
, and/search
changes we want to make.