-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
2,724 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: General Linting | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, edited] | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
code-linting: | ||
name: General Code Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
architecture: x64 | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- run: | | ||
poetry install | ||
- run: poetry run black --diff --check thepassiveinvestor | ||
- run: poetry run codespell | ||
- run: poetry run ruff thepassiveinvestor | ||
- run: poetry run pylint thepassiveinvestor | ||
|
||
markdown-link-check: | ||
name: Markdown Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Check out the code | ||
- name: Lint Code Base | ||
uses: docker://avtodev/markdown-lint:v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
exclude_types: [css, markdown, text, svg] | ||
- id: trailing-whitespace | ||
exclude_types: [html, markdown, text] | ||
- id: check-merge-conflict | ||
- id: detect-private-key | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.1.1" | ||
hooks: | ||
- id: ruff | ||
entry: ruff --ignore PLR0915,S301 | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.5 | ||
hooks: | ||
- id: codespell | ||
entry: codespell | ||
args: | ||
[ | ||
"--ignore-words-list=plaform,VAI,nam,tha,MIS,shs,amplitud,gard,te,commun,ro,zar,vie,hel,jewl,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,statics,ket,toke,certi,buidl,ot", | ||
"--quiet-level=2", | ||
"--skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,build/pyinstaller/*,pyproject.toml", | ||
"-x=.github/workflows/linting.yml" | ||
] | ||
- repo: local | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
description: "" | ||
entry: mypy | ||
language: python | ||
"types_or": [python, pyi] | ||
args: ["--ignore-missing-imports", "--scripts-are-modules"] | ||
require_serial: true | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint financetoolkit | ||
language: system | ||
types: [python] |
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
[tool.poetry] | ||
name = "thepassiveinvestor" | ||
version = "1.2.2" | ||
description = "Passive Investing for the Average Joe." | ||
license = "MIT" | ||
authors = ["Jeroen Bouma"] | ||
packages = [ | ||
{ include = "thepassiveinvestor" }, | ||
] | ||
include = ['normalization/*.csv'] | ||
readme = "README.md" | ||
homepage = "https://www.jeroenbouma.com/projects/thepassiveinvestor" | ||
repository = "https://github.com/JerBouma/thepassiveinvestor" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Financial and Insurance Industry", | ||
"Topic :: Office/Business :: Financial :: Investment", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
keywords = [ | ||
"Passive", | ||
"Investing", | ||
"Financial", | ||
"Analysis", | ||
"Fundamental", | ||
"Technical", | ||
"Quantitative", | ||
"Database", | ||
"Equities", | ||
"Currencies", | ||
"Economics", | ||
"ETFs", | ||
"Funds", | ||
"Indices", | ||
"Moneymarkets", | ||
"Commodities", | ||
"Options" | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.10, <3.13" | ||
pandas = {extras = ["computation", "performance", "excel"], version = "^2.2"} | ||
yahooquery = "^2.2" | ||
urllib3 = "^1.26" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^7.4.1" | ||
pylint = "^2.17.5" | ||
codespell = "^2.2.5" | ||
black = "^23.7.0" | ||
pytest-mock = "^3.11.1" | ||
pytest-recording = "^0.13.0" | ||
pytest-cov = "^4.1.0" | ||
ruff = "^0.0.287" | ||
pytest-timeout = "^2.1.0" | ||
pytest-recorder = "^0.2.3" | ||
ipykernel = "^6.25.2" | ||
|
||
[build-system] | ||
requires = ["setuptools<65.5.0", "poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.ruff] | ||
line-length = 122 | ||
select = ["E", "W", "F", "Q", "W", "S", "UP", "I", "PD", "SIM", "PLC", "PLE", "PLR", "PLW"] | ||
ignore = ["S105", "S106", "S107", "PLR0913", "PLR0912", "PLR0911", "PLR0915", "PD010", "PD013", "S310", "S301"] | ||
exclude = ["conftest.py"] | ||
|
||
[tool.pylint] | ||
max-line-length = 122 | ||
disable = ["R0913", "W1514", "R0911", "R0912", "R0915", "R0801", "W0221", "C0103", "E1131"] | ||
|
||
[tool.ruff.isort] | ||
combine-as-imports = true | ||
force-wrap-aliases = true | ||
|
||
[tool.isort] | ||
profile = "black" | ||
line_length = 122 | ||
skip_gitignore = true | ||
combine_as_imports = true | ||
|
||
[tool.codespell] | ||
ignore-words-list = 'te,hsi,amplitud,nam,tha,plaform' | ||
skip = '*.json,./.git,pyproject.toml,poetry.lock,examples' | ||
|
||
[tool.mypy] | ||
disable_error_code = "misc" | ||
|
||
[tool.pytest.ini_options] | ||
filterwarnings = [ | ||
"ignore::pytest.PytestAssertRewriteWarning:", | ||
] |
This file was deleted.
Oops, something went wrong.