Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

onboard @kzisme #253

Closed
chadwhitacre opened this issue Jun 16, 2015 · 93 comments
Closed

onboard @kzisme #253

chadwhitacre opened this issue Jun 16, 2015 · 93 comments

Comments

@chadwhitacre
Copy link
Contributor

Got a first PR from @kzisme at gratipay/gratipay.com#3559.

@kzisme Here's a ticket to help you get onboarded. Any random questions you have about contributing to Gratipay, feel free to ask them here. How can we help you contribute more?

@chadwhitacre chadwhitacre changed the title onboard kzisme onboard @kzisme Jun 16, 2015
@kzisme
Copy link

kzisme commented Jun 16, 2015

Is there anything specific that needs done that could be considered entry level?

Also - as I go through older issues that are still open should I drop a comment if they should be closed if they haven't been just yet?

@chadwhitacre
Copy link
Contributor Author

Is there anything specific that needs done that could be considered entry level?

@kzisme We have several email notifications we want to start sending out. gratipay/gratipay.com#3526 is probably the easiest to start with. Look good?

Also - as I go through older issues that are still open should I drop a comment if they should be closed if they haven't been just yet?

Yes, please!

@chadwhitacre
Copy link
Contributor Author

@kzisme May I add you as a collaborator on GitHub? That will allow you to create topic branches in our main repo, as well as work with labels on issues.

@kzisme
Copy link

kzisme commented Jun 17, 2015

@whit537 My goal is to try to address at least one issue/day, so we'll see how that shapes up. If you have any other suggestions and such don't hesitate to let me know.

Also I'll drop a line here if I have any other questions :)

@kzisme
Copy link

kzisme commented Jun 17, 2015

@whit537 You're more than welcome to. I've been reading more about Gratipay as well - does an mailing list currently exist?

@chadwhitacre
Copy link
Contributor Author

You're more than welcome to.

Awesome, thanks! Invite sent. :)

Once we bring back our payroll feature we can add you there as well.

I've been reading more about Gratipay as well - does an mailing list currently exist?

You mean an internal development mailing list? Naw, we just use GitHub. :-)

Here's the documentation for our communication channels.

Also I'll drop a line here if I have any other questions :)

Perfect. We can close this once you have a couple good PRs under your belt.

BTW, have you been able to set up a local Gratipay dev environment?

@kzisme
Copy link

kzisme commented Jun 17, 2015

have you been able to set up a local Gratipay dev environment?

I haven't had time to do that just yet - I'll try to do that tonight. Thus far, I've been reading about the dependencies and such.

You mean an internal development mailing list? Naw, we just use GitHub. :-)

Well, I'm just happy to see some activity! I hope I can offer some sort of help and learn a bit :)

@chadwhitacre
Copy link
Contributor Author

Thus far, I've been reading about the dependencies and such.

The heaviest dependency is Postgres. What OS are you using?

@kzisme
Copy link

kzisme commented Jun 17, 2015

Currently, Windows 7/8 (depending on machine)

@chadwhitacre
Copy link
Contributor Author

Okay, iirc in the past I've had good luck with these Postgres installers on Windows. We're on 9.3 in production.

@kzisme
Copy link

kzisme commented Jun 17, 2015

@whit537 I'll spend my spare time during the day today playing catch-up on docs and where Gratipay currently stands. There seems to be a lot going on with #3399 and I'm reading through all that trying to get an understanding.

It's a lot to take in + looking at code 📦

Oh - I'll check that installer out! Thanks for the link, I'm considering buy a new dev machine in the near future as well :)

@chadwhitacre
Copy link
Contributor Author

Yeah, #3399 is big right now. Check the Radar for current status.

@kzisme
Copy link

kzisme commented Jun 17, 2015

Sifting through #3399 and the Radar for now - I suppose I'll add what I can without getting in the way 👍

@kzisme
Copy link

kzisme commented Jun 18, 2015

@whit537 I got Postgres installed and working last night - I suppose the next challenge for me is getting Make/gcc toolchain running so that I can build the project.

@chadwhitacre
Copy link
Contributor Author

@kzisme We don't have a good Windows development story right now, I'm afraid. @techtonik has been working on a Vagrant-based solution (want to give us a status update on that, @techtonik?). If you're installing directly into Windows I think it'd make more sense to try to install pre-compiled binaries of our Python dependencies that have C extensions (e.g., psycopg2) rather than trying to build them yourself. Also, I'm not sure of the state of Aspen on Windows; over on AspenWeb/pando.py#442 we're looking at implementing continuous integration for Aspen, after which we should do the same for Gratipay.

@kzisme
Copy link

kzisme commented Jun 18, 2015

Yeah I'm not surprised - Windows always makes building any project a hassle.

install pre-compiled binaries of our Python dependencies that have C extensions

I suppose I'll look into how to do this today

Also, if you dont mind me asking what sort of dev environment/OS do you use?

@chadwhitacre
Copy link
Contributor Author

Personally? I'm on Mac OS.

