SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other

Similar documents
Version Control in SAS Enterprise Guide 7.1

Git with It and Version Control!

Autodesk Vault and Data Management Questions and Answers

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

The Old World. Have you ever had to collaborate on a project by

Intro to Github. Jessica Young

Version Control with Git ME 461 Fall 2018

Tips and Tricks for Organizing and Administering Metadata

Using CVS Repositories with SAS

CSE 331 Software Design & Implementation

Why To Go With Licensed Version Control Tool When Open Source Tool Is There

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Git, the magical version control

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Batch vs. Interactive: Why You Need Both Janet E. Stuelpner. ASG. Inc Cary. North Carolina

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

SAS Factory Miner 14.2: User s Guide

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

Tools for software development:

Github/Git Primer. Tyler Hague


Belle II - Git migration

Version Control System GIT

Submitting your Work using GIT

DOCUMENT MANAGEMENT GLOSSARY

Software Project (Lecture 4): Git & Github

Industrial IT for cpmplus Collaborative Production Management. cpmplus Smart Client The seamless information display for System 800xA

A BASIC UNDERSTANDING OF VERSION CONTROL

RSARTE Git Integration

How to version control like a pro: a roadmap to your reproducible & collaborative research

CS 320 Introduction to Software Engineering Spring February 06, 2017

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Welcome! Virtual tutorial starts at 15:00 GMT. Please leave feedback afterwards at:

Choice of Development Tool for the User Interface of a Client-Server Application in a SAS Environment

Git tutorial. Katie Osterried C2SM. October 22, 2015

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han

Visualizing Git Workflows. A visual guide to 539 workflows

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

Git Setup Help using GitKraken (CSE 154)

McAfee Security Management Center

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

Lab Objective. Lab Assignment. Downloads and Installation

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

Best Practice for Creation and Maintenance of a SAS Infrastructure

Branching with Eclipse and CVS

Why SAS Programmers Should Learn Python Too

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY


Push up your code next generation version control with (E)Git

GIT TUTORIAL. Creative Software Architectures for Collaborative Projects CS 130 Donald J. Patterson

Table of Contents: Tortoise SVN is used as a source control for FpML.

Version control with git and Rstudio. Remko Duursma

Algorithm Engineering

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

Lab Exercise Git: A distributed version control system

Information Visualization

Version Control Systems (Part 1)

GIT TO DA REPO! VERSION CONTROL, GITLAB, AND ISU

SAS Marketing Operations Management 6.0 R14 Update 2

Software Revision Control for MASS. Git Installation / Configuration / Use

Improving Your Life With Git

Git! Fundamentals. IT Pro Roundtable! June 17, 2014!! Justin Elliott! ITS / TLT! Classroom and Lab Computing!! Michael Potter!

CS 261 Recitation 1 Compiling C on UNIX

CS314 Software Engineering Configuration Management

My Enterprise Guide David Shannon, Amadeus Software Limited, UK

History...: Displays a window of Gitk, a standard commit viewer for Git.

Source Control: Subversion

Improved Database Development using SQL Compare

Programming with Haiku

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

Lecture Homepages as of FS 2017

CS 390 Software Engineering Lecture 5 More Git

Folders and Files. Folder

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

Git for Subversion users

Getting started with GitHub

XML Documentation for Adobe Experience Manager

Using an ICPSR set-up file to create a SAS dataset

Jahia Studio JAHIA DOCUMENTION

G E T T I N G S TA R T E D W I T H G I T

HOW CONVERSION WORKS...

Revision Control. An Introduction Using Git 1/15

BOKU staff members, BOKU students. ZID Hotline

Red Hat Developer Studio 12.9

Code and data management with Git. Department of Human Genetics Center for Human and Clinical Genetics

VISIOSVN. System Document

Revision control systems (RCS) and. Subversion

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

License. Introduction to Version Control with Git. Local Version Control Systems. Why Use Version Control?

SAS Marketing Operations Management 6.0 R14 Update 1

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Provisioning Systems and Other Ways to Share the Wealth of SAS Across a Network Jason Losh and Michael King, SAS Institute Inc.

Online Remote Repositories

PharmaSUG Paper PO10

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion

Transcription:

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

