These are chat archives for astropy/astropy

10th
Jan 2017
Erik Tollerud
@eteq
Jan 10 2017 16:07
@adrn - that’s a good question… you probably saw on http://www.astropy.org/team.html that it isn’t listed. I think the idea is that it’s sort of a “catch-all” along with utils, but that could be changed
Regardless, I suppose that means nominally it’s me ;)
But yes, your inference is right, @adrn. For an example of how this works, see astroquery
Erik Tollerud
@eteq
Jan 10 2017 16:16
If I remember right, the way it works is that you supply it as package data in the root of the source directory (i.e. <repo root>/yourpackage/yourpackage.cfg), and then the first time a config item is accessed, if there isn’t an ~/.astropy/config/yourpackage.cfg, it copies over the default file
In other news, I feel http://xkcd.com/1782/ is appropriate for the @matrixbot folks here ;)
matrixbot
@matrixbot
Jan 10 2017 16:18
Cadair Matrixbot would love to be part of a galactic hive mind.
Cadair infact it's probably the thing that will let it happen :p
Erik Tollerud
@eteq
Jan 10 2017 16:18
Hah, when you put it that way, even the name makes sense...
matrixbot
@matrixbot
Jan 10 2017 16:19
Cadair the amount of people that pointed me at that was unreal
Cadair I have a reputation apparently
Cadair deservedly I should add
Cadair it's a shame that Gitter does not allow masquerading for it's bots, it looks much nicer on the IRC / matrix side than in Gitter.
Cadair there is no bot
Erik Tollerud
@eteq
Jan 10 2017 16:22
All part of the galactic hive mind’s effort to keep the little people like you down ;)
matrixbot
@matrixbot
Jan 10 2017 16:25
Cadair I don't care ;)
Cadair I get the pretty side
Erik Tollerud
@eteq
Jan 10 2017 16:26
hah, true enough
If you consider markup-less IRC text pretty ;)
:trollface:
matrixbot
@matrixbot
Jan 10 2017 16:50
Cadair I am in Gitter
Cadair lol
Cadair no I am in Matrix, my client looks like this:
Cadair I am on matrix my client looks like this:
Adrian Price-Whelan
@adrn
Jan 10 2017 17:08
@eteq but does that have to be the case? couldn't we make the path configurable in some way?
I just feel like from a users perspective if they install my hypothetical package -- which is not an affiliated package -- and want to configure something, they would be confused as to why the configuration file would be in an~/.astropy/ directory
Erik Tollerud
@eteq
Jan 10 2017 18:30
hmm, I see your point @adrn
But the argument is that it’ll still be easier for them to find it in .astropythan ~/.confusing/somewhere/else/weirdname.cfg
but that might be an argument for the default to be ~/.astropy but have there be an option to re-map the path
Adrian Price-Whelan
@adrn
Jan 10 2017 18:32
I'm not sure about that - wouldn't unixers expect ~/.projectname.cfg or ~/.config/projectname.cfg?
Erik Tollerud
@eteq
Jan 10 2017 18:33
I guess it depends on the person ;) but I do see your point
Adrian Price-Whelan
@adrn
Jan 10 2017 18:33
but yea having ~/.astropy as default would be fine with me
fair :)
Erik Tollerud
@eteq
Jan 10 2017 18:33
although on linux I’m pretty sure it defaults to ~/.config/astropy/projectname.cfg?
Adrian Price-Whelan
@adrn
Jan 10 2017 18:34
ah, right
Erik Tollerud
@eteq
Jan 10 2017 18:35
(without needing to modify the config stuff at all)
you know, it might work to try to force it to something like ../yourpackage.cfg
Oh, right, but there’s not really a way to force the file name
it’s always yourpackage.cfg if your package is named yourpackage, and that is a definite design choice
Adrian Price-Whelan
@adrn
Jan 10 2017 18:37
yea, that's fine with me - but the path is hard-coded in get_config_dir I think
Erik Tollerud
@eteq
Jan 10 2017 18:37
actually, the config file itself is hard-coded in get_config in astropy.cobfig.configuration
Adrian Price-Whelan
@adrn
Jan 10 2017 18:37
ah
Erik Tollerud
@eteq
Jan 10 2017 18:38
there’s a super hacky option of changing astropy.config.configuration._override_config_file (used in the tests), but I can’t say I recommend that
So I guess the question is whether you can live with the current situation at least until Astropy 2.0?
(and if yes, I would be happy to entertain a PR making this configurable ;) )
Adrian Price-Whelan
@adrn
Jan 10 2017 18:41
heh well I don't have an option about waiting because I was too slow to get this in 1.3 :) but I will certainly try to put together a PR
and ... speaking of PRs :smiling_imp:, I have an insta-merge PR for you to look at - just let me know if you think it needs a changelog entry #5645
Erik Tollerud
@eteq
Jan 10 2017 20:51
sneaky way to abuse my attention @adrn :wink: merged (it did need a changelog entry, but I made use of the fancy github allow-edit thing to add it myself before merging)