Skip to content

Commit 58c642c

Browse files
authored
Merge pull request #463 from softwarepub/feature/457-good-init-no-dataverse
Feature/457 good init no dataverse
2 parents cd6673c + 3ee5b96 commit 58c642c

File tree

11 files changed

+343
-152
lines changed

11 files changed

+343
-152
lines changed

docs/source/tutorials/automated-publication-with-ci.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ This also works with many Jupyter Hubs, no need for a Linux computer!
4646
```{code-block} bash
4747
python -m pip install hermes
4848
```
49+
If already installed, make sure you have the latest version by running:
50+
```{code-block} bash
51+
python -m pip install hermes --upgrade
52+
```
4953
5. Once installed, navigate to the main directory of your project.
5054
```{code-block} bash
5155
cd myproject/

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies = [
3939
"pydantic-settings>=2.1.0, <3.0.0",
4040
"requests-oauthlib>=2.0.0, <3.0.0",
4141
"pynacl>=1.6.2, <2.0.0",
42+
"jinja2 (>=3.1.6,<4.0.0)",
4243
]
4344
requires-python = ">=3.11, <4.0.0"
4445

@@ -48,12 +49,10 @@ documentation = "https://hermes.software-metadata.pub"
4849
repository = "https://github.com/softwarepub/hermes.git"
4950
issues = "https://github.com/softwarepub/hermes/issues"
5051

51-
5252
[project.scripts]
5353
hermes = "hermes.commands.cli:main"
5454
hermes-marketplace = "hermes.commands.marketplace:main"
5555

56-
5756
[project.entry-points."hermes.harvest"]
5857
cff = "hermes.commands.harvest.cff:CffHarvestPlugin"
5958
codemeta = "hermes.commands.harvest.codemeta:CodeMetaHarvestPlugin"
@@ -106,22 +105,19 @@ reuse = "^1.1.2"
106105
sphinxcontrib-datatemplates = "~=0.11"
107106

108107

109-
110108
[tool.taskipy.tasks]
111109
docs-build = "poetry run sphinx-build -M html docs/source docs/build -W"
112110
docs-clean = "poetry run sphinx-build -M clean docs/source docs/build"
113111
docs-live = "poetry run sphinx-autobuild docs/source docs/build"
114112
flake8 = "poetry run flake8 ./test/ ./src/ --count --select=E9,F63,F7,F82 --statistics"
115113

116-
117114
[tool.pytest.ini_options]
118115
norecursedirs = "docs/*"
119116
testpaths = [
120117
"test"
121118
]
122119
addopts = "--cov=hermes --cov-report term"
123120

124-
125121
[build-system]
126122
requires = [
127123
"poetry-core>=2.1.3, <3.0.0"

src/hermes/commands/deposit/invenio.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -267,21 +267,6 @@ def __init__(self, command: HermesDepositCommand, ctx: CodeMetaContext, client=N
267267

268268
if client is None:
269269
auth_token = self.config.auth_token
270-
271-
# TODO reactivate this code again, once we use Zenodo OAuth again (once the refresh token works)
272-
# If auth_token is a refresh-token, get the auth-token from that.
273-
# if str(auth_token).startswith("REFRESH_TOKEN:"):
274-
# _log.debug(f"Getting token from refresh_token {auth_token}")
275-
# # TODO How do we know if this targets sandbox or not?
276-
# # Now we assume it's sandbox
277-
# connect_zenodo.setup(True)
278-
# tokens = connect_zenodo.oauth_process() \
279-
# .get_tokens_from_refresh_token(auth_token.split("REFRESH_TOKEN:")[1])
280-
# _log.debug(f"Tokens: {str(tokens)}")
281-
# auth_token = tokens.get("access_token", "")
282-
# _log.debug(f"Auth Token: {auth_token}")
283-
# # TODO Update the secret (github/lab token is needed)
284-
285270
if not auth_token:
286271
raise DepositionUnauthorizedError("No valid auth token given for deposition platform")
287272
self.client = self.invenio_client_class(self.config,

0 commit comments

Comments
 (0)