Closed LunarWatcher closed 4 years ago
I am interested in helping generate docs. I see under CONTRIBUTING.md the docs should be organized in the Wiki. Do you have any other organizational system in mind for documentation? Which types of docs would you like to prioritize? I am currently studying REST API Documentation and would appreciate the practice, but I am more than happy to work on any assignment to gain more experience.
The top priority atm is creating proper setup docs. Then there's a huge need for expansion docs (specifically on adding custom commands and listeners, and adding new sites). The Database class, along with the CommandCenter class, needs extra attention since these are highly used when extending the bot with i.e. new commands. Same applies to the AbstractCommand class and AbstractListener (
There's a general need for Javadoc/KDoc in the code as well, but if it's covered in the wiki it's not as critical.
As for an organization system, it just goes in the wiki in separate pages for separate topics.
Gotcha. I'll focus on the proper setup docs first. I need to ask a few basic questions to get started:
Environment
Configuration
Config.py_example
?I'm still familiarizing myself with the project and will have plenty more questions later.
https://discordapp.com/developers/applications/me
), and Twitch requires app registration here (plain URL: https://glass.twitch.tv/console/apps/create
) in addition to a separate account. It can of course be run of someones account (without sock accounts, the exception applies to Discord where an app has to be registered).Some extra info I think might me useful given the last question: sites are togglable. Not filling in the credentials results in the site not being launched. I'm gonna add some more comments in creds.properties(-example) as a part of the next commit to make what credentials is required more obvious (since some of the sites use some of the fields but not others due to API differences)
Sorry for the absence. I had a few personal and professional obligations as well as a fatal technical malfunction pop up on me. The technical malfunction resulted in cross-device data loss, so I will need to rewrite the unpublished wiki documents I was working up for the NN-Chatbot. Thank you for your patience.
I do have a quick question about the dependencies. I see a list of dependencies in the Readme, and a file called requirements.txt has a similar list. Are the programs in the requirements.txt file also dependencies?
Sorry about the late reply, I missed your reply.
requirements.txt is the Python dependencies. It's in a format that enables installing using pip (the Python package manager). All of them should be listed in README.md, but the exact specs are in requirements.txt
I see you have someone who may be helping with the API docs. Do you still need anyone to help in this area?
Yeah, there's still some stuff missing. I've been planning to get around to it myself, and I'll probably get some of it done this weekend (or earlier), but there's a lot to cover.
If you want to help, there's a list in the original post covering stuff that needs to be done.
Great. I'm new to API docs, so I'll try to set it up so I can play with it and then wrap my head around what you already have documented. Then I can find what's missing to add to it. I already installed Python on my system.
I've spent most of the day trying to install it on my Windows machine. No success yet. Dependencies and path issues. Also, one of the required packages (tensorflow) may not work with the newest version of Python according to its docs. I see the need for clear documentation.
In fact, for the life of me I cannot install tensorflow. Pip says there is no such file. I installed Scipy already. I installed other dependencies as well.
Also, where does the raw_data folder go?
I'll take a look at it later today.
The raw_data folder goes whereever you run the command from. If you're in C:/path/to/project/root/ and run python Network/bot.py
, you'd put it in the root directory.
But if you can't install dependencies, and critically Tensorflow, you can't run the Python module of the project. Like I said, I'll look into it later. I remember some version of a dependency requiring manual installation from a wheel file, but I can't remember if this applies here.
What version of Python and Windows are you using?
I have everything installed now with the latest packages except I still cannot install Tensorflow.
Python=3.7.0 Windows 10
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
Ok. I found that Tensorflow does not support Python 3.7. I installed 3.6.6 and was able to install Tensorflow. Yay!
I am confused where the Readme file says "Rename Config.py_example to Config.py and fill in the necessary values." I'm not sure which values I need to change in the Config.py file.
Here is my current error:
Traceback (most recent call last):
File "C:\Users\chris\NN-chatbot\Network\bot.py", line 6, in
I'm gonna do some refactoring and remove the Python bot. It would get rid of the config file there, so it should be slightly easier to set up. It's not maintained anyways.
(Clarification: The Python bot is a Python backend for the neural net for Discord and SE. The Java one is the only one being actively developed after I started having threading issues with it. The API does, like I mentioned in #64, need cleanup).
Tensorflow is version sensitive, so it not supporting 3.7 yet would make sense, since 4.7 is quite new. Either way, glad you figured it out :)
Edit: The changes have been pushed. Removed a bunch of redundant code in the system. The config files weren't actually necessary xd
Please forgive my lack of knowledge. Here's where I am now:
When I run: python bot.py I get
Traceback (most recent call last): File "bot.py", line 6, in
import Config File "C:\Users\chris\NN-chatbot\Network\Config.py", line 19, in email = str(config[CONFIG_KEY]["akredshaw@gmail.com"]) File "C:\Users\chris\AppData\Local\Programs\Python\Python36\lib\configparser.py", line 959, in getitem raise KeyError(key) KeyError: 'creds'
Don't I need to run bot.py before I can compile and run BotCore.java?
- I assume the API will be for connecting to Discord, Stack Exchange, Twitch, etc, so I will be referencing their API docs to connect. Am I on the right track?
I'm sorry, that's on me.
You don't need the config.py any more. Updated the docs, but missed the readme xd
You don't need that. bot.py and BotCore.java can run independently of each other. Tbh, if you don't have a decent GPU, I don't recommend running the ML parts unless your computer can handle it.
The bot itself connects to those three, yes. For SE there's a custom API, but Discord uses Discord4J and for twitch there's Twitch4J. You can run on a single site, some, or all.
To run the Java bot, the ones you need to change are bot.properties and creds.properties. They both have a bunch of comments in them, so it should be clear what it does. Missing username/password or other necessary config on any given site will also disable the site, so you don't have to run it on all the sites for the bot to work.
I'll update the readme, but if you pull the newest version, all dependency on config.py has been removed, and the Python bot is gone too. (The neural net, the part that is in bot.py is still around though. It is after all half the bot).
Do you have the endpoint URL's for API documentation?
There aren't any, aside those that connect the sites. There's only one there's written a custom wrapper around though. The other two use other API's (as I mentioned earlier).
So I'm not sure if endpoint URL's can be applied here
The documentation is a mess and a lot of it is non-existent. Documentation needs to be added as soon as possible
Current progress
Notes
A basic "how to use the bot". Creating command and listener documentation would take care of a large part of this, but stuff like understanding arguments (currently a comma-separated list, #61 changes that a bit but still) for commands, also the CLI-style arguments (
--somename "argument content"
).Should also cover ranks