-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 0d3d135
Showing
69 changed files
with
6,020 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,9 @@ | ||
__pycache__/ | ||
.boardwalk/ | ||
.boardwalkd/ | ||
.DS_store | ||
.idea | ||
.vscode/ | ||
*.egg-info/ | ||
build/ | ||
dist/ |
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,7 @@ | ||
## What and why? | ||
|
||
## How was this tested? | ||
|
||
## Checklist | ||
[ ] Have you run `make test`? | ||
[ ] Have you updated the VERSION file (if applicable)? |
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,9 @@ | ||
__pycache__/ | ||
.boardwalk/ | ||
.boardwalkd/ | ||
.DS_store | ||
.idea | ||
.vscode/ | ||
*.egg-info/ | ||
build/ | ||
dist/ |
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,48 @@ | ||
# Contributing | ||
|
||
## Bug Reports & Feature Requests | ||
Bug reports and feature requests are really helpful. Head over to | ||
[Issues](https://github.com/Backblaze/boardwalk/issues), and provide | ||
plenty of detail and context. | ||
|
||
## Development Guidelines | ||
|
||
### Development Dependencies | ||
- `black` (`pip3 install black`) | ||
- `build` (`pip3 install build`) | ||
- `make` | ||
- `pip3` | ||
- `podman` | ||
- `pyenv` | ||
- `pyright` (`pip3 install pyright`) | ||
- `usort` (`pip3 install usort`) | ||
|
||
#### Makefile | ||
The [Makefile](./Makefile) has some useful targets for typical development | ||
operations, like formatting, building, and locally installing the module. | ||
|
||
To install the module in editable mode run `make develop`. | ||
To run the server in development mode, run `make develop-server`. | ||
|
||
See the content of the Makefile for other useful targets. | ||
|
||
### Code Style | ||
|
||
#### Automated Formatting | ||
- Run `make format` to format to this codebase's standard. | ||
|
||
#### Not Automated Styling | ||
- The last sentence in a code comments, logs, or error messages should not end | ||
in a period (`.`). | ||
- Comments should be used generously. | ||
|
||
### Testing | ||
Automated tests are run with `make test`. | ||
|
||
Automated tests should be developed for cases that clearly improve Boardwalk's | ||
reliability, user and developer experience. Otherwise there is no specific | ||
enforcement of test coverage. | ||
|
||
### Versioning | ||
The boardwalk pip module uses semantic versioning. Please make sure to update | ||
the VERSION file along with any changes to the package. |
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,10 @@ | ||
FROM python:3.10 AS build | ||
WORKDIR /build | ||
COPY . . | ||
RUN make build | ||
|
||
FROM python:3.10-slim | ||
COPY --from=build /build/dist ./dist | ||
RUN python3 -m pip install ./dist/boardwalk-*.whl && mkdir /var/boardwalk && rm -rf ./dist | ||
WORKDIR /var/boardwalk | ||
ENTRYPOINT [ "python3", "-m"] |
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 @@ | ||
include VERSION |
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,76 @@ | ||
# Builds module artifacts | ||
.PHONY: build | ||
build: dist | ||
|
||
.PHONY: container | ||
container: | ||
podman build . --tag boardwalk:$(shell cat VERSION | tr -d '\n') | ||
|
||
# Cleans up temporary data that might get created during normal devlopment | ||
.PHONY: clean | ||
clean: | ||
rm -r \ | ||
build \ | ||
dist \ | ||
src/*.egg-info \ | ||
src/boardwalk/__pycache__ \ | ||
src/boardwalkd/__pycache__ \ | ||
.boardwalk \ | ||
.boardwalkd \ | ||
|| : | ||
podman image rm localhost/boardwalk || : | ||
|
||
# Installs modules in editable mode | ||
.PHONY: develop | ||
develop: | ||
python3 -m pip install --editable . | ||
|
||
.PHONY: develop-server | ||
develop-server: | ||
ifdef BOARDWALKD_SLACK_WEBHOOK_URL | ||
boardwalkd serve \ | ||
--develop \ | ||
--host-header-pattern="(localhost|127\.0\.0\.1)" \ | ||
--port=8888 \ | ||
--slack-webhook-url="$(BOARDWALKD_SLACK_WEBHOOK_URL)" \ | ||
--url='http://localhost:8888' | ||
else | ||
boardwalkd serve \ | ||
--develop \ | ||
--host-header-pattern="(localhost|127\.0\.0\.1)" \ | ||
--port=8888 \ | ||
--url='http://localhost:8888' | ||
endif | ||
|
||
dist: clean | ||
python3 -m pip install -U build pip | ||
python3 -m build | ||
|
||
# Applys project's required code style | ||
.PHONY: format | ||
format: | ||
black . | ||
usort format . | ||
|
||
|
||
# Installs modules to the local system | ||
.PHONY: install | ||
install: | ||
python3 -m pip install --upgrade . | ||
|
||
# Runs all available tests | ||
.PHONY: test | ||
test: test-black test-pyright test-usort | ||
|
||
# Test that code is formatted with black | ||
.PHONY: test-black | ||
test-black: | ||
black . --check | ||
|
||
.PHONY: test-pyright | ||
test-pyright: | ||
pyright | ||
|
||
.PHONY: test-usort | ||
test-usort: | ||
usort check . |
Oops, something went wrong.