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

Cli edit #50

Merged
merged 41 commits into from
Jun 22, 2021
Merged

Cli edit #50

merged 41 commits into from
Jun 22, 2021

Conversation

hrshdhgd
Copy link
Contributor

  • Documentation for the click options.

sssom/cli.py Outdated Show resolved Hide resolved
sssom/cli.py Show resolved Hide resolved
@hrshdhgd hrshdhgd mentioned this pull request Jun 8, 2021
sssom/cli.py Outdated Show resolved Hide resolved
sssom/cli.py Show resolved Hide resolved
@matentzn matentzn mentioned this pull request Jun 10, 2021
@hrshdhgd
Copy link
Contributor Author

@matentzn , All I've done so far is changed docstrings. Any idea why the build would be failing with the error ModuleNotFoundError: No module named 'linkml.utils.slot' I have neither added any library requirement nor changed any dependencies in the project.

Copy link
Collaborator

@matentzn matentzn left a comment

Choose a reason for hiding this comment

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

Before we merge this I would like:

At least one, better two or three tests per method in here (make TESTDIR configurable):
https://github.com/mapping-commons/sssom-py/blob/cli_edit/tests/tests.sh

Make sure all CLI methods are tested here:
https://github.com/mapping-commons/sssom-py/blob/cli_edit/tests/test_cli.py

I made a bunch of change to the annotations, but we wont make this perfect now; the goal here is to have cli in an ok state that we can iterate over.

tests/tests.sh Outdated Show resolved Hide resolved
sssom/cli.py Outdated
df = collapse(df)
msdf = from_tsv(input)
# df = parse(input)
df = collapse(msdf.df)
# , priors=list(priors)
rows = dataframe_to_ptable(df)
for row in rows:
logging.info("\t".join(row))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess I am responsible for this... what was I thinking. This isn't logging output, it's the primary output

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is my mistake, not yours.. I want to generally be able to stream outputs from all commands in that way; what is the best way to do this then - using print() in conjunction with a stream (either a file output stream or stdout)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@hrshdhgd I will fix this

Copy link
Collaborator

Choose a reason for hiding this comment

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

for ptable we are now using print, but I want to ensure with the architecture so will review with @cmungall on Monday and merge.

@hrshdhgd
Copy link
Contributor Author

hrshdhgd commented Jun 16, 2021

I have committed tests as well.

Things that are pending:

  1. tests.sh : test for sparql
  2. 'test_cli.py`: tests for the following
    • dosql : requires a query. I'm not sure if the queries in test_config.yaml actually apply here. Please correct me if I'm wrong.
    • sparql

@hrshdhgd hrshdhgd requested a review from matentzn June 17, 2021 00:18
@matentzn
Copy link
Collaborator

Alright this has become too massive, sorry about that @cmungall and I will review this on Monday together and merge it in.

@cmungall
Copy link
Collaborator

go ahead and merge!

@matentzn matentzn merged commit 0bec815 into master Jun 22, 2021
@matentzn matentzn deleted the cli_edit branch June 22, 2021 07:16
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.

4 participants