@chadwhitacre
Copy link
Contributor Author

Windows always makes building any project a hassle.

But it's ubiquitous, cheap, and easy. :)

@kzisme
Copy link

kzisme commented Jun 18, 2015

But it's ubiquitous, cheap, and easy. :)

As long as it's possible to get it working :-P

@rohitpaulk
Copy link
Contributor

@kzisme - If you're okay with running an Ubuntu VM within Windows, run this script on a fresh image followed by make run and you should be ready to go 💃

@kzisme
Copy link

kzisme commented Jun 18, 2015

@rohitpaulk That's a pretty quick way to get up and running! I'll take a look at setting up a VM today 😃

@chadwhitacre
Copy link
Contributor Author

!m @rohitpaulk @kzisme

@kzisme
Copy link

kzisme commented Jun 19, 2015

@whit537 Just starting to get a VM up and running - I'm curious though....What market is Gratipay focused on? More on the individual or a team?

Just been reading and thinking a lot 😏 I've been keeping up with all that's been happening as well. Great progress in the past week even :D

@chadwhitacre
Copy link
Contributor Author

@kzisme Good question! We recently pivoted to focus more on teams. The ticket for the pivot is, serendipitously, #180! 💃

@kzisme
Copy link

kzisme commented Jun 19, 2015

@whit537 Do you know how most people find out about Gratipay? I've been looking around at our competitors, and I was surprised to find out where some of them have found business (or users).

One of the things I have been thinking about is trying to market Gratipay towards individuals/teams for Twitch channels. I saw Patreon does the same, but reaching - or at least making our presence(or impending presence with 2.0) known to individuals/teams.

The reason these users would possibly be interested in something like Gratipay is because they either

  1. They haven't passed the threshold of followers to generate funds from viewers
  2. Haven't found sponsorship from a company, but have a decently sized following

Just throwing ideas around 😸

@kzisme
Copy link

kzisme commented Jun 21, 2015

@whit537 What email is it best to reach you at for other questions? I have a few random ones I'd like to bounce off of you - if you don't mind :D

@chadwhitacre
Copy link
Contributor Author

[email protected]—I'll probably bounce them back to public channels, though. ;-)

@kzisme
Copy link

kzisme commented Jun 21, 2015

That's fine :) they would probably be useful to others as well. I know most
of your policies for transparency and openness - I'll shoot you an email
today
On Jun 21, 2015 1:02 PM, "Chad Whitacre" [email protected] wrote:

[email protected]—I'll probably bounce them back to public channels,
though. ;-)


Reply to this email directly or view it on GitHub
#253 (comment)
.

@kzisme
Copy link

kzisme commented Dec 20, 2015

Also running postgres createuser --superuser $USER

returns

postgres: invalid argument: "createuser"

@rohitpaulk
Copy link
Contributor

@kzisme - Try just createuser --superuser $USER (without the postgres)?

@kzisme
Copy link

kzisme commented Dec 20, 2015

 createuser: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

@kzisme
Copy link

kzisme commented Dec 20, 2015

The files belonging to this database system will be owned by user "kevinzita".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".

@kzisme
Copy link

kzisme commented Dec 20, 2015

screen shot 2015-12-20 at 16 27 31

Success! !m @rohitpaulk and @whit537 for hanging in there through my questions!

@rohitpaulk
Copy link
Contributor

Aha, we're close

@rohitpaulk
Copy link
Contributor

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

@rohitpaulk
Copy link
Contributor

Perfect :)

@kzisme
Copy link

kzisme commented Dec 20, 2015

After running the provided commands - make test and make run worked.

Any other tips about stopping the service or general things I might run into @rohitpaulk?

I gotta run some errands ,but I'll look at it soon.

@chadwhitacre
Copy link
Contributor Author

Nice! 💃

!m @kzisme @rohitpaulk

@kzisme
Copy link

kzisme commented Dec 21, 2015

@whit537 Should I have (or do I have to) request access to fresh desk?

Also does #3548 and #3879 relate to each other? (Does one fix work for both possibly?) Just trying to find a starting point

and some more initial questions!

