Spaces:
Running
Running
Tymec
commited on
Commit
•
38fb4a1
0
Parent(s):
project init
Browse files- .editorconfig +22 -0
- .gitattributes +18 -0
- .gitignore +194 -0
- .pre-commit-config.yaml +19 -0
- .vscode/settings.json +27 -0
- README.md +2 -0
- poetry.lock +0 -0
- pyproject.toml +117 -0
.editorconfig
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# EditorConfig is awesome!
|
2 |
+
|
3 |
+
# Mark this as the root editorconfig file
|
4 |
+
root = true
|
5 |
+
|
6 |
+
# Base ruleset for all files
|
7 |
+
[*]
|
8 |
+
charset = utf-8
|
9 |
+
end_of_line = lf
|
10 |
+
indent_size = 2
|
11 |
+
indent_style = space
|
12 |
+
insert_final_newline = true
|
13 |
+
trim_trailing_whitespace = true
|
14 |
+
|
15 |
+
# Override rules for python
|
16 |
+
[*.py]
|
17 |
+
indent_size = 4
|
18 |
+
|
19 |
+
# Override rules for markdown
|
20 |
+
[*.md]
|
21 |
+
# trailing whitespace is significant in markdown -> do not remove
|
22 |
+
trim_trailing_whitespace = false
|
.gitattributes
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Auto detect text files and perform LF normalization
|
2 |
+
# https://pablorsk.medium.com/be-a-git-ninja-the-gitattributes-file-e58c07c9e915
|
3 |
+
* text=auto
|
4 |
+
*.zip binary
|
5 |
+
|
6 |
+
# Hide from GitHub's language detection
|
7 |
+
data/** linguist-documentation
|
8 |
+
|
9 |
+
# Remove assets from github statistics
|
10 |
+
data/** linguist-vendored
|
11 |
+
|
12 |
+
# Set the language for these files to ensure GitHub doesn't show the comments as errors
|
13 |
+
.vscode/*.json linguist-language=JSON5
|
14 |
+
|
15 |
+
# Do not try and merge these files
|
16 |
+
data/** -diff
|
17 |
+
archive.zip -diff
|
18 |
+
Pipfile.lock -diff
|
.gitignore
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
|
2 |
+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,python
|
3 |
+
|
4 |
+
### Python ###
|
5 |
+
# Byte-compiled / optimized / DLL files
|
6 |
+
__pycache__/
|
7 |
+
*.py[cod]
|
8 |
+
*$py.class
|
9 |
+
|
10 |
+
# C extensions
|
11 |
+
*.so
|
12 |
+
|
13 |
+
# Distribution / packaging
|
14 |
+
.Python
|
15 |
+
build/
|
16 |
+
develop-eggs/
|
17 |
+
dist/
|
18 |
+
downloads/
|
19 |
+
eggs/
|
20 |
+
.eggs/
|
21 |
+
lib64/
|
22 |
+
parts/
|
23 |
+
sdist/
|
24 |
+
var/
|
25 |
+
wheels/
|
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 |
+
*.py,cover
|
53 |
+
.hypothesis/
|
54 |
+
.pytest_cache/
|
55 |
+
cover/
|
56 |
+
|
57 |
+
# Translations
|
58 |
+
*.mo
|
59 |
+
*.pot
|
60 |
+
|
61 |
+
# Django stuff:
|
62 |
+
*.log
|
63 |
+
local_settings.py
|
64 |
+
db.sqlite3
|
65 |
+
db.sqlite3-journal
|
66 |
+
|
67 |
+
# Flask stuff:
|
68 |
+
instance/
|
69 |
+
.webassets-cache
|
70 |
+
|
71 |
+
# Scrapy stuff:
|
72 |
+
.scrapy
|
73 |
+
|
74 |
+
# Sphinx documentation
|
75 |
+
docs/_build/
|
76 |
+
|
77 |
+
# PyBuilder
|
78 |
+
.pybuilder/
|
79 |
+
target/
|
80 |
+
|
81 |
+
# Jupyter Notebook
|
82 |
+
.ipynb_checkpoints
|
83 |
+
|
84 |
+
# IPython
|
85 |
+
profile_default/
|
86 |
+
ipython_config.py
|
87 |
+
|
88 |
+
# pyenv
|
89 |
+
# For a library or package, you might want to ignore these files since the code is
|
90 |
+
# intended to run in multiple environments; otherwise, check them in:
|
91 |
+
# .python-version
|
92 |
+
|
93 |
+
# pipenv
|
94 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
95 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
96 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
97 |
+
# install all needed dependencies.
|
98 |
+
#Pipfile.lock
|
99 |
+
|
100 |
+
# poetry
|
101 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
102 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
103 |
+
# commonly ignored for libraries.
|
104 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
105 |
+
#poetry.lock
|
106 |
+
|
107 |
+
# pdm
|
108 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
109 |
+
#pdm.lock
|
110 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
111 |
+
# in version control.
|
112 |
+
# https://pdm.fming.dev/#use-with-ide
|
113 |
+
.pdm.toml
|
114 |
+
|
115 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
116 |
+
__pypackages__/
|
117 |
+
|
118 |
+
# Celery stuff
|
119 |
+
celerybeat-schedule
|
120 |
+
celerybeat.pid
|
121 |
+
|
122 |
+
# SageMath parsed files
|
123 |
+
*.sage.py
|
124 |
+
|
125 |
+
# Environments
|
126 |
+
.env
|
127 |
+
.venv
|
128 |
+
env/
|
129 |
+
venv/
|
130 |
+
ENV/
|
131 |
+
env.bak/
|
132 |
+
venv.bak/
|
133 |
+
|
134 |
+
# Spyder project settings
|
135 |
+
.spyderproject
|
136 |
+
.spyproject
|
137 |
+
|
138 |
+
# Rope project settings
|
139 |
+
.ropeproject
|
140 |
+
|
141 |
+
# mkdocs documentation
|
142 |
+
/site
|
143 |
+
|
144 |
+
# mypy
|
145 |
+
.mypy_cache/
|
146 |
+
.dmypy.json
|
147 |
+
dmypy.json
|
148 |
+
|
149 |
+
# Pyre type checker
|
150 |
+
.pyre/
|
151 |
+
|
152 |
+
# pytype static type analyzer
|
153 |
+
.pytype/
|
154 |
+
|
155 |
+
# Cython debug symbols
|
156 |
+
cython_debug/
|
157 |
+
|
158 |
+
# PyCharm
|
159 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
160 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
161 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
162 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
163 |
+
#.idea/
|
164 |
+
|
165 |
+
### Python Patch ###
|
166 |
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
167 |
+
poetry.toml
|
168 |
+
|
169 |
+
# ruff
|
170 |
+
.ruff_cache/
|
171 |
+
|
172 |
+
# LSP config files
|
173 |
+
pyrightconfig.json
|
174 |
+
|
175 |
+
### VisualStudioCode ###
|
176 |
+
.vscode/*
|
177 |
+
!.vscode/settings.json
|
178 |
+
!.vscode/tasks.json
|
179 |
+
!.vscode/launch.json
|
180 |
+
!.vscode/extensions.json
|
181 |
+
!.vscode/*.code-snippets
|
182 |
+
|
183 |
+
# Local History for Visual Studio Code
|
184 |
+
.history/
|
185 |
+
|
186 |
+
# Built Visual Studio Code Extensions
|
187 |
+
*.vsix
|
188 |
+
|
189 |
+
### VisualStudioCode Patch ###
|
190 |
+
# Ignore all local history of files
|
191 |
+
.history
|
192 |
+
.ionide
|
193 |
+
|
194 |
+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
|
.pre-commit-config.yaml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
repos:
|
2 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
3 |
+
rev: v4.6.0
|
4 |
+
hooks:
|
5 |
+
- id: check-ast
|
6 |
+
- id: check-case-conflict
|
7 |
+
- id: check-merge-conflict
|
8 |
+
- id: check-toml
|
9 |
+
- id: debug-statements
|
10 |
+
- id: end-of-file-fixer
|
11 |
+
- id: mixed-line-ending
|
12 |
+
- id: trailing-whitespace
|
13 |
+
|
14 |
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
15 |
+
rev: v0.4.4
|
16 |
+
hooks:
|
17 |
+
- id: ruff
|
18 |
+
args: [ --fix ]
|
19 |
+
- id: ruff-format
|
.vscode/settings.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"notebook.formatOnSave.enabled": true,
|
3 |
+
"notebook.codeActionsOnSave": {
|
4 |
+
"notebook.source.fixAll": "explicit",
|
5 |
+
"notebook.source.organizeImports": "explicit"
|
6 |
+
},
|
7 |
+
"[python]": {
|
8 |
+
"editor.formatOnSave": true,
|
9 |
+
"editor.codeActionsOnSave": {
|
10 |
+
"source.fixAll": "explicit",
|
11 |
+
"source.organizeImports": "explicit"
|
12 |
+
},
|
13 |
+
"editor.defaultFormatter": "charliermarsh.ruff"
|
14 |
+
},
|
15 |
+
"python.terminal.activateEnvironment": false,
|
16 |
+
"files.exclude": {
|
17 |
+
"**/.git": true,
|
18 |
+
"**/.svn": true,
|
19 |
+
"**/.hg": true,
|
20 |
+
"**/CVS": true,
|
21 |
+
"**/.DS_Store": true,
|
22 |
+
"**/Thumbs.db": true,
|
23 |
+
"**/__pycache__": true,
|
24 |
+
"**/.ruff_cache": true,
|
25 |
+
"**/.venv": true,
|
26 |
+
}
|
27 |
+
}
|
README.md
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
Movie Recommendation System
|
2 |
+
---
|
poetry.lock
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pyproject.toml
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[tool.poetry]
|
2 |
+
name = "movie-recommender"
|
3 |
+
package-mode = false
|
4 |
+
|
5 |
+
[tool.poetry.dependencies]
|
6 |
+
python = "^3.12"
|
7 |
+
|
8 |
+
[tool.poetry.group.dev.dependencies]
|
9 |
+
ruff = "^0.4.1"
|
10 |
+
pre-commit = "^3.7.0"
|
11 |
+
ipykernel = "^6.29.4"
|
12 |
+
ipympl = "^0.9.4"
|
13 |
+
|
14 |
+
[tool.poetry.plugins.dotenv]
|
15 |
+
location = ".env"
|
16 |
+
|
17 |
+
[build-system]
|
18 |
+
requires = ["poetry-core"]
|
19 |
+
build-backend = "poetry.core.masonry.api"
|
20 |
+
|
21 |
+
[tool.ruff]
|
22 |
+
extend-include = ["*.ipynb"]
|
23 |
+
line-length = 120
|
24 |
+
indent-width = 4
|
25 |
+
|
26 |
+
[tool.ruff.lint]
|
27 |
+
fixable = ["ALL"]
|
28 |
+
# select = [
|
29 |
+
# "E", # pycodestyle
|
30 |
+
# "F", # Pyflakes
|
31 |
+
# "UP", # pyupgrade
|
32 |
+
# "B", # flake8-bugbear
|
33 |
+
# "SIM", # flake8-simplify
|
34 |
+
# "I", # isort
|
35 |
+
# ]
|
36 |
+
# ignore = [
|
37 |
+
# # Conflicting rules with the formatter
|
38 |
+
# "W191", # tab-indentation
|
39 |
+
# "E111", # indentation-with-invalid-multiple
|
40 |
+
# "E114", # indentation-with-invalid-multiple-comment
|
41 |
+
# "E117", # over-indented
|
42 |
+
# "D206", # indent-with-spaces
|
43 |
+
# "D300", # triple-single-quotes
|
44 |
+
# "Q000", # bad-quotes-inline-string
|
45 |
+
# "Q001", # bad-quotes-multiline-string
|
46 |
+
# "Q002", # bad-quotes-docstring
|
47 |
+
# "Q003", # avoidable-escaped-quote
|
48 |
+
# "COM812", # missing-trailing-comma
|
49 |
+
# "COM819", # prohibited-trailing-comma
|
50 |
+
# "ISC001", # single-line-implicit-string-concatenation
|
51 |
+
# "ISC002", # multi-line-implicit-string-concatenation
|
52 |
+
# "E501", # line-too-long
|
53 |
+
# ]
|
54 |
+
ignore = [
|
55 |
+
"E501", # pycodestyle line too long, handled by black
|
56 |
+
"D100", # pydocstyle - missing docstring in public module
|
57 |
+
"D101", # pydocstyle - missing docstring in public class
|
58 |
+
"D102", # pydocstyle - missing docstring in public method
|
59 |
+
"D103", # pydocstyle - missing docstring in public function
|
60 |
+
"D104", # pydocstyle - missing docstring in public package
|
61 |
+
"D105", # pydocstyle - missing docstring in magic method
|
62 |
+
"D106", # pydocstyle - missing docstring in public nested class
|
63 |
+
"D107", # pydocstyle - missing docstring in __init__
|
64 |
+
"D202", # pydocstyle - no blank lines allowed after function docstring
|
65 |
+
"D205", # pydocstyle - 1 blank line required between summary line and description
|
66 |
+
"D415", # pydocstyle - first line should end with a period, question mark, or exclamation point
|
67 |
+
"UP037", # pyupgrade - removes quotes from type annotation
|
68 |
+
"A003", # flake8-builtins - class attribute {name} is shadowing a python builtin
|
69 |
+
"B010", # flake8-bugbear - do not call setattr with a constant attribute value
|
70 |
+
"B008", # flake8-bugbear - Do not perform function call `Parameter` in argument defaultsRuff(B008)
|
71 |
+
"RUF012", # ruff - mutable class attributes should be annotated with `typing.ClassVar`
|
72 |
+
"ANN401", # ruff - Dynamically typed expressions (typing.Any) are disallowed
|
73 |
+
"ANN102",
|
74 |
+
"ANN101", # ruff - Missing type annotation for `self` in method
|
75 |
+
"PLR0913", # ruff - Too many arguments to function call
|
76 |
+
"PLR2004", # Magic value used in comparison
|
77 |
+
"FBT001", # Boolean typed positional argument in function definition
|
78 |
+
"FBT002", # Boolean default positional argument in function definition
|
79 |
+
"FBT003", # Boolean Boolean default positional argument in function definition
|
80 |
+
"ARG002", # Unused method argument
|
81 |
+
"ARG001", # Unused function argument
|
82 |
+
"TD002",
|
83 |
+
"TD003",
|
84 |
+
"FIX002",
|
85 |
+
"PGH003",
|
86 |
+
"RUF006",
|
87 |
+
"SLF001",
|
88 |
+
"PT007",
|
89 |
+
'PT004',
|
90 |
+
'PT005',
|
91 |
+
'S603',
|
92 |
+
"E501", # pycodestyle line too long, handled by black
|
93 |
+
"PLW2901", # pylint - for loop variable overwritten by assignment target
|
94 |
+
"ANN401",
|
95 |
+
"ANN102",
|
96 |
+
"ANN101",
|
97 |
+
"FBT",
|
98 |
+
"PLR0913", # too many arguments
|
99 |
+
"PT",
|
100 |
+
"TD",
|
101 |
+
"PERF203", # ignore for now; investigate
|
102 |
+
]
|
103 |
+
select = ["ALL"]
|
104 |
+
# Allow unused variables when underscore-prefixed
|
105 |
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
106 |
+
|
107 |
+
[tool.ruff.lint.pydocstyle]
|
108 |
+
convention = "google"
|
109 |
+
|
110 |
+
[tool.ruff.lint.mccabe]
|
111 |
+
max-complexity = 12
|
112 |
+
|
113 |
+
[tool.ruff.format]
|
114 |
+
docstring-code-format = true
|
115 |
+
|
116 |
+
[tool.ruff.lint.per-file-ignores]
|
117 |
+
"__init__.py" = ["E402"]
|