Skip to content

Commit

Permalink
Merge pull request #69 from corytodd/corytodd/revert-to-requirements-…
Browse files Browse the repository at this point in the history
…files

packaging: revert to requirements files
  • Loading branch information
fzumstein authored Jun 21, 2023
2 parents a5d4bbe + 8f0563e commit 00e3dc8
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
pip install .[test]
pip install .[dev]
- name: Run Tests
run: |
python -m pytest
23 changes: 23 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,26 @@ Examples:
$ jdiff a.json b.json -i 2 -s symmetric
$ jdiff a.yaml b.yaml -f yaml -s symmetric
Development
-----------

Install development dependencies and test locally with

.. code-block:: bash
pip install -r requirements-dev.txt
# ... do your work ... add tests ...
pytest
Installing From Source
----------------------

To install from source run

.. code-block:: bash
pip install .
This will install the library and cli for `jsondiff` as well as its runtime
dependencies.
15 changes: 5 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "jsondiff"
description = "Diff JSON and JSON-like structures in Python"
dynamic = ["version"]
dynamic = ["version", "dependencies", "optional-dependencies"]
readme = "README.rst"
license= {file = "LICENSE" }
requires-python = ">=3.8"
Expand All @@ -17,15 +17,6 @@ classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
]
dependencies = [
"pyyaml"
]

[project.optional-dependencies]
test = [
"hypothesis",
"pytest"
]

[project.urls]
"Homepage" = "https://github.com/xlwings/jsondiff"
Expand All @@ -40,3 +31,7 @@ exclude = ["tests*"]

[tool.setuptools.dynamic]
version = {attr = "jsondiff.__version__"}
dependencies = {file=["requirements.txt"]}

[tool.setuptools.dynamic.optional-dependencies]
dev = {file=["requirements-dev.txt"]}
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hypothesis
pytest
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyyaml

0 comments on commit 00e3dc8

Please sign in to comment.