diff --git a/cookiecutter.json b/cookiecutter.json index ce9a0e2df47eb35dbb22b0a931dd6b5a675e8c71..3871822a153dd0e50d1df21f14d036c5a60263e1 100755 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -5,6 +5,7 @@ "project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '_') }}", "version": "0.1.0", "description": "The {{ cookiecutter.project_name }} project", - "gitlab_username": "{{cookiecutter.email.split('@')[0]}}", - "gitlab_repo_path": "https://git.km3net.de/{{ cookiecutter.gitlab_username + '/' + cookiecutter.project_slug }}" + "gitlab_username_or_group": "{{cookiecutter.email.split('@')[0]}}", + "gitlab_repo_url": "https://git.km3net.de/{{ cookiecutter.gitlab_username_or_group }}/{{ cookiecutter.project_slug }}", + "gitlab_pages_url": "https://{{ cookiecutter.gitlab_username_or_group }}.pages.km3net.de/{{ cookiecutter.project_slug }}" } diff --git a/hooks/post_gen_project.sh b/hooks/post_gen_project.sh index 075d3b9186384edf1df7a763ceda37b502bd4636..7563198fd1b5e488144829889202a229ac293c44 100644 --- a/hooks/post_gen_project.sh +++ b/hooks/post_gen_project.sh @@ -3,7 +3,7 @@ git init --initial-branch=main git add . git commit -m 'Initial commit' git tag -a 'v{{cookiecutter.version}}' -m 'Release {{cookiecutter.version}}' -git remote add origin git@git.km3net.de:{{cookiecutter.gitlab_username_or_group}}/{{cookiecutter.package_name}}.jl.git +git remote add origin git@git.km3net.de:{{cookiecutter.gitlab_username_or_group}}/{{cookiecutter.project_name}}.git git push -u origin main git push --tags echo diff --git a/{{cookiecutter.project_slug}}/CONTRIBUTING.rst b/{{cookiecutter.project_slug}}/CONTRIBUTING.rst index 95fe7f67d44f9318e8f73d1719c8361456c5c1a3..c32ec758e0c2c8bb3cddaaa860a9c6fc03cd762c 100644 --- a/{{cookiecutter.project_slug}}/CONTRIBUTING.rst +++ b/{{cookiecutter.project_slug}}/CONTRIBUTING.rst @@ -6,9 +6,9 @@ need a new feature. Emails and private messages are not meant to communicate such things! Use the appropriate template and file a new issue here: -{{cookiecutter.gitlab_repo_path}}/issues +{{cookiecutter.gitlab_repo_url}}/issues -You can browse all the issues here: {{cookiecutter.gitlab_repo_path}}/issues +You can browse all the issues here: {{cookiecutter.gitlab_repo_url}}/issues Please follow the instructions in the templates to provide all the necessary information which will help other people to understand the @@ -17,7 +17,7 @@ situation. Improve ------- -Check out our KanBan board {{cookiecutter.gitlab_repo_path}}/boards, +Check out our KanBan board {{cookiecutter.gitlab_repo_url}}/boards, which shows all the open issues in three columns: - *discussion*: The issues which are yet to be discussed (e.g. not clear how to proceed) @@ -39,7 +39,7 @@ a merge request, so we can review, discuss and add your contribution. Merge requests are automatically tested on our GitLab CI server and you don't have to do anything special. -Go to {{cookiecutter.gitlab_repo_path}} and click on "Fork". +Go to {{cookiecutter.gitlab_repo_url}} and click on "Fork". After that, you will have a full copy of the code with write access under an URL like this: ``https://git.km3net.de/YOUR_USERNAME/{{cookiecutter.project_slug}}`` @@ -55,7 +55,7 @@ Now you need to add a reference to the original repository, so you can sync your own fork with the original repository:: cd {{cookiecutter.project_slug}} - git remote add upstream {{cookiecutter.gitlab_repo_path}} + git remote add upstream {{cookiecutter.gitlab_repo_url}} Keep your Fork Up to Date @@ -153,7 +153,7 @@ matches the one we love and respect. We have a tool which makes it easy:: Create a Merge Request (aka Pull Request) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Go to {{cookiecutter.gitlab_repo_path}}/merge_requests/new and select your +Go to {{cookiecutter.gitlab_repo_url}}/merge_requests/new and select your source branch, which contains the changes you want to be added to this project and select the ``master`` branch as target branch. diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 94e95e62ad3e0a6b6030192abb658093852348df..b402dd07b4ee9437772af0dcf2325417c31df735 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -1,14 +1,14 @@ {{cookiecutter.description}} {% for i in range(cookiecutter.description|length) %}={% endfor %} -.. image:: {{cookiecutter.gitlab_repo_path}}/badges/master/pipeline.svg - :target: {{cookiecutter.gitlab_repo_path}}/pipelines +.. image:: {{cookiecutter.gitlab_repo_url}}/badges/master/pipeline.svg + :target: {{cookiecutter.gitlab_repo_url}}/pipelines -.. image:: {{cookiecutter.gitlab_repo_path}}/badges/master/coverage.svg - :target: https://{{cookiecutter.gitlab_username}}.pages.km3net.de/{{cookiecutter.project_slug}}/coverage +.. image:: {{cookiecutter.gitlab_repo_url}}/badges/master/coverage.svg + :target: https://{{cookiecutter.gitlab_username_or_group}}.pages.km3net.de/{{cookiecutter.project_slug}}/coverage .. image:: https://git.km3net.de/examples/km3badges/-/raw/master/docs-latest-brightgreen.svg - :target: https://{{cookiecutter.gitlab_username}}.pages.km3net.de/{{cookiecutter.project_slug}} + :target: https://{{cookiecutter.gitlab_username_or_group}}.pages.km3net.de/{{cookiecutter.project_slug}} Installation @@ -17,14 +17,14 @@ Installation It is recommended to first create an isolated virtualenvironment to not interfere with other Python projects:: - git clone {{cookiecutter.gitlab_repo_path}} + git clone {{cookiecutter.gitlab_repo_url}} cd {{cookiecutter.project_slug}} python3 -m venv venv . venv/bin/activate Install directly from the Git server via ``pip`` (no cloneing needed):: - pip install git+{{cookiecutter.gitlab_repo_path}} + pip install git+{{cookiecutter.gitlab_repo_url}} Or clone the repository and run:: diff --git a/{{cookiecutter.project_slug}}/doc/index.rst b/{{cookiecutter.project_slug}}/doc/index.rst index 316db9264ece867da07af13948a31f574d8f122b..1c3d0cedd5381c21c439fe3e342039953da782da 100644 --- a/{{cookiecutter.project_slug}}/doc/index.rst +++ b/{{cookiecutter.project_slug}}/doc/index.rst @@ -11,8 +11,8 @@ autoapi/index - Code Coverage <http://{{cookiecutter.gitlab_username}}.pages.km3net.de/{{cookiecutter.project_slug}}/coverage> - Source (Git) <{{cookiecutter.gitlab_repo_path}}> + Code Coverage <http://{{cookiecutter.gitlab_username_or_group}}.pages.km3net.de/{{cookiecutter.project_slug}}/coverage> + Source (Git) <{{cookiecutter.gitlab_repo_url}}> diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 0055855678089a9dc9a8d100f28435c6c9ff6948..b50e65d92030828d39f999ac972ff68e0d8311b2 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -3,7 +3,7 @@ name = {{cookiecutter.project_slug}} description = {{cookiecutter.description}} long_description = file: README.rst long_description_content_type = text/x-rst -url = {{cookiecutter.gitlab_repo_path}} +url = {{cookiecutter.gitlab_repo_url}} author = {{cookiecutter.author}} author_email = {{cookiecutter.email}} maintainer = {{cookiecutter.author}}