Project-Path-of-Exile-Wiki/PyPoE

PyPoE: Dev To-Do (If you want to contribute, look here).

pm5k opened this issue · 9 comments

pm5k commented

What's this?

This is the non-exhaustive list of things new dev's can pick up and run with in order to make meaningful contributions to the repo. If you have questions, ping the #tools-dev channel on our discord.

To-Do (In order of priority)

If you want to grab one of these, message us on discord or comment on this issue @'ing one of the maintainers and they will add your name to the assigned to. Please only take this on if you're serious about contributing, holding onto a piece of work will prevent someone else from doing it. If no progress is seen within a week or two, we will unassign you and give it to someone else.

  1. Finish the 3.10 and Poetry move as described in #80

    • Assigned to:
    • Completed
  2. Change the setup / installation instructions for DEV in the wiki detailed here
    This requires you to ensure the instructions clearly state how to install Poetry, how to set up the project using Poetry, how to ensure it uses Python 3.10 (and how to set up python 3.10). Running tests, linters, formatters, etc. If you grab this one, ping @pm5k in the discord #tools-dev channel.

    • Assigned to:
    • Completed
  3. Refactor the repo according to flake8 by ensuring that running flake8 results in no errors at all.

    • Assigned to:
    • Completed
  4. Set up pre-commit hooks for the repo so that no changes can be pushed or merges made without tests or linters passing. This can only be done after 3. is done.

    • Assigned to:
    • Completed
  5. Change all occurrences of with open(...) as ... to use pathlib.Path because it uses an in-built context manager which removes the need to use with open() its also a specialised library for handling paths in a OO way and handles Posix paths as well as making it easy for us to consolidate windows/nix/osx pathing and forget about OS specificity (hopefully). Also change things like os.walk, os.path and so on. Anything path related should be changed to use pathlib unless pathlib does not have equivalent functionality in a given case.

    • Assigned to:
    • Completed
  6. Change any and all commonly used parametric string literals to be enums instead. It prevents manual entry fuck-ups common to string literal use in arguments or params and promotes DRY and re-use as well as lends to typing like so:

    # Before
    def something():
      response = get_response("http://some.constant.url.com", 123)
      return response
    
    def something_else():
      response = get_second_response("http://some.constant.url.com", 123)
      return response
    
    # After
    from enum import Enum
    
    
    class CommonURLs(str, Enum):
      SOMECONST = "http://some.constant.url.com"
      POE = "https://www.pathofexile.com"
    
    def something(url: CommonURLs):
      response = get_response(url, 123)
      return response
    
    def something_else(url: CommonURLs):
      response = get_second_response(url, 123)
      return response
    
    something(CommonURLs.SOMECONST)
    something_else(CommonURLs.POE)
    • Assigned to: krayskiy on Fri, 22 May 2022
    • Completed
  7. Write out proper type hints for all methods, classes, collections and return types so that we can trust the data flowing around the codebase and don't have to rely on guesswork. This will help new and existing devs grasp how the methods we use work and what they pass around.

    def add_two(one: int, two: int) -> int:
        return one + two
  8. TAKEN Replace all occurrences of "{} something {}".format(a, b) to use f-strings like f"{a} something {b}" in the codebase.

    • Assigned to: ashrasmun on Wed, 18 May 2022
    • Completed

More to come...

Hello. I'd like to take care of issue 8 :) My nickname on discord is the same as here.

pm5k commented

Hello. I'd like to take care of issue 8 :) My nickname on discord is the same as here.

@ashrasmun Assigned to you. Let me know if you need any help.

Hiya, I'm lim on discord, happy to take on #6.

Hiya, I'm lim on discord, happy to take on #6.

@krayskiy Assigned to you =D Voice out in discord if you have question

I would like to grab the 3rd issue, but I wonder if we want to ignore anything in the flake8 config.

pm5k commented

I would like to grab the 3rd issue, but I wonder if we want to ignore anything in the flake8 config.

What would we ignore? @ashrasmun

I would like to grab the 3rd issue, but I wonder if we want to ignore anything in the flake8 config.

What would we ignore? @ashrasmun

I was just wondering if there's anything we are going to ignore :)

pm5k commented

I would like to grab the 3rd issue, but I wonder if we want to ignore anything in the flake8 config.

What would we ignore? @ashrasmun

I was just wondering if there's anything we are going to ignore :)

Have a look at how flake is set up in #80 and just set it up like that on your end (it will/should all reconcile later), in the meantime for what you're doing just follow what it says. I would say if there's one thing I would advise not touching is any issues that pertain to breaking the complexity rule of exceeding cognitive complexity of 10. Anything like that needs splitting up very carefully to avoid breaking functionality and as such it is probably best you're abso-friggin-lutely sure you're not breaking anything or else @Journeytojah will throw a cat at you.

I'd like to pick 7.