Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to allow bulk importing jats zip files. #89

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

ajrbyers
Copy link
Member

@ajrbyers ajrbyers commented Feb 7, 2024

No description provided.

@ajrbyers ajrbyers closed this Feb 27, 2024
@mauromsl mauromsl reopened this Mar 5, 2024
@mauromsl mauromsl closed this Mar 5, 2024
@mauromsl mauromsl reopened this Mar 5, 2024
Comment on lines 72 to 84
to_notify = models.AutomatedImportNotification.objects.all()
request = Request()
press = pm.Press.objects.first()
request.press = press
request.site_type = press
request.repository = None

for n in to_notify:
n.send_notification(
[os.path.basename(z) for z in zip_files],
all_errors,
request,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notification behaviour should be behind a command line argument, as this might not be desireable in certain import scenarios (e.g. uploading back content from another platform)

successes.append(
f'Imported {article}',
)
call_command('register_crossref_doi', article[1].pk)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOI registration behaviour should be behind a command line argument, as this might not be desireable in certain import scenarios (e.g. uploading back content from another platform)

persist=persist,
)

for article in articles:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOIs can be registered in bulk for a given issue, which should reduce the load on Crossref end, as well as speed up the import procedure when each issue has multiple articles

Copy link
Member

@mauromsl mauromsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be quite a useful command, I added a few comments inline.
It is also probably worth deprecating the older command import_jats_zip to avoid code duplication. This command could either iterate a directory of zipped files or handle a single issue zip at the entrypoint.

@joemull
Copy link
Member

joemull commented Mar 13, 2024

@ajrbyers I just came across this in clearing out my notifications. I'm guessing it's new functionality needed for recent migrations, is that right? Should we add it to the 1.6 board?

@joemull
Copy link
Member

joemull commented Mar 13, 2024

Oh is it related to #90?

@ajrbyers ajrbyers marked this pull request as draft March 13, 2024 16:14
@ajrbyers
Copy link
Member Author

I’ve converted this to a draft for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants