-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add Django v1.11, 2.0 support #33
Conversation
* Drop Django 1.8, 1.9, 1.10, and Python 3.3 support * Add URL namespacing * Move documentation into README.md and standardize layout * Convert CI and coverage to CircleCi and CodeCov * Add PyPi-compatible long description
update changelog
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
=========================================
Coverage ? 82.05%
=========================================
Files ? 15
Lines ? 758
Branches ? 110
=========================================
Hits ? 622
Misses ? 102
Partials ? 34
Continue to review full report at Codecov.
|
Hi @paltman and @jacobwegner! This PR supports MGH desire to use Django 2.0. I've applied many of the lessons learned in Pinax here, but there were a lot of changes so I'd appreciate a review from one or both of you when possible. MGH upgrade is blocked pending this update. Thanks in advance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grahamu thanks for your work here; I had started some changes to linting / CI in another branch but hadn't made it as far.
I think the changes to classification / release to 1.0 are long overdue, and it fits in that the URL namespace is also a backward-incompatible change.
I left a few small comments on some of the linting scripts needing to be updated from expecting a pinax
directory structure to formly
.
I'm curious as to why the tests show as passing when there was clearly an error; perhaps a return code is getting silenced:
https://circleci.com/gh/eldarion/formly/9
Once the linting / coverage changes are made, I think this is good to go.
setup.py
Outdated
|
||
setup( | ||
author="Patrick Altman", | ||
author_email="paltman@eldarion.com", | ||
description="a dynamic form generator", | ||
description="A forms/survey generator for dynamically constructor multi-page surveys", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps "for dynamically constructed multi-page surveys"?
tox.ini
Outdated
skip_glob=**/*/migrations/* | ||
|
||
[coverage:run] | ||
source = pinax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pinax --> formly
tox.ini
Outdated
coverage report -m --skip-covered | ||
|
||
[testenv:checkqa] | ||
commands = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pinax --> formly
tox.ini
Outdated
max-complexity = 10 | ||
exclude = formly/migrations/*,docs/* | ||
exclude = **/*/migrations/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this exclusion glob might need to change to pick up formly/migrations
tox.ini
Outdated
known_third_party=appconf | ||
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER | ||
include_trailing_comma=True | ||
skip_glob=**/*/migrations/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formly/migrations
Thanks so much @jacobwegner, good catches! Since this code is used in production I'll examine expected test failures in more detail, and bump test coverage as needed. |
plac8
My testing shows Further disclosure: The documentation has been converted to single README.md file, no longer published to ReadTheDocs. Hopefully that's not a problem. |
@grahamu yep; saw the docs change and am +1 |
@jacobwegner Since we're updating formly urls with namespacing and legacy projects will need to update all these references anyway, what do you think about simplifying the url names, removing the Older version: The |
@jacobwegner
My guess is nobody has run into this because nobody has used these Page methods. I can hack together a solution by assigning a temporary unused page_num during the swap, or we can remove these methods entirely from the Page model and then restore correctly if/when needed. Your thoughts much appreciated, thanks. |
Add test factories and helper mixins Add test dependencies
f-strings introduced in Python 3.6 unittest.mock introduced after Python 2.7
Improve test execution speed via settings.
Require Django 1.11+
@grahamu I'm +1 on removing the broken page manipulation methods and to your URL changes (since we're disclosing the backwards incompatible changes as part of the release). |
Thanks @jacobwegner, appreciate your feedback! |
Add page and field create view tests. Improve "duplicate survey" view test coverage.
Add commentary to `pragma: no cover` comment
Remove "View" suffix on name Fix missing context data when form is invalid
Remove .coveragerc in favor of single point of truth: tox.ini.
Reviewer Notes
on_delete=models.CASCADE
ormodels.SET_NULL
. Pretty sure I got this right, but sure would be nice to double check.