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

Move code around for better understandability #85

Merged
merged 7 commits into from
Sep 7, 2023

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Sep 7, 2023

  • No alterations have been made to the code; only documentation has been enhanced and typos corrected.

Change Details:

  • The NodeFunctions have been relocated to compiler_pass.jl.
    • This transition aims to consolidate common functions and the CollectVariable pass with NodeFunctions, thereby fostering a deeper understanding of the code associated with NodeFunctions, even though it results in a lengthier file.
  • The contents of bugsast.jl have been transferred to parser.jl.
    • The renaming of @bugs made the bugsast title somewhat ambiguous. Moreover, due to the similar functionalities of parser.jl and @bugsast, I think their merging makes sense.
  • The sections of code related to the Model have been isolated in a distinct file.
    • This separation promotes a more streamlined abstraction of the Graph. By doing this, the Graph interface can potentially be reused, possibly paving the way for the development of graph-based inference algorithms that are independent of the Model definitions in BUGS.
  • Several functions have been migrated to utils.jl to minimize the scattering of code and maintain a cleaner code base.

src/utils.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 68.85% and no project coverage change.

Comparison is base (e9f705a) 69.20% compared to head (4e809a5) 69.20%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #85   +/-   ##
=======================================
  Coverage   69.20%   69.20%           
=======================================
  Files          17       17           
  Lines        1640     1640           
=======================================
  Hits         1135     1135           
  Misses        505      505           
Files Changed Coverage Δ
src/JuliaBUGS.jl 94.87% <ø> (ø)
src/graphs.jl 75.38% <ø> (+4.21%) ⬆️
src/parser.jl 76.27% <49.02%> (-16.42%) ⬇️
src/model.jl 64.18% <64.18%> (ø)
src/utils.jl 90.24% <90.24%> (ø)
src/compiler_pass.jl 91.64% <92.39%> (+0.73%) ⬆️
src/variable_types.jl 78.57% <100.00%> (+2.57%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sunxd3 sunxd3 requested a review from yebai September 7, 2023 09:40
Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

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

Thanks @sunxd3 -- it looks good to me!

@yebai yebai merged commit 8bcf530 into master Sep 7, 2023
12 of 13 checks passed
@yebai yebai deleted the sunxd/reorganize-files branch September 7, 2023 10:03
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