Skip to content

Commit 1c4021c

Browse files
committed
clean up doc and get toc to build right again; sphinx 5.3
1 parent 7e218e4 commit 1c4021c

File tree

10 files changed

+155
-170
lines changed

10 files changed

+155
-170
lines changed

saspy/doc/source/adding-procedures.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.. Copyright SAS Institute
33
44
5-
************************
5+
========================
66
Contributing new methods
7-
************************
7+
========================
88

99
Overview
10-
--------
10+
========
1111
This module is broken into product areas that largely follow the SAS product areas.
1212
There are many many procedures, which translate to object methods, that are not
1313
currently included in the package. The aim of this document is to outline the
@@ -21,7 +21,7 @@ minutes for subsequent methods.
2121
Your contribution and feedback is greatly appreciated!
2222

2323
Process
24-
=======
24+
~~~~~~~
2525

2626
To add a new procedure follow these steps:
2727

saspy/doc/source/advanced-topics.rst

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ Advanced topics
1111
In this chapter we will explore more detailed explanations of specific functionality.
1212

1313

14-
****************
1514
Using Batch mode
16-
****************
15+
================
1716

1817
Batch mode is meant to be used when you want to automate your code as Python scripts.
1918

@@ -64,9 +63,8 @@ than this few lines of code, you can have the results updated and refreshed by j
6463
re-running the script.
6564

6665

67-
*********
6866
Prompting
69-
*********
67+
=========
7068

7169
There are two types of prompting that can be performed; meaning to stop processing and
7270
prompt the user for input and then resume processing.
@@ -188,9 +186,8 @@ at runtime for values you want to use in the code, and those values can be
188186
kept around and used later in the code, or hidden and inaccessible afterward.
189187

190188

191-
***************************************************************
192189
Moving values between Python Variables and SAS Macro Variables
193-
***************************************************************
190+
==============================================================
194191

195192
There are two methods on the SASsession object you can use to transfer values between Python and SAS.
196193
symget() and symput(). To get a value from a SAS Macro Variable and assign it to a Python variable you
@@ -213,9 +210,8 @@ https://github.com/sassoftware/saspy-examples/blob/main/SAS_contrib/Using_SYMGET
213210

214211

215212

216-
********************************************************
217213
Moving data between Python and SAS - datatype conversion
218-
********************************************************
214+
========================================================
219215

220216
SASPy has methods to load data from a SAS Data Set (or View) into Python as a Pandas dataframe, as well
221217
as the reverse; loading a dataframe into a SAS Data Set. This is all documented in the API doc and some
@@ -265,9 +261,8 @@ become missing values in SAS.
265261
266262
267263
268-
**********************************
269264
Dates, Times and Datetimes, Oh my!
270-
**********************************
265+
==================================
271266

272267
The sd2df and df2sd methods transfer data between SAS Data Sets and Pandas dataframes. For most
273268
cases, if you start with a SAS dataset and import it to a dataframe, then send it back to SAS,
@@ -362,9 +357,8 @@ https://github.com/sassoftware/saspy-examples/blob/main/Issue_examples/Issue279.
362357

363358

364359

365-
***********************************
366360
Advanced sd2df and df2sd techniques
367-
***********************************
361+
===================================
368362

369363
The sd2df and df2sd methods transfer data between SAS Data Sets and Pandas dataframes. For most cases,
370364
you don't need to specify extra options. But, there are extra options to cover a variety of specific
@@ -492,9 +486,8 @@ https://github.com/sassoftware/saspy/issues/279 to see where this fuctionality c
492486

493487

494488

495-
******************************************************************************
496489
Slow performance loading SAS data into a Pandas DataFrame ( to_df(), sd2df() )
497-
******************************************************************************
490+
==============================================================================
498491

499492
UPDATE!!!
500493

@@ -538,9 +531,8 @@ and newlines, which Pandas can have parsing problem with reading CSV file create
538531

539532

540533

541-
*****************************************************************
542534
Slow performance loading a DataFrame into a SAS data set; df2sd()
543-
*****************************************************************
535+
=================================================================
544536

545537
df2sd (dataframe2sasdata) has two main steps, which were both done internal to the method. The second is transferring the data
546538
but the first is figureing out the necessary metadata to be able to correctly define the SAS Data Set being created. This requires
@@ -686,9 +678,8 @@ Here are a few example cases showing this.
686678
687679
688680
689-
*****************************************************************************
690681
Using Proc Iomoperate to find Object Spawner hosts and Workspace Server ports
691-
*****************************************************************************
682+
=============================================================================
692683

693684
If you already use a client to connect to IOM servers, you may have the host and port to OMR
694685
(the SAS Metadata Server), but not necessarily those of the Object Spawners or Workspace Servers.
@@ -782,9 +773,8 @@ convention for these is to use the 'Server context :' value as the config name.
782773
to know which server you will be connecting to.
783774

784775

785-
**************************************************************
786776
Disconnecting from an IOM session and reconnecting back to it.
787-
**************************************************************
777+
==============================================================
788778

789779
The IOM access method has the ability to disconnect from the workspace server and
790780
reconnect to it (the same one); IF the reconnect setting is configured for that workspace
@@ -818,9 +808,8 @@ a single process, and each time a disconnect happens a new toke is created. But,
818808
specific case, so it is now available.
819809

820810

821-
*******************************************************************
822811
Configuring Grid Option Sets to have saspy run on a specific Queue.
823-
*******************************************************************
812+
===================================================================
824813

