-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the ITEMS_TO_COPY list out of the code #8
Conversation
Looks suspicously like a simple .md file... hint hint hint...
Not yet loading them, just moving them out.
This introduced some code duplication, that will be refactored in the next commit.
This is just to spark discussion of what else to include.
osm.py
Outdated
for line in items_to_copy_contents.splitlines(): | ||
if not line: | ||
continue # Ignore blank lines | ||
line = line.strip() # Allow indentation, esp. for comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this strip() should be above the not line
, that's fixed in a later commit.
Some additional thoughts/notes/bread-crumbs:
Hmm, seems like something like that should be in PyPI already :-) |
Made #10 to implement spike of include/exclude idea as a stand-alone script rather than complicating this PR with more commits. |
Closing this spike, we decided to go in a different direction. |
@peterkaminski
Built this on top of #7 to leverage some of the code there and to extend the idea of "simple text files".
Thoughts and ruminations:
.txt
to be windows friendlier, but it does feel odd to use that extension on Linux.For 5) I feel as if there is an existing solution we should be able to borrow, but it is late enough that I can't think of it.
.gitignore
is one "style", but that has some sharp-edges that I catch myself on, and it's hard to use it to do a partial carve out. Globs seem like a reasonable "high level" hand-wave answer, but I feel like there are other tools that do this and it would be nice to borrow from that rather than reinvent.For 4) I have two ideas:
a) Read an optional second file (
copy-list-custom.txt
(names are hard)) after reading the maincopy-list.txt
. That is easy when all you want to do is extend, but if you want to also excise (such as README.md) that is trickier.b) Ship a
copy-list-template.txt
file that is only read if the user doesn't create their owncopy-list.txt
file to use. And in this case I would add support for a new line type@filename
that causes the contents offilename
to be included at that point, so that a user who want to extend the template could reference it by name instead of having to keep it manually up to date on each new release (not expecting a lot of changes, but want to permit it).Hopefully this makes sense on a late Friday, wanted to have something concrete to drive the discussion.
While I based this on #7, I figure that PR can merge separately unless we want to go whole-hog on a Big Fat Greek Wedding Configuration YAML.