Coder Social home page Coder Social logo

Comments (11)

bittner avatar bittner commented on August 12, 2024

Well spotted! How could that stay in the code unnoticed for so long? It's probably time to add some tests.

I think this mistake is less likely to happen when statements like that are split up into 2 lines. The code also gets more readable and self-explanatory:

member_groups = request.user.groups.all()
list_list = List.objects.filter(group__in=member_groups).order_by('group', 'name')

Do you want to prepare a pull request?

from django-todo.

will-rowe avatar will-rowe commented on August 12, 2024

Great - I'm glad I wasn't making a mistake! I agree re. splitting the statements.

I'm not entirely sure what to do re. pull requests, particularly as the mistake isn't actually in the views.py file on github and the error is being introduced during pip installation? Any help would be much appreciated.

from django-todo.

bittner avatar bittner commented on August 12, 2024

Hmmm, when looking at the code (HEAD revision) it's all correct. The braces are there: views.py, line 55

Oh, I see: The changes that fixed the problem have been recently introduced, in commit 8ee2811. And the 1.5 version released on PyPI is older than that. In other words at release of a new version is needed. -- @shacker are you fine with that?

from django-todo.

shacker avatar shacker commented on August 12, 2024

Good sleuthing @bittner and thanks as always for handling the pypi releases. I actually was planning to introduce this weekend the new feature we discussed - adding the ability to create "Anyone" tickets. If you can hold off for the weekend, we can get that in place. Unless you think it makes sense to do two pypi releases.

from django-todo.

bittner avatar bittner commented on August 12, 2024

Perfect! Then please go ahead with the feature enhancements. Let's have a 1.6 release as soon as you're done with that.

Tests?

What do you think, can you manage to add some first tests, too? Either unit tests (preferably with py.test) or even BDD tests (using behave and behave-django)? I can then help you with cross-version testing using tox and running the tests on a build server (Travis, Codeship, etc.).

django-todo does not state anything about Python/Django version compatibility yet. And Python 3 is approaching as the default in huge leaps. tox is pretty cool with being ready to face that, you can see it in action in some of the projects I (co-)maintain:

from django-todo.

shacker avatar shacker commented on August 12, 2024

OK, last night I refactored/modernized a bunch of crufty old code in todo, and today I added the ability to file unassigned tickets (these appear in the UI as "Anyone" tickets). Please give it a spin and let me know if you encounter any issues.

As for python 2/3 compatibility, I used to run it in python2 and today created a new virtualenv with python3 and that worked just fine, so I'm pretty sure we're good there. I've just added a note about this to the wiki documentation.

As for testing, you're totally correct of course, and it's a bit embarrassing not to have them. As ever, it's mostly a time thing. But I should really kick that off soon (unless you feel inspired to!)

Anyway, give it a spin and hopefully we can go forward with the 1.6 release.

from django-todo.

bittner avatar bittner commented on August 12, 2024

@shacker You're sure we're good there now. What about when the next PR comes along? How can you be sure your app will continue to work? You can't.

The only way to protect an app against regression and breakage is tests, which are run automatically when changes are introduced. See how we guard against regression and breakage in django-analytical and behave-django across all supported Python and Django versions.

In codeship-yaml I even run flake8 against all supported Python versions, because the checks are slightly, just slightly different on py3 vs. py2. That's even without any serious tests yet. Could be a starter example for you.

from django-todo.

shacker avatar shacker commented on August 12, 2024

Hey, you don't have to sell me on the importance of tests! I know missing tests are a wart on django-todo; just haven't gotten around to it. Back-story: this was the first Django app I ever wrote, 10 years ago, as a way to bring myself up to speed. Over that time I've maintained it lightly, but have never been able to convince an employer to use it instead of commercial offerings like Jira etc. I enjoy working on it sometimes, but don't have the time or motivation to put in a ton of time. But I am happy to shepherd its existence as an open source project. Contributions always welcome!

from django-todo.

bittner avatar bittner commented on August 12, 2024

I've added the basis for automated tests and QA to the project in PR #29.

After merging can you please test the package manually once again to make sure it still works (I removed an import in settings), and bump the version number to 1.6, please? I'll then push version 1.6 to PyPI, and we can party. 🎉

from django-todo.

bittner avatar bittner commented on August 12, 2024

I've released version 1.6 on PyPI. Let's party!

from django-todo.

shacker avatar shacker commented on August 12, 2024

Awesome, thank you! I'll get that Travis repo set up tonight, hopefully.

from django-todo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.