Skip to content
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

📄 Improve documentation #10

Merged
merged 6 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
74 changes: 74 additions & 0 deletions .github/ISSUE_TEMPLATE/template_cleanup_bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Template cleanup bug report
description: Issue regarding the repository cleanup when using this template.

title: 'Bug: '
labels: ['bug']
assignees:
- Anatole-DC

body:
# Introduction
- type: markdown
attributes:
value: |
Welcome to the python_template action cleanup bug report !
If you have created a python project by using this template and the cleanup action failed, then you are at the right place.

# The project description
- type: dropdown
id: project-status
attributes:
label: Your project visibility
description: What is the visibility of your project
options:
- Public
- Private
validations:
required: true

# Project link
- type: input
id: project-link
attributes:
label: Project url (if public repository)
description: Your project github url
placeholder: ex. https://github.com/user/project
validations:
required: false

# The ci-cd failed steps
- type: dropdown
id: ci-cd-steps
attributes:
label: At which step did the ci-cd failed ?
multiple: true
options:
- Make script executable
- Cleanup README
- Cleanup code
- Cleanup configs
- Update project description
- Remove cleanup files
- Commit to repository
- None of the above
validations:
required: true

# Description of what happened
- type: textarea
id: what-failed
attributes:
label: Failure description
description: Please describe in a few word what happened during the cleanup.
validations:
required: true

# CI/CD logs
- type: textarea
id: logs
attributes:
label: CI/CD logs
description: Please copy and paste the action relevant logs output.
render: shell
validations:
required: true
78 changes: 78 additions & 0 deletions .github/ISSUE_TEMPLATE/template_feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Template feature request
description: Issue regarding the wanted new features for this template.

title: 'Feature: '
labels: ['enhancement']
assignees:
- Anatole-DC

body:
# Introduction
- type: markdown
attributes:
value: |
Welcome to the python_template feature request form !
If you like to use this template but you think it lacks some features, then you are at the right place.

- type: markdown
attributes:
value: |
This project was created as a python project starter that uses poetry as a dependency manager.
Therefore, requests regarding very specific dependencies (like Flask or OpenCV) or extensive features will be considered as out of this project's scope.

- type: checkboxes
id: terms
attributes:
label: Term validation
options:
- label: I agree with the terms of the feature request
required: true

- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false

# The areas concerned by the feature
- type: dropdown
id: feature-range
attributes:
label: Range of the project concerned by the feature
multiple: true
options:
- CI/CD
- Documentation
- Code cleanup
- Project dependencies
validations:
required: true

- type: textarea
id: current-state-issue
attributes:
label: Describe the current issue
description: Explain what do you think is currently missing, and why it's an issue to you.
placeholder: The project lacks...
validations:
required: true

- type: textarea
id: feature-solution
attributes:
label: Describe the solution to the issue
description: Explain what solution you thought to the issue and how it solves it.
placeholder: The project should implement...
validations:
required: true

- type: textarea
id: feature-ideal-behavior
attributes:
label: Further description of the feature
description: Describe how would you want to use the feature.
validations:
required: false
2 changes: 1 addition & 1 deletion .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
CAPITALIZED_NAME=$(echo "${{ github.event.repository.name }}" | sed -E 's/([a-z0-9])([A-Z])/\1 \2/g; s/[-_]/ /g' | tr '[:lower:]' '[:upper:]')
./script/rename.sh -f README.md --find "PYTHON TEMPLATE" --replace-with "${CAPITALIZED_NAME}"
./script/rename.sh -f README.md --from 12 --to 15 --replace-with "\\"
./script/rename.sh -f README.md --from 12 --to 24 --replace-with "\\"
./script/rename.sh -f README.md --find "Anatole-DC/template_python" --replace-with "${GITHUB_REPOSITORY}"
./script/rename.sh -f README.md --find "template_python" --replace-with ${{ github.event.repository.name }}
./script/rename.sh -f README.md --find "Anatole de Chauveron" --replace-with "${GITHUB_REPOSITORY_OWNER}"
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ _<h4 align="center">Base template repository for python projects.</h4>_

To get started, you can [use this template](https://github.com/new?template_name=template_python&template_owner=Anatole-DC) from the repository on github. This will create a new repository with this template as base structure.

You will need to rename all "python_template" mentions, in [this markdown](README.md), the [pyproject.toml file](pyproject.toml), the [launch.json](.vscode/launch.json), and the [library's root folder](python_template/).
When the repository will be created, a [cleanup action](.github/workflows/cleanup.yml) will be triggered and will remove all template related name by the new repository informations. The following changes will be applied :
- All the following will be replaced by your repository's name in snake case :
- The code source directory (currently "python_template")
- All occurences of `python_template` in the [pyproject.toml](pyproject.toml) file and the [.vscode launch configs](.vscode/launch.json).
- The [README subtitle](README.md#L3) and the pyproject.toml will be replaced by your repository description
- All mentions of the author will be replaced by the repository owner's github name
- All github urls will be updated to match the new repository urls

> The cleanup action will be triggered once and then all related files will be deleted (including the action).
> If an error occures during the process, please [report an issue](https://github.com/Anatole-DC/template_python/issues) for the problem to be fixed as soon as possible.

___

Expand Down
Loading