Difference between revisions of "Iegitaddmd"
Kbjarkefur (talk | contribs) |
Kbjarkefur (talk | contribs) |
||
Line 13: | Line 13: | ||
=== Intended Work Flow === | === Intended Work Flow === | ||
'' | Since this command is intended to be used on projects using GitHub, this section assumes basic understanding of GitHub terminology. | ||
'''General work flow'''. If you are collaborating on a project using GitHub and if you have empty folders that you want to share with all collaborators on the project, use iegitadd on the top folder and a place holder file will be added to the folder or any subfolder that is currently empty. | |||
'''Work flow with iefolder''' The intended work flow together with [iefolder] is that you first use iefolder to create a project folder and then create the survey round and/or unit-of-observation folders that you need immediately using the ''round'' and ''unitofobs'' options. Then commit the files created by iefolder before moving on. Then use iegitaddmd to populate all empty folders with placeholder files so that the full folder structure can be committed to the repository. Since both these two commands creates many files and because the types of files are very different (iefolder creates files intended to be used, but iegitaddmd only creates placeholder files) it is best practice to split this into two separate commits where the purpose of the files can be explained differently. But technically it can be done in one commit. When you want to add more survey round and/or unit-of-observation folders later into your project, you simply repeat these two steps to share the full folder structure of the newly added folders. | |||
== Instructions == | == Instructions == |
Revision as of 17:24, 11 January 2018
Empty folders are ignored by GitHub and therefore not shared across project teams, but in research we often want to share template folder structures for new projects where some folders might be empty. iegitaddmd is used to create placeholder files in empty folders so that template project folder structures can be shared on GitHub even if some folders are note yet populated with project files.
This article is means to describe use cases, work flow and the reasoning used when developing the commands. For instructions on how to use the command specifically in Stata and for a complete list of the options available, see the help files by typing help iegitaddmd
in Stata. This command is a part of the package ietoolkit, to install all the commands in this package including this command, type ssc install ietoolkit
in Stata.
Intended use cases
It is common and highly recommended to use folder templates for new projects. Many organizations has folder structures templates and at DIME we have developed a command that set ups the folder structure for a new project with just one line of code. See iefolder. iefolder can also add more folder to a project folder that was initially set up with iefolder. For example, if you want to add an endline folder with sub-folders to a project folder that had only a baseline folder before.
When folder templates are used to create a project folder or add a survey round folder it is common that empty folders are created. For example, templates often include a Output folder where analysis output will be stored, but that folder will remain empty while the data set is cleaned and prepared for analysis. Let's say two people, person A and person B collaborate on a project using GitHub, and person B used a template like iefolder to create the project folder. If person A would do the first to do the analysis then there would be no Output folder for person A to store the outputs. Person A could of course create an output folder and call it anything, but that would defy the whole purpose of using a template in the first place.
iegitaddmd provides a solution to this. It creates a placeholder file in any empty folder called README.md in the project folder specified. Then these folders can be included in a commit on GitHub. You may remove these files as soon as these fodlers are populated with project files, but a better practice might be to update the text to describe and document the files in that folder.
Instead of the README.md file iegitaddmd produces you can specify a file saved to your computer that you want to use as placeholder file. It is strongly recommended that you use a raw text file format for this file, such as .md, .txt etc. Any code file like .do, .sthlp, .R, .py etc. are also raw text formats. If the format is .md and the file is named README (like the default file created by iegitaddmd) then the content of the file is displayed in the browser when someone browses to that folder on github.com.
Intended Work Flow
Since this command is intended to be used on projects using GitHub, this section assumes basic understanding of GitHub terminology.
General work flow. If you are collaborating on a project using GitHub and if you have empty folders that you want to share with all collaborators on the project, use iegitadd on the top folder and a place holder file will be added to the folder or any subfolder that is currently empty.
Work flow with iefolder The intended work flow together with [iefolder] is that you first use iefolder to create a project folder and then create the survey round and/or unit-of-observation folders that you need immediately using the round and unitofobs options. Then commit the files created by iefolder before moving on. Then use iegitaddmd to populate all empty folders with placeholder files so that the full folder structure can be committed to the repository. Since both these two commands creates many files and because the types of files are very different (iefolder creates files intended to be used, but iegitaddmd only creates placeholder files) it is best practice to split this into two separate commits where the purpose of the files can be explained differently. But technically it can be done in one commit. When you want to add more survey round and/or unit-of-observation folders later into your project, you simply repeat these two steps to share the full folder structure of the newly added folders.
Instructions
These instructions are meant to help you understand how to use the command. For technical instructions on how to implement the command in Stata see the help files by typing help iegitaddmd
in Stata.
Describe best practices related to this command here.
Reasoning used during development
Describe any non obvious decisions made during development of this command. This can help explain restrictions and requirements
Back to Parent
This article is part of the topic ietoolkit