Skip to content

Commit

Permalink
update package system to poetry (#288)
Browse files Browse the repository at this point in the history
* update package system to poetry
* fix ci
* publish python using poetry
* update dependent packages
  • Loading branch information
cedric05 committed Aug 7, 2024
1 parent 193a631 commit 3249858
Show file tree
Hide file tree
Showing 11 changed files with 1,258 additions and 911 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.11
- uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: |
sudo apt-get install tar
pip install python-magic
poetry config virtualenvs.create false
# can use single requirement file referring all three
pip install -r all_requirements.txt
poetry install --all-extras --no-root
- name: Run tests
run: |
docker run -d -p 8000:80 kennethreitz/httpbin
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,18 @@ jobs:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -r all_requirements.txt
poetry config virtualenvs.create false
# can use single requirement file referring all three
poetry install --all-extras --no-root
# unit tests need python-magic
# package in pypi woudn't need python-magic
python -m pip install python-magic
# for integration tests
docker run -d -p 8000:80 kennethreitz/httpbin
python -m unittest
- name: Build Distribution
run: |
# install prerequisites
python -m pip install --upgrade pip
pip install setuptools wheel twine
# build distribution
python setup.py sdist bdist_wheel
poetry build
# retrieve your distributions here
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
30 changes: 0 additions & 30 deletions Pipfile

This file was deleted.

791 changes: 0 additions & 791 deletions Pipfile.lock

This file was deleted.

5 changes: 0 additions & 5 deletions all_requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion dothttp/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.43a17"
__version__ = "0.0.43a18"
1,199 changes: 1,199 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[tool.poetry]
name = "dothttp-req"
version = "0.0.43a18"
description = "Dothttp is Simple http client for testing and development"
authors = ["Prasanth <kesavarapu.siva@gmail.com>"]
license = "MIT"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
exclude = ["test", "test.core", "test.extensions", "benchmarks"]
repository = "https://github.com/cedric05/dothttp"

[tool.poetry.urls]
"Bug Tracker" = "https://github.com/cedric05/dothttp"

[tool.poetry.scripts]
dothttp = 'dothttp.__main__:main'



[tool.poetry.dependencies]
python = ">=3.8, <3.13"
jsonschema = "4.23.0"
jstyleson = "0.0.2"
textx = "4.0.1"
requests-pkcs12 = "1.25"
parsys-requests-unixsocket = "0.3.2"
requests-aws4auth = "1.3.1"
requests-ntlm = "1.3.0"
restrictedpython = "7.2"
faker = "26.1.0"
requests-hawk = "1.2.1"
msal = "1.30.0"
pyyaml = "6.0.1"
toml = "0.10.2"
requests = "2.32.3"

[tool.poetry.group.dev.dependencies]
waitress = "3.0.0"
flask = "3.0.2"
python-magic = "^0.4.27"
js2py = "0.74"

[tool.poetry.extras]
js = ["js2py"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
14 changes: 0 additions & 14 deletions requirements.txt

This file was deleted.

59 changes: 0 additions & 59 deletions setup.py

This file was deleted.

2 changes: 0 additions & 2 deletions test_requirements.txt

This file was deleted.

0 comments on commit 3249858

Please sign in to comment.