greenelab / connectivity-search-backend

Django backend for hetnet connectivity search
https://search-api.het.io
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Start django project #1

Closed dhimmel closed 5 years ago

dhimmel commented 6 years ago

I created a blank project using:

django-admin startproject hetmech_backend

This was inside the following environment:

conda create --name=django-backend python=3.7 django pandas

Which installed

    blas:            1.0-mkl                
    ca-certificates: 2018.03.07-0           
    certifi:         2018.10.15-py37_0      
    django:          2.1.2-py37_0           
    intel-openmp:    2019.0-118             
    libedit:         3.1.20170329-h6b74fdf_2
    libffi:          3.2.1-hd88cf55_4       
    libgcc-ng:       8.2.0-hdf63c60_1       
    libgfortran-ng:  7.3.0-hdf63c60_0       
    libstdcxx-ng:    8.2.0-hdf63c60_1       
    mkl:             2019.0-118             
    mkl_fft:         1.0.6-py37h7dd41cf_0   
    mkl_random:      1.0.1-py37h4414c95_1   
    ncurses:         6.1-hf484d3e_0         
    numpy:           1.15.3-py37h1d66e8a_0  
    numpy-base:      1.15.3-py37h81de0dd_0  
    openssl:         1.1.1-h7b6447c_0       
    pandas:          0.23.4-py37h04863e7_0  
    pip:             10.0.1-py37_0          
    python:          3.7.1-h0371630_3       
    python-dateutil: 2.7.3-py37_0           
    pytz:            2018.5-py37_0          
    readline:        7.0-h7b6447c_5         
    setuptools:      40.4.3-py37_0          
    six:             1.11.0-py37_1          
    sqlite:          3.25.2-h7b6447c_0      
    tk:              8.6.8-hbc83047_0       
    wheel:           0.32.2-py37_0          
    xz:              5.2.4-h14c3975_4       
    zlib:            1.2.11-ha838bed_2      

Then I renamed hetmech_backend to django. Paging @dongbohu, should the content of django be moved to the root?

dongbohu commented 5 years ago

It seems to make more sense to put all files generated by django-admin startproject in root directory of the repo. Like this:

hetmech/
├── hetmech
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
└── manage.py

I prefer hetmech as the project name (instead of hetmech_backend) because the repo is named hetmech-backend already.

dhimmel commented 5 years ago

Thanks @dongbohu.

I rearranged the repo according to your suggested architecture. I also renamed hetmech_backend to hetmech. To confirm, this won't create any issues with our existing python package named hetmech right? For example, we will likely want to do import hetmech and have the hetmech package imported rather than the directory here imported.

@dongbohu why don't you do a full review and if you approve, I will merge.

dhimmel commented 5 years ago

@dongbohu ready for re-review