825814
Working with Grid Options Sets is documented here (the 'Doc' referred to below):
826815
http://support.sas.com/documentation/cdl/en/gridref/67371/HTML/default/viewer.htm#n1inymfs0b7go2n147xdknz0ygpx.htm
@@ -847,9 +836,8 @@ in to the grid options mapping wizard (the first part of the document referenced
847836
should now be available to choose and you can set this up as you want.
848837

849838

850-
****************************************************************
851839
Automatic checking for ERROR: in the LOG and the warnings module
852-
****************************************************************
840+
================================================================
853841

854842
Based upon an enhancement request, as of version 3.6.7, SASPy now checks for 'ERROR:' and issues a message via the warnings module
855843
to inform you that you should take a look at the log and see if there was a problem. SASPy methods won't blindly fail just by finding
@@ -964,9 +952,8 @@ Hopefully you will find this enhancement useful. It would be great if each thing
964952
not the case. So, checking the log is something that's necessary sometimes. Hopefully this warning when an ERROR is seen, will make this easier.
965953

966954

967-
*********************************************
968955
saspy.logger from logging.logger as of V3.7.5
969-
*********************************************
956+
=============================================
970957

971958
Per a user request to get rid of using print() for variaous messages, and use the logging facility instead, I've
972959
replaced all non-interactive prints() in saspy (print is still used for prompting, as it needs to be) with
@@ -1100,9 +1087,8 @@ Here's just a little example of a programm showing some of this.
11001087
11011088
11021089
1103-
***************************************************
11041090
SASsession object as a context manager as of V3.7.5
1105-
***************************************************
1091+
===================================================
11061092

11071093
A user contributed, via PR #401, the ability for a SASsession object to be used as a context manage
11081094
for the 'with' statement (see https://docs.python.org/3.9/reference/datamodel.html#context-managers).
@@ -1177,9 +1163,9 @@ Here's a live example showing that the Session was terminated after the with con
11771163
>>>
11781164
11791165
1180-
**************
11811166
Jupyter magics
1182-
**************
1167+
==============
1168+
11831169
Jupyter Notebooks have what they call Magics, which let you submit code from a diferent language
11841170
than the kernel of the notebook, or provide other functionality. SASPy supports a few magics that
11851171
you can use if you are in a Jupyter Notebook. They simply allow you to submit explicit SAS code

saspy/doc/source/api.rst

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
.. Copyright SAS Institute
33
44
5-
*************
5+
=============
66
API Reference
7-
*************
7+
=============
88

99
.. automodule:: saspy
1010
:members:
@@ -13,30 +13,27 @@ API Reference
1313
:show-inheritance:
1414

1515
SAS Session Object
16-
------------------
17-
.. autoclass:: SASsession
16+
==================
17+
.. autoclass:: saspy.sasbase.SASsession
1818
:members:
1919

2020
SAS Data Object
21-
---------------
22-
21+
===============
2322
.. autoclass:: saspy.sasdata.SASdata
2423
:members:
2524

2625
Procedure Syntax Statements
27-
---------------------------
28-
26+
===========================
2927
.. autoclass:: saspy.sasproccommons.SASProcCommons
3028
:members:
3129

32-
3330
SAS Results
34-
-----------
31+
===========
3532
.. autoclass:: saspy.sasresults.SASresults
3633
:members:
3734

3835
SAS Procedures
39-
--------------
36+
==============
4037

4138
Utility
4239
~~~~~~~
@@ -51,7 +48,6 @@ Machine Learning (SAS Enterprise Miner)
5148
.. autoclass:: saspy.sasml.SASml
5249
:members:
5350

54-
.. autosummary:: saspy.sasml.SASml
5551

5652
Statistics
5753
~~~~~~~~~~
@@ -80,7 +76,7 @@ SAS Viya VDMML
8076

8177

8278
SASPy Scripts
83-
-------------
79+
=============
8480

8581
run_sas.py
8682
~~~~~~~~~~

saspy/doc/source/conf.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@
5050
autodoc_default_flags = ['show-inheritance']
5151
autoclass_content = 'class'
5252

53-
intersphinx_mapping = {'python': ('https://docs.python.org/', None),
54-
'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),
55-
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
56-
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
57-
'matplotlib': ('http://matplotlib.sourceforge.net/', None)}
53+
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
54+
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
55+
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
56+
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
57+
# 'matplotlib': ('https://matplotlib.sourceforge.net/', None)
58+
}
59+
5860

5961
# Add any paths that contain templates here, relative to this directory.
6062
templates_path = ['_templates']
@@ -151,7 +153,12 @@
151153
html_theme_options = {
152154
# Toc options
153155
'collapse_navigation': False,
156+
'sticky_navigation': True,
154157
'navigation_depth': 5,
158+
'includehidden': True,
159+
'titles_only': False,
160+
'globaltoc_maxdepth' : 5,
161+
155162
}
156163

157164

@@ -327,4 +334,4 @@
327334

328335

329336
# Example configuration for intersphinx: refer to the Python standard library.
330-
intersphinx_mapping = {'https://docs.python.org/': None}
337+
#intersphinx_mapping = {'https://docs.python.org/3': None}

saspy/doc/source/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
===============
2+
=============
33
Configuration
4-
===============
4+
=============
55

66
This module can connect and start different kinds of SAS sessions. It can connect to SAS
77
on Unix, Mainframe, and Windows. It can connect to a local SAS session or remote session.

0 commit comments

Comments
 (0)