8000 Merge pull request #3 from sassoftware/master · Christian06810/python-sasctl@18d253f · GitHub
[go: up one dir, main page]

Skip to content

Commit 18d253f

Browse files
Merge pull request sassoftware#3 from sassoftware/master
Sync sasctl repositories
2 parents 47086d8 + 755da3f commit 18d253f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2302
-1685
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ jobs:
99
- name: Checkout repository
1010
uses: actions/checkout@v2
1111

12-
- name: Lint
13-
uses: ricardochaves/python-lint@v1.4.0
14-
continue-on-error: true
12+
- name: Black
13+
uses: psf/black@stable
1514
with:
16-
python-root-list: "src"
15+
src: "./src"
1716

1817
test:
1918
name: "Test"
@@ -22,7 +21,7 @@ jobs:
2221
LANG: en_US.UTF-8
2322
strategy:
2423
matrix:
25-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
24+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10']
2625
os-version: [ubuntu-latest, windows-latest, macos-latest]
2726

2827
steps:

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
Unreleased
22
----------
33
-
4+
v1.7.1 (2022-04-19)
5+
-------------------
6+
**Bugfixes**
7+
- Removed linux breaking import from new git integration feature
8+
- Various minor bug fixes in the git integration feature
9+
10+
v1.7.0 (2022-04-07)
11+
-------------------
12+
**Improvements**
13+
- Added Git integration for better tracking of model history and versioning.
14+
- Added MLFlow integration for simple models, allowing users to import simple MLFlow models, such as sci-kit
15+
learn, to SAS Model Manager
16+
17+
v1.6.4 (2022-04-07)
18+
-------------------
19+
**Bugfixes**
20+
- Fixed an issue where `folders.create_folder()` would attempt to use root folder as parent if desired parent
21+
folder wasn't found. Now correctly handles parent folders and raises an error if folder not found.
422

523
v1.6.3 (2021-09-23)
624
-------------------

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
<a href="https://github.com/sassoftware/python-sasctl/actions/workflows/build-test-deploy.yml">
1717
<img src="https://github.com/sassoftware/python-sasctl/actions/workflows/build-test-deploy.yml/badge.svg" />
1818
</a>
19-
19+
20+
<a href="https://codecov.io/gh/sassoftware/python-sasctl">
21+
<img src="https://codecov.io/gh/sassoftware/python-sasctl/branch/master/graph/badge.svg?token=mDcvtz2Als"/>
22+
</a>
23+
24+
2025
</div>
2126

2227

doc/conf.py

Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
#
1515
import os
1616
import sys
17-
sys.path.insert(0, os.path.abspath('../src'))
17+
18+
sys.path.insert(0, os.path.abspath("../src"))
1819

1920

2021
# -- Project information -----------------------------------------------------
2122
import sasctl
2223

23-
project = 'sasctl'
24+
project = "sasctl"
2425
copyright = sasctl.__copyright__
2526
author = sasctl.__author__
2627

@@ -40,38 +41,39 @@
4041
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4142
# ones.
4243
extensions = [
43-
'sphinx.ext.autodoc',
44-
'sphinx.ext.autosummary',
45-
'sphinx.ext.viewcode',
46-
'sphinx.ext.napoleon',
47-
'sphinx.ext.intersphinx',
48-
'sphinx.ext.todo'
44+
"sphinx.ext.autodoc",
45+
"sphinx.ext.autosummary",
46+
"sphinx.ext.viewcode",
47+
"sphinx.ext.napoleon",
48+
"sphinx.ext.intersphinx",
49+
"sphinx.ext.todo",
4950
]
5051

