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

Docs: Clarify which kinds of options actually support "random" #2845

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

Ixrec
Copy link
Contributor

@Ixrec Ixrec commented Feb 19, 2024

What is this fixing or adding?

The current phrasing of this sentence made me expect "random" to work on literally all options, even my OptionsDict option. After asking #archipelago-dev and checking the Options.py code, it's become clear that many option kinds don't (and can't) support "random". After reading Options.py a bit more, I believe this wording would be correct.

How was this tested?

The change itself, N/A. It's just docs.

If you mean how I ran into this, I tried writing a test for my world with all options set to "random", and got NotImplementedError: Cannot Convert from non-dictionary, got <class 'str'> on the OptionsDict one.

If this makes graphical changes, please attach screenshots.

N/A

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.
@github-actions github-actions bot added the is: documentation Improvements or additions to documentation. label Feb 19, 2024
@Ixrec Ixrec marked this pull request as ready for review February 19, 2024 20:19
@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Feb 19, 2024
Copy link
Collaborator

@agilbert1412 agilbert1412 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does seem like an improvement. I also wasn't aware of that limitation

@agilbert1412 agilbert1412 added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Feb 20, 2024
@benny-dreamly
Copy link
Contributor

I read it. Looks good.

@black-sliver
Copy link
Member

Hm, this change makes it sound like you can't have a custom "random", but that's not true. You can override from_text to get custom behaviour for any Option type. Blasphemous and lufia2ac do this.

@Ixrec
Copy link
Contributor Author

Ixrec commented Feb 22, 2024

Interesting. I would've read both the old and the new wording as excluding any way to implement it yourself. If anything, knowing it's not on some option types seems to open up the possibility.

Maybe documenting that from_text is overridable should be an additional change somewhere else in this document (like, as an intentional public API we want people to use, not just in a "yes because Python" way). But I don't think I'm in a position to draft that correctly.

@Ixrec Ixrec requested a review from black-sliver February 24, 2024 15:00
Copy link
Member

@black-sliver black-sliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is accurate now. Thanks!

@black-sliver black-sliver merged commit 57fcd57 into ArchipelagoMW:main Feb 24, 2024
3 checks passed
@github-actions github-actions bot removed the waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. label Feb 24, 2024
ScipioWright pushed a commit to ScipioWright/Archipelago-SW that referenced this pull request Feb 27, 2024
…pelagoMW#2845)

* Clarify which kinds of options actually support "random"

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.

* add a sentence about from_text overrides based on black-silver's suggestion
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
…pelagoMW#2845)

* Clarify which kinds of options actually support "random"

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.

* add a sentence about from_text overrides based on black-silver's suggestion
TheLX5 pushed a commit to TheLX5/Archipelago that referenced this pull request Mar 2, 2024
…pelagoMW#2845)

* Clarify which kinds of options actually support "random"

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.

* add a sentence about from_text overrides based on black-silver's suggestion
TheLX5 pushed a commit to TheLX5/Archipelago that referenced this pull request Mar 2, 2024
…pelagoMW#2845)

* Clarify which kinds of options actually support "random"

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.

* add a sentence about from_text overrides based on black-silver's suggestion
EmilyV99 pushed a commit to EmilyV99/Archipelago that referenced this pull request Apr 15, 2024
…pelagoMW#2845)

* Clarify which kinds of options actually support "random"

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.

* add a sentence about from_text overrides based on black-silver's suggestion
EmilyV99 pushed a commit to EmilyV99/Archipelago that referenced this pull request Apr 15, 2024
…pelagoMW#2845)

* Clarify which kinds of options actually support "random"

The current phrasing of this sentence made me expect "random" to work even on my OptionsDict option. After asking `#archipelago-dev` and checking the `Options.py` code, it's become clear that many option types don't (and can't) support "random". This is my best guess at a more correct wording.

* add a sentence about from_text overrides based on black-silver's suggestion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: documentation Improvements or additions to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants