openpharma / openpharma/graphicalMCP

Consider defining additional generics for a graph

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
21
Forks
1
Avg merge
4h 27m
Merged PRs (30d)
11

Description

Throughout other functions that utilize graphs, it's common to be calling length(graph$hypotheses) or dimnames(graph$transitions), etc. So here are a few generics that might be useful to define differently for a graph

  • length.initial_graph as length(graph$hypotheses)
  • names.initial_graph as names(graph$hypotheses)
  • dimnames.initial_graph as dimnames(graph$transitions)
  • str.initial_graph with prettier printing of some sort? Need to be careful with this one, since it's so useful for exploring underlying structure outside of printing
  • seq.initial_graph as seq_along(graph$hypotheses)
  • ...Others?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the initial_graph class and existing methods that access graph$hypotheses or graph$transitions. Review how S3 generics are currently defined and determine which proposed methods have consistent semantics, especially str.initial_graph; done means the selected generics work for initial graphs without obscuring their underlying structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.