51-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
52-
'swat': ('https://sassoftware.github.io/python-swat/', None),
53-
'pytest': ('https://docs.pytest.org/en/latest/', None),
54-
'betamax': ('https://betamax.readthedocs.io/en/latest/', None),
55-
'requests': (
56-
'https://2.python-requests.org/en/master/', None),
57-
'tox': ('https://tox.readthedocs.io/en/latest/', None),
58-
'flake8': ('http://flake8.pycqa.org/en/latest/', None)}
52+
intersphinx_mapping = {
53+
"python": ("https://docs.python.org/3", None),
54+
"swat": ("https://sassoftware.github.io/python-swat/", None),
55+
"pytest": ("https://docs.pytest.org/en/latest/", None),
56+
"betamax": ("https://betamax.readthedocs.io/en/latest/", None),
57+
"requests": ("https://2.python-requests.org/en/master/", None),
58+
"tox": ("https://tox.readthedocs.io/en/latest/", None),
59+
"flake8": ("http://flake8.pycqa.org/en/latest/", None),
60+
}
5961

6062
todo_include_todos = True
6163

6264
todo_emit_warnings = True
6365

6466
# Add any paths that contain templates here, relative to this directory.
65-
templates_path = ['_templates']
67+
templates_path = ["_templates"]
6668

6769
# The suffix(es) of source filenames.
6870
# You can specify multiple suffix as a list of string:
6971
#
7072
# source_suffix = ['.rst', '.md']
71-
source_suffix = '.rst'
73+
source_suffix = ".rst"
7274

7375
# The master toctree document.
74-
master_doc = 'index'
76+
master_doc = "index"
7577

7678
# The language for content autogenerated by Sphinx. Refer to documentation
7779
# for a list of supported languages.
@@ -83,33 +85,33 @@
8385
# List of patterns, relative to source directory, that match files and
8486
# directories to ignore when looking for source files.
8587
# This pattern also affects html_static_path and html_extra_path .
86-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
88+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
8789

8890
# The name of the Pygments (syntax highlighting) style to use.
89-
pygments_style = 'sphinx'
91+
pygments_style = "sphinx"
9092

9193

9294
# -- Options for HTML output -------------------------------------------------
9395

9496
# The theme to use for HTML and HTML Help pages. See the documentation for
9597
# a list of builtin themes.
9698
#
97-
html_theme = 'alabaster'
99+
html_theme = "alabaster"
98100
# html_theme = 'sphinx_rtd_theme'
99101

100102
# Theme options are theme-specific and customize the look and feel of a theme
101103
# further. For a list of options available for each theme, see the
102104
# documentation.
103105
#
104106
html_theme_options = {
105-
'description': 'Python package and CLI for user-friendly integration with SAS Viya',
106-
'fixed_sidebar': True
107+
"description": "Python package and CLI for user-friendly integration with SAS Viya",
108+
"fixed_sidebar": True,
107109
}
108110

109111
# Add any paths that contain custom static files (such as style sheets) here,
110112
# relative to this directory. They are copied after the builtin static files,
111113
# so a file named "default.css" will overwrite the builtin "default.css".
112-
html_static_path = ['_static']
114+
html_static_path = ["_static"]
113115

114116
# Custom sidebar templates, must be a dictionary that maps document names
115117
# to template names.
@@ -120,19 +122,13 @@
120122
# 'searchbox.html']``.
121123
#
122124
# html_sidebars = {}
123-
html_sidebars = {
124-
'**': [
125-
'about.html',
126-
'searchbox.html',
127-
'navigation.html'
128-
]
129-
}
125+
html_sidebars = {"**": ["about.html", "searchbox.html", "navigation.html"]}
130126

131127

132128
# -- Options for HTMLHelp output ---------------------------------------------
133129

134130
# Output file base name for HTML help builder.
135-
htmlhelp_basename = 'sasctldoc'
131+
htmlhelp_basename = "sasctldoc"
136132

137133

