This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
48 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,23 +60,23 @@ $ cookiecutter gh:spyder-ide/spyder-plugin-cookiecutter | |
|
||
You'll be prompted for some values. and after that the repo will be generated | ||
|
||
Normally you don't need to change `project_name` and `repo_name`. | ||
Normally you don't need to change `python_package_name` and `git_repo_name`. | ||
|
||
Example: | ||
|
||
``` | ||
author [Spyder Project Contributors]: | ||
email [[email protected]]: | ||
plugin_name [Demo]: | ||
git_repo_name [spyder-demo]: | ||
python_package_name [spyder_demo]: | ||
description [Plugin for Spyder IDE.]: | ||
version [0.1.0]: | ||
author [Spyder Project Contributors]: | ||
email [[email protected]]: | ||
github_username [spyder-ide]: | ||
plugin_name [Demo Plugin]: Reports | ||
repo_name [spyder-reports]: | ||
project_name [spyder_reports]: | ||
description [Plugin for Spyder IDE.]: Spyder Plugin for Markdown reports for Pweave | ||
version [0.1.0]: | ||
create_config_page [n]: | ||
use_ciocheck [y]: | ||
support_python_2 [n]: | ||
spyder3_compatibility [y]: | ||
graphical_plugin [y]: | ||
create_config_page [n]: | ||
support_python_2 [n]: | ||
spyder3_compatibility [n]: | ||
``` | ||
|
||
## Testing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"author": "Spyder Project Contributors", | ||
"email": "[email protected]", | ||
"github_username": "spyder-ide", | ||
"plugin_name": "Demo", | ||
"repo_name": "spyder-{{ cookiecutter.plugin_name.lower().replace(' ', '-')}}", | ||
"project_name": "{{ cookiecutter.repo_name.replace('-', '_') }}", | ||
"git_repo_name": "spyder-{{ cookiecutter.plugin_name.lower().replace(' ', '-')}}", | ||
"python_package_name": "{{ cookiecutter.git_repo_name.replace('-', '_') }}", | ||
"description": "Plugin for Spyder IDE.", | ||
"version": "0.1.0", | ||
"author": "Spyder Project Contributors", | ||
"email": "[email protected]", | ||
"github_username": "spyder-ide", | ||
"create_config_page": "n", | ||
"use_ciocheck": "y", | ||
"support_python_2": "n", | ||
"spyder3_compatibility": "n", | ||
"graphical_plugin": "y" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[tool:pytest] | ||
norecursedirs = {{\ cookiecutter.repo_name\ }} | ||
norecursedirs = {{\ cookiecutter.git_repo_name\ }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ def context(): | |
'email': '[email protected]', | ||
'github_username': 'spyder-ide', | ||
'plugin_name': 'Demo', | ||
'repo_name': 'spyder-demo', | ||
'project_name': 'spyder_demo', | ||
'git_repo_name': 'spyder-demo', | ||
'python_package_name': 'spyder_demo', | ||
'description': 'Plugin for Spyder IDE.', | ||
'version': '0.1.0', | ||
} | ||
|
@@ -24,8 +24,8 @@ def non_graphical(): | |
'email': '[email protected]', | ||
'github_username': 'spyder-ide', | ||
'plugin_name': 'Demo-nongraphic', | ||
'repo_name': 'spyder-demo-nongraphic', | ||
'project_name': 'spyder_demo_nongraphic', | ||
'git_repo_name': 'spyder-demo-nongraphic', | ||
'python_package_name': 'spyder_demo_nongraphic', | ||
'description': 'Plugin for Spyder IDE.', | ||
'version': '0.1.0', | ||
'graphical_plugin': 'n' | ||
|
@@ -36,7 +36,7 @@ def test_default_configuration(cookies, context): | |
result = cookies.bake(extra_context=context) | ||
assert result.exit_code == 0 | ||
assert result.exception is None | ||
assert result.project.basename == context['repo_name'] | ||
assert result.project.basename == context['git_repo_name'] | ||
assert result.project.isdir() | ||
|
||
# Test creation of project files | ||
|
@@ -54,7 +54,7 @@ def test_default_configuration(cookies, context): | |
project_files = ['widgets', 'assets', 'demoplugin.py', '_version.py', | ||
'__init__.py', 'tests'] | ||
|
||
project_dir = result.project.join(context['project_name']) | ||
project_dir = result.project.join(context['python_package_name']) | ||
found_project_files = [f.basename for f in project_dir.listdir()] | ||
|
||
for path in project_files: | ||
|
@@ -66,7 +66,7 @@ def test_non_graphical_configuration(cookies, non_graphical): | |
result = cookies.bake(extra_context=non_graphical) | ||
assert result.exit_code == 0 | ||
assert result.exception is None | ||
assert result.project.basename == non_graphical['repo_name'] | ||
assert result.project.basename == non_graphical['git_repo_name'] | ||
assert result.project.isdir() | ||
|
||
# Test creation of project files | ||
|
@@ -84,7 +84,7 @@ def test_non_graphical_configuration(cookies, non_graphical): | |
project_files = ['assets', 'demo-nongraphicplugin.py', '_version.py', | ||
'__init__.py', 'tests'] | ||
|
||
project_dir = result.project.join(non_graphical['project_name']) | ||
project_dir = result.project.join(non_graphical['python_package_name']) | ||
found_project_files = [f.basename for f in project_dir.listdir()] | ||
|
||
for path in project_files: | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{%- if cookiecutter.support_python_2 == 'y' -%} | ||
[bdist_wheel] | ||
universal=1 | ||
|
||
{% endif -%} | ||
|
||
[tool:pytest] | ||
addopts =-x -v -rw --durations=10 --cov={{ cookiecutter.python_package_name }} --cov-report=term-missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.