How do I go about viewing the described actions in each issue (for instance - how do I access the admin panel within my local Gratipay account).
...(may think of more while I'm poking around)

@rohitpaulk
Copy link
Contributor

how do I access the admin panel within my local Gratipay account

Set is_admin on your local user to true. You can do this by running a SQL query via the postgres console ($ psql -d gratipay). Does that help?

@kzisme
Copy link

kzisme commented Dec 21, 2015

Alright just going to update with some progress - Postgres seems super cool BUT it's the first cli db system I've used (My db design course used MSSQL)

[kevinzita@Godric~/projects/gratipay.com$] psql -d gratipay
psql (9.4.5)
Type "help" for help.

gratipay=# SELECT table_name
gratipay-#   FROM information_schema.tables
gratipay-#  WHERE table_schema='public'
gratipay-#    AND table_type='BASE TABLE';
      table_name      
----------------------
 elsewhere
 tips
 exchange_routes
 transfers
 exchanges
 absorptions
 paydays
 communities
 community_members
 statements
 takes
 events
 emails
 email_queue
 balances_at
 participants
 payroll
 payments
 payment_instructions
 teams
(20 rows)

Alright - so it appears I have to add my local user after querying the participants table.

Currently looking for a way to get Postgres to properly align everything after I submit a query...
Using \x auto formats wrapped lines nicely if it doesn't do it automatically.

Also worth noting that...

\list or \l: list all databases
\dt: list all tables in the current database

So I am currently signed in via Github (locally), but I am not listed as a participant - must I add myself via Postgres Query - or since I signed in will (or should I have been added)

@mattbk
Copy link
Contributor

mattbk commented Dec 21, 2015

If you signed in with Github, you should be in the participants table. Wish I could help with Postgres, but I downloaded a GUI (Mac) to help visualize the database.

@kzisme
Copy link

kzisme commented Dec 21, 2015

@mattbk Which GUI Client did you (or do you) use?

@rohitpaulk
Copy link
Contributor

@kzisme - I've used http://www.sequelpro.com/ on the Mac

@mattbk
Copy link
Contributor

mattbk commented Dec 21, 2015

I use https://eggerapps.at/postico/ for the little that I do in the db.

@kzisme
Copy link

kzisme commented Dec 22, 2015

@rohitpaulk Are you able to hop on IRC for a bit?

@kzisme
Copy link

kzisme commented Dec 22, 2015

Update:

So - I tried Sequelpro - looked into it further and it seems that it's only meant for MySQL.

Took another crack at the cli console and found my username by doing the following:

gratipay=# SELECT * FROM participants WHERE username = kzisme;
ERROR:  column "kzisme" does not exist
LINE 1: SELECT * FROM participants WHERE username = kzisme;
                                                    ^
gratipay=# SELECT * FROM participants WHERE id = 101;
-[ RECORD 1 ]----------+------------------------------------------------------
username               | kzisme
session_token          | 6ccbc715f24440c0aa63206f04990419
session_expires        | 2015-12-22 10:54:42.374986+00
ctime                  | 2015-12-21 02:47:55.266991+00
claimed_time           | 2015-12-21 02:47:55.276749+00
is_admin               | f
balance                | 0.00
anonymous_giving       | f
balanced_customer_href | 
is_suspicious          | 
id                     | 101
username_lower         | kzisme
api_key                | 
avatar_url             | https://avatars.githubusercontent.com/u/3493562?s=160
is_closed              | f
giving                 | 0.00
taking                 | 0.00
is_free_rider          | 
email_address          | 
email_lang             | 
is_searchable          | t
old_auth_usage         | 
notifications          | {}
notify_charge          | 3
braintree_customer_id  | 
ngiving_to             | 0
ntaking_from           | 0
status_of_1_0_payout   | completed

Then...

gratipay=# UPDATE participants SET is_admin = true WHERE id = 101;
UPDATE 1

Successfully updated my account with admin privileges.

I've been looking around and I haven't found it documented anywhere, but in test environments we have to use accepted test CC numbers found here

@rohitpaulk
Copy link
Contributor

looked into it further and it seems that it's only meant for MySQL

Whoopsy, sorry about that :) We use MySQL at work, hence the confusion

@rohitpaulk
Copy link
Contributor

SELECT * FROM participants WHERE username = kzisme;

You'll need single quotes around kzisme

@kzisme
Copy link

kzisme commented Dec 22, 2015

Ah, is that why it was searching for columns instead of rows? I figured it was something small like that :)

@rohitpaulk
Copy link
Contributor

I used to use double quotes instead of single quotes and get the same error... Turns out that a single quote is used for a string constant, but double quotes are used for identifiers.

From http://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html:

A string constant in SQL is an arbitrary sequence of characters bounded by single quotes ('), for example 'This is a string'. To include a single-quote character within a string constant, write two adjacent single quotes, e.g., 'Dianne''s horse'. Note that this is not the same as a double-quote character (").

There is a second kind of identifier: the delimited identifier or quoted identifier. It is formed by enclosing an arbitrary sequence of characters in double-quotes ("). A delimited identifier is always an identifier, never a key word. So "select" could be used to refer to a column or table named "select", whereas an unquoted select would be taken as a key word and would therefore provoke a parse error when used where a table or column name is expected. The example can be written with quoted identifiers like this:

@kzisme
Copy link

kzisme commented Dec 22, 2015

Awesome! I've began looking at gratipay/gratipay.com#3845
and have pinged you there 💃

@rohitpaulk
Copy link
Contributor

!m @kzisme

@kzisme kzisme mentioned this issue Dec 31, 2015
@chadwhitacre
Copy link
Contributor Author

@kzisme Seems like you're as onboarded as you're gonna be for now, eh? :-)

@kzisme
Copy link

kzisme commented Jul 1, 2016

@whit537 I would have to agree :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants