Refactor AlphaList functionality to neucbot/alpha.py and add black#16
Merged
shawest merged 4 commits intoshawest:masterfrom Jan 21, 2026
Merged
Conversation
Continues the refactoring started in shawest#15 with the goal of making NeucBOT easier to host in a web interface. This commit pulls out some AlphaList functionality into the neucbot/alpha.py file, which will be added to in subsequent PRs. The next step is to continue moving functions from neucbot.py into neucbot/alpha.py until neucbot/ becomes a standalone package that can be used in a separate neucbot-web project.
This commit adds black as a dependency to ensure that code is properly formatted. This linter will be used as part of the Github Action workflow, ensuring that any new code checked into the neucbot/ and tests/ directories is properly formatted.
This commit cleans up the getAlphaListIfExists function from neucbot.py and moves it to the AlphaList class, and adds unit tests to cover the success and failure cases.
Ensure that tokens are parsed as floats, not as strings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
The goal of this PR is to continue refactoring functionality into the
neucbot/package to improve performance and allow for this functionality to be easily ported into aneucbot-webproject (which does not exist yet.Changes
neucbot/ensdf.pyfile intoneucbot/alpha.py, to be built upon in subsequent PRs.blackas a Python linter and includes it in the Github Action required to merge PRs.blackon all the files inneucbot/*andtests/*and checks in those changes.