Skip to content

Commit

Permalink
feat(upgrade): adding python coc option (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anavelyz authored Mar 1, 2024
1 parent b1dd4c5 commit 6334b2b
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,7 @@ and unacceptable, as well as the consequences for violating the code of
conduct. In SciCookie you can find and choose between three adaptations
of well-known codes of conduct accepted by a large part of the
community: *A Code of Conduct for Open Source Communities by
Contributors Covenant*,*The Citizen Code of Conduct*, and the Adapted
NumFOCUS Code of Conduct.
Contributors Covenant*,*The Citizen Code of Conduct*,and an adapted version of the NumFOCUS and Python Codes of Conduct.

- **`contributor-covenant` option**: The Contributor Covenant aims to create a
safe and inclusive environment for all contributors to open source projects. By
Expand All @@ -827,6 +826,8 @@ conduct](https://github.com/stumpsyn/policies/blob/7caa4699ba74e341a46b3266d4610
you wish to read the full text, please visit this link [code of
conduct](https://numfocus.org/code-of-conduct)

- **`python-adapted-coc` option**: This option is an adaptation of the Python Code of Conduct prioritizing inclusivity, respect, and a welcoming community. It emphasizes kindness, discourages discrimination, and encourages positive contributions, consideration, and collaboration among all members. If you would like to know more, you can read the full text of this [code of conduct](https://www.python.org/psf/conduct/).

In case you do not want to include this file in your project, you can do so by
selecting the option `None` (this is the default option).

Expand Down
3 changes: 2 additions & 1 deletion src/scicookie/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"None",
"contributor-covenant",
"citizen-code-of-conduct",
"numfocus-adapted-coc"
"numfocus-adapted-coc",
"python-adapted-coc"
],
"governance_document": [
"None",
Expand Down
2 changes: 2 additions & 0 deletions src/scicookie/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
COC_PATH = PROJECT_DIRECTORY / 'coc' / 'CITIZEN.md'
{%- elif cookiecutter.code_of_conduct == "numfocus-adapted-coc" -%}
COC_PATH = PROJECT_DIRECTORY / 'coc' / 'NUMFOCUS_adapted_coc.md'
{%- elif cookiecutter.code_of_conduct == "python-adapted-coc" -%}
COC_PATH = PROJECT_DIRECTORY / 'coc' / 'PYTHON_ADAPTED_COC.md'
{% else %}
COC_PATH = None
{%- endif %}
Expand Down
1 change: 1 addition & 0 deletions src/scicookie/profiles/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ code_of_conduct:
- contributor-covenant
- citizen-code-of-conduct
- numfocus-adapted-coc
- python-adapted-coc
visible: true

governance_document:
Expand Down
1 change: 1 addition & 0 deletions src/scicookie/profiles/osl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ code_of_conduct:
- contributor-covenant
- citizen-code-of-conduct
- numfocus-adapted-coc
- python-adapted-coc
visible: true

governance_document:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Code of Conduct

The {{ cookiecutter.project_name }} is made up of members with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences great successes and continued growth. When you're working with members of the community, this Code of Conduct will help steer your interactions and keep {{ cookiecutter.project_name }} a positive, successful, and growing community.

## Our Community

Members of the {{ cookiecutter.project_name }} are open, considerate, and respectful. Behaviours that reinforce these values contribute to a positive environment, and include:

- **Being open**. Members of the community are open to collaboration, whether it's on PEPs, patches, problems, or otherwise.
- **Focusing on what is best for the community**. We're respectful of the processes set forth in the community, and we work within them.
- **Acknowledging time and effort.** We're respectful of the volunteer efforts that permeate the {{ cookiecutter.project_name }} community. We're thoughtful when addressing the efforts of others, keeping in mind that often times the labor was completed simply for the good of the community.
- **Being respectful of differing viewpoints and experiences.** We're receptive to constructive comments and criticism, as the experiences and skill sets of other members contribute to the whole of our efforts.
- **Showing empathy towards other community members.** We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views.
- **Being considerate.** Members of the community are considerate of their peers -- other {{ cookiecutter.project_name }} users.
**Being respectful.- ** We're respectful of others, their positions, their skills, their commitments, and their efforts.
- **Gracefully accepting constructive criticism**. When we disagree, we are courteous in raising our issues.
- **Using welcoming and inclusive language.** We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate and everyone can make a difference.

## Our Standards

Every member of our community has the right to have their identity respected. The {{ cookiecutter.project_name }} 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, nationality, race, or religion (or lack thereof), education, or socio-economic status.

### Inappropriate Behavior

Examples of unacceptable behavior by participants include:

- Harassment of any participants in any form
- Deliberate intimidation, stalking, or following
- Logging or taking screenshots of online activity for harassment purposes
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Violent threats or language directed against another person
- Incitement of violence or harassment towards any individual, including encouraging a person to commit suicide or to engage in self-harm
- Creating additional online accounts in order to harass another person or circumvent a ban
- Sexual language and imagery in online communities or in any conference venue, including talks
- Insults, put downs, or jokes that are based upon stereotypes, that are exclusionary, or that hold others up for ridicule
- Excessive swearing
- Unwelcome sexual attention or advances
- Unwelcome physical contact, including simulated physical contact (eg, textual descriptions like "hug" or "backrub") without consent or after a request to stop
- Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others
- Sustained disruption of online community discussions, in-person presentations, or other in-person events
- Continued one-on-one communication after requests to cease
- Other conduct that is inappropriate for a professional audience including people of many different backgrounds

Community members 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 {{ cookiecutter.project_name }} community Code of Conduct team may take any action they deem appropriate, including warning the offender or expulsion from the community. The full list of consequences for inappropriate behavior is listed in << link to your consequences document >>.

Thank you for helping make this a welcoming, friendly community for everyone.

**Contact Information**
If you believe that someone is violating the code of conduct, or have any other concerns, please contact a member of the {{ cookiecutter.project_name }} work group immediately. They can be reached by emailing << Add your email >>.

## License

This Code of Conduct is licensed under the << add a license >>.


## Attributions

This Code of Conduct was adapted from the [Python Community Code of Conduct](https://www.python.org/psf/conduct/), which is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/). The Python Code of Conduct itself is a derivative of the example policy from the [Geek Feminism wiki, created by the Ada Initiative and other volunteers](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy), which is released under a [Creative Commons Zero license](https://creativecommons.org/publicdomain/zero/1.0/).
1 change: 1 addition & 0 deletions tests/smoke/files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SMOKE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. ${SMOKE_DIR}/base.sh "code_of_conduct=contributor-covenant"
. ${SMOKE_DIR}/base.sh "code_of_conduct=citizen-code-of-conduct"
. ${SMOKE_DIR}/base.sh "code_of_conduct=numfocus-adapted-coc"
. ${SMOKE_DIR}/base.sh "code_of_conduct=python-adapted-coc"
. ${SMOKE_DIR}/base.sh "code_of_conduct=None"

. ${SMOKE_DIR}/base.sh "governance_document=numpy-governance"
Expand Down

0 comments on commit 6334b2b

Please sign in to comment.