Giter Site home page Giter Site logo

sio / libpq Goto Github PK

View Code? Open in Web Editor NEW
75.0 11.0 21.0 186 KB

Detach your M code from workbooks to reuse it! Import modules from local or web storage (unlimited number of sources)

License: Apache License 2.0

JavaScript 94.14% VBA 3.97% Makefile 0.76% Python 1.13%
powerquery power-query excel library modules module powerbi power-bi

libpq's People

Contributors

sio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libpq's Issues

Unit testing

Add a basic framework for writing and executing unit tests

LibPQ disabling Power Query intellisense?

Originally posted by @B-D-T in #12 (comment)

I apologize if I'm missing something, but it appears that adding LibPQ breaks the Power Query intellisense. In Excel workbooks where I don't have LibPQ/LibPQPath, I get the intellisense function list, arguments, etc. But for those where I've integrated LibPQ, the intellisense only reads objects that were defined within the existing module.

Almost all my work is done directly in M in the Advanced Editor. Having intellisense makes that process easier, but now that I've discovered the wonderful LibPQ, I don't want to give that up either! Any suggestions?

Release LibPQ as *.mez file

Idea

  1. Create a build script that packages LibPQ into *.mez file
  2. Build and test LibPQ as Power Query Extension
    • Decide where to store LibPQPath (or maybe introduce sensible defaults)
    • Decide whether to include only LibPQ or to package all default modules as well

More information

Unit Testing - Tests with coding errors disappear from test run results

When a unit test file has an error in it, the entire file's tests disappear from the UnitTest Results. To Reproduce do the following:

  1. With LibPQ configured to run the LibPQ Unit Tests, Run UnitTest.Discover()
  2. Notice that the Test.MicrosoftUnitTestDemo tests are listed.
  3. Edit Tests\Test.MicrosoftUnitTestDemo.pq and comment out line 12 (UnitTesting.Returns123...)
  4. Save and refresh the UnitTest.Discover()

The Test.MicrosoftUnitTestDemo tests are no longer listed. It would be more desirable to list the file as a single row with an error. I've looked through the code, and tried a number of things, without success, so thought it was worthy of an "Issue".

I'm glad to help with resolving, if someone could give me some pointers.

Path as an argument to LibPQ

Maybe:

Allow optional second argument to LibPQ() that passes the path record to override LibPQPath

I was considering allowing to override the values provided by LibPQPath for some calls, e.g. if you'd want LibPQ("CoolModule") to return one thing in one report and another thing in another one - both in the same workbook. I have not encountered a use case for this idea, so I've just left it at that.

Move test code into a separate directory

As the number of tests grows, the test modules create unnecessary clutter in the Modules/ directory.

We need to:

  • Move tests into a separate directory
  • Decide on another prefix for tests, because Tests/Tests.Name.pq seems redundant but tests module names still should not collide with normal module names
  • Update LibPQPath.sample.pq to enable importing tests

Feedback from users

Hello! If you are using LibPQ (or have used, or have tried to use it but something didn't work out for you) - please leave some feedback in comments below.

  • Does LibPQ suit your needs? Were you able to successfully use it in any workbooks/reports?
  • Was the documentation sufficient? What topics were unclear or missing?
  • What LibPQ features do you consider most important?

Any feedback beside the three points above is also greatly appreciated! Thank you!

Add support for subtests

Single test (one function): testName = () => Assert
Subtests (list of functions): testName = {()=>Assert, ()=>Assert, ()=>Assert, ...}

Changes can be stitched into the line below. We can invoke single test function or run all test functions in a list of subtests if needed.

{"Result", each try Record.Field(Suite, [Test])()},

Compatibility with PowerBI service

Looks like LibPQ can not be used in PowerBI service because of providing dynamic arguments to Web.Content(). This page is the place to discuss, develop and test possible workarounds.

Important

I have no account with PowerBI service, so I will need outside help to do the tests

Roadmap

  • Describe the testing sequence (@sio)
  • Test LibPQ 1.2.0 with PowerBI service (@spythan?)
  • Modify loader to use static base URL with Web.Contents (@sio)
  • Test modified version of LibPQ with PowerBI service (not assigned)
  • Write documentation on using LibPQ with Power BI service

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.