From 0e234afe09a6b4653fa9cd0d7ce411c31aeac7e7 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 21 Nov 2024 16:29:46 +0200 Subject: [PATCH] Add pre-commit hook and CI with mdformat (#5) --- .github/workflows/pre-commit.yml | 19 +++++++++ .mdformat.toml | 1 + .pre-commit-config.yaml | 13 ++++++ README.md | 22 ++++++++--- code-of-conduct/english.md | 60 ++++++++++++++++++++-------- code-of-conduct/greek.md | 68 +++++++++++++++++++++++--------- 6 files changed, 142 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .mdformat.toml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..9bc0dc3 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,19 @@ +name: Run pre-commit and autofix + +on: + pull_request: + branches: + - main + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - uses: pre-commit/action@v3.0.1 + - uses: pre-commit-ci/lite-action@v1.1.0 + if: always() diff --git a/.mdformat.toml b/.mdformat.toml new file mode 100644 index 0000000..4177879 --- /dev/null +++ b/.mdformat.toml @@ -0,0 +1 @@ +wrap = 90 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..97a7a72 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-yaml + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.19 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-gfm diff --git a/README.md b/README.md index d943583..a5c8b2a 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,33 @@ # PyGreece Community Knowledge Base -Connecting Python enthusiasts worldwide – fostering collaboration, inclusivity, and community growth. +Connecting Python enthusiasts worldwide – fostering collaboration, inclusivity, and +community growth. ## Background -Welcome to the Community repo of PyGreece. The Community repo stands as the knowledge base of the PyGreece Community. More detailed, it's an attempt to share with the world all the recourses and the processes we follow. +Welcome to the Community repo of PyGreece. The Community repo stands as the knowledge base +of the PyGreece Community. More detailed, it's an attempt to share with the world all the +recourses and the processes we follow. ## Sharing Knowledge -As mentioned above, we aim to share all resources we have inside this repository. We'll share detailed instructions on how someone can contribute to the repo soon :) +As mentioned above, we aim to share all resources we have inside this repository. We'll +share detailed instructions on how someone can contribute to the repo soon :) ## Greek Translation of the Python Documentation -One of our main project is the translation of the Python docs to the Greek language. You can find more information about the project [here](https://github.com/pygreece/python-docs-gr/). +One of our main project is the translation of the Python docs to the Greek language. You +can find more information about the project +[here](https://github.com/pygreece/python-docs-gr/). ## Join the PyGreece Discord Server -The PyGreece discord server aims to connect all the members of the greek python community in one place. You can join the server by following this link: https://discord.gg/gWcXmDw8Yj +The PyGreece discord server aims to connect all the members of the greek python community +in one place. You can join the server by following this link: +https://discord.gg/gWcXmDw8Yj ## PyGreece Code of Conduct -Please read carefully our code of conduct: [GR](https://github.com/pygreece/community/blob/update-readme/code-of-conduct/greek.md) / [EN](https://github.com/pygreece/community/blob/update-readme/code-of-conduct/english.md) +Please read carefully our code of conduct: +[GR](https://github.com/pygreece/community/blob/update-readme/code-of-conduct/greek.md) / +[EN](https://github.com/pygreece/community/blob/update-readme/code-of-conduct/english.md) diff --git a/code-of-conduct/english.md b/code-of-conduct/english.md index e2997ab..b76cf47 100644 --- a/code-of-conduct/english.md +++ b/code-of-conduct/english.md @@ -1,46 +1,72 @@ # PyGreece Code of Conduct -PyGreece is a community of developers that aims to network and collaborate with all Python developer communities in Greece. +PyGreece is a community of developers that aims to network and collaborate with all Python +developer communities in Greece. -We support the participation of every member of the Python community and we want all individuals who participate to have an enjoyable and satisfying experience. Consequently, all participants, speakers, members, organizers, and volunteers at any PyGreece event must abide by the following Code of Conduct. +We support the participation of every member of the Python community and we want all +individuals who participate to have an enjoyable and satisfying experience. Consequently, +all participants, speakers, members, organizers, and volunteers at any PyGreece event must +abide by the following Code of Conduct. ## Our community Some behaviors that describe a member of the PyGreece community are: -- We are always open to partnerships. Community members should always be open to collaboration with other members, new volunteers/developers. +- We are always open to partnerships. Community members should always be open to + collaboration with other members, new volunteers/developers. - We focus on what is best for the community. - We respect the processes set out in the community and work within them. -- We recognize time and effort. We respect the volunteer efforts that govern the Python community. We are thoughtful when referring to the efforts of others. -- We show empathy to other community members. We are careful in our communications, whether in person or online, and are considerate when approaching differing viewpoints. -- We respect others, their positions, their abilities, their commitments and their efforts. We are receptive to constructive feedback and criticism, as the experiences and skills of other members contribute to our overall efforts. -- We graciously accept constructive criticism. When we disagree, we are courteous in presenting our issues. -- We use welcoming and inclusive language. We welcome all who wish to participate in our activities, fostering an environment where everyone can participate and everyone can make a difference. +- We recognize time and effort. We respect the volunteer efforts that govern the Python + community. We are thoughtful when referring to the efforts of others. +- We show empathy to other community members. We are careful in our communications, + whether in person or online, and are considerate when approaching differing viewpoints. +- We respect others, their positions, their abilities, their commitments and their + efforts. We are receptive to constructive feedback and criticism, as the experiences and + skills of other members contribute to our overall efforts. +- We graciously accept constructive criticism. When we disagree, we are courteous in + presenting our issues. +- We use welcoming and inclusive language. We welcome all who wish to participate in our + activities, fostering an environment where everyone can participate and everyone can + make a difference. ## Our values -Every member of our community has the right to have their identity respected. The Python community is dedicated to providing a positive experience for everyone, regardless of age, gender identity and expression, sexual orientation, disability, physical appearance, body size, ethnicity, race, religion (or lack thereof), education, cultural and cognitive differences, or socioeconomic status. +Every member of our community has the right to have their identity respected. The Python +community is dedicated to providing a positive experience for everyone, regardless of age, +gender identity and expression, sexual orientation, disability, physical appearance, body +size, ethnicity, race, religion (or lack thereof), education, cultural and cognitive +differences, or socioeconomic status. ## Examples of inappropriate behavior - Harassment of any person in any form. - Intentional bullying, harassment or stalking. - Recording or taking screenshots of online activity for the purpose of harassment. -- Posting personal information of others, such as physical or email address, without express permission. +- Posting personal information of others, such as physical or email address, without + express permission. - Threats of violence or verbal abuse directed at another person. -- Inciting violence or harassment towards any person, including encouraging a person to commit suicide or self-harm. +- Inciting violence or harassment towards any person, including encouraging a person to + commit suicide or self-harm. - Creating additional online accounts for the purpose of harassing another person. -- Language and images in the online community on discord or in any venue, including speech, that sexualizes, insults, demeans or attacks groups or specific individuals. +- Language and images in the online community on discord or in any venue, including + speech, that sexualizes, insults, demeans or attacks groups or specific individuals. - Insults, slurs or jokes based on stereotypes. - Unwelcome sexual attention or advances. -- Persistent disruption of online community discord discussions, presentations or other events. +- Persistent disruption of online community discord discussions, presentations or other + events. - Continued personal communication after requests to discontinue such communication. -- Other behavior that is inappropriate for a professional audience that includes individuals from many different backgrounds. +- Other behavior that is inappropriate for a professional audience that includes + individuals from many different backgrounds. -Community members who are asked to stop any inappropriate behavior are expected to comply immediately. +Community members who are asked to stop any inappropriate behavior are expected to comply +immediately. ## Consequences -If a participant engages in behavior that violates this Code of Conduct, the PyGreece organizing team may take such action as it deems appropriate, including warning the offender or banning the offender (for life or for a specified period of time) from the community and community events. +If a participant engages in behavior that violates this Code of Conduct, the PyGreece +organizing team may take such action as it deems appropriate, including warning the +offender or banning the offender (for life or for a specified period of time) from the +community and community events. -**Thank you for helping to make PyGreece a welcoming and friendly community for everyone.** +**Thank you for helping to make PyGreece a welcoming and friendly community for +everyone.** diff --git a/code-of-conduct/greek.md b/code-of-conduct/greek.md index f21ad3f..e4f826f 100644 --- a/code-of-conduct/greek.md +++ b/code-of-conduct/greek.md @@ -1,46 +1,78 @@ # Κώδικας Δεοντολογίας PyGreece -Το PyGreece είναι μια κοινότητα προγραμματιστών που έχει ώς στόχο την δικτύωση και συνεργασία όλων των κοινοτήτων προγραμματιστών Python στην Ελλάδα. +Το PyGreece είναι μια κοινότητα προγραμματιστών που έχει ώς στόχο την δικτύωση και +συνεργασία όλων των κοινοτήτων προγραμματιστών Python στην Ελλάδα. -Στηρίζουμε την συμμετοχή κάθε μέλους της κοινότητας Python και θέλουμε όλοι τα ατομα που συμμετέχουν να έχουν μια ευχάριστη και ικανοποιητική εμπειρία. Κατα συνέπεια, όλοι οι συμμετέχοντες, ομιλητές, μέλη, διοργανωτές και εθελοντές σε κάθε εκδήλωση του PyGreece οφείλουν να συμμορφώνονται με τον ακόλουθο Κώδικα Δεοντολογίας. +Στηρίζουμε την συμμετοχή κάθε μέλους της κοινότητας Python και θέλουμε όλοι τα ατομα που +συμμετέχουν να έχουν μια ευχάριστη και ικανοποιητική εμπειρία. Κατα συνέπεια, όλοι οι +συμμετέχοντες, ομιλητές, μέλη, διοργανωτές και εθελοντές σε κάθε εκδήλωση του PyGreece +οφείλουν να συμμορφώνονται με τον ακόλουθο Κώδικα Δεοντολογίας. ## Η κοινότητα μας Κάποιες συμπεριφορές που περιγράφουν ένα μέλος της κοινότητας PyGreece είναι: -- Είμαστε πάντα ανοιχτοί σε συνεργασίες. Τα μέλη της κοινότητας θα πρέπει πάντα να είναι ανοιχτά στη συνεργασία με άλλα μέλη, νέους εθελοντές/προγραμματιστές. +- Είμαστε πάντα ανοιχτοί σε συνεργασίες. Τα μέλη της κοινότητας θα πρέπει πάντα να είναι + ανοιχτά στη συνεργασία με άλλα μέλη, νέους εθελοντές/προγραμματιστές. - Επικεντρωνόμαστε στο τι είναι καλύτερο για την κοινότητα. - Σεβόμαστε τις διαδικασίες που ορίζονται στην κοινότητα και εργαζόμαστε εντός αυτών. -- Αναγνωρίζουμε τον χρόνο και την προσπάθεια. Σεβόμαστε τις εθελοντικές προσπάθειες που διέπουν την κοινότητα Python. Είμαστε προσεκτικοί όταν αναφερόμαστε στις προσπάθειες των άλλων. -- Δείχνουμε ενσυναίσθηση προς τα άλλα μέλη της κοινότητας. Είμαστε προσεκτικοί στην επικοινωνία μας, είτε αυτοπροσώπως, είτε διαδικτυακά, και είμαστε διακριτικοί όταν προσεγγίζουμε διαφορετικές απόψεις. -- Σεβόμαστε τους άλλους, τις θέσεις τους, τις ικανότητές τους, τις δεσμεύσεις τους και τις προσπάθειές τους. Είμαστε δεκτικοί σε εποικοδομητικά σχόλια και κριτική, καθώς οι εμπειρίες και οι δεξιότητες των άλλων μελών συμβάλλουν στο σύνολο των προσπαθειών μας. -- Δεχόμαστε με ευγένεια την εποικοδομητική κριτική. Όταν διαφωνούμε, είμαστε ευγενικοί στο να παρουσιάζουμε τα θέματά μας. -- Χρησιμοποιούμε φιλόξενη και χωρίς αποκλεισμούς γλώσσα. Δεχόμαστε όλους όσους επιθυμούν να συμμετάσχουν στις δραστηριότητές μας, καλλιεργώντας ένα περιβάλλον όπου ο καθένας μπορεί να συμμετέχει και όλοι μπορούν να κάνουν τη διαφορά. +- Αναγνωρίζουμε τον χρόνο και την προσπάθεια. Σεβόμαστε τις εθελοντικές προσπάθειες που + διέπουν την κοινότητα Python. Είμαστε προσεκτικοί όταν αναφερόμαστε στις προσπάθειες των + άλλων. +- Δείχνουμε ενσυναίσθηση προς τα άλλα μέλη της κοινότητας. Είμαστε προσεκτικοί στην + επικοινωνία μας, είτε αυτοπροσώπως, είτε διαδικτυακά, και είμαστε διακριτικοί όταν + προσεγγίζουμε διαφορετικές απόψεις. +- Σεβόμαστε τους άλλους, τις θέσεις τους, τις ικανότητές τους, τις δεσμεύσεις τους και τις + προσπάθειές τους. Είμαστε δεκτικοί σε εποικοδομητικά σχόλια και κριτική, καθώς οι + εμπειρίες και οι δεξιότητες των άλλων μελών συμβάλλουν στο σύνολο των προσπαθειών μας. +- Δεχόμαστε με ευγένεια την εποικοδομητική κριτική. Όταν διαφωνούμε, είμαστε ευγενικοί στο + να παρουσιάζουμε τα θέματά μας. +- Χρησιμοποιούμε φιλόξενη και χωρίς αποκλεισμούς γλώσσα. Δεχόμαστε όλους όσους επιθυμούν + να συμμετάσχουν στις δραστηριότητές μας, καλλιεργώντας ένα περιβάλλον όπου ο καθένας + μπορεί να συμμετέχει και όλοι μπορούν να κάνουν τη διαφορά. ## Οι αξίες μας -Κάθε μέλος της κοινότητάς μας έχει το δικαίωμα σεβασμού προς την ταυτότητά του/της. Η κοινότητα Python είναι αφοσιωμένη στην παροχή θετικής εμπειρίας για όλους, ανεξάρτητα από την ηλικία, την ταυτότητα και την έκφραση φύλου, τον σεξουαλικό προσανατολισμό, την αναπηρία, τη σωματική εμφάνιση, το μέγεθος σώματος, την εθνικότητα, τη φυλή, τη θρησκεία (ή την έλλειψη αυτής), την εκπαίδευση, τις πολιτισμικές και γνωστικές διαφοροποιήσεις ή την κοινωνικοοικονομική κατάσταση. +Κάθε μέλος της κοινότητάς μας έχει το δικαίωμα σεβασμού προς την ταυτότητά του/της. Η +κοινότητα Python είναι αφοσιωμένη στην παροχή θετικής εμπειρίας για όλους, ανεξάρτητα από +την ηλικία, την ταυτότητα και την έκφραση φύλου, τον σεξουαλικό προσανατολισμό, την +αναπηρία, τη σωματική εμφάνιση, το μέγεθος σώματος, την εθνικότητα, τη φυλή, τη θρησκεία +(ή την έλλειψη αυτής), την εκπαίδευση, τις πολιτισμικές και γνωστικές διαφοροποιήσεις ή +την κοινωνικοοικονομική κατάσταση. ## Παραδείγματα ανάρμοστης συμπεριφοράς - Παρενόχληση οποιουδήποτε ατόμου με οποιαδήποτε μορφή. - Εσκεμμένος εκφοβισμός, παρενόχληση ή παρακολούθηση. -- Καταγραφή ή λήψη στιγμιότυπων οθόνης της διαδικτυακής δραστηριότητας για σκοπούς παρενόχλησης. -- Δημοσίευση προσωπικών πληροφοριών άλλων, όπως φυσική ή ηλεκτρονική διεύθυνση, χωρίς ρητή άδεια. +- Καταγραφή ή λήψη στιγμιότυπων οθόνης της διαδικτυακής δραστηριότητας για σκοπούς + παρενόχλησης. +- Δημοσίευση προσωπικών πληροφοριών άλλων, όπως φυσική ή ηλεκτρονική διεύθυνση, χωρίς ρητή + άδεια. - Βίαιες απειλές ή γλώσσα που στρέφεται κατά άλλου προσώπου. -- Υποκίνηση βίας ή παρενόχλησης προς οποιοδήποτε άτομο, συμπεριλαμβανομένης της ενθάρρυνσης ενός ατόμου να αυτοκτονήσει ή να αυτοτραυματιστεί. +- Υποκίνηση βίας ή παρενόχλησης προς οποιοδήποτε άτομο, συμπεριλαμβανομένης της + ενθάρρυνσης ενός ατόμου να αυτοκτονήσει ή να αυτοτραυματιστεί. - Δημιουργία πρόσθετων διαδικτυακών λογαριασμών με σκοπό την παρενόχληση άλλου ατόμου. -- Γλώσσα και εικόνες στη διαδικτυακή κοινότητα στο discord ή σε οποιονδήποτε χώρο εκδήλωσης, συμπεριλαμβανομένων των ομιλιών, που σεξουαλικοποιούν, προσβάλλουν, εξευτελίζουν ή επιτίθενται σε ομάδες ή συγκεκριμένα άτομα. +- Γλώσσα και εικόνες στη διαδικτυακή κοινότητα στο discord ή σε οποιονδήποτε χώρο + εκδήλωσης, συμπεριλαμβανομένων των ομιλιών, που σεξουαλικοποιούν, προσβάλλουν, + εξευτελίζουν ή επιτίθενται σε ομάδες ή συγκεκριμένα άτομα. - Προσβολές, υποτιμήσεις ή αστεία που βασίζονται σε στερεότυπα. - Ανεπιθύμητη σεξουαλική προσοχή ή προσέγγιση. -- Διαρκής διακοπή των συζητήσεων της διαδικτυακής κοινότητας στο discord, των παρουσιάσεων ή άλλων εκδηλώσεων. +- Διαρκής διακοπή των συζητήσεων της διαδικτυακής κοινότητας στο discord, των παρουσιάσεων + ή άλλων εκδηλώσεων. - Συνέχιση της προσωπικής επικοινωνίας μετά από αιτήματα διακοπής αυτής. -- Άλλη συμπεριφορά που είναι ακατάλληλη για ένα επαγγελματικό ακροατήριο που περιλαμβάνει άτομα με πολλές διαφορετικές καταβολές. +- Άλλη συμπεριφορά που είναι ακατάλληλη για ένα επαγγελματικό ακροατήριο που περιλαμβάνει + άτομα με πολλές διαφορετικές καταβολές. -Τα μέλη της κοινότητας που καλούνται να σταματήσουν οποιαδήποτε ανάρμοστη συμπεριφορά αναμένεται να συμμορφωθούν αμέσως. +Τα μέλη της κοινότητας που καλούνται να σταματήσουν οποιαδήποτε ανάρμοστη συμπεριφορά +αναμένεται να συμμορφωθούν αμέσως. ## Συνέπειες -Εάν ένας συμμετέχων επιδεικνύει συμπεριφορά που παραβιάζει τον παρόντα Κώδικα Δεοντολογίας, η διαχειριστική ομάδα του PyGreece δύναται να λάβει μέτρα που κρίνει κατάλληλα, συμπεριλαμβανομένης της προειδοποίησης του παραβάτη ή της αποβολής του (δια βίου ή και για συγκεκριμένο χρονικό διάστημα) από την κοινότητα και τις εκδηλώσεις της κοινότητας. +Εάν ένας συμμετέχων επιδεικνύει συμπεριφορά που παραβιάζει τον παρόντα Κώδικα +Δεοντολογίας, η διαχειριστική ομάδα του PyGreece δύναται να λάβει μέτρα που κρίνει +κατάλληλα, συμπεριλαμβανομένης της προειδοποίησης του παραβάτη ή της αποβολής του (δια +βίου ή και για συγκεκριμένο χρονικό διάστημα) από την κοινότητα και τις εκδηλώσεις της +κοινότητας. -**Σας ευχαριστούμε που βοηθάτε να γίνει το PyGreece μια φιλόξενη και φιλική κοινότητα για όλους.** +**Σας ευχαριστούμε που βοηθάτε να γίνει το PyGreece μια φιλόξενη και φιλική κοινότητα για +όλους.**