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

Support datafying multifns #122

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Support datafying multifns #122

merged 1 commit into from
Sep 9, 2022

Conversation

camsaul
Copy link
Owner

@camsaul camsaul commented Sep 9, 2022

Datafying a multimethod will now give you a big dump of useful information like

{:ns           'methodical.datafy-test
 :name         'methodical.datafy-test/mf
 :arglists     '([x y])
 :class        methodical.impl.standard.StandardMultiFn
 :combo        {:class          methodical.impl.combo.threaded.ThreadingMethodCombination
                :threading-type :thread-last}
 :dispatcher   {:class         methodical.impl.dispatcher.multi_default.MultiDefaultDispatcher
                :dispatch-fn   methodical.datafy-test/dispatch-first
                :default-value :default
                :hierarchy     #'clojure.core/global-hierarchy
                :prefs         {:x #{:y}}}
 :method-table {:class   methodical.impl.method_table.standard.StandardMethodTable
                :primary {:default
                          {:ns       'methodical.datafy-test
                           :name     'methodical.datafy-test/mf-primary-method-default
                           :doc      "Here is a docstring."
                           :file     "methodical/datafy_test.clj"
                           :line     15
                           :column   1
                           :arglists '([next-method x y])}}
                :aux     {:before {[:x :default] [{:ns                    'methodical.datafy-test
                                                   :name                  'methodical.datafy-test/mf-before-method-x-default
                                                   :doc                   "Another docstring."
                                                   :file                  "methodical/datafy_test.clj"
                                                   :column                1
                                                   :line                  20
                                                   :arglists              '([_x y])
                                                   :methodical/unique-key 'methodical.datafy-test}]}
                          :around {[:x :y] [{:ns                    'methodical.datafy-test
                                             :name                  'methodical.datafy-test/mf-around-method-x-y
                                             :file                  "methodical/datafy_test.clj"
                                             :column                1
                                             :line                  25
                                             :arglists              '([next-method x y])
                                             :methodical/unique-key 'methodical.datafy-test}]}}}
 :cache        {:class methodical.impl.cache.watching.WatchingCache
                :cache {:class methodical.impl.cache.simple.SimpleCache
                        :cache {}}
                :refs  #{#'clojure.core/global-hierarchy}}}

This will help with #76

@camsaul camsaul added this to the 0.14.0 milestone Sep 9, 2022
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Base: 87.47% // Head: 86.90% // Decreases project coverage by -0.57% ⚠️

Coverage data is based on head (351a147) compared to base (2d5159a).
Patch coverage: 78.78% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   87.47%   86.90%   -0.58%     
==========================================
  Files          19       21       +2     
  Lines        1038     1107      +69     
  Branches       60       63       +3     
==========================================
+ Hits          908      962      +54     
- Misses         70       82      +12     
- Partials       60       63       +3     
Impacted Files Coverage Δ
src/methodical/impl/method_table/clojure.clj 66.66% <25.00%> (-7.02%) ⬇️
src/methodical/impl/dispatcher/standard.clj 83.00% <28.57%> (-4.37%) ⬇️
src/methodical/impl/combo/clojure.clj 81.81% <33.33%> (-8.19%) ⬇️
src/methodical/impl/combo/clos.clj 60.46% <33.33%> (-1.44%) ⬇️
src/methodical/impl/dispatcher/everything.clj 58.06% <33.33%> (-6.23%) ⬇️
src/methodical/impl/combo/threaded.clj 96.42% <75.00%> (+0.13%) ⬆️
src/methodical/impl/cache/watching.clj 89.36% <80.00%> (+0.72%) ⬆️
src/methodical/impl/standard.clj 86.91% <91.66%> (+0.04%) ⬆️
src/methodical/impl/method_table/common.clj 92.30% <92.30%> (ø)
src/methodical/impl/cache/simple.clj 100.00% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@camsaul camsaul merged commit 818f8b4 into master Sep 9, 2022
@camsaul camsaul deleted the datafy branch September 9, 2022 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.

1 participant