eqcorrscan / EQcorrscan

Earthquake detection and analysis in Python.
https://eqcorrscan.readthedocs.io/en/latest/
Other
166 stars 86 forks source link

Construct and read methods should be classmethods #342

Open calum-chamberlain opened 5 years ago

calum-chamberlain commented 5 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Creating Tribes and Templates should not require an existing class. The current implementation is clumsy: to create a Tribe you would run:

Tribe().construct(...)

Describe the solution you'd like A clear and concise description of what you want to happen.

Change .read() and .construct() to @classmethods that allow the following syntax:

Tribe.construct(...)

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Keeping it the way it is is pretty ugly...

Additional context Add any other context about the feature request here.