Skip to content

Commit

Permalink
Update/issue template (#55)
Browse files Browse the repository at this point in the history
* remove previous issue template

* add new issue template

* `CHANGELOG.md` updated

* apply feedbacks

* update discord link

* add `bug_report.yml` to `version_check.py`

* apply `autopep8.sh`
  • Loading branch information
AHReccese authored Feb 12, 2025
1 parent 6a87740 commit 1e99b6c
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 18 deletions.
13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

100 changes: 100 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Thanks for your time to fill out this bug report!
- 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
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Provide a clear and concise description of what the bug is.
placeholder: >
Tell us a description of the bug.
validations:
required: true
- type: textarea
id: step-to-reproduce
attributes:
label: Steps to reproduce
description: Provide details of how to reproduce the bug.
placeholder: >
ex. 1. Go to '...'
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: What did you expect to happen?
placeholder: >
ex. I expected '...' to happen
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
description: What did actually happen?
placeholder: >
ex. Instead '...' happened
validations:
required: true
- type: dropdown
id: operating-system
attributes:
label: Operating system
description: Which operating system are you using?
options:
- Windows
- macOS
- Linux
default: 0
validations:
required: true
- type: dropdown
id: python-version
attributes:
label: Python version
description: Which version of Python are you using?
options:
- Python 3.13
- Python 3.12
- Python 3.11
- Python 3.10
- Python 3.9
- Python 3.8
- Python 3.7
- Python 3.6
- Python 3.5
default: 1
validations:
required: true
- type: dropdown
id: dmeta-version
attributes:
label: DMeta version
description: Which version of DMeta are you using?
options:
- DMeta 0.3
- DMeta 0.2
- DMeta 0.1
default: 0
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Discord
url: https://discord.com/invite/626twyuPZG
about: Ask questions and discuss with other DMeta community members
- name: Website
url: https://openscilab.com/
about: Check out our website for more information
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature Request
description: Suggest a feature for this project
title: "[Feature]: "
body:
- type: textarea
id: description
attributes:
label: Describe the feature you want to add
placeholder: >
I'd like to be able to [...]
validations:
required: true
- type: textarea
id: possible-solution
attributes:
label: Describe your proposed solution
placeholder: >
I think this could be done by [...]
validations:
required: false
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered, if relevant
placeholder: >
Another way to do this would be [...]
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: >
Add any other context or screenshots about the feature request here.
validations:
required: false
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added
- modern issue template structure
- `--info` flag in CLI
### Removed
- old issue template structure
## [0.3] - 2025-01-13
### Removed
- `extract_namespaces` function in `util.py`
Expand Down
10 changes: 5 additions & 5 deletions dmeta/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def overwrite_metadata(
:param xml_path: path to the XML file to be updated
:type xml_path: str
:param metadata: a dictionary containing metadata to overwrite the XML elements with, or `None`
:param metadata: a dictionary containing metadata to overwrite the XML elements with, or `None`
to reset
:type metadata: dict
:param is_core: a flag that indicates whether the given XML file is the core.xml file
Expand Down Expand Up @@ -56,8 +56,8 @@ def clear(microsoft_file_name, in_place=False):
app_xml_path = os.path.join(doc_props_dir, "app.xml")

overwrite_metadata(core_xml_path)
overwrite_metadata(app_xml_path,is_core=False)
overwrite_metadata(app_xml_path, is_core=False)

modified = microsoft_file_name
if not in_place:
modified = microsoft_file_name[:microsoft_file_name.rfind('.')] + "_cleared" + "." + microsoft_format
Expand Down Expand Up @@ -109,8 +109,8 @@ def update(config_file_name, microsoft_file_name, in_place=False):
:return: None
"""
config = read_json(config_file_name)
personal_fields_core_xml = {e:v for e,v in CORE_XML_MAP.items() if e in config}
personal_fields_app_xml = {e:v for e,v in APP_XML_MAP.items() if e in config}
personal_fields_core_xml = {e: v for e, v in CORE_XML_MAP.items() if e in config}
personal_fields_app_xml = {e: v for e, v in APP_XML_MAP.items() if e in config}

has_core_tags = len(personal_fields_core_xml) > 0
has_app_tags = len(personal_fields_core_xml) > 0
Expand Down
2 changes: 2 additions & 0 deletions otherfiles/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"[{0}]:"]
PARAMS_ITEMS = ['DMETA_VERSION = "{0}"']
META_ITEMS = ['% set version = "{0}" %']
ISSUE_TEMPLATE_ITEMS = ["- DMeta {0}"]
SECURITY_ITEMS = ["| {0} | :white_check_mark: |", "| < {0} | :x: |"]

FILES = {
Expand All @@ -28,6 +29,7 @@
"CHANGELOG.md": CHANGELOG_ITEMS,
"SECURITY.md": SECURITY_ITEMS,
os.path.join("dmeta", "params.py"): PARAMS_ITEMS,
os.path.join(".github", "ISSUE_TEMPLATE", "bug_report.yml"): ISSUE_TEMPLATE_ITEMS,
}

TEST_NUMBER = len(FILES)
Expand Down

0 comments on commit 1e99b6c

Please sign in to comment.