These are chat archives for fossasia/open-event-server

12th
May 2018
Parth Verma
@parth-verma
May 12 2018 08:10
@siddhant-curious it is 10.3
Saurabh Chaturvedi
@schedutron
May 12 2018 12:03
Running nostests tests/unittests is giving a lot of errors like
E2018-05-12 17:30:23.108 IST [26992] ERROR:  must be owner of schema public
2018-05-12 17:30:23.108 IST [26992] STATEMENT:  drop schema if exists public cascade
Saurabh Chaturvedi
@schedutron
May 12 2018 12:13
Even after altering the role john to superuser, I get the same errors.
Parth Verma
@parth-verma
May 12 2018 12:35
For tests the user is different so did you give superuser access to that as well?
Saurabh Chaturvedi
@schedutron
May 12 2018 12:35
I think you're referring to open_event_user?
Parth Verma
@parth-verma
May 12 2018 12:37
Test user from the docs
Saurabh Chaturvedi
@schedutron
May 12 2018 12:37
Yeah, I tried that too, but it gives a different error.
    from itertools import zip_longest
ImportError: cannot import name zip_longest
Parth Verma
@parth-verma
May 12 2018 12:40
That is not due to tests. Itertools is a python built in module
Saurabh Chaturvedi
@schedutron
May 12 2018 12:41
I know :) but this error comes up while running nosetests
I think this is happening due to Python 2-3 mismatch.
What version of nosetests do we use? The one for Python2 or the one for Python3?
Saurabh Chaturvedi
@schedutron
May 12 2018 12:55
I think it's nosetests-3.4 for Python3 as that version gave the least amount of errors.
Areeb Jamal
@iamareebjamal
May 12 2018 13:00
Project is now on Python 3
Mario Behling
@mariobehling
May 12 2018 13:36
:+1:

@niranjan94 @SaptakS @shubham-padia Following up on

@rngadam the external social links (the properties that we're talking about here) are in a separate table with a one-to-many relationship with events table. But, yes. You're right. We'd be better off with a more flexible colum like json. Most of the table structure is from the legacy server. So we actually could do loads of improvements there :)

What are the next steps?

Areeb Jamal
@iamareebjamal
May 12 2018 13:46
I'd like to add that this step of normalization should be given a considerable amount of thought. Because normalization is great, but for data which is always going to return entire schema, like the request for a speaker, it will incur a significant amount of joins which will make performance an issue because a selection of data in the root table will never be loaded without joins in use case of a REST API. Also one to many links is definitely an improvement but we can't reduce redundancy in this case as social links for different users are going to be most likely to different. But yes, in several areas we can have improvements in schema
Mario Behling
@mariobehling
May 12 2018 13:54
@iamareebjamal What do you propose specifically? It looks like this is a blocker to advance with the project. What is your proposed timeline to move ahead?
Saurabh Chaturvedi
@schedutron
May 12 2018 14:04
@iamareebjamal I think we all can agree on some tradeoffs which are good enough for current purposes and which don't turn out to be bottlenecks for project development.
Suneet Srivastava
@codedsun
May 12 2018 14:22

I am setting up the open-event-server, and when I run pip -r requirements.txt it shows me following error

`build/python2.7-l1RrwO/python2.7-2.7.14=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_CONFIG_H -DHAVE_CLOCK_GETTIME=1 -DHAVE_LIBRT=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_STRUCT_SYSINFO=1 -DHAVE_STRUCT_SYSINFO_MEM_UNIT=1 -DHAVE_STRUCT_SYSINFO_TOTALRAM=1 -DHAVE_SYSINFO=1 -DHAVE_SYS_SYSINFO_H=1 -D_FILE_OFFSET_BITS=64 -Iscrypt-1.2.1 -Iscrypt-1.2.1/lib -Iscrypt-1.2.1/lib/scryptenc -Iscrypt-1.2.1/lib/crypto -Iscrypt-1.2.1/lib/util -Iscrypt-1.2.1/libcperciva/cpusupport -Iscrypt-1.2.1/libcperciva/alg -Iscrypt-1.2.1/libcperciva/util -Iscrypt-1.2.1/libcperciva/crypto -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -c scrypt-1.2.1/libcperciva/crypto/crypto_aes.c -o build/temp.linux-x86_64-2.7/scrypt-1.2.1/libcperciva/crypto/crypto_aes.o -O2
scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: openssl/aes.h: No such file or directory

 #include <openssl/aes.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-dbtYVk/scrypt/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-UYPGAF-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-dbtYVk/scrypt/`

Suneet Srivastava
@codedsun
May 12 2018 14:38
@bhaveshAn @srv-twry please check
Bhavesh Anand
@bhaveshAn
May 12 2018 14:38
tell the commands you ran
Suneet Srivastava
@codedsun
May 12 2018 14:41
pip -r requirements.txt
I mentioned above
Bhavesh Anand
@bhaveshAn
May 12 2018 14:41
use python3 -m pip install -r requirements.txt
project supports py3 now
Areeb Jamal
@iamareebjamal
May 12 2018 14:49
Yes the schema should be analyzed and some property types should be fixed and constraints should be added. I think it'd be great if everyone can get behind it and check the optimization which can be done on tables and report it. All I wanted to say that it should be a calculated decision because moving back and forth with normalizing and denormalizing won't be feasible