-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support different names for base and non-base environment (#180)
* Set env_name when not in base environment * Add note that ENV_NAME will be added to shortcuts outside base environment * Specify that env_name only gets added on Windows * Add news * Remove one set of backtics * Escape curly braces * Add PR number to news * Do not change Windows shortcut name * Support different names for base and non-base environments * Change news item to new scope * Add tests for supporting different names for base and non-base environments * Make dict typing python 3.8 compatible * Simplify shortcuts for tests * Fix Linux shortcut names in test * Do not allow dicts for menu_name * Add missing platforms to menu-name.json * Update docs/source/defining-shortcuts.md Co-authored-by: Bianca Henderson <beeankha@gmail.com> * Apply suggestions from code review Co-authored-by: jaimergp <jaimergp@users.noreply.github.com> * Make target_environment keywords literals * Use resolve instead of absolute for prefix comparison * Use Path.samefile instead of absolute or resolve * Use TypedDict to represent target_env keys in schema * Use new model instead of TypedDict for easy python 3.8 compatibility * Update documentation * Apply suggestions from code review [skip ci] Co-authored-by: jaimergp <jaimergp@users.noreply.github.com> * Use self.env_name as ENV_NAME placeholder * Use menu prefix * Use menu base_prefix * Remove unnecessary sys import * Set enviornment name to base if prefix equals base_prefix * Remove or-clause for ENV_NAME placeholder --------- Co-authored-by: Bianca Henderson <beeankha@gmail.com> Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
- Loading branch information
1 parent
7da86ea
commit 0aa4be1
Showing
9 changed files
with
214 additions
and
16 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
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### Enhancements | ||
|
||
* Support different name for shortcuts within and outside base environment (support v1 behavior). (#180) | ||
|
||
### Bug fixes | ||
|
||
* <news item> | ||
|
||
### Deprecations | ||
|
||
* <news item> | ||
|
||
### Docs | ||
|
||
* <news item> | ||
|
||
### Other | ||
|
||
* <news item> |
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,38 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema", | ||
"$id": "https://schemas.conda.io/menuinst-1.schema.json", | ||
"menu_name": "Package", | ||
"menu_items": [ | ||
{ | ||
"name": { | ||
"target_environment_is_base": "A", | ||
"target_environment_is_not_base": "A_not_in_base" | ||
}, | ||
"description": "This will echo environment variables for test purposes", | ||
"icon": null, | ||
"command": [ | ||
"echo", | ||
"A" | ||
], | ||
"platforms": { | ||
"win": {}, | ||
"linux": {}, | ||
"osx": {} | ||
} | ||
}, | ||
{ | ||
"name": "B", | ||
"description": "This will echo environment variables for test purposes", | ||
"icon": null, | ||
"command": [ | ||
"echo", | ||
"B" | ||
], | ||
"platforms": { | ||
"win": {}, | ||
"linux": {}, | ||
"osx": {} | ||
} | ||
} | ||
] | ||
} |
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