Skip to content

Commit

Permalink
🤝 synchronize with latest pypi-mobans updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Jun 21, 2020
1 parent f4afcf1 commit 9b2d575
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 68 deletions.
24 changes: 20 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
Expand All @@ -52,8 +51,10 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
Expand All @@ -63,6 +64,7 @@ coverage.xml
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
Expand All @@ -75,6 +77,7 @@ instance/
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
Expand All @@ -85,17 +88,23 @@ profile_default/
ipython_config.py

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

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

# celery beat schedule file
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
Expand Down Expand Up @@ -127,6 +136,12 @@ dmypy.json
# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Emacs rules
# -*- mode: gitignore; -*-
*~
Expand Down Expand Up @@ -210,6 +225,7 @@ Temporary Items
# Windows rules
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

Expand Down
3 changes: 3 additions & 0 deletions .moban.d/CUSTOM_README.rst.jj2
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{% extends 'README.rst.jj2' %}

{% block documentation_link %}
{% endblock %}
16 changes: 6 additions & 10 deletions .moban.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
requires:
- type: git
url: https://github.com/moremoban/pypi-mobans
submodule: true
- type: git
url: https://github.com/pyecharts/pyecharts-mobans
configuration:
configuration_dir: "pyecharts-mobans:config"
configuration_dir: "git://github.com/pyecharts/pyecharts-mobans!/config"
template_dir:
- "pyecharts-mobans:templates"
- "pypi-mobans:templates"
- "git://github.com/moremoban/pypi-mobans?branch=dev&submodule=True!/templates"
- "git://github.com/pyecharts/pyecharts-mobans!/templates"
- ".moban.d"
configuration: snapshot-phantomjs.yml
targets:
- README.rst: CUSTOM_README.rst.jj2
- setup.py: pyecharts_setup.py.jj2
- "tests/requirements.txt": "tests/pyecharts_requirements.txt.jj2"
- test.sh: test.script.jj2
- "snapshot_phantomjs/_version.py": "_version.py.jj2"
- .gitignore: pyecharts_gitignore.jj2
Expand All @@ -23,3 +16,6 @@ targets:
- output: CHANGELOG.rst
template: CHANGELOG.rst.jj2
- lint.sh: lint.script.jj2
- Makefile: Makefile.jj2
- tests/requirements.txt: tests/requirements.txt.jj2
- format.sh: format.sh.jj2
32 changes: 19 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

sudo: false
dist: xenial
language: python
Expand All @@ -8,39 +7,46 @@ python:
- 3.8-dev
- 3.7
- 3.6
- 3.5

stages:
- test
- lint
- moban
- test

.disable_global: &disable_global
before_install: false
install: true
before_script: false
after_success: false
after_failure: false

.lint: &lint
<<: *disable_global
git:
submodules: false
python: 3.6
env:
- MINREQ=0
stage: lint
install: pip install flake8
script: flake8

.moban: &moban
python: 3.6
env:
- MINREQ=0
stage: moban
install: pip install moban>=0.0.4 gitfs2 pypifs
script:
- moban
- git diff --exit-code

jobs:
include:
- *moban
- *lint

stage: test

script: make test

before_install:
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
mv min_requirements.txt requirements.txt ;
fi
- test ! -f rnd_requirements.txt || pip install --no-deps -r rnd_requirements.txt
- test ! -f rnd_requirements.txt ||
pip install --no-deps -r rnd_requirements.txt
- test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ;
- pip install -r tests/requirements.txt
script:
Expand Down
6 changes: 2 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ Change log
0.0.2 - 12.04.2019
--------------------------------------------------------------------------------

update
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**update**

#. official release

0.0.1 - 09.04.2019
--------------------------------------------------------------------------------

first release
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**first release**

#. use selenium driver for rendering pyecharts output as image
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
all: test

test:
test: lint
bash test.sh

format:
isort -rc .
black -l 79 .
install_test:
pip install -r tests/requirements.txt

git-diff-check:
git diff --exit-code

lint:
make lint
bash lint.sh

format:
bash format.sh

git-diff-check:
git diff --exit-code
9 changes: 7 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ snapshot-phantomjs

