Skip to content

Commit af74387

Browse files
committed
Merge branch 'updates'
* updates: (23 commits) fix some long-broken tests Make RecordDifference more robust Rename `catch_stderr` to `capture_stderr` Default launch behaviour is to capture stderr Allow launching with tqdm progress bar Add some methods to help sumatra_server Use `with` everywhere to open files Replace `pkg_resources` with `importlib.resources` minor formatting fix Allow using '~' in projects file to indicate home directory. Update README, e-mail in setup.py Update system tests to work with pytest Changes to GitHub Actions workflow Update documentation Update copyright statement more fixes fixes for test failures under Python 3.12 Sumatra needs to be installed to run tests older Python versions need an older os image Switch to GitHub Actions for CI ... # Conflicts: # .travis.yml # ci/requirements-3.6.txt # ci/requirements-3.7.txt # setup.py # sumatra/formatting/__init__.py # sumatra/launch.py # sumatra/projects.py # sumatra/recordstore/django_store/models.py # sumatra/tee.py
2 parents fb2672e + ed81f93 commit af74387

93 files changed

Lines changed: 750 additions & 1054 deletions

Some content is hidden

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

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Sumatra tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
strategy:
9+
matrix:
10+
os: [ubuntu-22.04, macos-latest]
11+
python-version: ["3.8", "3.9", "3.11", "3.12"]
12+
runs-on: ${{ matrix.os }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r ci/requirements.txt
23+
pip install -r ci/requirements-test.txt
24+
pip install .
25+
pip freeze
26+
- name: Lint with flake8
27+
run: |
28+
# stop the build if there are Python syntax errors or undefined names
29+
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
30+
# exit-zero treats all errors as warnings.
31+
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=119 --statistics
32+
- name: Test with pytest
33+
run: |
34+
pytest test/unittests

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ MANIFEST
1414
.pydevproject
1515
.komodoproject
1616
.idea
17-
*.egg-info
17+
*.egg-info
18+
env
19+
env-ci
20+
test/example_repositories/mercurial/hg/wcache

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 The Sumatra authors and contributors
1+
Copyright (c) 2025 The Sumatra authors and contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.rst

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,61 +26,54 @@ For documentation, see http://packages.python.org/Sumatra/ and http://neuralense
2626

2727
Functionality:
2828

29-
* launch simulations and analyses, and record various pieces of information,
30-
including:
29+
* launch simulations and analyses, and record various pieces of information,
30+
including:
3131

32-
- the executable (identity, version)
33-
- the script (identity, version)
34-
- the parameters
35-
- the duration (execution time)
36-
- console output
37-
- links to all data (whether in files, in a database, etc.) produced by
38-
the simulation/analysis
39-
- the reason for doing the simulation/analysis
40-
- the outcome of the simulation/analysis
32+
- the executable (identity, version)
33+
- the script (identity, version)
34+
- the parameters
35+
- the duration (execution time)
36+
- console output
37+
- links to all data (whether in files, in a database, etc.) produced by
38+
the simulation/analysis
39+
- the reason for doing the simulation/analysis
40+
- the outcome of the simulation/analysis
4141

42-
* allow browsing/searching/visualising the results of previous experiments
43-
* allow the re-running of previous simulations/analyses with automatic
44-
verification that the results are unchanged
45-
* launch single or batch experiments, serial or parallel
42+
* allow browsing/searching/visualising the results of previous experiments
43+
* allow the re-running of previous simulations/analyses with automatic
44+
verification that the results are unchanged
45+
* launch single or batch experiments, serial or parallel
4646

4747

4848
============
4949
Requirements
5050
============
5151

52-
Sumatra requires Python versions 2.7, 3.4, 3.5 or 3.6. The web interface requires
53-
Django (>= 1.8) and the django-tagging package.
52+
Sumatra requires Python version 3.4 or later The web interface requires
53+
Django (>= 2.2) and the django-tagging package.
5454
Sumatra requires that you keep your own code in a version control
5555
system (currently Subversion, Mercurial, Git and Bazaar are supported). If you
5656
are already using Bazaar there is nothing else to install. If you
57-
are using Subversion you will need to install the pysvn package. If you using
57+
are using Subversion you will need to install the pysvn package. If you are using
5858
Git, you will need to install git-python bindings, and for Mercurial install hg-api.
5959

6060

6161
============
6262
Installation
6363
============
6464

65-
These instructions are for Unix, Mac OS X. They may work on Windows as well, but
65+
These instructions are for Unix and Mac OS. They may work on Windows as well, but
6666
it hasn't been thoroughly tested.
6767

68-
If you have downloaded the source package, Sumatra-0.7.0.tar.gz::
69-
70-
$ tar xzf Sumatra-0.7.0.tar.gz
71-
$ cd Sumatra-0.7.0
72-
# python setup.py install
73-
74-
The last step may have to be done as root.
75-
76-
77-
Alternatively, you can install directly from the Python Package Index::
68+
The easiest way to install is with pip::
7869

7970
$ pip install sumatra
8071

81-
or::
72+
Alternatively, you can download the source package, Sumatra-0.8.0.tar.gz from the Python Package Index::
8273

83-
$ easy_install sumatra
74+
$ tar xzf Sumatra-0.8.0.tar.gz
75+
$ cd Sumatra-0.8.0
76+
$ python setup.py install
8477

8578
You will also need to install Python bindings for the version control system(s) you use, e.g.::
8679

@@ -92,8 +85,8 @@ You will also need to install Python bindings for the version control system(s)
9285
Code status
9386
===========
9487

95-
.. image:: https://travis-ci.org/open-research/sumatra.png?branch=master
96-
:target: https://travis-ci.org/open-research/sumatra
88+
.. image:: https://github.com/open-research/sumatra/actions/workflows/tests/badge.svg
89+
:target: https://github.com/open-research/sumatra/actions/workflows/tests.yml
9790
:alt: Unit Test Status
9891

9992
.. image:: https://coveralls.io/repos/open-research/sumatra/badge.svg

bin/smtweb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,16 @@ def main(argv):
6868
INSTALLED_APPS=db_config._settings["INSTALLED_APPS"] + ['sumatra.web'],
6969
ROOT_URLCONF='sumatra.web.urls',
7070
STATIC_URL='/static/',
71-
TEMPLATE_DIRS=(os.path.join(os.getcwd(), ".smt", "templates"),
72-
os.path.join(root_dir, "templates"),),
71+
TEMPLATES=[
72+
{
73+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
74+
'APP_DIRS': False,
75+
'DIRS': [
76+
os.path.join(os.getcwd(), ".smt", "templates"),
77+
os.path.join(root_dir, "templates")
78+
]
79+
},
80+
],
7381
MIDDLEWARE_CLASSES=tuple(),
7482
READ_ONLY = options.read_only,
7583
SERVERSIDE = options.serverside,

ci/requirements-2.7.txt

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

ci/requirements-3.6.txt

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

ci/requirements-3.7.txt

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

ci/requirements-3.8.txt

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

ci/requirements-test.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sarge
33
numpy
44
scipy
55
matplotlib
6-
nose
76
pillow
8-
coverage
9-
coveralls
7+
pytest<8
8+
pytest-cov
9+
flake8

0 commit comments

Comments
 (0)