In a fdl.Config for a dataclass, when accessing a field that uses a default_factory, populate a child Config (if not already present) wrapping the default_factory call, rather than raising a "Can't get default value for dataclass field ... since it uses a default_factory" error. #1810
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python testing | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and package | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[testing] | |
- name: Test with pytest | |
run: | | |
pytest --ignore=fiddle/_src/extensions/seqio_test.py fiddle |