]>
Devi Nivas Git - chevron.git/log
Samuel Colvin [Mon, 19 Jun 2017 16:25:51 +0000 (17:25 +0100)]
add tests for python 3.6
Noah Morrison [Thu, 15 Jun 2017 04:23:33 +0000 (00:23 -0400)]
Bump version (minor)
Noah Morrison [Thu, 15 Jun 2017 04:21:27 +0000 (00:21 -0400)]
Fix version badge in README
Noah Morrison [Thu, 15 Jun 2017 04:20:41 +0000 (00:20 -0400)]
Merge branch 'update-travis'
Noah Morrison [Thu, 15 Jun 2017 04:08:43 +0000 (00:08 -0400)]
Fix deploy conditions
Noah Morrison [Thu, 15 Jun 2017 03:55:52 +0000 (23:55 -0400)]
Bump version (patch)
Noah Morrison [Thu, 15 Jun 2017 03:51:47 +0000 (23:51 -0400)]
Add deploy step to travis
Noah Morrison [Thu, 15 Jun 2017 03:35:04 +0000 (23:35 -0400)]
Move coverage into tox and ignore coverage on py32
The coverage command fails on python3.2 for some reason.
Whatever, I'll just ignore it then.
Noah Morrison [Thu, 15 Jun 2017 03:01:30 +0000 (23:01 -0400)]
Add coverage reports
Noah Morrison [Thu, 15 Jun 2017 02:53:33 +0000 (22:53 -0400)]
Fix flake8
Noah Morrison [Thu, 15 Jun 2017 02:47:30 +0000 (22:47 -0400)]
Add flake8 to matrix
Noah Morrison [Thu, 15 Jun 2017 02:38:12 +0000 (22:38 -0400)]
Use tox-travis
Noah Morrison [Wed, 14 Jun 2017 04:36:51 +0000 (00:36 -0400)]
Fix inverted sections coercing the . variable
Fixes #17
noah morrison [Sun, 10 May 2015 01:43:26 +0000 (21:43 -0400)]
Ok, this time I think I actually fixed coverage
The --source flag should tell coverage to only test chevron,
hopefully...
noah morrison [Fri, 8 May 2015 21:46:37 +0000 (17:46 -0400)]
Omit third party files from coverage
noah morrison [Fri, 8 May 2015 21:41:19 +0000 (17:41 -0400)]
Remove shebang from renderer and tokenizer
These files are not intended to be run by themselves anyways
noah morrison [Sun, 3 May 2015 01:23:58 +0000 (21:23 -0400)]
Remove comments above import statement
I don't think there is a better way,
And this really isn't all that bad.
noah morrison [Thu, 30 Apr 2015 02:31:29 +0000 (22:31 -0400)]
Ignore import json path for coverage
noah morrison [Thu, 30 Apr 2015 02:25:05 +0000 (22:25 -0400)]
Update README
noah morrison [Tue, 28 Apr 2015 01:54:42 +0000 (21:54 -0400)]
Use pyyaml if it is available
noah morrison [Sat, 11 Apr 2015 02:48:25 +0000 (22:48 -0400)]
Bump version
noah morrison [Thu, 9 Apr 2015 21:26:03 +0000 (17:26 -0400)]
Raise coverage to 100%
noah morrison [Thu, 9 Apr 2015 21:24:49 +0000 (17:24 -0400)]
Move SyntaxError handling into cli_main
Makes a little more sense there, as it's only meant to handle
exceptions if you're using the command line version.
noah morrison [Thu, 9 Apr 2015 20:50:08 +0000 (16:50 -0400)]
Use flake8 instead of pep8 in travis
noah morrison [Thu, 9 Apr 2015 20:48:43 +0000 (16:48 -0400)]
Run flake8 on the entire directory
Instead of just chevron/, this caused me to fail a travis build
accidentally, even though tox ran fine.
noah morrison [Thu, 9 Apr 2015 20:21:33 +0000 (16:21 -0400)]
Fix pep8 (and travis)
noah morrison [Thu, 9 Apr 2015 03:28:03 +0000 (23:28 -0400)]
Make a comment more descriptive
noah morrison [Thu, 9 Apr 2015 03:24:47 +0000 (23:24 -0400)]
Add support for complex types
Before we were only allowing subscriptable structures,
now we can take something subscriptable or more complex
like a class with attributes.
This *shouldn't* cause problems with builtins, but I'm not 100% sure.
I've checked everything I could think of.
I might want to make this opt-in at somepoint, if some people are
having issues with it.
noah morrison [Wed, 8 Apr 2015 02:49:10 +0000 (22:49 -0400)]
Add better error messages
Fixes issue #15 on github
The tokenizer now keeps track of the current line,
and raises a more descriptive error message when it fails.
If running from the CLI then exit with status 1.
noah morrison [Mon, 26 Jan 2015 22:01:10 +0000 (17:01 -0500)]
Bump version.
noah morrison [Mon, 26 Jan 2015 22:00:30 +0000 (17:00 -0500)]
Add -v|--version option to chevron.
noah morrison [Mon, 26 Jan 2015 21:36:24 +0000 (16:36 -0500)]
Fix installation via pip.
Jumped two versions due to failed attempts.
noah morrison [Mon, 26 Jan 2015 20:58:44 +0000 (15:58 -0500)]
Bump version.
noah morrison [Mon, 26 Jan 2015 20:57:28 +0000 (15:57 -0500)]
Fix 0 and False values not rendering.
0 and False should still be rendered, even though they are falsy.
noah morrison [Mon, 26 Jan 2015 20:53:28 +0000 (15:53 -0500)]
Rename test_null unittest to test_falsy.
Added all falsy values to test_null and renamed it test_falsy.
noah morrison [Mon, 26 Jan 2015 20:14:19 +0000 (15:14 -0500)]
Bump version.
noah morrison [Mon, 26 Jan 2015 20:13:08 +0000 (15:13 -0500)]
Fix null values rendering as None.
noah morrison [Mon, 26 Jan 2015 20:12:05 +0000 (15:12 -0500)]
Add a unittest for null values.
They shouldn't render at all, but they currently render as 'None'.
noah morrison [Mon, 26 Jan 2015 01:07:41 +0000 (20:07 -0500)]
Bump version.
noah morrison [Sun, 25 Jan 2015 21:08:40 +0000 (16:08 -0500)]
Fix setup.py again.
It really... really likes to break on me.
(I think I have it fixed now)
Also the try catch is for tox, I don't know if there is a better
way then to do that.
noah morrison [Sun, 25 Jan 2015 20:56:23 +0000 (15:56 -0500)]
Bump version
noah morrison [Sun, 25 Jan 2015 20:52:47 +0000 (15:52 -0500)]
Merge branch 'msabramo-gitignore'
noah morrison [Sun, 25 Jan 2015 20:52:37 +0000 (15:52 -0500)]
Merge branch 'gitignore' of git://github.com/msabramo/chevron into msabramo-gitignore
noah morrison [Sun, 25 Jan 2015 20:43:08 +0000 (15:43 -0500)]
Stop using a leaked variable. (flake8)
scope is a variable that is defined lower in the for loop
and is leaked up in a future pass.
Also this code was slightly convoluted.
The goal is to stop rendering while the current scope is falsy.
Adding a new falsy scopes for every section inside
(So it doesn't start rendering on the next end tag).
I don't really know what I was thinking when I first coded this,
but all we have to do is add False instead of whatever in the
world I was doing before.
noah morrison [Sun, 25 Jan 2015 20:42:32 +0000 (15:42 -0500)]
Remove uneeded imports.
noah morrison [Sun, 25 Jan 2015 20:41:30 +0000 (15:41 -0500)]
Change version checking method. (flake8)
Importing sys is better then checking if unicode is defined.
noah morrison [Sun, 25 Jan 2015 04:15:19 +0000 (23:15 -0500)]
Merge branch 'msabramo-tox'
noah morrison [Sun, 25 Jan 2015 04:14:42 +0000 (23:14 -0500)]
Merge branch 'tox' of git://github.com/msabramo/chevron into msabramo-tox
noah morrison [Sun, 25 Jan 2015 04:11:01 +0000 (23:11 -0500)]
Bump version
noah morrison [Sun, 25 Jan 2015 04:06:40 +0000 (23:06 -0500)]
Merge branch 'pypi-cleanup'
Closes #10 - add pypi badge to README.md
Closes #11 - convert README.md to rst for pypi
Closes #12 [PR] - Fixed with commit
108af743de73a4d7fc4358720b63d62f60227cd6
noah morrison [Sun, 25 Jan 2015 03:59:47 +0000 (22:59 -0500)]
Make setup.py more readable.
noah morrison [Sun, 25 Jan 2015 03:58:07 +0000 (22:58 -0500)]
Convert README.md to rst for pypi using pandoc.
Closes #11
Thanks for the tips/help Marc :)
Marc Abramowitz [Sat, 24 Jan 2015 06:59:46 +0000 (22:59 -0800)]
Add .gitignore
Marc Abramowitz [Fri, 23 Jan 2015 15:44:42 +0000 (07:44 -0800)]
Add tox.ini for tox (http://tox.testrun.org/)
noah morrison [Fri, 23 Jan 2015 13:40:54 +0000 (08:40 -0500)]
Add pypi version badge to README.
closes #10
noah morrison [Fri, 23 Jan 2015 13:32:34 +0000 (08:32 -0500)]
Fix url for pypi.
Don't ask how this happened... I don't want to talk about it.
noah morrison [Fri, 23 Jan 2015 04:44:09 +0000 (23:44 -0500)]
Add setup.py.
Suggested/wanted by msabramo on github.
closes #6
noah morrison [Fri, 23 Jan 2015 02:59:10 +0000 (21:59 -0500)]
Fix unicode inside of lists for python 2
noah morrison [Fri, 23 Jan 2015 02:58:37 +0000 (21:58 -0500)]
Add unittest for unicode inside of lists.
This currently breaks python 2
noah morrison [Fri, 16 Jan 2015 15:52:47 +0000 (10:52 -0500)]
Tokens needs to be a generator, not a list.
At first I thought they were pretty much the same thing.
But generators pick up from where they left off,
while lists don't.
This fixes the edge-case infinite loop
that was happening last commit.
from the python repl
Lists
>>> data = [1,2,3,4,5]
>>> for i in data:
... print(i)
... if i == 2:
... for ii in data:
... print('>', ii)
... if ii == 4:
... break
...
1
2
> 1
> 2
> 3
> 4
3
4
5
Generators
>>> data = [1,2,3,4,5]
>>> gen = (d for d in data)
>>> for i in gen:
... print(i)
... if i == 2:
... for ii in gen:
... print('>', ii)
... if ii == 4:
... break
...
1
2
> 3
> 4
5
noah morrison [Fri, 16 Jan 2015 15:51:20 +0000 (10:51 -0500)]
Add a unittest for an edge-case recursion error.
Currently this makes chevron run in an infinite loop
(Until recursion depth limit happens)
noah morrison [Thu, 15 Jan 2015 20:02:41 +0000 (15:02 -0500)]
Fixed _get_key returning prematurely
Variables were clobbering other variables... badness was happening.
When given
```test.ms
{{# container }}
{{ sibbling.child }}
{{/ container }}
```
```test.json
{
"container": [1,2,3],
"sibbling": {
"child": "Just me."
}
}
```
it was returning
```wrong.txt
{'child': 'Just me.'}
{'child': 'Just me.'}
{'child': 'Just me.'}
```
when it should have returned
```right.txt
Just me.
Just me.
Just me.
```
noah morrison [Tue, 23 Dec 2014 03:57:23 +0000 (22:57 -0500)]
Split tokenizer up into helper functions
In an attempt to make it more readable, and seperate parsing
logic from tokenizing logic.
noah morrison [Fri, 5 Dec 2014 04:07:09 +0000 (23:07 -0500)]
Clean up the tokenizer a bit
noah morrison [Sat, 29 Nov 2014 22:25:51 +0000 (17:25 -0500)]
Merge branch 'cleanup-renderer'
noah morrison [Sat, 29 Nov 2014 22:24:06 +0000 (17:24 -0500)]
Fix python 2 encoding problem with the new docstr
Python 2 did not like my fancy new doc string with the unicode
filetree
noah morrison [Sat, 29 Nov 2014 22:17:16 +0000 (17:17 -0500)]
Update the render doc string
noah morrison [Sat, 29 Nov 2014 21:40:07 +0000 (16:40 -0500)]
Move get_partial out of render
Also "hid" it (Put an underscore in front of it)
noah morrison [Sat, 29 Nov 2014 21:37:51 +0000 (16:37 -0500)]
Move get_key out of render
Also "hid" it (Put an underscore in front of it)
noah morrison [Sat, 29 Nov 2014 21:34:38 +0000 (16:34 -0500)]
Move html_escape out of render
Also "hid" it (Put an underscore in front of it)
noah morrison [Fri, 28 Nov 2014 15:09:12 +0000 (10:09 -0500)]
Updated the readme
Noah Morrison [Thu, 27 Nov 2014 21:46:18 +0000 (16:46 -0500)]
Added syntax highlighting for python code
noah morrison [Sat, 22 Nov 2014 23:24:14 +0000 (18:24 -0500)]
Merge branch 'rebase'
Seperate the functions into seperate files and remove custom exception
noah morrison [Sat, 22 Nov 2014 23:18:17 +0000 (18:18 -0500)]
Removed custom exception in favor of a builtin
noah morrison [Sat, 22 Nov 2014 23:16:47 +0000 (18:16 -0500)]
Fixed imports (please help)
This is terrible... I hate it... there must be a better way...
noah morrison [Sat, 22 Nov 2014 18:49:27 +0000 (13:49 -0500)]
Renamed chevron.py to main.py
and updated the chevron/__init__.py
noah morrison [Sat, 22 Nov 2014 18:33:20 +0000 (13:33 -0500)]
Move render into it's own file
noah morrison [Sat, 22 Nov 2014 18:27:09 +0000 (13:27 -0500)]
Move tokenize into it's own file
noah morrison [Sat, 22 Nov 2014 02:08:27 +0000 (21:08 -0500)]
Fixed cli default arguments
And it's so much prettier
noah morrison [Fri, 21 Nov 2014 03:31:14 +0000 (22:31 -0500)]
Raised coverage to 100%
Kind of an lazy/evil way to do it, but I don't feel like writing
a unittest for calling main with no data.
noah morrison [Fri, 21 Nov 2014 03:26:36 +0000 (22:26 -0500)]
Add the ability to change the default delimiters
This is not the same as adding
{{=<< >>=}}
to the top of the file as the default delimiters will persist
through partials while changing the delimiters will not.
Noah Morrison [Wed, 19 Nov 2014 17:30:32 +0000 (12:30 -0500)]
Merge pull request #5 from dmorrison42/patch-1
Fix headings
Daniel Morrison [Wed, 19 Nov 2014 11:59:30 +0000 (06:59 -0500)]
Fix headings
Bulleted lists don't look as strong as intentional headings.
noah morrison [Wed, 19 Nov 2014 04:43:36 +0000 (23:43 -0500)]
Added nicer cli using argparse
noah morrison [Wed, 19 Nov 2014 04:42:41 +0000 (23:42 -0500)]
Updated main function to not need data file
If no data file is present it defaults to an empty dictionary
Noah Morrison [Wed, 19 Nov 2014 04:06:12 +0000 (23:06 -0500)]
Added coverage badge to README.md
noah morrison [Wed, 19 Nov 2014 04:01:24 +0000 (23:01 -0500)]
fixed travis not calling coveralls
/facepalm
noah morrison [Wed, 19 Nov 2014 03:42:19 +0000 (22:42 -0500)]
Fix python 2.6 failing
Thanks travis!
noah morrison [Wed, 19 Nov 2014 03:33:05 +0000 (22:33 -0500)]
Added coveralls to travis
noah morrison [Wed, 19 Nov 2014 03:16:35 +0000 (22:16 -0500)]
Fixed README.md error
above, below... same thing right?
noah morrison [Wed, 19 Nov 2014 02:16:49 +0000 (21:16 -0500)]
Updated the README.md
noah morrison [Tue, 18 Nov 2014 23:13:14 +0000 (18:13 -0500)]
Remove setup.py from git
noah morrison [Tue, 18 Nov 2014 22:21:43 +0000 (17:21 -0500)]
Updated README.md to have travis-ci build sticker
noah morrison [Tue, 18 Nov 2014 22:11:29 +0000 (17:11 -0500)]
Add .travis.yml
for http://travis-ci.org
noah morrison [Tue, 18 Nov 2014 22:05:34 +0000 (17:05 -0500)]
Prefer setuptools to distutils.core
noah morrison [Tue, 18 Nov 2014 21:51:49 +0000 (16:51 -0500)]
pep8
noah morrison [Tue, 18 Nov 2014 21:49:44 +0000 (16:49 -0500)]
Added cli_main to coveragerc exclude
noah morrison [Tue, 18 Nov 2014 21:43:34 +0000 (16:43 -0500)]
Merge branch 'distribute'
Made chevron much easier to install and use
noah morrison [Tue, 18 Nov 2014 21:40:01 +0000 (16:40 -0500)]
Added setup.py for pip installs
noah morrison [Tue, 18 Nov 2014 21:38:12 +0000 (16:38 -0500)]
Added __init__.py and started using relative paths