Skip to content

Commit 7eeb7bf

Browse files
committed
chore: merge branch
2 parents 937f4f9 + 18c307a commit 7eeb7bf

31 files changed

+528
-368
lines changed

.flake8

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# =========================================================== -*- conf-toml -*-
1+
# -*- conf-toml -*-
22
# @file .flake8
33
# @brief Project-wide Flake8 configuration
44
# @created 2022-12-08
@@ -18,7 +18,6 @@
1818
# flake8-implicit-str-concat
1919
# flake8-pie
2020
# flake8_simplify
21-
# =============================================================================
2221

2322
[flake8]
2423
ignore =

.github/workflows/iga.yml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1-
# ====================================================================
2-
# GitHub Actions workflow for InvenioRDM GitHub Archiver version 1.0.3
3-
# This is available as the file "sample-workflow.yml" from the open-
4-
# source repository for IGA at https://github.com/caltechlibrary/iga/.
5-
# ====================================================================
1+
# ╭─────────────────── Notice ── Notice ── Notice ───────────────────╮
2+
# │ This is a custom IGA workflow file. It is different from the │
3+
# │ sample workflow suggested for users because using IGA with IGA │
4+
# │ leads to a chicken-and-egg problem. │
5+
# │ │
6+
# │ DO NOT USE THIS WORKFLOW FOR YOUR OWN SOFTWARE. Instead, use the │
7+
# │ recommended sample workflow for IGA, which is available as the │
8+
# │ file "sample-workflow.yml" from the IGA source repository at │
9+
# │ https://github.com/caltechlibrary/iga/. │
10+
# ╰─────────────────── Notice ── Notice ── Notice ───────────────────╯
611

7-
name: InvenioRDM GitHub Archiver
12+
# This workflow uses the latest copy of IGA in the GitHub development
13+
# branch rather than the copy of IGA on PyPI. This makes it possible
14+
# to release IGA normally and have the latest version of IGA be the
15+
# version that the GHA workflow runs to archive the release in our
16+
# RDM server. (The normal suggested workflow runs the PyPI version.
17+
# If we used *that* version instead of this special version, the
18+
# workflow would end up running the *previous* version of IGA because
19+
# we don't update PyPI until *after* the release is made on GitHub.
20+
# While running the old version is not always a problem, it is if the
21+
# new version has a bug fix or change that we want to take advantage
22+
# of when we send the archive to our RDM server. Running the latest
23+
# version to do our archiving also acts as an additional error check.)
824

925
env:
26+
# 👋🏻 Set the next variable to your InvenioRDM server address 👋🏻
1027
INVENIO_SERVER: https://data.caltech.edu
1128

1229
# Set to an InvenioRDM record ID to mark release as a new version.
@@ -17,41 +34,41 @@ env:
1734
draft: false
1835
all_assets: false
1936
all_metadata: false
20-
debug: false
21-
22-
# ~~~~~~~~~~~~ The rest of this file should be left as-is ~~~~~~~~~~~~
37+
debug: true
2338

39+
name: InvenioRDM GitHub Archiver
2440
on:
2541
release:
2642
types: [published]
2743
workflow_dispatch:
2844
inputs:
2945
release_tag:
3046
description: "The release tag (empty = latest):"
31-
draft:
32-
default: false
33-
description: "Mark the InvenioRDM record as a draft:"
3447
parent_record:
3548
description: "ID of parent record (for versioning):"
3649
community:
3750
description: "Name of InvenioRDM community (if any):"
51+
draft:
52+
description: "Mark the record as a draft"
53+
type: boolean
3854
all_assets:
39-
default: false
40-
description: "Attach all GitHub assets:"
55+
description: "Attach all GitHub assets"
56+
type: boolean
4157
all_metadata:
42-
default: false
43-
description: "Include additional GitHub metadata:"
58+
description: "Include additional GitHub metadata"
59+
type: boolean
4460
debug:
45-
default: false
46-
description: "Print debug info in the GitHub log:"
61+
description: "Print debug info in the GitHub log"
62+
type: boolean
4763

