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

Initial Development Thread #1

Closed
itsjohncs opened this Issue Nov 26, 2013 · 8 comments

Comments

Projects
None yet
1 participant
@itsjohncs
Owner

itsjohncs commented Nov 26, 2013

No description provided.

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Nov 26, 2013

I would like newcomers to Python and Open Source in general to feel welcome in this project. Therefore I am adopting the style of adding comments that explain in overabundance what is going on when non-obvious language features are used. This style is new to me and striking a balance will be difficult. Generally...

# Write some data into f
f.write("all this data")

Is still a bad comment. But...

# Return our results as a well-formed list of strings by using a list comprehension
return [str(i) for i in results]

May be good because it will allow a hacker to easily Google anything their confused about.

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Jan 6, 2014

I've been doing work on the documents module today, focusing considerably on how best to handle encodings and what the format of the frontmatter should be. I just pushed my latest work and it's not done at all, but I need to do some things for SI now. When I pick this back up again, I should resume work on the documents.py file. open_file() is about done though untested, and now I want to work on parse_document(). I should create a helper function called _parse_frontmatter() because doing it all within the parse_document() function will get messy.

Refer to docs/documents.rst for some information on how I expect documents to look like and what they are.

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Mar 7, 2014

Well it's functional now, still needs improvements though. The biggest thing is I want to improve the watch feature. Right now it's pretty much useless, I need to bring up subprocesses and kill them like I do with the rock script I made.

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Mar 10, 2014

The watch mode doesn't like when updates are made very close to eachother because it gets a new token immediately after it updates. I'll want to fix this. It'll be a simple fix but I'm working on the HTTP serving right now.

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Mar 10, 2014

Watch and serve modes are working well. I'm using a utility when-changed right now to do the monitoring so that Phial's code actually reloads. Not too important for a normal user to do this, and if I write some instructions on using it the people who want to hack on Phial a bit will be well served as well.

I want to add more power to the "routing" I implemented and converge a bit more with flask. I'll probably want to use classic Python format strings to specify the path so you can do all the routing at the top. Something like...

@page("projects/{name}.html", files = "projects/*.rst")
def bla(...

Allowing regular expressions instead of globs might be a good idea too, but I'm not sure how to do that gracefully supporting both...

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Mar 11, 2014

Nearing first release. Need reference documentation now (I can either use Sphinx, dogfood it, or use a hyrbid approach). I like what node.js did when the assigned stability to all of the public interfaces and I think I want to do similar.

I don't think I'll benefit from more users yet so I won't share this publicly yet (it's not a bad thing if people stumble on this accidently though and want to use it). I want to convert my two other static sites johnsullivan.name and galahgroup.com to use Phial first. Then I want to start collecting examples that people can use as a starter (they should all be released under the unlicense or similar).

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Mar 11, 2014

I think reference documentation can wait until I want more users. It'll just be a waste of time for me to make reference documentation for myself. I already have the docstrings.

@itsjohncs

This comment has been minimized.

Owner

itsjohncs commented Mar 12, 2014

Woot! Think I'm done solely working on the tool for now. Now to use it extensively and see what I think of my work. I'm my favorite beta tester 😊

@itsjohncs itsjohncs closed this May 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment