Skip to content

Add django-commons CoC #120

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

Merged
merged 21 commits into from
Oct 5, 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
9 changes: 5 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ on:
workflow_dispatch:
inputs:
debug:
description: 'Set to on, to open ssh debug session.'
description: 'Open ssh debug session.'
required: true
default: 'off'
default: false
type: boolean

jobs:

Expand Down Expand Up @@ -60,11 +61,11 @@ jobs:
poetry run pip install colorama
poetry run pip install -U "django~=${{ matrix.django-version }}"
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ on:
workflow_dispatch:
inputs:
debug:
description: 'Set to on, to open ssh debug session.'
description: 'Open ssh debug session.'
required: true
default: 'off'
default: false
type: boolean
schedule:
- cron: '0 13 * * *' # Runs at 6 am pacific every day

Expand All @@ -18,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-rc.1']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-rc.2']
django-version:
- '3.2' # LTS April 2024
- '4.2' # LTS April 2026
Expand All @@ -37,11 +38,11 @@ jobs:
django-version: '5.1'
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13.0-rc.1'
- python-version: '3.13.0-rc.2'
django-version: '3.2'
- python-version: '3.13.0-rc.1'
- python-version: '3.13.0-rc.2'
django-version: '4.2'
- python-version: '3.13.0-rc.1'
- python-version: '3.13.0-rc.2'
django-version: '5.0'

steps:
Expand All @@ -57,7 +58,7 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install libopenblas-dev
if: matrix.python-version == '3.13.0-rc.1'
if: matrix.python-version == '3.13.0-rc.2'
run: sudo apt-get install libopenblas-dev
- name: Install Release Dependencies
run: |
Expand All @@ -66,11 +67,11 @@ jobs:
poetry install
poetry run pip install -U "Django~=${{ matrix.django-version }}"
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
Expand Down Expand Up @@ -128,11 +129,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y fish
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
Expand Down Expand Up @@ -199,7 +200,7 @@ jobs:
# brew install sbt
# brew install fish
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
run: |
brew install emacs
- name: Install Poetry
Expand All @@ -215,7 +216,7 @@ jobs:
poetry install
poetry run pip install -U "Django~=${{ matrix.django-version }}"
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
Expand Down Expand Up @@ -285,11 +286,11 @@ jobs:

steps:
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'on' }}
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/update_coc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Update Code of Conduct

on:
workflow_dispatch:
inputs:
debug:
description: 'Open ssh debug session.'
required: true
default: false
type: boolean
# Run every Sunday at midnight UTC (00:00) - triggered by webhook?
schedule:
- cron: '0 0 * * 0'


jobs:
update_code_of_conduct:
permissions:
contents: write
issues: write
pull-requests: write

runs-on: ubuntu-latest

steps:
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Checkout repository
uses: actions/checkout@v4

- name: Fetch CODE_OF_CONDUCT.md from django-commons
run: |
curl -o fetched_code_of_conduct.md https://raw.githubusercontent.com/django-commons/membership/main/CODE_OF_CONDUCT.md

- name: Check if CODE_OF_CONDUCT.md has changed
id: check_changes
run: |
if cmp -s fetched_code_of_conduct.md CODE_OF_CONDUCT.md; then
echo "No changes in CODE_OF_CONDUCT.md"
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "CODE_OF_CONDUCT.md has changed"
echo "changed=true" >> $GITHUB_OUTPUT
cp fetched_code_of_conduct.md CODE_OF_CONDUCT.md
fi

# Create a pull request to merge the changes into the main branch
- name: Create Pull Request
if: steps.check_changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: bot-update-coc
add-paths: |
CODE_OF_CONDUCT.md
title: "🤖 Update Code of Conduct 🤖"
body: "Update the Code of Conduct with the latest version from the django-commons repository."
commit-message: "Update CODE_OF_CONDUCT.md from django-commons"
124 changes: 124 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

# Django Commons Code of Conduct

## Our Pledge

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.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

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.

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 to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[[email protected]](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Warning

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**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 as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 2. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**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.

### 3. Permanent Ban

**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.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

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].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

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].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[![PyPI status](https://img.shields.io/pypi/status/django-typer.svg)](https://pypi.python.org/pypi/django-typer)
[![Documentation Status](https://readthedocs.org/projects/django-typer/badge/?version=latest)](http://django-typer.readthedocs.io/?badge=latest/)
[![Code Cov](https://codecov.io/gh/bckohan/django-typer/branch/main/graph/badge.svg?token=0IZOKN2DYL)](https://codecov.io/gh/bckohan/django-typer)
[![Test Status](https://github.com/bckohan/django-typer/workflows/test/badge.svg)](https://github.com/bckohan/django-typer/actions/workflows/test.yml)
[![Lint Status](https://github.com/bckohan/django-typer/workflows/lint/badge.svg)](https://github.com/bckohan/django-typer/actions/workflows/lint.yml)
[![Test Status](https://github.com/bckohan/django-typer/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bckohan/django-typer/actions/workflows/test.yml?query=branch:main)
[![Lint Status](https://github.com/bckohan/django-typer/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/bckohan/django-typer/actions/workflows/lint.yml?query=branch:main)

Use static typing to define the CLI for your [Django](https://www.djangoproject.com/) management commands with [Typer](https://typer.tiangolo.com/). Optionally use the provided [TyperCommand](https://django-typer.readthedocs.io/en/latest/reference.html#django_typer.TyperCommand) class that inherits from [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand). This class maps the [Typer](https://typer.tiangolo.com/) interface onto a class based interface that Django developers will be familiar with. All of the [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand) functionality is preserved, so that [TyperCommand](https://django-typer.readthedocs.io/en/latest/reference.html#django_typer.TyperCommand) can be a drop in replacement.

Expand Down
Loading
Loading