Skip to content

Commit 31151ec

Browse files
committed
🤝 synchronize with latest pypi-mobans updates
1 parent d8d3b10 commit 31151ec

12 files changed

+126
-71
lines changed

.gitignore

+20-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ parts/
2525
sdist/
2626
var/
2727
wheels/
28-
pip-wheel-metadata/
2928
share/python-wheels/
3029
*.egg-info/
3130
.installed.cfg
@@ -52,8 +51,10 @@ htmlcov/
5251
nosetests.xml
5352
coverage.xml
5453
*.cover
54+
*.py,cover
5555
.hypothesis/
5656
.pytest_cache/
57+
cover/
5758

5859
# Translations
5960
*.mo
@@ -63,6 +64,7 @@ coverage.xml
6364
*.log
6465
local_settings.py
6566
db.sqlite3
67+
db.sqlite3-journal
6668

6769
# Flask stuff:
6870
instance/
@@ -75,6 +77,7 @@ instance/
7577
docs/_build/
7678

7779
# PyBuilder
80+
.pybuilder/
7881
target/
7982

8083
# Jupyter Notebook
@@ -85,17 +88,23 @@ profile_default/
8588
ipython_config.py
8689

8790
# pyenv
88-
.python-version
91+
# For a library or package, you might want to ignore these files since the code is
92+
# intended to run in multiple environments; otherwise, check them in:
93+
# .python-version
8994

9095
# pipenv
9196
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
9297
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93-
# having no cross-platform support, pipenv may install dependencies that dont work, or not
98+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
9499
# install all needed dependencies.
95100
#Pipfile.lock
96101

97-
# celery beat schedule file
102+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
103+
__pypackages__/
104+
105+
# Celery stuff
98106
celerybeat-schedule
107+
celerybeat.pid
99108

100109
# SageMath parsed files
101110
*.sage.py
@@ -127,6 +136,12 @@ dmypy.json
127136
# Pyre type checker
128137
.pyre/
129138

139+
# pytype static type analyzer
140+
.pytype/
141+
142+
# Cython debug symbols
143+
cython_debug/
144+
130145
# Emacs rules
131146
# -*- mode: gitignore; -*-
132147
*~
@@ -210,6 +225,7 @@ Temporary Items
210225
# Windows rules
211226
# Windows thumbnail cache files
212227
Thumbs.db
228+
Thumbs.db:encryptable
213229
ehthumbs.db
214230
ehthumbs_vista.db
215231

.moban.d/CUSTOM_README.rst.jj2

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
{% extends 'README.rst.jj2' %}
2+
3+
{% block documentation_link %}
4+
{% endblock %}
5+

.moban.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
requires:
2-
- type: git
3-
url: https://github.com/moremoban/pypi-mobans
4-
submodule: true
5-
- type: git
6-
url: https://github.com/pyecharts/pyecharts-mobans
71
configuration:
8-
configuration_dir: "pyecharts-mobans:config"
2+
configuration_dir: "git://github.com/pyecharts/pyecharts-mobans!/config"
93
template_dir:
10-
- "pyecharts-mobans:templates"
11-
- "pypi-mobans:templates"
4+
- "git://github.com/moremoban/pypi-mobans?branch=dev&submodule=True!/templates"
5+
- "git://github.com/pyecharts/pyecharts-mobans!/templates"
126
- ".moban.d"
137
configuration: snapshot-selenium.yml
148
targets:
159
- README.rst: CUSTOM_README.rst.jj2
1610
- setup.py: pyecharts_setup.py.jj2
1711
- requirements.txt: requirements.txt.jj2
18-
- "tests/requirements.txt": "tests/pyecharts_requirements.txt.jj2"
1912
- test.sh: test.script.jj2
2013
- "snapshot_selenium/_version.py": "_version.py.jj2"
2114
- .gitignore: pyecharts_gitignore.jj2
@@ -24,3 +17,6 @@ targets:
2417
- output: CHANGELOG.rst
2518
template: CHANGELOG.rst.jj2
2619
- lint.sh: lint.script.jj2
20+
- Makefile: Makefile.jj2
21+
- tests/requirements.txt: tests/requirements.txt.jj2
22+
- format.sh: format.sh.jj2

