Reputation
363
Next privilege 500 Rep.
Access review queues
Badges
2 13
Impact
~6k people reached

  • 0 posts edited
  • 0 helpful flags
  • 19 votes cast
Sep
5
comment Shell commands in bash or python? How much encapsulation is too much?
Thanks it @GregBurghardt is it always useful to discover new python projects. However the "python build tool" search term is extremely generic, and I can't see that pybuilder solves any of the problems I'm struggling with here. I may be able to force my Python scripts into its structure, but I think it would be significantly more work. There may be a tool out there that I haven't found that would help (xonsh is the best suggestion so far), but in general I'd rather you trust that I already know how to use Google, and try to answer the question I actually asked rather than one that I didn't.
Sep
4
comment Shell commands in bash or python? How much encapsulation is too much?
Yeah I've used ansible a little bit. I particularly dislike the way it overloads YAML, but other than that it does seem quite powerful. I'll give it another look see if I can get any good ideas. Thanks for the suggestion.
Sep
4
comment Shell commands in bash or python? How much encapsulation is too much?
Interesting. I didn't know about Paver. Do you think it's better than Fabric? I'll look into it, see if it might be helpful in the future. However, as I mentioned to dimitris, it's not a solution for this problem. Instead of storing a bunch of build tasks inside my project, to be run by clients using the project, I'm trying to create a generic build system in one place - on my jenkins server - that can be applied to many different similarly structured projects. For this, Paver and Fabric will be no more useful than a custom python script.
Sep
4
comment Shell commands in bash or python? How much encapsulation is too much?
That's all very good general advice. I completely agree with using existing solutions, and building on existing open source work (and contributing back). However, there's nothing Python specific about creating a tarball of a project and uploading it somewhere, or the other things I'm trying to do here (build sass, pull in another github project). And I really don't think it's generic enough to have a generic tool for doing it, beyond the tools I'm using (tar, swift etc.). If you think otherwise, could you please suggest some examples?
Sep
4
comment Shell commands in bash or python? How much encapsulation is too much?
Reading The Dark Side of Encapsulation let me to think that what I should focus on is which parts are actively useful to encapsulate - rather than encapsulating for readability's sake, I should in this case think about doing it for the sake of function. If my encapsulated methods and objects could be usefully reused purely in the abstract, that's good. If on the other hand people would actually want to reuse the underlying bash commands, I should expose them instead.
Sep
4
comment Shell commands in bash or python? How much encapsulation is too much?
+1 thanks for the suggestion that long sequential bash isn't necessarily a problem. I can see, that, especially if it's commented well. I'll have a play with it. I'll wait a bit before accepting anything to see if anyone elaborates on whether there's a name for this field of study though.
Sep
4
comment Shell commands in bash or python? How much encapsulation is too much?
Well we already use Make in the project, but those sort of build tools, where the build scripts are embedded in the project, lend themselves to projects that need to be built in the same way in many different places. Gulp is for developers to pull down a Javascript project and get it running locally, Make is classically for compiling binaries from source code on the client's machine. Conversely, this is where I want to build many different project in a similar way in one place - Jenkins. So it doesn't really belong in the project, but rather needs its own build project.
Sep
4
revised Shell commands in bash or python? How much encapsulation is too much?
edited title
Sep
4
revised Shell commands in bash or python? How much encapsulation is too much?
deleted 58 characters in body
Sep
4
asked Shell commands in bash or python? How much encapsulation is too much?
Aug
2
awarded  Popular Question
Mar
30
comment Safest way to use and store User's third party credentials
Can't you get an OAuth token for Github, like Hub does? github.com/github/hub#configuration
Feb
5
awarded  Popular Question
Feb
3
awarded  Popular Question
Jan
8
accepted Patterns for a tree of persistent data with multiple storage options?
Jan
8
answered Patterns for a tree of persistent data with multiple storage options?
Aug
15
awarded  Yearling
Jun
19
comment Should I use parentheses in logical statements even where not necessary?
@Dunk personally I think "write code for a n00b" is a fantastic general rule. The n00b might be you in the future, but it's useful to have a succinct general rule to remember and apply (rather than having to memorise 2 paragraphs), and "write code for a n00b" is a very good one.
Feb
26
awarded  Constituent
Feb
26
awarded  Caucus