diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..bf9b9abe --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,15 @@ +codecov: + notify: + require_ci_to_pass: no + +coverage: + precision: 2 + round: down + range: "70...100" + status: + project: + default: + target: auto + threshold: 1% + base: auto + patch: off diff --git a/.github/workflows/libvcs-ci.yml b/.github/workflows/libvcs-ci.yml index 6fe4b78c..3b7d5675 100644 --- a/.github/workflows/libvcs-ci.yml +++ b/.github/workflows/libvcs-ci.yml @@ -19,16 +19,56 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + + - name: Install poetry run: | - python -m pip install --upgrade poetry - poetry install - - name: Lint with flake8 + curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py + python get-poetry.py -y + echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH" + rm get-poetry.py + + - name: Get poetry cache paths from config run: | - poetry run flake8 + echo ::set-env name=poetry_cache_dir::$(poetry config --list | sed -n 's/.*cache-dir = //p' | sed -e 's/^"//' -e 's/"$//') + echo ::set-env name=poetry_virtualenvs_path::$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^"//' -e 's/"$//') + + - name: Configure poetry + shell: bash + run: poetry config virtualenvs.in-project true + + - name: Set up cache + uses: actions/cache@v2 + id: cache + with: + path: | + .venv + {{ env.poetry_cache_dir }} + {{ env.poetry_virtualenvs_path }} + key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Ensure cache is healthy + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + + - name: Upgrade pip + shell: bash + run: poetry run python -m pip install pip -U + + - name: Install dependencies + run: poetry install -E "docs test coverage lint format deploy" + + - name: Lint with flake8 + run: poetry run flake8 + - name: Test with pytest - run: | - poetry run py.test --cov=./ --cov-report=xml + run: poetry run py.test --cov=./ --cov-report=xml + - uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml new file mode 100644 index 00000000..1d9eff42 --- /dev/null +++ b/.github/workflows/publish-docs.yml @@ -0,0 +1,98 @@ +name: Publish Docs + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.x' ] + steps: + - uses: actions/checkout@v1 + - name: Configure git + run: | + git config --global user.name 'travis-ci' + git config --global user.email 'travis@nowhere.edu' + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + + - name: Install poetry + run: | + curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py + python get-poetry.py -y + echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH" + rm get-poetry.py + + - name: Get poetry cache paths from config + run: | + echo ::set-env name=poetry_cache_dir::$(poetry config --list | sed -n 's/.*cache-dir = //p' | sed -e 's/^"//' -e 's/"$//') + echo ::set-env name=poetry_virtualenvs_path::$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^"//' -e 's/"$//') + + - name: Configure poetry + shell: bash + run: poetry config virtualenvs.in-project true + + - name: Set up cache + uses: actions/cache@v2 + id: cache + with: + path: | + .venv + {{ env.poetry_cache_dir }} + {{ env.poetry_virtualenvs_path }} + key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Ensure cache is healthy + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + + - name: Upgrade pip + shell: bash + run: poetry run python -m pip install pip -U + + - name: Install dependencies [w/ docs] + run: poetry install --extras "docs lint" + + - name: Build documentation + run: | + pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd + pushd docs; cp manifest.json _build/html; popd + + - name: Push documentation to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: 'us-west-1' # optional: defaults to us-east-1 + SOURCE_DIR: 'docs/_build/html' # optional: defaults to entire repository + + - name: Generate list of changed files for CloudFront to invalidate + run: | + pushd docs/_build/html; FILES=$(find . -name \* -print | grep html | cut -c2- | sort | uniq | tr '\n' ' '); popd + for file in $FILES; do + echo $file + # add bare directory to list of updated paths when we see index.html + [[ "$file" == *"/index.html" ]] && echo $file | sed -e 's/\/index.html$/\//' + done | sort | uniq | tr '\n' ' ' > .updated_files + + - name: Invalidate on CloudFront + uses: chetan/invalidate-cloudfront-action@master + env: + DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }} + AWS_REGION: 'us-east-1' + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + PATHS_FROM: .updated_files diff --git a/.gitignore b/.gitignore index c68d894d..991b92c1 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,12 @@ doc/_build/ *.lprof pip-wheel-metadata/ + +# Used by publish-docs.yml CI +.updated_files + +# mkdocs +site/ + +# vim +.vim/ diff --git a/.tmuxp.yaml b/.tmuxp.yaml index b81ab27f..78ae837f 100644 --- a/.tmuxp.yaml +++ b/.tmuxp.yaml @@ -21,5 +21,5 @@ windows: panes: - focus: true - pane - - make serve - - make SPHINXBUILD='poetry run sphinx-build' watch + - make -C .. serve_docs + - make -C .. watch_docs diff --git a/CHANGES b/CHANGES index f49d6e53..ef7e398d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,220 +1,225 @@ -========= -Changelog -========= +# Changelog Here are the changes for libvcs. -libvcs 0.5-current ------------------- +## libvcs 0.5-current + Generally speaking, refactor / magic is in the process of being stripped out in the next few releases. The API is subject to change significantly in pre-1.0 builds. -libvcs 0.4.4 (2020-08-05) -------------------------- -- :issue:`268` :class:`libvcs.base.BaseRepo`: - - - no longer sets ``**kwargs`` to dictionary on the object - - remove ``__slot__`` and rename ``name`` attribute to ``repo_name`` - -libvcs 0.4.3 (2020-08-01) -------------------------- -- [bug] :func:`libvcs.git.extract_status()` Fix issue capturing branch names - with special characters - -libvcs 0.4.2 (2020-08-01) -------------------------- -- [bug] :meth:`libvcs.git.GitRepo.get_current_remote_name()` Handle case where - upstream is unpushed -- [feature] :meth:`libvcs.git.GitRepo.status()` - Retrieve status of repo -- [feature] :func:`libvcs.git.extract_status()` - Return structured info from - ``git status`` - -libvcs 0.4.1 (2020-08-01) -------------------------- +- [refactor] [#267](https://github.com/vcs-python/libvcs/pull/267) overhaul docs + + - Move sphinx api format to Numpy-style + + - Move from reStructuredText to Markdown (via recommonmark). The master plan is to eliminate + docutils and sphinx as a bottleneck completely in favor of something else (e.g. gatsby with + a source that inspects our modules and can source intersphinx) + + - Move from RTD to GitHub Action, full support of poetry extras packages, deploys straight to + S3 and CloudFront + +## libvcs 0.4.4 (2020-08-05) + +- `268` `libvcs.base.BaseRepo`: + - no longer sets `**kwargs` to dictionary on the object + - remove `__slot__` and rename `name` attribute to `repo_name` + +## libvcs 0.4.3 (2020-08-01) + +- \[bug\] `libvcs.git.extract_status()` Fix issue capturing branch + names with special characters + +## libvcs 0.4.2 (2020-08-01) + +- \[bug\] `libvcs.git.GitRepo.get_current_remote_name()` Handle case + where upstream is unpushed +- \[feature\] `libvcs.git.GitRepo.status()` - Retrieve status of repo +- \[feature\] `libvcs.git.extract_status()` - Return structured info + from `git status` + +## libvcs 0.4.1 (2020-08-01) + - Remove log statement -libvcs 0.4 (2020-08-01) ------------------------ +## libvcs 0.4 (2020-08-01) **Breaking changes** -Internal functionality relating to remotes have been reorganized to avoid -implicit behavior. +Internal functionality relating to remotes have been reorganized to +avoid implicit behavior. -- :class:`~libvcs.git.GitRepo` methods have been renamed, they will be deprecated - in 0.5: +- `~libvcs.git.GitRepo` methods have been renamed, they will be + deprecated in 0.5: - - ``GitRepo.remotes_get`` renamed to :meth:`libvcs.git.GitRepo.remotes()` - - ``GitRepo.remote_get`` renamed to :meth:`libvcs.git.GitRepo.remote()` - - ``GitRepo.remote_set`` renamed to :meth:`libvcs.git.GitRepo.set_remote()` + - `GitRepo.remotes_get` renamed to `libvcs.git.GitRepo.remotes()` + - `GitRepo.remote_get` renamed to `libvcs.git.GitRepo.remote()` + - `GitRepo.remote_set` renamed to + `libvcs.git.GitRepo.set_remote()` -- :class:`~libvcs.git.GitRepo` the ``remotes`` argument is deprecated and no longer - used. Use :meth:`libvcs.git.GitRepo.set_remote` after repo is instantiated. +- `~libvcs.git.GitRepo` the `remotes` argument is deprecated and no + longer used. Use `libvcs.git.GitRepo.set_remote` after repo is + instantiated. -- :meth:`libvcs.git.GitRepo.obtain` no longer set remotes based on a ``dict`` passed - to :class:`~libvcs.git.GitRepo`. This was deemed to specialized / implicit. +- `libvcs.git.GitRepo.obtain` no longer set remotes based on a `dict` + passed to `~libvcs.git.GitRepo`. This was deemed to specialized / + implicit. -- :meth:`libvcs.git.GitRepo.set_remote()` (formerly ``remote_set``) +- `libvcs.git.GitRepo.set_remote()` (formerly `remote_set`) - The new method accepts ``name`` and ``url`` (in that order). ``name`` no longer - has a default value (was ``origin``). + The new method accepts `name` and `url` (in that order). `name` no + longer has a default value (was `origin`). -- :meth:`libvcs.git.GitRepo.remote()` (formerly ``remote_get``): +- `libvcs.git.GitRepo.remote()` (formerly `remote_get`): - - ``remote`` argument renamed to ``name``. It will be removed in 0.5.0 + - `remote` argument renamed to `name`. It will be removed in 0.5.0 - The default value of ``'origin'`` has been removed - - Now returns :meth:`~libvcs.git.GitRemote` (a :py:class:`collections.namedtuple` object) + The default value of `'origin'` has been removed - The tuple is similar to the old output, except there is an additional value at - the beginning, the name of the remote, e.g. ``('origin', '', '')`` + - Now returns `~libvcs.git.GitRemote` (a + :py`collections.namedtuple` object) -- :meth:`libvcs.git.GitRepo.remotes()` (formerly ``remotes_get``) are now methods - instead of properties. + The tuple is similar to the old output, except there is an + additional value at the beginning, the name of the remote, e.g. + `('origin', '', '')` - Passing ``flat=True`` to return a ``dict`` of ``tuple`` instead of ``dict`` -- New method: :meth:`libvcs.git.GitRepo.get_git_version()` -- New method: :meth:`libvcs.git.GitRepo.get_current_remote_name()` +- `libvcs.git.GitRepo.remotes()` (formerly `remotes_get`) are now + methods instead of properties. + Passing `flat=True` to return a `dict` of `tuple` instead of `dict` + +- New method: `libvcs.git.GitRepo.get_git_version()` + +- New method: `libvcs.git.GitRepo.get_current_remote_name()` + +## libvcs 0.3.3 (2020-07-29) -libvcs 0.3.3 (2020-07-29) -------------------------- - Remove f-string from test -- :meth:`libvcs.git.GitRepo.obtain` Overwrite remote if exists +- `libvcs.git.GitRepo.obtain` Overwrite remote if exists -libvcs 0.3.2 (2020-07-26) -------------------------- -- :issue:`258` :meth:`libvcs.git.GitRepo.remote_set` +## libvcs 0.3.2 (2020-07-26) - - Fix updating of remote URLs - - Add new param: ``overwrite``, usage: ``repo.remote_set(url, 'origin', overwrite=True)`` +- `258` `libvcs.git.GitRepo.remote_set` + - Fix updating of remote URLs + - Add new param: `overwrite`, usage: + `repo.remote_set(url, 'origin', overwrite=True)` + +## libvcs 0.3.1post1 (2020-07-26) -libvcs 0.3.1post1 (2020-07-26) ------------------------------- - Fix version in pyroject.toml - Update developer docs -libvcs 0.3.1 (2020-07-25) -------------------------- +## libvcs 0.3.1 (2020-07-25) + - Fix issue with subprocess.Popen loud warning on Python 3.8 -- :issue:`296` - Move from Pipfile to poetry +- `296` - Move from Pipfile to poetry - Sort imports - Add isort package, isort configuration in setup.cfg, and - ``make isort`` task to Makefile. -- Add ``project_urls`` to setup.py + `make isort` task to Makefile. +- Add `project_urls` to setup.py + +## libvcs 0.3.0 (2018-03-12) -libvcs 0.3.0 (2018-03-12) -------------------------- - Move vcspull to the vcs-python organization -- Fix issue where VCS objects failed to set attribute in Ubuntu - 18.04. +- Fix issue where VCS objects failed to set attribute in Ubuntu 18.04. + +## libvcs 0.2.3 (2016-12-22) -libvcs 0.2.3 (2016-12-22) -------------------------- - Update documentation to point to libvcs.git-pull.com - Switch doc theme to alabaster - Pin and update libraries via pyup - - update vulture 0.8.1 to 0.11 - - update flake8 from 2.5.4 to 3.2.1 - - update pytest-mock from 1.4.0 to 1.5.0 - - update pytest from 3.0.4 to 3.0.5 - - pin alabaster to 0.7.9 - - pin sphinx to 1.5.1 - -libvcs 0.2.2 (2016-11-23) -------------------------- -- Fix bug with unused ``support`` module in vcspull. See `#43`_ - -libvcs 0.2.1 (2016-09-13) -------------------------- + - update vulture 0.8.1 to 0.11 + - update flake8 from 2.5.4 to 3.2.1 + - update pytest-mock from 1.4.0 to 1.5.0 + - update pytest from 3.0.4 to 3.0.5 + - pin alabaster to 0.7.9 + - pin sphinx to 1.5.1 + +## libvcs 0.2.2 (2016-11-23) + +- Fix bug with unused `support` module in vcspull. See + [\#43](https://github.com/vcs-python/vcspull/issues/43) + +## libvcs 0.2.1 (2016-09-13) + - Update pytest to 3.0.2, remove unused pytest-raisesregexp - dependency. -- Fix bug in ``which`` when executable is not found. Allow - specifying search paths manually. -- Better support for missing VCS when testing on git and - subversion. - -libvcs 0.2.0 (2016-06-24) -------------------------- -- :issue:`9` Support for ``progress_callback`` to use realtime output - from commands in progress (such as ``git fetch``). -- :issue:`9` More tests, internal factoring and documentation, thanks - @jcfr -- :issue:`9` Official support for pypy, pypy3 -- :issue:`11` : Fix unbound local when updating git repos - -libvcs 0.1.7 (2016-06-21) -------------------------- -- :issue:`7` Add ``check_returncode`` property to run, thanks @jcfr -- :issue:`8` Remove all cases of ``run_buffered`` / buffering from - the library. - -libvcs 0.1.6 (2016-06-21) -------------------------- -- :issue:`5` Remove colorama dependency -- :issue:`6` Remove log module. Logging defaults. - - The library user can still use formatters and set log levels, - for an example, see the vcspull logging setup. - - An example:: - - import logging - - # your app - log.setLevel(level) - log.addHandler(logging.StreamHandler()) - - # vcslib logging options - vcslogger = logging.getLogger('libvcs') - vcslogger.propagate = False # don't pass libvcs settings up scope - vcslogger.addHandler(logging.StreamHandler()) - vcslogger.setLevel(level) - - You can also use ``logging.Formatter`` variables ``repo_name`` - and ``repo_vcs`` with repos:: - - repo_channel = logging.StreamHandler() - repo_formatter = logging.Formatter( - '[%(repo_name)s] (%(repo_vcs)s) %(levelname)1.1s: %(message)s' - ) - repo_channel.setFormatter(repo_formatter) - vcslogger = logging.getLogger('libvcs') - vcslogger.propagate = False # don't pass libvcs settings up scope - vcslogger.addHandler(repo_channel) - vcslogger.setLevel(level) - -libvcs 0.1.5 (2016-06-21) -------------------------- -- Fix issue where repo context wouldn't pass to repo logging - adapter - -libvcs 0.1.4 (2016-06-20) -------------------------- -- Fix print_stdout_on_progress_end signature in git update - -libvcs 0.1.3 (2016-06-20) -------------------------- -- ``create_repo`` function for regular vcs urls + dependency. +- Fix bug in `which` when executable is not found. Allow specifying + search paths manually. +- Better support for missing VCS when testing on git and subversion. + +## libvcs 0.2.0 (2016-06-24) + +- `9` Support for `progress_callback` to use realtime output from + commands in progress (such as `git fetch`). +- `9` More tests, internal factoring and documentation, thanks @jcfr +- `9` Official support for pypy, pypy3 +- `11` : Fix unbound local when updating git repos + +## libvcs 0.1.7 (2016-06-21) + +- `7` Add `check_returncode` property to run, thanks @jcfr +- `8` Remove all cases of `run_buffered` / buffering from the library. + +## libvcs 0.1.6 (2016-06-21) + +- `5` Remove colorama dependency + +- `6` Remove log module. Logging defaults. + + The library user can still use formatters and set log levels, for an + example, see the vcspull logging setup. + + An example: + + import logging + + # your app + log.setLevel(level) + log.addHandler(logging.StreamHandler()) + + # vcslib logging options + vcslogger = logging.getLogger('libvcs') + vcslogger.propagate = False # don't pass libvcs settings up scope + vcslogger.addHandler(logging.StreamHandler()) + vcslogger.setLevel(level) + + You can also use `logging.Formatter` variables `repo_name` and + `repo_vcs` with repos: + + repo_channel = logging.StreamHandler() + repo_formatter = logging.Formatter( + '[%(repo_name)s] (%(repo_vcs)s) %(levelname)1.1s: %(message)s' + ) + repo_channel.setFormatter(repo_formatter) + vcslogger = logging.getLogger('libvcs') + vcslogger.propagate = False # don't pass libvcs settings up scope + vcslogger.addHandler(repo_channel) + vcslogger.setLevel(level) + +## libvcs 0.1.5 (2016-06-21) + +- Fix issue where repo context wouldn't pass to repo logging adapter + +## libvcs 0.1.4 (2016-06-20) + +- Fix print\_stdout\_on\_progress\_end signature in git update + +## libvcs 0.1.3 (2016-06-20) + +- `create_repo` function for regular vcs urls - API docs updated -libvcs 0.1.2 (2016-06-20) -------------------------- -- change signature on ``create_repo_from_pip_url`` to accept - ``pip_url`` insetad of ``url``. -- ``Base`` to accept ``repo_dir`` instead of ``name`` and - ``parent_dir``. +## libvcs 0.1.2 (2016-06-20) -libvcs 0.1.1 (2016-06-20) -------------------------- -- remove unneeded pyyaml, kaptan and click dependencies +- change signature on `create_repo_from_pip_url` to accept `pip_url` + insetad of `url`. +- `Base` to accept `repo_dir` instead of `name` and `parent_dir`. -libvcs 0.1.0 (2016-06-20) -------------------------- -- libvcs split from `vcspull`_ +## libvcs 0.1.1 (2016-06-20) + +- remove unneeded pyyaml, kaptan and click dependencies -.. _vcspull: https://github.com/vcs-python/vcspull -.. _#43: https://github.com/vcs-python/vcspull/issues/43 +## libvcs 0.1.0 (2016-06-20) -.. vim: set filetype=rst: +- libvcs split from [vcspull](https://github.com/vcs-python/vcspull) diff --git a/MANIFEST.in b/MANIFEST.in index 6336b37e..98cccae4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -include README.rst LICENSE CHANGES .tmuxp.yaml +include README.md LICENSE CHANGES .tmuxp.yaml include requirements/*.txt recursive-include docs *.rst diff --git a/Makefile b/Makefile index 566982b4..1773111c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ PY_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]py$$' 2> /dev/null +DOC_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.]md\$\|.*[.]css\$\|.*[.]py\$\|mkdocs\.yml\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null entr_warn: @@ -22,10 +23,16 @@ watch_test: if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi build_docs: - cd docs && $(MAKE) html + poetry run mkdocs build watch_docs: - cd docs && $(MAKE) watch_docs + if command -v entr > /dev/null; then ${DOC_FILES} | entr -c $(MAKE) build_docs; else $(MAKE) build_docs entr_warn; fi + +serve_docs: + python -m http.server --directory site + +dev_docs: + $(MAKE) -j watch_docs serve_docs flake8: flake8 libvcs tests diff --git a/README.md b/README.md new file mode 100644 index 00000000..a7e5e05f --- /dev/null +++ b/README.md @@ -0,0 +1,126 @@ +`libvcs` - abstraction layer for vcs, powers +[vcspull](https://www.github.com/vcs-python/vcspull/). + +[![Python Package](https://img.shields.io/pypi/v/libvcs.svg)](http://badge.fury.io/py/libvcs) +[![Documentation Status](https://readthedocs.org/projects/libvcs/badge/?version=latest)](https://readthedocs.org/projects/libvcs/) +[![Build Status](https://img.shields.io/travis/vcs-python/libvcs.svg)](https://travis-ci.org/vcs-python/libvcs) +[![Code Coverage](https://codecov.io/gh/vcs-python/libvcs/branch/master/graph/badge.svg)](https://codecov.io/gh/vcs-python/libvcs) +![License](https://img.shields.io/github/license/vcs-python/libvcs.svg) + +Install: + + $ pip install libvcs + +Open up python: + + $ python + + # or for nice autocomplete and syntax highlighting + $ pip install ptpython + $ ptpython + +Create a +[Repo](https://libvcs.git-pull.com/en/latest/api.html#creating-a-repo-object) +object of the project to inspect / checkout / update: + + >>> from libvcs.shortcuts import create_repo_from_pip_url, create_repo + + # repo is an object representation of a vcs repository. + >>> r = create_repo(url='https://www.github.com/vcs-python/libtmux', + ... vcs='git', + ... repo_dir='/tmp/libtmux') + + # or via pip-style URL + >>> r = create_repo_from_pip_url( + ... pip_url='git+https://www.github.com/vcs-python/libtmux', + ... repo_dir='/tmp/libtmux') + +Update / clone repo: + + # it may or may not be checked out/cloned on the system yet + >>> r.update_repo() + +Get revision: + + >>> r.get_revision() + u'5c227e6ab4aab44bf097da2e088b0ff947370ab8' + +# Donations + +Your donations fund development of new features, testing and support. +Your money will go directly to maintenance and development of the +project. If you are an individual, feel free to give whatever feels +right for the value you get out of the project. + +See donation options at . + +# More information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Python supportPython 2.7, >= 3.4, pypy
VCS supportedgit(1), svn(1), hg(1)
Sourcehttps://github.com/vcs-python/libvcs
Docshttps://libvcs.git-pull.com
Changeloghttps://libvcs.git-pull.com/en/latest/history.html
APIhttps://libvcs.git-pull.com/en/latest/api.html
Issueshttps://github.com/vcs-python/libvcs/issues
Travishttps://travis-ci.org/vcs-python/libvcs
Test Coveragehttps://codecov.io/gh/vcs-python/libvcs
pypihttps://pypi.python.org/pypi/libvcs
Open Hubhttps://www.openhub.net/p/libvcs
LicenseMIT.

