Skip to content

Releases: RussellDash332/autokattis

v2.0.2

08 Nov 03:01
Compare
Choose a tag to compare

v2.0.1

12 Oct 14:34
Compare
Choose a tag to compare

What's new:

  • Minor bug fixes found a day after the release of v2.0. Not a fatal bug unless your connection is bad so it takes more than one attempt to perform a request

Full Changelog: v2.0...v2.0.1

v2.0

11 Oct 18:10
Compare
Choose a tag to compare

v2.0 is out!

The main motivation was mainly due to the design itself, though a bit on the functional requirements. I hope this makes it easier to maintain or to add more features in the future. Do take note of these changes should you upgrade it from v1.6.5 or lower.

TLDR: If you're just using the basic functions as per default settings, there is essentially little to no change.

What's new (in ascending order of importance, probably):

  • Logging. This should be able to distinguish if you're using v1.x.x or v2.0.
    # before
    Candidate username(s): ['...']
    Successfully logged in to Kattis!
    
    # after
    [login] Candidate username(s): ['...']
    [login] Successfully logged in to Kattis as ...!
    [database] Listed all available languages!
    [database] Listed all available countries!
    [database] Listed all available universities!
    
  • Better testing. I wanted to have a generalized testing function so it's easier to add more tests in the future. Simply provide a test name, the function, and the arguments, then you're good to go.
  • More documentation. README changes are basic, so I decided to up the ante by adding example JSON return values within each method's docstring whenever necessary. Use the Python help function to read them!
  • Decoupling of main classes. I decided to not make NUSKattis inherit OpenKattis but decouple both and make them inherit a single (abstract) class. This makes it easier to implement more Kattis classes in the future.
  • Database manager. Instead of hardcoding them on a single file, a DatabaseManager that takes the same data directly from Kattis should provide more accurate results, especially the languages provided since they might differ on different Kattis classes. With this, we no longer need the database and the scraper directories.
  • Login manager. Similar to the database manager, this is also made into a separate class LoginManager so that it's easier to handle different login behaviors in the future.
  • More common utilities. Be it a bunch of functions, or just more enums recently added to avoid magic numbers. However, to avoid grandparent relative importing like from ..grandparent import something, I decided to move utils/__init__.py to api/utils.py. Let's see how well that works out later.
  • The methods themselves. Here's some exhaustive changes should you cannot care less about the detailed changes:
    • For OpenKattis
      • You can still use Kattis, but moving forward this package will be using OpenKattis as the term for anything happening at open.kattis.com.
      • problems
        Can still use as usual, except it now supports full/low detail mode. You can still get all existing problems by just doing problems(*[True]*4) as per example on the README.
      • problems_v2
        Is now disabled. Please use problems with low_detail_mode=True arguments. For the record, problems_v2(show_non_ac=True) is currently implemented as problems(low_detail_mode=True, show_solved=False).
      • problem
        Instead of providing variable arguments, aggregate them within a sequence/iterable. For example, use problem(['a', 'b', 'c']) instead of problem('a', 'b', 'c'). It is now optional for you to download the files from the metadata by setting download_files=True.
      • stats
        Same as problem, without the file downloading part.
      • achievements
        verbose is no longer a parameter (with a default value) because I did not see a good reason to have it 😄
      • ranklist
        Now divided to five separate methods: ranklist, user_ranklist, country_ranklist, university_ranklist, and challenge_ranklist.
        • The default remains the same: get users around you.
        • To get the top 100 user ranklist, we no longer use ranklist(top_100=True). Instead, use user_ranklist().
        • To get the country ranklist, we can now get either the top 100 countries or the top 50 users in a specific country (as opposed to only being able to get the latter). So, instead of using ranklist(country=<country>), use either country_ranklist() or country_ranklist(<country>).
        • To get the university ranklist, we can now get either the top 100 universities or the top 50 users in a specific university (as opposed to only being able to get the latter). So, instead of using ranklist(university=<university>), use either university_ranklist() or university_ranklist(<university>).
        • Added challenge ranklist by using the challenge_ranklist method.
    • For NUSKattis
      • problems
        Can still use as usual, except it now ONLY supports low detail mode. You can NO LONGER get all existing problems by just doing problems(*[True]*4) as per example on the old README. Instead, treat this as the new problems_v2. For the record again, problems_v2(show_non_ac=True) is currently implemented as problems(show_solved=False).
      • problems_v2
        Same as the one for OpenKattis, i.e. disabled.
      • problem
        In terms of how you call this method, same as the one for OpenKattis.
        In terms of what it does now, due to security issues, you can't treat it the same as the one for OpenKattis. It will only be accessible (i.e. show some non-empty result) if it is part of an existing course offering, be it a past one or a current one. Check out the docstring for more information about its JSON fields.
      • stats
        Same as the one for OpenKattis.

