Skip to content
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

Feature/merge aoc utils, Maybe? #35

Open
wants to merge 565 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
565 commits
Select commit Hold shift + click to select a range
ec67b8d
Update deps
RoelAdriaans Dec 4, 2022
f001ea8
Implent day 5 with some stacks
RoelAdriaans Dec 5, 2022
802ce8d
Fix type annototion, was an assignment
Dec 6, 2022
228184e
Day 6, part a. Reading was an issue, you read it char by char, not in…
Dec 6, 2022
e574ba2
Day 6, copy/paste
Dec 6, 2022
dd4bf9a
Day 6, simplyfied
Dec 6, 2022
1df3325
Update dependencies
Dec 6, 2022
a081323
Bump pytest-xdist from 3.0.2 to 3.1.0 (#90)
dependabot[bot] Dec 6, 2022
fc47cea
Implement day 6 with more_itertools.sliding_window
RoelAdriaans Dec 6, 2022
aaca512
[WIP] Day 07
Dec 7, 2022
6422bc8
Implement part 2
RoelAdriaans Dec 7, 2022
9fdd00b
Use Counter to remove a weird sort, typing fix
RoelAdriaans Dec 7, 2022
e54752e
Add points
RoelAdriaans Dec 8, 2022
02a78b0
Print some output
Dec 8, 2022
912c001
Day 8, part a, verbose
Dec 8, 2022
33ec7a8
Day 08, part b
Dec 8, 2022
9175046
WIP day 9
Dec 9, 2022
e344b91
WIP day 9
RoelAdriaans Dec 10, 2022
ff4e72c
Implement day 9, part a. Screwing up the directions
RoelAdriaans Dec 10, 2022
a29b84c
Day 9, part b is simple if you can have the moving of the tails part …
RoelAdriaans Dec 11, 2022
083d4ef
Day 10, part 1, off-by-one
RoelAdriaans Dec 11, 2022
e0131cf
Day 10, implement ram, pre-calculate everything and draw
Dec 13, 2022
f6c3cf1
Everything is already off
Dec 13, 2022
3b069b5
Add a fixture for loading testdata
Dec 13, 2022
1b54a55
[WIP] day 11
Dec 13, 2022
308c66f
Implement day 11, part 1
RoelAdriaans Dec 13, 2022
c626405
Implement some mod magic
RoelAdriaans Dec 13, 2022
31dfff6
Replace eval with python code, to make it a lot faster:
RoelAdriaans Dec 13, 2022
be81b56
Update pre-commit stuff
Dec 14, 2022
0a97277
Day 12, with dfs/bfs. Seems to work, result is too low?
Dec 14, 2022
307efb4
Make day 12 mypy happy
Dec 14, 2022
97aba6b
Fix day 12: issues: Direction was wrong (Only horizontal required, bu…
Dec 14, 2022
e0b7d8f
Implement part b. If we modified BFS we could quit early, but meh
Dec 14, 2022
bb7bf44
[WIP] Day 13 work in progress
Dec 15, 2022
39cc76e
Bump isort from 5.10.1 to 5.11.3
dependabot[bot] Dec 19, 2022
55bc23b
Removed random import?
RoelAdriaans Dec 20, 2022
7af4d26
Removed random import?
RoelAdriaans Dec 20, 2022
93d3a5b
Fix some minor type and other issues
RoelAdriaans Dec 20, 2022
8297cb4
Upgrade to tox4
RoelAdriaans Dec 20, 2022
676e7f4
Skip tests that are not yet working
RoelAdriaans Dec 20, 2022
ccf3a28
Also skip the data one for now
RoelAdriaans Dec 20, 2022
e2ffad7
Merge pull request #17 from RoelAdriaans/feature/update-tox4
RoelAdriaans Dec 20, 2022
308d567
Merge pull request #101 from RoelAdriaans/dependabot/pip/isort-5.11.3
github-actions[bot] Dec 20, 2022
2daee14
Bump black from 22.10.0 to 22.12.0
dependabot[bot] Dec 20, 2022
3932708
Merge pull request #94 from RoelAdriaans/dependabot/pip/black-22.12.0
github-actions[bot] Dec 20, 2022
7082a4d
Bump tox from 3.27.1 to 4.0.15 (#102)
dependabot[bot] Dec 21, 2022
ddec5d4
Bump certifi from 2022.9.24 to 2022.12.7 (#93)
dependabot[bot] Dec 21, 2022
516bfd1
Bump isort from 5.11.3 to 5.11.4
dependabot[bot] Dec 22, 2022
4246ed8
Bump tox from 4.0.15 to 4.0.16 (#104)
dependabot[bot] Dec 22, 2022
fe027ca
Merge pull request #18 from RoelAdriaans/dependabot/pip/isort-5.11.4
RoelAdriaans Dec 22, 2022
1ea84da
Bump isort from 5.11.3 to 5.11.4 (#103)
dependabot[bot] Dec 22, 2022
cd252fb
Bump pre-commit from 2.20.0 to 2.21.0
dependabot[bot] Dec 26, 2022
fed3540
Bump tox from 4.0.16 to 4.0.18 (#107)
dependabot[bot] Dec 27, 2022
380cfb6
Bump pre-commit from 2.20.0 to 2.21.0
dependabot[bot] Dec 27, 2022
504015f
Merge pull request #19 from RoelAdriaans/dependabot/pip/pre-commit-2.…
RoelAdriaans Dec 28, 2022
cfb6638
Bump tox from 4.0.16 to 4.0.18
dependabot[bot] Dec 28, 2022
b76b5bb
Merge pull request #106 from RoelAdriaans/dependabot/pip/pre-commit-2…
github-actions[bot] Dec 28, 2022
ac38d91
Merge pull request #21 from RoelAdriaans/dependabot/pip/tox-4.0.18
github-actions[bot] Dec 28, 2022
a63fa0b
Bump tox from 4.0.18 to 4.0.19
dependabot[bot] Dec 29, 2022
45a4563
Bump tox from 4.0.18 to 4.0.19 (#108)
dependabot[bot] Dec 29, 2022
089fce1
Merge pull request #22 from RoelAdriaans/dependabot/pip/tox-4.0.19
RoelAdriaans Dec 29, 2022
5bf2749
Solve day 13, part 1
RoelAdriaans Dec 29, 2022
cd46f97
Implement part 2. Just a bit dirty, we creat the pairs and then rip t…
RoelAdriaans Dec 29, 2022
92b35f2
Bump tox from 4.0.19 to 4.1.1
dependabot[bot] Dec 30, 2022
8908bd0
Merge pull request #23 from RoelAdriaans/dependabot/pip/tox-4.1.1
RoelAdriaans Dec 30, 2022
c75329d
Implement a more natural sort, lowest to higest like it should do
RoelAdriaans Dec 30, 2022
d19946b
Merge remote-tracking branch 'origin/main'
RoelAdriaans Dec 30, 2022
0c0746d
Parse Day 14
RoelAdriaans Dec 30, 2022
20e146c
Update isort in pre-commit
RoelAdriaans Dec 30, 2022
f3a1fc9
Show the sprout
RoelAdriaans Dec 31, 2022
48f52dc
Solve day 14, part 1
RoelAdriaans Jan 1, 2023
3473e4c
Bump tox from 4.0.19 to 4.1.2 (#110)
dependabot[bot] Jan 2, 2023
d1760a9
Fix day 11, part 2. Takes ages, but it works :)
RoelAdriaans Jan 3, 2023
c6f1807
Py to 3.11
RoelAdriaans Jan 3, 2023
589f812
Update to ubuntu 22.04, python 3.11
RoelAdriaans Jan 3, 2023
00e46f3
Merge pull request #26 from RoelAdriaans/feature/update-py311
RoelAdriaans Jan 3, 2023
7929726
Bump tox from 4.1.1 to 4.1.3
dependabot[bot] Jan 3, 2023
3676cd3
Merge pull request #25 from RoelAdriaans/dependabot/pip/tox-4.1.3
RoelAdriaans Jan 3, 2023
ebf153f
Bump tox from 4.1.3 to 4.2.0
dependabot[bot] Jan 4, 2023
d6cc0ee
Merge pull request #27 from RoelAdriaans/dependabot/pip/tox-4.2.0
RoelAdriaans Jan 4, 2023
39a630a
Bump tox from 4.1.2 to 4.2.0 (#112)
dependabot[bot] Jan 4, 2023
64060e8
Add Python 3.11 (#113)
RoelAdriaans Jan 4, 2023
3f558bb
Bump tox from 4.2.0 to 4.2.4
dependabot[bot] Jan 6, 2023
983d8b6
Merge pull request #29 from RoelAdriaans/dependabot/pip/tox-4.2.4
RoelAdriaans Jan 6, 2023
585df97
Update deps
RoelAdriaans Jan 6, 2023
e82aff9
Day 15, part one
RoelAdriaans Jan 7, 2023
1ea74db
Add solution
RoelAdriaans Jan 7, 2023
0210bc1
Part 2
RoelAdriaans Jan 7, 2023
31d0ddf
WIP
RoelAdriaans Jan 8, 2023
b4f492f
Bump tox from 4.2.0 to 4.2.4 (#115)
dependabot[bot] Jan 8, 2023
12381c2
Exclude day 15, part 2, still not finished
RoelAdriaans Jan 8, 2023
4f2984f
By default, create empty test data files
RoelAdriaans Jan 8, 2023
5615dcd
Bump tox from 4.2.5 to 4.2.6
dependabot[bot] Jan 9, 2023
a769fe5
Bump tox from 4.2.4 to 4.2.6 (#116)
dependabot[bot] Jan 10, 2023
86e6059
Merge pull request #31 from RoelAdriaans/dependabot/pip/tox-4.2.6
github-actions[bot] Jan 11, 2023
06620f3
Day 15 now works, slowly :)
RoelAdriaans Jan 11, 2023
dfafd8c
Merge branch 'main' into feature/day-15
RoelAdriaans Jan 11, 2023
e0f43d0
Merge pull request #30 from RoelAdriaans/feature/day-15
RoelAdriaans Jan 11, 2023
942f352
Bump tox from 4.2.6 to 4.2.8
dependabot[bot] Jan 12, 2023
ee4ca80
Bump requests from 2.28.1 to 2.28.2
dependabot[bot] Jan 13, 2023
163dd3b
Merge pull request #33 from RoelAdriaans/dependabot/pip/requests-2.28.2
github-actions[bot] Jan 15, 2023
d0c156b
Merge pull request #117 from RoelAdriaans/dependabot/pip/tox-4.2.8
github-actions[bot] Jan 15, 2023
039013f
Bump tox from 4.2.6 to 4.2.8
dependabot[bot] Jan 15, 2023
754c9fb
Bump requests from 2.28.1 to 2.28.2
dependabot[bot] Jan 15, 2023
8c64b6c
Merge pull request #32 from RoelAdriaans/dependabot/pip/tox-4.2.8
github-actions[bot] Jan 15, 2023
6ea9e74
Merge pull request #118 from RoelAdriaans/dependabot/pip/requests-2.28.2
github-actions[bot] Jan 15, 2023
baf07f0
Bump pytest from 7.2.0 to 7.2.1
dependabot[bot] Jan 16, 2023
dde1e7b
Merge pull request #35 from RoelAdriaans/dependabot/pip/pytest-7.2.1
RoelAdriaans Jan 16, 2023
a477864
Bump tox from 4.2.8 to 4.3.1
dependabot[bot] Jan 16, 2023
399c17b
Merge pull request #36 from RoelAdriaans/dependabot/pip/tox-4.3.1
github-actions[bot] Jan 16, 2023
a06869d
Bump isort from 5.11.4 to 5.12.0
dependabot[bot] Jan 30, 2023
3549d52
Merge pull request #45 from RoelAdriaans/dependabot/pip/isort-5.12.0
github-actions[bot] Feb 2, 2023
b0bca1f
Bump tox from 4.3.1 to 4.4.4
dependabot[bot] Feb 2, 2023
4dd4b52
Merge pull request #48 from RoelAdriaans/dependabot/pip/tox-4.4.4
github-actions[bot] Feb 2, 2023
7991c7b
Bump python-dotenv from 0.21.0 to 0.21.1
dependabot[bot] Feb 2, 2023
338f3c2
Merge pull request #40 from RoelAdriaans/dependabot/pip/python-dotenv…
RoelAdriaans Feb 2, 2023
cc03766
Bump pre-commit from 2.21.0 to 3.0.3
dependabot[bot] Feb 2, 2023
3734a49
Merge pull request #50 from RoelAdriaans/dependabot/pip/pre-commit-3.0.3
RoelAdriaans Feb 2, 2023
5131143
Update every dependency (#138)
RoelAdriaans Feb 8, 2023
f30e7a8
Update deps!
RoelAdriaans Feb 8, 2023
0758106
First import of advent of code utils lib, needs restruct
RoelAdriaans Jul 30, 2023
0c98ef8
Remove file, better in aoc oslution itself
RoelAdriaans Jul 30, 2023
822b4c3
Add generic_search.py, from advent of code 2022, bump version
RoelAdriaans Aug 6, 2023
d9aa38f
Add stack length,
RoelAdriaans Aug 13, 2023
f1609d9
Remove the poetry.lock file, best practice not to include in a lib
RoelAdriaans Aug 13, 2023
bd2a227
Add explore all option to DFS/BFS search
RoelAdriaans Aug 20, 2023
0a4b6b3
Bumping version from 0.2.1 to 0.2.2
RoelAdriaans Aug 20, 2023
92ea3bb
Merge remote-tracking branch 'aoc_2020/main'
RoelAdriaans Nov 18, 2023
ab61f9a
Move tests 2020 to own directory
RoelAdriaans Nov 18, 2023
567cf39
Bump actions/setup-python from 3 to 4
dependabot[bot] Nov 18, 2023
8e198a8
Bump pascalgn/automerge-action from 0.15.3 to 0.15.6
dependabot[bot] Nov 18, 2023
baf6d30
Bump actions/checkout from 3 to 4
dependabot[bot] Nov 18, 2023
547c92e
Merge remote-tracking branch 'aoc_2021/main'
RoelAdriaans Nov 18, 2023
3e439f0
Rename tests to adventofcode2021
RoelAdriaans Nov 18, 2023
3ddf561
Merge remote-tracking branch 'aoc_2022/main'
RoelAdriaans Nov 18, 2023
1b1af00
Rename tests to adventofcode2022
RoelAdriaans Nov 18, 2023
597c6c8
Fix merge
RoelAdriaans Nov 18, 2023
fc4832a
update readme
RoelAdriaans Nov 18, 2023
41d6c70
Update and remove old files
RoelAdriaans Nov 18, 2023
06d4761
Create seperate apps
RoelAdriaans Nov 18, 2023
d68f561
Apply black
RoelAdriaans Nov 18, 2023
9c12f71
Update dependencies
RoelAdriaans Nov 18, 2023
0c74fc4
Merge pull request #3 from RoelAdriaans/dependabot/github_actions/act…
RoelAdriaans Nov 18, 2023
cd91779
Merge pull request #1 from RoelAdriaans/dependabot/github_actions/act…
RoelAdriaans Nov 18, 2023
9488f42
Merge pull request #2 from RoelAdriaans/dependabot/github_actions/pas…
RoelAdriaans Nov 18, 2023
ee79060
Run pyupgrade on all files and remove no longer used imports
RoelAdriaans Nov 18, 2023
d7fd2ea
Fix flake8, and ignore mypy since we have 37 errors that need fixing..
RoelAdriaans Nov 18, 2023
c3ed07a
Merge branch 'main' of github.com:RoelAdriaans/adventofcode
RoelAdriaans Nov 18, 2023
9645d11
Only support python 3.11
RoelAdriaans Nov 18, 2023
7c12365
Update lock to 3.12
RoelAdriaans Nov 18, 2023
3d7c691
Update pyupgrade and run again
RoelAdriaans Nov 18, 2023
2684953
Make tests work, add missing dependencies, workaround for tqdm not co…
RoelAdriaans Nov 19, 2023
b6190ab
Move to generic aoc functions, and remove duplicates
RoelAdriaans Nov 19, 2023
229cbe6
Make old code work with new adventutils, run tests that where skipped…
RoelAdriaans Nov 21, 2023
4d1c81b
Make points hashable and indexable via point.x and point["x"]
RoelAdriaans Nov 21, 2023
865f86a
Merge branch 'main' of github.com:RoelAdriaans/adventofcodeutils
RoelAdriaans Nov 21, 2023
32046d1
Update dependencies
RoelAdriaans Nov 21, 2023
ed61d47
Add bandit + config in CI pipeline
Nov 22, 2023
0a6cbfb
Fix issues bandit found
Nov 22, 2023
430ea6a
Merge pull request #12 from RoelAdriaans/feature/add-bandit
RoelAdriaans Nov 22, 2023
14cce85
Update tox.yml
RoelAdriaans Nov 22, 2023
04dcda8
Update dependabot.yml, add automerge
RoelAdriaans Nov 22, 2023
24ab003
Move FileReaderSolution / AbstractSolution to own package
RoelAdriaans Nov 26, 2023
ea7e926
Simplify regex and make it a raw string
RoelAdriaans Nov 26, 2023
8c530d5
Name pipeline to be visible
RoelAdriaans Nov 26, 2023
fae96fa
Merge remote-tracking branch 'httpssh/main' into feature/shared_abstract
Nov 27, 2023
ecde5f7
Fix day 20
Nov 27, 2023
5153a7b
Merge pull request #13 from RoelAdriaans/feature/shared_abstract
RoelAdriaans Nov 27, 2023
985c928
Move to generic advent of code util
Nov 28, 2023
eade078
Fix long line
Nov 28, 2023
6ffcb2e
Merge pull request #14 from RoelAdriaans/feature/separate-aoc-tool
RoelAdriaans Nov 28, 2023
2c7add8
Make coockiecutter generic for all years.
Nov 28, 2023
bd1a58b
Creating base files now works
Nov 28, 2023
4fb13c3
Write file to the correct location, fix typo
Nov 28, 2023
261a4ef
Also create empty test file
Nov 28, 2023
e097835
Update readme
Nov 28, 2023
34f1976
Merge pull request #15 from RoelAdriaans/fixcoockiecutter
RoelAdriaans Nov 28, 2023
cfe3452
Fix day 12 under windows
Nov 28, 2023
4c9d183
Move conftest from 2016 to all tests, remove conftest from 2022
Nov 28, 2023
83b945d
Use generic testdata pytest fixure for every tests that loaded test …
Nov 28, 2023
755cbc4
Merge pull request #16 from RoelAdriaans/fixcoockiecutter
RoelAdriaans Nov 28, 2023
dfccedb
Update readme
Nov 28, 2023
3e4124f
Merge pull request #17 from RoelAdriaans/updatereadme
RoelAdriaans Nov 28, 2023
27bc699
Move from src/adventofcode<year>/solutions to src/adventofcode<year>
Nov 28, 2023
fb4f8a0
Strip some newlines
Nov 28, 2023
2fcd148
Fix last test
RoelAdriaans Nov 28, 2023
9f55498
Merge pull request #18 from RoelAdriaans/removesolutions
RoelAdriaans Nov 28, 2023
bd92236
Fix template for tests after solution switch, add test case for testdata
RoelAdriaans Nov 28, 2023
73c7cc9
Merge pull request #19 from RoelAdriaans/feature/2022-day16
RoelAdriaans Nov 29, 2023
7a62876
Update test_{{cookiecutter.file_name}}_a.py
RoelAdriaans Nov 29, 2023
751949c
Update test_{{cookiecutter.file_name}}_b.py
RoelAdriaans Nov 29, 2023
681931e
Merge pull request #20 from RoelAdriaans/rename-test,-no-duplicates
RoelAdriaans Nov 29, 2023
1a00c4c
Day 16, part 1
Nov 29, 2023
97307ac
Sort the open valves. Speeds up the calculation by 10x
Nov 29, 2023
633d9b7
Day 16, part 2
Nov 29, 2023
b1fd41c
Merge pull request #21 from RoelAdriaans/feature/2022-16
RoelAdriaans Nov 29, 2023
1eb4a89
Day 1 for 2023. Where part b is evil...
RoelAdriaans Dec 1, 2023
00aa722
Add adventofcode2023 as package
Dec 1, 2023
0af9781
Merge pull request #22 from RoelAdriaans/feature/2023-01
RoelAdriaans Dec 1, 2023
e0f4dc7
Update depencencies
Dec 1, 2023
8734757
Merge pull request #23 from RoelAdriaans/feature/update
RoelAdriaans Dec 1, 2023
c04b4e2
2023, day 2. Not a clean solution, but it works
RoelAdriaans Dec 3, 2023
ba32242
2023, part 3.
RoelAdriaans Dec 3, 2023
da921a5
2023, day 3,
RoelAdriaans Dec 3, 2023
ef6a338
Merge pull request #25 from RoelAdriaans/feature/2023-02
RoelAdriaans Dec 3, 2023
d39ba37
Merge pull request #24 from RoelAdriaans/feature/2023-03
RoelAdriaans Dec 3, 2023
2a8aa35
2023, day 4
RoelAdriaans Dec 4, 2023
db0ebc8
Merge pull request #26 from RoelAdriaans/feature/2023-04
RoelAdriaans Dec 4, 2023
c07061b
2023, day 6. quick and dirty bruteforce..
RoelAdriaans Dec 6, 2023
ff41b60
Merge pull request #27 from RoelAdriaans/feature/2023-06
RoelAdriaans Dec 6, 2023
c8ffb4c
Bump actions/setup-python from 4 to 5
dependabot[bot] Dec 6, 2023
e52a922
Merge pull request #28 from RoelAdriaans/dependabot/github_actions/ac…
RoelAdriaans Dec 6, 2023
000c0e0
wip day 7
RoelAdriaans Dec 7, 2023
0da8d16
2023, day 7. Cards for days
RoelAdriaans Dec 8, 2023
1a9773d
Remove debugging
RoelAdriaans Dec 8, 2023
5b57a38
Merge 2018
RoelAdriaans Dec 8, 2023
b605cc7
Add 2018 package
RoelAdriaans Dec 8, 2023
6c8368b
Make 2018 package work in new structure, silence some errors
RoelAdriaans Dec 8, 2023
2a19079
Fix some errors after pre-commit `fixed` our line endings
RoelAdriaans Dec 8, 2023
9ce1498
Merge pull request #29 from RoelAdriaans/feature/merge-2018
RoelAdriaans Dec 8, 2023
89d17b9
Day 7, part b. Replace all the jokers!
RoelAdriaans Dec 9, 2023
7bd1dbd
Add test data for day 8
RoelAdriaans Dec 9, 2023
bac4a06
Merge pull request #30 from RoelAdriaans/feature/2023-07
RoelAdriaans Dec 9, 2023
57ca3da
Day 8, part 1
RoelAdriaans Dec 9, 2023
a9a2bf2
Day 8, part b.
RoelAdriaans Dec 9, 2023
6567551
Don't remove part 1 when developing..
RoelAdriaans Dec 9, 2023
8e8d4d4
Merge pull request #31 from RoelAdriaans/feature/2023-08
RoelAdriaans Dec 9, 2023
60ec9dc
Cleanup day 8.
RoelAdriaans Dec 9, 2023
39a7f60
Merge pull request #32 from RoelAdriaans/feature/2023-08
RoelAdriaans Dec 9, 2023
988f20f
Day 9, part one.
RoelAdriaans Dec 9, 2023
856dd48
Day 9, part two is the same but reversed.. :)
RoelAdriaans Dec 9, 2023
e315b9d
Merge pull request #33 from RoelAdriaans/feature/2023-09
RoelAdriaans Dec 9, 2023
53281df
[WIP] Day 10
RoelAdriaans Dec 11, 2023
cc394ec
Day 10, part 1
Dec 11, 2023
0d83998
Add day 10 part 2 testdata
Dec 11, 2023
4c0300e
Nice ray tracing that does not yet work
RoelAdriaans Dec 11, 2023
a8a8642
Revert testdata that has been overwritten, clean path.
RoelAdriaans Dec 12, 2023
8076c92
Cleanup grid, remove not used pipes
RoelAdriaans Dec 12, 2023
05cb776
Day 10, part b. With some help
RoelAdriaans Dec 12, 2023
5c3d925
Merge pull request #34 from RoelAdriaans/feature/2023-10
RoelAdriaans Dec 12, 2023
4e386d9
Add day 11 parsing + expanding
RoelAdriaans Dec 12, 2023
a83dea6
Include adventofcode utils into main project
RoelAdriaans Dec 12, 2023
9bb2403
Move code to adventogcode.utils folder
RoelAdriaans Dec 12, 2023
9d485e2
Merge remote-tracking branch 'origin/main' into feature/2023-11
RoelAdriaans Dec 13, 2023
45dc1d1
Expant now works
RoelAdriaans Dec 13, 2023
6cea998
Update deps
RoelAdriaans Dec 13, 2023
486ea4c
Day 11, part 1 with solution
RoelAdriaans Dec 13, 2023
a1a169a
11, part b. Off-By-One galaxy.
RoelAdriaans Dec 13, 2023
387a42b
Merge pull request #36 from RoelAdriaans/feature/2023-11
RoelAdriaans Dec 13, 2023
bb38f63
Merge branch 'main' into feature/merge-aoc-utils
RoelAdriaans Dec 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
labels:
- "dependencies"
- "github_actions"
- "automerge"
schedule:
interval: "daily"

- package-ecosystem: pip
directory: "/"
labels:
- "dependencies"
- "python"
- "automerge"
schedule:
interval: daily
time: "04:00"
31 changes: 31 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: automerge
uses: "pascalgn/automerge-action@v0.15.6"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: automerge
MERGE_REMOVE_LABELS: automerge
MERGE_RETRIES: "60"
MERGE_RETRY_SLEEP: "15000"
40 changes: 40 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Python Run Tox

on: [pull_request]

jobs:
build:
name: Python Tests
runs-on: ubuntu-22.04
strategy:
max-parallel: 4
matrix:
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
# Following step is required for python 3.9: Build depenencies are missing
sudo apt-get update && sudo apt-get install libxml2-dev libxslt-dev python3-dev -y

- name: Run linters in tox
run: tox -e linters

- name: Test with tox
# Run tox using the version of Python in `PATH`
run: tox -e py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

repos:
- repo: https://github.com/ambv/black
rev: 23.7.0
rev: 23.12.0
hooks:
- id: black
language_version: 'python3.10'
language_version: 'python3.12'

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
Expand All @@ -14,12 +14,12 @@ repos:
args: ["--ignore", "E203,W503"]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -31,7 +31,7 @@ repos:
language_version: python3

- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [ "--py311-plus" ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Roel Adriaans
Copyright (c) 2020-2023 Roel Adriaans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Advent of Code 2016
# Advent of Code 2016, 2019, 2020, 2021, 2022 and ...

Advent of Code 2016 with tests and utils etc.
Created as part of Python Discords Revival of Code
Advent of Code for some years with tests and utils etc.
Code is in src/adventofcode<years>, tests are in tests/

## Todo

Expand All @@ -10,11 +10,12 @@ Created as part of Python Discords Revival of Code
## Create a new day

You can use the adventofcode script to create the scaffolding and download the
input file for that day.
input file for that day. If no year is given, the current year is set as a default.
A default year can also be stored in `.env`.

An example:

adventofcode --create 20
adventofcode --year 2023 --create 20

### Env variables

Expand All @@ -23,6 +24,8 @@ Create a file `.env` with the content:
```ini
# Store the session key here
AOC_SESSION = ""
# Select the year. If None, the current year is used.
AOC_YEAR = None
```

The variable `AOC_SESSION` is the cookie from <https://adventofcode.com/>. This is available
Expand All @@ -31,27 +34,26 @@ in your browser after you've logged in.
## Cookiecutter

To create a new day with the CookieCutter version run the command from the
`advent2016` directory.
`adventofcode` directory.

Preferred option is to use the `adventofcode` util, since this util also downloads the solution data.

To use cookiecutter:

```shell script
cookiecutter template -f
```

Answer the questions:
* `advendofcode2016` : Accept default answer. This installs the result in the current directory
* `day` : Answer with day you're working on, with leading zero. Eg: 07, 10, 31.
* `directory_name`, `file_name`, `class_name` : Accept default answer
* `adventofcode` : Accept default answer. This installs the result in the current directory.
* `day` : Answer with the day you're working on, with leading zero. Eg: 07, 10, 31.
* `year` : Answer with the year you're working on, eg 2023.
* `directory_name`, `file_name`, `class_name` : Accept default answer.

This will create the correct files in the `src` and `tests` directories.
The `-f` option is required to make the files in the current subdirectory.
When the project supports modules this is probably no longer needed.

The new solution still have to be added to the `main.py` file.

### Cookiecutter Todo

* Nothing at the moment

## Install

Install the application with:
Expand Down
Loading
Loading