]> Devi Nivas Git - chevron.git/log
chevron.git
6 years agoMerge pull request #50 from dmorrison42/missing_key_partial
Noah Morrison [Sun, 7 Apr 2019 17:10:02 +0000 (13:10 -0400)]
Merge pull request #50 from dmorrison42/missing_key_partial

Missing key partial

6 years agoFix #48
Daniel Morrison [Sun, 7 Apr 2019 14:55:57 +0000 (10:55 -0400)]
Fix #48

Turns out some weird scoping things were happening.

The `scopes` variable is being passed throughout by reference.

Which is great (yay speed improvements). In theory. Except...

All operations must therefore operate on scopes by reference.

`scopes = scopes[1:]` used to end a scope updates the reference.
This means the parent call to renderer doesn't leave the scope.

6 years agoAdd test for #48
Daniel Morrison [Sat, 23 Mar 2019 23:07:40 +0000 (19:07 -0400)]
Add test for #48

7 years agoMerge pull request #46 from akosthekiss/manifest-for-readme
Noah Morrison [Sun, 7 Oct 2018 18:14:26 +0000 (14:14 -0400)]
Merge pull request #46 from akosthekiss/manifest-for-readme

Add MANIFEST.in to ensure that README.md is found by setup.py

7 years agoAdd MANIFEST.in to ensure that README.md is found by setup.py
Akos Kiss [Sun, 7 Oct 2018 12:42:28 +0000 (14:42 +0200)]
Add MANIFEST.in to ensure that README.md is found by setup.py

7 years agoBump version (patch)
Noah Morrison [Wed, 3 Oct 2018 14:20:17 +0000 (10:20 -0400)]
Bump version (patch)

7 years agoFix flake8 not realizing this line is python2
Noah Morrison [Wed, 3 Oct 2018 14:19:59 +0000 (10:19 -0400)]
Fix flake8 not realizing this line is python2

7 years agoBump version (minor)
Noah Morrison [Wed, 3 Oct 2018 14:15:33 +0000 (10:15 -0400)]
Bump version (minor)

7 years agoMerge branch 'master' of https://github.com/gber/chevron into gber-master
Noah Morrison [Wed, 3 Oct 2018 13:47:14 +0000 (09:47 -0400)]
Merge branch 'master' of https://github.com/gber/chevron into gber-master

7 years agoFix flake8 error
Noah Morrison [Wed, 3 Oct 2018 13:45:53 +0000 (09:45 -0400)]
Fix flake8 error

7 years agoMerge branch 'master' of https://github.com/jonioni/chevron into jonioni-master
Noah Morrison [Wed, 3 Oct 2018 13:43:32 +0000 (09:43 -0400)]
Merge branch 'master' of https://github.com/jonioni/chevron into jonioni-master

7 years agoMerge branch 'fix-open-unicode' of https://github.com/akosthekiss/chevron into akosth...
Noah Morrison [Wed, 3 Oct 2018 13:38:48 +0000 (09:38 -0400)]
Merge branch 'fix-open-unicode' of https://github.com/akosthekiss/chevron into akosthekiss-fix-open-unicode

7 years agoMerge branch 'fix-lambda-variable' of https://github.com/akosthekiss/chevron
Noah Morrison [Wed, 3 Oct 2018 13:37:29 +0000 (09:37 -0400)]
Merge branch 'fix-lambda-variable' of https://github.com/akosthekiss/chevron

7 years agoForce utf-8 encoding when opening files
Akos Kiss [Tue, 2 Oct 2018 11:31:42 +0000 (13:31 +0200)]
Force utf-8 encoding when opening files

The default `open(..., 'r')` may lead to errors when utf-8 encoded
files are read on a platform with non-utf-8 default locale /
preferred encoding. The `io` package allows to specify `encoding`
for `open` in a Python 2 & 3-compatible way.

7 years agoFix the rendering of lambdas
Akos Kiss [Tue, 2 Oct 2018 09:44:45 +0000 (11:44 +0200)]
Fix the rendering of lambdas