I hope you enjoy reading all of that (or not?). If any changes are required, v2.0.1 or v2.1 shall await, depending on the significance of the change!

Full Changelog: v1.6.5...v2.0

v1.6.5

27 Jun 19:09
Compare
Choose a tag to compare

Some considerable changes in the UI/UX that made this update to be:

  • NUSKattis now returns 403 upon access to problem statistics, which encourages the use of problems_v2 for NUSKattis
  • NUSKattis doesn't "give" you the problem statement right away when searching for one, so technically it is now inaccessible. This should only affect the tests removal
  • Group/team name is officially a new column in the self-statistics page (both open and NUS Kattis), this affects problems_v2 and stats methods
  • Searching beyond the last page on the problems table will give you an empty table instead of wrapping around the last page

Full Changelog: v1.6.4...v1.6.5

v1.6.4

12 Feb 22:49
Compare
Choose a tag to compare

What's new:

  • problems_v2 method that runs faster due to possible gateway (error code 502 and 504) issues from problems especially for NUSKattis
    • This only lists down the problem (ID)s and not the statistics such as the shortest/fastest solution

Full Changelog: v1.6.3...v1.6.4

v1.6.3

06 Feb 11:11
Compare
Choose a tag to compare

What's new:

  • NUS course assignments are now displaying the problem name instead of the problem ID, so the ID has to be obtained from the hyperlink

Full Changelog: v1.6.2...v1.6.3

v1.6.2

31 Jan 04:31
Compare
Choose a tag to compare

What's new:

  • Due to precision issues, the seaborn plot generated seems to combine multiple bins in one and let the neighboring bins empty, which is not an intended behavior

Full Changelog: v1.6.1...v1.6.2

v1.6.1

22 Jan 11:25
Compare
Choose a tag to compare

What's new:

  • The ranklist method now supports query for top 100 users

Full Changelog: v1.6...v1.6.1

v1.6

16 Jan 11:49
Compare
Choose a tag to compare

What's new:

  • NUSKattis-specific methods!
    • courses: lists down all NUS courses that are currently ongoing and recently ended
    • offerings: lists down all offerings from a particular NUS course
    • assignments: lists down all assignments from a particular NUS course offering
  • new_get and new_post methods to essentially increase the number of retries
  • <get/set>_<base_url/homepage> methods for the sake of OOP
  • Changes to login print message - it should be at the very end of the __init__ method
  • Minor bugfixes, e.g. the 1E+30 issue when there is no data to show on problems
  • Remove strict versioning for pandas and seaborn requirement. There seems to be no apparent issue so far

Full Changelog: v1.5...v1.6

v1.5

16 Dec 20:46
Compare
Choose a tag to compare

What's new:

  • NUSKattis class to access nus.kattis.com counterparts
  • Three new methods:
    • problem_authors to list down all authors
    • problem_sources to list down all sources, e.g. ICPC
    • achievements to list down all achievements (new UI update! 😄)
  • problem has more new columns instead of just having a unified metadata column
  • Bugfixes to handle the new UI and NUS Kattis behaviors
  • Bugfix on dependency between pandas and seaborn
  • New testing script

Full Changelog: v1.4.11...v1.5