Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pin dependencies #106

Merged
merged 6 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 3 additions & 25 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details
Expand All @@ -15,28 +16,5 @@ on:

jobs:
Publish:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel babel

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@v1.3.1
with:
user: __token__
# The token is provided by the inveniosoftware organization
password: ${{ secrets.pypi_token }}
uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
secrets: inherit
40 changes: 2 additions & 38 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2022 RERO.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -27,40 +27,4 @@ on:

jobs:
Tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
requirements-level: [pypi]
env:
EXTRAS: tests
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Generate dependencies
run: |
pip uninstall -y six
pip install wheel requirements-builder
requirements-builder -e "$EXTRAS" ${{ matrix.requirements-file }} --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}

- name: Install dependencies
run: |
pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt
pip install -e .[$EXTRAS]
pip freeze

- name: Run tests
run: |
./run-tests.sh
uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master
17 changes: 17 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
..
This file is part of Invenio.
Copyright (C) 2015-2018 CERN.
Copyright (C) 2024 Graz University of Technology.

Invenio is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.

Changes
=======

Version 1.1.5 (release 2024-11-30)

- fix: SphinxWarning
- global: remove examples directory
- global: remove six usage
- setup: change to reusable workflows
- setup: pin dependencies
- fix extlinks warning of compatibility with version 6
- global: clean test infrastructure
- increase minimal python version to 3.7
- move check_manifest configuration to setup.cfg.
- fix docs compatibilty problem with Sphinx>=5.0.0
- add .git-blame-ignore-revs
- migrate to use black as opinionated auto formater
- migrate setup.py to setup.cfg

Version 1.1.4 (released 2022-02-28)

- Changes from pkg_resources to importlib for entry points iteration.
Expand Down
10 changes: 4 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -11,10 +11,6 @@

from __future__ import print_function

import sys

import sphinx.environment

from invenio_jsonschemas import __version__

# -- General configuration ------------------------------------------------
Expand Down Expand Up @@ -335,7 +331,9 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
intersphinx_mapping = {
"python": ("https://docs.python.org/", None),
}

# Autodoc configuraton.
autoclass_content = "both"
Expand Down
13 changes: 0 additions & 13 deletions docs/examplesapp.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
..
This file is part of Invenio.
Copyright (C) 2015-2018 CERN.
Copyright (C) 2024 Graz University of Technology.

Invenio is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -19,7 +20,6 @@ Invenio-JSONSchemas.
installation
configuration
usage
examplesapp


API Reference
Expand Down
14 changes: 0 additions & 14 deletions examples/app-setup.sh

This file was deleted.

4 changes: 0 additions & 4 deletions examples/app-teardown.sh

This file was deleted.

69 changes: 0 additions & 69 deletions examples/app.py

This file was deleted.

9 changes: 0 additions & 9 deletions examples/samplepkg/samplepkg/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions examples/samplepkg/samplepkg/jsonschemas/__init__.py

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions examples/samplepkg/samplepkg/jsonschemas/record_schema.json

This file was deleted.

22 changes: 0 additions & 22 deletions examples/samplepkg/setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion invenio_jsonschemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -314,7 +315,7 @@
from .ext import InvenioJSONSchemas, InvenioJSONSchemasAPI, InvenioJSONSchemasUI
from .proxies import current_jsonschemas

__version__ = "1.1.4"
__version__ = "1.1.5"

__all__ = (
"__version__",
Expand Down
9 changes: 4 additions & 5 deletions invenio_jsonschemas/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2022 RERO.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -13,13 +14,11 @@

import json
import os
from urllib.parse import urljoin
from urllib.parse import urlsplit

import importlib_metadata
import six
from flask import request
from jsonref import JsonRef
from six.moves.urllib.parse import urlsplit
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Map, Rule
from werkzeug.utils import cached_property, import_string
Expand Down Expand Up @@ -172,15 +171,15 @@ def path_to_url(self, path):
def loader_cls(self):
"""Loader class used in `JsonRef.replace_refs`."""
cls = self.app.config["JSONSCHEMAS_LOADER_CLS"]
if isinstance(cls, six.string_types):
if isinstance(cls, str):
return import_string(cls)
return cls

@cached_property
def resolver_cls(self):
"""Loader to resolve the schema."""
cls = self.app.config["JSONSCHEMAS_RESOLVER_CLS"]
if isinstance(cls, six.string_types):
if isinstance(cls, str):
return import_string(cls)
return cls

Expand Down
Loading