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

DD-1563 Some improvement points to the dd-manage-deposits #8

Merged

Conversation

aliassheikh
Copy link
Contributor

@aliassheikh aliassheikh commented Jun 30, 2024

Fixes DD-1563 Some improvement points to the dd-manage-deposits

Description of changes

  • Avoid exception where possible and replace them with logger Errors
  • Return meaningful Responses to clients (Success-ed of Failed + reason)
  • Check and when need give Error when a deposit.proerties file is directly placed/created in one of the base service folders (see module config file)
    • Unit test this change
  • Update usage

How to test

  • Starting vagrant

    • start-preprovisioned-box.py -s dev_archaeology
    • deploy.py -m dd-manage-deposit dev_archaeology
  • Deposit vaild/invalid datasets using

    • cd to local folder: ~/git/dans-core-systems/modules/dd-dans-sword2-examples
    • run example: ./run-simple-deposit.sh https://dev.sword2.archaeology.datastations.nl/collection/1 user001 user001 src/main/resources/example-bags/valid/audiences
  • Testing a dataset with multiple deposit.properties files (only one database record should be created)

    • Unzip attached '14547798/c15ee79c-d6e3-46d0-aa63-bf8ea23fd310.zip' to local vagrant 'shared' folder
    • In the Terminal open vagrant ssh (vagrant ssh dev_archaeology)
    • Copy the unzipped folder to '/var/opt/dans.knaw.nl/tmp/sword2-uploads'. For example:
      • `cp -r /vagrant/provisioning/shared//c15ee79c-d6e3-46d0-aa63-bf8ea23fd310/ /var/opt/dans.knaw.nl/tmp/sword2-
    • uploads`
  • Looking at the results:

    • in the terminal:
      • open vagrant ssh (vagrant ssh dev_archaeology)
      • tree -L 5 /var/opt/dans.knaw.nl/tmp or tree -L 6 /var/opt/dans.knaw.nl/tmp`
    • Reports:
      • in the terminal: curl 'accept: text/csv' http://dev.sword2.archaeology.datastations.nl:20355/report
      • in the firefox browser: http://dev.sword2.archaeology.datastations.nl:20355/report
      • in vagrant box: cd /home/dd-manage-deposit
        • Check the user001.csv file

Related PRs

(Add links)

Notify

@DANS-KNAW/core-systems

@aliassheikh aliassheikh requested a review from a team as a code owner June 30, 2024 18:03
@janvanmansum janvanmansum merged commit bc5fbbd into DANS-KNAW:master Jul 2, 2024
4 checks passed
@aliassheikh aliassheikh deleted the DD-1563-improvement-points branch October 25, 2024 13:36
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.

2 participants