-
Notifications
You must be signed in to change notification settings - Fork 0
Releases: GeoinformationSystems/optimap
v0.25.0
[0.25.0] - 2026年06月12日
Added
- Add Ruff code formatter with enforcement via test suite and CI (#70). Configuration in
pyproject.toml(line length 119, rules E/F/I). VSCode format-on-save via.vscode/settings.json; PyCharm via the Ruff plugin.
Changed
-
EO4GEO BoK upgraded to
currentversion (GeoSpaceBoK, 1,212 concepts). The defaultOPTIMAP_BOK_VERSIONis nowcurrentinstead of the pinnedv3snapshot. Thecurrentversion is served by geospacebok.eu and adds 327 concepts compared to v3, including a heavily expanded GC3 AI/ML hierarchy (6 → 52 codes, e.g.GC3-11-2Space-time dynamic reasoning) and a new top-levelGNcategory for GNSS concepts (~277 sub-codes).OPTIMAP_BOK_CONCEPT_BASE_URLdefault updated fromhttp://bok.eo4geo.eutohttps://geospacebok.eu; concept chips now link tohttps://geospacebok.eu/<CODE>. The--versionflag onrefresh_bok_snapshothas been renamed to--bok-versionto avoid conflict with Django's built-in--versionflag. -
Richer
GET /api/v1/sources/andGET /api/v1/sources/<id>/responses (partial #247). Each source now includessource_type,source_type_display,homepage_url,abbreviated_title,is_oa,is_preprint,source_url(absolute API self-link), andcollection(identifier + name + API URL of the default collection, ornull). The endpoint is nowAllowAny(wasIsAuthenticatedOrReadOnly— the data was already public). The embeddedsource_detailsblock in Work API responses is updated to match. -
Global data dumps (GeoJSON / GeoPackage / CSV) now include meaningful source and collection references (partial #247). The raw integer
sourceFK has been replaced withsource_name(human-readable name) andsource_url(absolute API endpoint for the source). A newcollectionsfield lists the collection identifiers each work belongs to. Internal fields that are meaningless to data consumers —job,created_by,updated_by,status,creationDate,lastUpdate,provenance,openalex_match_info,openalex_fulltext_origin,openalex_ids— have been removed from the dump. GeoPackage and CSV are derived from the improved GeoJSON viaogr2ogrand pick up these changes automatically. This is a breaking change for existing consumers that rely on the removed columns or onsourcebeing an integer. -
All outgoing emails now use file-based Django templates (closes #110). Email bodies and subjects are stored in
works/templates/email/*.en.txt— one file per email type (12 templates total). Subject lines are on the first line of each template; a blank line separates them from the body. Every subject now carries a[OPTIMAP]prefix and a relevant emoji. Autoescape is disabled for plain-text output so URLs are never HTML-encoded. Future language variants drop in as*.de.txtetc. with no code changes required. Missing content assertions for the magic-link, email-change, and account-deletion emails were added as part of this change. -
Login, logout, and email-change flows now redirect to
/with a flash message instead of rendering dedicated single-alert pages. Removedlogin_response.html,logout.html,changeuser.html, and deaddeleteaccount.htmltemplates; removed corresponding deaddelete_accountview. Login and email-change messages useextra_tags="persist"so they stay visible until manually dismissed. -
Per-message auto-close TTL for flash alerts. Pass
extra_tags="persist"to anymessages.*()call to suppress auto-close entirely;errorandwarninglevel messages default to 8 s,info/successto 5 s (previously all server-rendered alerts shared a single 5 s timeout).OPTIMAP_FLASHJS alerts forwarningnow also get 8 s to match. The Bootstrap level tag (alert-dangeretc.) is now derived frommessage.level_tagrather than the combinedmessage.tagsstring, soextra_tagsvalues no longer bleed into the CSS class. -
Client-side geometry simplification for oversized polygons. When an NER/gazetteer-suggested polygon exceeds the configurable warn threshold (default 50 KB), a simplification panel appears below the map instead of silently failing. The panel shows a logarithmic tolerance slider (0.01°–1°, covering ~1–111 km) with before/after point-count and size stats and a live Leaflet preview that updates as the slider moves. Three preset buttons (Light ~1 km / Medium ~11 km / Aggressive ~55 km) snap the slider to common values. At submit time, payloads above the hard limit (default 2 MB) are blocked and the panel is shown again. Both thresholds are server-configurable via
OPTIMAP_GEOMETRY_WARN_SIZE_KBandOPTIMAP_GEOMETRY_MAX_UPLOAD_KB. Simplification uses Leaflet's built-inL.LineUtil.simplify()(Ramer–Douglas–Peucker) with no additional JS dependency.
Added
-
Configurable notification intervals for regional subscriptions (closes #85). Users can now choose between weekly (every Monday) and monthly (last day of month) email notifications on the subscriptions page. The selected interval is stored per subscription; existing subscribers default to monthly. Notifications now only include works published since the last successful notification, fixing a bug where the same papers were re-sent on every run.
-
Georeferencing game (closes #14). A "Play" button in the top navbar and the burger menu sends users to
/contribute/next/, which picks a random work still needing geolocation and redirects to its landing page in game mode. After each contribution, the page auto-advances to the next challenge instead of reloading. A game banner shows how many works have been georeferenced in the current session, with a "Skip to next" button. The NER location-suggestion panel opens and runs automatically in game mode so place suggestions are ready immediately. Game can be scoped to a single collection via?collection=<identifier>. A "Play georeferencing game" button also appears on/contribute/(and collection-filtered variants). Contributions made through the game are markedgame: truein the work's provenance event log. A "Play" button is now shown next to the "Contribute metadata" button on collection landing pages, starting the georeferencing game scoped to that collection. -
Chunked map loading with lazy popup details (closes #256). The main map now loads works in configurable pages (default 1 000,
OPTIMAP_MAP_CHUNK_SIZE) instead of one ~9 MB request; each chunk is rendered immediately so markers appear progressively. Initial chunks carry only geometry and minimal metadata (id, title, doi, status) via?minimal=true; full work details (abstract, source, OpenAlex fields) are fetched once fromGET /api/v1/works/<id>/the first time a popup is opened and cached for the session. A loading indicator shows progress (Loading works... N / M). Both the single-feature popup and the paginated overlapping-works popup share the same lazy-load mechanism. -
Link headers on paginated API responses (RFC 5988). All paginated endpoints (
/api/v1/works/,/api/v1/sources/, etc.) now emit aLink:response header withrel="next",rel="prev",rel="first", andrel="last"URLs, following the same convention as the GitHub REST API. -
GET /api/v1/statistics/— cached aggregate counts (partial #160). Returnspublished_works,total_works,total_works_for_user(auth-aware:published_worksfor anonymous/non-staff,total_worksfor staff — matches what/api/v1/works/returns for the caller),works_by_status(per status code),with_geometry,with_temporal,with_complete_metadata,complete_percentage,sources,collections,users. Cached for 24 h. No authentication required;works_by_statusis always included so harvested-work counts are public. -
GeoScienceWorld as a new harvesting source type (closes #251). A new
geoscienceworldsource type enumerates articles from Crossref by DOI prefix and extracts geographic coordinates from each article's GSW landing page via geoextent's built-in GeoScienceWorld content provider (which handles Cloudflare viacurl_cffi). Three initial source configs are provided inharvest_sources.py: SEG (prefix10.1190), Geological Society of London (10.1144), and Mineralogical Society (10.1180). TheSourcemodel gains a newdoi_prefixfield used by bothcrossref-prefixandgeoscienceworldharvesters, replacing the hardcoded10.5194Copernicus fallback in the Crossref harvester. Temporal/epoch extraction from GeoRef metadata is deferred pending nuest/geoextent#122; tracked in #257. -
Pagination on collection detail pages (
/collections/<slug>/). Collections with more thanOPTIMAP_PAGE_MAX_ITEMSworks (default 50) now show paginated work cards with configurable page size and first/prev/next/last navigation, replacing the previous hard cap of 100 with a static "showing first N" alert. A "Show only page on map" / "Show all on map" toggle button appears above the map; choosing "show all" fetches the full collection GeoJSON once and caches it insessionStorageso subsequent page navigations are instant. Introduces a newOPTIMAP_PAGE_MAX_ITEMSsetting (default 50) used by all paginated list views; the previousOPTIMAP_WORKS_PAGE_SIZE_DEFAULTremains as a fallback for backward compatibility. Pagination nav markup and the page-size dropdown are now shared via_pagination.html/_pagination_nav.htmltemplate includes, replacing duplicated blocks inworks.htmlandcontribute.html; the default page size (50) is now always present as a selectable option. -
NER-based location suggestions on the work contribution form (closes #199). A collapsible "Suggest locations from text" panel on the work landing page runs spaCy Named Entity Recognition on the work's title and abstract (two parallel API calls), looks up found place n...