Giter Club home page Giter Club logo

fantasy-anime-league's Introduction

Fantasy Anime League Engine

Travis (.org) Codecov Python version Code style: black PRs Welcome

Setup

pipenv requirements

# if pipenv is not already installed
$ pip install --user pipenv
...
# if end user
$ pipenv install
...
# if dev
$ pipenv install --dev
...
# activate the Pipenv shell
$ pipenv shell
...
  • be sure to run git secret reveal after checking out master to decrypt files containing private keys for development
  • you may also need to run git secret tell <[email protected]> before being able to decrypt them
  • After tunnelling with PuTTY, you will be asked for login credentials. Adding your public key for SSH access will make your login process slightly easier.
  • You may wish to use a desktop client such as HeidiSQL for convenience.
    • Contact the owners of Fantasy Anime League for an individual db user account to be created for you.

Order to run scripts

Preseason (before registration)

$ python run_fal.py --collect-series
$ python run_fal.py --ptw-counter

Preseason (after registration)

$ python run_fal.py --load-teams
$ python run_fal.py --headcount
$ python run_fal.py --team-overview
$ python run_fal.py --team-stats
$ python run_fal.py --team-dist

Midseason

  • Save backup of database first!
$ python run_fal.py --init-week
$ python run_fal.py --bench-swap
$ python run_fal.py --load-aces
$ python run_fal.py --anime-weekly-stats
$ python run_fal.py --team-score

# If you are confident
$ python run_fal.py --init-week --bench-swap --load-aces --anime-weekly-stats --team-score

fantasy-anime-league's People

Contributors

abhinavk99 avatar dependabot[bot] avatar keiclone avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

keiclone

fantasy-anime-league's Issues

total score calculations are wrong

week 8 results sample:
{
"name": "Actors: Songs Connection",
"total_points": 4787,
"watching": 2256,
"completed": 0,
"dropped": 685,
"score": 5.98,
"favorites": 24,
"forum_posts": 11
}

actual results:
Actors: Songs Connection
Episode discussion posts (21): 525
Users watching: 2273
In 19 or fewer active teams: watching points x2
Users dropped (704): -4224
Favorites (24): 1200
Total points: 2047

why is total points so far off?

move season info into db

does it make sense that we keep going back to the config file for things like number of actives, number of bench, min weeks between swaps?

shouldn't these be fixed when the season is created? if the config file changes for season info we'd have some pretty undefined behavior going on.

Fix 'six' issue with dateutil.parser

maybe we need to use a different date parsing library?

python run_fal.py --collect-series
Traceback (most recent call last):
  File "run_fal.py", line 19, in <module>
    from fal.controllers.load_teams import team_ages, load_teams
  File "/mnt/c/Users/kei-clone/workspace/fantasy-anime-league/fal/controllers/load_teams.py", line 6, in <module>
    from dateutil.parser import parse
  File "/home/kei-clone/.local/share/virtualenvs/fantasy-anime-league-hKlN2DrN/lib/python3.8/site-packages/dateutil/parser/__init__.py", line 2, in <module>
    from ._parser import parse, parser, parserinfo, ParserError
  File "/home/kei-clone/.local/share/virtualenvs/fantasy-anime-league-hKlN2DrN/lib/python3.8/site-packages/dateutil/parser/_parser.py", line 42, in <module>
    import six
ModuleNotFoundError: No module named 'six'

Use a more elegant method to validate usernames

Currently, check_usernames.py relies on a regex search of the MAL profile pages in order to determine whether a username is an actual MAL profile. This is a very brittle process that has already been broken and will break every time MAL changes anything significant in their DOM for the profile pages.

run all scripts from fal.py

To simplify the workflow and be more aligned with the general structure of a python package, we should have a single entry point to all functionality in the FAL engine. Most likely, fal.py can be the entry point with a main that uses argparse from the command line to determine which script to run for which feature. This would be preferred over running different disparate scripts, especially from the src directory.

improve how we process bench swaps

currently we use a combination of requests and regex to get the bench swaps from MAL's forum posts. we should use something less brittle like Beautiful Soup instead.

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.