.. image:: https://codecov.io/github/pyecharts/snapshot-phantomjs/coverage.png
:target: https://codecov.io/github/pyecharts/snapshot-phantomjs
.. image:: https://badge.fury.io/py/snapshot-phantomjs.svg
:target: https://pypi.org/project/snapshot-phantomjs

.. image:: https://pepy.tech/badge/snapshot-phantomjs/month
:target: https://pepy.tech/project/snapshot-phantomjs/month

.. image:: https://img.shields.io/github/stars/pyecharts/snapshot-phantomjs.svg?style=social&maxAge=3600&label=Star
:target: https://github.com/pyecharts/snapshot-phantomjs/stargazers

.. image:: https://readthedocs.org/projects/snapshot-phantomjs/badge/?version=latest
:target: http://snapshot-phantomjs.readthedocs.org/en/latest/


Installation
Expand Down
3 changes: 3 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
isort -y $(find snapshot_phantomjs -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
black -l 79 snapshot_phantomjs
black -l 79 tests
4 changes: 3 additions & 1 deletion lint.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
pip install flake8
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
python setup.py checkdocs
61 changes: 35 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/usr/bin/env python3

# Template by pypi-mobans
"""
Template by pypi-mobans
"""

import os
import sys
import codecs
import locale
import os
import platform
import sys
from shutil import rmtree

from setuptools import Command, find_packages, setup
from setuptools import Command, setup, find_packages


# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
Expand All @@ -28,44 +32,48 @@
VERSION = "0.0.2"
EMAIL = "[email protected]"
LICENSE = "MIT"
DESCRIPTION = "Render pyecharts as image via phantomjs"
DESCRIPTION = (
"Render pyecharts as image via phantomjs"
)
URL = "https://github.com/pyecharts/snapshot-phantomjs"
DOWNLOAD_URL = "%s/archive/0.0.2.tar.gz" % URL
FILES = ["README.rst", "CHANGELOG.rst"]
KEYWORDS = ["python", "pyecharts", "chart"]
KEYWORDS = [
"python",
"pyecharts",
"chart",
]

CLASSIFIERS = [
"Topic :: Software Development :: Libraries",
"Programming Language :: Python",
"Intended Audience :: Developers",

"Programming Language :: Python :: 3 :: Only",


"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",

]

INSTALL_REQUIRES = []
SETUP_COMMANDS = {}

INSTALL_REQUIRES = [
]
SETUP_COMMANDS = {}

PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"])
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests", "tests.*"])
EXTRAS_REQUIRE = {}
# You do not need to read beyond this line
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(
sys.executable
)
GS_COMMAND = (
"gs snapshot-phantomjs v0.0.2 "
+ "Find 0.0.2 in changelog for more details"
)
NO_GS_MESSAGE = (
"Automatic github release is disabled. "
+ "Please install gease to enable it."
)
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
GS_COMMAND = ("gs snapshot-phantomjs v0.0.2 " +
"Find 0.0.2 in changelog for more details")
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
"Please install gease to enable it.")
UPLOAD_FAILED_MSG = (
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND
)
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
HERE = os.path.abspath(os.path.dirname(__file__))


Expand Down Expand Up @@ -103,12 +111,14 @@ def run(self):
self.status(NO_GS_MESSAGE)
if run_status:
if os.system(PUBLISH_COMMAND) != 0:
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)
self.status(UPLOAD_FAILED_MSG)

sys.exit()


SETUP_COMMANDS.update({"publish": PublishCommand})
SETUP_COMMANDS.update({
"publish": PublishCommand
})


def has_gease():
Expand All @@ -119,7 +129,6 @@ def has_gease():
"""
try:
import gease # noqa

return True
except ImportError:
return False
Expand Down Expand Up @@ -187,5 +196,5 @@ def filter_out_test_code(file_handle):
include_package_data=True,
zip_safe=False,
classifiers=CLASSIFIERS,
cmdclass=SETUP_COMMANDS,
cmdclass=SETUP_COMMANDS
)
8 changes: 5 additions & 3 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
nose
mock
mock;python_version<"3"
codecov
coverage
flake8
black
isort
collective.checkdocs
pygments
moban
black;python_version>="3.6"
isort;python_version>="3.6"

0 comments on commit 9b2d575

Please sign in to comment.