Skip to content

Commit

Permalink
Merge branch 'httpie:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
alansill authored Apr 26, 2022
2 parents 01f2d92 + 6602b81 commit ec3725f
Show file tree
Hide file tree
Showing 39 changed files with 285 additions and 303 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -U pip setuptools wheel
- run: python -m pip install -r requirements-test.txt
- run: python -m pip install -e .
- run: python -m pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ _build
build
dist
data.json
venv*
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016-18 Chang-Hung Liang
Copyright (c) 2016-2021 Chang-Hung Liang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: build

install:
python -m pip install -e .
python -m pip install -r requirements-test.txt

clean:
rm -rf dist/ build/

test:
python -m pytest

build:
python setup.py sdist bdist_wheel

check:
twine check dist/*

upload:
twine upload --repository=http-prompt dist/*

release: test clean build check upload
23 changes: 10 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HTTP Prompt
===========

|PyPI| |Docs| |Travis| |Appveyor| |Coverage| |Gitter|
|PyPI| |Docs| |Build| |Coverage| |Discord|

HTTP Prompt is an interactive command-line HTTP client featuring autocomplete
and syntax highlighting, built on HTTPie_ and prompt_toolkit_.
Expand All @@ -12,10 +12,10 @@ and syntax highlighting, built on HTTPie_ and prompt_toolkit_.
Links
-----

* Home: http://http-prompt.com
* Documentation: http://docs.http-prompt.com
* Code: https://github.com/eliangcs/http-prompt
* Chat: https://gitter.im/eliangcs/http-prompt
* Home: https://http-prompt.com
* Documentation: https://docs.http-prompt.com
* Code: https://github.com/httpie/http-prompt
* Chat: https://httpie.io/chat


.. |PyPI| image:: https://img.shields.io/pypi/v/http-prompt.svg
Expand All @@ -24,20 +24,17 @@ Links
.. |Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat
:target: http://docs.http-prompt.com/en/latest/?badge=latest

.. |Travis| image:: https://api.travis-ci.org/eliangcs/http-prompt.svg?branch=master
:target: https://travis-ci.org/eliangcs/http-prompt

.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/9tyrtce5omcq1yyk/branch/master?svg=true
:target: https://ci.appveyor.com/project/eliangcs/http-prompt/branch/master
.. |Build| image:: https://github.com/httpie/http-prompt/workflows/Build/badge.svg
:target: https://github.com/httpie/http-prompt/actions

.. |Coverage| image:: https://coveralls.io/repos/github/eliangcs/http-prompt/badge.svg?branch=master
:target: https://coveralls.io/github/eliangcs/http-prompt?branch=master

.. |Gitter| image:: https://badges.gitter.im/eliangcs/http-prompt.svg
:target: https://gitter.im/eliangcs/http-prompt
.. |Discord| image:: https://img.shields.io/badge/chat-on%20Discord-brightgreen?style=flat-square
:target: https://httpie.io/chat

.. |Asciinema| image:: https://asciinema.org/a/96613.png
:target: https://asciinema.org/a/96613?theme=monokai&size=medium&autoplay=1&speed=1.5

.. _HTTPie: https://httpie.org
.. _HTTPie: https://httpie.io
.. _prompt_toolkit: https://github.com/jonathanslenders/python-prompt-toolkit
30 changes: 0 additions & 30 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Refer to LICENSE in the main repo:

https://github.com/eliangcs/http-prompt
https://github.com/httpie/http-prompt
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This repo contains the documentation for HTTP Prompt, published on
http://docs.http-prompt.com. The source code of HTTP Prompt can be found in the
main repo: https://github.com/eliangcs/http-prompt
main repo: https://github.com/httpie/http-prompt

## How to Build

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
html_theme_options = {
'extra_nav_links': OrderedDict([
('Home', 'http://http-prompt.com'),
('Chat on Gitter', 'https://gitter.im/eliangcs/http-prompt'),
('Code on GitHub', 'https://github.com/eliangcs/http-prompt'),
('Discord', 'https://httpie.io/chat'),
('Code on GitHub', 'https://github.com/httpie/http-prompt'),
])
}
32 changes: 10 additions & 22 deletions docs/contributor-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ most popular virtualenv management tools.

Make sure you have installed pyenv_ and pyenv-virtualenv_ first.

HTTP Prompt should work on Python 2.6, 2.7, 3.3 to 3.6. You can use any
HTTP Prompt should work on Python 3.6 and newer. You can use any
of these Python versions as your development environment, but using the latest
version (3.6.x) is probably the best. You can install the latest Python with
pyenv::
Expand Down Expand Up @@ -137,12 +137,10 @@ Before you add a new feature, make sure you create an issue making a proposal
first, because you don't want to waste your time on something that the
community don't agree upon.

Python 2 and 3 Compatibility
Python Compatibility
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

HTTP Prompt is compatible with Python 2 and 3. Keep in mind that you're coding
for Python 2 and 3 at the same time. You can use Tox_ (see below) to make sure
the code is runnable on both Python 2 and 3.
HTTP Prompt is compatible with Python 3.6+.

Documentation
~~~~~~~~~~~~~
Expand Down Expand Up @@ -185,39 +183,29 @@ Deactivate it first if you're in a virtualenv::
Make sure you have installed all the Python versions we're targeting. If not,
do::

$ pyenv install 2.6.9
$ pyenv install 2.7.12
$ pyenv install 3.3.6
$ pyenv install 3.4.5
$ pyenv install 3.5.2
$ pyenv install 3.6.0
$ pyenv install pypy-5.3.1
$ pyenv install pypy3-2.4.0
$ pyenv install 3.7.0
$ pyenv install 3.8.0

To use Tox_ with pyenv_, you have to instruct pyenv to use multiple Python
versions for the project::

$ cd ~/Projects/http-prompt
$ pyenv local 3.6.0 3.5.2 3.4.5 3.3.6 2.7.12 2.6.9 pypy-5.3.1 pypy3-2.4.0
$ pyenv local 3.6.0 3.7.0 3.8.0

This will generate a ``.python-version`` in the project directory::

$ cat ~/Projects/http-prompt/.python-version
3.6.0
3.5.2
3.4.5
3.3.6
2.7.12
2.6.9
pypy-5.3.1
pypy3-2.4.0
3.7.0
3.8.0

This tells pyenv_ to choose a Python version based on the above order. In this
case, 3.6.0 is the first choice, so any Python executables (such as ``python``
and ``pip``) will be automatically mapped to the ones in
``~/.pyenv/versions/3.6.0/bin``.
``~/.pyenv/versions/3.8.0/bin``.

We want to run ``tox`` using on Python 3.6.0. Make sure you have installed
We want to run ``tox`` using on Python 3.8.0. Make sure you have installed
Tox_::

$ pip install tox
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Thanks
:target: https://asciinema.org/a/96613?theme=monokai&size=medium&autoplay=1&speed=1.5

.. _Contributors: https://github.com/eliangcs/http-prompt/graphs/contributors
.. _GitHub issues: https://github.com/eliangcs/http-prompt/issues
.. _Gitter chat room: https://gitter.im/eliangcs/http-prompt
.. _HTTPie: https://httpie.org
.. _GitHub issues: https://github.com/httpie/http-prompt/issues
.. _Discord: https://htpie.io/chat
.. _HTTPie: https://httpie.io
.. _Parsimonious: https://github.com/erikrose/parsimonious
.. _pgcli: http://pgcli.com
.. _prompt_toolkit: https://github.com/jonathanslenders/python-prompt-toolkit
6 changes: 5 additions & 1 deletion docs/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ To upgrade HTTP Prompt, do::

$ pip install -U http-prompt

It's also possible to install it using Homebrew::

$ brew install http-prompt


Quickstart
----------
Expand Down Expand Up @@ -362,7 +366,7 @@ only person who can read it is the owner (you).
last context instead of grouping multiple contexts by hostnames and ports like
it did previously. We changed the behavior because the feature can be simply
replaced by ``env``, ``exec`` and ``source`` commands. See the discussion in
`issue #70 <https://github.com/eliangcs/http-prompt/issues/70>`_ for detail.
`issue #70 <https://github.com/httpie/http-prompt/issues/70>`_ for detail.


``ls``, ``cd``, and OpenAPI/Swagger Specification
Expand Down
2 changes: 1 addition & 1 deletion http_prompt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.0'
__version__ = '2.1.0'
Loading

0 comments on commit ec3725f

Please sign in to comment.