Skip to content

Commit

Permalink
Merge pull request #183 from Met4FoF/fix_missing_psutil_installation
Browse files Browse the repository at this point in the history
Introduce psutil into dependencies and recompile dependencies
  • Loading branch information
BjoernLudwigPTB authored Feb 9, 2021
2 parents f38dd57 + 4ca84af commit 64b5ca6
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 34 deletions.
25 changes: 10 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ commands:
name: Run tests
command: |
source venv/bin/activate
pytest -v --junitxml=test-reports/pytest.xml --cov=. . | tee \
test-reports/agentMET4FOF.log
tox | tee --append test-reports/agentMET4FOF.log
# Upload coverage report if the according parameter is set to `true`.
- when:
Expand Down Expand Up @@ -146,7 +145,6 @@ jobs:
fi
source $HOME/conda/etc/profile.d/conda.sh
conda activate agentMET4FOF
pip install PyDynamic
- save_cache:
paths:
Expand All @@ -160,7 +158,7 @@ jobs:
command: |
source $HOME/conda/etc/profile.d/conda.sh
conda activate agentMET4FOF
pytest -v --junitxml=test-reports/junit.xml . | tee test-reports/pytest.log
tox | tee --append test-reports/agentMET4FOF.log
- store_test_artifacts_and_results

Expand All @@ -178,24 +176,23 @@ jobs:
- restore_cache:
keys:
# Specify the unique identifier for the cache.
- v1-setup-dependencies-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
- v2-setup-dependencies-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
# Fallback to using the latest cache if no exact match is found.
- v1-setup-dependencies-
- v2-setup-dependencies-

# Install dependencies.
- run:
name: Install dependencies
command: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip wheel
pip install '.[tutorials]' -r dev-requirements.txt
pip install --upgrade tox
- save_cache:
paths:
- ./venv
key: >-
v1-setup-dependencies-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
v2-setup-dependencies-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
# Run tests! We use pytest's test-runner and request to send coverage report.
- run_venv_tests:
Expand All @@ -214,25 +211,23 @@ jobs:
- restore_cache:
keys:
# Specify the unique identifier for the cache.
- v3-venv-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}
- v4-venv-dependencies-{{ checksum "dev-requirements.txt" }}
# Fallback to using the latest cache if no exact match is found.
- v3-venv-dependencies-
- v4-venv-dependencies-

