-
Notifications
You must be signed in to change notification settings - Fork 3
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
10 changed files
with
182 additions
and
30 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 @@ | ||
docs/contributing.md |
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
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,107 @@ | ||
# Contributing | ||
|
||
Contributions are welcome! | ||
|
||
## Code of Conduct | ||
|
||
In general we follow the [Python Software Foundation Code of Conduct](https://policies.python.org/python.org/code-of-conduct/). Please note that we are not affiliated with the PSF. | ||
|
||
## Pull Request Process | ||
|
||
**0. Before you begin** | ||
|
||
If you're not familiar with contributing to open source software, [start by reading this guide](https://opensource.guide/how-to-contribute/). | ||
|
||
Be aware that anything you contribute will be licenced under [the project's licence](https://github.com/nhairs/nserver/blob/main/LICENSE). If you are making a change as a part of your job, be aware that your employer might own your work and you'll need their permission in order to licence the code. | ||
|
||
### 1. Find something to work on | ||
|
||
Where possible it's best to stick to established issues where discussion has already taken place. Contributions that haven't come from a discussed issue are less likely to be accepted. | ||
|
||
The following are things that can be worked on without an existing issue: | ||
|
||
- Updating documentation. This includes fixing in-code documentation / comments, and the overall docs. | ||
- Small changes that don't change functionality such as refactoring or adding / updating tests. | ||
|
||
### 2. Fork the repository and make your changes | ||
|
||
We don't have styling documentation, so where possible try to match existing code. This includes the use of "headings" and "dividers" (this will make sense when you look at the code). | ||
|
||
Common devleopment tooling has been wrapped in `dev.sh` (which uses `uv` under the hood). | ||
|
||
Before creating your pull request you'll want to format your code and run the linters and tests: | ||
|
||
```shell | ||
# Format | ||
./dev.sh format | ||
|
||
# Lint | ||
./dev.sh lint | ||
|
||
# Tests | ||
./dev.sh test | ||
``` | ||
|
||
If making changes to the documentation you can preview the changes locally using `./dev.sh docs`. Changes to the README can be previewed using [`grip`](https://github.com/joeyespo/grip) (not included in `dev` dependencies). | ||
|
||
!!! note | ||
In general we will always squash merge pull requests so you do not need to worry about a "clean" commit history. | ||
|
||
### 3. Checklist | ||
|
||
Before pushing and creating your pull request, you should make sure you've done the following: | ||
|
||
- Updated any relevant tests. | ||
- Formatted your code and run the linters and tests. | ||
- Updated the version number in `pyproject.toml`. In general using a `.devN` suffix is acceptable. | ||
This is not required for changes that do no affect the code such as documentation. | ||
- Add details of the changes to the change log (`docs/changelog.md`), creating a new section if needed. | ||
- Add notes for new / changed features in the relevant docstring. | ||
|
||
**4. Create your pull request** | ||
|
||
When creating your pull request be aware that the title and description will be used for the final commit so pay attention to them. | ||
|
||
Your pull request description should include the following: | ||
|
||
- Why the pull request is being made | ||
- Summary of changes | ||
- How the pull request was tested - especially if not covered by unit testing. | ||
|
||
Once you've submitted your pull request make sure that all CI jobs are passing. Pull requests with failing jobs will not be reviewed. | ||
|
||
### 5. Code review | ||
|
||
Your code will be reviewed by a maintainer. | ||
|
||
If you're not familiar with code review start by reading [this guide](https://google.github.io/eng-practices/review/). | ||
|
||
!!! tip "Remember you are not your work" | ||
|
||
You might be asked to explain or justify your choices. This is not a criticism of your value as a person! | ||
|
||
Often this is because there are multiple ways to solve the same problem and the reviewer would like to understand more about the way you solved. | ||
|
||
## Common Topics | ||
|
||
### Versioning and breaking compatability | ||
|
||
This project uses semantic versioning. | ||
|
||
In general backwards compatability is always preferred. | ||
|
||
Feature changes MUST be compatible with all [security supported versions of Python](https://endoflife.date/python) and SHOULD be compatible with all unsupported versions of Python where [recent downloads over the last 90 days exceeds 10% of all downloads](https://pypistats.org/packages/nserver). | ||
|
||
In general, only the latest `major.minor` version of NServer is supported. Bug fixes and feature backports requiring a version branch may be considered but must be discussed with the maintainers first. | ||
|
||
See also [Security Policy](security.md). | ||
|
||
### Spelling | ||
|
||
The original implementation of this project used Australian spelling so it will continue to use Australian spelling for all code. | ||
|
||
Documentation is more flexible and may use a variety of English spellings. | ||
|
||
### Contacting the Maintainers | ||
|
||
In general it is preferred to keep communication to GitHub, e.g. through comments on issues and pull requests. If you do need to contact the maintainers privately, please do so using the email addresses in the maintainers section of the `pyproject.toml`. |
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
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
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
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,14 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
Security support for Python JSON Logger is provided for all [security supported versions of Python](https://endoflife.date/python) and for unsupported versions of Python where [recent downloads over the last 90 days exceeds 10% of all downloads](https://pypistats.org/packages/nserver). | ||
|
||
|
||
As of 2024-11-22 security support is provided for Python versions `3.8+`. | ||
|
||
|
||
## Reporting a Vulnerability | ||
|
||
Please report vulnerabilties [using GitHub](https://github.com/nhairs/nserver/security/advisories/new). | ||
|
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
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
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