jaredballou / lgsm-python

BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Workflow Ideas #1

Open nicktimko opened 8 years ago

nicktimko commented 8 years ago

Regarding your question about how to update/install/do things in general with a Python LGSM, here's a notional workflow that I have:

  1. Users create isolated Python install (this is "optional"...coexisting with the system Python is generally frowned upon)
  2. pip install lgsm: This downloads the thing from PyPI and adds an executable to the PATH (lgsm or whatever) that can then be used to install/configure things
  3. lgsm install <game>: Does something like what each of the install scripts does, walking through all the install bits. Each game would be some sort of "recipe", either shell-ish calls to make or more pure-Python subprocesses that set up the game.
  4. lgsm start <game>, lgsm stop <game>, etc, like the ./gameserver run, etc. commands

As far as how those recipes are kept up-to-date, some options:

Anyways, I'll check out your code and see what I think and maybe give more pointers :P Just thought I'd strike up a discussion as to what the actual user-facing interface should be.

jaredballou commented 8 years ago

Good points. The packaging is something that I really don't know much about. Once the project is further along, there really shouldn't be too many code changes, but frequent updates to gamedata to add new functionality. My idea was, there would be a "Steam" platform, then "Source" engine, then all the functionality is there for the gamedata files to configure. I want to make adding games a trivially easy process, and eventually have some sort of pull request based tooling so that users can easily submit new games.

Take a look at the code, it's still very much exploratory and buggy. I just started writing Python about four months back, and it really shows here. Any suggestions or help would be greatly appreciated.

nicktimko commented 8 years ago

Something to check out is PEP-8 https://www.python.org/dev/peps/pep-0008/ (Python Enhancement Proposal), which is the official style-guide for Python itself, and the usual default for other projects (some of the finer points like line-length, etc, are tweaked to personal preference). 4-space indents are practically universal though ;)

On Sat, Jul 16, 2016 at 2:54 PM, Jared Ballou notifications@github.com wrote:

Good points. The packaging is something that I really don't know much about. Once the project is further along, there really shouldn't be too many code changes, but frequent updates to gamedata to add new functionality. My idea was, there would be a "Steam" platform, then "Source" engine, then all the functionality is there for the gamedata files to configure. I want to make adding games a trivially easy process, and eventually have some sort of pull request based tooling so that users can easily submit new games.

Take a look at the code, it's still very much exploratory and buggy. I just started writing Python about four months back, and it really shows here. Any suggestions or help would be greatly appreciated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaredballou/lgsm-python/issues/1#issuecomment-233147967, or mute the thread https://github.com/notifications/unsubscribe-auth/AFDVlHhXl1WBp_-fTJOp641VI7P4gdFWks5qWTbrgaJpZM4JK6Sd .

jaredballou commented 8 years ago

Yeah, I know tabs are frowned upon, but I use Nano as an editor. Alignment and spacing sucks, I should just man up and learn emacs. I'm more concerned with making sure that my organization and logic makes sense, and that I'm not doing stupid stuff that will cause performance issues. The simpler I can make this the better, especially on the groundwork. I'm going to work on it a bit this week to get the installation/run/console part working, if you want to pair otr at least peek at my notes for what I am thinking, I'd appreciate it.