-
-
Notifications
You must be signed in to change notification settings - Fork 8
Ensure references to the repository url are consistent across all templates #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0501039
Ensure references to the repository url are consistent across all tem…
ericof f4d1d9f
Merge branch 'main' into issue-221
stevepiercy 3850c93
Apply suggestions from code review
ericof b4a6c08
Apply suggestions from code review
ericof f0fc717
Apply suggestions from code review
ericof e3de1e8
Reorder instructions for Volto installation
ericof 6b457cf
Properly indent code blocks to belong to their list items
stevepiercy 46863f6
GitHub UI wouldn't allow the suggestion to be committed, so manual it is
stevepiercy 440f4f8
Fix tests
ericof 25e5ed2
Apply suggestions from code review
ericof 28998e1
Update templates/sub/project_settings/{{ cookiecutter.__folder_name }…
ericof b7c5b1d
Update templates/sub/project_settings/cookiecutter.json
ericof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
Unify usage of path to the repository on templates. @ericof | ||
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"initialize_documentation": ["1", "0"], | ||
"__project_slug": "{{ cookiecutter.python_package_name }}", | ||
"__repository_url": "https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__repository_git": "[email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__feature_headless": "{{ cookiecutter.feature_headless }}", | ||
"__feature_distribution": "0", | ||
"__package_path": "{{ cookiecutter.python_package_name | package_path }}", | ||
|
This file contains hidden or 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,17 @@ | ||
"""Pre generation hook.""" | ||
|
||
from collections import OrderedDict | ||
from pathlib import Path | ||
|
||
output_path = Path().resolve() | ||
|
||
context: OrderedDict = {{cookiecutter}} | ||
|
||
|
||
def main(): | ||
"""Validate context.""" | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -5,12 +5,12 @@ | |
"email": "[email protected]", | ||
"github_organization": "collective", | ||
"initialize_git": ["1", "0"], | ||
"plone_version": "6.0", | ||
"__folder_name": "{{ cookiecutter.github_organization|lower }}.{{ cookiecutter.title|replace(' ', '')|replace('-', '_')|replace('.', '')|lower }}", | ||
"__normalized_package_name": "{{ cookiecutter.title|replace(' ', '')|replace('-', '_')|replace('.', '')|lower }}", | ||
"__project_slug": "{{ cookiecutter.__normalized_package_name }}", | ||
"__repository_url": "https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__repository_git": "[email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__year": "{% now 'local', '%Y' %}", | ||
"__profile_language": "en", | ||
"__version_package": "1.0.0a0", | ||
"__generator_date_long": "{% now 'utc', '%Y-%m-%d %H:%M:%S' %}", | ||
"__generator_signature": "This was generated by the [cookieplone-templates documentation_starter template](https://github.com/plone/cookieplone-templates/tree/main/documentation_starter) on {{ cookiecutter.__generator_date_long }}", | ||
"__documentation_starter_format": "1", | ||
|
17 changes: 17 additions & 0 deletions
17
templates/add-ons/documentation_starter/hooks/pre_gen_project.py
This file contains hidden or 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,17 @@ | ||
"""Pre generation hook.""" | ||
|
||
from collections import OrderedDict | ||
from pathlib import Path | ||
|
||
output_path = Path().resolve() | ||
|
||
context: OrderedDict = {{cookiecutter}} | ||
|
||
|
||
def main(): | ||
"""Validate context.""" | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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.
File renamed without changes.
This file contains hidden or 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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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.
File renamed without changes.
This file contains hidden or 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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
"initialize_documentation": ["1", "0"], | ||
"__project_slug": "{{ cookiecutter.frontend_addon_name }}", | ||
"__repository_url": "https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__repository_git": "[email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__folder_name": "{{ cookiecutter.frontend_addon_name }}", | ||
"__npm_package_name": "{{ cookiecutter.npm_package_name }}", | ||
"__version_frontend_package": "1.0.0-alpha.0", | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"homepage": "{{ cookiecutter.__repository_url }}#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}.git" | ||
"url": "{{ cookiecutter.__repository_git }}" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
|
@@ -26,6 +26,7 @@ | |
"release-major-alpha": "release-it major --preRelease=alpha", | ||
"release-alpha": "release-it --preRelease=alpha" | ||
}, | ||
"addons": [], | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"react": "18.2.0", | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
"initialize_documentation": ["1", "0"], | ||
"__project_slug": "{{ cookiecutter.project_slug }}", | ||
"__repository_url": "https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__repository_git": "[email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__version_package": "1.0.0a0", | ||
"__version_frontend_package": "1.0.0-alpha.0", | ||
"__feature_headless": "1", | ||
|
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -13,8 +13,9 @@ | |
|
||
Ensure you have the following installed: | ||
|
||
- Python 3.11 🐍 | ||
- UV 🐍 | ||
- Node {{ cookiecutter.__node_version }} 🟩 | ||
- git 🔗 | ||
- pnpm 🧶 | ||
- Docker 🐳 | ||
stevepiercy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
|
@@ -23,7 +24,7 @@ Ensure you have the following installed: | |
1. Clone the repository: | ||
ericof marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```shell | ||
git clone [email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}.git | ||
git clone {{ cookiecutter.__repository_git }}.git | ||
cd {{ cookiecutter.__project_slug }} | ||
``` | ||
|
||
|
This file contains hidden or 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,17 @@ | ||
"""Pre generation hook.""" | ||
|
||
from collections import OrderedDict | ||
from pathlib import Path | ||
|
||
output_path = Path().resolve() | ||
|
||
context: OrderedDict = {{cookiecutter}} | ||
|
||
|
||
def main(): | ||
"""Validate context.""" | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains hidden or 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 |
---|---|---|
|
@@ -7,13 +7,16 @@ | |
"python_package_name": "{{ cookiecutter.project_slug|replace(' ', '')|replace('-', '.') }}", | ||
"frontend_addon_name": "volto-{{ cookiecutter.python_package_name|replace('_', '-')|replace('.', '-') }}", | ||
"language_code": "en", | ||
"use_prerelease_versions": "{{ 'No' | use_prerelease_versions }}", | ||
"plone_version": "{{ 'No' | latest_plone }}", | ||
"volto_version": "{{ cookiecutter.use_prerelease_versions | latest_volto }}", | ||
"github_organization": "collective", | ||
"container_registry": ["github", "docker_hub", "gitlab"], | ||
"__feature_distribution": "0", | ||
"__backend_managed_by_uv": "false", | ||
"__project_slug": "{{ cookiecutter.python_package_name }}", | ||
"__project_slug": "{{ cookiecutter.project_slug }}", | ||
"__repository_url": "https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__repository_git": "[email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.__project_slug }}", | ||
"__npm_package_name": "{{ cookiecutter.frontend_addon_name }}", | ||
"__container_registry_prefix": "{{ cookiecutter.container_registry | image_prefix }}", | ||
"__container_image_prefix": "{{ cookiecutter.__container_registry_prefix }}{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}", | ||
|
@@ -25,7 +28,12 @@ | |
"__supported_versions_python": ["{{ cookiecutter.__python_version }}"], | ||
"__supported_versions_plone": ["{{ cookiecutter.plone_version | as_major_minor }}"], | ||
"__python_version_identifier": "{{ cookiecutter.__python_version | replace('.', '') }}", | ||
"__version_frontend_package": "1.0.0-alpha.0", | ||
"__version_plone_volto": "{{ cookiecutter.volto_version }}", | ||
"__version_plone_scripts": "^3.6.1", | ||
"__version_mrs_developer": "^2.2.0", | ||
"__version_pnpm": "9.1.1", | ||
"__version_release_it": "^17.1.1", | ||
"_copy_without_render": [], | ||
"_extensions": [ | ||
"cookieplone.filters.use_prerelease_versions", | ||
|
@@ -42,5 +50,9 @@ | |
"cookieplone.filters.latest_plone" | ||
], | ||
"__cookieplone_repository_path": "", | ||
"__cookieplone_template": "" | ||
"__cookieplone_template": "", | ||
"__generator_sha": "", | ||
"__generator_template_url": "https://github.com/plone/cookieplone-templates/tree/main/{{ cookiecutter.__cookieplone_template }}", | ||
"__generator_date_long": "{% now 'utc', '%Y-%m-%d %H:%M:%S' %}", | ||
"__generator_signature": "This was generated by [the cookieplone-templates {{ cookiecutter.__cookieplone_template }} template]({{ cookiecutter.__generator_template_url }}) on {{ cookiecutter.__generator_date_long }}" | ||
ericof marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.