From cb471612dc7bd4dd692c0dbb7976bc85988c8161 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 30 May 2020 22:40:45 +0100 Subject: [PATCH] :books: :hammer: refactor documentaiton --- .gitignore | 46 +++++++++++++++++++++++++++++---- .moban.d/CUSTOM_README.rst.jj2 | 6 +++++ .moban.d/gitfs2_example.rst.jj2 | 14 ++++++++++ .travis.yml | 18 +++---------- README.rst | 22 +++++++++++++++- setup.py | 17 ++++++------ 6 files changed, 94 insertions(+), 29 deletions(-) create mode 100644 .moban.d/gitfs2_example.rst.jj2 diff --git a/.gitignore b/.gitignore index 88bc3f6..a9ca840 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ parts/ sdist/ var/ wheels/ -pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg @@ -52,8 +51,10 @@ htmlcov/ nosetests.xml coverage.xml *.cover +*.py,cover .hypothesis/ .pytest_cache/ +cover/ # Translations *.mo @@ -63,6 +64,7 @@ coverage.xml *.log local_settings.py db.sqlite3 +db.sqlite3-journal # Flask stuff: instance/ @@ -75,6 +77,7 @@ instance/ docs/_build/ # PyBuilder +.pybuilder/ target/ # Jupyter Notebook @@ -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 don’t 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 @@ -127,6 +136,12 @@ dmypy.json # Pyre type checker .pyre/ +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + # VirtualEnv rules # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ @@ -159,6 +174,7 @@ pip-selfcheck.json # Windows rules # Windows thumbnail cache files Thumbs.db +Thumbs.db:encryptable ehthumbs.db ehthumbs_vista.db @@ -264,6 +280,7 @@ flycheck_*.el # Vim rules # Swap [._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files [._]*.sw[a-p] [._]s[a-rt-v][a-z] [._]ss[a-gi-z] @@ -271,6 +288,7 @@ flycheck_*.el # Session Session.vim +Sessionx.vim # Temporary .netrwhist @@ -281,7 +299,7 @@ tags [._]*.un~ # JetBrains rules -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff @@ -311,9 +329,14 @@ tags # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules +# *.iml +# *.ipr # CMake cmake-build-*/ @@ -363,6 +386,7 @@ fabric.properties # SFTP configuration file sftp-config.json +sftp-config-alt*.json # Package control specific files Package Control.last-run @@ -400,6 +424,10 @@ tmtags !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ # Xcode rules # Xcode @@ -426,6 +454,9 @@ DerivedData/ *.perspectivev3 !default.perspectivev3 +## Gcc Patch +/*.gcno + # Eclipse rules .metadata bin/ @@ -477,12 +508,17 @@ local.properties # Annotation Processing .apt_generated/ +.apt_generated_test/ # Scala IDE specific (Scala & Java development for Eclipse) .cache-main .scala_dependencies .worksheet +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + # TortoiseGit rules # Project-level settings /.tgitconfig diff --git a/.moban.d/CUSTOM_README.rst.jj2 b/.moban.d/CUSTOM_README.rst.jj2 index 8ed80b2..9e994cf 100644 --- a/.moban.d/CUSTOM_README.rst.jj2 +++ b/.moban.d/CUSTOM_README.rst.jj2 @@ -52,6 +52,12 @@ does not help commit and push the changes for you. Plus, the intention is never to write to a repository. +Primary use case +-------------------------------------------------------------------------------- + +{% include "gitfs2_example.rst.jj2" %} + + License -------------------------------------------------------------------------------- diff --git a/.moban.d/gitfs2_example.rst.jj2 b/.moban.d/gitfs2_example.rst.jj2 new file mode 100644 index 0000000..7bf5cbf --- /dev/null +++ b/.moban.d/gitfs2_example.rst.jj2 @@ -0,0 +1,14 @@ +You can do the following with moban: + +.. code-block:: bash + + $ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \ + -c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \ + -o _version.py + Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans + Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py + Templated 1 file. + $ cat _version.py + __version__ = "0.1.1rc3" + __author__ = "C.W." + diff --git a/.travis.yml b/.travis.yml index d5d500e..50c9853 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ notifications: python: - &pypy2 pypy2.7-6.0 - &pypy3 pypy3.5-6.0 - - 3.8-dev + - 3.8 - 3.7 - 3.6 - 3.5 @@ -16,25 +16,13 @@ stages: - lint - test -.disable_global: &disable_global - addons: false - cache: false - env: {} - python: false - before_install: false - install: false - before_script: false - script: false - after_success: false - after_failure: false - before_deploy: false - deploy: false .lint: &lint - <<: *disable_global git: submodules: false python: 3.6 + env: + - MINREQ=0 stage: lint script: make install_test lint format git-diff-check diff --git a/README.rst b/README.rst index f369dbb..91b242f 100644 --- a/README.rst +++ b/README.rst @@ -7,13 +7,14 @@ gitfs2 .. image:: https://codecov.io/github/moremoban/gitfs2/coverage.png :target: https://codecov.io/github/moremoban/gitfs2 - .. image:: https://badge.fury.io/py/gitfs2.svg :target: https://pypi.org/project/gitfs2 .. image:: https://pepy.tech/badge/gitfs2/month :target: https://pepy.tech/project/gitfs2/month +.. image:: https://img.shields.io/github/stars/moremoban/gitfs2.svg?style=social&maxAge=3600&label=Star + :target: https://github.com/moremoban/gitfs2/stargazers .. image:: https://dev.azure.com/moremoban/gitfs2/_apis/build/status/moremoban.gitfs2?branchName=master :target: https://dev.azure.com/moremoban/gitfs2/_build/latest?definitionId=2&branchName=master @@ -64,6 +65,25 @@ does not help commit and push the changes for you. Plus, the intention is never to write to a repository. +Primary use case +-------------------------------------------------------------------------------- + +You can do the following with moban: + +.. code-block:: bash + + $ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \ + -c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \ + -o _version.py + Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans + Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py + Templated 1 file. + $ cat _version.py + __version__ = "0.1.1rc3" + __author__ = "C.W." + + + License -------------------------------------------------------------------------------- diff --git a/setup.py b/setup.py index 59411c5..dbc04f4 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,17 @@ #!/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 PY2 = sys.version_info[0] == 2 PY26 = PY2 and sys.version_info[1] < 7 @@ -57,13 +60,12 @@ "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", ] + INSTALL_REQUIRES = [ "fs", "crayons", @@ -72,8 +74,7 @@ ] 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