.travis.yml

+19-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
sudo: false
32
dist: xenial
43
language: python
@@ -8,39 +7,46 @@ python:
87
- 3.8-dev
98
- 3.7
109
- 3.6
11-
- 3.5
1210

1311
stages:
14-
- test
1512
- lint
13+
- moban
14+
- test
1615

17-
.disable_global: &disable_global
18-
before_install: false
19-
install: true
20-
before_script: false
21-
after_success: false
22-
after_failure: false
2316

2417
.lint: &lint
25-
<<: *disable_global
18+
git:
19+
submodules: false
2620
python: 3.6
21+
env:
22+
- MINREQ=0
2723
stage: lint
2824
install: pip install flake8
2925
script: flake8
3026

27+
.moban: &moban
28+
python: 3.6
29+
env:
30+
- MINREQ=0
31+
stage: moban
32+
install: pip install moban>=0.0.4 gitfs2 pypifs
33+
script:
34+
- moban
35+
- git diff --exit-code
36+
3137
jobs:
3238
include:
39+
- *moban
3340
- *lint
3441

3542
stage: test
3643

37-
script: make test
38-
3944
before_install:
4045
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
4146
mv min_requirements.txt requirements.txt ;
4247
fi
43-
- test ! -f rnd_requirements.txt || pip install --no-deps -r rnd_requirements.txt
48+
- test ! -f rnd_requirements.txt ||
49+
pip install --no-deps -r rnd_requirements.txt
4450
- test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ;
4551
- pip install -r tests/requirements.txt
4652
script:

CHANGELOG.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ Change log
44
0.0.2 - 01.04.2019
55
--------------------------------------------------------------------------------
66

7-
update
8-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7+
**update**
98

109
#. it will take an external browser driver and render images
1110

1211
0.0.1 - 09.04.2019
1312
--------------------------------------------------------------------------------
1413

15-
first release
16-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
**first release**
1715

1816
#. use selenium driver for rendering pyecharts output as image

Makefile

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
all: test
2-
3-
test:
4-
bash test.sh
5-
6-
format:
7-
isort -rc .
8-
black -l 79 snapshot_selenium
9-
black -l 79 setup.py
10-
black -l 79 tests
11-
12-
13-
lint:
14-
make lint
1+
all: test
2+
3+
test: lint
4+
bash test.sh
5+
6+
install_test:
7+
pip install -r tests/requirements.txt
8+
9+
git-diff-check:
10+
git diff --exit-code
11+
12+
lint:
13+
bash lint.sh
14+
15+
format:
16+
bash format.sh
17+
18+
git-diff-check:
19+
git diff --exit-code

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = 'pypi'
77
python_version= '3.6'
88

99
[packages]
10-
selenium = "*"
10+
selenium = "*"
1111

1212
[dev-packages]
1313
nose = "*"

README.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ snapshot-selenium
77

88
.. image:: https://codecov.io/github/pyecharts/snapshot-selenium/coverage.png
99
:target: https://codecov.io/github/pyecharts/snapshot-selenium
10+
.. image:: https://badge.fury.io/py/snapshot-selenium.svg
11+
:target: https://pypi.org/project/snapshot-selenium
1012

13+
.. image:: https://pepy.tech/badge/snapshot-selenium/month
14+
:target: https://pepy.tech/project/snapshot-selenium/month
15+
16+
.. image:: https://img.shields.io/github/stars/pyecharts/snapshot-selenium.svg?style=social&maxAge=3600&label=Star
17+
:target: https://github.com/pyecharts/snapshot-selenium/stargazers
1118

12-
.. image:: https://readthedocs.org/projects/snapshot-selenium/badge/?version=latest
13-
:target: http://snapshot-selenium.readthedocs.org/en/latest/
1419

1520

1621
Installation

