Skip to content

Commit 302585b

Browse files
init testing, linter, pytest, code refresh (#31)
1 parent 98f3fff commit 302585b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2629
-2364
lines changed

Diff for: .editorconfig

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@ root = true
33
[*]
44
charset = utf-8
55
end_of_line = lf
6-
trim_trailing_whitespace = true
76
insert_final_newline = true
8-
indent_style = tab
7+
indent_style = space
98
indent_size = 2
9+
trim_trailing_whitespace = true
1010

1111
[*.{cmd,bat}]
1212
end_of_line = crlf
1313

14-
[*.{yml,yaml,pages,md,markdown}]
15-
indent_style = space
16-
17-
[*.py]
14+
[*.{py,pyi}]
1815
indent_style = space
1916
indent_size = 4

Diff for: .gitattributes

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
###############################
2-
# Git Line Endings #
3-
###############################
4-
51
# Set default behaviour to automatically normalize line endings.
62
* text=auto eol=lf
73

@@ -17,4 +13,5 @@
1713
# Common files config
1814
*.jpg -text
1915
*.png -text
16+
*.gif -text
2017
*.pdf -text

Diff for: .github/CODE_OF_CONDUCT.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# 🔰 Contributor Covenant Code of Conduct
2+
3+
## 🤝 Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## ✅ Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what's best not just for us as individuals but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
- The use of sexualized language or imagery and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## 📝 Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct and will communicate reasons for moderation decisions when appropriate.
32+
33+
## 🔭 Scope
34+
35+
This Code of Conduct applies within all community spaces and when an individual officially represents the community in public spaces. Representing our community includes using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## 🚓 Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for the enforcement at [LinkedIn message](https://www.linkedin.com/in/DariuszPorowski). All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders must respect the privacy and security of the reporter of any incident.
42+
43+
## 🛂 Enforcement Guidelines
44+
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46+
47+
### 1. Correction
48+
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50+
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52+
53+
### 2. Warning
54+
55+
**Community Impact**: A violation through a single incident or series of actions.
56+
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces and external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58+
59+
### 3. Temporary Ban
60+
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62+
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64+
65+
### 4. Permanent Ban
66+
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
69+
**Consequence**: A permanent ban from any sort of public interaction within the community.
70+
71+
## 🔗 Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74+
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76+
77+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78+
79+
[homepage]: https://www.contributor-covenant.org
80+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81+
[Mozilla CoC]: https://github.com/mozilla/diversity
82+
[FAQ]: https://www.contributor-covenant.org/faq
83+
[translations]: https://www.contributor-covenant.org/translations

Diff for: .github/CONTRIBUTING.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# 👥 Contributing Guide
2+
3+
I appreciate your interest in contributing to the project! This document outlines how to contribute to the project, including the contribution process, code style, and testing.
4+
5+
## 🔄️ Contribution process
6+
7+
To contribute, please follow these steps:
8+
9+
1. Fork the project repository on GitHub.
10+
1. Create a new branch for your feature or bug fix.
11+
1. Setup development environment.
12+
13+
```shell
14+
# install pipx
15+
python3 -m pip install --user pipx
16+
pipx ensurepath
17+
18+
# install poetry + plugins
19+
pipx install poetry
20+
pipx inject poetry poetry-plugin-up
21+
pipx inject poetry poetry-dynamic-versioning
22+
pipx inject poetry poethepoet
23+
24+
# install project dependencies
25+
poetry install
26+
27+
# bump dependencies to the latest
28+
poetry up --latest
29+
30+
# do test build
31+
poetry build
32+
```
33+
34+
1. Make your changes.
35+
1. Lint and validate your code.
36+
37+
```shell
38+
poetry run pre-commit run --all-files
39+
```
40+
41+
1. Commit your changes.
42+
1. Make sure the `README.md` and any other relevant documentation are kept up-to-date.
43+
1. Make your changes and commit them with descriptive commit messages; check [Conventional Commits](https://www.conventionalcommits.org) as a suggestion.
44+
1. Push to your forked repository.
45+
1. Create a new pull request from your fork to this project.
46+
1. Please ensure that your pull request includes a detailed description of your changes and that your code adheres to the code style guidelines outlined below.
47+
48+
## 🔰 Code of Conduct
49+
50+
All contributors are expected to adhere to the project name code of conduct. Therefore, please review it before contributing [`Code of Conduct`](./CODE_OF_CONDUCT.md).
51+
52+
## 📄 License
53+
54+
By contributing to this project, you agree that your contributions will be licensed under the project license.
55+
56+
Thank you for contributing!

Diff for: .github/ISSUE_TEMPLATE/bug.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
3+
name: 🐛 Bug Report
4+
description: If something isn't working 🔧
5+
title: "[bug]: "
6+
labels: [bug]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: Thanks for taking the time to fill out this bug report!
11+
- type: textarea
12+
id: what-happened
13+
attributes:
14+
label: 🐛 What happened?
15+
description: A clear and concise description of what the bug is.
16+
placeholder: A clear and concise description of what the bug is.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: reproduce
21+
attributes:
22+
label: 🔬 How to reproduce?
23+
description: Steps to reproduce the behavior.
24+
placeholder: |
25+
1. ...
26+
2. ...
27+
validations:
28+
required: false
29+
- type: textarea
30+
id: code-sample
31+
attributes:
32+
label: 🏗️ Code Sample / Log
33+
description: Please copy and paste any relevant code sample / log output.
34+
render: Shell
35+
placeholder: This will be automatically formatted into code, so no need for backticks.
36+
validations:
37+
required: false
38+
- type: input
39+
id: self
40+
attributes:
41+
label: 🌌 Environment (plugin version)
42+
description: What `mkdocs-file-filter-plugin` version are you running?
43+
placeholder: 0.8.0
44+
validations:
45+
required: true
46+
- type: dropdown
47+
id: os
48+
attributes:
49+
label: 🌌 Environment (OS)
50+
description: What agent OS are you running?
51+
options:
52+
- Linux
53+
- Windows
54+
- macOS
55+
validations:
56+
required: false
57+
- type: input
58+
id: python
59+
attributes:
60+
label: 🌌 Environment (Python)
61+
description: "What python version are you running? Get it with: `python --version`"
62+
placeholder: 3.10.9
63+
validations:
64+
required: false
65+
- type: input
66+
id: mkdocs
67+
attributes:
68+
label: 🌌 Environment (MkDocs)
69+
description: "What mkdocs version are you running? Get it with: `mkdocs --version`"
70+
placeholder: 1.4.3
71+
validations:
72+
required: false
73+
- type: textarea
74+
id: screenshots
75+
attributes:
76+
label: 📷 Screenshots
77+
description: If applicable, add screenshots to help explain your problem.
78+
placeholder: Just do Ctrl+V having screenshot in the clipboard.
79+
validations:
80+
required: false
81+
- type: textarea
82+
id: expected-behavior
83+
attributes:
84+
label: 📈 Expected behavior
85+
description: A clear and concise description of what you expected to happen.
86+
placeholder: A clear and concise description of what you expected to happen.
87+
validations:
88+
required: false
89+
- type: textarea
90+
id: additional-context
91+
attributes:
92+
label: 📎 Additional context
93+
description: Add any other context about the problem here.
94+
placeholder: Add any other context about the problem here.
95+
validations:
96+
required: false
97+
- type: checkboxes
98+
id: terms
99+
attributes:
100+
label: 📜 Code of Conduct
101+
description: By submitting this issue, you agree to follow our [`Code of Conduct`](https://github.com/DariuszPorowski/mkdocs-file-filter-plugin/blob/main/CODE_OF_CONDUCT.md)
102+
options:
103+
- label: I agree to follow this project's Code of Conduct.
104+
required: true

Diff for: .github/ISSUE_TEMPLATE/config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2+
---
3+
blank_issues_enabled: false
4+
# contact_links:
5+
# - name: Support
6+
# url: https://www.linkedin.com/in/DariuszPorowski
7+
# about: Request support

Diff for: .github/ISSUE_TEMPLATE/feature-request.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
3+
name: 🚀 Feature request
4+
description: Suggest an idea for this project 🏖
5+
title: "[feature]: "
6+
labels: [enhancement]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: Thanks for taking the time to fill out this new feature idea!
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: 🚀 Feature description
15+
description: A clear and concise description of the feature proposal.
16+
placeholder: A clear and concise description of the feature proposal.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: motivation
21+
attributes:
22+
label: 🔈 Motivation
23+
description: Please describe the motivation for this proposal.
24+
placeholder: Please describe the motivation for this proposal.
25+
validations:
26+
required: false
27+
- type: textarea
28+
id: alternatives
29+
attributes:
30+
label: 🛰 Alternatives
31+
description: A clear and concise description of any alternative solutions or features you've considered.
32+
placeholder: A clear and concise description of any alternative solutions or features you've considered.
33+
validations:
34+
required: false
35+
- type: textarea
36+
id: additional-context
37+
attributes:
38+
label: 📎 Additional context
39+
description: Add any other context or screenshots about the feature request here.
40+
placeholder: Add any other context or screenshots about the feature request here.
41+
validations:
42+
required: false
43+
- type: checkboxes
44+
id: terms
45+
attributes:
46+
label: 📜 Code of Conduct
47+
description: By submitting this issue, you agree to follow our [`Code of Conduct`](https://github.com/DariuszPorowski/mkdocs-file-filter-plugin/blob/main/CODE_OF_CONDUCT.md)
48+
options:
49+
- label: I agree to follow this project's Code of Conduct.
50+
required: true

Diff for: .github/ISSUE_TEMPLATE/question.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
3+
name: ❓ Question
4+
description: Ask a question about this project 🎓
5+
title: "[question]: "
6+
labels: [question]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: Thanks for taking the time to fill out this new feature idea!
11+
- type: checkboxes
12+
id: checklist
13+
attributes:
14+
label: ✅ Checklist
15+
description: Mark with an ✔️ all the checkboxes that apply.
16+
options:
17+
- label: I've searched the project's [`issues`](https://github.com/DariuszPorowski/mkdocs-file-filter-plugin/issues?q=is%3Aissue) and did not find answer for my question.
18+
required: true
19+
- type: textarea
20+
id: question
21+
attributes:
22+
label: ❓ Question
23+
description: What is your question?
24+
placeholder: |
25+
How can I ...?
26+
Is it possible to ...?
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: additional-context
31+
attributes:
32+
label: 📎 Additional context
33+
description: Add any other context or screenshots about the question here.
34+
placeholder: Add any other context or screenshots about the question here.
35+
validations:
36+
required: false
37+
- type: checkboxes
38+
id: terms
39+
attributes:
40+
label: 📜 Code of Conduct
41+
description: By submitting this issue, you agree to follow our [`Code of Conduct`](https://github.com/DariuszPorowski/mkdocs-file-filter-plugin/blob/main/CODE_OF_CONDUCT.md)
42+
options:
43+
- label: I agree to follow this project's Code of Conduct.
44+
required: true

0 commit comments

Comments
 (0)