GithubHelp home page GithubHelp logo

Split models.py up about dipvis HOT 4 CLOSED

UEWBot avatar UEWBot commented on May 30, 2024
Split models.py up

from dipvis.

Comments (4)

UEWBot avatar UEWBot commented on May 30, 2024

Commit 46981f5 splits game scoring out.
Commit ec61a82 splits out items 1 and 2 from the list above.
File sizes are now:
$ wc tournament/*.py
113 379 3718 tournament/admin.py
427 1748 17768 tournament/background.py
103 407 3419 tournament/diplomacy.py
251 1143 9663 tournament/game_scoring.py
0 0 0 tournament/init.py
1345 5431 60720 tournament/models.py
596 2193 28952 tournament/players.py
1366 3649 59415 tournament/tests.py
88 384 5114 tournament/urls.py
1206 4550 56160 tournament/views.py

from dipvis.

UEWBot avatar UEWBot commented on May 30, 2024

Models.py keeps growing (as does views.py):
133 437 4582 admin.py
447 1859 18804 background.py
154 590 5232 diplomacy.py
246 1111 9289 game_scoring.py
362 1819 15516 game_seeder.py
0 0 0 init.py
1960 7688 86538 models.py
756 2672 33260 players.py
62 223 2234 test_background.py
79 227 2767 test_diplomacy.py
299 1076 13603 test_game_scoring.py
423 1314 15260 test_game_seeder.py
2336 6043 101427 test_models.py
198 566 7906 test_players.py
131 482 7169 urls.py
2216 8225 100850 views.py
It's fairly straight-forward to split out TournamentPlayer, SeederBias, and Preference into a separate file, but that's only 160-odd lines. The rest of the classes have a lot of inter-dependencies.
Of course it should be trivial to split views.py up, but that's somewhat tangential to this bug (and I'd want views tests first, to ensure no breakage).

from dipvis.

UEWBot avatar UEWBot commented on May 30, 2024

Looking at views.py, there are very few inter-dependencies. One obvious way to split it is as follows (with rough line counts):

tournament 722
round 540
game 751
player 14
WDD 186
that would be with the functions and related classes in the same file.

from dipvis.

UEWBot avatar UEWBot commented on May 30, 2024

I'm going to go ahead and close this one. A lot of the code has already been split up into many files, and there's work underway to split those files even further.

from dipvis.

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.