64+
run-name: Archive ${{inputs.release_tag || 'latest release'}} in InvenioRDM
4865
jobs:
4966
run_iga:
5067
name: "Send to ${{needs.get_repository.outputs.server}}"
5168
runs-on: ubuntu-latest
5269
needs: get_repository
5370
steps:
54-
- uses: caltechlibrary/iga@main
71+
- uses: caltechlibrary/iga@develop
5572
with:
5673
INVENIO_SERVER: ${{env.INVENIO_SERVER}}
5774
INVENIO_TOKEN: ${{secrets.INVENIO_TOKEN}}
@@ -62,11 +79,13 @@ jobs:
6279
community: ${{github.event.inputs.community || env.community}}
6380
parent_record: ${{github.event.inputs.parent_record || env.parent_record}}
6481
release_tag: ${{github.event.inputs.release_tag || 'latest'}}
82+
iga_copy: 'git+https://github.com/caltechlibrary/iga@develop'
6583
get_repository:
6684
name: "Get repository name"
6785
runs-on: ubuntu-latest
6886
outputs:
6987
server: ${{steps.parse.outputs.host}}
7088
steps:
71-
- id: parse
89+
- name: Extract name from INVENIO_SERVER
90+
id: parse
7291
run: echo "host=$(cut -d'/' -f3 <<< ${{env.INVENIO_SERVER}} | cut -d':' -f1)" >> $GITHUB_OUTPUT

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# =========================================================== -*- gitignore -*-
21
# @file .gitignore
32
# @brief Files and patterns for files and subdirs that git should ignore
43
# @date 2022-12-08
@@ -18,7 +17,6 @@
1817
#
1918
# A useful starting point for global .gitignore file contents can be found at
2019
# https://github.com/github/gitignore/tree/main/Global (as of 2022-07-14).
21-
# =============================================================================
2220

2321
# Ignore backup files created by our Makefile
2422
# .............................................................................
@@ -35,7 +33,6 @@ __pycache__/
3533
.eggs/
3634
.pytest_cache
3735
.coverage
38-
*.tmp
3936
tests/*.log
4037

4138
# Project-specific things to ignore:
@@ -46,6 +43,7 @@ dist
4643
docs/_build
4744
e.sh
4845
iga/tmp
46+
*.tmp
4947
*.log
5048
fake.txt
5149
debug.out

CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change log for IGA
22

3+
## Version 1.2.0 (2023-07-18)
4+
5+
This version fixes problems with handling Invenio Communities. First, an internal bug in IGA would cause an exception if the user attempted to list communities in an InvenioRDM server that defined more than one community. Second, a bug in InvenioRDM itself meant that community links were broken. (Thanks to @tmorrell for a fix via PR #23.)
6+
7+
Additional changes in this version:
8+
* Switched to using `codemeta.json` as the main source of truth for version info. The `setup.cfg` file is now updated from `codemeta.json`, not the other way around.
9+
* With respect to how the InvenioRDM metadata field `related_identifiers` is handled, the IGA [documentation](https://caltechlibrary.github.io/iga/appendix.html#record-metadata) and the [Google spreadsheet describing how IGA maps fields](https://docs.google.com/spreadsheets/d/1QgFrZIhip1qKA_M45QkeYe9SH238XL1K/edit?usp=sharing&ouid=111701691832013929970&rtpof=true&sd=true) both omitted the use of CodeMeta fields `downloadUrl` and `installUrl` and CFF field `repository-artifact`. These fields are now in the documentation.
10+
* The Makefile has been updated in various ways based on experiences with other projects.
11+
12+
313
## Version 1.1.0 (2023-05-31)
414

515
New features:

CITATION.cff

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
cff-version: 1.2
22
message: "If you use this software, please cite it using these metadata."
33
title: "InvenioRDM GitHub Archiver (IGA)"
4+
abstract: "The InvenioRDM GitHub Archiver (IGA) automatically archives GitHub releases in an InvenioRDM repository."
45
authors:
56
- family-names: Hucka
67
given-names: Michael
78
affiliation: "Caltech Library"
89
orcid: "https://orid.org/0000-0001-9105-5960"
9-
version: "1.1.0"
10-
abstract: "The InvenioRDM GitHub Archiver (IGA) lets you automatically archive GitHub releases in an InvenioRDM repository."
11-
repository-code: "https://github.com/caltechlibrary/iga"
12-
type: software
10+
version: "1.2.0"
11+
date-released: "2023-07-18"
12+
doi: 10.22002/609yn-s5391
1313
url: "https://caltechlibrary.github.io/iga"
14+
repository-code: "https://github.com/caltechlibrary/iga"
1415
license-url: "https://github.com/caltechlibrary/iga/blob/main/LICENSE"
16+
type: software
1517
keywords:
1618
- "archiving"
1719
- "archives"
@@ -28,4 +30,3 @@ keywords:
2830
- "GitHub"
2931
- "GitHub Actions"
3032
- "GitHub Automation"
31-
date-released: "2023-06-02"

0 commit comments

Comments
 (0)