# Install dependencies and extra_requires dependencies manually.
- run:
name: Install dependencies
command: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip pip-tools
pip-sync dev-requirements.txt requirements.txt
pip install PyDynamic
pip install --upgrade pip tox
- save_cache:
paths:
- ./venv
key: >-
v3-venv-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}
v4-venv-dependencies-{{ checksum "dev-requirements.txt" }}
# Run tests! We use pytest's test-runner.
- run_venv_tests
Expand Down
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exclude_lines =
ignore_errors = True
omit =
*venv/*
.tox/*
tests/*
docs/*
setup.py
3 changes: 3 additions & 0 deletions dev-requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-c requirements.txt

pytest
pytest-cov
pytest-timeout
Expand All @@ -8,3 +10,4 @@ nbsphinx
recommonmark
sphinx_rtd_theme
ipython
tox
78 changes: 63 additions & 15 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#
alabaster==0.7.12
# via sphinx
appdirs==1.4.4
# via virtualenv
async-generator==1.10
# via nbclient
attrs==20.3.0
Expand All @@ -19,26 +21,40 @@ backcall==0.2.0
bleach==3.3.0
# via nbconvert
certifi==2020.12.5
# via requests
# via
# -c requirements.txt
# requests
chardet==4.0.0
# via requests
# via
# -c requirements.txt
# requests
commonmark==0.9.1
# via recommonmark
coverage==5.4
# via pytest-cov
decorator==4.4.2
# via ipython
# via
# -c requirements.txt
# ipython
defusedxml==0.6.0
# via nbconvert
distlib==0.3.1
# via virtualenv
docutils==0.16
# via
# nbsphinx
# recommonmark
# sphinx
entrypoints==0.3
# via nbconvert
filelock==3.0.12
# via
# tox
# virtualenv
idna==2.10
# via requests
# via
# -c requirements.txt
# requests
imagesize==1.2.0
# via sphinx
iniconfig==1.1.1
Expand All @@ -53,6 +69,7 @@ jedi==0.18.0
# via ipython
jinja2==2.11.3
# via
# -c requirements.txt
# nbconvert
# nbsphinx
# sphinx
Expand All @@ -68,7 +85,9 @@ jupyter-core==4.7.1
jupyterlab-pygments==0.1.2
# via nbconvert
markupsafe==1.1.1
# via jinja2
# via
# -c requirements.txt
# jinja2
mistune==0.8.4
# via nbconvert
nbclient==0.5.1
Expand All @@ -89,6 +108,7 @@ packaging==20.9
# bleach
# pytest
# sphinx
# tox
pandocfilters==1.4.3
# via nbconvert
parso==0.8.1
Expand All @@ -98,23 +118,31 @@ pexpect==4.8.0
pickleshare==0.7.5
# via ipython
pluggy==0.13.1
# via pytest
# via
# pytest
# tox
prompt-toolkit==3.0.14
# via ipython
psutil==5.8.0
# via -r dev-requirements.in
# via
# -c requirements.txt
# -r dev-requirements.in
ptyprocess==0.7.0
# via pexpect
py==1.10.0
# via pytest
# via
# pytest
# tox
pygments==2.7.4
# via
# ipython
# jupyterlab-pygments
# nbconvert
# sphinx
pyparsing==2.4.7
# via packaging
# via
# -c requirements.txt
# packaging
pyrsistent==0.17.3
# via jsonschema
pytest-cov==2.11.1
Expand All @@ -127,22 +155,32 @@ pytest==6.2.2
# pytest-cov
# pytest-timeout
python-dateutil==2.8.1
# via jupyter-client
# via
# -c requirements.txt
# jupyter-client
pytz==2021.1
# via babel
# via
# -c requirements.txt
# babel
pyzmq==22.0.2
# via jupyter-client
# via
# -c requirements.txt
# jupyter-client
recommonmark==0.7.1
# via -r dev-requirements.in
requests==2.25.1
# via
# -c requirements.txt
# -r dev-requirements.in
# sphinx
six==1.15.0
# via
# -c requirements.txt
# bleach
# jsonschema
# python-dateutil
# tox
# virtualenv
snowballstemmer==2.1.0
# via sphinx
sphinx-rtd-theme==0.5.1
Expand All @@ -168,9 +206,15 @@ sphinxcontrib-serializinghtml==1.1.4
testpath==0.4.4
# via nbconvert
toml==0.10.2
# via pytest
# via
# pytest
# tox
tornado==6.1
# via jupyter-client
# via
# -c requirements.txt
# jupyter-client
tox==3.21.4
# via -r dev-requirements.in
traitlets==5.0.5
# via
# ipython
Expand All @@ -181,7 +225,11 @@ traitlets==5.0.5
# nbformat
# nbsphinx
urllib3==1.26.3
# via requests
# via
# -c requirements.txt
# requests
virtualenv==20.4.2
# via tox
wcwidth==0.2.5
# via prompt-toolkit
webencodings==0.5.1
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ networkx==2.5
# via
# agentMET4FOF (setup.py)
# mesa
numpy==1.20.0
numpy==1.20.1
# via
# agentMET4FOF (setup.py)
# matplotlib
Expand All @@ -95,7 +95,7 @@ numpy==1.20.0
# time-series-buffer
osbrain==0.6.5
# via agentMET4FOF (setup.py)
pandas==1.2.1
pandas==1.2.2
# via
# agentMET4FOF (setup.py)
# mesa
Expand All @@ -105,6 +105,8 @@ plotly==4.14.3
# dash
poyo==0.5.0
# via cookiecutter
psutil==5.8.0
# via agentMET4FOF (setup.py)
pyparsing==2.4.7
# via matplotlib
pyro4==4.80
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def run(self):
long_description_content_type="text/markdown",
url="https://github.com/bangxiangyong/agentMET4FOF",
author=u"Bang Xiang Yong, Björn Ludwig, Anupam Prasad Vedurmudi, "
u"Maximilian Gruber, Haris Lulic",
u"Maximilian Gruber, Haris Lulic",
author_email="bxy20@cam.ac.uk",
keywords="uncertainty metrology MAS agent-based agents",
packages=find_packages(exclude=["tests"]),
Expand Down Expand Up @@ -76,9 +76,10 @@ def run(self):
"time-series-metadata",
"mpld3",
"mesa",
"psutil",
],
extras_require={"tutorials": ["notebook", "PyDynamic"]},
python_requires=">=3.6",
python_requires=">=3.8",
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Utilities",
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# tox.ini configures the shared testing routine and specifies what Python
# versions are meant to be tested.
[tox]
envlist = py38
skipsdist = false
skip_missing_interpreters=true

[testenv]
# Specify dependencies that we want tox to install for us.
deps =
-rdev-requirements.txt
# Run those tests in our virtual environments.
commands = pytest -v --cov=. --junitxml=test-reports/junit.xml .

0 comments on commit 64b5ca6

Please sign in to comment.