ICSAC commited on
Commit
172c337
·
1 Parent(s): 43d2758

Release: operator hints take the website checkout from config

Browse files

The curator notices for a held publication print the checkout from
config.ICSAC_WEBSITE_REPO (a placeholder when it is unset) instead of a fixed
path, and the Crossref test probe prints its own checkout. Comments no longer
point to notes kept outside the repository.

action.py CHANGED
@@ -405,7 +405,7 @@ def register_accepted_paper(record_id: str) -> None:
405
  notify.send_to_curator(
406
  f"READY TO PUBLISH (held for your approval): accepted record {record_id}; its "
407
  f"/publications entry is saved at {path}. Nothing was published. To publish it: "
408
- f"ICSAC_PUBLISH_APPROVED=1 ICSAC_WEBSITE_REPO=~/Desktop/icsac/icsacinstitute.org "
409
  f"python3 -c 'import action; action.register_accepted_paper(\"{record_id}\")'",
410
  parse_mode=None)
411
  except Exception as exc:
 
405
  notify.send_to_curator(
406
  f"READY TO PUBLISH (held for your approval): accepted record {record_id}; its "
407
  f"/publications entry is saved at {path}. Nothing was published. To publish it: "
408
+ f"ICSAC_PUBLISH_APPROVED=1 ICSAC_WEBSITE_REPO={getattr(config, 'ICSAC_WEBSITE_REPO', '') or '<website checkout>'} "
409
  f"python3 -c 'import action; action.register_accepted_paper(\"{record_id}\")'",
410
  parse_mode=None)
411
  except Exception as exc:
intake/intake_server.py CHANGED
@@ -198,8 +198,7 @@ def _resolve_tier(orcid: str, tier_header: str | None) -> int:
198
  return 3
199
  return 1
200
  # DOI mode supports Zenodo + arXiv. Crossref + DataCite generic support is
201
- # the next gap. See the code below for the resolver
202
- # routing logic. Worker dispatches on these regexes via ingest.is_arxiv_ref.
203
  ZENODO_DOI_RE = re.compile(r"^10\.5281/zenodo\.\d+$", re.IGNORECASE)
204
  ARXIV_REF_RE = re.compile(
205
  r"^(?:10\.48550/arXiv\.)?\d{4}\.\d{4,5}(?:v\d+)?$", re.IGNORECASE
 
198
  return 3
199
  return 1
200
  # DOI mode supports Zenodo + arXiv. Crossref + DataCite generic support is
201
+ # the next gap. The worker dispatches on these regexes via ingest.is_arxiv_ref.
 
202
  ZENODO_DOI_RE = re.compile(r"^10\.5281/zenodo\.\d+$", re.IGNORECASE)
203
  ARXIV_REF_RE = re.compile(
204
  r"^(?:10\.48550/arXiv\.)?\d{4}\.\d{4,5}(?:v\d+)?$", re.IGNORECASE
intake/scripts/crossref-test-probe.sh CHANGED
@@ -19,7 +19,7 @@ body=$(printf 'url = "https://test.crossref.org/servlet/login?usr=%s/%s&pwd=%s"\
19
  code=$(echo "$body" | tail -1)
20
  if [ "$code" = "200" ] && ! echo "$body" | grep -qi "wrong credentials"; then
21
  echo "$(date -u +%FT%TZ) GREEN"
22
- ping "Crossref TEST now accepts the password (HTTP 200). Next: cd ~/Desktop/icsac/editorial-system && intake/register-doi.sh <sub_id> (TEST deposit, nothing public). If that reads Success, --live is yours when you decide."
23
  date -u +%FT%TZ > "$DONE"; exit 0
24
  fi
25
  echo "$(date -u +%FT%TZ) still $code"
 
19
  code=$(echo "$body" | tail -1)
20
  if [ "$code" = "200" ] && ! echo "$body" | grep -qi "wrong credentials"; then
21
  echo "$(date -u +%FT%TZ) GREEN"
22
+ ping "Crossref TEST now accepts the password (HTTP 200). Next: cd $REPO && intake/register-doi.sh <sub_id> (TEST deposit, nothing public). If that reads Success, --live is yours when you decide."
23
  date -u +%FT%TZ > "$DONE"; exit 0
24
  fi
25
  echo "$(date -u +%FT%TZ) still $code"
publish_watcher.py CHANGED
@@ -1,8 +1,8 @@
1
  """Poll staged-draft Zenodo deposits for publish-status transitions.
2
 
3
  PDF-route ICSAC submissions stage a draft Zenodo deposit on accept but
4
- NEVER auto-publish (minted DOIs are
5
- permanent, the operator publishes manually). This module provides the
6
  inverse poll: scan the on-disk submission state, hit Zenodo per-draft to
7
  check whether the operator has published, and on transition:
8
 
@@ -311,7 +311,7 @@ def poll_drafts() -> dict:
311
  msg = (f"READY TO PUBLISH (held for your approval): {sub_id} is live on Zenodo "
312
  f"(DOI {deposit_doi or 'unknown'}); its /publications entry is saved at "
313
  f"{held.ready_path}. Nothing was published and the author was not told. "
314
- f"To publish it: ICSAC_PUBLISH_APPROVED=1 ICSAC_WEBSITE_REPO=~/Desktop/icsac/icsacinstitute.org "
315
  f"python3 publish_watcher.py")
316
  try:
317
  import notify
 
1
  """Poll staged-draft Zenodo deposits for publish-status transitions.
2
 
3
  PDF-route ICSAC submissions stage a draft Zenodo deposit on accept but
4
+ NEVER auto-publish (minted DOIs are permanent, so the operator publishes
5
+ manually). This module provides the
6
  inverse poll: scan the on-disk submission state, hit Zenodo per-draft to
7
  check whether the operator has published, and on transition:
8
 
 
311
  msg = (f"READY TO PUBLISH (held for your approval): {sub_id} is live on Zenodo "
312
  f"(DOI {deposit_doi or 'unknown'}); its /publications entry is saved at "
313
  f"{held.ready_path}. Nothing was published and the author was not told. "
314
+ f"To publish it: ICSAC_PUBLISH_APPROVED=1 ICSAC_WEBSITE_REPO={getattr(config, 'ICSAC_WEBSITE_REPO', '') or '<website checkout>'} "
315
  f"python3 publish_watcher.py")
316
  try:
317
  import notify