Skip to content

Commit

Permalink
Merge pull request #840 from The-Commit-Company/develop
Browse files Browse the repository at this point in the history
Release v1.5
  • Loading branch information
nikkothari22 authored Apr 10, 2024
2 parents 273ffc3 + ec45bf1 commit ebc9d6e
Show file tree
Hide file tree
Showing 310 changed files with 21,058 additions and 6,467 deletions.
37 changes: 37 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[flake8]
ignore =
E121,
E126,
E127,
E128,
E203,
E225,
E226,
E231,
E241,
E251,
E261,
E265,
E302,
E303,
E305,
E402,
E501,
E741,
W291,
W292,
W293,
W391,
W503,
W504,
F403,
B007,
B950,
W191,
E124, # closing bracket, irritating while writing QB code
E131, # continuation line unaligned for hanging indent
E123, # closing bracket does not match indentation of opening bracket's line
E101, # ensured by use of black

max-line-length = 200
exclude=.github/helper/semgrep_rules
74 changes: 74 additions & 0 deletions .github/helper/flake8.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[flake8]
ignore =
B001,
B007,
B009,
B010,
B950,
E101,
E111,
E114,
E116,
E117,
E121,
E122,
E123,
E124,
E125,
E126,
E127,
E128,
E131,
E201,
E202,
E203,
E211,
E221,
E222,
E223,
E224,
E225,
E226,
E228,
E231,
E241,
E242,
E251,
E261,
E262,
E265,
E266,
E271,
E272,
E273,
E274,
E301,
E302,
E303,
E305,
E306,
E402,
E501,
E502,
E701,
E702,
E703,
E741,
F401,
F403,
F405,
W191,
W291,
W292,
W293,
W391,
W503,
W504,
E711,
E129,
F841,
E713,
E712,


max-line-length = 200
33 changes: 33 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linters

on:
pull_request:
workflow_dispatch:
push:
branches: [main]

jobs:
linters:
name: Semantic Commits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install and Run Pre-commit
uses: pre-commit/action@v2.0.3

- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules

- name: Download semgrep
run: pip install semgrep

- name: Run Semgrep rules
run: semgrep ci --config ./frappe-semgrep-rules/rules
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
exclude: "node_modules|.git"
default_stages: [commit]
fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
files: "raven.*"
exclude: ".*json$|.*txt$|.*csv|.*md|.*svg"
- id: check-yaml
- id: check-merge-conflict
- id: check-ast
- id: check-json
- id: check-toml
- id: debug-statements

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
hooks:
- id: pyupgrade
args: ["--py310-plus"]

- repo: https://github.com/adityahase/black
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
hooks:
- id: black
additional_dependencies: ["click==8.0.4"]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear", "flake8-tuple"]
args: ["--config", ".github/helper/flake8.conf"]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
exclude: ".*setup.py$"

ci:
autoupdate_schedule: weekly
skip: []
submodules: false
1 change: 1 addition & 0 deletions .semgrepignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.devcontainer/docker-compose.yml
3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
Expand Down
21 changes: 21 additions & 0 deletions api_docs/Chat Stream/Get Messages.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
meta {
name: Get Messages
type: http
seq: 1
}

get {
url: {{url}}:{{port}}/api/method/raven.api.chat_stream.get_messages?channel_id=general
body: none
auth: none
}

query {
channel_id: general
~channel_id: admin-private
~channel_id: does-not-exist
}

headers {
Authorization: token {{api_key}}:{{api_secret}}
}
2 changes: 1 addition & 1 deletion api_docs/environments/Dev.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
vars {
url: http://localhost
port: 8000
api_key: d0e4a68bf14f25d
api_key: a0fa913c5571c73
}
vars:secret [
api_secret
Expand Down
16 changes: 16 additions & 0 deletions api_docs/login.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: login
type: http
seq: 1
}

get {
url: {{url}}:{{port}}/api/method/login?usr=Administrator&pwd=admin
body: none
auth: none
}

query {
usr: Administrator
pwd: admin
}
17 changes: 17 additions & 0 deletions mobile/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
21 changes: 10 additions & 11 deletions mobile/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Raven</title>
<title>{{ app_name }}</title>
<meta name="description" content="Simple, work messaging tool.">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<!-- <link rel="manifest" href="/site.webmanifest"> -->
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
<meta name="color-scheme" content="dark" />
<meta name="msapplication-TileColor" content="#000000">
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Raven" />
<meta name="apple-mobile-web-app-title" content="{{ app_name }} | Raven" />
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#09090B">
<meta name="theme-color" content="#111113">
<meta name="screen-orientation" content="portrait">

<link rel="apple-touch-startup-image"
Expand Down Expand Up @@ -123,20 +124,18 @@
<link rel="apple-touch-startup-image"
media="screen and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
href="/splash_screens/8.3__iPad_Mini_portrait.png">
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&display=swap"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
<style>
body {
background-color: rgb(9 9 11);
background-color: #111113;
font-family: 'Inter', sans-serif;
}
</style>
</head>

<body>
<body class="dark">
<div id="root"></div>
<script>window.csrf_token = '{{ csrf_token }}';
if (!window.frappe) window.frappe = {};
Expand Down
29 changes: 21 additions & 8 deletions mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mobile",
"private": true,
"version": "1.4.4",
"version": "1.5.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -13,9 +13,12 @@
"@capacitor/app": "^5.0.7",
"@capacitor/core": "^5.7.0",
"@capacitor/haptics": "^5.0.7",
"@ionic/react": "^7.7.3",
"@ionic/react-router": "^7.7.3",
"@hookform/resolvers": "^3.3.4",
"@ionic/react": "^7.8.3",
"@ionic/react-hooks": "^0.0.8",
"@ionic/react-router": "^7.8.3",
"@ionic/storage": "^4.0.0",
"@radix-ui/themes": "^3.0.2",
"@tiptap/extension-code-block-lowlight": "^2.2.3",
"@tiptap/extension-highlight": "^2.2.3",
"@tiptap/extension-link": "^2.2.3",
Expand All @@ -27,20 +30,25 @@
"@tiptap/react": "^2.2.3",
"@tiptap/starter-kit": "^2.2.3",
"@tiptap/suggestion": "^2.2.3",
"@uidotdev/usehooks": "^2.4.1",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"cal-sans": "^1.0.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"emoji-picker-element": "^1.21.1",
"frappe-react-sdk": "^1.3.11",
"firebase": "^10.9.0",
"frappe-react-sdk": "^1.5.1",
"highlight.js": "^11.9.0",
"html-react-parser": "^5.1.8",
"ionicons": "^7.2.2",
"input-otp": "^1.2.2",
"ionicons": "^7.3.1",
"lowlight": "^3.1.0",
"postcss": "^8.4.35",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.50.1",
"react-hook-form": "^7.51.1",
"react-icons": "^5.0.1",
"react-intersection-observer": "^9.8.0",
"react-markdown": "^9.0.1",
Expand All @@ -50,11 +58,16 @@
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"remark-gfm": "^4.0.0",
"tailwind-merge": "^2.2.2",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.7",
"tippy.js": "^6.3.7",
"turndown": "^7.1.2",
"vite": "^4.5.2",
"vite-plugin-pwa": "^0.19.0"
"vite": "^4.5.3",
"vite-plugin-pwa": "^0.19.7",
"workbox-core": "^7.0.0",
"workbox-precaching": "^7.0.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@capacitor/cli": "^5.7.0",
Expand Down
Loading

0 comments on commit ebc9d6e

Please sign in to comment.