anitab-org / mentorship-backend

Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the backend of this system.
https://mentorship-backend-temp.herokuapp.com/
GNU General Public License v3.0
196 stars 449 forks source link

chore : added poetry for package management #1077

Open vj-codes opened 3 years ago

vj-codes commented 3 years ago

Description

This PR is a continuation of #914 which uses Poetry has the default dependency management tool

Fixes #691

Type of Change:

How Has This Been Tested?

Checklist:

Code/Quality Assurance Only

codecov[bot] commented 3 years ago

Codecov Report

Merging #1077 (d0ed903) into develop (8924616) will decrease coverage by 0.23%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1077      +/-   ##
===========================================
- Coverage    94.94%   94.71%   -0.24%     
===========================================
  Files           38       39       +1     
  Lines         2058     2063       +5     
===========================================
  Hits          1954     1954              
- Misses         104      109       +5     
Impacted Files Coverage Ξ”
scripts.py 0.00% <0.00%> (ΓΈ)
vj-codes commented 3 years ago

@isabelcosta hey I have resolved the conflicts from the previous PR , as expected all commits have been included in this PR, and about poetry add psycopg2 I need to install poetry first πŸ‘€ but all that's need to be done is to use the command and commit right?

vj-codes commented 3 years ago

@isabelcosta @epicadk I've added psycopg2 and made the requested changes , poetry: command not found this error is shown when I updated gh actions to run tests with poetry so I reverted the change After using poetry locally here are my inputs- 1) poetry run start and poetry run tests works as expected 2) poetry shell probably creates a virtual env but the word venv does not appear like it used to before so how to confirm the activation? 3) And what are those codecov warnings about on github?

Screenshot (3)

vj-codes commented 3 years ago

The label was still on needs review due to which I forgot there were changes requested, will update them and resolve the conflict in a day!

isabelcosta commented 3 years ago

Ok so to test this, we should:

  1. Clone the repo
  2. Set it up from scratch like a newcomer
  3. Check if the setup was successful

Goal: We need to check that all the necessary instructions on README are enough to set this successfully as a newcomer would.

cc @anitab-org/mentorship-maintainers

devkapilbansal commented 3 years ago

Ok so to test this, we should:

  1. Clone the repo
  2. Set it up from scratch like a newcomer
  3. Check if the setup was successful

Goal: We need to check that all the necessary instructions on README are enough to set this successfully as a newcomer would.

cc @anitab-org/mentorship-maintainers

Hi, I setup the repository locally and this are the problems I found.

  1. I have to setup the PATH manually. It is written in install instructions that path will be set automatically but that didn't happen in my case.
  2. I followed the steps mentioned in README but have to navigate to last for installing the dependencies. I would suggest adding the section link after Installing poetry.
  3. I got port already in use error when I tried running the app. I changed it to 4000 then and app worked normally. Although I am not sure if this was a problem in the code or with my system only.
vj-codes commented 3 years ago

@devkapilbansal what PATH are you speaking about and which OS?

devkapilbansal commented 3 years ago

@devkapilbansal what PATH are you speaking about and which OS?

@vj-codes path to Poetry in environment. I tried it on Ubuntu 20.04

vj-codes commented 3 years ago

@devkapilbansal in my case it did get set automatically on windows though I agree with moving the commands to keep them in the same place πŸ‘

vj-codes commented 3 years ago

@devkapilbansal I've moved the commands and about the path we can't do anything as it's a part of poetry docs and not here @gaurivn can you test it please and share if you also have the same issue? Or maybe we can add something like if the commands don't work after installing try setting up the path manually, what say?

devkapilbansal commented 3 years ago

@vj-codes runnimg this command do the needful for me export PATH=$HOME/.poetry/bin:$PATH

We can add this if in case poetry doesn't work after installation. What's say?