schemainspect icon indicating copy to clipboard operation
schemainspect copied to clipboard

Help getting environment set up to contribute

Open roblevy opened this issue 4 years ago • 6 comments

I'm interested in contributing to this repo, but I can't work out your development setup.

There's a tox.ini file, but that wants a setup.py file to run. There used to be a setup.py file but it got removed. Also, the tox.ini refers to requirements.txt but there isn't one as far as I can see!

There's something I'm missing but what is it? Sometimes repositories have some steps in their readme to get you started with development.

Can you help get me started?

roblevy avatar Nov 06 '19 15:11 roblevy

Think I might have figured it out. I created a Python 3.6 virtual environment (needed? Not sure), pip installed poetry then ran poetry install. Does that sound about right?

roblevy avatar Nov 06 '19 16:11 roblevy

Yeah sorry this is not documented very well! You are correct that it has been switched over to poetry.

I stopped using tox so that file can probably be removed, but the flake8 ignores defined in there will need moving to their own file first.

Once you have poetry installed and postgres running locally you should be OK. Do the tests pass for you now?

djrobstep avatar Nov 06 '19 22:11 djrobstep

Thanks for the response! I'm getting

psycopg2.OperationalError: fe_sendauth: no password supplied

So I'm assuming I need an account with some particular login details. I'm investigating now what account details the tests expect. (I assume it's one with the same name as my linux login, but I think I've got such an account, with no password so there's something else going on...)

roblevy avatar Nov 07 '19 12:11 roblevy

Ok, got there. I updated my pg_hba.conf file to include:

local   all             all                                     trust

And used sudo to log into psql and create a database with the same name as my Linux user. Now the tests are passing!

roblevy avatar Nov 07 '19 12:11 roblevy

Great to hear. Should definitely have some better documentation for this.

djrobstep avatar Nov 07 '19 22:11 djrobstep

I drafted a CONRTIBUTING.md and migrated the flake8 config to setup.cfg in https://github.com/SKalt/schemainspect/tree/contributor-setup-instructions. Please feel free to use those patches as part of a larger setup instruction effort!

SKalt avatar Jan 30 '20 02:01 SKalt