Skip to content

More hotfixes for cli command #823

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

Merged
merged 4 commits into from
May 29, 2025
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
4 changes: 4 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ help:

.PHONY: help Makefile

# Custom html target that builds directly into build directory
html:
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
2 changes: 1 addition & 1 deletion docs/source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Tests](https://github.com/mesh-research/knowledge-commons-works/actions/workflows/tests.yml/badge.svg)
![Container build](https://github.com/mesh-research/knowledge-commons-works/actions/workflows/CI.yml/badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)

![KCWorks logo](../../static/images/kc_works_logos/SVG/kc_works_logo_wordmark.svg)

Expand Down
1 change: 1 addition & 0 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
## 0.5.2 (2025-05-29)

- Added a new CLI command to allow admins to bulk update a single metadata field to a single new fixed value for every record in a collection.
- Added public roadmap to the documentation.

## 0.5.1 (2025-05-13)

Expand Down
1 change: 1 addition & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
README.md
feature_highlights.md
changelog.md
roadmap.md
known_issues.md
admin_guide/index.md
setup/index.md
Expand Down
28 changes: 28 additions & 0 deletions docs/source/roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Development Roadmap

This is a list of features and improvements that we are planning for the coming months, based on our users' needs and feedback from our community. These priorities and timelines are **tentative and subject to change**, but this is our current working plan.

Is there something you'd like to see in a future release? Let us know at [https://support.hcommons.org/contact-us/](https://support.hcommons.org/contact-us/) or by emailing [hello@hcommons.org](mailto:hello@hcommons.org).

| Quarter | New Features | Maintenance and Infrastructure |
| ------- | ------------ | ------------------------------ |
| Q2 2025 | **Statistics dashboards** for collections and for KCWorks as a whole | Improvements to search results when looking up users, languages, and subjects |
| | **Mixed-access collections** (where some records are restricted-access and some are open) | Expanding automated test suite |
| Q3 2025 | **"White label" collection pages** for member organizations (using organization-specific branding and theme). | Clean up implementation of less common resource types and metadata fields |
| | Integration with **new authentication and identity management** system to support single sign-on for member organizations. | Further expand automated test suite |
| | **Child collections** (hierarchical sub-collections) | Fully automate deployment of new releases |
| | **Globus integration** for very large datasets stored in external data stores. | |
| | Enable **Google Scholar indexing** for works | |
| | **Bepress migration tool** for institutions that are migrating from Bepress to KCWorks | |
| Q4 2025 | **On-campus access restrictions** for member organizations. | Upgrade to new version of InvenioRDM (the underlying platform for KCWorks) |
| | **Notification improvements** for collection curators (collected curator inbox, digest email notifications, etc.) | Further expand automated test suite |
| | **Typeahead search** for users in the upload form's creator field | |
| | **Automatically place org members' uploaded works** in their org's collection | |
| | Self-serve **OAuth token management** for API access | |
| Q1 2026 | **Short upload-form path** and **back-end autosave** for draft works | |
| | **Malware scanning** of uploaded files | |
| | **Github integration** for works | |
| | **Mobile version** of upload form | |
| Q2 2026 | Improved **year/volume/issue navigation** for journal collections | |
| | Improved **content flagging and moderation** | |
| | **COAR Notify** support | |
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ kcworks = "kcworks.services.search.index_templates.templates:get_index_templates
[project.entry-points."flask.commands"]
kcworks-users = "kcworks.cli:kcworks_users"
kcworks-index = "kcworks.cli:kcworks_index"
kcworks-records = "kcworks.cli:kcworks_records"

[project.scripts]
kcworks-users = "kcworks.cli:kcworks_users"
kcworks-index = "kcworks.cli:kcworks_index"
kcworks-records = "kcworks.cli:kcworks_records"

[tool.ruff]
line-length = 88
Expand Down
10 changes: 8 additions & 2 deletions site/kcworks/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import click
from flask.cli import with_appcontext
from invenio_search.cli import abort_if_false, search_version_check
from kcworks.services.records.cli import kcworks_records as records_command
from kcworks.services.records.cli import bulk_update as bulk_update_command
from kcworks.services.search.indices import delete_index
from kcworks.services.users.cli import group_users as group_users_command
from kcworks.services.users.cli import groups as groups_command
Expand Down Expand Up @@ -109,5 +109,11 @@ def destroy_indices(force):
bar.label = name


@click.group()
def kcworks_records():
"""KCWorks CLI utility commands for record management."""
pass


# Register the records command group
kcworks_users.add_command(records_command)
kcworks_records.add_command(bulk_update_command)
8 changes: 1 addition & 7 deletions site/kcworks/services/records/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
from kcworks.services.records.bulk_operations import update_community_records_metadata


@click.group()
def kcworks_records():
"""CLI utility command group for record operations."""
pass


@kcworks_records.command("bulk-update")
@click.command("bulk-update")
@click.argument("community_id", type=str, required=True)
@click.argument("metadata_field", type=str, required=True)
@click.argument("new_value", type=str, required=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/test_kcworks_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from invenio_access.permissions import system_identity
from invenio_rdm_records.proxies import current_rdm_records_service
from kcworks.services.records.cli import kcworks_records
from kcworks.cli import kcworks_records


@pytest.fixture(scope="module")
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading