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

Separate and save lineage for all levels #179

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Separate and save lineage for all levels #179

merged 3 commits into from
Jul 31, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Jul 31, 2024

Usage:

import appletree as apt
from appletree.utils import get_file_path
# Load configuration file
config = get_file_path("rn220.json")

# Initialize context
tree = apt.Context(config)
from appletree.utils import dump_lineage
dump_lineage("_temp.json", tree)

You will get something like: https://gist.github.com/dachengx/88958c0da1f9402c56dafa829ca9b7af

If you want to include the full path of maps in the lineage:

apt.utils.FULL_PATH_LINEAGE = True

Have fun!

@dachengx dachengx marked this pull request as ready for review July 31, 2024 08:17
@dachengx dachengx requested a review from zihaoxu98 July 31, 2024 08:23
@dachengx
Copy link
Collaborator Author

Still, the backend name is not included. Because right after the initialization of context we do not know the backend name. Might include it in another PR.

@coveralls
Copy link

coveralls commented Jul 31, 2024

Pull Request Test Coverage Report for Build 10176710384

Details

  • 52 of 57 (91.23%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.005%) to 85.175%

Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/config.py 12 13 92.31%
appletree/plugin.py 4 5 80.0%
appletree/share.py 0 1 0.0%
appletree/utils.py 4 6 66.67%
Totals Coverage Status
Change from base Build 10171442372: -0.005%
Covered Lines: 2436
Relevant Lines: 2860

💛 - Coveralls

@dachengx dachengx merged commit 099e9c6 into master Jul 31, 2024
7 checks passed
@dachengx dachengx deleted the add_linage branch July 31, 2024 08:33
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.

2 participants