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

0.6.0 dev #52

Merged
merged 158 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
26c28d5
try running CI for python >=3.8
mivanit Jun 17, 2024
cc768c7
update pyproject.toml for python >=3.8
mivanit Jun 17, 2024
305a081
fix some deps
mivanit Jun 17, 2024
18c5786
add py 3.12 to tests
mivanit Jun 18, 2024
efe6b66
some typing fixes
mivanit Jun 18, 2024
1a762a8
wip typing fixes
mivanit Jun 18, 2024
df4a6c9
fix a bunch of type hints
mivanit Jun 18, 2024
f4724eb
sanitize_name function, with wrappers for fnames and identifiers
mivanit Jun 18, 2024
fd2d413
tests for new sanitize_name and derived
mivanit Jun 18, 2024
c68499d
some fixes
mivanit Jun 18, 2024
d50a38d
wip
mivanit Jun 18, 2024
695aed1
fix formatting
mivanit Jun 18, 2024
66c99b7
fix mro
mivanit Jun 18, 2024
5584855
fix monotuple
mivanit Jun 18, 2024
4be7274
added base64 array mode (similar to existing hex mode)
mivanit Jun 18, 2024
4100cf4
remove py3.12 for now
mivanit Jun 18, 2024
7c301c5
run format
mivanit Jun 18, 2024
07cac42
hacky fix for failing to get type hints in python 3.8
mivanit Jun 18, 2024
ce12d94
deleted test notebook
mivanit Jun 18, 2024
80f8aaf
fix more warnings
mivanit Jun 18, 2024
400bc2e
format
mivanit Jun 18, 2024
f366a11
fixing some warnings
mivanit Jun 18, 2024
fa2839e
NO WARNINGS
mivanit Jun 18, 2024
3be50f3
format
mivanit Jun 18, 2024
feb9b0e
fix for not warning on python >=3.10
mivanit Jun 18, 2024
2d8cde8
fix kw_only args for py 3.9
mivanit Jun 18, 2024
6a81a6d
bump pytest dep
mivanit Jun 18, 2024
542a439
wip
mivanit Jun 18, 2024
a93e188
wip
mivanit Jun 18, 2024
681e691
format
mivanit Jun 18, 2024
5706978
wip
mivanit Jun 18, 2024
f7afc5e
no linting for py <3.10
mivanit Jun 18, 2024
a14a781
asserting record len would need to be per-version
mivanit Jun 18, 2024
c7701df
format, syntax error
mivanit Jun 18, 2024
70665a9
ugh
mivanit Jun 18, 2024
aa11e5b
wip
mivanit Jun 18, 2024
57d5dd6
fix linting
mivanit Jun 18, 2024
254c0f1
fix CI again
mivanit Jun 18, 2024
e4095c5
wip
mivanit Jun 18, 2024
b9a30e2
fix sysinfo type hint
mivanit Jun 18, 2024
bc67278
fix statcounter type hint
mivanit Jun 18, 2024
0591e9d
more type fixes
mivanit Jun 18, 2024
4634db3
newer type hints should work with future annotations
mivanit Jun 18, 2024
53cc8f4
Tuple[] -> tuple[]
mivanit Jun 18, 2024
42c4eee
fix types, for real this time!
mivanit Jun 18, 2024
c2a2137
making typing work for python <3.10
mivanit Jun 18, 2024
39dc23d
wipgsgs
mivanit Jun 18, 2024
7874d63
Wip
mivanit Jun 18, 2024
dc209fd
wip
mivanit Jun 18, 2024
5e47f06
fixes!
mivanit Jun 18, 2024
85bdb1e
more fixes
mivanit Jun 18, 2024
aa992fa
test_validate_type tests pass!
mivanit Jun 18, 2024
c27b86d
format
mivanit Jun 18, 2024
65c39a3
fixed incorrect validate_type call, removed debug print from that fun…
mivanit Jun 18, 2024
5f8947d
strict on warnings mode, zanj as optional dep, fix some warnings
mivanit Jun 18, 2024
03e0fcd
whoops, this was meant to be in the last commit
mivanit Jun 18, 2024
3722dcb
run format
mivanit Jun 18, 2024
a17a270
ignore unraisable pytest exception, fix _popen, minor make fix
mivanit Jun 18, 2024
347f069
fixes to validate_type
mivanit Jun 18, 2024
e41dfb3
better dependency stuff, going to use uv for tests in CI
mivanit Jun 18, 2024
d31edc9
minor fix to sysinfo
mivanit Jun 18, 2024
2f42845
makefile and CI changes
mivanit Jun 18, 2024
b9d5b7c
check-dep-dev will now also check poetry.lock
mivanit Jun 18, 2024
d152ad0
fix typo in CI
mivanit Jun 18, 2024
62778d9
fix another CI typo
mivanit Jun 18, 2024
f6366b0
actions wip
mivanit Jun 18, 2024
9875bde
wip
mivanit Jun 19, 2024
2ad3d61
wip
mivanit Jun 19, 2024
0c98e82
wip
mivanit Jun 19, 2024
cd34411
updated poetry locally
mivanit Jun 19, 2024
611735f
wip
mivanit Jun 19, 2024
be4a8fa
wip
mivanit Jun 19, 2024
6c55721
testing
mivanit Jun 19, 2024
5aada44
more testing
mivanit Jun 19, 2024
2c7c077
testinggg
mivanit Jun 19, 2024
8a47ebf
more testing, filelock still broken
mivanit Jun 19, 2024
87b1556
no zanj dep
mivanit Jun 19, 2024
be25a18
wip
mivanit Jun 19, 2024
77ca48f
wip
mivanit Jun 19, 2024
6b294aa
wip
mivanit Jun 19, 2024
61b6d82
test
mivanit Jun 19, 2024
3c9c15d
test
mivanit Jun 19, 2024
d73f7e7
test
mivanit Jun 19, 2024
0b14bb3
pls work
mivanit Jun 19, 2024
fe26415
wip
mivanit Jun 19, 2024
68fcfd8
minor
mivanit Jun 19, 2024
be9af6b
wip
mivanit Jun 19, 2024
4df7722
wip
mivanit Jun 19, 2024
55143d8
gitignore
mivanit Jun 19, 2024
0a616f9
fix torch version in dep check
mivanit Jun 19, 2024
8f7816b
version bump to 0.5.13
mivanit Jun 19, 2024
41b838b
excludes in format in pyproject.toml
mivanit Jun 19, 2024
b499c74
fix for python 3.10
mivanit Jun 19, 2024
c65b04c
add future import annotations
mivanit Jun 19, 2024
6905501
about to do something cursed
mivanit Jun 19, 2024
c281ac9
switched all type hints to typing.Something
mivanit Jun 19, 2024
b15f85c
moved all special union with pipe to other file
mivanit Jun 19, 2024
3003e7c
folder rename
mivanit Jun 19, 2024
d020a5f
moved some invalid tests over
mivanit Jun 19, 2024
af8717e
makefile now detects version, goes into compatibility mode
mivanit Jun 19, 2024
1c3b824
make format
mivanit Jun 19, 2024
32062f0
update makefile
mivanit Jun 19, 2024
f60fe40
cursed
mivanit Jun 19, 2024
7a6a0e7
clean up _loading_test_wrapper, remove it entirely later
mivanit Jun 19, 2024
41e43c7
fix invalid type check
mivanit Jun 19, 2024
243e54f
cursedgs!
mivanit Jun 19, 2024
b49bdec
so so so cursed
mivanit Jun 19, 2024
0f1deed
wooooo
mivanit Jun 19, 2024
af72366
!
mivanit Jun 19, 2024
05867bc
fix typing!
mivanit Jun 19, 2024
ac96afb
fix typing in some tests
mivanit Jun 19, 2024
cfb0474
fix more typing, make whole workflow parallel again
mivanit Jun 19, 2024
200cb31
wip switching to ruff for formatting
mivanit Jun 19, 2024
32bbc79
update makefile, switch to ruff
mivanit Jun 19, 2024
ae1cda8
run safe format
mivanit Jun 19, 2024
6e9e425
ruff fix, not just format
mivanit Jun 19, 2024
2428dd0
run new make format
mivanit Jun 19, 2024
8e6fa71
manual fixes
mivanit Jun 19, 2024
8f64671
more manual fixes
mivanit Jun 19, 2024
5e51679
fixed using --unsafe-fixes
mivanit Jun 19, 2024
af28d61
fix setup of formatters/linters in CI
mivanit Jun 19, 2024
c4af103
typing fix
mivanit Jun 19, 2024
cf44178
better handling of only format deps
mivanit Jun 19, 2024
9834288
typo
mivanit Jun 19, 2024
9647bb6
fix ref to dev-requirements.txt
mivanit Jun 19, 2024
386a6d1
make dep-dev
mivanit Jun 19, 2024
f34f28d
make dep-dev
mivanit Jun 19, 2024
7bdf445
fixing some todos, get rid of _loading_test_wrapper
mivanit Jun 19, 2024
9979ba9
fix some todos in serializable dataclasses
mivanit Jun 19, 2024
64679d3
wip junk
mivanit Jun 20, 2024
1c80863
commit log from python, much cleaner
mivanit Jun 20, 2024
06a348b
trying py 3.12
mivanit Jun 20, 2024
a33337c
numpy deps for python 3.8 to 3.12 are complicated
mivanit Jun 20, 2024
19128f1
updated setup-python to v5
mivanit Jun 20, 2024
96226dd
comments & classifiers in pyproject.toml
mivanit Jun 20, 2024
6be2e41
wip
mivanit Jun 20, 2024
228e181
reorg
mivanit Jun 20, 2024
1596a82
error mode module
mivanit Jun 20, 2024
2ee1033
ErrorMode.from_any, more tests
mivanit Jun 20, 2024
450900b
switched from_any to classmethod
mivanit Jun 20, 2024
b0b98d7
wip
mivanit Jun 20, 2024
82f67b9
wipgs! many docstrings improved too
mivanit Jun 21, 2024
9456ee4
fixed non-init and non-serialize field, hacky
mivanit Jun 21, 2024
1721773
run format
mivanit Jun 21, 2024
67f4cbb
fix exception for unsupported
mivanit Jun 21, 2024
a35b3f6
special warning for field is not init or serialize
mivanit Jun 21, 2024
89030cf
class type validation, tests for that and aliases
mivanit Jun 21, 2024
709fc3c
typing fixes
mivanit Jun 21, 2024
0ec0a6d
better generated modern type hint tests
mivanit Jun 21, 2024
abc9166
update deps
mivanit Jun 21, 2024
2c1db05
wip
mivanit Jun 21, 2024
21492c6
wow im dumb
mivanit Jun 21, 2024
c2ff8ef
yes i was literally checking for inheritance on unrelated classes
mivanit Jun 21, 2024
2233c05
format
mivanit Jun 21, 2024
73df7fa
typing fix
mivanit Jun 21, 2024
3735580
add deserialize_fn as clearer alternative to loading_fn
mivanit Jun 21, 2024
4dcda67
update coverage
mivanit Jun 21, 2024
3dac41f
update deps
mivanit Jun 21, 2024
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
File renamed without changes.
60 changes: 60 additions & 0 deletions .github/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
asttokens==2.4.1 ; python_version >= "3.10" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.8" and python_version < "4"
colorama==0.4.6 ; python_version >= "3.8" and sys_platform == "win32" and python_version < "4.0" or python_version >= "3.8" and python_version < "4" and platform_system == "Windows"
contourpy==1.1.1 ; python_version >= "3.8" and python_version < "4.0"
coverage-badge==1.1.1 ; python_version >= "3.8" and python_version < "4.0"
coverage==7.5.3 ; python_version >= "3.8" and python_version < "4.0"
coverage[toml]==7.5.3 ; python_version >= "3.8" and python_version < "4.0"
cycler==0.12.1 ; python_version >= "3.8" and python_version < "4.0"
decorator==5.1.1 ; python_version >= "3.10" and python_version < "4.0"
exceptiongroup==1.2.1 ; python_version >= "3.8" and python_version < "3.11"
executing==2.0.1 ; python_version >= "3.10" and python_version < "4.0"
fonttools==4.53.0 ; python_version >= "3.8" and python_version < "4.0"
importlib-metadata==7.2.0 ; python_version >= "3.8" and python_version < "3.10"
importlib-resources==6.4.0 ; python_version >= "3.8" and python_version < "3.10"
iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
ipython==8.25.0 ; python_version >= "3.10" and python_version < "4.0"
jaxtyping==0.2.19 ; python_version >= "3.8" and python_version < "4.0"
jedi==0.19.1 ; python_version >= "3.10" and python_version < "4.0"
kiwisolver==1.4.5 ; python_version >= "3.8" and python_version < "4.0"
libcst==1.1.0 ; python_version >= "3.8" and python_version < "4"
markdown-it-py==3.0.0 ; python_version >= "3.8" and python_version < "4"
matplotlib-inline==0.1.7 ; python_version >= "3.10" and python_version < "4.0"
matplotlib==3.7.5 ; python_version >= "3.8" and python_version < "4.0"
mdurl==0.1.2 ; python_version >= "3.8" and python_version < "4"
mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "4.0"
mypy==1.10.0 ; python_version >= "3.8" and python_version < "4.0"
numpy==1.24.4 ; python_version >= "3.8" and python_version < "3.9"
numpy==1.26.4 ; python_version >= "3.9" and python_version < "4.0"
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
parso==0.8.4 ; python_version >= "3.10" and python_version < "4.0"
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "4"
pexpect==4.9.0 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform != "win32" and sys_platform != "emscripten")
pillow==10.3.0 ; python_version >= "3.8" and python_version < "4.0"
plotly==5.22.0 ; python_version >= "3.8" and python_version < "4.0"
pluggy==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
prompt-toolkit==3.0.47 ; python_version >= "3.10" and python_version < "4.0"
ptyprocess==0.7.0 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform != "win32" and sys_platform != "emscripten")
pure-eval==0.2.2 ; python_version >= "3.10" and python_version < "4.0"
pycln==2.4.0 ; python_version >= "3.8" and python_version < "4"
pygments==2.18.0 ; python_version >= "3.8" and python_version < "4.0"
pyparsing==3.1.2 ; python_version >= "3.8" and python_version < "4.0"
pytest-cov==4.1.0 ; python_version >= "3.8" and python_version < "4.0"
pytest==8.2.2 ; python_version >= "3.8" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "4.0"
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "4"
rich==13.7.1 ; python_version >= "3.8" and python_version < "4"
ruff==0.4.10 ; python_version >= "3.8" and python_version < "4.0"
shellingham==1.5.4 ; python_version >= "3.8" and python_version < "4"
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
stack-data==0.6.3 ; python_version >= "3.10" and python_version < "4.0"
tenacity==8.4.1 ; python_version >= "3.8" and python_version < "4.0"
tomli==2.0.1 ; python_version >= "3.8" and python_full_version <= "3.11.0a6"
tomlkit==0.12.5 ; python_version >= "3.8" and python_version < "4"
traitlets==5.14.3 ; python_version >= "3.10" and python_version < "4.0"
typeguard==4.3.0 ; python_version >= "3.8" and python_version < "4.0"
typer==0.12.3 ; python_version >= "3.8" and python_version < "4"
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
typing-inspect==0.9.0 ; python_version >= "3.8" and python_version < "4"
wcwidth==0.2.13 ; python_version >= "3.10" and python_version < "4.0"
zipp==3.19.2 ; python_version >= "3.8" and python_version < "3.10"
17 changes: 17 additions & 0 deletions .github/lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
click==8.1.7 ; python_version >= "3.8" and python_version < "4"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4" and platform_system == "Windows"
libcst==1.1.0 ; python_version >= "3.8" and python_version < "4"
markdown-it-py==3.0.0 ; python_version >= "3.8" and python_version < "4"
mdurl==0.1.2 ; python_version >= "3.8" and python_version < "4"
mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "4"
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "4"
pycln==2.4.0 ; python_version >= "3.8" and python_version < "4"
pygments==2.18.0 ; python_version >= "3.8" and python_version < "4"
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "4"
rich==13.7.1 ; python_version >= "3.8" and python_version < "4"
ruff==0.4.10 ; python_version >= "3.8" and python_version < "4.0"
shellingham==1.5.4 ; python_version >= "3.8" and python_version < "4"
tomlkit==0.12.5 ; python_version >= "3.8" and python_version < "4"
typer==0.12.3 ; python_version >= "3.8" and python_version < "4"
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4"
typing-inspect==0.9.0 ; python_version >= "3.8" and python_version < "4"
99 changes: 80 additions & 19 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,110 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install linters
run: pip install pycln isort black
run: make setup-format RUN_GLOBAL=1

