Skip to content

Commit 4b8091c

Browse files
author
DUYN
committed
first commit
0 parents  commit 4b8091c

26 files changed

+1423
-0
lines changed

.gitignore

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Python template
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
pip-wheel-metadata/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings
62+
db.sqlite3
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# celery beat schedule file
95+
celerybeat-schedule
96+
97+
# SageMath parsed files
98+
*.sage.py
99+
100+
# Environments
101+
.env
102+
.venv
103+
env/
104+
venv/
105+
ENV/
106+
env.bak/
107+
venv.bak/
108+
109+
# Spyder project settings
110+
.spyderproject
111+
.spyproject
112+
113+
# Rope project settings
114+
.ropeproject
115+
116+
# mkdocs documentation
117+
/site
118+
119+
# mypy
120+
.mypy_cache/
121+
.dmypy.json
122+
dmypy.json
123+
124+
# Pyre type checker
125+
.pyre/
126+
127+
# Custom
128+
config.json
129+
bot_configuration.db
130+
*.db
131+
.idea
132+
*log*

CONTRIBUTING.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Contributing
2+
3+
## Contribute to the value investing bot
4+
5+
Feel like our bot is missing a feature? We welcome your pull requests!
6+
7+
Few pointers for contributions:
8+
9+
- Create your PR against the `develop` branch, not `master`.
10+
- New features need to contain unit tests and must be PEP8 conformant (max-line-length = 100).
11+
12+
If you are unsure, discuss the feature on our [Slack](https://join.slack.com/t/investingbots/shared_invite/enQtODgwNTg3MzA2MjYyLTdiZjczZDRlNWJjNDdmYThiMGE0MzFhOTg4Y2E0NzQ2OTgxYjA1NzU3ZWJiY2JhOTE1ZGJlZGFiNDU3OTAzMDg)
13+
or in a [issue](https://github.com/investingbots/value-investing-bot/issues) before a PR.
14+
15+
## Getting started
16+
17+
## Before sending the PR:
18+
19+
### 1. Run unit tests
20+
21+
All unit tests must pass. If a unit test is broken, change your code to
22+
make it pass. It means you have introduced a regression.
23+
24+
#### Test the whole project
25+
26+
```bash
27+
pytest
28+
```
29+
30+
#### Test only one file
31+
32+
```bash
33+
pytest tests/test_<file_name>.py
34+
```
35+
36+
#### Test only one method from one file
37+
38+
```bash
39+
pytest tests/test_<file_name>.py::test_<method_name>
40+
```
41+
42+
### 2. Test if your code is PEP8 compliant
43+
44+
#### Run Flake8
45+
46+
```bash
47+
flake8 bot
48+
```
49+
50+
We receive a lot of code that fails the `flake8` checks.
51+
To help with that, we encourage you to install the git pre-commit
52+
hook that will warn you when you try to commit code that fails these checks.
53+
Guide for installing them is [here](http://flake8.pycqa.org/en/latest/user/using-hooks.html).
54+
55+
### 3. Test if all type-hints are correct
56+
57+
#### Run mypy
58+
59+
``` bash
60+
mypy bot
61+
```
62+
63+
## (Core)-Committer Guide
64+
65+
### Process: Pull Requests
66+
67+
How to prioritize pull requests, from most to least important:
68+
69+
1. Fixes for broken tests. Broken means broken on any supported platform or Python version.
70+
1. Extra tests to cover corner cases.
71+
1. Minor edits to docs.
72+
1. Bug fixes.
73+
1. Major edits to docs.
74+
1. Features.
75+
76+
Ensure that each pull request meets all requirements in the Contributing document.
77+
78+
### Process: Issues
79+
80+
If an issue is a bug that needs an urgent fix, mark it for the next patch release.
81+
Then either fix it or mark as please-help.
82+
83+
For other issues: encourage friendly discussion, moderate debate, offer your thoughts.
84+
85+
### Process: Your own code changes
86+
87+
All code changes, regardless of who does them, need to be reviewed and merged by someone else.
88+
This rule applies to all the core committers.
89+
90+
Exceptions:
91+
92+
- Minor corrections and fixes to pull requests submitted by others.
93+
- While making a formal release, the release manager can make necessary, appropriate changes.
94+
- Small documentation changes that reinforce existing subject matter. Most commonly being, but not limited to spelling and grammar corrections.
95+
96+
### Responsibilities
97+
98+
- Ensure cross-platform compatibility for every change that's accepted. Windows, Mac & Linux.
99+
- Ensure no malicious code is introduced into the core code.
100+
- Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community feedback.
101+
- Keep feature versions as small as possible, preferably one new feature per version.
102+
- Be welcoming to newcomers and encourage diverse new contributors from all backgrounds. See the Python Community Code of Conduct (https://www.python.org/psf/codeofconduct/).
103+
104+
### Becoming a Committer
105+
106+
Contributors may be given commit privileges. Preference will be given to those with:
107+
108+
1. Past contributions to value investing btot and other related open-source projects. Contributions to value investing bot include both code (both accepted and pending) and friendly participation in the issue tracker and Pull request reviews. Quantity and quality are considered.
109+
1. A coding style that the other core committers find simple, minimal, and clean.
110+
1. Access to resources for cross-platform development and testing.
111+
1. Time to devote to the project regularly.
112+
113+
Being a Committer does not grant write permission on `develop` or `master` for security reasons (Users trust the value investing bot with their Exchange API keys).
114+
115+
After being Committer for some time, a Committer may be named Core Committer and given full repository access.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 investingbots
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)