Skip to content

Commit

Permalink
Merge pull request #35 from Anaconda-Platform/description-in-default
Browse files Browse the repository at this point in the history
Include a null description: field in default project file
  • Loading branch information
havocp committed Mar 7, 2017
2 parents 71014f4 + 9f9d9ea commit 61ef8ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion anaconda_project/project_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def _default_content(self):

sections['icon'] = ("Set the 'icon' key to give your project an icon\n")

sections['description'] = ("Set a one-sentence-or-so 'description' key with project details\n")

sections['commands'] = ("In the commands section, list your runnable scripts, notebooks, and other code.\n" +
"Use `anaconda-project add-command` to add commands.\n")

Expand Down Expand Up @@ -147,7 +149,7 @@ def comment_out(comment):
if section_name == 'name':
default_name = os.path.basename(os.path.dirname(self.filename))
section_body = " " + json.dumps(default_name)
elif section_name in ('icon', ):
elif section_name in ('icon', 'description'):
section_body = "" # empty body means null, not empty string
elif section_name in ('channels', 'packages'):
section_body = " []"
Expand Down
4 changes: 4 additions & 0 deletions anaconda_project/test/test_project_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#
icon:
#
# Set a one-sentence-or-so 'description' key with project details
#
description:
#
# In the commands section, list your runnable scripts, notebooks, and other code.
# Use `anaconda-project add-command` to add commands.
#
Expand Down

0 comments on commit 61ef8ee

Please sign in to comment.