Openfish Contributing Guide β
Authors: Scott Barnard
Hi there! π Weβre thrilled that youβre interested in contributing to OpenFish, our open-source project dedicated to classifying marine species.
Before diving in, please take a moment to familiarize yourself with our guidelines. These will help streamline the contribution process and ensure a smooth collaboration. Hereβs what you need to know:
Raising issues. β
If you find a bug or want to request a feature, please raise an issue https://github.com/ausocean/openfish/issues.
For bugs, try to include any information that you think is helpful in describing the problem and ideally the steps you need to reproduce the issue. The better the information you include, the quicker it is likely to be fixed.
Use the labels document
, bug
and enhancement
to categorize your issue.
Choosing an issue to work on. β
Issues with the good first issue
label are a good choice for your first contribution.
Repo Setup β
If you want to contribute code to the project, use these steps instead to get started:
Prerequisites β
You will need installed:
- gcloud CLI
- node v19.2.0 or later
- pnpm v8.5.1 or later
- go 1.20 or later
- Linux (Windows is currently untested but may work)
Steps: β
Setup google cloud credentials so your application can access the datastore:
bashgcloud auth login gcloud config set project openfish-dev gcloud auth application-default login
if the environment variable
$GOOGLE_APPLICATION_CREDENTIALS
is not set:bashGOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/application_default_credentials.json
Install npm dependencies:
bashpnpm install
Start the API:
bashgo run ./api
Start the webapp using vite's development server:
bashpnpm --filter ./openfish-webapp dev
Open the browser and visit http://localhost:5173/watch.html.
(Optional) Serve the documentation website using:
bashpnpm --filter ./docs dev
Common tasks β
Formatting code β
go fmt ./... && swag fmt
pnpm --filter webapp fmt
Running unit tests β
go test -v ./... -short
pnpm --filter webapp test
Linting (Front-end only) β
pnpm --filter webapp check
pnpm --filter webapp check --fix
Submitting a pull request (PR) β
- If the PR is related to an issue, link to it in the description.
- Check that your code passes unit tests.
- Check that your code is formatted properly.
- Check that your code does not have any linting issues.
Summary β
Thank you for joining the OpenFish community! We canβt wait to see your contributions in action ππ π¦!