Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Comments

Upgrade to Django 2.2 and Python 3#9

Open
electroniceagle wants to merge 69 commits intomasterfrom
github-django-22-python3
Open

Upgrade to Django 2.2 and Python 3#9
electroniceagle wants to merge 69 commits intomasterfrom
github-django-22-python3

Conversation

@electroniceagle
Copy link
Member

This is a combined pull request for Django 2.2 support and Python 3.

Ben Memberg and others added 30 commits March 24, 2020 10:54
Result of running the futirize command on all the python files to
     automatically convert them from pyhon2 to python3.
Imported module for reload() statements and fixed string handling.
In Python3, the 'urlparse' module no longer exists.

In order to support importing 'reload' and 'urljoin' in both
python2 and python3, we need to use the 'six' python2/3
compatibility module.

The following imports work for both python2 and python3:
- from six.moves import reload_module as reload
- from six.moves.urllib.parse import urljoin
This version supports both python2 and python3.
This was created by overlaying files from a fresh django-admin
start-project command using Django 2.2.13.
This was updated using django-admin create-project and folding
back in the few application-specific changes.
This commit starts with a standard django-admin start-project and
folds back in the additions need for testing the app.  The url method
has been deprecated and the path method is used for Django 2 annd 3.
This is the default file created by django-admin start-project for
Django 2.2.13.
This method moved in Django 2 to django.urls.
This is a Python 2 library for Python 3 compatibility and is no
longer needed now that Python 2 is deprecated.
The error return by Django 2.2 uses a more generic message.
We're not prepared to support Django 3.0 yet, so set this version to
the latest 2.0 Django version.
This is mostly taken from the default Django example here:
https://docs.gitlab.com/ee/ci/examples/

This commit adds all of the gitlab-ee security hooks so that
they can get tested in the master branch.
These won't function until everythign is merged to master.
Per the documentation, use the postgres service as the database.  This
is a more realistic test than sqllite.
Fix the manual file creation typo.
This package is required to test using python.
This package is missing from the python image.
These variables need to match the ones in Django settings.
These are needed for running in headless selenium test mode.
This is needed to install additional packages.
This project will also use signed repositories as dependencies
using the pip-compile functionality.
This is generated from requirements.in from make reqs-update.
This is an amalgamation of the original requirements.txt file on
github and the reqs needed to build future documentation.
pep8 has been renamed to pycodestyle (GitHub issue #466)
Use of the pep8 tool will be removed in a future release.
Please install and use `pycodestyle` instead.
Given the added complexity of postgres setup in different
environments, switch the default database configuration back to
sqlite3.  This can get revisited after gitlab-ci is properly
working.
These files will be hosted for the master branch, so create them in
the public file tree to make them artifacts.
All that we need to build docs is to import the common docs project
yaml template.
This causes virtualenv not to be found.
…ab-ci.yml.

There is an interdependency between the yum packages and python packages
in make reqs that means that generic doc building might fail whenver
python dependencies change.  Also, we intend to package code coverage and
selenium test case html files, which have to get built by the pages
target.
This should resolve the error:
Error: pg_config executable not found
The -delete behaves differently than MacOS.
The venv directory has to be in the repository directory to allow
caching, so needs to be ignored by flake8 and pcodestyle.
This commit should add log file folds to the gitlab-ci log report.
These variables are passed to django and the postgres service
during ci testing.
This commit steals the DATABASES setting code from our sites
repository to use the environment variables to set all of the
parameters.
This commit enables an external postgresql container service and
configures the DATABASE_ variables that are passed to Django.
The before_script for the test and deploy stages now installs the base
dependencies using yum, installs chrome and chromedriver.  The script
for test also includes a quick sanity check of postgres.
The make all target is called by gitlab-ci.yml.  This commit fixes
drops make test because it is redundant testing with make coverage.
It adds make tree, which creates an index.html file in the public/
htmlselenium folder for gitlab pages.
This commit adds icons to view the selenium pages from master, view
the coverage report from maser, view the pdf (if exists), view source,
and edit source in the gitlab IDE.
GitLab Initial Migration

See merge request nimbis/sites/django-selenium-testcase!2
This commit adds online documentation, coverage report, and selenium
test to README.md.
This fixes the pages build.

See merge request nimbis/sites/django-selenium-testcase!3
These artifacts, including the docs, coverage, and selenium reports
can be downloaded as an archive and browsed offline for debugging.
This approach reportedly fixes #1.  I'm skeptical that disabling DIND
will break everything else that is centos based.
Fix dependency scanning job.

Closes #1

See merge request nimbis/sites/django-selenium-testcase!4
This version is not backwards compatible with a deprecated version
of python.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants