Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/respx-0.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhelle authored Feb 15, 2022
2 parents cf7e540 + cdfec37 commit 26f5da2
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 10 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See here for image contents: https://hub.docker.com/r/jupyter/scipy-notebook
FROM jupyter/scipy-notebook
LABEL maintainer="Msticpy Dev Team <[email protected]>"

#installing Msticpy requirements and dependencies
COPY ./requirements-all.txt /tmp/
COPY ./requirements-dev.txt /tmp/
RUN pip install --requirement /tmp/requirements-all.txt & \
pip install --requirement /tmp/requirements-dev.txt & \
pip install -e git+https://github.com/microsoft/msticpy
COPY . /tmp/

# Activate ipywidgets extension in the environment that runs the notebook server
RUN jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
jupyter nbextension enable toc2/main --sys-prefix && \
jupyter nbextension enable execute_time/ExecuteTime --sys-prefix && \
jupyter nbextension enable python-markdown/main --sys-prefix && \
jupyter nbextension enable codefolding/main --sys-prefix && \
jupyter nbextension enable autosavetime/main --sys-prefix && \
jupyter nbextension enable tree-filter/index --sys-prefix && \
jupyter nbextension enable hide_input_all/main --sys-prefix && \
jupyter nbextension enable hinterland/hinterland --sys-prefix && \
jupyter nbextension enable varInspector/main --sys-prefix && \
jupyter nbextension enable spellchecker/main --sys-prefix && \
jupyter nbextension enable toggle_all_line_numbers/main --sys-prefix && \
jupyter nbextension enable --py qgrid --sys-prefix && \
jupyter nbextension install https://github.com/drillan/jupyter-black/archive/master.zip --sys-prefix && \
jupyter nbextension install --py nbdime --sys-prefix && \
jupyter nbextension enable jupyter-black-master/jupyter-black --sys-prefix && \
jupyter nbextension enable nbdime --py --sys-prefix && \
jupyter nbextension enable rise --py --sys-prefix && \
jupyter nbextensions_configurator enable --sys-prefix && \
jupyter labextension install @jupyterlab/git --no-build && \
jupyter labextension install @jupyterlab/github --no-build && \
jupyter labextension enable git && \
jupyter lab build --dev-build=False
78 changes: 78 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
 {
"name": "Msticpy Python Development Container",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},

// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.formatting.provider": "black",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
"python.linting.pylintPath": "/opt/conda/bin/pylint",
"files.autoSave": "afterDelay",
"team.showWelcomeMessage": false,
"python.linting.pylintEnabled": true,
"python.linting.pydocstyleArgs": [""],
"python.linting.pep8Enabled": true,
"python.linting.pep8Args": ["--ignore=E501,E251,W503,E701"],
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--max-line-length=90"],
"python.linting.pydocstyleEnabled": true,
"python.linting.mypyEnabled": true,
"python.linting.pylintUseMinimalCheckers": false,
"python.linting.prospectorEnabled": true,
"python.linting.banditEnabled": true,
"python.linting.ignorePatterns": [
".vscode/*.py",
"**/site-packages/**/*.py",
"**/tests/test_*.py",
"docs/**",
"docs/source/**",
"docs/build/**"
],
"editor.tabSize": 4,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"autoDocstring.docstringFormat": "numpy",
"git.autofetch": true,
"python.terminal.activateEnvironment": false,
"restructuredtext.linter.extraArgs": [
"--ignore D002",
"--ignore D004"
],
"[python]": {
},
"python.testing.pyTestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pyTestEnabled": true,
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"eamodio.gitlens",
"lextudio.restructuredtext",
"mohsen1.prettify-json",
"ms-python.python",
"ms-python.vscode-pylance",
"njpwerner.autodocstring",
"vscode-icons-team.vscode-icons",
"github.vscode-pull-request-github"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
6 changes: 3 additions & 3 deletions docs/notebooks/AzureSentinelAPIs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"outputs": [],
"source": [
"from msticpy.data.azure_sentinel import AzureSentinel\n",
"from msticpy.data.azure.sentinel_core import MicrosoftSentinel\n",
"import msticpy.nbtools.nbwidgets as widgets\n",
"from msticpy.data import data_obfus as mask"
]
Expand Down Expand Up @@ -77,7 +77,7 @@
}
],
"source": [
"azs = AzureSentinel()\n",
"azs = MicrosoftSentinel()\n",
"azs.connect()"
]
},
Expand Down Expand Up @@ -1807,7 +1807,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.7.6"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
8 changes: 4 additions & 4 deletions docs/source/data_acquisition/DataProv-MSSentinel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sentinel Configuration
----------------------

You can store configuration for your workspace (or workspaces) in either
your ``msticpconfig.yaml`` or a ``config.json`` file. The latter
your ``msticpyconfig.yaml`` or a ``config.json`` file. The latter
file is auto-created in your Azure Machine Learning (AML) workspace when
you launch a notebook from the Sentinel portal. It can however, only
store details for a single workspace.
Expand Down Expand Up @@ -42,20 +42,20 @@ The MS Sentinel connection settings are stored in the
TenantId: 335b56ab-67a2-4118-ac14-6eb454f350af
ResourceGroup: soc
SubscriptionId: a5b24e23-a96a-4472-b729-9e5310c83e20
Workspace Name: Workspace1
WorkspaceName: Workspace1
# To use these launch with an explicit name - WorkspaceConfig(workspace_name="Workspace2")
Workspace1:
WorkspaceId: "c88dd3c2-d657-4eb3-b913-58d58d811a41"
TenantId: "335b56ab-67a2-4118-ac14-6eb454f350af"
ResourceGroup: soc
SubscriptionId: a5b24e23-a96a-4472-b729-9e5310c83e20
Workspace Name: Workspace1
WorkspaceName: Workspace1
TestWorkspace:
WorkspaceId: "17e64332-19c9-472e-afd7-3629f299300c"
TenantId: "4ea41beb-4546-4fba-890b-55553ce6003a"
ResourceGroup: soc
SubscriptionId: a5b24e23-a96a-4472-b729-9e5310c83e20
Workspace Name: Workspace2
WorkspaceName: Workspace2
If you only use a single workspace, you only need to create a ``Default`` entry and
add the values for your *WorkspaceID* and *TenantID*. You can add other entries here,
Expand Down
8 changes: 5 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bandit>=1.7.0
beautifulsoup4
black>=20.8b1
coverage>=5.5
docutils<0.18.0
filelock>=3.0.0
flake8>=3.8.4
markdown>=3.3.4
Expand All @@ -23,7 +24,8 @@ pyroma>=3.1
pytest-check>=1.0.1
pytest-cov>=2.11.1
pytest>=5.0.1
readthedocs-sphinx-ext==2.1.4
responses>=0.13.2
respx==0.19.2
sphinx>=2.1.2
sphinx_rtd_theme>=0.5.1
virtualenv
sphinx-rtd-theme>=1.0.0
sphinx>=4.4.0

0 comments on commit 26f5da2

Please sign in to comment.