Skip to content

Commit

Permalink
add version 1 project
Browse files Browse the repository at this point in the history
  • Loading branch information
MahaleVivek committed May 22, 2023
1 parent 74ed308 commit 844eed7
Show file tree
Hide file tree
Showing 70 changed files with 3,366 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = lanarky/testing/*
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPENAI_API_KEY=#add your key here
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: "Bug report"
about: Create a report to help us improve
labels: bug
assignees: ""
---

<!-- Users should receive an incoming sound alert when a message is received
instead of an outgoing sound alert. -->

### Scenario

<!-- - Log in to the chat application -->
<!-- - Receive a message -->

### Actual result

<!-- The user receives an outgoing sound alert when a message is received -->

### Expected result

<!-- The user receives an incoming sound alert when a message is received -->

### Acceptance criteria

<!-- - [ ] Change sound assets from outgoing sound to incoming sound in receive
message function -->

- [ ]
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "Feature Request"
about: Suggest a new idea for this project
title: ""
labels: feature
assignees: ""
---

<!-- As a user, I want to hear sound alerts when sending and receiving messages
so conversations feel more immediate (and asynchronous)
The previous description follows the following brief structure:
As **[the actor]**, I want **[the something]** so I can **[the goal]**.
The actor — the person using the feature.
The something — what the user needs the feature for.
The goal — why the user needs it. -->

### Acceptance Criteria

<!-- This section is a checklist to confirm that the work done on a ticket meets the intended purpose and maps the deliverable into smaller outcomes
- [ ] The outgoing sound alert is played when a message is sent.
- [ ] The incoming sound alert is played when a message is received. -->

- [ ]
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Is this pull request ready for review? (if not, please submit in draft mode) -->

## Description

<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->

<!-- remove if not applicable -->

Fixes # (issue)

### Changelog:

<!-- add changes in the respective lists. add issue number in brackets, if required.
remove lists which are not relevant for this pull request -->

-
48 changes: 48 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
workflow_dispatch: # Allow running on-demand
push:
branches:
- main
paths:
- .github/workflows/ci.yaml
- lanarky/**
- tests/**
- "!**.md"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- .github/workflows/ci.yaml
- lanarky/**
- tests/**
- "!**.md"

env:
PYTHON_VERSION: 3.9
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-and-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: Run unit tests
run: make tests

- name: Upload coverage
run: make coverage
39 changes: 39 additions & 0 deletions .github/workflows/code-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Code check

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSION: 3.9

jobs:
code-check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Download pre-commit
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all --show-diff-on-failure
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish

on:
workflow_dispatch: # Allow running on-demand
push:
tags:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSION: 3.9

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: Set Poetry config
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}

- name: Publish package
run: poetry publish --build
Loading

0 comments on commit 844eed7

Please sign in to comment.