Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes on learning how to contribute to this project #3

Open
2 of 11 tasks
lance6716 opened this issue Feb 3, 2019 · 4 comments
Open
2 of 11 tasks

Notes on learning how to contribute to this project #3

lance6716 opened this issue Feb 3, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lance6716
Copy link
Contributor

lance6716 commented Feb 3, 2019

Here's TODOs collected from comments below:

  • Add class doc to give brief explanation, in order to make new developer easier to understand.

  • Tile._hash and Tile._tuple_view seems duplicated, check if should keep only one of them.

  • Add win pattern of Thirteen Orphans(国士無双)

  • Add input-check about the number of tiles, input grammar and same tile overflow.

  • Add matching for yaku(役) and score calculation

  • Add continus integration and cover all codes with unit test

  • Add documentation for Tile, TileSet Waiting WinPattern and merge duplicate search algorithms for easily read and use.

  • Add safe tiles calculations based on remain waiting forms counting(i.e. how many 68s, 56s, 89s, 7s could waiting for 7s without furiten(振听)).

  • Add zh-CN and en-US documentation support.

  • checked: TileSet.re_sort() should be called to keep insert order invariant.

  • checked: class Tile and TileSet use @total_ordering, according to official doc, should evaluate if it's the bottleneck of the performance.

Very useful and a good change to learn Python, thanks owner.

Now I'm reading the source code, here I wrote potential development.

@Ledenel
Copy link
Owner

Ledenel commented Feb 4, 2019

Thanks for your contribution!
I 've made these two tools work right now. Here's my planning:

  • Add matching for yaku(役) and score calculation
  • Add continus integration and cover all codes with unit test
  • Add documentation for Tile, TileSet Waiting WinPattern and merge duplicate search algorithms for easily read and use.
  • Add safe tiles calculations based on remain waiting forms counting(i.e. how many 68s, 56s, 89s, 7s could waiting for 7s without furiten(振听)).

And for contribution, a contribution guide is required (Maybe a issue template/pull request template, but I've no idea about how to do that).

I'll remain this issue open for discussion. Any crazy ideas are welcomed!

@Ledenel
Copy link
Owner

Ledenel commented Feb 4, 2019

For

class Tile and TileSet use @total_ordering, according to official doc, should evaluate if it's the bottleneck of the performance.

I've benchmarked with cProfile and found that main bottle neck is about manipulate and create TileSet(Counter)s. the operator is mainly heavily used in sorting, so I think that le, eq and ne is enough.

For

check if collections.Counter could sorted by key internally when print, so we don't need TileSet.re_sort()

Counter(include normal dicts) after Python 3.7 is guaranteed that keys will preserved order of insertion. it's not the order we needed (if insert 3m first, 2s later, 1m last, the order will be 3m2s1m). so printing needs resort.

@Ledenel
Copy link
Owner

Ledenel commented Feb 4, 2019

By the way, Interantionalized document is needed, but I've no idea of how to do that.

  • Add zh-CN and en-US documentation support.

@lance6716
Copy link
Contributor Author

lance6716 commented Feb 4, 2019 via email

@Ledenel Ledenel added enhancement New feature or request help wanted Extra attention is needed labels Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants