fecgov / fec-eregs

The Federal Election Commission's web-based application that makes regulations easier to find, read and understand.
https://www.fec.gov/regulations/
Other
33 stars 13 forks source link

upgrade django and requests #766

Closed tmpayton closed 1 year ago

tmpayton commented 1 year ago

Summary (required)

This ticket fixes the snyk vulnerbilities in requirements-parsing.txt and requirements.txt

packages upgraded:

Required reviewers 1 developers

Impacted areas of the application

General components of the application that this PR will affect:

Related PRs

Related PRs against other branches: Regulations-Site PR Regulations-Parser PR Regulations-Core PR

How to test

  1. Checkout this branch
  2. Change regparser, regulations, and regcore to point to my branch in requirements.txt and requirements-parsing.txt

regparser

-e git+https://github.com/fecgov/regulations-parser.git@upgrade-django#egg=regparser

regsite

-e git+https://github.com/fecgov/regulations-site@upgrade-django#egg=regulations

regcore

-e git+https://github.com/fecgov/regulations-core@update-django#egg=regcore

Terminal One:

  1. pyenv virtualenv (your virtual environment)
  2. pip install -r requirements.txt
  3. snyk test --file=requirements.txt --package-manager=pip
  4. rm -rf node_modules
  5. npm i
  6. npm run build
  7. dropdb eregs_local
  8. createdb eregs_local
  9. python manage.py migrate
  10. python manage.py compile_frontend
  11. python manage.py runserver (leave running)

Terminal Two:

  1. pyenv virtualenv (your virtual environment)
  2. pip install -r requirements-parsing.txt
  3. snyk test --file=requirements-parsing.txt --package-manager=pip
  4. python load_regs/load_fec_regs.py local
  5. Go to http://127.0.0.1:8000/ to view 45 regulations

For more detailed instructions follow the wiki on how to setup/parse regulations on local environment

This will not pass circle build until other PRs are merged first.

tmpayton commented 1 year ago

Hey Tricia, I think we generally like to keep e-regs consistent with CMS. Cg-django-uua prevents us right now from moving to Django 4, (and Wagtail 4.2.3 prevents us from moving past 4.2)

Do you think it might be better to move to 3.2.19 to remove the vulnerability for right now, and move the CMS and e-regs to 4 together?

@cnlucas Yes, that sounds like a good idea, I'll downgrade it for now!