Skip to content

Commit

Permalink
init: encord active public launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Encord-davids committed Dec 9, 2022
0 parents commit a788f13
Show file tree
Hide file tree
Showing 249 changed files with 48,691 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FRONTEND="https://encord-active-frontend.web.app"
STREAMLIT_RUNNER_MAGIC_ENABLED="false"
STREAMLIT_BROWSER_GATHER_USAGE_STATS="false"
STREAMLIT_THEME_BASE="light"
STREAMLIT_THEME_PRIMARY_COLOR="#5658dd"
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @encord-team/ml-team
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at active@encord.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🐞 Bug Report
description: Create a bug report to help us reproduce and fix the bug
title: "bug: "
labels: ["🐞❔ unconfirmed bug"]
body:
- type: textarea
attributes:
label: Provide environment information
description: |
Run this command in your project root and paste the results:
```bash
encord-active print system-info
```
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of the bug, as well as what you expected to happen when encountering it.
validations:
required: true
- type: textarea
attributes:
label: To reproduce
description: Describe how to reproduce your bug. Steps, code snippets etc.
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: Add any other information related to the bug here, screenshots/videos if applicable.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Simple question - Slack Chat
url: https://join.slack.com/t/encordactive/shared_invite/zt-1hc2vqur9-Fzj1EEAHoqu91sZ0CX0A7Q
about: This issue tracker is not for technical support. Please use our Slack chat and ask the community for help.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 📚 Documentation
description: Help us improve our documentation
title: "docs:"
labels: ["📚 documentation"]
body:
- type: textarea
attributes:
label: Documentation issue
description: Is this issue related to an existing part of the documentation? If so, please provide a link
placeholder: >
Helpful info about this issue.
validations:
required: true

- type: textarea
attributes:
label: Describe the thing to improve
description: A clear and concise description of problems and what you would like to see
validations:
required: true

- type: textarea
attributes:
label: Describe the solution (optional)
description: Ideas about what we should do to improve experience of beginners and readers. It may be new pages to add, grammar fixes etc.
validations:
required: false
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 🧑‍💻 Feature Request
description: Suggest an idea for this project
title: "feat: "
labels: ["🌟 enhancement"]
body:
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like to see
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternate solutions
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: Add any other information related to the feature here. If your feature request is related to any issues or discussions, link them here.
39 changes: 39 additions & 0 deletions .github/actions/setup-root-poetry-environment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Setup test environment"
description: "Sets up Python, Poetry and dependencies"

inputs:
python:
description: "Python version to use"
default: 3.9.14
required: false
poetry:
description: "Poetry version to use"
default: 1.1.12
required: false

runs:
using: "composite"

steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python }}

- uses: snok/install-poetry@v1
with:
version: ${{ inputs.poetry }}
virtualenvs-in-project: true

- id: cached-poetry
uses: actions/cache@v2
with:
path: .venv
key: >
${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
-${{ inputs.python }}-${{ inputs.poetry }}
- if: steps.cached-poetry.outputs.cache-hit != 'true'
run: |
poetry lock --no-update
poetry install --no-interaction
shell: bash
79 changes: 79 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Docs build, deploy

on:
push:
branches:
- main
release:
types: [published]
workflow_dispatch:

env:
NODE_VERSION: 18
SRC_FOLDER: docs
BUILD_ARTIFACT_NAME: build_artifact
BUILD_ARTIFACT_PATH: docs/build
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
cache-dependency-path: "docs/package-lock.json"

- name: Install dependencies
working-directory: ${{ env.SRC_FOLDER }}
run: |
npm ci
- name: Build docs
working-directory: ${{ env.SRC_FOLDER }}
run: |
npm run-script build
- name: Upload build folder
uses: actions/upload-artifact@v3
with:
name: ${{ env.BUILD_ARTIFACT_NAME }}
path: ${{ env.BUILD_ARTIFACT_PATH }}
if-no-files-found: error
retention-days: 1

deploy:
name: Deploy
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.BUILD_ARTIFACT_NAME }}
path: ${{ env.BUILD_ARTIFACT_PATH }}

- name: Create deployment message
id: vars
run: |
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "message=$(git log -1 --format=%s | cut -c -64)" >> $GITHUB_OUTPUT
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:prod -m \"${{ steps.vars.outputs.sha }} ${{ steps.vars.outputs.message }}\"
env:
GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ENCORD_ACTIVE_FRONTEND }}
PROJECT_PATH: ./${{ env.SRC_FOLDER }}
23 changes: 23 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
"on":
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install and Build
working-directory: frontend
run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ENCORD_ACTIVE_FRONTEND }}"
channelId: live
projectId: encord-active-frontend
entryPoint: frontend
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
"on": pull_request
jobs:
build_and_preview:
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install and Build
working-directory: frontend
run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ENCORD_ACTIVE_FRONTEND }}"
projectId: encord-active-frontend
entryPoint: frontend
25 changes: 25 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pre-commit workflow

on:
pull_request:
workflow_dispatch:

env:
PYTHON: 3.9.14

jobs:
pre-commit:
name: Linting and type checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
- name: Setup root poetry environment
uses: ./.github/actions/setup-root-poetry-environment

- name: Run linting, type checking and testing
uses: pre-commit/action@v2.0.3
with:
extra_args: "--all-files --hook-stage=push"
Loading

0 comments on commit a788f13

Please sign in to comment.