mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-24 05:31:57 +00:00
Compare commits
15 Commits
2025.5.20.
...
2025.6.3
| Author | SHA1 | Date | |
|---|---|---|---|
| c5bd3d138e | |||
| d5f63f4387 | |||
| f7d0aa1bcf | |||
| 4155fb875a | |||
| 51dac9f287 | |||
| de36035b59 | |||
| f0643b3488 | |||
| 9b5e74ae67 | |||
| 1a91b1c33c | |||
| f4d6435146 | |||
| 2297d2f3dd | |||
| 626eeafe25 | |||
| 62f4b88759 | |||
| d2ab271883 | |||
| 725c4197b9 |
29
.github/dependabot.yml
vendored
Normal file
29
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "uv"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 8
|
||||
allow:
|
||||
- dependency-type: "all"
|
||||
reviewers:
|
||||
- "Cian-H"
|
||||
assignees:
|
||||
- "Cian-H"
|
||||
commit-message:
|
||||
prefix: "uv-deps"
|
||||
prefix-development: "uv-deps-dev"
|
||||
include: "scope"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
@@ -74,13 +74,19 @@ jobs:
|
||||
run: |
|
||||
uv --version
|
||||
uv run python --version
|
||||
docker --version
|
||||
docker ps
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv sync --group tests
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
PYTEST_ADDOPTS: "--cov-report=lcov"
|
||||
run: |
|
||||
uv run test
|
||||
|
||||
- name: Upload coverage to Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path-to-lcov: coverage.lcov
|
||||
|
||||
@@ -9,14 +9,12 @@ build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: "3.13"
|
||||
|
||||
# Build documentation in the "docs/" directory with Sphinx
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
# declare the Python requirements required to build your documentation
|
||||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
|
||||
jobs:
|
||||
pre_create_environment:
|
||||
- asdf plugin add uv
|
||||
- asdf install uv latest
|
||||
- asdf global uv latest
|
||||
create_environment:
|
||||
- uv sync --group docs
|
||||
install:
|
||||
- uv run python -m sphinx -T -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
|
||||
|
||||
10
README.rst
10
README.rst
@@ -15,20 +15,20 @@
|
||||
.. image:: https://img.shields.io/pypi/dm/invenio-theme-iform.svg
|
||||
:target: https://pypi.python.org/pypi/invenio-theme-iform
|
||||
|
||||
.. image:: https://img.shields.io/github/tag/tu-graz-library/invenio-theme-iform.svg
|
||||
.. image:: https://img.shields.io/github/tag/Cian-H/invenio-theme-iform.svg
|
||||
:target: https://github.com/Cian-H/invenio-theme-iform/releases
|
||||
|
||||
.. image:: https://img.shields.io/github/license/tu-graz-library/invenio-theme-iform.svg
|
||||
.. image:: https://img.shields.io/github/license/Cian-H/invenio-theme-iform.svg
|
||||
:target: https://github.com/Cian-H/invenio-theme-iform/blob/master/LICENSE
|
||||
|
||||
.. image:: https://readthedocs.org/projects/invenio-theme-iform/badge/?version=latest
|
||||
:target: https://invenio-theme-iform.readthedocs.io/en/latest/?badge=latest
|
||||
|
||||
.. image:: https://img.shields.io/coveralls/mb-wali/invenio-theme-iform.svg
|
||||
:target: https://coveralls.io/r/mb-wali/invenio-theme-iform
|
||||
.. image:: https://coveralls.io/repos/github/Cian-H/invenio-theme-iform/badge.svg?branch=master
|
||||
:target: https://coveralls.io/github/Cian-H/invenio-theme-iform?branch=master
|
||||
|
||||
.. image:: https://img.shields.io/badge/code%20style-Ruff-D7FF64.svg
|
||||
:target: https://github.com/astral-sh/ruff
|
||||
:target: https://github.com/astral-sh/ruff
|
||||
|
||||
I-Form standard theme.
|
||||
|
||||
|
||||
10
docs/conf.py
10
docs/conf.py
@@ -45,8 +45,8 @@ master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = "invenio-theme-iform"
|
||||
copyright = "2020, Graz University of Technology"
|
||||
author = "Graz University of Technology"
|
||||
copyright = "2025, I-Form"
|
||||
author = "I-Form"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -109,8 +109,8 @@ html_theme_options = {
|
||||
"description": "invenio module for I-Form theme.",
|
||||
"github_user": "Cian-H",
|
||||
"github_repo": "invenio-theme-iform",
|
||||
"github_button": False,
|
||||
"github_banner": True,
|
||||
"github_button": True,
|
||||
"github_banner": False,
|
||||
"show_powered_by": False,
|
||||
"extra_nav_links": {
|
||||
"invenio-theme-iform@GitHub": "https://github.com/Cian-H/invenio-theme-iform",
|
||||
@@ -242,7 +242,7 @@ latex_documents = [
|
||||
master_doc,
|
||||
"invenio-theme-iform.tex",
|
||||
"invenio-theme-iform Documentation",
|
||||
"Graz University of Technology",
|
||||
"I-Form",
|
||||
"manual",
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
-e .[docs,tests]
|
||||
@@ -8,4 +8,4 @@
|
||||
|
||||
"""Metadata for this python module."""
|
||||
|
||||
__version__ = "2025.5.20.2"
|
||||
__version__ = "2025.6.3"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
"""invenio module for I-Form theme."""
|
||||
|
||||
from flask import g, has_request_context
|
||||
from flask_login import login_required
|
||||
from invenio_records_marc21.ui.theme import current_identity_can_view
|
||||
|
||||
@@ -34,7 +35,16 @@ class InvenioThemeIform(object):
|
||||
|
||||
@app.context_processor
|
||||
def inject_visibility():
|
||||
return {"can_view_marc21": current_identity_can_view()}
|
||||
def can_view_marc21():
|
||||
try:
|
||||
# Only check if we're in a request context and identity exists
|
||||
if has_request_context() and hasattr(g, "identity") and g.identity:
|
||||
return current_identity_can_view()
|
||||
return False
|
||||
except (AttributeError, RuntimeError):
|
||||
return False
|
||||
|
||||
return {"can_view_marc21": can_view_marc21()}
|
||||
|
||||
app.extensions["invenio-theme-iform"] = self
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ dependencies = [
|
||||
"invenio-config-iform>=2025.5.20.1",
|
||||
"invenio_records_global_search>=0.0.1",
|
||||
"invenio_records_marc21>=0.21.0",
|
||||
"invenio-records-lom>=0.16.0",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
@@ -73,6 +74,13 @@ tests = [
|
||||
"pytest-ruff>=0.4.1",
|
||||
"Sphinx>=4.5.0",
|
||||
]
|
||||
docs = [
|
||||
"invenio-app>=1.3.4",
|
||||
"invenio-previewer>=3.0.0",
|
||||
"invenio-rdm-records>=18.0.0",
|
||||
"invenio-search[opensearch2]>=2.1.0",
|
||||
"Sphinx>=4.5.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling", "hatch-calver"]
|
||||
|
||||
82
uv.lock
generated
82
uv.lock
generated
@@ -1728,7 +1728,8 @@ dependencies = [
|
||||
{ name = "flask-sqlalchemy" },
|
||||
{ name = "invenio-base" },
|
||||
{ name = "sqlalchemy", extra = ["asyncio"] },
|
||||
{ name = "sqlalchemy-continuum" },
|
||||
{ name = "sqlalchemy-continuum", version = "1.3.15", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },
|
||||
{ name = "sqlalchemy-continuum", version = "1.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
|
||||
{ name = "sqlalchemy-utils" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/94/1f/542c73355a6c8f51b6c431676345797b669d749e63f5387d86a1f95f87ab/invenio-db-2.0.0.tar.gz", hash = "sha256:3f2dc12d95fc2febcc2b35cb3b4ec315dd9b3ec43b272a8028b8ba76a4167be3", size = 36105, upload_time = "2024-11-20T20:51:17.761Z" }
|
||||
@@ -2131,6 +2132,43 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/86/7a/b6b5f0090761210805bc674632ff66e42ba4784c0449319fac6ae1719a81/invenio_records_global_search-0.3.3-py2.py3-none-any.whl", hash = "sha256:e8678a4e3fad1a82681bc15e4762fbceb4e3aab53754d18a1e4c857069074d5a", size = 63575, upload_time = "2025-01-24T11:58:11.709Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "invenio-records-lom"
|
||||
version = "0.16.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version == '3.11.*'",
|
||||
"python_full_version < '3.11'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "invenio-previewer", marker = "python_full_version < '3.12'" },
|
||||
{ name = "invenio-rdm-records", marker = "python_full_version < '3.12'" },
|
||||
{ name = "invenio-stats", marker = "python_full_version < '3.12'" },
|
||||
{ name = "sqlalchemy-continuum", version = "1.3.15", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f6/93/0bde36eb294215b16f00878bfece8f228eb9e3aa118481444961cb1e1ce9/invenio-records-lom-0.16.0.tar.gz", hash = "sha256:9eb34beb34e8b0aabee90c5af1e9447676d81047f6d96395f455b84397f426c3", size = 172143, upload_time = "2024-07-05T08:56:11.593Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/ef/3e/518fa9a33c999161fe8a607f6fbd3a620091fb3bb2f6303611395f3f13de/invenio_records_lom-0.16.0-py2.py3-none-any.whl", hash = "sha256:4a9d3fd07e2b1816ed7c196b72cf6f836d66e319d12533bcbcb377730bc6940d", size = 219584, upload_time = "2024-07-05T08:56:09.7Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "invenio-records-lom"
|
||||
version = "0.18.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.12'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "invenio-previewer", marker = "python_full_version >= '3.12'" },
|
||||
{ name = "invenio-rdm-records", marker = "python_full_version >= '3.12'" },
|
||||
{ name = "invenio-stats", marker = "python_full_version >= '3.12'" },
|
||||
{ name = "marshmallow", marker = "python_full_version >= '3.12'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/82/44/c99c74bc4ca3f77540a2cbe3f0a125507be71a58ebafae1b6476a469b159/invenio_records_lom-0.18.2.tar.gz", hash = "sha256:ae0d25e3fb9b34c7bee5515511f03855984eef32796f044e2696c0b5839f4415", size = 180140, upload_time = "2025-05-22T22:21:15.199Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/4e/44/314094313db0a002e1f781b3a1b93cd88d7379129a192371b364eab12e45/invenio_records_lom-0.18.2-py2.py3-none-any.whl", hash = "sha256:bf3d5e30226980c241fdfcdb32598c89c8d281f565432ffbe43d7ab1f5b6d265", size = 237712, upload_time = "2025-05-22T22:21:13.247Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "invenio-records-marc21"
|
||||
version = "0.22.2"
|
||||
@@ -2356,6 +2394,8 @@ dependencies = [
|
||||
{ name = "invenio-i18n" },
|
||||
{ name = "invenio-records-global-search", version = "0.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },
|
||||
{ name = "invenio-records-global-search", version = "0.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
|
||||
{ name = "invenio-records-lom", version = "0.16.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },
|
||||
{ name = "invenio-records-lom", version = "0.18.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
|
||||
{ name = "invenio-records-marc21", version = "0.22.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },
|
||||
{ name = "invenio-records-marc21", version = "0.24.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
|
||||
]
|
||||
@@ -2367,6 +2407,13 @@ dev = [
|
||||
{ name = "pydocstyle" },
|
||||
{ name = "ruff" },
|
||||
]
|
||||
docs = [
|
||||
{ name = "invenio-app" },
|
||||
{ name = "invenio-previewer" },
|
||||
{ name = "invenio-rdm-records" },
|
||||
{ name = "invenio-search", extra = ["opensearch2"] },
|
||||
{ name = "sphinx" },
|
||||
]
|
||||
tests = [
|
||||
{ name = "invenio-app" },
|
||||
{ name = "invenio-previewer" },
|
||||
@@ -2383,6 +2430,7 @@ requires-dist = [
|
||||
{ name = "invenio-config-iform", specifier = ">=2025.5.20.1" },
|
||||
{ name = "invenio-i18n", specifier = ">=1.3.1" },
|
||||
{ name = "invenio-records-global-search", specifier = ">=0.0.1" },
|
||||
{ name = "invenio-records-lom", specifier = ">=0.16.0" },
|
||||
{ name = "invenio-records-marc21", specifier = ">=0.21.0" },
|
||||
]
|
||||
|
||||
@@ -2393,6 +2441,13 @@ dev = [
|
||||
{ name = "pydocstyle", specifier = ">=6.3.0" },
|
||||
{ name = "ruff", specifier = ">=0.11.7" },
|
||||
]
|
||||
docs = [
|
||||
{ name = "invenio-app", specifier = ">=1.3.4" },
|
||||
{ name = "invenio-previewer", specifier = ">=3.0.0" },
|
||||
{ name = "invenio-rdm-records", specifier = ">=18.0.0" },
|
||||
{ name = "invenio-search", extras = ["opensearch2"], specifier = ">=2.1.0" },
|
||||
{ name = "sphinx", specifier = ">=4.5.0" },
|
||||
]
|
||||
tests = [
|
||||
{ name = "invenio-app", specifier = ">=1.3.4" },
|
||||
{ name = "invenio-previewer", specifier = ">=3.0.0" },
|
||||
@@ -4736,13 +4791,34 @@ asyncio = [
|
||||
{ name = "greenlet" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sqlalchemy-continuum"
|
||||
version = "1.3.15"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version == '3.11.*'",
|
||||
"python_full_version < '3.11'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "six", marker = "python_full_version < '3.12'" },
|
||||
{ name = "sqlalchemy", marker = "python_full_version < '3.12'" },
|
||||
{ name = "sqlalchemy-utils", marker = "python_full_version < '3.12'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/cb/cf/4b21e74aff8ec06c362e043db3bb63bdb16ff0e5b5bbe21064fd0651a78b/SQLAlchemy-Continuum-1.3.15.tar.gz", hash = "sha256:a52689d1580daabc496ca8420fa742d62b371bc43921d6c06374192e52e0c409", size = 81279, upload_time = "2023-06-07T01:30:37.9Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/2f/02/581778b566128ea1d6e9e5f1fc833ff47d798cc5a393c0709f74639fb9de/SQLAlchemy_Continuum-1.3.15-py3-none-any.whl", hash = "sha256:d2ecc798500f5d5195ecd2143f7d1eabb0aa46e0f213e38bfeb4331d25cc08d3", size = 45736, upload_time = "2023-06-07T01:30:35.925Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sqlalchemy-continuum"
|
||||
version = "1.4.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.12'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "sqlalchemy" },
|
||||
{ name = "sqlalchemy-utils" },
|
||||
{ name = "sqlalchemy", marker = "python_full_version >= '3.12'" },
|
||||
{ name = "sqlalchemy-utils", marker = "python_full_version >= '3.12'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/05/81/76e0b16ca8575463ba83e014afe8a89443bbc6a896dad3c48068ce571611/sqlalchemy_continuum-1.4.2.tar.gz", hash = "sha256:0fd2be79f718eda47c2206879d92ec4ebf1889364637b3caf3ee5d34bd19c8e3", size = 81713, upload_time = "2024-05-02T20:03:43.192Z" }
|
||||
wheels = [
|
||||
|
||||
Reference in New Issue
Block a user