git repo

$ git clone https://github.com/vcs-python/libvcs.git

install dev

$ git clone https://github.com/vcs-python/libvcs.git libvcs
+$ cd ./libvcs
+$ virtualenv .venv
+$ source .venv/bin/activate
+$ pip install -e .

tests

$ py.test
diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 00000000..8f578b18 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,47 @@ +.mkapi-node { + font-size: 0.85em; +} + +.mkapi-node a.mkapi-src-link, a.mkapi-docs-link { + font-size: 0.8em; +} + +.mkapi-node .mkapi-object.code h3.mkapi-object-body { + font-size: 1.2em; +} + +.mkapi-node .mkapi-section-name .mkapi-section-name-body { + font-size: 1em; +} + +.mkapi-node .mkapi-base { + font-size: .9em; +} + +.mkapi-node code.mkapi-item-name, +.mkapi-node code.mkapi-object-signature, +.mkapi-node code.mkapi-object-parenthesis, +.mkapi-node span.mkapi-item-dash, +.mkapi-node span.mkapi-item-type { + font-size: 0.9em; +} + +.mkapi-node .mkapi-item-name, +.mkapi-node .mkapi-object, +.mkapi-node .mkapi-object code, +.mkapi-node .mkapi-object.code h2.mkapi-object-body, +.mkapi-node h2 .mkapi-object { + font-size: 1em; +} + +.mkapi-node ul.mkapi-items li::before { + font-size: 80%; +} + +.mkapi-section-name { + padding: 0px 8px 2px 8px; +} + +.mkapi-object.plain .mkapi-object-kind { + font-weight: normal; +} diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 120000 index 00000000..c50b150e --- /dev/null +++ b/assets/images/favicon.ico @@ -0,0 +1 @@ +../../docs/_static/favicon.ico \ No newline at end of file diff --git a/assets/images/libvcs.svg b/assets/images/libvcs.svg new file mode 120000 index 00000000..9a858af6 --- /dev/null +++ b/assets/images/libvcs.svg @@ -0,0 +1 @@ +../../docs/_static/img/libvcs.svg \ No newline at end of file diff --git a/docs/.prettierignore b/docs/.prettierignore new file mode 100644 index 00000000..40925f88 --- /dev/null +++ b/docs/.prettierignore @@ -0,0 +1 @@ +api.md diff --git a/docs/Makefile b/docs/Makefile index b6c24566..11211341 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,5 +1,6 @@ # Makefile for Sphinx documentation # +SHELL := /bin/bash PYVERSION=$(shell python -c "import sys;v=sys.version_info[0];sys.stdout.write(str(v))") HTTP_PORT = 8068 @@ -166,13 +167,16 @@ watch: serve: @echo '==============================================================' @echo - @echo 'docs server running at http://0.0.0.0:${HTTP_PORT}/_build/html' + @echo 'docs server running at http://0.0.0.0:${HTTP_PORT}/' @echo @echo '==============================================================' @if test ${PYVERSION} -eq 2; then $(MAKE) serve_py2; else make serve_py3; fi serve_py2: - python -m SimpleHTTPServer ${HTTP_PORT} + pushd _build/html; python2 -m SimpleHTTPServer ${HTTP_PORT}; popd serve_py3: - python -m http.server ${HTTP_PORT} + python -m http.server ${HTTP_PORT} --directory _build/html + +dev: + $(MAKE) -j watch serve diff --git a/docs/_static/img/icons/android-icon-144x144.png b/docs/_static/img/icons/android-icon-144x144.png new file mode 100644 index 00000000..742a7fb1 Binary files /dev/null and b/docs/_static/img/icons/android-icon-144x144.png differ diff --git a/docs/_static/img/icons/android-icon-192x192.png b/docs/_static/img/icons/android-icon-192x192.png new file mode 100644 index 00000000..96fe1a18 Binary files /dev/null and b/docs/_static/img/icons/android-icon-192x192.png differ diff --git a/docs/_static/img/icons/android-icon-72x72.png b/docs/_static/img/icons/android-icon-72x72.png new file mode 100644 index 00000000..f7248e8e Binary files /dev/null and b/docs/_static/img/icons/android-icon-72x72.png differ diff --git a/docs/_static/img/icons/android-icon-96x96.png b/docs/_static/img/icons/android-icon-96x96.png new file mode 100644 index 00000000..5821c189 Binary files /dev/null and b/docs/_static/img/icons/android-icon-96x96.png differ diff --git a/docs/_static/img/icons/browserconfig.xml b/docs/_static/img/icons/browserconfig.xml new file mode 100644 index 00000000..c5541482 --- /dev/null +++ b/docs/_static/img/icons/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/docs/_static/img/icons/icon-128x128.png b/docs/_static/img/icons/icon-128x128.png new file mode 100644 index 00000000..159eca80 Binary files /dev/null and b/docs/_static/img/icons/icon-128x128.png differ diff --git a/docs/_static/img/icons/icon-144x144.png b/docs/_static/img/icons/icon-144x144.png new file mode 100644 index 00000000..265b4687 Binary files /dev/null and b/docs/_static/img/icons/icon-144x144.png differ diff --git a/docs/_static/img/icons/icon-152x152.png b/docs/_static/img/icons/icon-152x152.png new file mode 100644 index 00000000..a6f8432d Binary files /dev/null and b/docs/_static/img/icons/icon-152x152.png differ diff --git a/docs/_static/img/icons/icon-16x16.png b/docs/_static/img/icons/icon-16x16.png new file mode 100644 index 00000000..4081c900 Binary files /dev/null and b/docs/_static/img/icons/icon-16x16.png differ diff --git a/docs/_static/img/icons/icon-192x192.png b/docs/_static/img/icons/icon-192x192.png new file mode 100644 index 00000000..c14d2b73 Binary files /dev/null and b/docs/_static/img/icons/icon-192x192.png differ diff --git a/docs/_static/img/icons/icon-32x32.png b/docs/_static/img/icons/icon-32x32.png new file mode 100644 index 00000000..5f017088 Binary files /dev/null and b/docs/_static/img/icons/icon-32x32.png differ diff --git a/docs/_static/img/icons/icon-384x384.png b/docs/_static/img/icons/icon-384x384.png new file mode 100644 index 00000000..5cbe4cf5 Binary files /dev/null and b/docs/_static/img/icons/icon-384x384.png differ diff --git a/docs/_static/img/icons/icon-512x512.png b/docs/_static/img/icons/icon-512x512.png new file mode 100644 index 00000000..9069f7f2 Binary files /dev/null and b/docs/_static/img/icons/icon-512x512.png differ diff --git a/docs/_static/img/icons/icon-72x72.png b/docs/_static/img/icons/icon-72x72.png new file mode 100644 index 00000000..b6f0bd65 Binary files /dev/null and b/docs/_static/img/icons/icon-72x72.png differ diff --git a/docs/_static/img/icons/icon-96x96.png b/docs/_static/img/icons/icon-96x96.png new file mode 100644 index 00000000..7585b96e Binary files /dev/null and b/docs/_static/img/icons/icon-96x96.png differ diff --git a/docs/_static/img/icons/ms-icon-144x144.png b/docs/_static/img/icons/ms-icon-144x144.png new file mode 100644 index 00000000..742a7fb1 Binary files /dev/null and b/docs/_static/img/icons/ms-icon-144x144.png differ diff --git a/docs/_static/img/icons/ms-icon-150x150.png b/docs/_static/img/icons/ms-icon-150x150.png new file mode 100644 index 00000000..7d83d2bf Binary files /dev/null and b/docs/_static/img/icons/ms-icon-150x150.png differ diff --git a/docs/_static/img/icons/ms-icon-310x310.png b/docs/_static/img/icons/ms-icon-310x310.png new file mode 100644 index 00000000..f740c300 Binary files /dev/null and b/docs/_static/img/icons/ms-icon-310x310.png differ diff --git a/docs/_static/img/icons/ms-icon-70x70.png b/docs/_static/img/icons/ms-icon-70x70.png new file mode 100644 index 00000000..a09239d8 Binary files /dev/null and b/docs/_static/img/icons/ms-icon-70x70.png differ diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 00000000..669538a2 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,45 @@ +{% extends "!layout.html" %} +{%- block extrahead %} + {{ super() }} + {%- if theme_show_meta_manifest_tag == true %} + + {% endif -%} + {%- if theme_show_meta_og_tags == true %} + + + + + + + + + + + + + + + + {% endif -%} + {%- if theme_show_meta_app_icon_tags == true %} + + + + + + + + + + + + + + + + + + + + {% endif -%} +{% endblock %} diff --git a/docs/api.rst b/docs/api.md similarity index 78% rename from docs/api.rst rename to docs/api.md index 51be33cc..d73eaee2 100644 --- a/docs/api.rst +++ b/docs/api.md @@ -1,21 +1,17 @@ -.. _api: +# API Reference -============= -API Reference -============= - -Creating a repo object ----------------------- +## Creating a repo object Helper methods are available in ``libvcs.shortcuts`` which can return a repo object from a single entry-point. +```eval_rst .. autofunction:: libvcs.shortcuts.create_repo .. autofunction:: libvcs.shortcuts.create_repo_from_pip_url +``` -Instantiating a repo by hand ----------------------------- +## Instantiating a repo by hand Tools like :func:`libvcs.shortcuts.create_repo` and :func:`libvcs.shortcuts.create_repo_from_pip_url` are just wrappers @@ -23,9 +19,9 @@ around instantiated these classes. See examples below of git, mercurial, and subversion. -Git ---- +### Git +```eval_rst .. autoclass:: libvcs.git.GitRepo :members: :show-inheritance: @@ -35,36 +31,41 @@ Git :show-inheritance: .. autofunction:: libvcs.git.extract_status +``` -Mercurial ---------- +### Mercurial aka ``hg(1)`` +```eval_rst .. autoclass:: libvcs.hg.MercurialRepo :members: :show-inheritance: +``` -Subversion ----------- +### Subversion aka ``svn(1)`` +```eval_rst .. autoclass:: libvcs.svn.SubversionRepo :members: :show-inheritance: +``` -Adding your own VCS -------------------- +### Adding your own VCS Extending libvcs can be done through subclassing ``BaseRepo``. +```eval_rst .. autoclass:: libvcs.base.BaseRepo :members: :show-inheritance: +``` -Utility stuff -------------- +### Utility stuff +```eval_rst .. automodule:: libvcs.util :members: +``` diff --git a/docs/conf.py b/docs/conf.py index fe2fade4..08c9c3a1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,7 @@ import os import alagitpull +from recommonmark.transform import AutoStructify # Get the project root dir, which is the parent dir of this cwd = os.getcwd() @@ -19,6 +20,7 @@ 'sphinx.ext.napoleon', 'alagitpull', 'sphinx_issues', + 'recommonmark', ] releases_unstable_prehistory = True @@ -30,10 +32,26 @@ templates_path = ['_templates'] -source_suffix = '.rst' +source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'} master_doc = 'index' +# app setup hook +def setup(app): + app.add_config_value( + 'recommonmark_config', + { + #'url_resolver': lambda url: github_doc_root + url, + 'enable_auto_toc_tree': True, + 'auto_toc_tree_section': 'Contents', + 'auto_code_block': True, + 'enable_eval_rst': True, + }, + True, + ) + app.add_transform(AutoStructify) + + project = about['__title__'] copyright = about['__copyright__'] @@ -55,6 +73,10 @@ 'github_banner': True, 'projects': alagitpull.projects, 'project_name': about['__title__'], + 'project_url': 'https://libvcs.git-pull.com', + 'show_meta_manifest_tag': True, + 'show_meta_og_tags': True, + 'show_meta_app_icon_tags': True, } html_sidebars = { '**': [ diff --git a/docs/developing.md b/docs/developing.md new file mode 100644 index 00000000..ee42b86e --- /dev/null +++ b/docs/developing.md @@ -0,0 +1,106 @@ +# Development + +## Testing + +Our tests are inside `tests/`. Tests are implemented using +[pytest](http://pytest.org/). + +## Install the latest code from git + +### Using pip + +To begin developing, check out the code from github: + + $ git clone git@github.com:vcs-python/libvcs.git + $ cd libvcs + +Now create a virtualenv, if you don't know how to, you can create a +virtualenv with: + + $ virtualenv .venv + +Then activate it to current tty / terminal session with: + + $ source .venv/bin/activate + +Good! Now let's run this: + + $ pip install -r requirements/test.txt -e . + +This has `pip`, a python package manager install the python package in +the current directory. `-e` means `--editable`, which means you can +adjust the code and the installed software will reflect the changes. + +### Using poetry + +To begin developing, check out the code from github: + + $ git clone git@github.com:vcs-python/libvcs.git + $ cd libvcs + +You can create a virtualenv, and install all of the locked packages as +listed in poetry.lock: + + $ poetry install + +If you ever need to update packages during your development session, the +following command can be used to update all packages as per poetry +settings or individual package (second command): + + $ poetry update + $ poetry update requests + +Then activate it to your current tty / terminal session with: + + $ poetry shell + +That is it! You are now ready to code! + +## Test Runner + +As you seen above, the `libvcs` command will now be available to you, +since you are in the virtual environment, your PATH environment was updated to include a +special version of `python` inside your `.venv` folder with its own +packages. + + $ make test + +You probably didn't see anything but tests scroll by. + +If you found a problem or are trying to write a test, you can file an +[issue on github](https://github.com/vcs-python/libvcs/issues). + +#### Test runner options + +Test only a file: + + $ py.test tests/test_util.py + +will test the `tests/test_util.py` tests. + + $ py.test tests/test_util.py::test_mkdir_p + +tests `test_mkdir_p` inside of `tests/test_util.py`. + +Multiple can be separated by spaces: + + $ py.test tests/test_{git,svn}.py tests/test_util.py::test_mkdir_p + +## Docs + +Build docs to _site/_: + + $ make build_docs + +Serve docs from http://localhost:8000: + + $ make serve_docs + +Rebuild docs when files are edited (requires [`entr(1)`](http://eradman.com/entrproject/)): + + $ make watch_docs + +Serve + watch w/ rebuild (requires `make(1)` w/ `-j` support, usually GNU Make): + + $ make dev_docs diff --git a/docs/developing.rst b/docs/developing.rst deleted file mode 100644 index f0f4b67b..00000000 --- a/docs/developing.rst +++ /dev/null @@ -1,129 +0,0 @@ -.. _developing: - -=========== -Development -=========== - -Testing -------- - -Our tests are inside ``tests/``. Tests are implemented using -`pytest`_. - -.. _pytest: http://pytest.org/ - -.. _install_dev_env: - -Install the latest code from git --------------------------------- - -Using pip -^^^^^^^^^ - -To begin developing, check out the code from github: - -.. code-block:: sh - - $ git clone git@github.com:vcs-python/libvcs.git - $ cd libvcs - -Now create a virtualenv, if you don't know how to, you can create a -virtualenv with: - -.. code-block:: sh - - $ virtualenv .venv - -Then activate it to current tty / terminal session with: - -.. code-block:: sh - - $ source .venv/bin/activate - -Good! Now let's run this: - -.. code-block:: sh - - $ pip install -r requirements/test.txt -e . - -This has ``pip``, a python package manager install the python package -in the current directory. ``-e`` means ``--editable``, which means you can -adjust the code and the installed software will reflect the changes. - -Using poetry -^^^^^^^^^^^^ - -To begin developing, check out the code from github: - -.. code-block:: bash - - $ git clone git@github.com:vcs-python/libvcs.git - $ cd libvcs - -You can create a virtualenv, and install all of the locked -packages as listed in poetry.lock: - -.. code-block:: bash - - $ poetry install - -If you ever need to update packages during your development session, the -following command can be used to update all packages as per poetry settings or -individual package (second command): - -.. code-block:: bash - - $ poetry update - $ poetry update requests - -Then activate it to your current tty / terminal session with: - -.. code-block:: bash - - $ poetry shell - -That is it! You are now ready to code! - -Test Runner ------------ - -As you seen above, the ``libvcs`` command will now be available to you, -since you are in the virtual environment, your `PATH` environment was -updated to include a special version of ``python`` inside your ``.venv`` -folder with its own packages. - -.. code-block:: bash - - $ make test - -You probably didn't see anything but tests scroll by. - -If you found a problem or are trying to write a test, you can file an -`issue on github`_. - -.. _test_specific_tests: - -Test runner options -~~~~~~~~~~~~~~~~~~~ - -Test only a file: - -.. code-block:: bash - - $ py.test tests/test_util.py - -will test the ``tests/test_util.py`` tests. - -.. code-block:: bash - - $ py.test tests/test_util.py::test_mkdir_p - -tests ``test_mkdir_p`` inside of ``tests/test_util.py``. - -Multiple can be separated by spaces: - -.. code-block:: bash - - $ py.test tests/test_{git,svn}.py tests/test_util.py::test_mkdir_p - -.. _issue on github: https://github.com/vcs-python/libvcs/issues diff --git a/docs/history.md b/docs/history.md new file mode 120000 index 00000000..3e8bc8c0 --- /dev/null +++ b/docs/history.md @@ -0,0 +1 @@ +../CHANGES \ No newline at end of file diff --git a/docs/history.rst b/docs/history.rst deleted file mode 100644 index 37c6fae3..00000000 --- a/docs/history.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _history: - -======= -History -======= - -.. include:: ../CHANGES - :start-line: 5 diff --git a/docs/manifest.json b/docs/manifest.json new file mode 100644 index 00000000..7f34c012 --- /dev/null +++ b/docs/manifest.json @@ -0,0 +1,53 @@ +{ + "name": "libvcs", + "short_name": "libvcs", + "description": "vcs abstraction layer", + "theme_color": "#2196f3", + "background_color": "#fff", + "display": "browser", + "Scope": "https://libvcs.git-pull.com/", + "start_url": "https://libvcs.git-pull.com/", + "icons": [ + { + "src": "_static/img/icons/icon-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-152x152.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "_static/img/icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "splash_pages": null +} diff --git a/libvcs/__init__.py b/libvcs/__init__.py index a184ff00..4c7effe9 100644 --- a/libvcs/__init__.py +++ b/libvcs/__init__.py @@ -1,10 +1,5 @@ # -*- coding: utf-8 -*- -"""Repo package for libvcs. - -libvcs -~~~~~~ - -""" +"""Repo package for libvcs.""" from __future__ import absolute_import, print_function, unicode_literals import logging diff --git a/libvcs/base.py b/libvcs/base.py index ed355e10..2bf0a11f 100644 --- a/libvcs/base.py +++ b/libvcs/base.py @@ -1,10 +1,5 @@ # -*- coding: utf-8 -*- -"""Base class for Repository objects. - -libvcs.base -~~~~~~~~~~~ - -""" +"""Base class for Repository objects.""" from __future__ import absolute_import, print_function, unicode_literals import logging @@ -22,7 +17,6 @@ class BaseRepo(RepoLoggingAdapter, object): """Base class for repositories. Extends :py:class:`logging.LoggerAdapter`. - """ #: log command output to buffer @@ -33,14 +27,16 @@ class BaseRepo(RepoLoggingAdapter, object): def __init__(self, url, repo_dir, progress_callback=None, *args, **kwargs): """ - :param callback: Retrieve live progress from ``sys.stderr`` (useful for - certain vcs commands like ``git pull``. Use ``progress_callback``:: - - def progress_cb(output, timestamp): - sys.stdout.write(output) - sys.stdout.flush() - create_repo(..., progress_callback=progress_cb) - :type callback: func + Parameters + ---------- + callback : func + Retrieve live progress from ``sys.stderr`` (useful for certain vcs commands + like ``git pull``. Use ``progress_callback``: + + >>> def progress_cb(output, timestamp): + >>> sys.stdout.write(output) + >>> sys.stdout.flush() + >>> create_repo(..., progress_callback=progress_cb) """ self.progress_callback = progress_callback self.url = url @@ -77,17 +73,21 @@ def run( """Return combined stderr/stdout from a command. This method will also prefix the VCS command bin_name. By default runs - using the cwd :attr:`~.path` of the repo. + using the cwd `libvcs.base.BaseRepo.path` of the repo. - :param cwd: dir command is run from, defaults :attr:`~.path`. - :type cwd: str + Parameters + ---------- + cwd : str + dir command is run from, defaults to `libvcs.base.BaseRepo.path`. - :param check_returncode: Indicate whether a :exc:`~exc.CommandError` - should be raised if return code is different from 0. - :type check_returncode: :class:`bool` + check_returncode : bool + Indicate whether a :exc:`~exc.CommandError` should be raised if return code + is different from 0. - :returns: combined stdout/stderr in a big string, newlines retained - :rtype: str + Returns + ------- + str + combined stdout/stderr in a big string, newlines retained """ if cwd is None: @@ -124,7 +124,7 @@ def check_destination(self, *args, **kwargs): @classmethod def get_url_and_revision_from_pip_url(cls, pip_url): - """Return repo URL and revision by parsing :attr:`~.url`.""" + """Return repo URL and revision by parsing `libvcs.base.BaseRepo.url`.""" error_message = ( "Sorry, '%s' is a malformed VCS url. " "The format is +://, " diff --git a/libvcs/exc.py b/libvcs/exc.py index d95baaff..f1947784 100644 --- a/libvcs/exc.py +++ b/libvcs/exc.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- """Exceptions for libvcs. -libvcs.exc -~~~~~~~~~~ +If you see this, we're publishing to S3 automatically """ from __future__ import absolute_import, print_function, unicode_literals diff --git a/libvcs/git.py b/libvcs/git.py index 54e3e44d..7469514e 100644 --- a/libvcs/git.py +++ b/libvcs/git.py @@ -1,22 +1,18 @@ # -*- coding: utf-8 -*- """Git Repo object for libvcs. -libvcs.git -~~~~~~~~~~ - From https://github.com/saltstack/salt (Apache License): -- :py:meth:`GitRepo.remote` -- :py:meth:`GitRepo.remote_get` (renamed to ``remote``) -- :py:meth:`GitRepo.remote_set` (renamed to ``set_remote``) +- [`GitRepo.remote`](libvcs.git.GitRepo.remote) (renamed to ``remote``) +- [`GitRepo.remote`](libvcs.git.GitRepo.remote_set) (renamed to ``set_remote``) From pip (MIT Licnese): -- :py:meth:`GitRepo.get_url_and_revision_from_pip_url` (get_url_rev) -- :py:meth:`GitRepo.get_revision` -- :py:meth:`GitRepo.get_git_version` - -""" +- [`GitRepo.remote`](libvcs.git.GitRepo.remote_set) (renamed to ``set_remote``) +- [`GitRepo.get_url_and_revision_from_pip_url`](libvcs.git.GitRepo.get_url_and_revision_from_pip_url`) (``get_url_rev``) +- [`GitRepo.get_revision`](libvcs.git.GitRepo.get_revision) +- [`GitRepo.get_git_version`](libvcs.git.GitRepo.get_git_version) +""" # NOQA: E501 from __future__ import absolute_import, print_function, unicode_literals import collections @@ -34,9 +30,7 @@ GitRemote = collections.namedtuple('GitRemote', ['name', 'fetch_url', 'push_url']) """Structure containing git repo information. -Supports :meth:`collections.namedtuple._asdict()` - -.. versionadded:: 0.4.0 +Supports `collections.namedtuple._asdict()` """ @@ -45,7 +39,7 @@ def extract_status(value): Returns ------- - dict : + dict Dictionary of git repo's status """ pattern = re.compile( @@ -102,24 +96,20 @@ class GitRepo(BaseRepo): def __init__(self, url, **kwargs): """A git repository. - :param url: URL of repo - :type url: str - - :param git_shallow: clone with ``--depth 1`` (default False) - :type git_shallow: bool - - :param git_submodules: Git submodules that shall be updated, all if empty - :type git_submodules: list + Parameters + ---------- + url : str + URL of repo - :param tls_verify: Should certificate for https be checked (default False) - :type tls_verify: bool + git_shallow : bool + clone with `--depth 1`, default `False` - .. versionchanged:: 0.4.0 + git_submodules : list + Git submodules that shall be updated, all if empty - The ``remotes`` argument is ignored. Use :meth:`~.set_remote` to set remotes - before running :meth:`~.obtain`. + tls_verify : bool + Should certificate for https be checked (default False) - The ``remotes`` argument is deprecated and will be removed in 0.5 """ if 'git_shallow' not in kwargs: self.git_shallow = False @@ -169,13 +159,7 @@ def get_url_and_revision_from_pip_url(cls, pip_url): return url, rev def obtain(self): - """Retrieve the repository, clone if doesn't exist. - - .. versionchanged:: 0.4.0 - - No longer sets remotes. This is now done manually through - :meth:`~.set_remote`. - """ + """Retrieve the repository, clone if doesn't exist.""" self.check_destination() url = self.url @@ -349,25 +333,14 @@ def update_repo(self): def remotes(self, flat=False): """Return remotes like git remote -v. - :param flat: Return a dict of ``tuple`` instead of ``dict``. Default False. - :type flat: bool - - .. versionchanged:: 0.4.0 - - Has been changed from property to method - - .. versionchanged:: 0.4.0 - - The ``flat`` argument has been added to return remotes in ``tuple`` form - - .. versionchanged:: 0.4.0 - - This used to return a dict of tuples, it now returns a dict of dictionaries - with ``name``, ``fetch_url``, and ``push_url``. + Parameters + ---------- + flat : bool + Return a dict of ``tuple`` instead of ``dict``, default `False`. Returns ------- - dict : + dict dict of git upstream / remote URLs """ remotes = {} @@ -383,12 +356,6 @@ def remotes(self, flat=False): @property def remotes_get(self): - """ - .. versionchanged:: 0.4.0 - - The ``remotes_get`` property is deprecated and will be removed in 0.5. It - has been renamed ``remotes()`` and changed from property to a method. - """ warnings.warn( "'remotes_get' is deprecated and will be removed in 0.5. " "Use 'remotes()' method instead.", @@ -408,13 +375,8 @@ def remote(self, name, **kwargs): Returns ------- - :class:`libvcs.git.GitRemote` : + [`GitRemote`](libvcs.git.GitRemote) Remote name and url in tuple form - - .. versionchanged:: 0.4.0 - - The ``remote`` argument was renamed to ``name`` and will be deprecated - in 0.5. """ if kwargs.get('remote') is not None: @@ -441,11 +403,11 @@ def remote(self, name, **kwargs): return None def remote_get(self, name='origin', **kwargs): - """ - .. versionchanged:: 0.4.0 + """Retrieve remote - The ``remote_get`` method is deprecated and will be removed in 0.5.0. It has - been renamed ``remote`` + !!! note + The ``remote_get`` method is deprecated and will be removed in 0.5.0. It has + been renamed ``remote`` """ warnings.warn( "'remote_get' is deprecated and will be removed in 0.5. " @@ -459,12 +421,13 @@ def remote_get(self, name='origin', **kwargs): def set_remote(self, name, url, overwrite=False): """Set remote with name and URL like git remote add. - :param name: defines the remote name. - :type name: str - :param url: defines the remote URL - :type url: str + Parameters + ---------- + name : str + defines the remote name. - .. versionadded:: 0.4.0 + url : str + defines the remote URL """ url = self.chomp_protocol(url) @@ -476,12 +439,6 @@ def set_remote(self, name, url, overwrite=False): return self.remote(name=name) def remote_set(self, url, name='origin', overwrite=False, **kwargs): - """ - .. versionchanged:: 0.4.0 - - The ``remote_set`` method is deprecated and will be removed in 0.5.0. It has - been renamed ``set_remote``. - """ warnings.warn( "'remote_set' is deprecated and will be removed in 0.5. " "Use 'set_remote' instead.", @@ -502,7 +459,7 @@ def chomp_protocol(url): Returns ------- - str : + str URL as VCS software would accept it """ if '+' in url: @@ -525,7 +482,7 @@ def get_git_version(self): Returns ------- - str : + str git version """ VERSION_PFX = 'git version ' @@ -541,25 +498,23 @@ def status(self): Wraps ``git status --sb --porcelain=2``. Does not include changed files, yet. - Examples - -------- - - :: - - print(git_repo.status()) - { - "branch_oid": 'de6185fde0806e5c7754ca05676325a1ea4d6348', - "branch_head": 'fix-current-remote-name', - "branch_upstream": 'origin/fix-current-remote-name', - "branch_ab": '+0 -0', - "branch_ahead": '0', - "branch_behind": '0', - } - Returns ------- - dict : + dict Status of current checked out repository + + Examples + -------- + + >>> git_repo.status() + { + "branch_oid": 'de6185fde0806e5c7754ca05676325a1ea4d6348', + "branch_head": 'fix-current-remote-name', + "branch_upstream": 'origin/fix-current-remote-name', + "branch_ab": '+0 -0', + "branch_ahead": '0', + "branch_behind": '0' + } """ return extract_status(self.run(['status', '-sb', '--porcelain=2'])) @@ -568,7 +523,7 @@ def get_current_remote_name(self): Returns ------- - str : + str If upstream the same, returns ``branch_name``. If upstream mismatches, returns ``remote_name/branch_name``. """ diff --git a/libvcs/hg.py b/libvcs/hg.py index 4f6ba3a8..06e8624c 100644 --- a/libvcs/hg.py +++ b/libvcs/hg.py @@ -1,16 +1,12 @@ # -*- coding: utf-8 -*- """Mercurial Repo object for libvcs. -libvcs.hg -~~~~~~~~~ - The following is from pypa/pip (MIT license): -- :py:meth:`MercurialRepo.get_url_and_revision_from_pip_url` -- :py:meth:`MercurialRepo.get_url` -- :py:meth:`MercurialRepo.get_revision` - -""" +- [`MercurialRepo.get_url_and_revision_from_pip_url`](libvcs.hg.get_url_and_revision_from_pip_url) +- [`MercurialRepo.get_url`](libvcs.hg.MercurialRepo.get_url) +- [`MercurialRepo.get_revision`](libvcs.hg.MercurialRepo.get_revision) +""" # NOQA E5 from __future__ import absolute_import, print_function, unicode_literals import logging diff --git a/libvcs/shortcuts.py b/libvcs/shortcuts.py index d374d604..c06ba97f 100644 --- a/libvcs/shortcuts.py +++ b/libvcs/shortcuts.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Shortcuts""" from __future__ import absolute_import, print_function, unicode_literals from libvcs import GitRepo, MercurialRepo, SubversionRepo @@ -8,30 +9,32 @@ def create_repo(url, vcs, **kwargs): r"""Return a object representation of a VCS repository. - :returns: instance of a repository object - :rtype: :class:`libvcs.svn.SubversionRepo`, :class:`libvcs.git.GitRepo` or - :class:`libvcs.hg.MercurialRepo`. + Returns + ------- + `libvcs.svn.SubversionRepo`, `libvcs.git.GitRepo`, or `libvcs.hg.MercurialRepo`. - Usage Example:: + Examples + -------- - >>> from libvcs.shortcuts import create_repo + >>> from libvcs.shortcuts import create_repo + >>> + >>> r = create_repo( + ... url='https://www.github.com/you/myrepo', + ... vcs='git', + ... repo_dir='/tmp/myrepo' + ... ) - >>> r = create_repo( - ... url='https://www.github.com/you/myrepo', - ... vcs='git', - ... repo_dir='/tmp/myrepo') - - >>> r.update_repo() - |myrepo| (git) Repo directory for myrepo (git) does not exist @ \ - /tmp/myrepo - |myrepo| (git) Cloning. - |myrepo| (git) git clone https://www.github.com/tony/myrepo \ - /tmp/myrepo - Cloning into '/tmp/myrepo'... - Checking connectivity... done. - |myrepo| (git) git fetch - |myrepo| (git) git pull - Already up-to-date. + >>> r.update_repo() + |myrepo| (git) Repo directory for myrepo (git) does not exist @ \ + /tmp/myrepo + |myrepo| (git) Cloning. + |myrepo| (git) git clone https://www.github.com/tony/myrepo \ + /tmp/myrepo + Cloning into '/tmp/myrepo'... + Checking connectivity... done. + |myrepo| (git) git fetch + |myrepo| (git) git pull + Already up-to-date. """ if vcs == 'git': return GitRepo(url, **kwargs) @@ -46,29 +49,30 @@ def create_repo(url, vcs, **kwargs): def create_repo_from_pip_url(pip_url, **kwargs): r"""Return a object representation of a VCS repository via pip-style url. - :returns: instance of a repository object - :rtype: :class:`libvcs.svn.SubversionRepo`, :class:`libvcs.git.GitRepo` or - :class:`libvcs.hg.MercurialRepo`. + Returns + ------- + `libvcs.svn.SubversionRepo`, `libvcs.git.GitRepo`, or `libvcs.hg.MercurialRepo`. - Usage Example:: + Examples + -------- - >>> from libvcs.shortcuts import create_repo_from_pip_url + >>> from libvcs.shortcuts import create_repo_from_pip_url - >>> r = create_repo_from_pip_url( - ... pip_url='git+https://www.github.com/you/myrepo', - ... repo_dir='/tmp/myrepo') + >>> r = create_repo_from_pip_url( + ... pip_url='git+https://www.github.com/you/myrepo', + ... repo_dir='/tmp/myrepo') - >>> r.update_repo() - |myrepo| (git) Repo directory for myrepo (git) does not exist @ \ - /tmp/myrepo - |myrepo| (git) Cloning. - |myrepo| (git) git clone https://www.github.com/tony/myrepo \ - /tmp/myrepo - Cloning into '/tmp/myrepo'... - Checking connectivity... done. - |myrepo| (git) git fetch - |myrepo| (git) git pull - Already up-to-date. + >>> r.update_repo() + |myrepo| (git) Repo directory for myrepo (git) does not exist @ \ + /tmp/myrepo + |myrepo| (git) Cloning. + |myrepo| (git) git clone https://www.github.com/tony/myrepo \ + /tmp/myrepo + Cloning into '/tmp/myrepo'... + Checking connectivity... done. + |myrepo| (git) git fetch + |myrepo| (git) git pull + Already up-to-date. """ if pip_url.startswith('git+'): return GitRepo.from_pip_url(pip_url, **kwargs) diff --git a/libvcs/svn.py b/libvcs/svn.py index f0a66bd6..dbec084d 100644 --- a/libvcs/svn.py +++ b/libvcs/svn.py @@ -2,21 +2,17 @@ # -*- coding: utf-8 -*- """Subversion object for libvcs. -libvcs.svn -~~~~~~~~~~ - The follow are from saltstack/salt (Apache license): -- :py:meth:`SubversionRepo.get_revision_file` +- [`SubversionRepo.get_revision_file`](libvcs.svn.SubversionRepo.get_revision_file) The following are pypa/pip (MIT license): -- :py:meth:`SubversionRepo.get_url_and_revision_from_pip_url` -- :py:meth:`SubversionRepo.get_url` -- :py:meth:`SubversionRepo.get_revision` -- :py:meth:`~.get_rev_options` - -""" +- [`SubversionRepo.get_url_and_revision_from_pip_url`](libvcs.svn.SubversionRepo.get_url_and_revision_from_pip_url) +- [`SubversionRepo.get_url`](libvcs.svn.SubversionRepo.get_url) +- [`SubversionRepo.get_revision`](libvcs.svn.SubversionRepo.get_revision) +- [`get_rev_options`](libvcs.svn.get_rev_options) +""" # NOQA: E5 from __future__ import absolute_import, print_function, unicode_literals import logging @@ -36,18 +32,19 @@ class SubversionRepo(BaseRepo): def __init__(self, url, **kwargs): """A svn repository. - :param url: URL in subversion repository - :type url: str + Parameters + ---------- + url : str + URL in subversion repository - :param svn_username: username to use for checkout and update - :type svn_username: str or None + svn_username : str, optional + username to use for checkout and update - :param svn_password: password to use for checkout and update - :type svn_password: str or None + svn_password : str, optional + password to use for checkout and update - :param svn_trust_cert: trust the Subversion server site certificate - (default False) - :type svn_trust_cert: bool + svn_trust_cert : bool + trust the Subversion server site certificate, default False """ if 'svn_trust_cert' not in kwargs: self.svn_trust_cert = False @@ -87,9 +84,7 @@ def get_revision_file(self, location): return int(dict(info_list)['Revision']) def get_revision(self, location=None): - """ - Return the maximum revision for all files under a given location - """ + """Return maximum revision for all files under a given location""" if not location: location = self.url @@ -146,11 +141,7 @@ def update_repo(self, dest=None): def get_rev_options(url, rev): - """Return revision options. - - from pip pip.vcs.subversion. - - """ + """Return revision options. From pip pip.vcs.subversion.""" if rev: rev_options = ['-r', rev] else: diff --git a/libvcs/util.py b/libvcs/util.py index dc7df95c..38bfc52b 100644 --- a/libvcs/util.py +++ b/libvcs/util.py @@ -1,10 +1,5 @@ # -*- coding: utf-8 -*- -"""Utility functions for libvcs. - -libvcs.util -~~~~~~~~~~~ - -""" +"""Utility functions for libvcs.""" from __future__ import absolute_import, print_function, unicode_literals import datetime @@ -26,11 +21,17 @@ def which( from salt.util - https://www.github.com/saltstack/salt - license apache - :param exe: Application to search PATHs for. - :type exe: str - :param default_path: Application to search PATHs for. - :type default_path: list - :rtype: str + Parameters + ---------- + exe : str + Application to search PATHs for. + default_path : list + Application to search PATHs for. + + Returns + ------- + str : + Path to binary """ def _is_executable_file_or_link(exe): @@ -66,8 +67,10 @@ def _is_executable_file_or_link(exe): def mkdir_p(path): """Make directories recursively. - :param path: path to create - :type path: str + Parameters + ---------- + path : str + path to create """ try: os.makedirs(path) @@ -82,7 +85,7 @@ class RepoLoggingAdapter(logging.LoggerAdapter): """Adapter for adding Repo related content to logger. - Extends :class:`logging.LoggerAdapter`'s functionality. + Extends `logging.LoggerAdapter`'s functionality. The standard library :py:mod:`logging` facility is pretty complex, so this warrants and explanation of what's happening. @@ -96,7 +99,6 @@ class RepoLoggingAdapter(logging.LoggerAdapter): logging.LoggerAdapter.process()` to be made use of when the user of this library wishes to use a custom :class:`logging.Formatter` to output results. - """ def __init__(self, *args, **kwargs): @@ -124,30 +126,37 @@ def run( """ Run 'cmd' in a shell and return the combined contents of stdout and stderr (Blocking). Throws an exception if the command exits non-zero. - :param cmd: list of str (or single str, if shell==True) indicating + Parameters + ---------- + cmd : list or str, or single str, if shell=True the command to run - :param shell: boolean indicating whether we are using advanced shell + + shell : boolean + boolean indicating whether we are using advanced shell features. Use only when absolutely necessary, since this allows a lot more freedom which could be exploited by malicious code. See the warning here: http://docs.python.org/library/subprocess.html#popen-constructor - :param cwd: dir command is run from. - :type cwd: str - :param log_in_real_time: boolean indicating whether to read stdout from the + + cwd : str + dir command is run from. Defaults to ``path``. + + log_in_real_time : boolean + boolean indicating whether to read stdout from the subprocess in real time instead of when the process finishes. - :param check_returncode: Indicate whether a :exc:`~exc.CommandError` - should be raised if return code is different from 0. - :type check_returncode: :class:`bool` - :param cwd: dir command is run from, defaults :attr:`~.path`. - :type cwd: str - :param callback: callback to return output as a command executes, accepts - a function signature of ``(output, timestamp)``. Example usage:: + + check_returncode : bool + Indicate whether a `libvcs.exc.CommandError` should be raised if return code is + different from 0. + + callback : callable + callback to return output as a command executes, accepts a function signature + of `(output, timestamp)`. Example usage:: def progress_cb(output, timestamp): sys.stdout.write(output) sys.stdout.flush() run(['git', 'pull'], callback=progrses_cb) - :type callback: func """ proc = subprocess.Popen( cmd, shell=shell, stderr=subprocess.PIPE, stdout=subprocess.PIPE, cwd=cwd, diff --git a/poetry.lock b/poetry.lock index 8209a7ec..bf521d12 100644 --- a/poetry.lock +++ b/poetry.lock @@ -11,8 +11,8 @@ category = "dev" description = "Cleverly-named alabaster sub-theme for git-pull projects" name = "alagitpull" optional = false -python-versions = "*" -version = "0.0.23" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "0.0.25rc2" [package.dependencies] alabaster = "<0.8" @@ -29,7 +29,7 @@ version = "1.4.4" [[package]] category = "dev" description = "Atomic file writes." -marker = "python_version < \"3\" or python_version >= \"3\" and sys_platform == \"win32\" or sys_platform == \"win32\"" +marker = "python_version >= \"3\" and sys_platform == \"win32\" or python_version < \"3\"" name = "atomicwrites" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -38,6 +38,7 @@ version = "1.4.0" [[package]] category = "dev" description = "Classes Without Boilerplate" +marker = "python_version >= \"3.6\" and python_version < \"4.0\" or python_version >= \"3\" or python_version < \"3\"" name = "attrs" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -52,6 +53,7 @@ tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.i [[package]] category = "dev" description = "Internationalization utilities" +marker = "python_version < \"3\" or python_version >= \"3\"" name = "babel" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -115,6 +117,18 @@ optional = false python-versions = "*" version = "2020.6.20" +[[package]] +category = "dev" +description = "Foreign Function Interface for Python calling C code." +marker = "sys_platform == \"linux\"" +name = "cffi" +optional = false +python-versions = "*" +version = "1.14.1" + +[package.dependencies] +pycparser = "*" + [[package]] category = "dev" description = "Universal encoding detector for Python 2 and 3" @@ -147,12 +161,27 @@ requests = ">=2.7.9" [[package]] category = "dev" description = "Cross-platform colored terminal text." -marker = "sys_platform == \"win32\" and python_version < \"3\" or python_version >= \"3\" and sys_platform == \"win32\" or sys_platform == \"win32\"" name = "colorama" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "0.4.3" +[[package]] +category = "dev" +description = "Python parser for the CommonMark Markdown spec" +name = "commonmark" +optional = false +python-versions = "*" +version = "0.9.1" + +[package.dependencies] +[package.dependencies.future] +python = "<3" +version = ">=0.14.0" + +[package.extras] +test = ["flake8 (3.7.8)", "hypothesis (3.55.3)"] + [[package]] category = "dev" description = "Updated configparser from Python 3.7 for Python 2.6+." @@ -169,7 +198,7 @@ testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2)", "pytes [[package]] category = "dev" description = "Backports and enhancements for the contextlib module" -marker = "python_version < \"3\" or python_version >= \"3\" and python_version < \"3.4\"" +marker = "python_version < \"3\"" name = "contextlib2" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -188,19 +217,24 @@ toml = ["toml"] [[package]] category = "dev" -description = "Style checker for Sphinx (or other) RST documentation" -name = "doc8" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +marker = "sys_platform == \"linux\"" +name = "cryptography" optional = false -python-versions = "*" -version = "0.8.1" +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" +version = "3.0" [package.dependencies] -Pygments = "*" -chardet = "*" -docutils = "*" -restructuredtext-lint = ">=0.7" -six = "*" -stevedore = "*" +cffi = ">=1.8,<1.11.3 || >1.11.3" +six = ">=1.4.1" + +[package.extras] +docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] +docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +idna = ["idna (>=2.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] [[package]] category = "dev" @@ -270,6 +304,15 @@ optional = false python-versions = "*" version = "3.2.3-2" +[[package]] +category = "dev" +description = "Clean single-source support for Python 3 and 2" +marker = "python_version < \"3\"" +name = "future" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "0.18.2" + [[package]] category = "dev" description = "Backport of the concurrent.futures package from Python 3" @@ -290,6 +333,7 @@ version = "2.10" [[package]] category = "dev" description = "Getting image size from png/jpeg/jpeg2000/gif file" +marker = "python_version < \"3\" or python_version >= \"3\"" name = "imagesize" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -326,6 +370,7 @@ testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] [[package]] category = "dev" description = "iniconfig: brain-dead simple config-ini parsing" +marker = "python_version >= \"3\"" name = "iniconfig" optional = false python-versions = "*" @@ -362,16 +407,29 @@ marker = "python_version >= \"3.6\"" name = "isort" optional = false python-versions = ">=3.6,<4.0" -version = "5.2.2" +version = "5.3.0" [package.extras] colors = ["colorama (>=0.4.3,<0.5.0)"] pipfile_deprecated_finder = ["pipreqs", "requirementslib", "tomlkit (>=0.5.3)"] requirements_deprecated_finder = ["pipreqs", "pip-api"] +[[package]] +category = "dev" +description = "Low-level, pure Python DBus protocol wrapper." +marker = "sys_platform == \"linux\"" +name = "jeepney" +optional = false +python-versions = ">=3.5" +version = "0.4.3" + +[package.extras] +dev = ["testpath"] + [[package]] category = "dev" description = "A very fast and expressive template engine." +marker = "python_version < \"3\" or python_version >= \"3\"" name = "jinja2" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -383,6 +441,27 @@ MarkupSafe = ">=0.23" [package.extras] i18n = ["Babel (>=0.8)"] +[[package]] +category = "dev" +description = "Store and access your passwords safely." +name = "keyring" +optional = false +python-versions = ">=3.6" +version = "21.3.0" + +[package.dependencies] +SecretStorage = ">=3" +jeepney = ">=0.4.2" +pywin32-ctypes = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1" + +[package.dependencies.importlib-metadata] +python = "<3.8" +version = "*" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy"] + [[package]] category = "dev" description = "Safely add untrusted strings to HTML/XML markup." @@ -436,6 +515,7 @@ six = ">=1.0.0,<2.0.0" [[package]] category = "dev" description = "More routines for operating on iterables, beyond itertools" +marker = "python_version >= \"3\"" name = "more-itertools" optional = false python-versions = ">=3.5" @@ -472,7 +552,7 @@ version = "*" [[package]] category = "dev" description = "Object-oriented filesystem paths" -marker = "python_version >= \"3\" and python_version < \"3.6\" or python_version < \"3.6\"" +marker = "python_version >= \"3\" and python_version < \"3.6\"" name = "pathlib2" optional = false python-versions = "*" @@ -490,14 +570,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "0.8.0" -[[package]] -category = "dev" -description = "Python Build Reasonableness" -name = "pbr" -optional = false -python-versions = "*" -version = "5.4.5" - [[package]] category = "dev" description = "Query metadatdata from sdists / bdists / installed packages." @@ -512,6 +584,7 @@ testing = ["nose", "coverage"] [[package]] category = "dev" description = "plugin and hook calling mechanisms for python" +marker = "python_version < \"3\" or python_version >= \"3\"" name = "pluggy" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -528,6 +601,7 @@ dev = ["pre-commit", "tox"] [[package]] category = "dev" description = "library with cross-python path, ini-parsing, io, code, log facilities" +marker = "python_version < \"3\" or python_version >= \"3\"" name = "py" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -541,6 +615,15 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.6.0" +[[package]] +category = "dev" +description = "C parser in Python" +marker = "sys_platform == \"linux\"" +name = "pycparser" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.20" + [[package]] category = "dev" description = "passive checker of Python programs" @@ -568,6 +651,7 @@ version = "2.6.1" [[package]] category = "dev" description = "Python parsing module" +marker = "python_version < \"3\" or python_version >= \"3\"" name = "pyparsing" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -743,6 +827,15 @@ optional = false python-versions = "*" version = "2020.1" +[[package]] +category = "dev" +description = "" +marker = "sys_platform == \"win32\"" +name = "pywin32-ctypes" +optional = false +python-versions = "*" +version = "0.2.0" + [[package]] category = "dev" description = "readme_renderer is a library for rendering \"readme\" descriptions for Warehouse" @@ -760,6 +853,19 @@ six = "*" [package.extras] md = ["cmarkgfm (>=0.2.0)"] +[[package]] +category = "dev" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +name = "recommonmark" +optional = false +python-versions = "*" +version = "0.6.0" + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + [[package]] category = "dev" description = "Alternative regular expression module, to replace re." @@ -800,14 +906,14 @@ requests = ">=2.0.1,<3.0.0" [[package]] category = "dev" -description = "reStructuredText linter" -name = "restructuredtext-lint" +description = "Validating URI References per RFC 3986" +name = "rfc3986" optional = false python-versions = "*" -version = "1.3.1" +version = "1.4.0" -[package.dependencies] -docutils = ">=0.11,<1.0" +[package.extras] +idna2008 = ["idna"] [[package]] category = "dev" @@ -818,6 +924,19 @@ optional = false python-versions = "*" version = "1.10.0" +[[package]] +category = "dev" +description = "Python bindings to FreeDesktop.org Secret Service API" +marker = "sys_platform == \"linux\"" +name = "secretstorage" +optional = false +python-versions = ">=3.5" +version = "3.1.2" + +[package.dependencies] +cryptography = "*" +jeepney = ">=0.4.2" + [[package]] category = "dev" description = "Python 2 and 3 compatibility utilities" @@ -829,6 +948,7 @@ version = "1.15.0" [[package]] category = "dev" description = "This package provides 26 stemmers for 25 languages generated from Snowball algorithms." +marker = "python_version < \"3\" or python_version >= \"3\"" name = "snowballstemmer" optional = false python-versions = "*" @@ -916,6 +1036,7 @@ tests = ["pytest", "mock"] [[package]] category = "dev" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +marker = "python_version >= \"3\"" name = "sphinxcontrib-applehelp" optional = false python-versions = ">=3.5" @@ -928,6 +1049,7 @@ test = ["pytest"] [[package]] category = "dev" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +marker = "python_version >= \"3\"" name = "sphinxcontrib-devhelp" optional = false python-versions = ">=3.5" @@ -940,6 +1062,7 @@ test = ["pytest"] [[package]] category = "dev" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +marker = "python_version >= \"3\"" name = "sphinxcontrib-htmlhelp" optional = false python-versions = ">=3.5" @@ -952,6 +1075,7 @@ test = ["pytest", "html5lib"] [[package]] category = "dev" description = "A sphinx extension which renders display math in HTML via JavaScript" +marker = "python_version >= \"3\"" name = "sphinxcontrib-jsmath" optional = false python-versions = ">=3.5" @@ -963,6 +1087,7 @@ test = ["pytest", "flake8", "mypy"] [[package]] category = "dev" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +marker = "python_version >= \"3\"" name = "sphinxcontrib-qthelp" optional = false python-versions = ">=3.5" @@ -975,6 +1100,7 @@ test = ["pytest"] [[package]] category = "dev" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +marker = "python_version >= \"3\"" name = "sphinxcontrib-serializinghtml" optional = false python-versions = ">=3.5" @@ -996,21 +1122,10 @@ version = "1.1.2" [package.extras] test = ["pytest", "mock"] -[[package]] -category = "dev" -description = "Manage dynamic plugins for Python applications" -name = "stevedore" -optional = false -python-versions = "*" -version = "1.32.0" - -[package.dependencies] -pbr = ">=2.0.0,<2.1.0 || >2.1.0" -six = ">=1.10.0" - [[package]] category = "dev" description = "Python Library for Tom's Obvious, Minimal Language" +marker = "python_version >= \"3.6\" and python_version < \"4.0\" or python_version >= \"3\"" name = "toml" optional = false python-versions = "*" @@ -1022,7 +1137,7 @@ description = "Fast, Extensible Progress Meter" name = "tqdm" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*" -version = "4.48.0" +version = "4.48.2" [package.extras] dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown"] @@ -1047,6 +1162,29 @@ tqdm = ">=4.14" keyring = ["keyring"] with-blake2 = ["pyblake2"] +[[package]] +category = "dev" +description = "Collection of utilities for publishing packages on PyPI" +name = "twine" +optional = false +python-versions = ">=3.6" +version = "3.2.0" + +[package.dependencies] +colorama = ">=0.4.3" +keyring = ">=15.1" +pkginfo = ">=1.4.2" +readme-renderer = ">=21.0" +requests = ">=2.20" +requests-toolbelt = ">=0.8.0,<0.9.0 || >0.9.0" +rfc3986 = ">=1.4.0" +setuptools = ">=0.7.0" +tqdm = ">=4.14" + +[package.dependencies.importlib-metadata] +python = "<3.8" +version = "*" + [[package]] category = "dev" description = "a fork of Python 2 and 3 ast modules with type comment support" @@ -1103,7 +1241,7 @@ version = "0.5.1" [[package]] category = "dev" description = "Backport of pathlib-compatible object wrapper for zip files" -marker = "python_version < \"3.8\" or python_version >= \"3\" and python_version < \"3.8\" or python_version >= \"3\" and python_version < \"3.8\" and (python_version < \"3.8\" or python_version >= \"3\" and python_version < \"3.8\")" +marker = "python_version >= \"3\" and python_version < \"3.8\" or python_version < \"3\"" name = "zipp" optional = false python-versions = ">=2.7" @@ -1118,8 +1256,29 @@ version = "*" docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] +[[package]] +category = "dev" +description = "Backport of pathlib-compatible object wrapper for zip files" +marker = "python_version >= \"3\" and python_version < \"3.8\"" +name = "zipp" +optional = false +python-versions = ">=3.6" +version = "3.1.0" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["jaraco.itertools", "func-timeout"] + +[extras] +coverage = [] +deploy = [] +docs = [] +format = [] +lint = [] +test = [] + [metadata] -content-hash = "309df1aced75306f5132362539af7253404a0f18595d8fab5ba9ca91a3993c7a" +content-hash = "b23cfef0071a7d17f6449adf4f9001b8460769070cf1b96aaafb9941875c6325" lock-version = "1.0" python-versions = "~2.7 || ^3.5" @@ -1129,7 +1288,8 @@ alabaster = [ {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] alagitpull = [ - {file = "alagitpull-0.0.23.tar.gz", hash = "sha256:a56c1672f17eb3bb55c63f93fc71e7914e0a7fa0707ceefbf8d5e422bf4a9f8a"}, + {file = "alagitpull-0.0.25rc2-py2.py3-none-any.whl", hash = "sha256:02a347cdca1bf1d6ceabbeb75430fd185a35541f5880609c8c79e584ab31de5e"}, + {file = "alagitpull-0.0.25rc2.tar.gz", hash = "sha256:2bfe712a56be4e41c3e452b51a9fc76e5f44e0968673deb35e59e71bb023eebc"}, ] appdirs = [ {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, @@ -1163,6 +1323,36 @@ certifi = [ {file = "certifi-2020.6.20-py2.py3-none-any.whl", hash = "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"}, {file = "certifi-2020.6.20.tar.gz", hash = "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3"}, ] +cffi = [ + {file = "cffi-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2"}, + {file = "cffi-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:4f53e4128c81ca3212ff4cf097c797ab44646a40b42ec02a891155cd7a2ba4d8"}, + {file = "cffi-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:833401b15de1bb92791d7b6fb353d4af60dc688eaa521bd97203dcd2d124a7c1"}, + {file = "cffi-1.14.1-cp27-cp27m-win32.whl", hash = "sha256:26f33e8f6a70c255767e3c3f957ccafc7f1f706b966e110b855bfe944511f1f9"}, + {file = "cffi-1.14.1-cp27-cp27m-win_amd64.whl", hash = "sha256:b87dfa9f10a470eee7f24234a37d1d5f51e5f5fa9eeffda7c282e2b8f5162eb1"}, + {file = "cffi-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:effd2ba52cee4ceff1a77f20d2a9f9bf8d50353c854a282b8760ac15b9833168"}, + {file = "cffi-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bac0d6f7728a9cc3c1e06d4fcbac12aaa70e9379b3025b27ec1226f0e2d404cf"}, + {file = "cffi-1.14.1-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:d6033b4ffa34ef70f0b8086fd4c3df4bf801fee485a8a7d4519399818351aa8e"}, + {file = "cffi-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:8416ed88ddc057bab0526d4e4e9f3660f614ac2394b5e019a628cdfff3733849"}, + {file = "cffi-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:892daa86384994fdf4856cb43c93f40cbe80f7f95bb5da94971b39c7f54b3a9c"}, + {file = "cffi-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:c991112622baee0ae4d55c008380c32ecfd0ad417bcd0417ba432e6ba7328caa"}, + {file = "cffi-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:fcf32bf76dc25e30ed793145a57426064520890d7c02866eb93d3e4abe516948"}, + {file = "cffi-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f960375e9823ae6a07072ff7f8a85954e5a6434f97869f50d0e41649a1c8144f"}, + {file = "cffi-1.14.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a6d28e7f14ecf3b2ad67c4f106841218c8ab12a0683b1528534a6c87d2307af3"}, + {file = "cffi-1.14.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:cda422d54ee7905bfc53ee6915ab68fe7b230cacf581110df4272ee10462aadc"}, + {file = "cffi-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:4a03416915b82b81af5502459a8a9dd62a3c299b295dcdf470877cb948d655f2"}, + {file = "cffi-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:4ce1e995aeecf7cc32380bc11598bfdfa017d592259d5da00fc7ded11e61d022"}, + {file = "cffi-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e23cb7f1d8e0f93addf0cae3c5b6f00324cccb4a7949ee558d7b6ca973ab8ae9"}, + {file = "cffi-1.14.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:ddff0b2bd7edcc8c82d1adde6dbbf5e60d57ce985402541cd2985c27f7bec2a0"}, + {file = "cffi-1.14.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f90c2267101010de42f7273c94a1f026e56cbc043f9330acd8a80e64300aba33"}, + {file = "cffi-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:3cd2c044517f38d1b577f05927fb9729d3396f1d44d0c659a445599e79519792"}, + {file = "cffi-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fa72a52a906425416f41738728268072d5acfd48cbe7796af07a923236bcf96"}, + {file = "cffi-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:267adcf6e68d77ba154334a3e4fc921b8e63cbb38ca00d33d40655d4228502bc"}, + {file = "cffi-1.14.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:d3148b6ba3923c5850ea197a91a42683f946dba7e8eb82dfa211ab7e708de939"}, + {file = "cffi-1.14.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:98be759efdb5e5fa161e46d404f4e0ce388e72fbf7d9baf010aff16689e22abe"}, + {file = "cffi-1.14.1-cp38-cp38-win32.whl", hash = "sha256:6923d077d9ae9e8bacbdb1c07ae78405a9306c8fd1af13bfa06ca891095eb995"}, + {file = "cffi-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:b1d6ebc891607e71fd9da71688fcf332a6630b7f5b7f5549e6e631821c0e5d90"}, + {file = "cffi-1.14.1.tar.gz", hash = "sha256:b2a2b0d276a136146e012154baefaea2758ef1f56ae9f4e01c612b0831e0bd2f"}, +] chardet = [ {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, {file = "chardet-3.0.4.tar.gz", hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"}, @@ -1180,6 +1370,10 @@ colorama = [ {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, ] +commonmark = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] configparser = [ {file = "configparser-4.0.2-py2.py3-none-any.whl", hash = "sha256:254c1d9c79f60c45dfde850850883d5aaa7f19a23f13561243a050d5a7c3fe4c"}, {file = "configparser-4.0.2.tar.gz", hash = "sha256:c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df"}, @@ -1224,9 +1418,26 @@ coverage = [ {file = "coverage-5.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:b8f58c7db64d8f27078cbf2a4391af6aa4e4767cc08b37555c4ae064b8558d9b"}, {file = "coverage-5.2.1.tar.gz", hash = "sha256:a34cb28e0747ea15e82d13e14de606747e9e484fb28d63c999483f5d5188e89b"}, ] -doc8 = [ - {file = "doc8-0.8.1-py2.py3-none-any.whl", hash = "sha256:4d58a5c8c56cedd2b2c9d6e3153be5d956cf72f6051128f0f2255c66227df721"}, - {file = "doc8-0.8.1.tar.gz", hash = "sha256:4d1df12598807cf08ffa9a1d5ef42d229ee0de42519da01b768ff27211082c12"}, +cryptography = [ + {file = "cryptography-3.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83"}, + {file = "cryptography-3.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a"}, + {file = "cryptography-3.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f"}, + {file = "cryptography-3.0-cp27-cp27m-win32.whl", hash = "sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6"}, + {file = "cryptography-3.0-cp27-cp27m-win_amd64.whl", hash = "sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f"}, + {file = "cryptography-3.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b"}, + {file = "cryptography-3.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67"}, + {file = "cryptography-3.0-cp35-abi3-macosx_10_10_x86_64.whl", hash = "sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd"}, + {file = "cryptography-3.0-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77"}, + {file = "cryptography-3.0-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c"}, + {file = "cryptography-3.0-cp35-cp35m-win32.whl", hash = "sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b"}, + {file = "cryptography-3.0-cp35-cp35m-win_amd64.whl", hash = "sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07"}, + {file = "cryptography-3.0-cp36-cp36m-win32.whl", hash = "sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559"}, + {file = "cryptography-3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71"}, + {file = "cryptography-3.0-cp37-cp37m-win32.whl", hash = "sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2"}, + {file = "cryptography-3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756"}, + {file = "cryptography-3.0-cp38-cp38-win32.whl", hash = "sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261"}, + {file = "cryptography-3.0-cp38-cp38-win_amd64.whl", hash = "sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f"}, + {file = "cryptography-3.0.tar.gz", hash = "sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053"}, ] docutils = [ {file = "docutils-0.16-py2.py3-none-any.whl", hash = "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af"}, @@ -1249,6 +1460,9 @@ functools32 = [ {file = "functools32-3.2.3-2.tar.gz", hash = "sha256:f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d"}, {file = "functools32-3.2.3-2.zip", hash = "sha256:89d824aa6c358c421a234d7f9ee0bd75933a67c29588ce50aaa3acdf4d403fa0"}, ] +future = [ + {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, +] futures = [ {file = "futures-3.3.0-py2-none-any.whl", hash = "sha256:49b3f5b064b6e3afc3316421a3f25f66c137ae88f068abbf72830170033c5e16"}, {file = "futures-3.3.0.tar.gz", hash = "sha256:7e033af76a5e35f58e56da7a91e687706faf4e7bdfb2cbc3f2cca6b9bcda9794"}, @@ -1272,13 +1486,21 @@ iniconfig = [ isort = [ {file = "isort-4.3.21-py2.py3-none-any.whl", hash = "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"}, {file = "isort-4.3.21.tar.gz", hash = "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1"}, - {file = "isort-5.2.2-py3-none-any.whl", hash = "sha256:aea484023188ef1c38256dd24afa96e914adafe3a911a1786800a74e433006d1"}, - {file = "isort-5.2.2.tar.gz", hash = "sha256:96b27045e3187b9bdde001143b79f9b10a462f372bff7062302818013b6c86f3"}, + {file = "isort-5.3.0-py3-none-any.whl", hash = "sha256:723de131d9ae9d2561844f0ee525ce33a396a11bcda57174f036ed5ab3d6a122"}, + {file = "isort-5.3.0.tar.gz", hash = "sha256:cdca22530d093ed16983ba52c41560fa0219d1b958e44fd2ae2995dcc7b785be"}, +] +jeepney = [ + {file = "jeepney-0.4.3-py3-none-any.whl", hash = "sha256:d6c6b49683446d2407d2fe3acb7a368a77ff063f9182fe427da15d622adc24cf"}, + {file = "jeepney-0.4.3.tar.gz", hash = "sha256:3479b861cc2b6407de5188695fa1a8d57e5072d7059322469b62628869b8e36e"}, ] jinja2 = [ {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, ] +keyring = [ + {file = "keyring-21.3.0-py3-none-any.whl", hash = "sha256:e7a17caf40c40b6bb8c4772224a487e4a63013560ed0c521065aeba7ecd42182"}, + {file = "keyring-21.3.0.tar.gz", hash = "sha256:22df6abfed49912fc560806030051067fba9f0069cffa79da72899aeea4ccbd5"}, +] markupsafe = [ {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, @@ -1343,10 +1565,6 @@ pathspec = [ {file = "pathspec-0.8.0-py2.py3-none-any.whl", hash = "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0"}, {file = "pathspec-0.8.0.tar.gz", hash = "sha256:da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061"}, ] -pbr = [ - {file = "pbr-5.4.5-py2.py3-none-any.whl", hash = "sha256:579170e23f8e0c2f24b0de612f71f648eccb79fb1322c814ae6b3c07b5ba23e8"}, - {file = "pbr-5.4.5.tar.gz", hash = "sha256:07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c"}, -] pkginfo = [ {file = "pkginfo-1.5.0.1-py2.py3-none-any.whl", hash = "sha256:a6d9e40ca61ad3ebd0b72fbadd4fba16e4c0e4df0428c041e01e06eb6ee71f32"}, {file = "pkginfo-1.5.0.1.tar.gz", hash = "sha256:7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb"}, @@ -1363,6 +1581,10 @@ pycodestyle = [ {file = "pycodestyle-2.6.0-py2.py3-none-any.whl", hash = "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367"}, {file = "pycodestyle-2.6.0.tar.gz", hash = "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e"}, ] +pycparser = [ + {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, + {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, +] pyflakes = [ {file = "pyflakes-2.2.0-py2.py3-none-any.whl", hash = "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92"}, {file = "pyflakes-2.2.0.tar.gz", hash = "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8"}, @@ -1405,10 +1627,18 @@ pytz = [ {file = "pytz-2020.1-py2.py3-none-any.whl", hash = "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed"}, {file = "pytz-2020.1.tar.gz", hash = "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"}, ] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] readme-renderer = [ {file = "readme_renderer-26.0-py2.py3-none-any.whl", hash = "sha256:cc4957a803106e820d05d14f71033092537a22daa4f406dfbdd61177e0936376"}, {file = "readme_renderer-26.0.tar.gz", hash = "sha256:cbe9db71defedd2428a1589cdc545f9bd98e59297449f69d721ef8f1cfced68d"}, ] +recommonmark = [ + {file = "recommonmark-0.6.0-py2.py3-none-any.whl", hash = "sha256:2ec4207a574289355d5b6ae4ae4abb29043346ca12cdd5f07d374dc5987d2852"}, + {file = "recommonmark-0.6.0.tar.gz", hash = "sha256:29cd4faeb6c5268c633634f2d69aef9431e0f4d347f90659fd0aab20e541efeb"}, +] regex = [ {file = "regex-2020.7.14-cp27-cp27m-win32.whl", hash = "sha256:e46d13f38cfcbb79bfdb2964b0fe12561fe633caf964a77a5f8d4e45fe5d2ef7"}, {file = "regex-2020.7.14-cp27-cp27m-win_amd64.whl", hash = "sha256:6961548bba529cac7c07af2fd4d527c5b91bb8fe18995fed6044ac22b3d14644"}, @@ -1440,8 +1670,9 @@ requests-toolbelt = [ {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, ] -restructuredtext-lint = [ - {file = "restructuredtext_lint-1.3.1.tar.gz", hash = "sha256:470e53b64817211a42805c3a104d2216f6f5834b22fe7adb637d1de4d6501fb8"}, +rfc3986 = [ + {file = "rfc3986-1.4.0-py2.py3-none-any.whl", hash = "sha256:af9147e9aceda37c91a05f4deb128d4b4b49d6b199775fd2d2927768abdc8f50"}, + {file = "rfc3986-1.4.0.tar.gz", hash = "sha256:112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d"}, ] scandir = [ {file = "scandir-1.10.0-cp27-cp27m-win32.whl", hash = "sha256:92c85ac42f41ffdc35b6da57ed991575bdbe69db895507af88b9f499b701c188"}, @@ -1456,6 +1687,10 @@ scandir = [ {file = "scandir-1.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:b24086f2375c4a094a6b51e78b4cf7ca16c721dcee2eddd7aa6494b42d6d519d"}, {file = "scandir-1.10.0.tar.gz", hash = "sha256:4d4631f6062e658e9007ab3149a9b914f3548cb38bfb021c64f39a025ce578ae"}, ] +secretstorage = [ + {file = "SecretStorage-3.1.2-py3-none-any.whl", hash = "sha256:b5ec909dde94d4ae2fa26af7c089036997030f0cf0a5cb372b4cccabd81c143b"}, + {file = "SecretStorage-3.1.2.tar.gz", hash = "sha256:15da8a989b65498e29be338b3b279965f1b8f09b9668bd8010da183024c8bff6"}, +] six = [ {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, @@ -1502,21 +1737,19 @@ sphinxcontrib-websupport = [ {file = "sphinxcontrib-websupport-1.1.2.tar.gz", hash = "sha256:1501befb0fdf1d1c29a800fdbf4ef5dc5369377300ddbdd16d2cd40e54c6eefc"}, {file = "sphinxcontrib_websupport-1.1.2-py2.py3-none-any.whl", hash = "sha256:e02f717baf02d0b6c3dd62cf81232ffca4c9d5c331e03766982e3ff9f1d2bc3f"}, ] -stevedore = [ - {file = "stevedore-1.32.0-py2.py3-none-any.whl", hash = "sha256:a4e7dc759fb0f2e3e2f7d8ffe2358c19d45b9b8297f393ef1256858d82f69c9b"}, - {file = "stevedore-1.32.0.tar.gz", hash = "sha256:18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b"}, -] toml = [ {file = "toml-0.10.1-py2.py3-none-any.whl", hash = "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88"}, {file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"}, ] tqdm = [ - {file = "tqdm-4.48.0-py2.py3-none-any.whl", hash = "sha256:fcb7cb5b729b60a27f300b15c1ffd4744f080fb483b88f31dc8654b082cc8ea5"}, - {file = "tqdm-4.48.0.tar.gz", hash = "sha256:6baa75a88582b1db6d34ce4690da5501d2a1cb65c34664840a456b2c9f794d29"}, + {file = "tqdm-4.48.2-py2.py3-none-any.whl", hash = "sha256:1a336d2b829be50e46b84668691e0a2719f26c97c62846298dd5ae2937e4d5cf"}, + {file = "tqdm-4.48.2.tar.gz", hash = "sha256:564d632ea2b9cb52979f7956e093e831c28d441c11751682f84c86fc46e4fd21"}, ] twine = [ {file = "twine-1.15.0-py2.py3-none-any.whl", hash = "sha256:630fadd6e342e725930be6c696537e3f9ccc54331742b16245dab292a17d0460"}, {file = "twine-1.15.0.tar.gz", hash = "sha256:a3d22aab467b4682a22de4a422632e79d07eebd07ff2a7079effb13f8a693787"}, + {file = "twine-3.2.0-py3-none-any.whl", hash = "sha256:ba9ff477b8d6de0c89dd450e70b2185da190514e91c42cc62f96850025c10472"}, + {file = "twine-3.2.0.tar.gz", hash = "sha256:34352fd52ec3b9d29837e6072d5a2a7c6fe4290e97bba46bb8d478b5c598f7ab"}, ] typed-ast = [ {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, @@ -1560,4 +1793,6 @@ webencodings = [ zipp = [ {file = "zipp-1.2.0-py2.py3-none-any.whl", hash = "sha256:e0d9e63797e483a30d27e09fffd308c59a700d365ec34e93cc100844168bf921"}, {file = "zipp-1.2.0.tar.gz", hash = "sha256:c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1"}, + {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, + {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, ] diff --git a/pyproject.toml b/pyproject.toml index f53daea1..0f9ae7c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,34 +12,52 @@ authors = ["Tony Narlock "] python = "~2.7 || ^3.5" [tool.poetry.dev-dependencies] -alagitpull = "*" -black = {version="==19.10b0", python="^3.6"} -doc8 = "*" -docutils = "*" -flake8 = "*" -isort = [ - {version="<5", python="<3.6"}, - {version="*", python=">=3.6"} +### Docs ### +sphinx = [ + {version="<2", python="<3"}, + {version="*", python=">=3"} ] +recommonmark = {version = "^0.6.0"} +alagitpull = {version = "^0.0.25-rc.2", allow-prereleases = true} +sphinx-issues = {version = "^1.2.0"} + +### Testing ### pytest = [ {version="<4.7.0", python="<3"}, {version="*", python=">=3"} ] pathlib2 = {version="<2.3.5", python="<3"} # Untangle pytest peer-dependency pytest-rerunfailures = "*" -sphinx = [ - {version="<2", python="<3"}, +pytest-mock = [ + {version="<3.0.0", python="<3"}, {version="*", python=">=3"} ] -sphinx-issues = "*" -twine = "*" + +### Coverage ### codecov = "*" coverage = "*" pytest-cov = [ {version="<2.10.0", python="<3"}, {version="*", python=">=3"} ] -pytest-mock = [ - {version="<3.0.0", python="<3"}, - {version="*", python=">=3"} + +### Format ### +black = {version="==19.10b0", python="^3.6"} +isort = [ + {version="<5", python="<3.6"}, + {version="*", python=">=3.6"} ] + +### Lint ### +flake8 = "*" + +### Deploy ### +twine = "*" + +[tool.poetry.extras] +docs = ["sphinx", "recommonmark", "sphinx-issues", "alagitpull"] +test = ["pytest", "pathlib2", "pytest-rerunfailures", "pytest-mock"] +coverage = ["codecov", "coverage", "pytest-cov"] +format = ["black", "isort"] +lint = ["flake8"] +deploy = ["deploy"] diff --git a/requirements/doc.txt b/requirements/doc.txt index ed09c96b..f8e9b368 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,4 +1,4 @@ -r ./base.txt sphinx>=2.0.0 -alagitpull>=0.0.23 +alagitpull>=0.0.24 sphinx_issues==1.2.0 diff --git a/setup.py b/setup.py index 5d8a10d3..896ec417 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with open('requirements/test.txt') as f: tests_reqs = [line for line in f.read().split('\n') if line] -readme = open('README.rst').read() +readme = open('README.md').read() history = open('CHANGES').read().replace('.. :changelog:', '')