-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
283 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
|
||
# Contributor Covenant 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. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**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. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series of | ||
actions. | ||
|
||
**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. | ||
|
||
### 3. 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. | ||
|
||
### 4. 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# Contributing to ExSeOS-HLS | ||
|
||
Thanks for your interest in contributing to this project! We are always happy to | ||
receive contributions to the community, whether that be through bug reports, | ||
fixes, enhancements, or documentation! This document explains the best practices | ||
for contributing to the project. | ||
|
||
## Contents | ||
|
||
- [Code of Conduct](#code-of-conduct) | ||
- [Generative AI Policy](#generative-ai-policy) | ||
- [Report an Issue](#report-an-issue) | ||
- [Suggest an Enhancement](#suggest-an-enhancement) | ||
- [Contribute Documentation](#contribute-documentation) | ||
- [Contribute Code](#contribute-code) | ||
- [Project Style](#project-style) | ||
- [Commit Signing](#commit-signing) | ||
|
||
## Code of Conduct | ||
|
||
Our first priority is the comfort and safety of our users and contributors. To | ||
that end, we have adopted the [Contributor Covenant | ||
v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). | ||
|
||
All contributions to the project, including code, documentation, discussions, | ||
and others, are subject to the code of conduct. If you witness or are subject to | ||
any misconduct covered by our Code of Conduct, please contact a project lead: | ||
|
||
- Alexis Shuping: [[email protected]](mailto:[email protected]) | ||
|
||
The Code of Conduct can also be found as | ||
[CODE-OF-CONDUCT.md](blob/main/CODE-OF-CONDUCT.md) | ||
|
||
## Generative AI Policy | ||
|
||
Due to concerns about licensing incompatibility, hallucination, and robustness, | ||
we do not allow AI-generated content in our project. This applies to code and | ||
documentation, and includes suggestions provided by services such as Github | ||
Copilot. You may consult with such tools for informational purposes, but please | ||
refrain from committing any code or documentation generated by them. We | ||
apologize for any inconvenience caused by this policy. | ||
|
||
## Report an Issue | ||
|
||
If you run into an issue while using ExSeOS-HLS, please report it so that we can | ||
fix it! Issues can be reported on the [project | ||
repository](https://github.com/ashuping/chicory/issues/new/choose). Please | ||
provide as much detail as possible when reporting your issue, including: | ||
- The steps you took that led to the issue (including code, if relevant) | ||
- What you expected to happen | ||
- What actually happened | ||
- Screenshots of the issue (if relevant) | ||
- Details of your system configuration (OS, python version, etc) | ||
|
||
We have a template on github that can help guide you through the steps for | ||
submitting a helpful issue! | ||
|
||
## Suggest an Enhancement | ||
|
||
If you have an idea for an enhancement (either a new feature or an improvement | ||
to an existing feature), we'd love to hear it! Please [open an | ||
issue](https://github.com/ashuping/chicory/issues/new/choose) using the | ||
enhancement template, and provide as much detail as possible describing the | ||
proposed enhancement. | ||
|
||
## Contribute Documentation | ||
|
||
We always appreciate improvements in our documentation! We use | ||
[Sphinx](https://www.sphinx-doc.org/en/master/) to generate documentation. | ||
|
||
## Contribute Code | ||
|
||
We welcome improvements and bugfixes! Check the "[good first | ||
issue](https://github.com/ashuping/chicory/labels/good%20first%20issue)" label | ||
for issues that we think would be good for new contributors! | ||
|
||
Please do take a look at our [Project Style](#project-style) for information on | ||
how to format and lint your code automatically to conform to the project style. | ||
|
||
## Project Style | ||
|
||
### Formatting | ||
|
||
ExSeOS-HLS follows [PEP8](https://peps.python.org/pep-0008/) for the most part. | ||
The most notable exception is spacing - for accessibility reasons, we use tabs | ||
rather than spaces. If you personally prefer spaces, [this StackOverflow | ||
answer](https://stackoverflow.com/questions/2316677/can-git-automatically-switch-between-spaces-and-tabs) | ||
describes a potential method of setting up your project so that you can work | ||
with spaces on your end and have `git` automatically perform the conversion to | ||
tabs. You might want to use `ruff` instead of `expand` for a cross-platform | ||
solution that will also apply the rest of the project styling on commit! | ||
|
||
We use [Ruff](https://docs.astral.sh/ruff/) for code linting and formatting. To | ||
check your code, run `ruff check`. To automatically format your code, run `ruff | ||
format`. Note that certain rules are relaxed for test cases (for example, | ||
preferring `def` to lambdas). | ||
|
||
Plugins are available for several editors to help you fix linting issues as you | ||
go. We ask that you lint and format your code before submitting pull requests. | ||
|
||
### Conventions | ||
|
||
ExSeOS-HLS is built to be as robust as possible. As such, we adopt several | ||
conventions that are more typical of [Functional | ||
Programming](https://en.wikipedia.org/wiki/Functional_programming) than the | ||
traditional "pythonic" conventions. | ||
|
||
Here are the most important conventions to keep in mind when contributing to the | ||
codebase: | ||
- **Avoid mutable values** whenever practical. If a function acts on an object, | ||
it should return a modified object without touching the original object. | ||
Object parameters should be defined as functions with the `@parameter` | ||
annotation, to discourage direct modification. | ||
- **Avoid [side | ||
effects](https://en.wikipedia.org/wiki/Side_effect_(computer_science))** | ||
whenever practical. A function's output should depend only on its inputs, and | ||
it should not perform any action beside returning a value. | ||
|
||
Of course, these are not hard-and-fast rules. If no function ever performed a | ||
side effect, the program wouldn't do anything in the first place. However, | ||
minimizing side effects and mutable values makes it much easier to understand | ||
what a function does and greatly simplifies the testing process. If you're not | ||
sure whether something can / should be done following FP conventions, we have a | ||
dedicated section on | ||
[our forums](/discussions/new?category=functional-programming-questions)! | ||
|
||
### Testing | ||
|
||
As previously mentioned, we try to make ExSeOS-HLS as robust as possible. Part | ||
of this is a thorough set of tests. We use | ||
[pytest](https://docs.pytest.org/en/stable/) for testing purposes, and all of | ||
our test code can be found in the [`test`](blob/main/test) directory. | ||
|
||
We ask that you try to maximize test coverage of any code that you contribute. | ||
We use [Codecov](https://about.codecov.io/) to calculate coverage percentage for | ||
commits and pull requests. You can check the coverage locally using pytest: | ||
`python -m pytest test --cov-report xml:cov.xml --cov modules` | ||
|
||
This will generate an XML coverage report, which can be read by several IDE | ||
extensions (for example, [Coverage | ||
Gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) | ||
for VS Code will show the coverage data in the sidebar, making it easy to | ||
identify paths without test-case coverage). | ||
|
||
## Commit Sigining | ||
|
||
It is strongly recommended (but not required) that all contributors set up | ||
[commit | ||
signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#gpg-commit-signature-verification). |