Extracting a Git Repository from SAS Enterprise Guide 7.1 Shahriar Khosravi BMO Financial Group, Canada ABSTRACT SAS Enterprise Guide 7.1 includes an easy-to-use change tracking capability that is based on the Git version control system. This feature allows the user to maintain and manage the history of changes to all scripts in SAS Enterprise Guide. Furthermore, the user has the ability to access and modify the existing history of an externally-controlled script from within SAS Enterprise Guide. Although this is an extremely useful feature, it does not currently support extracting the embedded Git repository. In some cases, it may be necessary to extract the embedded history for use outside of SAS Enterprise Guide. For example, as the number of contributors to a project grows, it may be more efficient to manage the version control process using an external application that supports branch creation and merging. The main objective of this e-poster is to demonstrate a way to extract the embedded Git repository from a SAS Enterprise Guide project. WHY Limitations of Version Control in SAS EG Multiple developers cannot contribute concurrently to the same project Not possible to create and maintain a central repository that multiple developers could interact with simultaneously No functionality for working on separate branches within the same project In some cases it may be necessary to extract the embedded repository and use it outside of SAS EG BACKGROUND HOW: STEP 1 Question from SAS Support Is it possible to extract the Git repository from a SAS EG project? SAS Response Save a backup copy of your SAS EG project Right-click on the EG project Select Rename to replace.egp with.zip This ticks your operating system into thinking that the SAS EG project is simply a compressed folder! SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

Extracting a Git Repository from SAS Enterprise Guide 7.1 Shahriar Khosravi BMO Financial Group, Canada HOW: STEP 2 Extract the contents of the compressed folder The extracted folder includes a Git repository containing the history of all scripts, if a Git repository is already initiated inside the SAS EG project HOW: STEP 3 Every script (or code) and its history is contained within a separate folder whose name starts with CodeTask- The XML file project.xml holds the mapping information for all scripts User can identify the folders based on the information inside the project.xml file SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

Extracting a Git Repository from SAS Enterprise Guide 7.1 Shahriar Khosravi BMO Financial Group, Canada HOW: STEP 4 User can rename the Git folder and its contents for ease of use and understanding This can be done in the Git version control system in order to keep the original histories, and the process can be automated HOW: STEP 5 When the renaming is done through Git using the git mv command, it becomes part of the existing history Once the renaming is complete, the repository may be managed using Git or any other version control system The Git folder is already a repository, so it may be opened using any front-end software for Git (e.g. Git GUI) It is also possible to view the Git history of an externally managed script within SAS EG Simply drag and drop the external script into the SAS EG project Click History from the top bar menu to view the external Git history SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

Paper 2132-2018 Extracting the Embedded Git Repository from a SAS Enterprise Guide 7.1 Project Shahriar Khosravi, BMO Financial Group ABSTRACT SAS Enterprise Guide 7.1 includes an easy-to-use change tracking capability that is based on the Git version control system. This feature allows the user to maintain and manage the history of changes to all scripts in SAS Enterprise Guide. Furthermore, the user has the ability to access and modify the existing history of an externally-controlled script from within SAS Enterprise Guide. Although this is an extremely useful feature, it does not currently support extracting the embedded Git repository. In some cases, it may be necessary to extract the embedded history for use outside of SAS Enterprise Guide. For example, as the number of contributors to a project grows, it may be more efficient to manage the version control process using an external application that supports branch creation and merging. The main objective of this paper is to demonstrate a way to extract the embedded Git repository from a SAS Enterprise Guide project. INTRODUCTION Version control is an essential part of any successful software development initiative for a number of reasons. First and foremost, version control allows efficient and organized tracking of code changes throughout the development process. Furthermore, it facilitates collaboration between multiple developers contributing to the same project without the risk of accidental rollbacks or development conflicts. It is therefore worthwhile to learn to use the code tracking capabilities that are readily available inside SAS Enterprise Guide. SAS Enterprise Guide provides a simplified version of the Git version control system for all scripts inside a project. This simplified variant of Git allows the user to initiate a repository within a project, make commits, review commit history, and revert back to previous versions of the code, all within Enterprise Guide. This is an extremely useful feature that every SAS Enterprise Guide user should become familiar with for efficient code development. While the version control feature inside SAS Enterprise Guide is extremely useful, it does not currently support extracting the embedded history from a project. In some cases, this could prove to be a significant limitation. For example, if the number of developers grows, it becomes increasingly difficult to keep passing around the same project to multiple developers and maintain the history of all scripts. In addition, the simplified Git system does not support branching or interaction with remote repositories. Although this is not a decisive limitation in small-scale projects, it is a significant shortfall for large-scale projects that arise from an initial SAS Enterprise Guide package. The main objective of this paper is to demonstrate a step-by-step approach for extracting the embedded Git repository from inside of a SAS Enterprise Guide project. At the time of writing the present paper, this workaround is most likely considered a hack, and not an officially endorsed solution by SAS. However, this approach will hopefully help those SAS Enterprise Guide users who have been looking for a way to accomplish this without success. ASSUMPTIONS Before we demonstrate the extraction process, it is important to note a few assumptions made throughout the present paper: 1) You have SAS Enterprise Guide installed on your personal computer, which runs on a Windows operating system; 1

