Skip to content

Commit

Permalink
remove use of attr repr_ns
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Aug 3, 2024
1 parent ce9776c commit f9830d6
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion fwdpy11/_types/demographic_model_citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@attr_add_asblack
@attr_class_pickle
@attr_class_to_from_dict
@attr.s(kw_only=True, frozen=True, auto_attribs=True, repr_ns="fwdpy11")
@attr.s(kw_only=True, frozen=True, auto_attribs=True)
@deprecated(reason="prefer ForwardDemesGraph")
class DemographicModelCitation(object):
"""
Expand Down
2 changes: 1 addition & 1 deletion fwdpy11/_types/demographic_model_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@attr_add_asblack
@attr_class_pickle
@attr_class_to_from_dict_no_recurse
@attr.s(kw_only=True, frozen=True, auto_attribs=True, repr_ns="fwdpy11")
@attr.s(kw_only=True, frozen=True, auto_attribs=True)
@deprecated(reason="prefer ForwardDemesGraph")
class DemographicModelDetails(object):
"""
Expand Down
1 change: 0 additions & 1 deletion fwdpy11/_types/forward_demes_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class ForwardTimeInterval:
end_time: int


@attr.s(repr_ns="fwdpy11")
@attr_class_pickle_with_super
@attr_class_to_from_dict
class ForwardDemesGraph(fwdpy11._fwdpy11._ForwardDemesGraph):
Expand Down
4 changes: 2 additions & 2 deletions fwdpy11/_types/model_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

@attr_add_asblack
@attr_class_to_from_dict_no_recurse
@attr.s(kw_only=True, frozen=True, slots=True, repr_ns="fwdpy11")
@attr.s(kw_only=True, frozen=True, slots=True)
class MutationAndRecombinationRates(object):
"""
Stores and validates the mutation and recombination rate parameters
Expand Down Expand Up @@ -114,7 +114,7 @@ def validate_timings(

@attr_add_asblack
@attr_class_to_from_dict_no_recurse
@attr.s(kw_only=True, frozen=True, slots=True, repr_ns="fwdpy11")
@attr.s(kw_only=True, frozen=True, slots=True)
class ModelParams(object):
"""
This class stores and validates the parameters of a simulation.
Expand Down
2 changes: 1 addition & 1 deletion fwdpy11/_types/new_mutation_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .._fwdpy11 import ll_NewMutationData


