Christian Clauss
0bcdfbdb34
Use Astral uv ( #12402 )
...
* Use Astral uv
* uvx vs uv run
* uv sync --group=euler-validate,test
* uv sync --group=euler-validate --group=test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* --group=test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-05 10:04:48 +05:30
Christian Clauss
e9e7c96465
Create GitHub Pages docs with Sphinx ( #11888 )
2024-10-08 19:09:28 +02:00
Christian Clauss
0abeeab39f
Drop six from our GitHub Actions ( #11621 )
...
Drop https://six.readthedocs.io
2024-10-01 17:32:31 +02:00
Christian Clauss
0177ae1cd5
Upgrade to Python 3.13 ( #11588 )
2024-09-30 23:01:15 +02:00
Margaret
8faf823e83
adding a proper fractions algorithm ( #11224 )
...
* adding a proper fractions algorithm
* Implementing suggestions in maths/numerical_analysis/proper_fractions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Implementing suggestions to proper_fractions.py
* Fixing ruff errors in proper_fractions.py
* Apply suggestions from code review
* ruff check --output-format=github .
* Update maths/numerical_analysis/proper_fractions.py
* Update proper_fractions.py
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-20 14:33:40 +01:00
dependabot[bot]
6a169740e8
Bump actions/cache from 3 to 4 ( #11265 )
...
Bumps [actions/cache](https://github.com/actions/cache ) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](https://github.com/actions/cache/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 08:11:41 +01:00
Piotr Idzik
13559aee43
style: use proper indentation in ruff.yml
( #11237 )
...
* style: use proper indentation in `ruff.yml`
* chore: run `prettier` on `yml` files
* Update .pre-commit-config.yaml
* Update .pre-commit-config.yaml
* Update .pre-commit-config.yaml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update .pre-commit-config.yaml
* chore: run prettier on workflow files
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-13 12:24:58 +01:00
Piotr Idzik
ffb93adf46
chore: update actions/setup-python
to v5
( #11236 )
2024-01-12 18:25:59 +01:00
Piotr Idzik
a56f24e83d
fix: use GITHUB_ACTOR
in git config
( #11233 )
2024-01-12 17:46:26 +01:00
Piotr Idzik
227944eb29
fix: consider months and days in years_old
( #11234 )
...
* fix: do not consider months in `calculate_age`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update get_top_billionaires.py
* Update get_top_billionaires.py
* Update get_top_billionaires.py
* TODAY = datetime.utcnow()
* Update get_top_billionaires.py
* Update build.yml
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-01-12 17:12:15 +01:00
Christian Clauss
0f4e51245f
Upgrade to Python 3.12 ( #9576 )
...
* DRAFT: GitHub Actions: Test on Python 3.12
Repeats #8777
* #8777
Some of our dependencies will not be ready yet.
* Python 3.12: Disable qiskit and tensorflow algorithms
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-03 14:47:10 +05:30
Christian Clauss
596d934238
Fix ruff warning ( #9272 )
2023-10-01 17:28:30 +05:30
Kamil
97e2de0763
Euler 070 partial replacement of numpy loops. ( #9055 )
...
* Euler 070 partial replacement of numpy loops.
* Update project_euler/problem_070/sol1.py
* project_euler.yml: Upgrade actions/checkout@v4 and add numpy
* Update project_euler.yml
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-09-11 12:11:22 +02:00
Saransh Chopra
5a5ca06944
Update actions/checkout
with fetch-depth: 0
( #9046 )
...
* Update `actions/checkout` with `fetch-depth: 0`
* Update directory_writer.yml
* Create junk.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update directory_writer.yml
* Update directory_writer.yml
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-09 19:58:43 +02:00
Christian Clauss
d764eec655
Fix failing pytest quantum/bb84.py ( #8838 )
...
* Fix failing pytest quantum/bb84.py
* Update bb84.py test results to match current qiskit
2023-06-26 08:54:50 +05:30
Christian Clauss
3bfa89dacf
GitHub Actions build: Add more tests ( #8837 )
...
* GitHub Actions build: Add more tests
Re-enable some tests that were disabled in #6591 .
Fixes #8818
* updating DIRECTORY.md
* TODO: Re-enable quantum tests
* fails: pytest quantum/bb84.py quantum/q_fourier_transform.py
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-06-25 21:58:01 +05:30
Christian Clauss
c96241b5a5
Replace bandit, flake8, isort, and pyupgrade with ruff ( #8178 )
...
* Replace bandit, flake8, isort, and pyupgrade with ruff
* Comment on ruff rules
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-03-15 13:58:25 +01:00
Caeden Perelli-Harris
f512b4d105
refactor: Move pascals triange to maths/ ( #7932 )
...
* refactor: Move pascals triange to maths/
* Update xgboost_classifier.py
* statsmodels is now compatible with Python 3.11
* statsmodels is now compatible with Python 3.11
* cython>=0.29.28
* cython>=0.29.28 # For statsmodels on Python 3.11
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-11-01 20:25:39 +01:00
Christian Clauss
a31edd4477
Test on Python 3.11 ( #6591 )
...
* Test on Python 3.11 release candidate 2
* tensorflow; python<3.11
* tensorflow; python_version < 3.11
* tensorflow; python_version < "3.11"
* sympy, tensorflow; python_version < "3.11"
* sklearn; python_version < "3.11"
* matplotlib, pandas, qiskit
* statsmodels; python_version < "3.11"
* Bring back Pandas
* Problem deps are qiskit, statsmodels, and tensorflow
* updating DIRECTORY.md
* python-version: 3.11-dev --> 3.11
* updating DIRECTORY.md
* Add pytest --ignore to pyproject.toml
* Update build.yml
* Update pyproject.toml
* Update pyproject.toml
* Python 3.11
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-31 14:50:03 +01:00
Andrey
a9bd68d96e
Add running doctest to pytest default ( #7840 )
...
* Add default options for pytest
* updating DIRECTORY.md
* Move pytest settings to pyproject.toml
* Move coverage settings to the pyproject.toml
* Return --doctest-continue-on-failure to pytest
* Convert pytest args to list
* Update pyproject.toml
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-29 14:27:47 +02:00
Christian Clauss
e9862adafc
chore: remove pre-commit GHA ( #6565 )
...
[`pre-commit.ci` is working](https://results.pre-commit.ci/repo/github/63476337 ) so let's remove our redundant and less powerful GitHub Action.
2022-10-03 06:57:14 +05:30
Christian Clauss
dad789d903
Get rid of the Union ( #6246 )
...
* Get rid of the Union
* updating DIRECTORY.md
* Get rid of the Union
* Remove the redundant pre-commit runs.
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-07-11 13:11:17 +02:00
Christian Clauss
0a0f4986e4
Upgrade GitHub Actions ( #6236 )
...
* Upgrade GitHub Actions
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-07-07 05:25:25 +02:00
Christian Clauss
885580b3a1
pyupgrade --py310-plus and run mypy in precommit, not build ( #5996 )
...
* pyupgrade --py310-plus and run mypy in precommit, not build
* pyupgrade --py310-plus web_programming/fetch_well_rx_price.py
* pyupgrade --py310-plus web_programming/fetch_well_rx_price.py
* Fix arithmetic_analysis/in_static_equilibrium.py
* Fix arithmetic_analysis/in_static_equilibrium.py
2022-02-13 11:01:58 +01:00
Christian Clauss
f707f6d689
Upgrade to Python 3.10 ( #5992 )
...
* Upgrade to Python 3.10
* Upgrade to Python 3.10
* mypy || true
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-02-13 06:57:44 +01:00
Michael Currin
7423875cef
ci: add mkdir step for mypy ( #5927 )
...
* ci: add mkdir step for mypy
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-01-26 23:35:51 +08:00
Andrew Grangaard
551c65766d
[Mypy] fix other/least_recently_used ( #5814 )
...
* makes LRUCache constructor concrete
* fixes bug in dq_removal in other/least_recently_used
+ deque.remove() operates by value not index
* [mypy] Annotates other/least_recently_used over generic type
+ clean-up: rename key_reference to match type.
* [mypy] updates example to demonstrate LRUCache with complex type
* Adds doctest to other/least_recently_used
* mypy.ini: Remove exclude = (other/least_recently_used.py)
* Various mypy configs
* Delete mypy.ini
* Add mypy to .pre-commit-config.yaml
* mypy --ignore-missing-imports --install-types --non-interactive .
* mypy v0.910
* Pillow=8.3.7
* Pillow==8.3.7
* Pillow==8.3.2
* Update .pre-commit-config.yaml
* Update requirements.txt
* Update pre-commit.yml
* --install-types # See mirrors-mypy README.md
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-16 15:01:17 +01:00
Christian Clauss
8ac86f2ce5
mypy: Exclude only 20 files that are still failing ( #5608 )
...
* DRAFT: Run a mypy reality check
Let's see what is required to finish #4052
* mypy --ignore-missing-imports --install-types --non-interactive
* Check our progress...
* Update build.yml
* Update build.yml
* Update build.yml
* Update build.yml
* mypy --exclude 20 files
* --exclude with no `=`
* Update build.yml
* 558 character regex!!!
* With quotes
* mypy.ini: mega exclude
* Update mypy.ini
* Update build.yml
* Update mypy.ini
* Update build.yml
* Update mypy.ini
* .py --> .p*
* Escape the dots!: `.` --> `\.`
* Remove the comment
* Leading slash
* Update mypy.ini
Co-authored-by: Dylan Buchi <devybuchi@gmail.com>
Co-authored-by: Dylan Buchi <devybuchi@gmail.com>
2021-11-06 13:58:15 +01:00
Christian Clauss
ca842b4add
It is OK to test ./scripts ( #5290 )
...
* It is OK to test ./scripts
* updating DIRECTORY.md
* Update build.yml
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-14 18:19:47 +02:00
Christian Clauss
abc725f12d
mypy --install-types --non-interactive . ( #4530 )
...
* mypy --install-types --non-interactive .
@dhruvmanila Is this useful/needed given that we do not pin our dependencies?
https://mypy-lang.blogspot.com/2021/06/mypy-0910-released.html
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-23 01:37:18 +08:00
Dhruv Manilawala
daeb6a7e08
fix(action): delete approve workflow as it does not work ( #4453 )
2021-06-10 22:48:40 +05:30
Dhruv Manilawala
32e9072627
fix(action): testing and fixing errors ( #4446 )
...
* fix(action): testing and fixing errors
* fix: testing if all is a valid entry for workflows
* fix: more events to trigger workflow tests
* fix: double quotes -> single quotes
* fix: add workflows name to the list
* revert: remove added events
This reverts commit 3daeeb2ba3
2021-05-21 19:25:59 +05:30
Dhruv Manilawala
ac29f70755
fix(action): correct indentation for types key ( #4445 )
...
* fix(action): correct indentation for types key
* updating DIRECTORY.md
* refactor: add quotes around name key
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-05-21 19:03:56 +05:30
Dhruv Manilawala
92836d57f6
feat: action to approve workflow run ( #4444 )
2021-05-21 14:31:56 +05:30
Dhruv Manilawala
6f21f76696
fix(ci): Update pre-commit hooks and apply new black ( #4359 )
...
* fix(ci): Update pre-commit hooks and apply new black
* remove empty docstring
2021-04-26 07:46:50 +02:00
Dhruv Manilawala
c49fa088a0
feat: Add mypy configuration file ( #4315 )
...
* feat: Add mypy config file
* refactor: Remove mypy options from build workflow
* Remove linear_algebra
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-04-06 12:54:26 +02:00
Dhruv Manilawala
8c2986026b
fix(mypy): type annotations for linear algebra algorithms ( #4317 )
...
* fix(mypy): type annotations for linear algebra algorithms
* refactor: remove linear algebra directory from mypy exclude
2021-04-05 15:37:38 +02:00
Dhruv Manilawala
20c7518028
fix(mypy): type annotations for conversions algorithms ( #4314 )
...
* fix(mypy): type annotations for conversions algorithms
* refactor(CI): include conversions algorithms for mypy tests
2021-04-04 15:25:49 +02:00
Dhruv Manilawala
60895366c0
fix(mypy): type annotations for cipher algorithms ( #4306 )
...
* fix(mypy): type annotations for cipher algorithms
* Update mypy workflow to include cipher directory
* fix: mypy errors in hill_cipher.py
* fix build errors
2021-04-04 07:22:12 +02:00
algobytewise
a53fcf221b
[mypy] fix hashes folder ( #4305 )
...
* fix hashes-folder
* Update build.yml
* fix doctests
* return-values to int
* Update hashes/adler32.py
* type hints for elements
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-04-03 13:31:46 +05:30
algobytewise
5229c74955
[mypy] Fix directory arithmetic_analysis ( #4304 )
...
* fix directory arithmetic_analysis
* Update build.yml
* temporary fix for psf/black bug
see https://github.com/psf/black/issues/2079
* Update in_static_equilibrium.py
2021-04-02 09:32:12 +02:00
Christian Clauss
895bca3654
[mypy] Fix web_programming directory ( #4297 )
...
* Update world_covid19_stats.py
* Delete monkeytype_config.py
* updating DIRECTORY.md
* Apply pyannotate suggestions to emails_from_url.py
* mypy web_programming/emails_from_url.py
* super().__init__()
* mypy --ignore-missing-imports web_programming/emails_from_url.py
* Update emails_from_url.py
* self.urls: list[str] = []
* mypy: Fix web_programming directory
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2021-03-31 08:48:07 +05:30
Christian Clauss
c22c7d503b
mypy: Use a --exclude list ( #4296 )
...
* mypy: Use a --exclude list
* Graphics works on my machine
* A few more...
* A few more...
* Update build.yml
2021-03-31 08:32:25 +05:30
algobytewise
35901eb6fe
Move: traversals/binary_tree_traversals.py --> searches/binary_tree_traversal.py ( #4295 )
...
* Rename traversals/binary_tree_traversals.py to searches/binary_tree_traversal.py
* updating DIRECTORY.md
* Delete traversals directory
* Update build.yml
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-03-27 10:18:48 +01:00
algobytewise
9b60be67af
[mypy] fix small folders 2 ( #4293 )
...
* Update perceptron.py
* Update binary_tree_traversals.py
* fix machine_learning
* Update build.yml
* Update perceptron.py
* Update machine_learning/forecasting/run.py
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-03-26 12:21:16 +01:00
algobytewise
959507901a
[mypy] fix small folders ( #4292 )
...
* add final else-statement
* fix file_transfer
* fix quantum folder
* fix divide_and_conquer-folder
* Update build.yml
* updating DIRECTORY.md
* Update ripple_adder_classic.py
* Update .github/workflows/build.yml
* removed imports from typing
* removed conversion to string
* Revert "removed conversion to string"
This reverts commit 2f7c4731d1
.
* implemented suggested changes
* Update receive_file.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-03-23 16:51:50 +01:00
algobytewise
a8db5d4b93
[mypy] fix compression folder ( #4290 )
...
* Update lempel_ziv.py
* Update build.yml
* updating DIRECTORY.md
* fix doctest in 2_hidden_layers_neural_network.py
* one more doctest
* simplified tests
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-03-22 19:24:05 +01:00
Christian Clauss
8d7ef6a7f5
build.yml: Run mypy --ignore-missing-imports ( #4276 )
...
* build.yml: Run mypy --ignore-missing-imports
* pip install mypy
* Remove failing directories
* Add fractals and drop python-m
2021-03-20 07:01:13 +01:00
Christian Clauss
b8a19ccfea
GitHub Actions: fast-fail on black formatting issues ( #4268 )
...
* GitHub Actions: fast-fail on black formatting issues
Give fast feedback to contributors https://github.com/psf/black#github-actions
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-03-20 10:39:56 +05:30
Dhruv Manilawala
ba6310b647
Validate only submitted Project Euler solution ( #3977 )
...
* Update validate solution script to fetch only submitted solution
* Update workflow file with the updated PE script
* Fix: do not fetch `validate_solutions.py` script
* Update script to use the requests package for API calls
* Fix: install requests module
* Pytest ignore scripts/ directory
2020-11-29 23:11:09 +05:30