- name: Run Format Checks
run: make check-format
run: make check-format RUN_GLOBAL=1

check-deps:
name: Check dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -

- name: Poetry Plugins
run: |
poetry self add poetry-plugin-export
poetry self show plugins

- name: Check poetry.lock and .github/dev-requirements.txt
run: make check-dep-dev

- name: Install uv
run: pip install uv

- name: Install dependencies
run: uv pip install -r .github/dev-requirements.txt --system --no-deps # we already should have all dependencies exported into .github/dev-requirements.txt

- name: Install torch (special)
run: uv pip install torch==2.3.1+cpu --system --extra-index-url https://download.pytorch.org/whl/cpu

- name: Install muutils (local)
run: uv pip install . --system

- name: Install zanj (requires muutils)
run: uv pip install zanj --system

test:
name: Test and Lint
runs-on: ubuntu-latest
# needs: [lint, check-deps]
strategy:
matrix:
versions:
- python: "3.10"
torch: "1.13.1"
- python: "3.10"
torch: "2.0.1"
- python: "3.11"
torch: "2.0.1"
- python: '3.8'
torch: '1.13.1'
- python: '3.9'
torch: '1.13.1'
- python: '3.10'
torch: '1.13.1'
- python: '3.10'
torch: '2.3.1'
- python: '3.11'
torch: '2.3.1'
- python: '3.12'
torch: '2.3.1'
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Install uv
run: pip install uv