@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11", kw_only=True)
@attr.s(auto_attribs=True, frozen=True, kw_only=True)
class NewMutationData(ll_NewMutationData):
"""
Data object for :func:`fwdpy11.DiploidPopulation.add_mutation`
Expand Down
12 changes: 6 additions & 6 deletions fwdpy11/genetic_map_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _is_integer_if_discrete(self, attribute, value):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class PoissonInterval(fwdpy11._fwdpy11._ll_PoissonInterval):
"""
Generate poisson number of crossover breakpoints.
Expand Down Expand Up @@ -93,7 +93,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class PoissonPoint(fwdpy11._fwdpy11._ll_PoissonPoint):
"""
Generate a recombination breakpoint at a fixed position if the
Expand Down Expand Up @@ -152,7 +152,7 @@ def __setstate__(self, d):

@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class BinomialInterval(fwdpy11._fwdpy11._ll_BinomialInterval):
"""
Generate exactly one crossover with a given probability
Expand Down Expand Up @@ -206,7 +206,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class BinomialPoint(fwdpy11._fwdpy11._ll_BinomialPoint):
"""
Generate a crossover breakpoint at a fixed position with a
Expand Down Expand Up @@ -260,7 +260,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class FixedCrossovers(fwdpy11._fwdpy11._ll_FixedCrossovers):
"""
Generate a fixed number of crossover breakpoints.
Expand Down Expand Up @@ -318,7 +318,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class BinomialIntervalMap(fwdpy11._fwdpy11._ll_BinomialIntervalMap):
"""
Generate exactly one crossover with a given probability
Expand Down
18 changes: 9 additions & 9 deletions fwdpy11/genetic_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TimingError(Exception):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class Optimum(_ll_Optimum):
"""
Parameters for a trait optimum.
Expand Down Expand Up @@ -99,7 +99,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11", eq=False)
@attr.s(auto_attribs=True, frozen=True, eq=False)
class PleiotropicOptima(_ll_PleiotropicOptima):
"""
Parameters for multiple trait optima
Expand Down Expand Up @@ -145,7 +145,7 @@ def __eq__(self, other):
return optima_equal and VS_equal and when_equal


@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class GaussianStabilizingSelection(_ll_GaussianStabilizingSelection):
"""
Define a mapping of phenotype-to-fitness according to a
Expand Down Expand Up @@ -228,7 +228,7 @@ def validate_timings(self, deme: int, demography: ForwardDemesGraph) -> None:
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class NoNoise(_ll_NoNoise):
"""
No random effects on genetic values
Expand All @@ -246,7 +246,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class GaussianNoise(_ll_GaussianNoise):
"""
Gaussian noise added to genetic values.
Expand Down Expand Up @@ -275,7 +275,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class Additive(_ll_Additive):
"""
Additive effects on genetic values.
Expand Down Expand Up @@ -327,7 +327,7 @@ def validate_timings(self, deme: int, demography: ForwardDemesGraph) -> None:
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class Multiplicative(_ll_Multiplicative):
"""
Multiplicative effects on genetic values.
Expand Down Expand Up @@ -379,7 +379,7 @@ def validate_timings(self, deme: int, demography: ForwardDemesGraph) -> None:
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class GBR(_ll_GBR):
"""
The "gene-based recessive" trait model described in Thornton et al.
Expand Down Expand Up @@ -420,7 +420,7 @@ def validate_timings(self, deme: int, demography: ForwardDemesGraph) -> None:
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class AdditivePleiotropy(_ll_StrictAdditiveMultivariateEffects):
"""
Multivariate trait values under strictly additive effects.
Expand Down
8 changes: 4 additions & 4 deletions fwdpy11/mutation_dominance.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class FixedDominance(fwdpy11._fwdpy11.MutationDominance):
"""
Fixed heterozygous effects.
Expand All @@ -51,7 +51,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class ExponentialDominance(fwdpy11._fwdpy11.MutationDominance):
"""
Exponential distribution of heterozygous effects.
Expand All @@ -73,7 +73,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class UniformDominance(fwdpy11._fwdpy11.MutationDominance):
"""
Uniform distribution of heterozygous effects.
Expand All @@ -98,7 +98,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True)
class LargeEffectExponentiallyRecessive(fwdpy11._fwdpy11.MutationDominance):
"""
Large effect mutations are more recessive according to
Expand Down
20 changes: 10 additions & 10 deletions fwdpy11/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class Region(fwdpy11._fwdpy11._ll_Region):
"""
A genomic region, defined by half-open interval [beg, end)
Expand Down Expand Up @@ -88,7 +88,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class ConstantS(fwdpy11._fwdpy11._ll_ConstantS):
"""
Mutations with fixed effect sizes
Expand Down Expand Up @@ -149,7 +149,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class ExpS(fwdpy11._fwdpy11._ll_ExpS):
"""
Exponential distribution of effect sizes
Expand Down Expand Up @@ -212,7 +212,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class GammaS(fwdpy11._fwdpy11._ll_GammaS):
"""
Gamma distribution of effect sizes
Expand Down Expand Up @@ -277,7 +277,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class GaussianS(fwdpy11._fwdpy11._ll_GaussianS):
"""
Gaussian distribution of effect sizes
Expand Down Expand Up @@ -338,7 +338,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class LogNormalS(fwdpy11._fwdpy11._ll_LogNormalS):
"""
Log-normal distribution of effect sizes.
Expand Down Expand Up @@ -449,7 +449,7 @@ def mv(
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(auto_attribs=True, frozen=True, repr=False)
class UniformS(fwdpy11._fwdpy11._ll_UniformS):
"""
Uniform distrubution of effect sizes
Expand Down Expand Up @@ -514,7 +514,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(eq=False, auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(eq=False, auto_attribs=True, frozen=True, repr=False)
class MultivariateGaussianEffects(fwdpy11._fwdpy11._ll_MultivariateGaussianEffects):
"""
Pleiotropic effects via a multivariate Gaussian distribution.
Expand Down Expand Up @@ -606,7 +606,7 @@ def __eq__(self, other):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(eq=False, auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(eq=False, auto_attribs=True, frozen=True, repr=False)
class mvDES(fwdpy11._fwdpy11._ll_mvDES):
"""
General multivariate distribution of effect sizes.
Expand Down Expand Up @@ -642,7 +642,7 @@ def __attrs_post_init__(self):
@attr_add_asblack
@attr_class_pickle_with_super
@attr_class_to_from_dict_no_recurse
@attr.s(eq=False, auto_attribs=True, frozen=True, repr=False, repr_ns="fwdpy11")
@attr.s(eq=False, auto_attribs=True, frozen=True, repr=False)
class DiscreteDESD(fwdpy11._fwdpy11._ll_DiscreteDESD):
"""
Discretized distribution of effect sizes and dominance.
Expand Down

0 comments on commit f9830d6

Please sign in to comment.