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

Hide all but leaf nodes, except when searching #9

Merged
merged 4 commits into from
Sep 13, 2019
Merged

Conversation

alex-r-bigelow
Copy link
Member

Stuff @kawilliams helped me code IRL to catch up with her search functionality, in pursuit of #1

This also includes my (ugly, semi-failed) attempt to add the key, but maybe I should do that on a separate branch?

@alex-r-bigelow
Copy link
Member Author

@kawilliams
Copy link
Collaborator

I tried running it and got this error (this was my first time hosting it, so sorry if it's a simple question):
(env) Katys-MacBook-Pro:traveler-integrated katywilliams$ ./bundle.py \

--input ~/Desktop/20190906/output.txt
--otf2 ~/Desktop/20190906/OTF2_archive/APEX.otf2
--label "Kate's 2019-09-06 ALS Test Run"
Loading 0906_kate meta...
Loading 0906_kate primitives...
Loading 0906_kate primitiveLinks...
Loading 0906_kate trees...
###############################################
Adding data for: Kate's 2019-09-06 ALS Test Run
Parsing tree...
Finished parsing newick tree
New primitives: 12, Observed existing primitives: 0
New links: 11, Observed existing links: 0
Parsing graph...
Finished parsing DOT graph
New primitives: 0, References to existing primitives: 0
New links: 0, Observed existing links: 0
Parsing tree...
Finished parsing newick tree
New primitives: 9, Observed existing primitives: 1
New links: 9, Observed existing links: 0
Parsing graph...
Finished parsing DOT graph
New primitives: 0, References to existing primitives: 0
New links: 0, Observed existing links: 0
Parsing tree...
Finished parsing newick tree
New primitives: 51, Observed existing primitives: 1
New links: 51, Observed existing links: 0
Parsing graph...
Finished parsing DOT graph
New primitives: 0, References to existing primitives: 0
New links: 0, Observed existing links: 0
Parsing performance csv...
Finished parsing performance CSV
New primitives: 6, Observed existing primitives: 35
Max inclusive time seen in performance CSV (ns): 503850598.000000
Parsing events (.=2500 events)
Error encountered; purging corrupted data for: Kate's 2019-09-06 ALS Test Run
Traceback (most recent call last):
File "./bundle.py", line 146, in
asyncio.get_event_loop().run_until_complete(main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "./bundle.py", line 134, in main
await db.processOtf2(label, FakeFile(paths['otf2']), args['guids'], args['events'])
File "/Users/katywilliams/GitHub/traveler-integrated/database.py", line 439, in processOtf2
for line in file:
File "./bundle.py", line 40, in iter
otfPipe = subprocess.Popen(['otf2-print', self.name], stdout=subprocess.PIPE)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'otf2-print': 'otf2-print'

I was able to run ./serve.py and display just the tree (that's all I selected, I didn't try the otf2 with it) and it loaded the tree WITH all the labels. I confirmed that I'm on the branch "tree-search."

@alex-r-bigelow
Copy link
Member Author

Hmm, did you set up OTF2 somewhere on your system (sorry, the README totally breezes over this)?

If you did, does which otf2-print give you anything?

@kawilliams
Copy link
Collaborator

Ah that's it. I've installed it on rostam but not locally.

@alex-r-bigelow
Copy link
Member Author

That should still be fine... bundle.py is only freaking out because it needs OTF2 to handle the trace. You should still be able to run serve.py without running bundle.py at all, and just upload tree files in the interface (I should update the README to make this more clear).

It's weird that the labels are showing right off the bat. Does clicking anywhere hide them?

@kawilliams
Copy link
Collaborator

kawilliams commented Sep 12, 2019

Nope, the labels remain even if I click and even if I CMD or CMD+F. They disappear with the correct nodes when I collapse a branch.

No errors in the console.

@alex-r-bigelow
Copy link
Member Author

Hmm, maybe I messed up something with the commit. Let's see...

@alex-r-bigelow
Copy link
Member Author

Hmm, I'm still getting hidden labels:

image

I can swing by GS in a bit to see if I really messed something up if that would help

@kawilliams
Copy link
Collaborator

I'm gone for the day, but I'll be in GS and free 7-10am tomorrow

@alex-r-bigelow
Copy link
Member Author

Hmm, still no luck replicating (tried the nuclear option with my repository in case my strange git commands messed something up). Thanks for trying this—I'll swing by and pester you tomorrow.

@kawilliams
Copy link
Collaborator

Loading error (takes forever):

Saving katetree shelf: meta
Saving katetree shelf: primitives
Saving katetree shelf: primitiveLinks
Saving katetree pickle: trees
INFO: ('127.0.0.1', 49386) - "POST /datasets/katetree HTTP/1.1" 201
INFO: ('127.0.0.1', 49386) - "POST /datasets/katetree/log HTTP/1.1" 200
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/uvicorn/protocols/http/httptools_impl.py", line 370, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/applications.py", line 133, in call
await self.error_middleware(scope, receive, send)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/middleware/errors.py", line 122, in call
raise exc from None
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/middleware/errors.py", line 100, in call
await self.app(scope, receive, _send)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/exceptions.py", line 73, in call
raise exc from None
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/exceptions.py", line 62, in call
await self.app(scope, receive, sender)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/routing.py", line 585, in call
await route(scope, receive, send)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/routing.py", line 207, in call
await self.app(scope, receive, send)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/routing.py", line 43, in app
await response(scope, receive, send)
File "/Users/katywilliams/GitHub/traveler-integrated/env/lib/python3.6/site-packages/starlette/responses.py", line 197, in call
async for chunk in self.body_iterator:
File "/Users/katywilliams/GitHub/traveler-integrated/clientLogger.py", line 16, in iterate
await startProcess()
File "./serve.py", line 111, in startProcess
await db.save(label, logger)
File "/Users/katywilliams/GitHub/traveler-integrated/database.py", line 128, in save
await log('Saving %s shelf: %s' % (label, stype))
TypeError: 'ClientLogger' object is not callable

@kawilliams kawilliams merged commit c415c8f into master Sep 13, 2019
@kawilliams kawilliams deleted the tree-search branch September 13, 2019 14:48
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