Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/Update python packages #379

Closed
17 of 18 tasks
JohnMwashuma opened this issue May 3, 2023 · 1 comment · Fixed by #389
Closed
17 of 18 tasks

Upgrade/Update python packages #379

JohnMwashuma opened this issue May 3, 2023 · 1 comment · Fixed by #389
Assignees

Comments

@JohnMwashuma
Copy link
Member

JohnMwashuma commented May 3, 2023

Context


Some of the packages being used are a bit outdated and therefore we need to update some and remove/replace deprecated one's.

Task check list


  • Bump up django to version 4.0.0
  • Bump up django-datatables-view to version 1.20.0. This version supports version Django 4.0.3.
  • Bump up django-guardian to version 2.4.0. This version supports django version 4.0 although they say it's only being used in their github ci action for running tests. Check.
  • Bump up django-tracking2 to version 0.5.1
  • Bump up six to version 1.16.0
  • Bump up mock to version 5.0.2
  • Bump up django-reversion to version 5.0.4
  • Bump up django-debug-toolbar to version 4.0.0
  • Remove django-nose by performing the following tasks:
    • Remove TEST_RUNNER and NOSE_ARGS variables in all settings and templates file inside tallyho ansible role.
    • Update the --settings flag in coverage run command inside the github action file to use common settings instead of dev settings. This will set the log level to INFO when running tests so that the outputs are not too verbose.
  • Remove django-enumfields and update enum classes to use default Django enums, however this is not urgent since the current version still works with Django 4. Check this documentation on how to define enum fields in models.
  • Update the following import statements:
    - from django.utils.translation import ugettext_lazy as _ to from django.utils.translation import gettext_lazy as _.
    - from django.utils.translation import ugettext_lazy to from django.utils.translation import gettext_lazy.
  • Rename staticfiles template filter to static.
  • Rename models.NullBooleanField fields inside models to models.BooleanField(null=True) and create and apply migrations.
  • Set the following env var in common.py settings file
    • DEFAULT_AUTO_FIELD='django.db.models.AutoField'
    • Also update the templates file inside tallyho ansible role.
  • Fix failing tests if any, at least 5 tests should be failing.
  • QA the full app.

Related to


  • Test packages upgrade #389 Working skeleton changes of the above task check list. This PR has all the changes suggested above and the app is running except for a few tests that are failing.
@peterMuriuki
Copy link
Contributor

  • Bump up six to version 1.16.0

do we still need six if we are moving to python v3

peterMuriuki added a commit to onaio/ansible-tally-ho that referenced this issue Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants