Giter Site home page Giter Site logo

sasdocs's People

Contributors

benjamincorcoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sasdocs's Issues

Suggestion for simple example in the tests/samples folder

Hello,

I was very happy to find this library, thank you for making it open source!

When I tried to follow the simple example I got these error/warning messages:

Unable to directly resolve path: [WinError 3] The system cannot find the path specified: 'a\\bad\\path'
Unable to directly resolve path: [WinError 3] The system cannot find the path specified: 'a\\bad\\path'
Unable to directly resolve path: [WinError 3] The system cannot find the path specified: 'path\\to\\output'
ERROR:sasdocs.program: "a\bad\path": Unable to resolve path: [WinError 3] The system cannot find the path specified: 'a\\bad\\path'

It took me a little while to understand that it was due to the %include "a/bad/path"; and libname output "path/to/output"; statements in the samples.

Maybe you could consider to use an initial example that does result in error/warnings messages? Or mention something about the paths in the instructions? Just a suggestion.

Excited to start using your library! Thanks again. Cheers

/ Jonas

Parse calls to macros

Issue

Call to macros are not parsed and so drop the over all parsed percentage for the sasProgram. Must be careful not to capture macro language as macro calls

/*This*/
%runMacro;

/*Not this*/
%put;

Resolve macroVariables where possible

Issue

The following should be resolved so that the library data has a valid path. Repeat process for %include statements.

%let mVar = C:\SASData;
libname data "&mVar.";

Parser for `proc sql` statements

Issue

SAS proc sql statements are not currently parsed. These should be parsed into a object similar to a datastep or procedure, with multiple potential inputs and outputs. Column creation and join methods can be largely ignored at this point.

proc sql;
    create table work.foo from 
    select * from work.bar;
quit;

Considerations

  • Proc sql statements can have multiple SQL statements between the proc sql and quit tags.
  • * text ; is a valid inline comment delimiter in other contexts
  • join statements can be repeated multiple times
  • select statements can be nested indefinitely
  • select into :mvar is a valid method for creating macro variables

Macro options

Issue

Parser fails when macro defined with options i.e.

%macro test /des='Hello' secure; 
%mend;

Multiple outputs in procedures

Issue

Current parser does not capture multiple outputs in procedures.

proc summary data=test;
    class a;
    var b;
    output out=sum sum=;
    output out=cnt n=;
run;

PROC SQL fails to parse with mark=True

Issue

proc sql statements fail to parse when force_partial_parse has mark argument set to True. Issue is attempting to run set_found_posistion on parsed list of SQL statements.

Give Macro object an about attribute

Issue

Macro object needs an about attribute capturing the documentation of the macro variable. This should be the first set of comments inside the macro. The comments need to be collapsed into a single string object.

Test cases for sasProgram class

Requires

Test cases for the sasProgram class.

  • Correctly loads and fails to load valid and invalid paths respectively
  • Parses code as expected
  • get_objects yields objects as expected

datasteps without a set or merge statement

Issue

Currently only datasteps with a set or merge statement are parsed. However this does not account for datalines and cards statements, as well as infile statements

data a;
    input a;
    datalines;
1
;
run;

Should produce dataStep object with single output of dataObject: a

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.