Variables are the most common tag types, yet they were not handled
during the generation of template text for lambda scopes.

7 years agoAdd missing single quotes to dict keys in README examples
Akos Kiss [Mon, 1 Oct 2018 16:37:56 +0000 (18:37 +0200)]
Add missing single quotes to dict keys in README examples

7 years agoOkay, if I can't only run it once, only publish once
Noah Morrison [Tue, 2 Oct 2018 20:59:04 +0000 (16:59 -0400)]
Okay, if I can't only run it once, only publish once

7 years agoHopefully actually only run 3.6 once
Noah Morrison [Tue, 2 Oct 2018 20:54:52 +0000 (16:54 -0400)]
Hopefully actually only run 3.6 once

7 years agoOnly run python 3.6 once, only push to test.pypi on tags
Noah Morrison [Tue, 2 Oct 2018 20:43:54 +0000 (16:43 -0400)]
Only run python 3.6 once, only push to test.pypi on tags

7 years agoMerge branch 'akosthekiss-fix-flake8' into travis-test
Noah Morrison [Tue, 2 Oct 2018 20:39:24 +0000 (16:39 -0400)]
Merge branch 'akosthekiss-fix-flake8' into travis-test

7 years agoBump patch version number for PyPi test
Noah Morrison [Tue, 2 Oct 2018 20:34:12 +0000 (16:34 -0400)]
Bump patch version number for PyPi test

7 years agoMerge branch 'akosthekiss-pypi-deploy-origin-only' into travis-test
Noah Morrison [Tue, 2 Oct 2018 20:32:11 +0000 (16:32 -0400)]
Merge branch 'akosthekiss-pypi-deploy-origin-only' into travis-test

7 years agoActually tell PyPi that the readme is in markdown
Noah Morrison [Tue, 2 Oct 2018 20:28:03 +0000 (16:28 -0400)]
Actually tell PyPi that the readme is in markdown

oops... who reads documentation anyways?

7 years agoChange upload version 3.5 => 3.6
Noah Morrison [Tue, 2 Oct 2018 20:23:26 +0000 (16:23 -0400)]
Change upload version 3.5 => 3.6

7 years agoMissed a / while updating PyPi server locations
Noah Morrison [Tue, 2 Oct 2018 20:17:37 +0000 (16:17 -0400)]
Missed a / while updating PyPi server locations

7 years agoUpdate PyPi server locations
Noah Morrison [Tue, 2 Oct 2018 20:13:14 +0000 (16:13 -0400)]
Update PyPi server locations

7 years agoRemove pandoc, PyPi accepts markdown now
Noah Morrison [Tue, 2 Oct 2018 20:06:56 +0000 (16:06 -0400)]
Remove pandoc, PyPi accepts markdown now

7 years agoUpdate Travis to only use tox and coveralls on 3.5
Noah Morrison [Tue, 2 Oct 2018 19:54:49 +0000 (15:54 -0400)]
Update Travis to only use tox and coveralls on 3.5

7 years agoDeploy to PyPI from the source repo only
Akos Kiss [Tue, 2 Oct 2018 14:03:00 +0000 (16:03 +0200)]
Deploy to PyPI from the source repo only

Otherwise, Travis CI will try to deploy to (test)pypi for forks as
well, and it will fail.

7 years agoFix flake8-reported style issues
Akos Kiss [Mon, 1 Oct 2018 16:58:58 +0000 (18:58 +0200)]
Fix flake8-reported style issues

7 years agoFix nested loops
Noah Morrison [Sat, 29 Sep 2018 05:41:24 +0000 (01:41 -0400)]
Fix nested loops

This feels like it might still have edge cases, but it works for now.

7 years agoSupporting Partial File Without File Extension
Jon [Fri, 21 Sep 2018 05:04:48 +0000 (01:04 -0400)]
Supporting Partial File Without File Extension

Change made to function `_get_partial_ext`:
From `path = partials_path + '/' + name + '.' + partials_ext` to `path = partials_path + '/' + name + ('.' + partials_ext if partials_ext else '')`.

