Skip to content

ci: Consolidate requirements into pyproject.toml #7565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b663d49
ci: Consolidate requirements into `pyproject.toml`
CaedenPH Oct 23, 2022
380784c
ci: Remove `requirements-txt-fixer`
CaedenPH Oct 23, 2022
7e8ca85
fix: Validate pyproject.toml
CaedenPH Oct 23, 2022
4f6b143
Merge branch 'TheAlgorithms:master' into pyproject.toml
CaedenPH Oct 23, 2022
c7f9baa
ci: Add `validate-pyproject` to `pre-commit`
CaedenPH Oct 23, 2022
3693473
Merge branch 'pyproject.toml' of https://github.com/caedenph/python i…
CaedenPH Oct 23, 2022
11bfabc
Update pyproject.toml
CaedenPH Oct 23, 2022
1eb7fac
pip install --editable ".[dev]"
cclauss Oct 23, 2022
52b6c26
python -m pip install --editable ".[dev]"
cclauss Oct 23, 2022
61388bd
[build-system] requires = ["setuptools ~= 65.5"]
cclauss Oct 23, 2022
8db92db
[build-system] requires = ["setuptools ~= 65.5"]
cclauss Oct 23, 2022
e03175f
Update build.yml
cclauss Oct 23, 2022
1dfd693
[build-system] requires = ["setuptools ~= 65.5", "wheel"]
cclauss Oct 23, 2022
17c8142
build-backend = "setuptools.build_meta"
cclauss Oct 23, 2022
e4f4ff7
packages
cclauss Oct 23, 2022
a72c39f
[tool.setuptools] packages = []
cclauss Oct 23, 2022
fdc0542
Update pyproject.toml
cclauss Oct 23, 2022
2faf714
Update pyproject.toml
cclauss Oct 23, 2022
495e5fe
Update build.yml
cclauss Oct 23, 2022
8f9a6ea
Fix my email
poyea Oct 25, 2022
a4fe6af
Merge branch 'master' into pyproject.toml
CaedenPH Oct 29, 2022
17926cf
Update pyproject.toml
CaedenPH Oct 30, 2022
d7b9665
ci: Add `pytest` and `pytest-cov` to dev dependencies
CaedenPH Oct 30, 2022
9bbd9b9
ci: Only install dependencies
CaedenPH Oct 30, 2022
bed5fb3
Merge branch 'master' into pyproject.toml
CaedenPH Oct 30, 2022
e9ce372
chore: Fix merge mistake
CaedenPH Oct 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]" },
{ name = "Dhruv Manilawala", email = "[email protected]" },
{ name = "John Law", email = "[email protected]" }
]

dependencies = [
"beautifulsoup4",
"fake_useragent",
"keras",
"lxml",
"matplotlib",
"numpy",
"opencv-python",
"pandas",
"pillow",
"projectq",
"qiskit",
"requests",
"rich",
"scikit-fuzzy",
"sklearn",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sklearn",
"scikit-learn",

https://pypi.org/project/scikit-learn/

"statsmodels",
"sympy",
"tensorflow",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"tensorflow",
# "tensorflow", # Not yet compatible with Python 3.11

"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.",
Expand Down
22 changes: 0 additions & 22 deletions requirements.txt

This file was deleted.