@@ -51,43 +51,46 @@ def _load_config(file_path):
5151
5252
5353def get_user_info (owner_name = None , owner_email = None , owner_orcid = None ):
54- """Get name, email, and orcid of the owner/user from various sources and
54+ """Get name, email, and ORCID of the owner/user from various sources and
5555 return it as a metadata dictionary.
5656
57- The function looks for the information in json format configuration files
58- with the name 'diffpyconfig.json'. These can be in the user's home
59- directory and in the current working directory. The information in the
60- config files are combined, with the local config overriding the
61- home- directory one. Values for owner_name, owner_email, and owner_orcid
62- may be passed in to the function and these override the values in the
63- config files.
64-
65- A template for the config file is below. Create a text file called '
66- diffpyconfig.json' in your home directory and copy-paste the template
67- into it, editing it with your real information.
68- {
69- "owner_name": "<your name as you would like it stored with your data>>",
70- "owner_email": "<your_associated_email>>@email.com",
71- "owner_orcid": "<your_associated_orcid if you would like this stored with your data>>" # noqa: E501
72- }
57+ The function looks for information in JSON configuration files named
58+ ``diffpyconfig.json``. These can be in the user's home directory and in
59+ the current working directory. The information in the config files is
60+ combined, with the local config overriding the home-directory one.
61+ Values for ``owner_name``, ``owner_email``, and ``owner_orcid`` may be
62+ passed in to the function, and these override the config files.
63+
64+ A template for the config file is below. Create a text file called
65+ ``diffpyconfig.json`` in your home directory and paste the template into
66+ it, editing it with your real information::
67+
68+ {
69+ "owner_name": "<your name as you would like it stored with your data>",
70+ "owner_email": "<your_associated_email>@email.com",
71+ "owner_orcid": "<your_associated_orcid if you would like this stored with your data>" # noqa: E501
72+ }
73+
7374 You may also store any other global-level information that you would like
74- associated with your diffraction data in this file
75+ associated with your diffraction data in this file.
7576
7677 Parameters
7778 ----------
78- owner_name : str, optional, default is the value stored in the global or
79- local config file. The name of the user who will show as owner in the
80- metadata that is stored with the data
81- owner_email : str, optional, default is the value stored in the global or
82- local config file. The email of the user/owner
83- owner_orcid : str, optional, default is the value stored in the global or
84- local config file. The ORCID id of the user/owner
79+ owner_name : str, ``optional``
80+ Default is the value stored in the global or local config file.
81+ The name of the user stored in metadata.
82+ owner_email : str, ``optional``
83+ Default is the value stored in the global or local config file.
84+ The email address of the user/owner.
85+ owner_orcid : str, ``optional``
86+ Default is the value stored in the global or local config file.
87+ The ORCID ID of the user/owner.
8588
8689 Returns
8790 -------
8891 user_info : dict
89- The dictionary containing username, email and orcid of the user/owner
90- , and any other information stored in the global or local config files.
92+ Dictionary containing username, email, ORCID, and any other
93+ information stored in global or local config files.
9194 """
9295 runtime_info = {
9396 "owner_name" : owner_name ,
@@ -127,9 +130,9 @@ def check_and_build_global_config(skip_config_creation=False):
127130
128131 Parameters
129132 ----------
130- skip_config_creation : bool, optional, default is False.
133+ skip_config_creation : bool, `` optional``
131134 The boolean that will override the creation workflow even if no
132- config file exists.
135+ config file exists. Default is False.
133136
134137 Returns
135138 -------
@@ -190,6 +193,7 @@ def get_package_info(package_names, metadata=None):
190193 Package info stored in metadata as
191194 {'package_info': {'package_name': 'version_number'}}.
192195
196+ Parameters
193197 ----------
194198 package_name : str or list
195199 The name of the package(s) to retrieve the version number for.
@@ -244,11 +248,13 @@ def compute_mu_using_xraydb(
244248 The chemical formula of the material.
245249 energy : float
246250 The energy of the incident x-rays in keV.
247- sample_mass_density : float, optional, Default is None
251+ sample_mass_density : float, `` optional``
248252 The mass density of the packed powder/sample in g/cm*3.
249- packing_fraction : float, optional, Default is None
253+ Default is None.
254+ packing_fraction : float, ``optional``
250255 The fraction of sample in the capillary (between 0 and 1).
251256 Specify either sample_mass_density or packing_fraction but not both.
257+ Default is None.
252258
253259 Returns
254260 -------
0 commit comments