diff --git a/MANIFEST.in b/MANIFEST.in index 27f7e090..aa3fcc82 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include MANIFEST.in -include requirements.txt include *.json include *.md include *.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..64a781bb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,57 @@ +[project] +name = "education" +authors = [ + { name = "Frappe Technologies Pvt Ltd", email = "hello@frappe.io"} +] +description = "Education" +requires-python = ">=3.10" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + "setuptools>=69.0.0" +] + +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +[tool.ruff] +line-length = 110 +target-version = "py310" + +[tool.ruff.lint] +select = [ + "F", + "E", + "W", + "I", + "UP", + "B", + "RUF", +] +ignore = [ + "B017", # assertRaises(Exception) - should be more specific + "B018", # useless expression, not assigned to anything + "B023", # function doesn't bind loop variable - will have last iteration's value + "B904", # raise inside except without from + "E101", # indentation contains mixed spaces and tabs + "E402", # module level import not at top of file + "E501", # line too long + "E741", # ambiguous variable name + "F401", # "unused" imports + "F403", # can't detect undefined names from * import + "F405", # can't detect undefined names from * import + "F722", # syntax error in forward type annotation + "W191", # indentation contains tabs + "RUF001", # string contains ambiguous unicode character +] +typing-modules = ["frappe.types.DF"] + +[tool.ruff.format] +quote-style = "double" +indent-style = "tab" +docstring-code-format = true + +[project.urls] +Repository = "https://github.com/frappe/education.git" +"Bug Reports" = "https://github.com/frappe/education/issues" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 7668191f..00000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -# frappe -- https://github.com/frappe/frappe is installed via 'bench init' \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index defc035b..00000000 --- a/setup.py +++ /dev/null @@ -1,19 +0,0 @@ -from setuptools import setup, find_packages - -with open("requirements.txt") as f: - install_requires = f.read().strip().split("\n") - -# get version from __version__ variable in education/__init__.py -from education import __version__ as version - -setup( - name="education", - version=version, - description="Education", - author="Frappe Technologies Pvt. Ltd.", - author_email="hello@frappe.io", - packages=find_packages(), - zip_safe=False, - include_package_data=True, - install_requires=install_requires, -)