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

Issue_609 #645

Closed
wants to merge 1 commit into from
Closed

Issue_609 #645

wants to merge 1 commit into from

Conversation

jj105
Copy link
Contributor

@jj105 jj105 commented Feb 15, 2020

issue

#609

@jj105
Copy link
Contributor Author

jj105 commented Feb 15, 2020

I edited code but didn't have enough test since I don't have sample database.

If I the issue is fixed as you wish, there'll be no problem.
but if it isn't fixed yet, can you please give me sample db dump file so that I can test it on my machine?

I think fixing this issue will not exceed an hour once I have db dump file.
Thank you.

@jj105 jj105 requested a review from shnizzedy February 15, 2020 00:37
@shnizzedy
Copy link
Member

shnizzedy commented Feb 17, 2020

but if it isn't fixed yet, can you please give me sample db dump file so that I can test it on my machine?

Permissions are set at the applet level (that's the main purpose of the applet structure), so it would be a job to build an applet on one server and allow a user on a different server access. It would be much simpler for you to either use the GUI to test your own local version or write a test to test your code. An overview of each option below.

Use the GUI

  1. Follow the Requirements and Installation instructions in the README to get a local MongoDB instance connected to a local instance of Girder for MindLogger serving on localhost:8080. The terminal running girderformindlogger serve will echo live logs.
    live logging in 8 terminal
  2. Navigate to admin.mindlogger.org.
  3. Choose localhost (localhost:8080) from the "Select Your Server" dropdown. Click "Continue."
    create_account
  4. Click "Create Account," and fill in the fields to create a new account. Click "Continue."
  5. Click the ⊕ in the bottom right. Choose "MindLogger Demo" from the "Quick Add" links. Click "Add." Wait for the protocol to load and the applet to be created.
  6. Once you get a success message (eg, Your applet, reprolib:protocols/mindlogger-demo/mindlogger-demo_schema, has been successfully created. The applet's ID is applet/{applet_id}, reload admin.mindlogger.org. Log in with the account you created in step 4. You'll see the applet that was just created.
  7. Repeat steps 5 and 6
    1. Click the ⊕ in the bottom right. Choose "MindLogger Demo" from the "Quick Add" links. Click "Add." Wait for the protocol to load and the applet to be created.
    2. Once you get a success message (eg, Your applet, reprolib:protocols/mindlogger-demo/mindlogger-demo_schema, has been successfully created. The applet's ID is applet/{applet_id}, reload admin.mindlogger.org. Log in with the account you created in step 4. You'll see the aplet that was just created.
  8. Check if the applets have the same name.
    "MindLogger Demo" ×2
    The gif above is the outcome of following these steps on my local machine with the code from 8aabf5d

Write a test

The output of GET /user/applets?role=coordinator&unexpanded=true will be an Array of Objects in which applet["http://www.w3.org/2004/02/skos/core#prefLabel"]["@value"] will be the display name of an applet.

GET /user/applets?role=coordinator&unexpanded=true

A passing test to ensure that no duplicates exist would resolve #609.

Copy link
Member

@shnizzedy shnizzedy left a comment

Choose a reason for hiding this comment

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

This change does not prevent a new applet that shares a protocol with an existing applet (or a different protocol that nevertheless has the same name) from having the same display name:

Double "MindLogger Demo"

Also, the changes requested in #630 (review) apply here as well:

This PR is based on and proposed to merge to an old commit. These changes […] would [… also] need an updated CHANGELOG to merge to master

@jj105
Copy link
Contributor Author

jj105 commented Feb 17, 2020

Thank you for the info.
I'll recheck two issues.

@jj105
Copy link
Contributor Author

jj105 commented Feb 18, 2020

Hi, Jon.
I tried to login https://admin.mindlogger.org as you told me, but it throws network error.
Did you meet similar case before?

@shnizzedy
Copy link
Member

@jj105 Are you able to load http://localhost:8080?

@jj105
Copy link
Contributor Author

jj105 commented Feb 18, 2020

Hi, Jon.
I fixed issue by allowing CORS in admin console.
I'll start checking issues now.

@shnizzedy shnizzedy mentioned this pull request Feb 21, 2020
@shnizzedy
Copy link
Member

superseded by #648

@shnizzedy shnizzedy closed this Feb 21, 2020
@jj105 jj105 deleted the Ihor-Test branch May 25, 2020 03:26
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