Skip to content

Conversation

@daehyun99
Copy link
Contributor

Your checklist for this pull request

Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the dev branch (left side). Also you should start your branch off our dev.
  • Check the commit's or even all commits' message styles matches our requested structure.

Issue number(s) that this pull request fixes

List of changes to the codebase in this pull request

  • Test: Add tests code for add_edge, add_directed_edges, add_undirected_edges methods of PDAG
  • Feat: Add logic code for add_edge, add_directed_edges, add_undirected_edges methods of PDAG

- Docs: Added example comments to the `add_node` and `add_nodes_from` methods of the `ADMG` class.
- Feat: In this process, `ADMG` was added to __init__.py so that the `DAG`, `PDAG`, and `ADMG` classes can be imported using `from pgmpy.base import`.
- The isort-enforced import order breaks the tests with a `TypeError`.
- Reverting to the previous order fixes it.
@daehyun99
Copy link
Contributor Author

Copy link
Contributor

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

same comment as in #2310 (review)

@daehyun99
Copy link
Contributor Author

The methods related to edge will be discussed in issue #2330.
I am closing this PR.

@daehyun99 daehyun99 closed this Sep 1, 2025
@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (2bba5dc) to head (1872c71).
⚠️ Report is 87 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2312      +/-   ##
==========================================
+ Coverage   94.59%   95.02%   +0.43%     
==========================================
  Files         149      158       +9     
  Lines       20155    22245    +2090     
==========================================
+ Hits        19065    21138    +2073     
- Misses       1090     1107      +17     
Files with missing lines Coverage Δ
pgmpy/base/ADMG.py 89.95% <ø> (ø)
pgmpy/base/DAG.py 93.15% <100.00%> (+0.54%) ⬆️
pgmpy/base/__init__.py 100.00% <100.00%> (ø)
pgmpy/tests/test_base/test_DAG.py 100.00% <100.00%> (ø)

... and 36 files with indirect coverage changes

@daehyun99 daehyun99 deleted the feature/2311/PDAG-edges branch September 3, 2025 03:35
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.

[ENH] Implement the add_directed_edges and add_undirected_edges methods of the PDAG class.

3 participants