Skip to content

🐍 Replace attrs with dataclasses #303

@evanroyrees

Description

@evanroyrees

Prior to dataclasses availability within the python standard library, attrs was used. This may be replaced now to reduce the requirements list.

@attr.s(auto_attribs=True)
class TrainingData:
features: pd.DataFrame = attr.ib(validator=validate_training_data)
target: pd.DataFrame = attr.ib(validator=validate_training_data)
target_names: List[str]
@attr.s(auto_attribs=True)
class Labels:
target: pd.DataFrame
target_names: List[str]

Autometa/make_test_data.py

Lines 99 to 100 in baf61c0

@attr.s(auto_attribs=True)
class TestData:

- attrs # test-data requirement

This is incorrectly labeled as a test-data requirement (it is, but attr is also used with the autometa-unclustered-recruitment module)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerspythonPython related issues/code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions