Skip to content

Commit cb71514

Browse files
authored
Merge pull request #916 from microsoft/chore/remove-conda-and-reqs-all
Remove conda reqs and requirements-all.txt; simplify CI installs via setup.py extras
2 parents 1a8a61f + e302db1 commit cb71514

16 files changed

Lines changed: 54 additions & 421 deletions

.devcontainer/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ FROM mcr.microsoft.com/vscode/devcontainers/anaconda
33
LABEL maintainer="Msticpy Dev Team <msticpy@microsoft.com>"
44

55
#installing Msticpy requirements and dependencies
6-
COPY ./requirements-all.txt /tmp/
7-
COPY ./requirements-dev.txt /tmp/
8-
RUN pip install --requirement /tmp/requirements-all.txt & \
9-
pip install --requirement /tmp/requirements-dev.txt & \
10-
pip install -e git+https://github.com/microsoft/msticpy
116
COPY . /tmp/
7+
RUN pip install -e "git+https://github.com/microsoft/msticpy#egg=msticpy[test]"
128

139
# Activate ipywidgets extension in the environment that runs the notebook server
1410
RUN jupyter nbextension enable --py widgetsnbextension --sys-prefix && \

.github/workflows/python-package.yml

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,19 @@ jobs:
4646
# This path is specific to Ubuntu
4747
path: ~/.cache/pip
4848
# Look to see if there is a cache hit for the corresponding requirements file
49-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-all.txt') }}
49+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements.txt', 'requirements-dev.txt') }}
5050
restore-keys: |
51-
${{ runner.os }}-pip-${{ hashFiles('requirements-all.txt') }}
51+
${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements.txt', 'requirements-dev.txt') }}
5252
${{ runner.os }}-pip
5353
- name: Install dependencies
54+
# Installs core install + all extras ("all") + dev/test dependencies ("dev")
55+
# via the combined "test" extra defined in setup.py.
5456
run: |
5557
python -m pip install --upgrade pip wheel setuptools
56-
if [ -f requirements-all.txt ]; then
57-
python -m pip install --use-pep517 -r requirements-all.txt
58-
elif [ -f requirements.txt ]; then
59-
python -m pip install --use-pep517 -r requirements.txt;
60-
fi
61-
python -m pip install -e .
58+
python -m pip install --use-pep517 -e ".[test]"
6259
- name: Install test dependencies
6360
# ToDo - remove pip install xgboost when flaml is fixed
6461
run: |
65-
if [ -f requirements-dev.txt ]; then
66-
python -m pip install -r requirements-dev.txt
67-
else
68-
echo "Missing requirements-dev.txt. Installing minimal requirements for testing."
69-
python -m pip install pytest pytest-cov pytest-xdist pytest-check aiohttp nbconvert jupyter_contrib_nbextensions
70-
python -m pip install Pygments respx pytest-xdist markdown beautifulsoup4 Pillow async-cache lxml
71-
fi
7262
python -m pip install "pandas>=1.3.0" "pygeohash>=1.2.0"
7363
python -m pip install "xgboost"
7464
- name: Prepare test dummy data
@@ -122,9 +112,9 @@ jobs:
122112
# This path is specific to Ubuntu
123113
path: ~/.cache/pip
124114
# Look to see if there is a cache hit for the corresponding requirements file
125-
key: ${{ runner.os }}-pip-docs-${{ hashFiles('doc/requirements-all.txt') }}
115+
key: ${{ runner.os }}-pip-docs-${{ hashFiles('docs/requirements.txt') }}
126116
restore-keys: |
127-
${{ runner.os }}-pip-docs-${{ hashFiles('requirements-all.txt') }}
117+
${{ runner.os }}-pip-docs-${{ hashFiles('docs/requirements.txt') }}
128118
${{ runner.os }}-pip-docs
129119
${{ runner.os }}-pip
130120
- name: Sphinx Read the Docs build
@@ -159,28 +149,17 @@ jobs:
159149
# This path is specific to Ubuntu
160150
path: ~/.cache/pip
161151
# Look to see if there is a cache hit for the corresponding requirements file
162-
key: ${{ runner.os }}-pip-lint-${{ hashFiles('requirements-all.txt') }}
152+
key: ${{ runner.os }}-pip-lint-${{ hashFiles('setup.py', 'requirements.txt', 'requirements-dev.txt') }}
163153
restore-keys: |
164-
${{ runner.os }}-pip-lint-${{ hashFiles('requirements-all.txt') }}
154+
${{ runner.os }}-pip-lint-${{ hashFiles('setup.py', 'requirements.txt', 'requirements-dev.txt') }}
165155
${{ runner.os }}-pip-lint
166156
${{ runner.os }}-pip
167157
- name: Install dependencies
158+
# Installs core install + all extras ("all") + dev/test dependencies ("dev")
159+
# via the combined "test" extra defined in setup.py.
168160
run: |
169161
python -m pip install --upgrade pip wheel setuptools
170-
if [ -f requirements-all.txt ]; then
171-
python -m pip install -r requirements-all.txt
172-
elif [ -f requirements.txt ]; then
173-
python -m pip install -r requirements.txt;
174-
fi
175-
python -m pip install -e .
176-
- name: Install test dependencies
177-
run: |
178-
if [ -f requirements-dev.txt ]; then
179-
python -m pip install -r requirements-dev.txt
180-
else
181-
echo "Missing requirements-dev.txt. Installing minimal requirements for testing."
182-
python -m pip install bandit mypy types-attrs pyroma
183-
fi
162+
python -m pip install -e ".[test]"
184163
- name: ruff
185164
run: |
186165
ruff check msticpy --ignore PLW0603

.pre-commit-config.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,3 @@ repos:
3333
- id: ruff-format
3434
args:
3535
- msticpy
36-
- repo: local
37-
hooks:
38-
- id: check_reqs_all
39-
name: check_reqs_all
40-
entry: python -m tools.create_reqs_all
41-
pass_filenames: False
42-
language: python
43-
types: [python]
44-
additional_dependencies: ['packaging>=24.0', 'setuptools>=42']

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ include msticpy/msticpyconfig.yaml
33
include msticpy/resources/*
44
include requirements.txt
55
include requirements-dev.txt
6-
include requirements-all.txt
76
include README.md
87
recursive-exclude tests *

azure-pipelines.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ stages:
6868
restoreKeys: python
6969
- script: |
7070
python -m pip install --upgrade pip wheel setuptools==56.0.0
71-
python -m pip install -r requirements-all.txt
72-
python -m pip install -e .
71+
python -m pip install -e ".[test]"
7372
displayName: 'Install package and dependencies'
7473
- script: |
7574
mkdir ~/.msticpy
@@ -94,7 +93,6 @@ stages:
9493
echo Env $MSTICPYCONFIG or %MSTICPYCONFIG%
9594
echo Build source: $(prSource)
9695
echo Env $MSTICPY_BUILD_SOURCE or %MSTICPY_BUILD_SOURCE%
97-
python -m pip install -r requirements-dev.txt
9896
python -m pip install "pandas>=1.3.0"
9997
python -m pip install seaborn
10098
pytest tests --junitxml=junit/test-$(variables.imageName)-$(variables.python.version)-results.xml -n auto --cov=msticpy --cov-report=xml

conda/README.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

conda/conda-reqs-dev-pip.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

conda/conda-reqs-dev.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

conda/conda-reqs-pip.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

conda/conda-reqs.txt

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)