All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- DSpace 10 support: Added
10.0to the supported-version registry (dspace_client/versions.py), mapped to thedspace-10_xRestContract branch, and declared10.0in theTARGET_VERSIONSof all applicable example scripts. Verified end-to-end againstdemo.dspace.org(now DSpace 10.1): authentication, full CRUD (community/collection/item/bundle/bitstream), statistics view events, discovery search, item/bundle/bitstream/format reads, the submitter endpoint, and group/EPerson management all work unchanged. The DSpace 9 -> 10 REST contract diff is additive only (newauditevents,edititems,edititemmodes,securitysettingsendpoints and newfindEditAuthorized/findAddAuthorized/findByCustomURLsearch methods); no endpoint our examples use changed. - Licensing: Atmire copyright notice in
LICENSE; newNOTICEandTHIRD_PARTY_LICENSES.mdfor attribution and dependency license tracking.
- RestContract branch mapping: Re-pointed
9.0frommainto the stabledspace-9_xbranch, sincemainnow tracks DSpace 10 after its release.bleeding-edgecontinues to trackmain.
dspace-docs fetch 8.0: Re-pointed8.0from the non-existentdspace-8.0ref to thedspace-8_xbranch (the RestContract repo renamed its 8.x branch), so fetching DSpace 8 docs works again.
- Adaptive concurrency:
AdaptiveSemaphoreramp-up now releases pre-held permits;BatchItemCreatorreuses the live adaptive semaphore;should_ramp_downcomputes throughput from timestamps; removed brokenAdaptiveDelayControllercontext manager. - Version validation:
_requestpasses explicit method names so the compatibility matrix is consulted correctly. - Request retries: Tenacity retries now use
retry_if_exception, honormax_retries, and retry on retryableDSpaceAPIErrorstatus codes (429/502/503/504). - Error handling: Failed API responses log truncated bodies via
logger.warninginstead of dumping response headers to the console;is_session_validno longer catches bareException. - Docs fetcher: Cache directory is anchored to the project root; git subprocess calls use timeouts; shallow clones update with
git fetch --depth 1; duplicateget_repo_statusremoved; timestamps use UTC. - Version lists:
dspace_client/versions.pyis the single source of truth for supported versions and RestContract branch mapping (includes 7.1–7.5 keys). - Persistent caches: CSV and
last_until.jsonwrites are atomic (temp file +os.replace). - OAI parsing: Uses
defusedxmlfor safer XML parsing of OAI-PMH responses. create_validated_client: Forwardstimeoutto both auth and REST clients; adds opt-infetch_docsandshow_atmire_promoflags (promo no longer shown by default).
managed_client: Async context manager that authenticates and always closes the auth session infinally.CONTRIBUTING.md: Setup, test, lint, and PR expectations.
- Examples:
basic_usage.py,bulk_import.py, andadvanced_auth.pyusemanaged_clientortry/finallyfor reliable session cleanup; full-text-finder demo credential check uses exact hostname match. search_items: Validates filter tuple shape with a clearTypeError;sort=Noneomits the sort parameter.- Tooling: Library
NullHandler, removed obsolete pytestevent_loopfixture, updatedpyproject.tomlURLs, ruff auto-fixes across library/tests/examples.
-
Atmire promo: Opt-in only via
show_atmire_promo=True;auth.close()shows the thank-you panel only after successful authentication when promo was enabled. -
link_author_authorities: Split intoexamples/link_author_authorities/package (orcid,scoring,state,session,process,main); root script is a thin runner. -
Tests: Added
test_docs.py,test_init.py; expanded factory and docs fetcher coverage. -
BatchItemCreator (
create_items_batch): optionalon_metrics_samplecallback — invoked whenever batch progress metrics are printed (every 50 completed items and at the end), with(completed, total, PerformanceMetrics)for time-series / degradation reporting. -
examples/seed — MegaSpace (
megaspace.py): declares DSpace 9.0;verify_server_versionruns by default (use--skip-version-checkto skip); courtesy delay between REST calls (prompt default 1.0 s, or--courtesy-delay); slow-request logging (threshold 2 s) with end-of-run table; Rich progress for sequential mega-bitstream uploads; optional diagnostics export toYYYY-MM-DD-HH.MM-megaspace-{hostname}-raw.jsonand-readable.md(UTC time in filename; payload includes config, samples, degradation hints);.gitignorepatterns for those exports. -
examples/seed — MiniSpace /
connect_seed_client: target 9.0, version check on by default,--skip-version-check;connect_seed_clientacceptscourtesy_delayandslow_request_*passthrough toDSpaceClient. -
dspace_client.auth: Failure-only structured logging (
WARNING/ optionalDEBUGondspace_client.auth) for CSRF, JWT refresh, login, and verify failures. -
tests:
test_link_author_orcid_normalize.py; auth tests forrefresh_jwt,ensure_session, and CSRF cookie fallback. -
.gitignore: ignore
link_author_authorities_*.logandlink_author_authorities_state.jsonl.
- DSpaceAuthClient: Proactive session refresh prefers JWT refresh (
POST /authn/loginwithAuthorization: Bearer+X-XSRF-TOKEN) before full CSRF + password login, avoiding fragileGET /security/csrfon long runs when proxies stripDSPACE-XSRF-TOKEN.ensure_sessiontreats “no prior auth” as_last_auth_time is None(not falsy0.0). - DSpaceAuthClient: If
GET /security/csrfomits the header, CSRF value may be taken fromDSPACE-XSRF-COOKIEin the httpx jar. - examples/link_author_authorities: ORCID mode — parse checksum
X,www.orcid.orgURLs, and vocabulary metadataperson.identifier.orcid/dc.identifier.uri; resolve via vocabularyentryID, hyphenated + compact filters, then first-four-digit pagination; fetch entry detail only when list metadata lacks ORCID; dim progress during broad scan.
- dspace_client.promo: Session-end only — one non-blocking Rich panel when
DSpaceAuthClient.close()runs (thank-you line, rotating Did you know, https://www.atmire.com). Session-start messaging and the session-end browser prompt are removed;DSPACE_CLIENT_DISABLE_ATMIRE_BROWSER_PROMPTandis_atmire_browser_prompt_disabledare removed.show_atmire_promo_startremains exported as a no-op for compatibility. Disable all promo output withDSPACE_CLIENT_DISABLE_ATMIRE_PROMO=1. - examples/seed/megaspace.py:
--collectionsmust be at least 2 (argparse validation with a clear error). The full MegaSpace scenario assumes two collections (e.g. mega-metadata vs mega-bitstreams owning collections). - docs/API_GOTCHAS.md: Notes on session refresh behavior and enabling auth diagnostics.
- DSpaceAuthClient: Complete authentication flow (CSRF → Login → JWT)
- DSpaceClient: Main API client with version validation
- BatchItemCreator: High-performance bulk operations
- ConcurrencyController: Adaptive concurrency control
- RestContractFetcher: Git-based documentation management
- VersionCompatibility: Multi-version compatibility checking
- Communities (create, delete)
- Collections (create, delete)
- Items (create, delete)
- Bundles (create)
- Bitstreams (upload, delete)
- EPeople (create, delete, add to groups)
- Groups (create, delete, add subgroups)
- Collection default groups (item read, bitstream read)
- Statistics (view events)
- Comprehensive README with examples
- Quick start guide
- API reference
- Error handling guide
- Version compatibility documentation
- Basic usage example
- Bulk import example
- Advanced authentication example
- Unit tests for authentication
- Unit tests for core client
- Test fixtures and configuration
- Mock-based testing for HTTP operations
- Initial development release
- Core package structure
- Basic functionality implementation
- Documentation and examples
- Test suite foundation
- Python 3.11+ support
- Async/await throughout
- Type hints for better IDE support
- Rich console output
- Git-based documentation fetching
- Version compatibility validation
- Comprehensive error handling
- Adaptive concurrency control
- Batch operations support