Skip to content

Commit

Permalink
Upgrade pip packages and fix gym-related typing errors (#138)
Browse files Browse the repository at this point in the history
* chore: Update dependencies and pyright fixes
- Remove trailing whitespace in notebook scripts
- Update dependencies: prompt-toolkit, pip, wheel, progressbar2
- Refactor CyberBattleEnv class to use np_random consistently
- Remove networkx from createstubs.sh
- Update dependencies: networkx, pytest, setuptools, pyright, plotly

---------

Co-authored-by: William Blum <[email protected]>
  • Loading branch information
blumu and William Blum authored Aug 6, 2024
1 parent e573f1e commit 55f8d00
Show file tree
Hide file tree
Showing 42 changed files with 381,202 additions and 439,722 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ jobs:
- name: Display Python version
run: python -c "import sys; print(sys.version)"

# - name: Use node tools
# uses: actions/setup-node@v2
# with:
# node-version: 16.x

- name: Pull pip packages from cache
uses: actions/cache@v3
with:
Expand All @@ -52,9 +47,6 @@ jobs:
pip install flake8
flake8 --benchmark
# - name: Initialize build environment
# run: conda env create -f ./env.yml

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
language: node
pass_filenames: false
types: [python]
additional_dependencies: ["[email protected].271"]
additional_dependencies: ["[email protected].374"]

- id: flake8
name: flake8
Expand Down
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"ms-python.flake8"
]
}
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"configurations": [
{
"name": "Python: cyberbattle_gym",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "src/cyberbattle_gym/samples/run.py",
"console": "integratedTerminal"
},
{
"name": "Python: Current File",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
},
"jupyter.jupyterServerType": "local",
"jupyter.notebookFileRoot": "${workspaceFolder}",
"files.trimFinalNewlines": true
"files.trimFinalNewlines": true,
"editor.defaultFormatter": "ms-python.flake8",
"flake8.args": [
],
"files.trimTrailingWhitespace": true,

}
8 changes: 2 additions & 6 deletions createstubs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ mkdir -p typings/

createstub pandas
createstub plotly
createstub progressbar
createstub pytest
createstub setuptools
createstub ordered_set
createstub asciichartpy
createstub networkx
createstub boolean
createstub IPython


echo 'Typing stub generation completed'

popd
Loading

0 comments on commit 55f8d00

Please sign in to comment.