BNETDocs
bcb-dev
Dev channel for the BNETDocs Community Bot (BCB) project. https://github.com/BNETDocs/community-bot
203 messages
Davnit 29-May-18 12:10 AM
community-bot - A BNETDocs project
Caaaaarrrrlll 29-May-18 12:10 AM
Pinned a message.
Davnit 29-May-18 12:10 AM
if we'd like to make this channel public or read-only for people not directly involved we can do that
the language was decided to be python
Pinned a message.
Caaaaarrrrlll 29-May-18 12:18 AM
so looks like we can also have discussions on the github page
lol davnit I see that verified gpg commit 😉
Davnit 29-May-18 12:20 AM
i used the web interface
don't know how from github client
Caaaaarrrrlll 29-May-18 12:21 AM
git commit -S
Davnit 29-May-18 12:21 AM
anyways what do we want to do about workspace/IDE
Caaaaarrrrlll 29-May-18 12:21 AM
good q
I put a .gitignore there
I hate dirty repos
should we use our own forks?
Ribose 29-May-18 12:22 AM
agooglethumbsup
Caaaaarrrrlll 29-May-18 12:22 AM
should we use a develop branch?
Ribose 29-May-18 12:22 AM
actually idk about forks
Caaaaarrrrlll 29-May-18 12:22 AM
should master branch always "work"? (edited)
Ribose 29-May-18 12:22 AM
i was thumbsuping gitignore
Davnit 29-May-18 12:22 AM
ideally master should always work
then we can auto-build probably
Caaaaarrrrlll 29-May-18 12:23 AM
I am pretty familiar with git-flow
Davnit 29-May-18 12:24 AM
so you make a branch for each feature, then when the feature is complete you squash and merge (or whatever) it into the develop branch, and then when all features are ready for a release it goes to master?
Caaaaarrrrlll 29-May-18 12:25 AM
almost
you forgot about the release branch
When it is time to make a release, a release branch is created off of develop
(edited)
The code in the release branch is deployed onto a suitable test environment, tested, and any problems are fixed directly in the release branch.
(edited)
When the release is finished, the release branch is merged into master and into develop too,
Davnit 29-May-18 12:26 AM
makes sense
Caaaaarrrrlll 29-May-18 12:27 AM
"release" branch is more like a staging branch
there's a final step: when merging release->master, you tag it as well
hotfix branches are fun as well.
Davnit 29-May-18 12:28 AM
i'm sure i'll get the hang of it after fucking it up a few times
Caaaaarrrrlll 29-May-18 12:29 AM
not saying we have to follow it
but it's very clean
beats just committing to master all day then eventually tagging a release
Davnit 29-May-18 12:29 AM
thats what we do with stealthbot lel
Caaaaarrrrlll 29-May-18 12:29 AM
gitflow allows all of us to work in pieces then merge later
and test it before release
each piece is a feature branch, which are children of the develop branch
there's not supposed to be any conflict
if a feature needs another feature to work, then that feature should wait for the other feature to be merged to develop before continuing
when the other feature is merged, you can do a git pull on the feature branch to pull down updates from develop
there's countless articles on the web if you get lost at any point
it's the best practice for git projects that have simultaneous features being worked on
Davnit 29-May-18 12:33 AM
sounds good to me
Caaaaarrrrlll 29-May-18 12:43 AM
made develop and locked branches (edited)
Glyph 29-May-18 12:47 AM
should i bother with a git GUI?
Davnit 29-May-18 12:48 AM
i use the github desktop client mostly for diffs and making commits
all the pushing and other stuff i do from cli
Caaaaarrrrlll 29-May-18 12:48 AM
I do it all from cli
Glyph 29-May-18 12:49 AM
suppose ill have to learn this real quick
were using hubflow?
Caaaaarrrrlll 29-May-18 12:51 AM
what's hubflow
ah
I don't think you need the binary for that
git is fine
Davnit 29-May-18 12:56 AM
we gonna do like
main.py or bcb.py or what (edited)
Caaaaarrrrlll 29-May-18 12:56 AM
I like main.py lol
Davnit 29-May-18 12:56 AM
in a /src/?
Caaaaarrrrlll 29-May-18 12:56 AM
ya what dir struct do we want
I do standard bin etc lib src typically
from bnetdocs-web:
Glyph 29-May-18 12:58 AM
looks gewd
Caaaaarrrrlll 29-May-18 12:58 AM
Idk what the python best practice is
README.rst LICENSE setup.py requirements.txt sample/__init__.py sample/core.py sample/helpers.py docs/conf.py docs/index.rst tests/test_basic.py tests/test_advanced.py
it's not a 1-to-1
I suppose all of that could be under src/
Glyph 29-May-18 01:05 AM
^request for pin
Davnit 29-May-18 01:06 AM
just looking at their structure
discord.py - An API wrapper for Discord written in Python.
Caaaaarrrrlll 29-May-18 01:06 AM
looks like python repos throw tons of crap in the root
Davnit 29-May-18 01:07 AM
discord.py isn't that bad
looks like we'd just have a /bot/ or /bcb/ directory and put the src in there (edited)
entrypoint would be __init__.py (edited)
Caaaaarrrrlll 29-May-18 01:10 AM
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy? Desirable features are ease of
Doesn't too much matter. Whatever makes you happy will work. There aren't a lot of silly rules because Python projects can be simple.
Davnit 29-May-18 01:10 AM
directory name is part of namespace so probably /bcb/
Caaaaarrrrlll 29-May-18 01:10 AM
Since a top-level /src directory is seen by some as meaningless, your top-level directory can be the top-level architecture of your application.
Glyph 29-May-18 01:11 AM
hmm
i just realized soemthinbg
are we making an actual chat bot for discord? if so we'll need to actually make a bot. without discords api i mean.
Caaaaarrrrlll 29-May-18 01:12 AM
it's not for discord
Davnit 29-May-18 01:12 AM
no we are not doing anything related to discord
Caaaaarrrrlll 29-May-18 01:12 AM
it's for battlenet v1
Glyph 29-May-18 01:12 AM
i thought it was for bnet/discord
oh
Caaaaarrrrlll 29-May-18 01:12 AM
we could have a discord module
like a plugin
Glyph 29-May-18 01:12 AM
i see
okok
so were not using CAPI?
Caaaaarrrrlll 29-May-18 01:13 AM
this is supposed to be a barebones bot that can simply have "modules" plugged into it
Davnit 29-May-18 01:13 AM
the idea is to use CAPI
Caaaaarrrrlll 29-May-18 01:13 AM
it's the scaffolding for other modules
Glyph 29-May-18 01:13 AM
okay
Davnit 29-May-18 01:14 AM
so we'd probably want /bcb/ and then also in the root a /plugins/ or /modules/
Caaaaarrrrlll 29-May-18 01:14 AM
so after some reading I suppose
bin/ docs/ community-bot/ community-bot/modules/ lib/ tests/ setup.py requirements.txt README LICENSE
(edited)
Davnit 29-May-18 01:15 AM
that works
Glyph 29-May-18 01:15 AM
looks good
Davnit 29-May-18 01:15 AM
also this is the core of ribose's bot https://github.com/Cog-Creators/Red-DiscordBot
Red-DiscordBot - A multifunction Discord bot
does "plugin" loading
Davnit 29-May-18 01:42 AM
description='Bnetdocs Community Bot',
do we want to use the BNETDocs casing?
Glyph 29-May-18 01:59 AM
+#!/usr/bin/env python
what version of python are we using?
Davnit 29-May-18 02:00 AM
i would assume 3.6.5 (edited)
Glyph 29-May-18 02:00 AM
on all of my home systems
#!/usr/bin/env python defaults to 2.7
Caaaaarrrrlll 29-May-18 02:03 AM
[cbennett@utility ~/bnetdocs-community-bot]$ python --version Python 2.7.15 [cbennett@utility ~/bnetdocs-community-bot]$ python3 --version Python 3.6.5
Glyph 29-May-18 02:03 AM
#!/usr/bin/env python3
would work
Caaaaarrrrlll 29-May-18 02:04 AM
pushed commits
Glyph 29-May-18 02:04 AM
however to retain compatability im not sure
Davnit 29-May-18 02:04 AM
lol
python for me is 3.5.2
Glyph 29-May-18 02:04 AM
o_o
thats close to raspbian's default
heh
python3 would work. makes sense to follow their organization
Davnit 29-May-18 02:05 AM
agree
Glyph 29-May-18 02:06 AM
if we use 3.5 thats fine also
still supports asyncio
however othewr features are going to be missing
Davnit 29-May-18 02:06 AM
i think 3.6 is good
Glyph 29-May-18 02:06 AM
but in the interest of compatibility
most debian repos default 3.5
Caaaaarrrrlll 29-May-18 02:07 AM
I'm on fedora which naturally has newer packages than most distros
Idc which python3.x version it is
Glyph 29-May-18 02:07 AM
how did you install python, davnit?
that's on windows?
Davnit 29-May-18 02:07 AM
yes and i haven't a clue it was so long ago
probably an installer
Glyph 29-May-18 02:07 AM
ah okay liekly binary installer
yeah
Caaaaarrrrlll 29-May-18 02:07 AM
I think I did that too
But I have a linux vm I do dev work from
Glyph 29-May-18 02:08 AM
i dont think theresd another way on windows
now that i think about it
lmfao
Caaaaarrrrlll 29-May-18 02:08 AM
we can ostensibly use any python version we like using virtualenv
Glyph 29-May-18 02:08 AM
yeahj im working on virtualenv right now actually
having issues :/
IOError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/virtualenv.pyc'
er scratch that
Caaaaarrrrlll 29-May-18 02:08 AM
use --user
Glyph 29-May-18 02:09 AM
oh
Caaaaarrrrlll 29-May-18 02:10 AM
should I wait for your virtualenv settings or go ahead and merge?
Glyph 29-May-18 02:10 AM
go ahead
im about to pass out for work tomorrow.
but at least ill have this set up
Caaaaarrrrlll 29-May-18 02:13 AM
I changed the default branch to develop while we make our first release. After the first release, we can switch it back to master.
Ribose 29-May-18 02:18 AM
does that work when people pull from it?
Glyph 29-May-18 02:18 AM
parrot
Caaaaarrrrlll 29-May-18 02:18 AM
yes ribose
the only downside is people cloning will get an unstable branch by default
but it makes pull requests open to develop by default, and we can just tell people to switch to master if they want stable
Ribose 29-May-18 04:22 AM
ah, i meant more like changing the names, but now i get it, you want to merge changes back into master and have both
FalcomBot works like that
rather Red discord bot does
i suppose that that's become the norm
Myst 30-May-18 09:39 PM
looks for that invite link again on github
done
lets get started
"A WIP community-built bot written in Python for the classic Battle.net v1 chat platform."
????
classic
bnet v1
?_?
"A community-built bot written in Python for the modern Battle.net chat platform.
"
so alot has already been done in python in reference battle.net stuff
ie checkrevision cdkey stuff, etc
are we using previous stuff or writing new stuff
Glyph 04-Jun-18 07:25 PM
So uh
Supppp
Glyph 20-Jun-18 06:49 PM
Thats cool, same here.
Davnit 20-Jun-18 06:59 PM
top tier
Glyph 20-Jun-18 07:09 PM
No fear
Caaaaarrrrlll 21-Jun-18 12:52 AM
👋
Davnit 24-Aug-18 03:10 AM
This client implements V1 of the CAPI spec, outlined in the Chat Bot API Alpha v1.pdf document. A sample implementation is included at the bottom of the capi.py file and can be run by calling that ...
Caaaaarrrrlll 24-Aug-18 08:48 AM
\o/
Davnit 27-Aug-18 04:33 PM
won't be live until tomorrow, but also there's no major changes just a few additions and the new registration mechanism
iso ideas for plugin loading
Caaaaarrrrlll 27-Aug-18 05:28 PM
alpha 3
Davnit 11-Sep-18 03:01 AM
so uh
minor oversight, but "community-bot" doesn't really work as a package name
as in it's invalid and the interpreter doesn't understand "import community-bot"
Caaaaarrrrlll 11-Sep-18 03:27 AM
what
oh it has to use underscore
I want to import foo-bar.py. This works: foobar = import("foo-bar") This does not: from "foo-bar" import * My question: Is there any way that I can use the above format i.e., from "foo-bar"
Davnit 11-Sep-18 03:31 AM
Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.
fwiw