Skip to content

Commit

Permalink
Update documentation (#893)
Browse files Browse the repository at this point in the history
### Summary
* Renames docs page to "Monarch KG Tools"
* Moves `release-process.md` from
https://github.com/monarch-initiative/monarch-documentation/blob/main/src/docs/release-process.md
into these docs
* Updates CLI documentation after changes made in 64b4d01
* Folds the existing "Welcome", "Usage", and "Response Data Model"
sections into one broader section for "monarch-py"
* Removes the "API Reference" section, as it is redundant with
information already contained in "Usage"

### Related issues

- Closes #820

- [ ] All tests have passed (or issues created for failing tests)

---------

Co-authored-by: Patrick Golden <[email protected]>
  • Loading branch information
ptgolden and Patrick Golden authored Nov 20, 2024
1 parent 1a1350d commit 16a4db4
Show file tree
Hide file tree
Showing 6 changed files with 335 additions and 293 deletions.
14 changes: 7 additions & 7 deletions backend/src/monarch_py/solr_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def multi_entity_associations(
typer.Option(
"--counterpart-category",
"-c",
help="A comma-separated list of counterpart categories"
),
] = None,
limit: fields.LimitOption = 20,
Expand Down Expand Up @@ -305,24 +306,23 @@ def histopheno(

@solr_app.command("association-counts")
def association_counts(
entity: Annotated[str, typer.Argument(help="The entity to get association counts for")],
entity_id: Annotated[
str, typer.Argument(help="The entity to get association counts for")
],
fmt: fields.FormatOption = fields.OutputFormat.json,
output: fields.OutputOption = None,
):
"""
Retrieve the association counts for a given entity
"""
if not entity:
console.print("\n[bold red]Entity ID required.[/]\n")
raise typer.Exit(1)
solr = get_solr(update=False)
response = solr.get_association_counts(entity)
response = solr.get_association_counts(entity_id)
format_output(fmt, response, output)


@solr_app.command("association-table")
def association_table(
entity: Annotated[
entity_id: Annotated[
str,
typer.Argument(
help="The entity to get associations for",
Expand Down Expand Up @@ -357,7 +357,7 @@ def association_table(
):
solr = get_solr(update=False)
response = solr.get_association_table(
entity=entity,
entity=entity_id,
category=category,
traverse_orthologs=traverse_orthologs,
sort=sort,
Expand Down
4 changes: 2 additions & 2 deletions backend/src/monarch_py/utils/cli_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class OutputFormat(str, Enum):
Optional[str],
typer.Option(
"--output",
"-o",
help="The path to write command output (stdout if not specified)",
"-O",
help="Path to file to write command output (stdout if not specified)",
),
]
17 changes: 0 additions & 17 deletions docs/API-Reference/index.md

This file was deleted.

Loading

0 comments on commit 16a4db4

Please sign in to comment.