Skip to content

Commit ef7dd75

Browse files
committed
📚 🔨 refactor documentaiton 🔥 remove python 2 tests
1 parent 99482b6 commit ef7dd75

File tree

6 files changed

+74
-46
lines changed

6 files changed

+74
-46
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

.moban.d/CUSTOM_README.rst.jj2

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,6 @@ Quick start
1919
Nested input objects
2020
---------------------
2121

22-
Given a data.json file with the following content
23-
24-
.. code-block::
25-
26-
{
27-
"person": {
28-
"firstname": "Yehuda",
29-
"lastname": "Katz",
30-
},
31-
}
32-
33-
34-
.. code-block:: bash
35-
36-
{% raw %}
37-
$ moban --template-type handlebars -c data.json "{{person.firstname}} {{person.lastname}}"
38-
Handlebars-ing <p>{{first... to moban.output
39-
Handlebarsed 1 file.
40-
$ cat moban.output
41-
Yehuda Katz
42-
{% endraw %}
43-
44-
For `handlebars.js` users, yes, the example was copied from handlebarjs.com. The
45-
aim is to show off what we can do.
46-
47-
Let's continue with a bit more fancy feature:
48-
49-
{% raw %}
50-
51-
.. code-block:: bash
52-
53-
$ moban --template-type handlebars -c data.json "{{#with person}}{{firstname}} {{lastname}} {{/with}}"
54-
55-
{% endraw %}
22+
{% include "handlebars_example.rst.jj2" %}
5623

5724
{%endblock%}

.moban.d/custom_travis.yml.jj2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends 'travis.yml.jj2' %}
2+
3+
{%block custom_python_versions%}
4+
python:
5+
- 3.7
6+
- 3.6
7+
- 3.8
8+
{%endblock%}

.moban.d/handlebars_example.rst.jj2

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Given a data.json file with the following content
2+
3+
.. code-block::
4+
5+
{
6+
"person": {
7+
"firstname": "Yehuda",
8+
"lastname": "Katz",
9+
},
10+
}
11+
12+
13+
.. code-block:: bash
14+
15+
{% raw %}
16+
$ moban --template-type handlebars -c data.json "{{person.firstname}} {{person.lastname}}"
17+
Handlebars-ing <p>{{first... to moban.output
18+
Handlebarsed 1 file.
19+
$ cat moban.output
20+
Yehuda Katz
21+
{% endraw %}
22+
23+
For `handlebars.js` users, yes, the example was copied from handlebarjs.com. The
24+
aim is to show off what we can do.
25+
26+
Let's continue with a bit more fancy feature:
27+
28+
{% raw %}
29+
30+
.. code-block:: bash
31+
32+
$ moban --template-type handlebars -c data.json "{{#with person}}{{firstname}} {{lastname}} {{/with}}"
33+
34+
{% endraw %}

.moban.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
requires:
2-
- type: git
3-
url: https://github.com/moremoban/pypi-mobans
4-
submodule: true
5-
branch: dev
61
configuration:
72
template_dir:
8-
- "pypi-mobans:templates"
3+
- "git://github.com/moremoban/pypi-mobans?submodule=true&branch=dev!/templates"
4+
- "git://github.com/moremoban/pypi-mobans?submodule=true&branch=dev!/statics"
95
- ".moban.d"
106
configuration: moban-handlebars.yml
117
targets:
@@ -17,8 +13,9 @@ targets:
1713
- test.sh: test.script.jj2
1814
- "moban_handlebars/_version.py": "_version.py.jj2"
1915
- .gitignore: gitignore.jj2
20-
- .travis.yml: travis.yml.jj2
16+
- .travis.yml: custom_travis.yml.jj2
2117
- Pipfile: Pipfile.jj2
2218
- output: CHANGELOG.rst
2319
configuration: changelog.yml
2420
template: CHANGELOG.rst.jj2
21+
- ".github/workflows/pythonpublish.yml": "pythonpublish.yml"

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ language: python
44
notifications:
55
email: false
66
python:
7-
- &pypy2 pypy2.7-6.0
8-
- &pypy3 pypy3.5-6.0
9-
- 3.8
107
- 3.7
118
- 3.6
12-
- 3.5
13-
- 2.7
9+
- 3.8
1410

1511
stages:
1612
- lint

0 commit comments

Comments
 (0)