PyJaipur / SoA

Website for summer of algorithms
https://soa.pyjaipur.org/
9 stars 10 forks source link

Requirements.txt is required. #12

Closed shivankgtm closed 4 years ago

shivankgtm commented 4 years ago

A requirements.txt file is required.

theSage21 commented 4 years ago

We're using poetry in the new soa thing. Is that what you were talking about?

shivankgtm commented 4 years ago

No, when I am cloning it I have to manually install packages.

theSage21 commented 4 years ago

Umm, the old repo did not have any dynamic part so I'm a little confused what you're referring to.

Are you trying to run the soa_2020 branch locally?

shivankgtm commented 4 years ago

Yes yes, soa_2020 locally.

theSage21 commented 4 years ago

I'll set up docker compose in a while so that we can simply do docker-compose up and be done with it. Right now this should work:

cd soa
poetry install
poetry shell
DATABASE_URL='postgres://postgres:password@localhost:5432' \
    GMAIL_APP_PASSWORD='something' \
    python -m soa
shivankgtm commented 4 years ago

Ohh I didn't notice poetry. it is also giving me a value Error for Redis. I don't have an idea in Redis. checked the internet for a solution but nothing seems to work.

Traceback (most recent call last):
  File "/home/shivankgautam/anaconda3/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/shivankgautam/anaconda3/lib/python3.7/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/home/shivankgautam/anaconda3/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/shivankgautam/Desktop/soa/Summer-of-Algorithm/src/soa/__init__.py", line 3, in <module>
    from soa import server
  File "/home/shivankgautam/Desktop/soa/Summer-of-Algorithm/src/soa/server.py", line 4, in <module>
    from soa import models, plugins, mailer, settings
  File "/home/shivankgautam/Desktop/soa/Summer-of-Algorithm/src/soa/plugins.py", line 7, in <module>
    R = redis.from_url(settings.redis_url)
  File "/home/shivankgautam/.cache/pypoetry/virtualenvs/soa-EKXj7JYz-py3.7/lib/python3.7/site-packages/redis/utils.py", line 19, in from_url
    return Redis.from_url(url, db, **kwargs)
  File "/home/shivankgautam/.cache/pypoetry/virtualenvs/soa-EKXj7JYz-py3.7/lib/python3.7/site-packages/redis/client.py", line 673, in from_url
    connection_pool = ConnectionPool.from_url(url, db=db, **kwargs)
  File "/home/shivankgautam/.cache/pypoetry/virtualenvs/soa-EKXj7JYz-py3.7/lib/python3.7/site-packages/redis/connection.py", line 1046, in from_url
    'schemes (%s)' % valid_schemes)
ValueError: Redis URL must specify one of the followingschemes (redis://, rediss://, unix://)

I have installed redis but don't have an idea of how to set connection etc.

theSage21 commented 4 years ago

I've updated the branch with a Makefile that uses docker. You can go through the readme to find instructions on how to setup locally.

Gmail will fail for now since there's no password in the env file. You can use dummy code for soa.mailer.send while developing.

shivankgtm commented 4 years ago

I've updated the branch with a Makefile that uses docker. You can go through the readme to find instructions on how to setup locally.

Gmail will fail for now since there's no password in the env file. You can use dummy code for soa.mailer.send while developing.

ok let me see.