Skip to content

Commit db6e2e5

Browse files
author
Vinit Kumar
authored
feat: make deps more flexible (#158)
* feat: make deps more flexible * feat: we don't have requirements.txt anymore * fix: make testing more reliable * fix: update the test as the underlying library changed types: v0.12.0..v0.13.0 has changed the type of what is returned. ```diff -from collections import OrderedDict +_dict = dict +import platform ``` Authored-by: Vinit Kumar <[email protected]> Signed-off-by: Vinit Kumar <[email protected]> * fix: remove imports Signed-off-by: Vinit Kumar <[email protected]>
1 parent 8a68519 commit db6e2e5

File tree

6 files changed

+10
-34
lines changed

6 files changed

+10
-34
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
pip install pytest
32-
pip install -r requirements.txt
33-
pip install xmltodict==0.12.0
34-
pip install pytest==7.0.1
35-
pip install coverage==6.3.2
36-
pip install py==1.11.0
31+
pip install -r requirements-dev.txt
3732
python setup.py install
3833
- name: Unit tests
3934
run: |

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include CONTRIBUTING.rst
33
include HISTORY.rst
44
include LICENSE
55
include README.rst
6-
include requirements.txt
6+
include requirements.in
77
recursive-include tests *
88
recursive-exclude * __pycache__
99
recursive-exclude * *.py[co]

requirements-dev.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# When installing dev dependencies also install the user dependencies
2-
-r requirements.txt
3-
xmltodict==0.12.0
4-
pytest==7.0.1
5-
coverage==6.3.2
6-
py==1.11.0
7-
flake8==4.0.1
2+
-r requirements.in
3+
xmltodict>=0.12.0
4+
pytest
5+
coverage
6+
py
7+
flake8

requirements.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
with open("HISTORY.rst") as history_file:
1212
history = history_file.read()
1313

14-
requirements = [open("requirements.txt").read()]
14+
requirements = [open("requirements.in").read()]
1515

1616
setup_requirements = []
1717

tests/test_json2xml.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import pytest
66
import json
7-
from collections import OrderedDict
87

98
import xmltodict
109
from pyexpat import ExpatError
@@ -68,7 +67,7 @@ def test_json_to_xml_conversion(self):
6867
)
6968
xmldata = json2xml.Json2xml(data).to_xml()
7069
dict_from_xml = xmltodict.parse(xmldata)
71-
assert type(dict_from_xml["all"]) == OrderedDict
70+
assert type(dict_from_xml["all"]) == dict
7271

7372
def test_custom_wrapper_and_indent(self):
7473
data = readfromstring(

0 commit comments

Comments
 (0)