diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c1e308..9911106 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49b0ada..90ad552 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,19 +10,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7] + python-version: ["3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: pip install wheel + run: pip install build - name: Build distribution - run: python setup.py sdist bdist_wheel + run: python -m build - name: Publish package to PyPi - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@v1.12.2 with: - user: __token__ password: ${{ secrets.pypi_password }} diff --git a/.gitignore b/.gitignore index aa067ac..e856676 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ __pycache__ *.pyc *.json *.txt -!requirements.txt .coverage htmlcov build diff --git a/README.md b/README.md index 8be8be5..65d7428 100644 --- a/README.md +++ b/README.md @@ -30,24 +30,28 @@ which received a [Distinguished Artifact Award](https://conf.researchr.org/detai ### Requirements ### -* python 3.8.* -* Other python dependencies will be installed during the below setup process +* Python 3.8 or higher +* Other python dependencies will be installed during the installation process -You can either install subschema from the source code from github or the pypy package. +You can either install jsonsubschema from PyPI or from the source code on GitHub. -### A) Install from github source code ### +### A) Install from PyPI ### Execute the following: -``` -git clone https://github.com/IBM/jsonsubschema.git -cd jsonsubschema -python setup.py install -cd .. +```bash +pip install jsonsubschema ``` -### B) Install from pypy ### +### B) Install from GitHub source code ### Execute the following: +```bash +git clone https://github.com/IBM/jsonsubschema.git +cd jsonsubschema +pip install . ``` -pip install jsonsubschema + +For development installation (editable mode): +```bash +pip install -e . ``` ## II) Running subschema ## diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..de8ba9c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "jsonsubschema" +version = "0.0.8" +description = "A tool to check whether a JSON schema is subset/subschema of another JSON schema" +readme = "README.md" +license = "Apache-2.0" +authors = [ + {name = "Andrew Habib", email = "andrew.a.habib@gmail.com"}, + {name = "Avraham Shinnar"}, + {name = "Martin Hirzel"}, +] +requires-python = ">=3.8" +dependencies = [ + "portion", + "greenery>=4.0.0", + "jsonschema", + "jsonref", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Testing", +] + +[project.urls] +Homepage = "https://github.com/IBM/jsonsubschema" +Repository = "https://github.com/IBM/jsonsubschema" +"Bug Tracker" = "https://github.com/IBM/jsonsubschema/issues" + +[project.scripts] +jsonsubschema = "jsonsubschema.cli:main" + +[tool.setuptools.packages.find] +include = ["jsonsubschema*"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9c558e3..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -. diff --git a/setup.py b/setup.py deleted file mode 100644 index 3a34154..0000000 --- a/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -''' -Created on August 6, 2019 -@author: Andrew Habib -''' - -from setuptools import setup - -with open("README.md", "r") as fh: - long_description = fh.read() - -setup( - name='jsonsubschema', - version='0.0.7', - author='Andrew Habib, Avraham Shinnar, Martin Hirzel', - author_email='andrew.a.habib@gmail.com', - description="A tool to check whether a JSON schema is subset/subschema of another JSON schema", - long_description=long_description, - long_description_content_type="text/markdown", - url='https://github.com/IBM/jsonsubschema', - packages=['jsonsubschema', ], - license='Apache License 2.0', - install_requires=['portion', 'greenery>=4.0.0', 'jsonschema', 'jsonref'], - entry_points={ - 'console_scripts': 'jsonsubschema=jsonsubschema.cli:main' - } -)