DOC: document runtime environment variables in a dedicated page#17932
DOC: document runtime environment variables in a dedicated page#17932pllim merged 1 commit intoastropy:mainfrom
Conversation
4a36621 to
56abb43
Compare
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
docs/development/testguide.rst
Outdated
| Furthermore, it is possible to change the location of the cache directory | ||
| for the duration of the test run by setting the ``XDG_CACHE_HOME`` | ||
| environment variable. | ||
| for the duration of the test run via environment variables, see | ||
| :ref:`environment_variables`. |
There was a problem hiding this comment.
I'm not 100% I'm following. This section is about the test runner. Are you hinting at how conftest.py obliterates user-set XDG_CACHE_HOME values ?
There was a problem hiding this comment.
This section is about the test runner.
Irrelevant.
Are you hinting at how
conftest.pyobliterates user-setXDG_CACHE_HOMEvalues ?
Yes.
There was a problem hiding this comment.
Let me rephrase: this section is providing insight on how to use the test runner downstream. In this context, our conftest.py files are not used.
There was a problem hiding this comment.
The paragraph is indeed true. I really should have known better because I am the author of the commit that (unintentionally) made our test runner behave like that: 433a534
| .. note:: | ||
| ``XDG_CONFIG_HOME`` and ``XDG_CACHE_HOME`` come from a Linux-centric | ||
| specification | ||
| (see `here <https://wiki.archlinux.org/index.php/XDG_Base_Directory_support>`_ |
There was a problem hiding this comment.
Why is the link pointing to ArchWiki instead of the actual specification?
There was a problem hiding this comment.
Your guess is as good as mine.
my two cents: I think it's nice to point to a summary instead, especially when the actual specification is one obvious click away.
There was a problem hiding this comment.
It is always better to refer to the original source. Besides, it's a short specification.
There was a problem hiding this comment.
I feel it's out of scope to change it here. Can we please postpone this ?
docs/utils/data.rst
Outdated
| The ``astropy`` cache is stored in a centralized place (on Linux machines by | ||
| default it is ``$HOME/.astropy/cache``; see :ref:`astropy_config` for | ||
| more details). You can check its location on your machine:: | ||
| The ``astropy`` cache is stored in a centralized place (see :ref:`astropy_config` |
There was a problem hiding this comment.
Why should the cache documentation point to config documentation?
There was a problem hiding this comment.
Because cache location is configurable ? in any case, this is not from this PR.
There was a problem hiding this comment.
The cache location is not configurable using astropy configuration items.
There was a problem hiding this comment.
Again, not from this PR. I'm already creating potentially massive merge conflicts for myself to handle once we finally circle back to #17640, I would really like for this to stay on topic.
There was a problem hiding this comment.
On current main this documentation has to refer to the config documentation because that's where the XDG_CACHE_HOME environment variable is described. If this pull request creates a separate documentation page for the environment variables then there's no reason for the paragraph here to refer to config documentation anymore.
| .. note:: | ||
| ``XDG_CONFIG_HOME`` and ``XDG_CACHE_HOME`` come from a Linux-centric | ||
| specification |
There was a problem hiding this comment.
We should emphasize that astropy has only adopted the names of these two environment variables from the specification and nothing else.
There was a problem hiding this comment.
the spec is specifically about UNIX-based systems though. I don't think it's a good idea to leave Windows users in the dark, especially because we do support them, so I don't agree with this take.
There was a problem hiding this comment.
The updated descriptions in the glossary are clear enough so that this note doesn't have to be edited.
56abb43 to
54c95d7
Compare
There was a problem hiding this comment.
Nice! I like also that now we will have a good place to discuss other environment variables as well (like for building the system libraries). Would agree to keep this PR to just mostly moving the text around.
p.s. I do think it was helpful to see these changes on their own.
docs/changes/17932.other.rst
Outdated
There was a problem hiding this comment.
We don't announce documentation changes in the change log.
|
Thanks for this PR and the other one. Also the one Eero opened about testing doc. They are on my plate but I probably cannot get to them until next week. Thanks for your patience! |
f10b34c to
f44b36c
Compare
pllim
left a comment
There was a problem hiding this comment.
Thanks! It is good to finally have a dedicated section for this.
As for the links and contents, they were written a long time ago. The original motivation is now lost of buried in some really old commit/PR convo. I agree that updating them is out of scope here.
Description
This is split from #17640 at @eerovaher's request.