Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0c16d29
Remove Python 2.7 support
apdavison Jan 9, 2024
1bc6ca2
Migration from Django 1.8 to 2.x
apdavison Jan 9, 2024
f1190a2
fix some problems found by flake8
apdavison Jan 9, 2024
9013c5e
Switch to GitHub Actions for CI
apdavison Jan 9, 2024
ca51c7c
older Python versions need an older os image
apdavison Jan 9, 2024
c45e821
Sumatra needs to be installed to run tests
apdavison Jan 9, 2024
c35bfef
fixes for test failures under Python 3.12
apdavison Jan 10, 2024
c884442
more fixes
apdavison Jan 10, 2024
8413237
Update copyright statement
apdavison Jan 10, 2024
a9b0e3c
Update documentation
apdavison Jan 10, 2024
0e04b7c
Changes to GitHub Actions workflow
apdavison Jan 10, 2024
1cb56d8
Update system tests to work with pytest
apdavison Apr 10, 2025
1e306ae
Update README, e-mail in setup.py
apdavison Apr 10, 2025
e8991e7
Allow using '~' in projects file to indicate home directory.
alcrene Dec 22, 2021
03c987a
minor formatting fix
alcrene Apr 4, 2023
17172ae
Replace `pkg_resources` with `importlib.resources`
alcrene Apr 4, 2023
0ea39ba
Use `with` everywhere to open files
alcrene Apr 4, 2023
48a3582
Add some methods to help sumatra_server
apdavison Jul 31, 2020
6e1c7bd
Allow launching with tqdm progress bar
alcrene Mar 5, 2018
5c9a92e
Default launch behaviour is to capture stderr
apdavison Apr 11, 2025
30b7c34
Rename `catch_stderr` to `capture_stderr`
apdavison Apr 11, 2025
5a1cadd
Make RecordDifference more robust
alcrene Oct 1, 2018
ed81f93
fix some long-broken tests
apdavison Apr 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run Sumatra tests

on: [push, pull_request]

jobs:
build:

strategy:
matrix:
os: [ubuntu-22.04, macos-latest]
python-version: ["3.8", "3.9", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
pip install -r ci/requirements.txt
pip install -r ci/requirements-test.txt
pip install .
pip freeze
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=119 --statistics
- name: Test with pytest
run: |
pytest test/unittests
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ MANIFEST
.pydevproject
.komodoproject
.idea
*.egg-info
*.egg-info
env
env-ci
test/example_repositories/mercurial/hg/wcache
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 The Sumatra authors and contributors
Copyright (c) 2025 The Sumatra authors and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
59 changes: 26 additions & 33 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,61 +26,54 @@ For documentation, see http://packages.python.org/Sumatra/ and http://neuralense

Functionality:

* launch simulations and analyses, and record various pieces of information,
including:
* launch simulations and analyses, and record various pieces of information,
including:

- the executable (identity, version)
- the script (identity, version)
- the parameters
- the duration (execution time)
- console output
- links to all data (whether in files, in a database, etc.) produced by
the simulation/analysis
- the reason for doing the simulation/analysis
- the outcome of the simulation/analysis
- the executable (identity, version)
- the script (identity, version)
- the parameters
- the duration (execution time)
- console output
- links to all data (whether in files, in a database, etc.) produced by
the simulation/analysis
- the reason for doing the simulation/analysis
- the outcome of the simulation/analysis

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


============
Requirements
============

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


============
Installation
============

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

If you have downloaded the source package, Sumatra-0.7.0.tar.gz::

$ tar xzf Sumatra-0.7.0.tar.gz
$ cd Sumatra-0.7.0
# python setup.py install

The last step may have to be done as root.


Alternatively, you can install directly from the Python Package Index::
The easiest way to install is with pip::

$ pip install sumatra

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

$ easy_install sumatra
$ tar xzf Sumatra-0.8.0.tar.gz
$ cd Sumatra-0.8.0
$ python setup.py install

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

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

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

.. image:: https://coveralls.io/repos/open-research/sumatra/badge.svg
Expand Down
12 changes: 10 additions & 2 deletions bin/smtweb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,16 @@ def main(argv):
INSTALLED_APPS=db_config._settings["INSTALLED_APPS"] + ['sumatra.web'],
ROOT_URLCONF='sumatra.web.urls',
STATIC_URL='/static/',
TEMPLATE_DIRS=(os.path.join(os.getcwd(), ".smt", "templates"),
os.path.join(root_dir, "templates"),),
TEMPLATES=[
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': False,
'DIRS': [
os.path.join(os.getcwd(), ".smt", "templates"),
os.path.join(root_dir, "templates")
]
},
],
MIDDLEWARE_CLASSES=tuple(),
READ_ONLY = options.read_only,
SERVERSIDE = options.serverside,
Expand Down
5 changes: 0 additions & 5 deletions ci/requirements-2.7.txt

This file was deleted.

2 changes: 0 additions & 2 deletions ci/requirements-3.6.txt

This file was deleted.

2 changes: 0 additions & 2 deletions ci/requirements-3.7.txt

This file was deleted.

6 changes: 3 additions & 3 deletions ci/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sarge
numpy
scipy
matplotlib
nose
pillow
coverage
coveralls
pytest<8
pytest-cov
flake8
7 changes: 4 additions & 3 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Base requirements for running Sumatra, for all supported versions of Python
Django>=1.8
setuptools # needed for Python 3.12, since distutils removed
Django<3
django-tagging>=0.4
httplib2
jinja2
docutils
parameters
future
# optional requirements, depending on which version control systems you use
mercurial
hgapi
GitPython>=0.3.6
# optional requirements, depending on which serialization formats you want
Expand All @@ -15,4 +16,4 @@ pyyaml
#dexml
#fs
# optional, for PostgreSQL support
#psycopg2
#psycopg2
28 changes: 12 additions & 16 deletions doc/build_reference.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
import sys
from sumatra import commands
from io import StringIO
Expand All @@ -24,16 +21,15 @@

sys.stdout = sys.__stdout__

f = open("command_reference.txt", "w")
f.write("=====================\n")
f.write("smt command reference\n")
f.write("=====================\n\n")

for mode in modes:
sio = usage[mode]
f.write(mode + '\n')
f.write('-'*len(mode) + '\n::\n\n ')
sio.seek(0)
f.write(" ".join(sio.readlines()) + '\n')
sio.close()
f.close()
with open("command_reference.txt", "w") as f:
f.write("=====================\n")
f.write("smt command reference\n")
f.write("=====================\n\n")

for mode in modes:
sio = usage[mode]
f.write(mode + '\n')
f.write('-'*len(mode) + '\n::\n\n ')
sio.seek(0)
f.write(" ".join(sio.readlines()) + '\n')
sio.close()
3 changes: 1 addition & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

from __future__ import unicode_literals
import sys, os

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -40,7 +39,7 @@
# General information about the project.
project = 'Sumatra'
authors = 'Sumatra authors and contributors'
copyright = '2009-2015 ' + authors
copyright = '2009-2020, 2024-2025 ' + authors

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
Loading
Loading