7 years agoUse more pythonic type checking
Guido Berhoerster [Tue, 28 Aug 2018 13:43:52 +0000 (15:43 +0200)]
Use more pythonic type checking

Use isinstance() and abstract base classes for checking available
functionality instead of strictly checking for base types. Among other
things, this allows for rendering any non-string sequences, iterators or
generators as lists (resolves #33) and for passing in any callable
instead of just plain functions.

7 years agoMerge branch 'master' of https://github.com/klorenz/chevron into klorenz-master
Noah Morrison [Fri, 24 Aug 2018 01:58:07 +0000 (21:58 -0400)]
Merge branch 'master' of https://github.com/klorenz/chevron into klorenz-master

7 years agoAllow for custom falsy data types
Noah Morrison [Fri, 24 Aug 2018 00:22:34 +0000 (20:22 -0400)]
Allow for custom falsy data types

Helps resolve Issue #35
This allows for a custom data type be outputed even when falsy

7 years agocache tokens for lambdas for speed
Kay-Uwe (Kiwi) Lorenz [Sun, 29 Jul 2018 06:02:57 +0000 (08:02 +0200)]
cache tokens for lambdas for speed

7 years agofix my flake issues
Kay-Uwe (Kiwi) Lorenz [Sat, 28 Jul 2018 07:15:50 +0000 (09:15 +0200)]
fix my flake issues

7 years agoupdate README
Kay-Uwe (Kiwi) Lorenz [Sat, 28 Jul 2018 07:01:17 +0000 (09:01 +0200)]
update README

7 years agoimplement #27 -- Lambdas
Kay-Uwe (Kiwi) Lorenz [Sat, 28 Jul 2018 06:36:06 +0000 (08:36 +0200)]
implement #27 -- Lambdas

7 years agoBump version (patch)
Noah Morrison [Sat, 21 Jul 2018 00:01:35 +0000 (20:01 -0400)]
Bump version (patch)

7 years agoRemove extra newline from cli
Noah Morrison [Fri, 20 Jul 2018 23:58:35 +0000 (19:58 -0400)]
Remove extra newline from cli

The render function already handles adding a newline

7 years agoPut the version string in one place
Noah Morrison [Sun, 17 Jun 2018 11:55:27 +0000 (07:55 -0400)]
Put the version string in one place

--version was getting outdated because I was forgetting to
update it.

7 years agoBump version (minor)
Noah Morrison [Sat, 16 Jun 2018 14:22:54 +0000 (10:22 -0400)]
Bump version (minor)

7 years agoMerge pull request #25 from cclauss/patch-1
Noah Morrison [Sat, 16 Jun 2018 14:14:34 +0000 (10:14 -0400)]
Merge pull request #25 from cclauss/patch-1

Python 2.6, 2.7, 3.2-3.6 in README.md, setup.py, and tox.ini

7 years agoMerge pull request #29 from lksnmnn/fix-utf8-encoding
Noah Morrison [Sat, 16 Jun 2018 14:08:20 +0000 (10:08 -0400)]
Merge pull request #29 from lksnmnn/fix-utf8-encoding

fix(renderer): allow unicode for no-escape variables

7 years agofix(renderer): allow unicode for no-escape variables
Lukas Neumann [Sun, 10 Jun 2018 12:12:12 +0000 (14:12 +0200)]
fix(renderer): allow unicode for no-escape variables

7 years agoChange is_file check to accept named pipes
Noah Morrison [Fri, 20 Apr 2018 17:49:12 +0000 (13:49 -0400)]
Change is_file check to accept named pipes

Fix issue #26

8 years agoAdd py36 to tox.ini
cclauss [Sun, 12 Nov 2017 19:47:03 +0000 (20:47 +0100)]
Add py36 to tox.ini

8 years agoAdd Python 3.5 and 3.6 to setup.py
cclauss [Sun, 12 Nov 2017 19:46:14 +0000 (20:46 +0100)]
Add Python 3.5 and 3.6 to setup.py

8 years agoPython 2.6, 2.7, 3.2-3.6
cclauss [Sun, 12 Nov 2017 19:45:09 +0000 (20:45 +0100)]
Python 2.6, 2.7, 3.2-3.6

Why not drop support for Python versions that are already EOL such as 2.6, 3.2, and 3.3?
* https://docs.python.org/devguide/index.html#branchstatus

8 years agoMerge pull request #23 from Ojisama/handle-closing-tag-only
Noah Morrison [Fri, 29 Sep 2017 09:43:46 +0000 (05:43 -0400)]
Merge pull request #23 from Ojisama/handle-closing-tag-only

Handling missing opening tag

8 years agoHandling missing opening tag
Ojisama [Mon, 7 Aug 2017 16:45:25 +0000 (17:45 +0100)]
Handling missing opening tag

8 years agoMerge branch 'samuelcolvin-fix-line-number'
Noah Morrison [Mon, 3 Jul 2017 16:47:09 +0000 (12:47 -0400)]
Merge branch 'samuelcolvin-fix-line-number'

8 years agoFix unittest in python 2.6
Noah Morrison [Mon, 3 Jul 2017 16:44:28 +0000 (12:44 -0400)]
Fix unittest in python 2.6

8 years agofix line numbers in errors
Samuel Colvin [Mon, 3 Jul 2017 14:53:12 +0000 (15:53 +0100)]
fix line numbers in errors

8 years agoBump version (patch)
Noah Morrison [Mon, 3 Jul 2017 11:44:06 +0000 (07:44 -0400)]
Bump version (patch)

8 years agoMerge pull request #21 from samuelcolvin/fix--unclosed-tag-error
Noah Morrison [Mon, 3 Jul 2017 11:43:15 +0000 (07:43 -0400)]
Merge pull request #21 from samuelcolvin/fix--unclosed-tag-error

correct error for badly closed tag

8 years agocorrect error for badly closed tag
Samuel Colvin [Sun, 2 Jul 2017 10:26:29 +0000 (11:26 +0100)]
correct error for badly closed tag

8 years agoBump version (minor)
Noah Morrison [Thu, 29 Jun 2017 20:53:50 +0000 (16:53 -0400)]
Bump version (minor)

8 years agoMerge pull request #20 from samuelcolvin/test-py3.6
Noah Morrison [Mon, 19 Jun 2017 21:24:54 +0000 (17:24 -0400)]
Merge pull request #20 from samuelcolvin/test-py3.6

add tests for python 3.6

8 years agoMerge pull request #19 from samuelcolvin/custom-exception
Noah Morrison [Mon, 19 Jun 2017 21:24:33 +0000 (17:24 -0400)]
Merge pull request #19 from samuelcolvin/custom-exception

add custom exception: ChevronError

Backwards compatible with old code that is checking for SyntaxError

8 years agoadd custom exception: ChevronError
Samuel Colvin [Mon, 19 Jun 2017 16:15:36 +0000 (17:15 +0100)]
add custom exception: ChevronError

8 years agoadd tests for python 3.6
Samuel Colvin [Mon, 19 Jun 2017 16:25:51 +0000 (17:25 +0100)]
add tests for python 3.6

8 years agoBump version (minor)
Noah Morrison [Thu, 15 Jun 2017 04:23:33 +0000 (00:23 -0400)]
Bump version (minor)

8 years agoFix version badge in README
Noah Morrison [Thu, 15 Jun 2017 04:21:27 +0000 (00:21 -0400)]
Fix version badge in README

8 years agoMerge branch 'update-travis'
Noah Morrison [Thu, 15 Jun 2017 04:20:41 +0000 (00:20 -0400)]
Merge branch 'update-travis'

8 years agoFix deploy conditions
Noah Morrison [Thu, 15 Jun 2017 04:08:43 +0000 (00:08 -0400)]
Fix deploy conditions

8 years agoBump version (patch)
Noah Morrison [Thu, 15 Jun 2017 03:55:52 +0000 (23:55 -0400)]
Bump version (patch)

8 years agoAdd deploy step to travis
Noah Morrison [Thu, 15 Jun 2017 03:51:47 +0000 (23:51 -0400)]
Add deploy step to travis

8 years agoMove coverage into tox and ignore coverage on py32
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.

8 years agoAdd coverage reports
Noah Morrison [Thu, 15 Jun 2017 03:01:30 +0000 (23:01 -0400)]
Add coverage reports

8 years agoFix flake8
Noah Morrison [Thu, 15 Jun 2017 02:53:33 +0000 (22:53 -0400)]
Fix flake8

8 years agoAdd flake8 to matrix
Noah Morrison [Thu, 15 Jun 2017 02:47:30 +0000 (22:47 -0400)]
Add flake8 to matrix

8 years agoUse tox-travis
Noah Morrison [Thu, 15 Jun 2017 02:38:12 +0000 (22:38 -0400)]
Use tox-travis

8 years agoFix inverted sections coercing the . variable
Noah Morrison [Wed, 14 Jun 2017 04:36:51 +0000 (00:36 -0400)]
Fix inverted sections coercing the . variable

Fixes #17

10 years agoOk, this time I think I actually fixed coverage
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...

10 years agoOmit third party files from coverage
noah morrison [Fri, 8 May 2015 21:46:37 +0000 (17:46 -0400)]
Omit third party files from coverage

10 years agoRemove shebang from renderer and tokenizer
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

10 years agoRemove comments above import statement
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.

10 years agoIgnore import json path for coverage
noah morrison [Thu, 30 Apr 2015 02:31:29 +0000 (22:31 -0400)]
Ignore import json path for coverage

10 years agoUpdate README
noah morrison [Thu, 30 Apr 2015 02:25:05 +0000 (22:25 -0400)]
Update README

10 years agoUse pyyaml if it is available
noah morrison [Tue, 28 Apr 2015 01:54:42 +0000 (21:54 -0400)]
Use pyyaml if it is available

10 years agoBump version
noah morrison [Sat, 11 Apr 2015 02:48:25 +0000 (22:48 -0400)]
Bump version

10 years agoRaise coverage to 100%
noah morrison [Thu, 9 Apr 2015 21:26:03 +0000 (17:26 -0400)]
Raise coverage to 100%

10 years agoMove SyntaxError handling into cli_main
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.

10 years agoUse flake8 instead of pep8 in travis
noah morrison [Thu, 9 Apr 2015 20:50:08 +0000 (16:50 -0400)]
Use flake8 instead of pep8 in travis

10 years agoRun flake8 on the entire directory
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.

10 years agoFix pep8 (and travis)
noah morrison [Thu, 9 Apr 2015 20:21:33 +0000 (16:21 -0400)]
Fix pep8 (and travis)

10 years agoMake a comment more descriptive
noah morrison [Thu, 9 Apr 2015 03:28:03 +0000 (23:28 -0400)]
Make a comment more descriptive

10 years agoAdd support for complex types
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.

10 years agoAdd better error messages
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.

11 years agoBump version.
noah morrison [Mon, 26 Jan 2015 22:01:10 +0000 (17:01 -0500)]
Bump version.

11 years agoAdd -v|--version option to chevron.
noah morrison [Mon, 26 Jan 2015 22:00:30 +0000 (17:00 -0500)]
Add -v|--version option to chevron.

11 years agoFix installation via pip.
noah morrison [Mon, 26 Jan 2015 21:36:24 +0000 (16:36 -0500)]
Fix installation via pip.

Jumped two versions due to failed attempts.

11 years agoBump version.
noah morrison [Mon, 26 Jan 2015 20:58:44 +0000 (15:58 -0500)]
Bump version.

11 years agoFix 0 and False values not rendering.
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.

11 years agoRename test_null unittest to test_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.

11 years agoBump version.
noah morrison [Mon, 26 Jan 2015 20:14:19 +0000 (15:14 -0500)]
Bump version.

11 years agoFix null values rendering as None.
noah morrison [Mon, 26 Jan 2015 20:13:08 +0000 (15:13 -0500)]
Fix null values rendering as None.

11 years agoAdd a unittest for null values.
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'.