Skip to content

Commit 7a0d8ab

Browse files
committed
Improve contribution resources
1 parent dcdb566 commit 7a0d8ab

File tree

4 files changed

+33
-16
lines changed

4 files changed

+33
-16
lines changed

.github/ISSUE_TEMPLATE/bug-or-crash-report.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,40 @@ assignees: ''
77

88
---
99

10-
**Describe the bug**
10+
### Describe the bug
1111
<!-- A clear and concise description of what the bug is. -->
1212

13-
**To Reproduce**
13+
### To Reproduce
14+
1415
Steps to reproduce the behavior:
1516

1617
1. Go to '...'
1718
2. Click on '....'
1819
3. Scroll down to '....'
1920
4. See error
2021

21-
**Expected behavior**
22+
### Expected behavior
2223
<!-- A clear and concise description of what you expected to happen. -->
2324

24-
**Screenshots and recordings**
25+
### Screenshots and recordings
2526
<!-- If applicable, add screenshots and/or recordings to help explain your problem. -->
2627

27-
**Traceback or Crash Report**
28+
### Traceback or Crash Report
29+
2830
If AutoSplit showed an exception traceback, please paste it here:
2931

30-
```
32+
```py
3133

3234
```
3335
<!-- If AutoSplit crashed and closed without saying anything, please check Windows' Event Viewer, under Windows Logs > Application, for any recent error relating to AutoSplit -->
3436

35-
**Version (please complete the following information):**
37+
### Version (please complete the following information)
3638

3739
- OS: [e.g. Windows 10.0.19045]
3840
- AutoSplit: [e.g. v2.0.0]
3941

40-
**AutoSplit Profile and Split Images**
42+
### AutoSplit Profile and Split Images
4143
<!-- Please include your AutoSplit profile `.toml` file. You can also add your Split Images if relevant. -->
4244

43-
**Additional context**
45+
### Additional context
4446
<!-- Add any other context about the problem here. -->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
10+
### Is your feature request related to a problem? Please describe
1111
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1212

13-
**Describe the solution you'd like**
13+
### Describe the solution you'd like
1414
<!-- A clear and concise description of what you want to happen. -->
1515

16-
**Describe alternatives you've considered**
16+
### Describe alternatives you've considered
1717
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1818

19-
**Additional context**
19+
### Additional context
2020
<!-- Add any other context or screenshots about the feature request here. -->
2121
<!-- Please include an AutoSplit profile `.toml` file and/or Split Images if relevant. -->

docs/CONTRIBUTING.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Refer to the [build instructions](/docs/build%20instructions.md) if you're inter
88

99
## Linting and formatting
1010

11-
The project is setup to automatically configure VSCode witht he proper extensions and settings. Linters and formatters will be run on save.
11+
The project is setup to automatically configure VSCode with the proper extensions and settings. Fixers and formatters will be run on save.
1212
If you use a different IDE or for some reason cannot / don't want to use the recommended extensions, you can run `scripts/lint.ps1`.
13+
Project configurations for other IDEs are welcome.
1314

1415
If you like to use pre-commit hooks, `.pre-commit-config.yaml` is setup for such uses.
1516

@@ -28,6 +29,16 @@ Your Pull Request has to pass all checks ot be accepted. If it is still a work-i
2829
Most coding standards will be enforced by automated tooling.
2930
As time goes on, project-specific standards and "gotchas" in the frameworks we use will be listed here.
3031

32+
### Keep shipped dependencies and bundle size low
33+
34+
The bigger the bundle, the longer it takes to boot single-file executables. That is because we need to ship everything and the bootloader basically has to extract it all.
35+
Our main use case is a single-file that is as easy to use as possible for the end user.
36+
Keeping install time, build time and bandwith as low as possible is also a nice-to-have.
37+
38+
You should also consider whether the work the dependency is doing is simple enough that you could implement it yourself.
39+
40+
For these reasons, it's important to consider the impacts of adding any new dependency bundled with AutoSplit.
41+
3142
### Magic numbers
3243

3344
Please avoid using magic numbers and prefer constants and enums that have a meaningful name when possible.
@@ -38,6 +49,10 @@ For image shape and channels, please use `utils.ImageShape` and `utils.ColorChan
3849

3950
To avoid image shape mismatch issues, and to keep code simpler, we standardize the image color format to BGRA. This should always be done early in the pipeline, so whatever functionality takes care of obtaining an image should also ensure its color format. You can do so with `cv2.cvtColor` (ie: `cv2.cvtColor(image, cv2.COLOR_RGBA2BGRA)` or `cv2.cvtColor(image, cv2.COLOR_BGR2BGRA)`).
4051

52+
### Split-specific setting overrides
53+
54+
Whenever a split image overrides a default global setting, we add a getter that handles the logic of checking for a split-specific override, then falling back to globals. This avoids repeating the fallback logic in multiple places. See `AutoSpitImage.get_*` methods for examples.
55+
4156
## Testing
4257

43-
None 😦 Please help us create test suites, we lack the time, but we really want (need!) them. <https://github.com/Toufool/AutoSplit/issues/216>
58+
None 😦 Please help us create test suites, we lack the time, but we really want (*need!*) them. <https://github.com/Toufool/AutoSplit/issues/216>

src/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def open_file(file_path: str | bytes | os.PathLike[str] | os.PathLike[bytes]):
129129
import subprocess # noqa: PLC0415, S404
130130

131131
opener = "xdg-open" if sys.platform == "linux" else "open"
132-
subprocess.call([opener, file_path]) # noqa: S603
132+
subprocess.call([opener, file_path]) # noqa: S603
133133

134134

135135
def get_or_create_eventloop():

0 commit comments

Comments
 (0)