Skip to content

Commit de1f083

Browse files
authored
doc: add issues and pull-requests templates (#1217)
1 parent 1120f5f commit de1f083

File tree

8 files changed

+291
-0
lines changed

8 files changed

+291
-0
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contribute to `scaleway-sdk-python`
2+
3+
`scaleway-sdk-pythom` is Apache 2.0 licensed and accepts contributions via GitHub.
4+
This document will cover how to contribute to the project and report issues.
5+
6+
## Topics
7+
8+
- [Reporting Security Issues](#reporting-security-issues)
9+
- [Reporting Issues](#reporting-issues)
10+
- [Suggesting feature](#suggesting-feature)
11+
- [Contributing Code](#contributing-code)
12+
- [Community Guidelines](#community-guidelines)
13+
14+
## Reporting security issues
15+
16+
Please refer to our [security policy](../SECURITY.md).
17+
18+
## Reporting issues
19+
20+
A great way to contribute to the project is to send a detailed report when you encounter a bug.
21+
We always appreciate a well-written, thorough bug report, and will thank you for it!
22+
Before opening a new issue, we appreciate you reviewing open issues to see if there are any similar requests.
23+
If there is a match, thumbs up the issue with a 👍 and leave a comment if you have additional information.
24+
25+
When reporting an issue, please include the `scaleway-sdk-python` version information
26+
27+
## Suggesting a feature
28+
29+
When requesting a feature, some of the questions we want to answer are:
30+
31+
- What value does this feature bring to end users?
32+
- How urgent is the need (nice to have feature or need to have)?
33+
- Does this align with the goals of `scaleway-sdk-python`?
34+
35+
## Contributing code
36+
37+
Before contributing to the code, make sure you have read about the [continuous code deployment](docs/CONTINUOUS_CODE_DEPLOYMENT.md) process we are using on this repo.
38+
39+
### Submit code
40+
41+
To submit code:
42+
43+
- Create a fork of the project
44+
- Create a topic branch from where you want to base your work (usually master)
45+
- Add tests to cover contributed code
46+
- Push your commit(s) to your topic branch on your fork
47+
- Open a pull request against `scaleway-sdk-python` `main` branch that follows [PR guidelines](#pull-request-guidelines)
48+
49+
The [maintainers](MAINTAINERS.md) of `scaleway-sdk-python` use a "Let's Get This Merged" (LGTM) message in the pull request to note that the commits are ready to merge.
50+
After one or more maintainer states LGTM, we will merge.
51+
If you have questions or comments on your code, feel free to correct these in your branch through new commits.
52+
53+
### Pull Request Guidelines
54+
55+
The goal of the following guidelines is to have Pull Requests (PRs) that are fairly easy to review and comprehend, and code that is easy to maintain in the future.
56+
57+
- **Pull Request title should respect [conventional commits](https://www.conventionalcommits.org/en/v1.0.0) specifications** and be clear on what is being changed.
58+
The scope is the namespace on which the changes are made or `core` for changes which concern the whole SDK. Examples:
59+
- A fix for the InstanceAPI.create_server method will be titled `fix(instance): ...`
60+
- A change in authentication handling will be titled fix(core): ...
61+
- A new instance feature will be title `feat(instance): ...`
62+
- **Keep it readable for human reviewers** and prefer a subset of functionality (code) with tests and documentation over delivering them separately
63+
- **Don't forget commenting code** to help reviewers understand and to keep [our Go Report Card](https://goreportcard.com/report/github.com/scaleway/scaleway-sdk-go) at A+
64+
- **Notify Work In Progress PRs** by prefixing the title with `[WIP]`
65+
- **Please, keep us updated.**
66+
We will try our best to merge your PR, but please notice that PRs may be closed after 30 days of inactivity.
67+
68+
Your pull request should be rebased against the `main` branch.
69+
70+
Keep in mind only the **pull request title** will be used as commit message as we stash all commits on merge.
71+
72+
## Community guidelines
73+
74+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
75+
76+
Thank you for reading through all of this, if you have any question feel free to [reach us](README.md#reach-us)!
77+
78+
## Developer documentation
79+
80+
### Code style
81+
82+
Code formatting and linting are enforced with Ruff
83+
Our CI checks formatting automatically with Ruff, so please ensure your code passes the same checks locally before submitting.
84+
85+
### Testing
86+
87+
We use pytest for testing.
88+
All new features and bug fixes should include corresponding tests.
89+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Unexpected or broken behavior of SDK-python 🤔
4+
labels: bug
5+
---
6+
7+
<!--- Please keep this note for the community --->
8+
9+
### Community Note
10+
11+
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
12+
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
13+
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
14+
15+
<!--- Thank you for keeping this note for the community --->
16+
17+
## Command attempted
18+
19+
<!-- Please provide the minimal Python code that reproduces the issue. -->
20+
21+
```python
22+
from scaleway_core.client import Client
23+
from scaleway.instance.v1.types import BootType
24+
from scaleway.instance.v1.custom_api import InstanceUtilsV1API
25+
26+
client = Client.from_config_file_and_env()
27+
instance_api = InstanceUtilsV1API(client)
28+
29+
server = instance_api.create_server(
30+
commercial_type="DEV1-S",
31+
zone="fr-par-1",
32+
name="test-server",
33+
dynamic_ip_required=False,
34+
volumes={},
35+
protected=False,
36+
boot_type=BootType.LOCAL,
37+
)
38+
```
39+
### Expected Behavior
40+
41+
<!--- What should have happened? --->
42+
43+
### Actual Behavior
44+
45+
<!--- What actually happened? --->
46+
47+
## More info
48+
49+
SDK-Python version: <!-- e.g. 1.32.0 -->
50+
51+
Python version: <!-- e.g. 3.10.0 -->
52+
53+
OS version: <!-- e.g. Ubuntu 22.04 -->
54+
55+
<!--- Add any other context, logs, screenshots, or system outputs about the problem --->
56+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Scaleway Community
4+
url: https://slack.scaleway.com
5+
about: GitHub issues in this repository are only intended for bug reports and feature requests. Other issues will be closed. Please ask questions on the Scaleway Community Slack (#sdk-python)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: 🚀 Feature request
3+
about: I have a suggestion (and might want to implement it myself 🙂)!
4+
labels: enhancement
5+
---
6+
7+
<!--- Please keep this note for the community --->
8+
9+
### Community Note
10+
11+
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
12+
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
13+
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
14+
15+
<!--- Thank you for keeping this note for the community --->
16+
17+
## Description
18+
19+
<!-- Describe the problem, limitation, or missing feature that you think SDK-Python should address. -->
20+
21+
## Proposed Solution
22+
23+
<!-- How do you imagine SDK-Python could expose this functionality? -->
24+
25+
```python
26+
# Example of a possible API usage
27+
from scaleway.instance.v1.custom_api import InstanceUtilsV1API
28+
from scaleway_core.client import Client
29+
30+
client = Client.from_config_file_and_env()
31+
instance_api = InstanceUtilsV1API(client)
32+
server = instance_api.new_feature(...)
33+
```

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### Community Note
2+
3+
* Please vote on this pull request by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original pull request comment to help the community and maintainers prioritize this request.
4+
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request
5+
6+
<!--- Thank you for keeping this note for the community --->
7+
8+
<!--- If your PR fully resolves and should automatically close the linked issue, use Closes. Otherwise, use Relates --->
9+
Relates OR Closes #0000
10+
11+
Release note for [CHANGELOG](https://github.com/scaleway/scaleway-sdk-python/blob/master/CHANGELOG.md):
12+
<!--
13+
If the change is not user facing, just write "NONE" in the release-note block below.
14+
-->
15+
16+
```release-note
17+
18+
```

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

SECURITY.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
At Scaleway we take security seriously. If you have any issue regarding security,
6+
please notify us by sending an email to [email protected].
7+
8+
Please DO NOT create a GitHub issue.
9+
10+
We will follow up with you promptly with more information and a plan for remediation.
11+
We currently do not offer a paid security bounty program, but we would love to send some
12+
Scaleway swag your way along with our deepest gratitude for your assistance in making
13+
Scaleway a more secure Cloud ecosystem.

0 commit comments

Comments
 (0)