- name: Install dependencies
# install torch first to avoid pytorch index messing things up
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry lock --check
export CUDA_VISIBLE_DEVICES=0
poetry add torch@${{ matrix.versions.torch }}+cpu --source torch_cpu
poetry install --all-extras
uv pip install -r .github/dev-requirements.txt --system --no-deps
uv pip install torch==${{ matrix.versions.torch}}+cpu --system --extra-index-url https://download.pytorch.org/whl/cpu

- name: Install muutils
run: uv pip install . --system

- name: Install zanj (>=3.10 only)
# TODO: not yet available for python 3.8 and 3.9
if: ${{ matrix.versions.python != '3.8' && matrix.versions.python != '3.9' }}
run: uv pip install zanj --system

- name: tests
run: make test
run: make test RUN_GLOBAL=1

- name: tests in strict mode
# TODO: until zanj ported to 3.8 and 3.9
if: ${{ matrix.versions.python != '3.8' && matrix.versions.python != '3.9' }}
run: make test WARN_STRICT=1 RUN_GLOBAL=1

- name: lint
run: make lint
- name: check typing
run: make typing RUN_GLOBAL=1
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# local stuff (pypi token, commit log)
.github/local/**

# this one is cursed
tests/unit/validate_type/test_validate_type_GENERATED.py
# test notebook
_test.ipynb
# junk data
JUNK_DATA_PATH/
junk_data
.pypi-token
.commit_log

.vscode/
# caches
__pycache__/
**/__pycache__/
**/.mypy_cache/
**/.pytest_cache/

# coverage
.coverage
htmlcov/

# build
build/
dist/
muutils.egg-info/
Expand Down
4 changes: 2 additions & 2 deletions docs/coverage/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading