Skip to content

Commit

Permalink
Mobanise + version pump (#2)
Browse files Browse the repository at this point in the history
* 📚 update static information

* ✨ get make format command so that all repos are in line

* 🔥 remove testing documentation

* 🔨 code reformatting

* ✨ append more keywords

* 🥚 🎡 release 0.0.2

* ✨ update gitignore

* ✨ update global gitignore rule set

* Update: setup.py still could be `black`

* ✨ 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

* 🐛 update formatter

* 🔨 merge changelog.yml with snaoshot-selenium.yml

* 📚 update setup meta

* 🔥 just ignore JetBrains

* ✨ 3.7 included

* ✨ 3.8 included

* Update: black code
  • Loading branch information
chfw authored and chenjiandongx committed Apr 12, 2019
1 parent 31b3c08 commit 839a51e
Show file tree
Hide file tree
Showing 18 changed files with 243 additions and 338 deletions.
368 changes: 75 additions & 293 deletions .gitignore

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .moban.d/custom_gitignore.jj2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends 'gitignore.jj2' %}

{%block extra %}
.idea
{%endblock%}
3 changes: 3 additions & 0 deletions .moban.d/custom_setup.py.jj2
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{% extends "setup.py.jj2" %}

{%block compat_block%}
{%endblock%}
9 changes: 9 additions & 0 deletions .moban.d/custom_travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "travis.yml.jj2" %}

{%block custom_python_versions%}
python:
- 3.8-dev
- 3.7
- 3.6
- 3.5
{%endblock%}
3 changes: 3 additions & 0 deletions .moban.d/tests/custom_requirements.txt.jj2
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{% extends "tests/requirements.txt.jj2" %}

{%block extras %}
moban
black;python_version>="3.6"
isort;python_version>="3.6"
{%endblock%}
16 changes: 10 additions & 6 deletions .moban.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
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:
- README.rst: CUSTOM_README.rst.jj2
- 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
- .gitignore: custom_gitignore.jj2
- .travis.yml: custom_travis.yml
- Pipfile: Pipfile.jj2
- output: CHANGELOG.rst
template: CHANGELOG.rst.jj2
- lint.sh: lint.script.jj2
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

sudo: false
dist: xenial
language: python
Expand All @@ -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 ;
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -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
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = 'pypi'
python_version= '3.6'

[packages]
selenium = "*"
selenium = "*"

[dev-packages]
nose = "*"
Expand Down
20 changes: 0 additions & 20 deletions README.md

This file was deleted.

33 changes: 33 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
17 changes: 10 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env python3

# Template by pypi-mobans
import codecs
import locale

# Template by pypi-mobans
import os
import platform
import sys
from shutil import rmtree

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
Expand All @@ -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"]
Expand All @@ -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."
)
Expand Down Expand Up @@ -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,
Expand Down
33 changes: 28 additions & 5 deletions snapshot-selenium.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion snapshot_selenium/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.0.1"
__version__ = "0.0.2"
__author__ = "pyecharts dev team"
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ mock
codecov
coverage
flake8
moban
black;python_version>="3.6"
isort;python_version>="3.6"

0 comments on commit 839a51e

Please sign in to comment.