Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
louistiti committed Feb 10, 2019
0 parents commit ed093bf
Show file tree
Hide file tree
Showing 207 changed files with 23,098 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"presets": [
["env", {
"targets": {
"node": "current"
}
}]
],
"plugins": [
["module-resolver", {
"alias": {
"@@": ".",
"@": "./server/src"
},
"compilerOptions": {
"paths": {
"@@": ".",
"@": "./server/src"
}
}
}]
]
}
25 changes: 25 additions & 0 deletions .changelogrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"app_name": "Leon",
"sections": [
{
"title": "BREAKING CHANGES",
"grep": "BREAKING"
},
{
"title": "Features",
"grep": "^feat"
},
{
"title": "Bug Fixes",
"grep": "^fix"
},
{
"title": "Performance Improvements",
"grep": "^perf"
},
{
"title": "Documentation Changes",
"grep": "^docs"
}
]
}
151 changes: 151 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
version: 2

defaults: &defaults
working_directory: ~/project/leon-ai/leon
docker:
- image: leonai/ci:latest
environment:
LC_ALL: C.UTF-8 # Fix https://click.palletsprojects.com/en/7.x/python3/#python-3-surrogate-handling
LANG: C.UTF-8 # Fix https://click.palletsprojects.com/en/7.x/python3/#python-3-surrogate-handling
PIPENV_PIPFILE: bridges/python/Pipfile

jobs:
check-stack:
<<: *defaults
steps:
- checkout
- run:
name: Checking Node.js
command: node --version
- run:
name: Checking npm
command: npm --version
- run:
name: Checking Python
command: python3 --version
- run:
name: Checking Pipenv
command: pipenv --version
- persist_to_workspace:
root: ~/project/leon-ai
paths:
- leon

install-npm-dep:
<<: *defaults
steps:
- attach_workspace:
at: ~/project/leon-ai
- restore_cache:
keys:
- v1-leon-ai-leon-{{ .Branch }}-{{ checksum "package-lock.json" }}
- v1-leon-ai-leon-{{ .Branch }}-
- v1-leon-ai-leon-
- run:
name: Installing npm dependencies
command: npm install
- save_cache:
key: v1-leon-ai-leon-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- node_modules
- persist_to_workspace:
root: ~/project/leon-ai
paths:
- leon

init:
<<: *defaults
steps:
- attach_workspace:
at: ~/project/leon-ai
- restore_cache:
keys:
- v1-leon-ai-leon-{{ .Branch }}-{{ checksum "bridges/python/Pipfile.lock" }}
- v1-leon-ai-leon-{{ .Branch }}-
- v1-leon-ai-leon-
- run:
name: Setting up
command: npm run postinstall
- save_cache:
key: v1-leon-ai-leon-{{ .Branch }}-{{ checksum "bridges/python/Pipfile.lock" }}
paths:
- bridges/python/.venv
- persist_to_workspace:
root: ~/project/leon-ai
paths:
- leon

lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/project/leon-ai
- run:
name: Linting
command: npm run lint

test-json:
<<: *defaults
steps:
- attach_workspace:
at: ~/project/leon-ai
- run:
name: JSON testing
command: npm run test:json

test-e2e:
<<: *defaults
steps:
- attach_workspace:
at: ~/project/leon-ai
- run:
name: End-to-end testing
command: npm run test:e2e

test-unit:
<<: *defaults
steps:
- attach_workspace:
at: ~/project/leon-ai
- run:
name: Installing offline STT
command: npm run setup:offline-stt
- run:
name: Installing offline TTS
command: npm run setup:offline-tts
- run:
name: Unit testing
command: npm run test:unit

workflows:
version: 2
install-test:
jobs:
- check-stack
- install-npm-dep:
requires:
- check-stack
- init:
requires:
- check-stack
- install-npm-dep
- lint:
requires:
- check-stack
- install-npm-dep
- init
- test-json:
requires:
- check-stack
- install-npm-dep
- init
- test-e2e:
requires:
- check-stack
- install-npm-dep
- init
- test-unit:
requires:
- check-stack
- install-npm-dep
- init
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
insert_final_newline = true
42 changes: 42 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Language currently used
LEON_LANG=en-US

# Current env
LEON_NODE_ENV=development

# Server
LEON_SERVER_HOST=localhost
LEON_SERVER_PORT=1337

# Web app
LEON_WEBAPP_HOST=localhost
LEON_WEBAPP_PORT=4242

# Time zone (current one by default)
LEON_TIME_ZONE=

# Enable/disable after speech
LEON_AFTER_SPEECH=false

# Enable/disable Leon's speech-to-text
LEON_STT=false
# Speech-to-text provider
LEON_STT_PROVIDER=deepspeech

# Enable/disable Leon's text-to-speech
LEON_TTS=false
# Text-to-speech provider
LEON_TTS_PROVIDER=flite

# Enable/disable collaborative logger
LEON_LOGGER=true

# Path to the Pipfile
PIPENV_PIPFILE=bridges/python/Pipfile

# Path to the virtual env in .venv/
PIPENV_VENV_IN_PROJECT=true

# Fix https://click.palletsprojects.com/en/7.x/python3/#python-3-surrogate-handling
LC_ALL=C.UTF-8
LANG=C.UTF-8
39 changes: 39 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"extends": "airbnb-base",
"env": {
"node": true,
"es6": true,
"browser": true,
"jest/globals": true
},
"globals": {
"io": true,
"webkitSpeechRecognition": true
},
"plugins": [
"import",
"jest"
],
"settings": {
"import/resolver": {
"babel-module": { }
}
},
"rules": {
"no-multi-assign": "off",
"no-trailing-spaces": "off",
"linebreak-style": "off",
"indent": "off",
"strict": "off",
"no-console": "off",
"no-param-reassign": "off",
"no-shadow": "off",
"import/no-extraneous-dependencies": "off",
"import/no-dynamic-require": "off",
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"space-before-function-paren": ["error", "always"],
"prefer-destructuring": ["error", { "array": true, "object": true }],
"comma-dangle": ["error", "never"],
"semi": ["error", "never"]
}
}
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 making 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 both within project spaces and in public spaces
when an individual is representing the project or its community. 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 <louis.grenard@gmail.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
Loading

0 comments on commit ed093bf

Please sign in to comment.