format.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
isort -y $(find snapshot_selenium -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
2+
black -l 79 snapshot_selenium
3+
black -l 79 tests

lint.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
1+
pip install flake8
2+
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
3+
python setup.py checkdocs

setup.py

+37-19
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
#!/usr/bin/env python3
22

3-
# Template by pypi-mobans
3+
"""
4+
Template by pypi-mobans
5+
"""
6+
7+
import os
8+
import sys
49
import codecs
510
import locale
6-
import os
711
import platform
8-
import sys
912
from shutil import rmtree
1013

11-
from setuptools import Command, find_packages, setup
14+
from setuptools import Command, setup, find_packages
1215

1316

1417
# Work around mbcs bug in distutils.
@@ -29,36 +32,50 @@
2932
VERSION = "0.0.2"
3033
3134
LICENSE = "MIT"
32-
DESCRIPTION = "Render echarts using selenium"
35+
DESCRIPTION = (
36+
"Render echarts using selenium"
37+
)
3338
URL = "https://github.com/pyecharts/snapshot-selenium"
3439
DOWNLOAD_URL = "%s/archive/0.0.2.tar.gz" % URL
3540
FILES = ["README.rst", "CHANGELOG.rst"]
36-
KEYWORDS = ["python", "pyecharts", "chart"]
41+
KEYWORDS = [
42+
"python",
43+
"pyecharts",
44+
"chart",
45+
]
3746

3847
CLASSIFIERS = [
3948
"Topic :: Software Development :: Libraries",
4049
"Programming Language :: Python",
4150
"Intended Audience :: Developers",
51+
4252
"Programming Language :: Python :: 3 :: Only",
53+
54+
4355
"Programming Language :: Python :: 3.5",
4456
"Programming Language :: Python :: 3.6",
4557
"Programming Language :: Python :: 3.7",
4658
"Programming Language :: Python :: 3.8",
59+
4760
]
4861

49-
INSTALL_REQUIRES = ["selenium"]
50-
SETUP_COMMANDS = {}
5162

63+
INSTALL_REQUIRES = [
64+
"selenium",
65+
]
66+
SETUP_COMMANDS = {}
5267

53-
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"])
54-
EXTRAS_REQUIRE = {}
68+
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests", "tests.*"])
69+
EXTRAS_REQUIRE = {
70+
}
5571
# You do not need to read beyond this line
5672
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
57-
GS_COMMAND = "gs snapshot-selenium v0.0.2 " + "Find 0.0.2 in changelog for more details"
58-
NO_GS_MESSAGE = (
59-
"Automatic github release is disabled. " + "Please install gease to enable it."
60-
)
61-
UPLOAD_FAILED_MSG = 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND
73+
GS_COMMAND = ("gs snapshot-selenium v0.0.2 " +
74+
"Find 0.0.2 in changelog for more details")
75+
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
76+
"Please install gease to enable it.")
77+
UPLOAD_FAILED_MSG = (
78+
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
6279
HERE = os.path.abspath(os.path.dirname(__file__))
6380

6481

@@ -96,12 +113,14 @@ def run(self):
96113
self.status(NO_GS_MESSAGE)
97114
if run_status:
98115
if os.system(PUBLISH_COMMAND) != 0:
99-
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)
116+
self.status(UPLOAD_FAILED_MSG)
100117

101118
sys.exit()
102119

103120

104-
SETUP_COMMANDS.update({"publish": PublishCommand})
121+
SETUP_COMMANDS.update({
122+
"publish": PublishCommand
123+
})
105124

106125

107126
def has_gease():
@@ -112,7 +131,6 @@ def has_gease():
112131
"""
113132
try:
114133
import gease # noqa
115-
116134
return True
117135
except ImportError:
118136
return False
@@ -180,5 +198,5 @@ def filter_out_test_code(file_handle):
180198
include_package_data=True,
181199
zip_safe=False,
182200
classifiers=CLASSIFIERS,
183-
cmdclass=SETUP_COMMANDS,
201+
cmdclass=SETUP_COMMANDS
184202
)

0 commit comments

Comments
 (0)