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

Python 3.7 + Django 2 #107

Merged
merged 33 commits into from
Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d351392
Initial work on updating to Django 2.x
jpadilla Aug 30, 2018
d481780
Add factories for Comments, Departments, Professors, Universities, Users
rnegron Nov 5, 2018
6cfeb6a
Update Django 2.1 -> 2.1.3, install factory-boy
rnegron Nov 5, 2018
428e2b9
Apply isort
rnegron Nov 5, 2018
c3e2ae6
Fix typo in comment, fix UniversityFactory
rnegron Nov 5, 2018
6a166ff
Add model tests for comments, departments, professors and universities
rnegron Nov 6, 2018
1253cfe
Update travis file for Python 3.7
rnegron Nov 6, 2018
1c08349
Add some model unittest to user app
rnegron Nov 6, 2018
0a0c5fd
Python 3.7 is not yet available in main travis builds... Apply workar…
rnegron Nov 6, 2018
88bc437
Apply isort to pass build
rnegron Nov 6, 2018
23ee50f
Update Django, django-storages and Werkzeug. Add some f-strings. isor…
rnegron Dec 24, 2018
33bde56
Pass isort
rnegron Dec 24, 2018
de7b144
Update packages
rnegron Dec 24, 2019
d709356
Fix breaking base_name change
rnegron Dec 24, 2019
f16d6a6
Update runtime
rnegron Dec 25, 2019
4a07f2e
Update packages
rnegron Dec 25, 2019
0750fcd
Fix whitenoise package
rnegron Dec 25, 2019
7a92d0c
Add testing to docker entrypoint
rnegron Dec 25, 2019
5cdc486
Add custom test command / overwrite
rnegron Dec 25, 2019
52296fe
ugettext -> gettext
rnegron Dec 25, 2019
a4cfc01
Add black and isort to dependencies
rnegron Dec 25, 2019
b1407a4
black + isort
rnegron Dec 25, 2019
2869c18
Upgrade isort/black settings, exclude migrations
rnegron Dec 25, 2019
d89755f
Update pre-commit settings
rnegron Dec 25, 2019
1193ab5
Flake8
rnegron Dec 26, 2019
238e863
Update travis
rnegron Dec 26, 2019
3d67e90
Check for pip3
rnegron Dec 26, 2019
1f55f11
Try to use python3 venv
rnegron Dec 26, 2019
baaf08b
Don't use minimal image
rnegron Dec 26, 2019
96f7831
Create an env file on the fly during before_script
rnegron Dec 26, 2019
36ceead
Add SECRET_KEY to env file
rnegron Dec 26, 2019
0606fd7
Move env vars to docker-compose
rnegron Dec 26, 2019
b7049af
Remove conflicting custom test command
rnegron Dec 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[settings]
atomic=true
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
combine_as_imports=True
line_length=88
known_first_party=notaso
known_third_party=django
known_third_party = autoslug,braces,configurations,django,django_filters,dotenv,factory,import_export,pytz,rest_framework,rest_framework_swagger
skip=migrations
include_trailing_comma=true

9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
repos:
- repo: https://github.com/ambv/black
rev: 18.6b4
rev: 18.9b0
hooks:
- id: black

- repo: https://github.com/asottile/seed-isort-config
rev: v1.6.0
hooks:
- id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.4
hooks:
- id: isort

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
rev: v2.1.0
hooks:
- id: flake8
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
language: python
python:
- "3.6"
sudo: required
dist: xenial
python: "3.7"

services:
- docker
install:
- pip install black isort flake8

script:
- black --check .
- isort --recursive --check-only --diff
- flake8
- ./run-tests.sh
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM python:2.7-alpine3.7
FROM python:3.7-alpine3.8

ENV LANG en_US.utf8

# Install build dependencies
RUN apk add --no-cache --virtual .build-deps build-base

RUN apk add --no-cache \
git \
postgresql-dev \
libffi-dev \
libxml2-dev \
libxslt-dev
libffi-dev

RUN pip install pipenv

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
All of "Notaso" is licensed under the MIT license.

Copyright (c) 2010-2018 José Padilla
Copyright (c) 2010-2019 José Padilla

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 23 additions & 21 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,42 @@ verify_ssl = true
name = "pypi"

[packages]
boto = "==2.49.0"
cryptography = "~=2.3"
dj-database-url = "==0.5.0"
django-allauth = "==0.36.0"
django-autoslug = "==1.9.3"
django-allauth = "==0.41.0"
django-autoslug = "==1.9.6"
django-braces = "==1.13.0"
django-configurations = "==2.1"
django-cors-headers = "==2.4.0"
django-debug-toolbar = "==1.9.1"
django-dotenv = "==1.2"
django-extensions = "==2.1.0"
django-filter = "==1.1.0"
django-import-export = "==1.0.1"
django-configurations = "==2.2"
django-cors-headers = "==3.2.0"
django-debug-toolbar = "==2.1"
django-dotenv = "==1.4.2"
django-extensions = "==2.2.5"
django-filter = "==2.2.0"
django-import-export = "==2.0"
django-rest-swagger = "==2.2.0"
django-secure = "==1.0.1"
django-storages = "==1.1.8"
djangorestframework = "==3.6.3"
gunicorn = "==19.9.0"
lxml = "==3.3.5"
django-storages = "==1.8"
djangorestframework = "==3.11.0"
gunicorn = "==20.0.4"
memoize = "==1.0.0"
"psycopg2-binary" = "==2.7.5"
psycopg2-binary = "==2.8.4"
pytz = "==2018.5"
raven = "==6.9.0"
whitenoise = "==2.0.6"
Django = "==1.11.15"
raven = "==6.10.0"
whitenoise = "==5.0.1"
Django = "<3"
Markdown = "==2.6.4"
MarkupSafe = "==1.0"
Werkzeug = "==0.9.4"
Werkzeug = "==0.16.0"
factory-boy = "==2.12.0"
boto3 = "==1.10.45"

[dev-packages]
pre-commit = "*"
black = "*"
isort = "*"
flake8 = "*"

[requires]
python_version = "2.7"
python_version = "3.7"

[pipenv]
allow_prereleases = true
Loading