2) You have an Enterprise Guide project with an existing Git history for some or all of its scripts; and 3) You have a front-end software (such as Git-GUI) installed on your personal computer for interacting with a Git repository. EXTRACTING THE GIT REPOSITORY We are now ready to demonstrate how an existing embedded Git repository may be extracted from a SAS Enterprise Guide project. We will showcase the process in a step-by-step fashion using illustrations in order to help the reader follow the procedure easily. STEP 1 It is essential to save a backup copy of your SAS Enterprise Guide project before attempting to follow this procedure. The reason is that during the extraction process, the Enterprise Guide project used will be converted to a compressed folder, and may no longer be usable. STEP 2 Right-click on the SAS Enterprise Guide project and select Rename in order to replace the.egp extension with.zip, as shown Figure 1. Figure 1. Rename the '.egp' extension to '.zip'. STEP 3 After the completion of Step 1, the Enterprise Guide project is converted to a compressed folder. The contents of this compressed folder may be extracted using any extraction utility, as shown in Figure 2. 2

Figure 2. Extract the contents of the compressed folder STEP 4 Once the compressed folder is unpacked, review the contents inside and locate the file project.xml, as shown in Figure 3. Figure 3. View the 'project.xml' file in any XML editor of your choice (e.g. Mozilla Firefox) This file contains the mapping between the scripts in your original SAS Enterprise Guide project and the folders contained in the current path. More specifically, each of the folders that begin with the phrase Code-Task contains one of the scripts in your original Enterprise Guide project. The project.xml file allows you to associate each one your original scripts inside the project with a Code-Task folder in the current path, as shown in Figure 4. 3

Figure 4. The 'project.xml' file allows you to identify the correct Code-Task folders containing the original scripts in your Enterprise Guide project Note that in the project.xml file, there exists an XML Label tag with the same name as the name of each of your original scripts in the project. The name of the corresponding Code-Task folders containing each of your scripts is included in the associated ID tag, as shown in Figure 4. STEP 5 Once all of the Code-Task folders have been identified, there remain two additional folders to be identified. One is intended to keep any logs saved as part of your original project, and its name begins with the phrase ProjectLog. This leaves us with only one remaining folder in the current path. This folder contains the Git history for all of the scripts in your original SAS Enterprise Guide project. This is illustrated in Figure 5. Figure 5. The remaining folder is the one that contains the Git history for all of the scripts in the Enterprise Guide project This highlighted folder is essentially a Git folder, and is readily available to be cloned or opened using any version control software that works with Git (e.g. Git-GUI). In our case, we will demonstrate how this step can be accomplished using Git-GUI for those readers who use the same software. This is illustrated in Figure 6. 4

Figure 6. Select 'Open Existing Repository' from Git-GUI and then choose the Git folder identified in this step This will open the existing repository and allow the user to interact with it using the full capabilities of the Git version control system. STEP 6 Now that the repository has been extracted, there is still one minor tweak that could be extremely useful. Recall that the original scripts from the SAS Enterprise Guide project are contained in folders inside the extracted repository. The name of these folders begins with the phrase Code-Task and is followed by a string of characters that are not very descriptive for the purpose of code tracking. In order to solve this issue, the user may simply rename each folder to the same name of the original scripts using the Git mv command, as shown in Figure 7. Figure 7. Use the Git 'mv' command in order to rename the previously identified 'Code-Task' folders to the names of the corresponding scripts from the original Enterprise Guide project 5

When this renaming is accomplished using the Git mv command, it becomes part of the existing history and provides a checkpoint for the user to mark when the repository was extracted from SAS Enterprise Guide. Congratulations! You have successfully extracted the embedded Git repository from your Enterprise Guide project. Now, you are free to take full advantage of all of the capabilities provided by the Git version control system, or convert the repository to any other version control system of your choice for further use. CONCLUSION In this paper, we demonstrated a workaround to extract an embedded Git repository from a SAS Enterprise Guide project. This workaround involves converting the Enterprise Guide project to a compressed folder, and identifying the relevant Git folders for the purpose of accessing the existing history. ACKNOWLEDGMENTS The author gratefully acknowledges the encouragement and support provided by Anita Measey and Edmund Lee throughout the process of preparing this submission. Furthermore, financial support provided by BMO Financial Group is appreciated. RECOMMENDED READING For further information on using the Git version control system for the purpose of tracking code changes, please visit the following webpage: - https://git-scm.com/ CONTACT INFORMATION Your comments and questions on the workaround presented in this paper are valued and encouraged. Please feel free to contact the author at Shahriar.Khosravi@BMO.com or Shahriar.Khosravi@gmail.com. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies. 6