conda-incubator / conda-press

Press conda packages into wheels
https://regro.github.io/conda-press-docs/
BSD 3-Clause "New" or "Revised" License
116 stars 9 forks source link

Refactoring to use a config parameter pattern #35

Closed marcelotrevisani closed 4 years ago

marcelotrevisani commented 5 years ago

It would be good to refactor the code to use a config parameter pattern (or maybe data class) instead of passing a lot of arguments as keywords to functions. it is interesting because it will simplify the code and we can do some processing before exposing the parameter if we want to.

marcelotrevisani commented 5 years ago

What do you think @scopatz ?

scopatz commented 4 years ago

Yeah, I think this is a good idea. We are getting a lot of config parameters. It would be better to pass around one object. (Maybe a dataclass even!)

marcelotrevisani commented 4 years ago

Yeah, I think this is a good idea. We are getting a lot of config parameters. It would be better to pass around one object. (Maybe a dataclass even!)

Yes, that is a good idea indeed. However, dataclass is available just for Python 3.7+ :(

scopatz commented 4 years ago

True, do we need this to work on Python 3.6, though?

marcelotrevisani commented 4 years ago

True, do we need this to work on Python 3.6, though?

I think we do not need it for Python 3.6. Should we go ahead and do this refactoring using dataclass?

scopatz commented 4 years ago

Yeah, I think so :wink:

marcelotrevisani commented 4 years ago

By the way, I just saw that there is a project called dataclasses which backport dataclass to Python 3.6

Today I started to refactor the code, I might finish it tomorrow or late today. After that, I will develop the #36

scopatz commented 4 years ago

Awesome! Thanks so much @marcelotrevisani!