Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
Template
Commits
b0817717
Commit
b0817717
authored
8 years ago
by
nimrod
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/python32'
parents
ca322290
cb6c8b0d
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.travis.yml
+7
-1
7 additions, 1 deletion
.travis.yml
README.rst
+4
-1
4 additions, 1 deletion
README.rst
template/filters.py
+2
-2
2 additions, 2 deletions
template/filters.py
tox.ini
+5
-1
5 additions, 1 deletion
tox.ini
with
18 additions
and
5 deletions
.travis.yml
+
7
−
1
View file @
b0817717
---
---
language
:
python
language
:
python
python
:
[
"
2.7"
,
"
3.3"
,
"
3.4"
,
"
3.5"
]
python
:
[
"
2.7"
,
"
3.2"
,
"
3.3"
,
"
3.4"
,
"
3.5"
]
dist
:
trusty
dist
:
trusty
sudo
:
false
sudo
:
false
cache
:
cache
:
-
pip
-
pip
matrix
:
include
:
-
python
:
"
3.5"
env
:
TOXENV=docs
allow_failures
:
-
python
:
"
3.2"
install
:
install
:
-
pip install tox-travis
-
pip install tox-travis
...
...
This diff is collapsed.
Click to expand it.
README.rst
+
4
−
1
View file @
b0817717
...
@@ -46,7 +46,8 @@ The following Jinja filters were added:
...
@@ -46,7 +46,8 @@ The following Jinja filters were added:
- :code:`pprint`: Pretty print variable.
- :code:`pprint`: Pretty print variable.
- :code:`combine`: Combine 2 dictionaries.
- :code:`combine`: Combine 2 dictionaries.
Example usage can be seen in :code:`tests.sh`.
Example usage can be seen in :code:`tests.sh` and for specific filters in the
docstrings in :code:`template/filters.py`.
Testing
Testing
-------
-------
...
@@ -79,6 +80,8 @@ at: https://www.shore.co.il/git/.
...
@@ -79,6 +80,8 @@ at: https://www.shore.co.il/git/.
TODO
TODO
----
----
- Fix test failure on Python 3.2
(https://travis-ci.org/adarnimrod/template/jobs/194581463).
- Release on tagged commits to PyPI in Travis CI
- Release on tagged commits to PyPI in Travis CI
(https://docs.travis-ci.com/user/deployment/pypi/ and
(https://docs.travis-ci.com/user/deployment/pypi/ and
https://docs.travis-ci.com/user/encryption-keys/).
https://docs.travis-ci.com/user/encryption-keys/).
...
...
This diff is collapsed.
Click to expand it.
template/filters.py
+
2
−
2
View file @
b0817717
...
@@ -47,9 +47,9 @@ def from_json(value):
...
@@ -47,9 +47,9 @@ def from_json(value):
>>>
from_json
(
'
[1, 2, 3]
'
)
>>>
from_json
(
'
[1, 2, 3]
'
)
[
1
,
2
,
3
]
[
1
,
2
,
3
]
>>>
from_json
(
'"
a
"'
)
==
six
.
text_type
(
u
'
a
'
)
>>>
from_json
(
'"
a
"'
)
==
six
.
text_type
(
'
a
'
)
True
True
>>>
from_json
(
'
{
"
1
"
: {
"
a
"
: [1, 2, 3]}}
'
)
==
{
u
'
1
'
:
{
u
'
a
'
:
[
1
,
2
,
3
]}}
>>>
from_json
(
'
{
"
1
"
: {
"
a
"
: [1, 2, 3]}}
'
)
==
{
'
1
'
:
{
'
a
'
:
[
1
,
2
,
3
]}}
True
True
'''
'''
from
json
import
loads
from
json
import
loads
...
...
This diff is collapsed.
Click to expand it.
tox.ini
+
5
−
1
View file @
b0817717
...
@@ -19,11 +19,15 @@ deps =
...
@@ -19,11 +19,15 @@ deps =
flake8
flake8
commands
=
commands
=
check-manifest
--ignore
tox.ini,tests*
check-manifest
--ignore
tox.ini,tests*
python
setup.py
check
-m
-r
-s
flake8
.
flake8
.
python
-m
doctest
template/filters.py
template/__init__.py
python
-m
doctest
template/filters.py
template/__init__.py
./tests.sh
./tests.sh
[testenv:docs]
basepython
=
python
deps
=
readme_renderer
commands
=
python setup.py check -m -r -s
[testenv:release]
[testenv:release]
basepython
=
python
basepython
=
python
whitelist_externals
=
whitelist_externals
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment