This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Aug 26, 2024
-
-
Chris Truter authored
-
- Aug 20, 2024
-
-
Cam Saul authored
* Kondo Config cleanup * Restore warnings for with-log-messages-for-level until #28827 is merged * Updated clojure.test hooks * Fix kondo warning * Test defn/defmacro exclamation point linter should also use :parallel/disallowed (part 1) * WIP * Time for me to learn to spell * Finish the cleanup * Remove code I was typing as an example * Fix renamed var * Fix the SAML tests * Fix Kondo warning
-
- Aug 13, 2024
-
-
Chris Truter authored
-
- Aug 05, 2024
-
-
Chris Truter authored
### Description This change should fix some explosions in stats due to phantom fields, while also making things a bit more rigorous. - Record the table schema in query_field - especially useful for unknown tables - Allow null table names in query_field - they might be phantoms, or they might not - We still have the option to filter them out in tools we build on top - Tighten up matching logic to consider schema
-
- Aug 01, 2024
-
-
Chris Truter authored
* Squash * Clean up query modifier for validating card references (#46283) * Fixup bad git merge on test expectation * Tweak docstrings and de-densify logic
-
- Jul 31, 2024
-
-
John Swanson authored
* Allow filtering on collection * Add `effective_ancestors` to collection data Note: I removed the `qv=` comparator. I think it'.s better to be more explicit about what exactly we're asserting. In particular, I hadn't updated the `:count` when we were filtering on collection type, so the count was still the total for *every* collection even though the results were being restricted by the collection. However the `qv=-data` function was still reporting that everything was OK, because it was accounting for other data from the App DB by just asserting that the count we'd specified was lower than the actual count. I'd argue it's better for tests to fail locally because I have garbage in my app DB (which I can clean up) than succeed when they really shouldn't. * Consolidate effective ancestors For the Search API, we're currently returning slightly different ancestors: - it never has the Root Collection, and - the ancestors don't have a `personal_owner_id` We could change the API (and maybe will soon - it seems pretty unexpected to have `effective_ancestors` sometimes act one way and sometimes act another) but for now we can just reshape things to look the same as they did before, while using the same code under the hood.
-
- Jul 23, 2024
-
-
Chris Truter authored
-
- Jul 18, 2024
-
-
Chris Truter authored
-
- Jul 17, 2024
-
-
Tim Macdonald authored
* Don't return duplicate cards in the Query Validator Tool [Fixes #45673]
-
- Jul 10, 2024
-
-
Tim Macdonald authored
-
- May 31, 2024
-
-
Cam Saul authored
-
- May 10, 2024
-
-
Cam Saul authored
* Remove unused `metabase.api.transform` * Copy the deps graph improvements from my other PR * New combined X-Rays API namespace * Fix kondo error
-
- Apr 19, 2024
-
-
Noah Moss authored
-
- Mar 20, 2024
-
-
Alexander Solovyov authored
-
- Mar 14, 2024
-
-
Tim Macdonald authored
* SQL Lineage: Create the QueryField model This links Cards (with native queries) to Fields, showing us which queries use which Fields. QueryFields are automatically maintained as part of the Card lifecycle Cards with stale queries (powered by QueryField info) are exposed via the `card?f=stale` API
-
- Mar 07, 2024
-
-
Noah Moss authored
Co-authored-by:
bryan <bryan.maass@gmail.com> Co-authored-by:
Bryan Maass <bryan.maass@gmail.com> Co-authored-by:
Jerry Huang <jhuang37050@gmail.com> Co-authored-by:
Noah Moss <noahbmoss@gmail.com> Co-authored-by:
Noah Moss <32746338+noahmoss@users.noreply.github.com> Co-authored-by:
John Swanson <john.swanson@metabase.com>
-
- Jan 22, 2024
-
-
Ngoc Khuat authored
-
- Jul 25, 2023
-
-
Jerry Huang authored
* initial commit * remove print * add fix * remove load * fix tests
-
- Mar 22, 2023
-
-
Braden Shepherdson authored
It's broken there because it tries to capture the Var returned by `defn` in a `let`. Vars aren't real in CLJS, so this doesn't work. The compile succeeds but the JS output is subtly broken.
-
- Mar 16, 2023
-
-
metamben authored
* Add filter constructor functions * Revert changes to defop * Address linter complaints * Add function to set the query filter * Address linter complaints * Fix test name
-
Case Nelson authored
* Add an aggregate function to add aggregations to queries * Call ->op-arg on aggregate input * Allow any in aggregations for now because expressions on aggregates are allowed * We have to recurse into clauses
-
- Mar 13, 2023
-
-
Case Nelson authored
* Initial aggregation functions for metabase-lib * Remove comment for build? * Move defop to common * Add docstrings * Make eastwood happy
-
- Feb 27, 2023
-
-
Braden Shepherdson authored
Dev experience: - CLJS now has source maps - Devtools extension renders CLJS data in Chrome (et al) Devtools - Use a debug build of CLJS in the tests - Fixed line numbers and breakpoints being off-by-one in Devtools CLJC infra: - More robust direct approach to JS<->CLJS conversions, powered by Malli transformers. - Powerful `define-getters-and-setters` macro to generate the accessors.
-
- Feb 14, 2023
-
-
Braden Shepherdson authored
A `metabase.domain-entities.malli/defn` macro that (in CLJS) uses the schemas for the arguments to drive wrapping of vanilla JS objects for idiomatic use in CLJC code. See the first two functions in `metabase.domain-entities.queries.util` which get passed vanilla JS objects but can use them as CLJS maps.
-
- Feb 10, 2023
-
-
Braden Shepherdson authored
Some JVM-specific functions are now in `metabase.util.jvm`, but they are re-exported (in CLJ) by `metabase.util`.
-
- Feb 02, 2023
-
-
Mark Bastian authored
Added bans for print and friends. Fixed issues in kondo config where a macroexpansion put in a print by replacing with (constantly nil) as a no-op.
-
- Jan 19, 2023
-
-
Cam Saul authored
* Switch to Toucan 2 part 1 * Fix Kondo errors * Switch to Toucan 2, part 2 * Fix Kondo errors
-
- Jan 18, 2023
-
-
Tim Macdonald authored
* Bump clj-kondo to 2022.12.10 [Fixes #27512] * Use Kondo's :config-in-call instead of grosser hacks
-
- Jan 13, 2023
-
-
Braden Shepherdson authored
This adds a cross-platform date/time formatting library in CLJC, with (nearly) identical output in both JVM and JS environments. The only known difference is week numbers. CLJS (through Moment.js) has ordinal numbers, and renders the week number as "34th". Neither the JVM nor Clojure has a handy library for this (I'm sure it's out there somewhere, but it seems like a silly dep to add) so it renders week numbers as simply "34". Both platforms have date formatters that use pattern strings (eg. `"YYYY-MM-dd"`) to turn date/time objects into strings. There's a strong resemblance in how these work and what letters stand for what parts of the date and time, but they are far from identical. Rather than try to hackily convert one set of strings to another with regexes or other manipulations, this PR defines a set of names for fragments of dates (eg. `:year`, `:day-of-week-full`, `:hour-24-dd`) and includes functions to transform a list of these keys into a platform-specific format function. This is portable and transparent, and can be written in Clojure or JS code: ```clj [:year "-" :month-dd "-" :day-of-month-dd] ; 2022-04-08 [:month-full " " :day-of-month-d ", " :year] ; April 8, 2022 [:hour-12-dd ":" :minute-dd " " :am-pm] ; 7:52 AM ``` ```js [":year", "-", ":month-dd", "-", ":day-of-month-dd"] ; 2022-04-08 [":month-full", " ", ":day-of-month-d", ", ", ":year"] ; April 8, 2022 [":hour-12-dd", ":", ":minute-dd", " ", ":am-pm"] ; 7:52 AM ``` Note that the original code allowed an unrecognized `:date-style` string to be used directly as the formatting string. With the move to formatting data structures that no longer works. Instead there is a fixed map of format strings to the above data structures, that contains all the currently used `:date-style` inputs. If some caller needs a new format someday, we can either: (a) add the style to the map; or (b) pass the data structure form directly to the `:date-format` option, which if provided is used as the format. It's tempting to go to all the call sites and replace these `:date-style` strings with the new format structures. However, the strings are still embedded in the `:visualization_settings` in user appDBs, so we still need to recognize them. Most of the existing functions in the TS library have the same API. The set of allowed `:date-style` and `:time-style` values is turned into a type using `keyof`, so that we get precise type-checking of these values rather than simply `string`. One function has been dropped from the API: `getDateFormatFromStyle`. There was no practical way to implement it using the new format data structures. The only caller was the date format column settings, and it has been rewritten to use the formatted string for its sample date as its key instead.
-
- Sep 26, 2022
-
-
dpsutton authored
* Substitute persisted queries in parameter card references ```sql select o.total, o.quantity, model_p.category, model_p.title from orders o left join {{#14-pg-products}} model_p -- reference to products model on o.product_id = model_p.id limit 4 ``` Testing: I'm unhappy with how verbose the test is. At some point we're going to need a better, standardized way to test persistence. But the test makes a persisted table of the test-data.categories table (test/metabase/test/data/dataset_definitions/test-data.edn). It runs some sql to update the values in the table to turn `"Winery"` -> `"Winery from cached table"`, joins the two tables together to have both at once. There's a lot of moving pieces and the setup is a bit verbose. There's also no obvious place where these types of tests should go. We'll need to consolidate them in the future (and extend them). * persisted macro * docstring for `persisted-info-native-query` * alignments and small nits * Reuse persistence macro * clj-kondo cleanups * remove clj-kondo change before rebase
-
- Sep 22, 2022
-
-
Cam Saul authored
* 347 errors, 34 warnings * 89 errors, 66 warnings * 63 errors, 39 warnings * 52 errors, 33 warnings * 23 errors, 22 warnings * 13 errors, 4 warnings * Fix the last few errors. * Sort Kondo config
-
- Aug 22, 2022
-
-
Cam Saul authored
* [Toucan 2 prep] Don't invoke Toucan models as functions * Some fixes * Test fixes * Test fix * [Toucan 2 prep] Don't call `type` or `class` on Toucan models * Test fixes * More test fixes
* [Toucan 2 Prep] Don't use <model>Instance classes * Sort namespaces
-
- May 19, 2022
-
-
Cam Saul authored
* `defsetting` setter functions should end in `!` * Fix typo * Update .clj-kondo/hooks/metabase/models/setting.clj * Fix clj-kondo for Toucan defmodel not emitting a docstring * Remove `^:private` metadata on a couple of Settings since it makes Eastwood fussy
-
- May 02, 2022
-
-
Braden Shepherdson authored
Background: We had two lint configs: lint-config.edn which was enfored by Github Actions, and .clj-kondo/config.edn, the default location used by editors. Problem: Patchy enforcement of the (larger) config in .clj-kondo/config.edn since not everyone uses an editor. Some new lint, like canonical namespace aliases (#21738, #19930) is not enforced automatically and has begun to bit-rot. Solution: Combine both configs, fix any outstanding lint, and update our tooling to use the unified config. Caveats: Anyone who has their local editor configured to use lint-config.edn will have their linting broken by this change.
-
- Mar 04, 2022
-
-
Michiel Borkent authored
-
- Feb 10, 2022
-
-
Michiel Borkent authored
* honeysql var improvements * Define routes * Define routes * define-routes improvement * honeysql helpers * honesql * abs in clojure 1.11 * fix logic unresolved vars * deprecated * deprecated var warnings * undo replace
-
- Feb 03, 2022
-
-
Michiel Borkent authored
* Turn defendpoint config macro into analyze-call hook for better linting * Simplify hook * Remove previous macro config * Fix all errors concerning third party libs * revert whitespace change:
-
- Jan 25, 2022
-
-
Michiel Borkent authored
* Linting improvements: 0 errors in src + shared/src * satisfy other linter
-