diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 159ce13b3fff..23cee2905d8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools six wheel - python -m pip install pytest-cov -r requirements.txt + python -m pip install ".[dev]" # --editable - name: Run tests run: pytest --ignore=project_euler/ --ignore=scripts/validate_solutions.py --cov-report=term-missing:skip-covered --cov=. . - if: ${{ success() }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 004def5e4e8b..6ce6dbb5588d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,6 @@ repos: - id: end-of-file-fixer types: [python] - id: trailing-whitespace - - id: requirements-txt-fixer - repo: https://github.com/MarcoGorelli/auto-walrus rev: v0.2.1 @@ -75,6 +74,11 @@ repos: project_euler/problem_022/p022_names.txt )$ + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.10.1 + hooks: + - id: validate-pyproject + - repo: local hooks: - id: validate-filenames diff --git a/pyproject.toml b/pyproject.toml index 410e7655b2b5..c5ec0788668f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,53 @@ +[build-system] +requires = ["setuptools ~= 65.5", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "python-algorithms" +description = "All algorithms implemented in Python" +version = "1.0.0" + +authors = [ + { name = "Christian Clauss", email = "cclauss@me.com" }, + { name = "Dhruv Manilawala", email = "dhruvmanila@gmail.com" }, + { name = "John Law", email = "johnlaw.po@gmail.com" } +] + +dependencies = [ + "beautifulsoup4", + "fake_useragent", + "keras", + "lxml", + "matplotlib", + "numpy", + "opencv-python", + "pandas", + "pillow", + "projectq", + "qiskit", + "requests", + "rich", + "scikit-fuzzy", + "sklearn", + "statsmodels", + "sympy", + "tensorflow", + "texttable", + "tweepy", + "xgboost", + "yulewalker" +] + +[project.optional-dependencies] +dev = [ + "pre-commit", + "pytest", + "pytest-cov" +] + +[tool.setuptools] +packages = [ ] + [tool.pytest.ini_options] markers = [ "mat_ops: mark a test as utilizing matrix operations.", diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9ffe784c945d..000000000000 --- a/requirements.txt +++ /dev/null @@ -1,22 +0,0 @@ -beautifulsoup4 -fake_useragent -keras -lxml -matplotlib -numpy -opencv-python -pandas -pillow -projectq -qiskit -requests -rich -scikit-fuzzy -sklearn -statsmodels -sympy -tensorflow -texttable -tweepy -xgboost -yulewalker