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

🐍 Replace attrs with dataclasses #303

Open
evanroyrees opened this issue Jan 4, 2023 · 0 comments
Open

🐍 Replace attrs with dataclasses #303

evanroyrees opened this issue Jan 4, 2023 · 0 comments
Labels
good first issue Good for newcomers python Python related issues/code

Comments

@evanroyrees
Copy link
Collaborator

evanroyrees commented Jan 4, 2023

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)

@evanroyrees evanroyrees added good first issue Good for newcomers python Python related issues/code labels Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers python Python related issues/code
Projects
None yet
Development

No branches or pull requests

1 participant