pywhy-graphs icon indicating copy to clipboard operation
pywhy-graphs copied to clipboard

[ENH, MAINT] Refactor directed-undirected graph class

Open jaron-lee opened this issue 2 years ago • 5 comments

Towards #65

Changes proposed in this pull request:

  • Creates a new directed/undirected graph class DiUnGraph
  • Refactors CPDAG to be a subclass of DiUnGraph
  • Create a new graph class Chain Graph which subclasses DiUnGraph
  • Implement functions that check if CPDAG and ChainGraph are valid instances

Before submitting

  • [ ] I've read and followed all steps in the Making a pull request section of the CONTRIBUTING docs.
  • [ ] I've updated or added any relevant docstrings following the syntax described in the Writing docstrings section of the CONTRIBUTING docs.
  • [ ] If this PR fixes a bug, I've added a test that will fail without my fix.
  • [ ] If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

After submitting

  • [ ] All GitHub Actions jobs for my pull request have passed.

jaron-lee avatar Apr 06 '23 01:04 jaron-lee

I know it's still a WIP but I approved in case you wanted to get initial work in.

robertness avatar Apr 06 '23 22:04 robertness

Codecov Report

Merging #72 (7d69f7f) into main (c1b4107) will increase coverage by 0.25%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   84.42%   84.67%   +0.25%     
==========================================
  Files          34       35       +1     
  Lines        2555     2597      +42     
  Branches      687      695       +8     
==========================================
+ Hits         2157     2199      +42     
  Misses        251      251              
  Partials      147      147              
Impacted Files Coverage Δ
pywhy_graphs/algorithms/cg.py 100.00% <100.00%> (ø)
pywhy_graphs/classes/diungraph.py 85.45% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Apr 16 '23 21:04 codecov-commenter

Some minor fixes and then LGTM.

I will also implement the corresponding changes for CPDAG before I unmark as draft but thanks for the early reviews on this PR

jaron-lee avatar Apr 17 '23 00:04 jaron-lee

@jaron-lee hey know you're prolly busy doing more interesting things at your internship :)

Just wanted to check in to see if you think we should just do a release v0.1 first for now. I think we should def refactor by v0.2 into whatever this PR manifests?

adam2392 avatar Jun 28 '23 18:06 adam2392

Yes I think going ahead with v0.1 is a good idea. I should hopefully have some more time at the end of summer - I may just reduce the scope of the refactor and let others work on it in the meantime so I don't hold anything up.

On Wed, Jun 28, 2023, 2:04 PM Adam Li @.***> wrote:

@jaron-lee https://github.com/jaron-lee hey know you're prolly busy doing more interesting things at your internship :)

Just wanted to check in to see if you think we should just do a release v0.1 first for now. I think we should def refactor by v0.2 into whatever this PR manifests?

— Reply to this email directly, view it on GitHub https://github.com/py-why/pywhy-graphs/pull/72#issuecomment-1611858674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEE2MJLRSC42JHJ4TDPNLTXNRW2TANCNFSM6AAAAAAWUY2CPY . You are receiving this because you were mentioned.Message ID: @.***>

jaron-lee avatar Jun 28 '23 22:06 jaron-lee