Skip to content

Commit

Permalink
Merge branch 'master' into 351-bug-check-for-chance-information-sets-…
Browse files Browse the repository at this point in the history
…in-mixed-behavior-profiles
  • Loading branch information
rahulsavani authored Oct 9, 2023
2 parents acc9358 + 2150a73 commit 28e6dcb
Show file tree
Hide file tree
Showing 60 changed files with 3,681 additions and 3,847 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.11', '3.12-dev']
python-version: ['3.8', '3.12']

steps:
- uses: actions/checkout@v4
Expand All @@ -20,20 +20,20 @@ jobs:
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install cython nose2 wheel lxml numpy scipy
pip install cython pytest wheel lxml numpy scipy
- name: Build extension
run: |
python -m pip install -v .
- name: Run nosetests
- name: Run tests
run: |
cd src/pygambit/tests
nose2
pytest
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
Expand All @@ -44,11 +44,11 @@ jobs:
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install cython nose2 wheel lxml numpy scipy
pip install cython pytest wheel lxml numpy scipy
- name: Build extension
run: |
python -m pip install -v .
- name: Run nosetests
- name: Run tests
run: |
cd src/pygambit/tests
nose2
pytest
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [16.1.0a4] - unreleased

### Changed
- Empty or all-whitespace strings cannot be used to access members of games in pygambit.
- Remaining compatibility code for wxWidgets 2.x removed from graphical interface.
- Migrated to pytest for testing of pygambit.


## [16.1.0a3] - 2023-09-29

### Changed
Expand Down
13 changes: 5 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ EXTRA_DIST = \
src/pygambit/profiles.py \
src/pygambit/qre.py \
src/pygambit/supports.py \
src/pygambit/games/__init__.py \
src/pygambit/games/contest.py \
src/pygambit/games/meanstat.py \
src/pygambit/games/public.py \
src/pygambit/__init__.py \
src/pygambit/action.pxi \
src/pygambit/behav.pxi \
Expand All @@ -281,14 +277,16 @@ EXTRA_DIST = \
src/pygambit/tests/test_behav.py \
src/pygambit/tests/test_extensive.py \
src/pygambit/tests/test_game.py \
src/pygambit/tests/test_game_resolve_functions.py \
src/pygambit/tests/test_infosets.py \
src/pygambit/tests/test_mixed.py \
src/pygambit/tests/test_nash.py \
src/pygambit/tests/test_node.py \
src/pygambit/tests/test_outcomes.py \
src/pygambit/tests/test_players.py \
src/pygambit/tests/test_strategic.py \
src/pygambit/tests/test_stratprofiles.py \
src/pygambit/tests/test_strategies.py \
src/pygambit/tests/test_userguide.py \
src/pygambit/tests/test_games/basic_extensive_game.efg \
src/pygambit/tests/test_games/complicated_extensive_game.efg \
src/pygambit/tests/test_games/const_sum_game.nfg \
Expand Down Expand Up @@ -337,12 +335,12 @@ agg_SOURCES = \
src/games/gamebagg.h \
src/games/agg/gray.h \
src/games/agg/agg.cc \
src/games/agg/agg.h \
src/games/agg/agg.h \
src/games/agg/bagg.cc \
src/games/agg/bagg.h \
src/games/agg/proj_func.h \
src/games/agg/trie_map.h \
src/games/agg/trie_map.imp
src/games/agg/trie_map.imp

game_SOURCES = \
src/gambit.h \
Expand Down Expand Up @@ -682,7 +680,6 @@ gambit_SOURCES = \
src/labenski/include/wx/sheet/sheetsel.h \
src/labenski/include/wx/sheet/sheetspt.h \
src/labenski/include/wx/sheet/sheettbl.h \
src/labenski/include/wx/sheet/wx24defs.h \
src/labenski/include/wx/wxthings/block.h \
src/labenski/include/wx/wxthings/bmpcombo.h \
src/labenski/include/wx/wxthings/dropdown.h \
Expand Down
6 changes: 6 additions & 0 deletions contrib/scripts/games/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
These are some sketches of Python codes that implement certain common symmetric games
in pure Python rather than using the underlying C++ representation.

They are not currently maintained vis-a-vis the current pygambit implementation.
However, they are intended to be suggestive of how to provide codes to generate/implement
common games, with an aim to eventual integration as a pygambit feature.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __str__(self):
def __repr__(self):
return (
f"Mixed strategy profile on '{self.game.title}': "
f"{', '.join([ str(self[i]) for i in range(len(self)) ])}"
f"{', '.join([str(self[i]) for i in range(len(self))])}"
)

def __rmul__(self, fac):
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
api
78 changes: 39 additions & 39 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand All @@ -25,6 +23,9 @@
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive',
'sphinx_design',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -34,14 +35,14 @@
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8'
# source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'Gambit'
copyright = '1994-2023, The Gambit Project'
copyright = '1994-2023, The Gambit Project' # noqa

# 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 All @@ -54,40 +55,40 @@

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
#unused_docs = []
# unused_docs = []

# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = ['_build']

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.[
#modindex_common_prefix = []
# modindex_common_prefix = []


# -- Options for HTML output ---------------------------------------------------
Expand All @@ -99,26 +100,26 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -127,71 +128,70 @@

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_use_modindex = True
# html_use_modindex = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# html_show_sourcelink = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''

# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# html_file_suffix = ''

# Output file base name for HTML help builder.
htmlhelp_basename = 'Gambitdoc'


# -- Options for LaTeX output --------------------------------------------------

# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# latex_paper_size = 'letter'

# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# latex_font_size = '10pt'

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Gambit.tex', 'Gambit Documentation',
'The Gambit Project', 'manual'),
('index', 'Gambit.tex', 'Gambit Documentation',
'The Gambit Project', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# latex_preamble = ''

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_use_modindex = True
# latex_use_modindex = True
2 changes: 1 addition & 1 deletion doc/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Detailed table of contents
:maxdepth: 3

intro
gui
tools
pygambit
gui
samples
build
formats
Expand Down
Loading

0 comments on commit 28e6dcb

Please sign in to comment.