diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 86d46b75..b7d102fb 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -28,12 +28,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest - pip install -r requirements.txt - pip install xmltodict==0.12.0 - pip install pytest==7.0.1 - pip install coverage==6.3.2 - pip install py==1.11.0 + pip install -r requirements-dev.txt python setup.py install - name: Unit tests run: | diff --git a/MANIFEST.in b/MANIFEST.in index b77663ea..226ee517 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,7 +3,7 @@ include CONTRIBUTING.rst include HISTORY.rst include LICENSE include README.rst -include requirements.txt +include requirements.in recursive-include tests * recursive-exclude * __pycache__ recursive-exclude * *.py[co] diff --git a/requirements-dev.txt b/requirements-dev.txt index b9334c44..301997e7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ # When installing dev dependencies also install the user dependencies --r requirements.txt -xmltodict==0.12.0 -pytest==7.0.1 -coverage==6.3.2 -py==1.11.0 -flake8==4.0.1 +-r requirements.in +xmltodict>=0.12.0 +pytest +coverage +py +flake8 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8fc19336..00000000 --- a/requirements.txt +++ /dev/null @@ -1,18 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.9 -# To update, run: -# -# pip-compile -# -certifi==2021.5.30 - # via requests -charset-normalizer==2.0.6 - # via requests -defusedxml==0.7.1 - # via -r requirements.in -idna==3.2 - # via requests -requests==2.26.0 - # via -r requirements.in -urllib3==1.26.7 - # via requests diff --git a/setup.py b/setup.py index 0cc0fe9b..17ab21a3 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ with open("HISTORY.rst") as history_file: history = history_file.read() -requirements = [open("requirements.txt").read()] +requirements = [open("requirements.in").read()] setup_requirements = [] diff --git a/tests/test_json2xml.py b/tests/test_json2xml.py index 0d3f1bb6..40003fef 100644 --- a/tests/test_json2xml.py +++ b/tests/test_json2xml.py @@ -4,7 +4,6 @@ import pytest import json -from collections import OrderedDict import xmltodict from pyexpat import ExpatError @@ -68,7 +67,7 @@ def test_json_to_xml_conversion(self): ) xmldata = json2xml.Json2xml(data).to_xml() dict_from_xml = xmltodict.parse(xmldata) - assert type(dict_from_xml["all"]) == OrderedDict + assert type(dict_from_xml["all"]) == dict def test_custom_wrapper_and_indent(self): data = readfromstring(