138134
# -- Options for LaTeX output ------------------------------------------------
@@ -141,15 +137,12 @@
141137
# The paper size ('letterpaper' or 'a4paper').
142138
#
143139
# 'papersize': 'letterpaper',
144-
145140
# The font size ('10pt', '11pt' or '12pt').
146141
#
147142
# 'pointsize': '10pt',
148-
149143
# Additional stuff for the LaTeX preamble.
150144
#
151145
# 'preamble': '',
152-
153146
# Latex figure (float) alignment
154147
#
155148
# 'figure_align': 'htbp',
@@ -159,19 +152,15 @@
159152
# (source start file, target name, title,
160153
# author, documentclass [howto, manual, or own class]).
161154
latex_documents = [
162-
(master_doc, 'sasctl.tex', 'sasctl Documentation',
163-
'SAS', 'manual'),
155+
(master_doc, "sasctl.tex", "sasctl Documentation", "SAS", "manual"),
164156
]
165157

166158

167159
# -- Options for manual page output ------------------------------------------
168160

169161
# One entry per manual page. List of tuples
170162
# (source start file, name, description, authors, manual section).
171-
man_pages = [
172-
(master_doc, 'sasctl', 'sasctl Documentation',
173-
[author], 1)
174-
]
163+
man_pages = [(master_doc, "sasctl", "sasctl Documentation", [author], 1)]
175164

176165

177166
# -- Options for Texinfo output ----------------------------------------------
@@ -180,10 +169,16 @@
180169
# (source start file, target name, title, author,
181170
# dir menu entry, description, category)
182171
texinfo_documents = [
183-
(master_doc, 'sasctl', 'sasctl Documentation',
184-
author, 'sasctl', 'One line description of project.',
185-
'Miscellaneous'),
172+
(
173+
master_doc,
174+
"sasctl",
175+
"sasctl Documentation",
176+
author,
177+
"sasctl",
178+
"One line description of project.",
179+
"Miscellaneous",
180+
),
186181
]
187182

188183

189-
# -- Extension configuration -------------------------------------------------
184+
# -- Extension configuration -------------------------------------------------

examples/pzmmCompleteModelExampleMLFlowSklearn.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"metadata": {},
9696
"outputs": [],
9797
"source": [
98+
"from sklearn.linear_model import LogisticRegression\n",
9899
"model = LogisticRegression().fit(data, y)"
99100
]
100101
},

examples/pzmmModelImportExample.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,14 +660,14 @@
660660
}
661661
],
662662
"source": [
663-
"def writeJSONFiles(data, predict, target, zipFolder, yTrain, modelPrefix):\n",
663+
"def writeJSONFiles(data, predict, target, zipFolder, modelPrefix):\n",
664664
" J = pzmm.JSONFiles()\n",
665665
" \n",
666666
" # Write input variable mapping to a json file\n",
667667
" J.writeVarJSON(data[predict], isInput=True, jPath=zipFolder)\n",
668668
" \n",
669669
" # Set output variables and assign an event threshold, then write output variable mapping\n",
670-
" outputVar = pd.DataFrame(columns=['EM_EVENTPROBABILITY', 'EM_CLASSIFICATION'], data=[['A', 0.5]]) # data argument includes example expected types for columns\n",
670+
" outputVar = pd.DataFrame(columns=['EM_EVENTPROBABILITY', 'EM_CLASSIFICATION'], data=[[0.5, 'A']]) # data argument includes example expected types for columns\n",
671671
" J.writeVarJSON(outputVar, isInput=False, jPath=zipFolder)\n",
672672
" \n",
673673
" # Write model properties to a json file\n",
@@ -686,7 +686,7 @@
686686
" J.writeFileMetadataJSON(modelPrefix, jPath=zipFolder)\n",
687687
"\n",
688688
"for (prefix, path) in zip(modelPrefix, zipFolder):\n",
689-
" writeJSONFiles(hmeqData, predictorColumns, targetColumn, path, yTrain, prefix)"
689+
" writeJSONFiles(hmeqData, predictorColumns, targetColumn, path, prefix)"
690690
]
691691
},
692692
{

0 commit comments

Comments
 (0)
0