BookmarkSubscribeRSS Feed

Create a SAS Project Scaffold on the Command Line

Started ‎05-05-2015 by
Modified ‎10-05-2015 by
Views 2,319

Overview

 

doxx is a MIT licensed open source application that allows you to develop text project scaffolds for distribution and reuse.  Using information from articles published by ("How I Organize my Programming Folders" & "Starting a Project in SAS") and the discussion that they generated, I developed a SAS project scaffold that can be built on the command line with doxx.

 

This scaffold includes project directories and an analysis script stub file for new projects.  The goal is to allow you to drop in your data source(s) and immediately get started.

 

Final Project Structure

 

The current iteration of the SAS project scaffold is structured like this:

 

post-scaffold.png

 

And the SAS script file stub (analysis.sas) includes the following header fields:

 

sas-script.png

doxx will automatically populate these fields for you if you define them in the YAML project settings file (known as the key.yaml file, see Usage below).

 

 

Community Contributions are Welcomed

 

The scaffold and script template are available on Github and development is open to anyone.  To modify these files, fork the Github repository and submit a pull request with your changes. Alternatively, feel free to submit a new issue report on the Github repository with any recommended modifications and I would be happy to implement them.  Build files use YAML formatting and there is absolutely no programming/scripting experience expected in order to contribute.

 

 

Get Started

 

doxx Dependencies

 

doxx was built with Python and requires the Python interpreter.  You can use Python v2.x or v3.x releases.  Python is pre-installed on Mac OSX and most Linux distributions.  The Windows install is a simple install wizard based process.

 

To confirm that you have Python on your system, enter the following command on the command line:

 

Confirm a Python Install

 

$ python --version

 

The Python version will be displayed in your terminal if it is installed.

 

Install Python

 

If Python isn't installed on your system, current Python releases are available on the python.org site and install tutorials are available for Mac OSX and Windows users.  Linux users can install current Python releases through their Linux distribution package manager.  Alternatively, you can download the source code, compile, and install it yourself.

 

 

Install doxx

 

The easiest way to install doxx is with the Python package manager pip.  Use the following command:

 

$ pip install doxx

 

Confirm your doxx install with the following command:

 

$ doxx --version

 

If you see the current doxx version in your terminal, you're ready to build.

 

 

Usage

 

Here are the series of steps that you use to build a new SAS project with doxx.  Begin by opening your terminal and navigating to the directory where you would like to create your SAS project files.

 

Then follow these steps:

 

Step 1. Pull the Project Files

 

$ doxx pull statistics-sas-project

 

This pulls the build files to your machine from the Github repository.  You must have an internet connection in order to complete this step.

 

Step 2. Define Your Analysis Script Header Fields in the key.yaml File

 

Open the key.yaml file that is located in your project directory in any text editor.  YAML is a very forgiving markup syntax that reads like a standard list.  Define any field that you would like to populate in the analysis script template to the right of the colon, adjacent to field name.  Save the key.yaml file.

 

Step 3. Build

 

$ doxx build

 

Step 4. Cleanup

 

doxx removes all of the build files for you with the command:

 

$ doxx clean

 

...and you're all set.

 

To create another project down the road, navigate to the new project directory and start at Step 1 again.

 

 

Upgrade doxx

 

I periodically release updates to doxx that include new features and/or bug fixes.  You can upgrade your installed version with the command:

 

$ pip install --upgrade doxx

 

 

More Information

 

If you need more information, the doxx documentation is available at http://doxx.org and tutorials are available at http://things.doxx.org.  Feel free to contact me on Twitter (@csimpkins or @doxxapp) with any questions or comments.

 

- Chris

Comments

Thanks for your contribution! Doxx looks like an interesting framework.

Thanks Chris.  I really appreciate it.

Version history
Last update:
‎10-05-2015 03:17 PM
Updated by:

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Labels