Skip to content

Commit

Permalink
Update to simplify cookie cutter names, #2
Browse files Browse the repository at this point in the history
  • Loading branch information
HarinarayanKrishnan committed Feb 11, 2019
1 parent 7424487 commit 4596c8d
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 22 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ cookiecutter.project_name }}
{{ cookiecutter.display_name }}
===============================

version number: {{ cookiecutter.plugin_version }}
Expand All @@ -14,7 +14,7 @@ Installation / Usage

To install use pip:

$ pip install {{ cookiecutter.project_name }}
$ pip install Xi-cam.plugins.{{ cookiecutter.package_name }}


Or clone the repo:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# {{ cookiecutter.project_name }} documentation build configuration file, created by
# {{ cookiecutter.package_name }} documentation build configuration file, created by
# cookiecutter pipproject
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -48,7 +48,7 @@
master_doc = 'index'

# General information about the project.
project = '{{ cookiecutter.project_name }}'
project = '{{ cookiecutter.package_name }}'
copyright = '2016, {{ cookiecutter.author_name }}'
author = '{{ cookiecutter.author_name }}'

Expand Down Expand Up @@ -123,7 +123,7 @@

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#html_title = '{{ cookiecutter.project_name }} v{{ cookiecutter.plugin_version }}'
#html_title = '{{ cookiecutter.package_name }} v{{ cookiecutter.plugin_version }}'

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
Expand Down Expand Up @@ -205,7 +205,7 @@
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = '{{ cookiecutter.project_name }}doc'
htmlhelp_basename = '{{ cookiecutter.package_name }}doc'

# -- Options for LaTeX output ---------------------------------------------

Expand All @@ -227,7 +227,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, '{{ cookiecutter.project_name }}.tex', '{{ cookiecutter.project_name }} Documentation',
(master_doc, '{{ cookiecutter.package_name }}.tex', '{{ cookiecutter.package_name }} Documentation',
'{{ cookiecutter.author_name }}', 'manual'),
]

Expand Down Expand Up @@ -257,7 +257,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, '{{ cookiecutter.project_name }}', '{{ cookiecutter.project_name }} Documentation',
(master_doc, '{{ cookiecutter.package_name }}', '{{ cookiecutter.package_name }} Documentation',
[author], 1)
]

Expand All @@ -271,8 +271,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, '{{ cookiecutter.project_name }}', '{{ cookiecutter.project_name }} Documentation',
author, '{{ cookiecutter.project_name }}', 'One line description of project.',
(master_doc, '{{ cookiecutter.package_name }}', '{{ cookiecutter.package_name }} Documentation',
author, '{{ cookiecutter.package_name }}', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Welcome to {{ cookiecutter.project_name }}'s documentation!
Welcome to {{ cookiecutter.display_name }}'s documentation!
=========================================

Contents:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
dependency_links = [x.strip().replace('git+', '') for x in all_reqs if x.startswith('git+')]

setup(
name='{{cookiecutter.app_name}}',
name='xicam.{{cookiecutter.package_name}}',
version=__version__,
description='{{cookiecutter.description}}',
long_description=long_description,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Core]
Name = {{cookiecutter.plugin_name}}
Name = {{cookiecutter.package_name}}
Module = {{cookiecutter.plugin_file_name}}

[Documentation]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import pyqtgraph as pg
from xicam.core import msg
from xicam.plugins import GUIPlugin, GUILayout

class {{cookiecutter.plugin_name}}(GUIPlugin):
name = '{{cookiecutter.plugin_name}}'
class {{cookiecutter.package_name}}(GUIPlugin):
name = '{{cookiecutter.package_name}}'

# insert GUI plugin generation
{{cookiecutter.plugin_code}}

def __init__(self, *args, **kwargs):
# insert auto generation
self.stages = {{cookiecutter.stages_code}}
super({{cookiecutter.plugin_name}}, self).__init__(*args,**kwargs)
super({{cookiecutter.package_name}}, self).__init__(*args,**kwargs)



10 changes: 4 additions & 6 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"core_name": "xicam",
"project_name": "test",
"app_name": "",
"plugin_name": "test",
"plugin_version": "",
"package_name": "test",
"display_name": "My First Test Plugin",
"plugin_version": "1.0.0",
"plugin_file_name": "__init__.py",
"author_name": "",
"author_email": "",
"author_url": "",
"description": "",
"keywords": "",
"keywords": "Xi-cam, plugin",
"dependencies": "",
"plugin_code": "",
"stages_code": "{'Stage 1': GUILayout(QLabel('Stage 1'))}",
Expand Down

0 comments on commit 4596c8d

Please sign in to comment.