Closed cuducos closed 6 years ago
I will test this PR, showing my results:
Clone the project:
$ git clone git@github.com:datasciencebr/jarbas.git
Change to Jarbas folder:
$ cd jarbas
Change to @cuducos branch:
$ git fetch origin
$ git checkout -b cuducos-change-home origin/cuducos-change-home
$ git merge master
Do the changes @cuducos said
Run the project:
$ docker-compose up -d
$ docker-compose run --rm django python manage.py migrate
$ docker-compose run --rm django python manage.py reimbursements /mnt/data/reimbursements_sample.xz
$ docker-compose run --rm django python manage.py companies /mnt/data/companies_sample.xz
$ docker-compose run --rm django python manage.py suspicions /mnt/data/suspicions_sample.xz
$ docker-compose run --rm django python manage.py tweets
$ docker-compose run --rm django python manage.py searchvector
$ docker-compose run --rm django python manage.py check
$ docker-compose run --rm django python manage.py test --parallel
Check:
➜ jarbas git:(cuducos-change-home) ✗ docker-compose run --rm django python manage.py check
Starting jarbas_queue_1 ...
Starting jarbas_postgres_1 ...
Starting jarbas_postgres_1 ... done
Starting jarbas_tasks_1 ... done
System check identified no issues (0 silenced).
Test:
➜ jarbas git:(cuducos-change-home) ✗ docker-compose run --rm django python manage.py test --parallel
Starting jarbas_queue_1 ... done
Starting jarbas_postgres_1 ... done
Starting jarbas_elm_1 ... done
Starting jarbas_tasks_1 ... done
Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
...........................................................................................................................................................................
----------------------------------------------------------------------
Ran 171 tests in 4.787s
OK
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
In development localhost:8000
:
Search vector, combined with year:
Long test, to check if the modification has everything ok! 🎉
What is the purpose of this Pull Request?
Frequently people get to Jarbas in the current home page which is not pretty useful — the Dashboard should be their landing page.
This PR makes the Dashboard the first page users see when visiting https://jarbas.serenatadeamor.org/
What was done to achieve this purpose?
HOME_REDIRECTS_TO
variable in thesettings.py
to configure where users should be redirect when accessing the root of the domain (I thought it might be useful so when we have, for instance, Federal Senate data we can point the home to a menu)core/urls.py
to redirect users accessing root toHOME_REDIRECTS_TO
frontend
for the Elm app (the one with pink/purple colors) was not meaningful anymore (the main frontend is the Dashboard) I renamed it tolayers
, na name I thought was meaningful because this interface shows several layers of information (info about the reimbursement as in the Chamber of Deputies, info about the company as in the Federal Revenue, summary of similar expenses, etc.)/layers/
How to test if it really works?
Comment out the
image
fromdocker-compose
to builddjango
andtasks
containers locally:Start the app and browse the platform. The main point is checking if
localhost:8000
redirects to the list of reimbursements, but going back and forth from the dashboad to layer endpoints is advisable ; )Who can help reviewing it? @anaschwendler @jtemporal