Skip to content

Commit 135b706

Browse files
committed
init
0 parents  commit 135b706

22 files changed

+1542
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.{nix, proto}]
13+
indent_style = space
14+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.proto linguist-detectable
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: "bug"
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Execute command '...'
17+
3. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Operation system**
26+
27+
- [ ] Windows 10/11
28+
- [ ] Linux (specify which distribution)
29+
- [ ] macOS
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: "feature request"
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**Changes made**
2+
Please summarise the changes you made and explain why they were necessary.
3+
4+
**Related issues**
5+
List all related issues here. If there are no related issues, remove this section.
6+
7+
**Checklist**
8+
9+
- Build on platform:
10+
- [ ] Windows 10/11
11+
- [ ] Linux (specify which distribution)
12+
- [ ] macOS
13+
- Tested all changes
14+
- Fits [CONTRIBUTING.md](https://github.com/seekers-dev/seekers-api/blob/master/CONTRIBUTING.md)

.github/workflows/nix-build.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Nix Build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/[email protected]
15+
16+
- name: Install Nix
17+
# You may pin to the exact commit or the version.
18+
# uses: cachix/install-nix-action@7ab6e7fd29da88e74b1e314a4ae9ac6b5cda3801
19+
uses: cachix/[email protected]
20+
21+
- name: Build with Nix
22+
# Build the project with nix flake and creates a new zip
23+
run: |
24+
nix build
25+
cp -rL --no-preserve=ownership result/* .
26+
zip -r seekers-api.zip seekers
27+
28+
- name: Automatic Releases
29+
if: github.event_name == 'push'
30+
# You may pin to the exact commit or the version.
31+
# uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0
32+
uses: marvinpinto/[email protected]
33+
with:
34+
# GitHub secret token
35+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
36+
# Git tag (for automatic releases)
37+
automatic_release_tag: "prerelease" # optional
38+
# Should this release be marked as a draft?
39+
draft: false # optional
40+
# Should this release be marked as a pre-release?
41+
prerelease: true # optional, default is true
42+
# Release title (for automatic releases)
43+
title: "prerelease" # optional
44+
# Assets to upload to the release
45+
files: seekers-api.zip # optional

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Build folder
2+
build/
3+
4+
# Nix result
5+
result
6+
7+
# IDE files
8+
.idea/
9+
.vscode/

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contributing
2+
3+
Hey there! Want to help make Seekers API even more amazing? That's cool! Here's some information you should know before getting started:
4+
5+
## Creating an issue
6+
7+
If you want to open an issue, please use the _bug report_ template if something is not working or the _feature request_ if you have a cool idea you think we should.
8+
9+
## Creating a pull request
10+
11+
For creating a pull request, please fork and then clone this project. Make and test your changes, then create a pull request using the pull request template.
12+
13+
## Build the project yourself
14+
15+
After that, install all requirements. Seekers API requires [Python 3](https://www.python.org/downloads/) and the following python packages for the build:
16+
17+
- `mypy-protobuf`
18+
- `grpclib`
19+
- `grpcio-tools`
20+
- `protobuf`
21+
22+
For installing the requirements, we recommend setting up a virtual environment (e.g. `venv`).
23+
You can install the requirements with:
24+
25+
```sh
26+
pip install mypy-protobuf grpclib grpcio-tools protobuf
27+
```
28+
29+
To build the [gRPC](https://grpc.io/) files, run the following command:
30+
31+
```sh
32+
mkdir -p build/
33+
python \
34+
-m grpc_tools.protoc \
35+
--python_out=build \
36+
--grpc_python_out=build \
37+
--proto_path=./ \
38+
--plugin=protoc-gen-mypy="$(which protoc-gen-mypy)" \
39+
--mypy_out=build \
40+
--experimental_allow_proto3_optional \
41+
seekers/api/*.proto
42+
```
43+
44+
Alternatively, you can use [Nix](https://nixos.org/) to both get the dependencies and build the project.
45+
If you are using stable Nix:
46+
47+
```sh
48+
nix-build
49+
```
50+
51+
If you are using Nix flakes:
52+
53+
```sh
54+
nix build
55+
```
56+
57+
And that's it!
58+
59+
## Commit messages
60+
61+
Write your commit messages **in English only**! Please use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
62+
Your commit messages should follow this structure:
63+
64+
- feat: add your cool new feature
65+
- fix: fix a bug
66+
- docs: add or improve documentation
67+
- style: reformat code (no logic changes)

0 commit comments

Comments
 (0)