Skip to content

Conversation

@will-moore
Copy link
Member

See ome/omero-mapr#74 (comment)

We want to simplify the Study description so that it can be parsed for searching, without duplicating the Study Title in the description.

"%s\n%s" % (key, component[key]))
component_title = component[key]
if "Study Version History" in component:
history = ("\n\nVersion History\n%s" %
Copy link
Member

Choose a reason for hiding this comment

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

If we are looking into removing publication title from the description, a question is whether this heading should be kept at all for the relevant studies or if the value of this field should be more simply appended with 1-2 newlines

Copy link
Member Author

Choose a reason for hiding this comment

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

by "this heading" do you mean "Study Version History"? I'm happy to remove that heading too if it's not needed?

Copy link
Member

Choose a reason for hiding this comment

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

yes, I meant Study Version History but deferring to you, @khaledk2 and @francesw on what makes the most sense both in terms of UI and searchability.

@will-moore
Copy link
Member Author

We want to run this on all studies...

for dir in */ ; do
  cd "$dir"
  
  # Check for a file ending with study.txt
  if [ -e *study.txt ]; then
    python /idr-utils/pyidr/study_parser.py $(find . -type f -name '*study.txt') --set
  fi
  
  cd ..
done

@sbesson
Copy link
Member

sbesson commented Apr 19, 2023

As a one-liner I have been using the following in the past to update all descriptions/annotations of the top-level containers:

source /opt/omero/server/venv3/bin/activate
cd /uod/idr/metadata/
find . -maxdepth 2 -type f -iname *study.txt -exec python idr-utils/pyidr/study_parser.py --set {} \;

@will-moore
Copy link
Member Author

Trying to pull this branch onto pilot-idr0125 for testing, but can't connect to github...

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite -L 1080:localhost:80

$ cd /uod/idr/metadata/idr-utils
$ git remote -v
origin	https://github.com/IDR/idr-utils (fetch)
origin	https://github.com/IDR/idr-utils (push)
sbesson	git://github.com/sbesson/idr-utils (fetch)
sbesson	git://github.com/sbesson/idr-utils (push)

$ sudo -Es git remote add will git://github.com/will-moore/idr-utils
$ sudo -Es git fetch will
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out

@sbesson
Copy link
Member

sbesson commented Apr 19, 2023

The git:// protocol is deprecated. Do you have the same error with HTTPs?

@will-moore
Copy link
Member Author

That worked, thanks!

sudo -Es git remote set-url will https://github.com/will-moore/idr-utils
sudo -Es git fetch will
 * [new branch]      study_description_no_title -> will/study_description_no_title
sudo -Es git checkout will/study_description_no_title

@will-moore
Copy link
Member Author

source /opt/omero/server/venv3/bin/activate
cd /uod/idr/metadata/
omero login
find . -maxdepth 2 -type f -iname *study.txt -exec python idr-utils/pyidr/study_parser.py --set {} \;

@will-moore
Copy link
Member Author

Also just ran the study_parser as above on idr-testing to update descriptions.

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