From 839a51ee6bf0a818d599567b1192825e66d1e9d4 Mon Sep 17 00:00:00 2001 From: jaska Date: Fri, 12 Apr 2019 08:37:29 +0100 Subject: [PATCH] Mobanise + version pump (#2) * :books: update static information * :sparkles: get make format command so that all repos are in line * :fire: remove testing documentation * :hammer: code reformatting * :sparkles: append more keywords * :egg: :ferris_wheel: release 0.0.2 * :sparkles: update gitignore * :sparkles: update global gitignore rule set * Update: setup.py still could be `black` * :sparkles: ignore JetBrians. No need to do upstreaming, moban has global git ignore settings and gitignore repo has gitignore per language and independently has gitignore per IDE so we can mix-n-match * :bug: update formatter * :hammer: merge changelog.yml with snaoshot-selenium.yml * :books: update setup meta * :fire: just ignore JetBrains * :sparkles: 3.7 included * :sparkles: 3.8 included * Update: black code --- .gitignore | 368 +++++---------------- .moban.d/custom_gitignore.jj2 | 5 + .moban.d/custom_setup.py.jj2 | 3 + .moban.d/custom_travis.yml | 9 + .moban.d/tests/custom_requirements.txt.jj2 | 3 + .moban.yml | 16 +- .travis.yml | 28 ++ CHANGELOG.rst | 18 + Makefile | 18 +- Pipfile | 2 +- README.md | 20 -- README.rst | 33 ++ lint.sh | 1 + setup.py | 17 +- snapshot-selenium.yml | 33 +- snapshot_selenium/_version.py | 2 +- test.sh | 2 +- tests/requirements.txt | 3 + 18 files changed, 243 insertions(+), 338 deletions(-) create mode 100644 .moban.d/custom_gitignore.jj2 create mode 100644 .moban.d/custom_travis.yml create mode 100644 CHANGELOG.rst delete mode 100644 README.md create mode 100644 README.rst create mode 100644 lint.sh diff --git a/.gitignore b/.gitignore index dd9d50b..f74ef9a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,8 @@ parts/ sdist/ var/ wheels/ +pip-wheel-metadata/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg @@ -43,6 +45,7 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache @@ -77,9 +80,20 @@ target/ # Jupyter Notebook .ipynb_checkpoints +# IPython +profile_default/ +ipython_config.py + # pyenv .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 don’t work, or not +# install all needed dependencies. +#Pipfile.lock + # celery beat schedule file celerybeat-schedule @@ -107,89 +121,11 @@ venv.bak/ # mypy .mypy_cache/ +.dmypy.json +dmypy.json -# VirtualEnv rules -# Virtualenv -# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ -.Python -[Bb]in -[Ii]nclude -[Ll]ib -[Ll]ib64 -[Ll]ocal -[Ss]cripts -pyvenv.cfg -.venv -pip-selfcheck.json - -# Linux rules -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -# Windows rules -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# macOS rules -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk +# Pyre type checker +.pyre/ # Emacs rules # -*- mode: gitignore; -*- @@ -238,216 +174,62 @@ flycheck_*.el # directory configuration .dir-locals.el -# Vim rules -# Swap -[._]*.s[a-v][a-z] -[._]*.sw[a-p] -[._]s[a-rt-v][a-z] -[._]ss[a-gi-z] -[._]sw[a-p] +# network security +/network-security.data -# Session -Session.vim -# Temporary -.netrwhist -*~ -# Auto-generated tag files -tags -# Persistent undo -[._]*.un~ - -# JetBrains rules -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# IDE -.idea/ - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# SublimeText rules -# Cache files for Sublime Text -*.tmlanguage.cache -*.tmPreferences.cache -*.stTheme.cache - -# Workspace files are user-specific -*.sublime-workspace - -# Project files should be checked into the repository, unless a significant -# proportion of contributors will probably not be using Sublime Text -# *.sublime-project - -# SFTP configuration file -sftp-config.json - -# Package control specific files -Package Control.last-run -Package Control.ca-list -Package Control.ca-bundle -Package Control.system-ca-bundle -Package Control.cache/ -Package Control.ca-certs/ -Package Control.merged-ca-bundle -Package Control.user-ca-bundle -oscrypto-ca-bundle.crt -bh_unicode_properties.cache - -# Sublime-github package stores a github token in this file -# https://packagecontrol.io/packages/sublime-github -GitHub.sublime-settings - -# KDevelop4 rules -*.kdev4 -.kdev4/ - -# Kate rules -# Swap Files # -.*.kate-swp -.swp.* - -# TextMate rules -*.tmproj -*.tmproject -tmtags - -# VisualStudioCode rules -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# Xcode rules -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings -xcuserdata/ - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ -DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - -# Eclipse rules - -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath -.recommenders - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# PyDev specific (Python IDE for Eclipse) -*.pydevproject - -# CDT-specific (C/C++ Development Tooling) -.cproject - -# CDT- autotools -.autotools - -# Java annotation processor (APT) -.factorypath - -# PDT-specific (PHP Development Tools) -.buildpath - -# sbteclipse plugin -.target - -# Tern plugin -.tern-project - -# TeXlipse plugin -.texlipse - -# STS (Spring Tool Suite) -.springBeans - -# Code Recommenders -.recommenders/ - -# Annotation Processing -.apt_generated/ - -# Scala IDE specific (Scala & Java development for Eclipse) -.cache-main -.scala_dependencies -.worksheet - -# TortoiseGit rules -# Project-level settings -/.tgitconfig - -# Tags rules -# Ignore tags created by etags, ctags, gtags (GNU global) and cscope -TAGS -.TAGS -!TAGS/ -tags -.tags -!tags/ -gtags.files -GTAGS -GRTAGS -GPATH -GSYMS -cscope.files -cscope.out -cscope.in.out -cscope.po.out +# macOS rules +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Windows rules +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +.idea diff --git a/.moban.d/custom_gitignore.jj2 b/.moban.d/custom_gitignore.jj2 new file mode 100644 index 0000000..0744e5a --- /dev/null +++ b/.moban.d/custom_gitignore.jj2 @@ -0,0 +1,5 @@ +{% extends 'gitignore.jj2' %} + +{%block extra %} +.idea +{%endblock%} \ No newline at end of file diff --git a/.moban.d/custom_setup.py.jj2 b/.moban.d/custom_setup.py.jj2 index 2f700ec..4c63324 100644 --- a/.moban.d/custom_setup.py.jj2 +++ b/.moban.d/custom_setup.py.jj2 @@ -1 +1,4 @@ {% extends "setup.py.jj2" %} + +{%block compat_block%} +{%endblock%} diff --git a/.moban.d/custom_travis.yml b/.moban.d/custom_travis.yml new file mode 100644 index 0000000..69867f8 --- /dev/null +++ b/.moban.d/custom_travis.yml @@ -0,0 +1,9 @@ +{% extends "travis.yml.jj2" %} + +{%block custom_python_versions%} +python: + - 3.8-dev + - 3.7 + - 3.6 + - 3.5 +{%endblock%} diff --git a/.moban.d/tests/custom_requirements.txt.jj2 b/.moban.d/tests/custom_requirements.txt.jj2 index a22fe7e..6b56e5a 100644 --- a/.moban.d/tests/custom_requirements.txt.jj2 +++ b/.moban.d/tests/custom_requirements.txt.jj2 @@ -1,4 +1,7 @@ {% extends "tests/requirements.txt.jj2" %} {%block extras %} +moban +black;python_version>="3.6" +isort;python_version>="3.6" {%endblock%} diff --git a/.moban.yml b/.moban.yml index 26efa05..c008d4e 100644 --- a/.moban.yml +++ b/.moban.yml @@ -1,8 +1,10 @@ requires: - - pypi-mobans-pkg==0.0.4 + - type: git + url: https://github.com/moremoban/pypi-mobans + submodule: true configuration: template_dir: - - "pypi-mobans-pkg:templates" + - "pypi-mobans:templates" - ".moban.d" configuration: snapshot-selenium.yml targets: @@ -10,9 +12,11 @@ targets: - setup.py: custom_setup.py.jj2 - requirements.txt: requirements.txt.jj2 - "tests/requirements.txt": "tests/custom_requirements.txt.jj2" - - "docs/source/conf.py": "docs/conf.py_t" - test.sh: test.script.jj2 - "snapshot_selenium/_version.py": "_version.py.jj2" - - .gitignore: gitignore.jj2 - - .travis.yml: travis.yml.jj2 - - Pipfile: Pipfile.jj2 \ No newline at end of file + - .gitignore: custom_gitignore.jj2 + - .travis.yml: custom_travis.yml + - Pipfile: Pipfile.jj2 + - output: CHANGELOG.rst + template: CHANGELOG.rst.jj2 + - lint.sh: lint.script.jj2 diff --git a/.travis.yml b/.travis.yml index fe3a6a7..434fd41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ + sudo: false dist: xenial language: python @@ -8,6 +9,33 @@ python: - 3.7 - 3.6 - 3.5 + +stages: + - test + - lint + +.disable_global: &disable_global + before_install: false + install: true + before_script: false + after_success: false + after_failure: false + +.lint: &lint + <<: *disable_global + python: 3.6 + stage: lint + install: pip install flake8 + script: flake8 + +jobs: + include: + - *lint + +stage: test + +script: make test + before_install: - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then mv min_requirements.txt requirements.txt ; diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..ade2b6a --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,18 @@ +Change log +================================================================================ + +0.0.2 - 01.04.2019 +-------------------------------------------------------------------------------- + +update +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. it will take an external browser driver and render images + +0.0.1 - 09.04.2019 +-------------------------------------------------------------------------------- + +first release +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. use selenium driver for rendering pyecharts output as image diff --git a/Makefile b/Makefile index 4fbbe8b..ed2c70d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,14 @@ -all: test - -test: - bash test.sh +all: test + +test: + bash test.sh + +format: + isort -rc . + black -l 79 snapshot_selenium + black -l 79 setup.py + black -l 79 tests + + +lint: + make lint diff --git a/Pipfile b/Pipfile index 38635bb..2f83c7f 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,7 @@ name = 'pypi' python_version= '3.6' [packages] -selenium = "*" + selenium = "*" [dev-packages] nose = "*" diff --git a/README.md b/README.md deleted file mode 100644 index 996aa42..0000000 --- a/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# snapshot-selenium - -![http://travis-ci.org/pyecharts/snapshot-selenium](https://api.travis-ci.org/pyecharts/snapshot-selenium.svg) ![https://codecov.io/github/pyecharts/snapshot-selenium](https://codecov.io/github/pyecharts/snapshot-selenium/coverage.png) - -## Installation - -You can install snapshot-selenium via pip: - -```bash -$ pip install snapshot-selenium -``` - -or clone it and install it: - -```bash -$ git clone https://github.com/pyecharts/snapshot-selenium.git -$ cd snapshot-selenium -$ pip install -r requirements.txt -$ python setup.py install -``` diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c3035c8 --- /dev/null +++ b/README.rst @@ -0,0 +1,33 @@ +================================================================================ +snapshot-selenium +================================================================================ + +.. image:: https://api.travis-ci.org/pyecharts/snapshot-selenium.svg + :target: http://travis-ci.org/pyecharts/snapshot-selenium + +.. image:: https://codecov.io/github/pyecharts/snapshot-selenium/coverage.png + :target: https://codecov.io/github/pyecharts/snapshot-selenium + + +.. image:: https://readthedocs.org/projects/snapshot-selenium/badge/?version=latest + :target: http://snapshot-selenium.readthedocs.org/en/latest/ + + +Installation +================================================================================ + + +You can install snapshot-selenium via pip: + +.. code-block:: bash + + $ pip install snapshot-selenium + + +or clone it and install it: + +.. code-block:: bash + + $ git clone https://github.com/pyecharts/snapshot-selenium.git + $ cd snapshot-selenium + $ python setup.py install diff --git a/lint.sh b/lint.sh new file mode 100644 index 0000000..12183c3 --- /dev/null +++ b/lint.sh @@ -0,0 +1 @@ +flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long \ No newline at end of file diff --git a/setup.py b/setup.py index 5438c4e..12abdb0 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 +# Template by pypi-mobans import codecs import locale - -# Template by pypi-mobans import os import platform import sys @@ -11,6 +10,7 @@ from setuptools import Command, find_packages, setup + # Work around mbcs bug in distutils. # http://bugs.python.org/issue10945 # This work around is only if a project supports Python < 3.4 @@ -26,22 +26,24 @@ NAME = "snapshot-selenium" AUTHOR = "pyecharts dev team" -VERSION = "0.0.1" +VERSION = "0.0.2" EMAIL = "info@pyecharts.com" LICENSE = "MIT" DESCRIPTION = "Render echarts using selenium" URL = "https://github.com/pyecharts/snapshot-selenium" -DOWNLOAD_URL = "%s/archive/0.0.1.tar.gz" % URL -FILES = ["README.md"] - +DOWNLOAD_URL = "%s/archive/0.0.2.tar.gz" % URL +FILES = ["README.rst", "CHANGELOG.rst"] +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 = ["selenium"] @@ -52,7 +54,7 @@ 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-selenium v0.0.1 " + "Find 0.0.1 in changelog for more details" +GS_COMMAND = "gs snapshot-selenium 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." ) @@ -170,6 +172,7 @@ def filter_out_test_code(file_handle): download_url=DOWNLOAD_URL, long_description=read_files(*FILES), license=LICENSE, + keywords=KEYWORDS, extras_require=EXTRAS_REQUIRE, tests_require=["nose"], install_requires=INSTALL_REQUIRES, diff --git a/snapshot-selenium.yml b/snapshot-selenium.yml index 3a21058..6bd5098 100644 --- a/snapshot-selenium.yml +++ b/snapshot-selenium.yml @@ -1,12 +1,35 @@ name: "snapshot-selenium" organisation: "pyecharts" -author: "C.W." +author: "pyecharts dev team" contact: "info@pyecharts.com" company: "pyecharts dev team" -version: "0.0.1" -current_version: "0.0.1" -release: "0.0.1" +version: "0.0.2" +current_version: "0.0.2" +release: "0.0.2" copyright_year: 2019 license: MIT -dependencies: [] +nodocs: true +min_python_version: "3.5" +gitignore_global_rulesets: + - Emacs + - macOS + - Windows +keywords: + - pyecharts + - chart +dependencies: + - selenium description: "Render echarts using selenium" +releases: +- changes: + - action: update + details: + - it will take an external browser driver and render images + version: 0.0.2 + date: 01.04.2019 +- changes: + - action: first release + details: + - use selenium driver for rendering pyecharts output as image + version: 0.0.1 + date: 09.04.2019 diff --git a/snapshot_selenium/_version.py b/snapshot_selenium/_version.py index 2140ee5..1095366 100644 --- a/snapshot_selenium/_version.py +++ b/snapshot_selenium/_version.py @@ -1,2 +1,2 @@ -__version__ = "0.0.1" +__version__ = "0.0.2" __author__ = "pyecharts dev team" diff --git a/test.sh b/test.sh index 9577d4e..e7f35d6 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,2 @@ pip freeze -nosetests --with-coverage --cover-package snapshot_selenium --cover-package tests tests snapshot_selenium && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long +nosetests --with-coverage --cover-package snapshot_selenium --cover-package tests tests snapshot_selenium diff --git a/tests/requirements.txt b/tests/requirements.txt index c445df5..51b8251 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,3 +3,6 @@ mock codecov coverage flake8 +moban +black;python_version>="3.6" +isort;python_version>="3.6"