Skip to content

Commit

Permalink
testing rename of package
Browse files Browse the repository at this point in the history
  • Loading branch information
sglyon committed Sep 21, 2021
1 parent ba80bd2 commit 4327d3f
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
- run: |
julia --project=docs -e '
using Documenter: doctest
using Games
doctest(Games)'
using GameTheory
doctest(GameTheory)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Games.jl package is licensed under the BSD-3 License. All rights reserved.
The GameTheory.jl package is licensed under the BSD-3 License. All rights reserved.

> Copyright (c) 2016: The QuantEcon team
>
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Games"
uuid = "d5cce6e7-4428-536b-a17f-94dfa0e3a07a"
repo = "https://github.com/QuantEcon/Games.jl.git"
name = "GameTheory"
uuid = "64a4ffa8-f47c-4a47-8dad-aee7aadc3b51"
repo = "https://github.com/QuantEcon/GameTheory.jl.git"
version = "0.1.0"

[deps]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Games

[![Build Status](https://github.com/QuantEcon/Games.jl/workflows/CI/badge.svg)](https://github.com/QuantEcon/Games.jl/actions/workflows/ci.yml)
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://QuantEcon.github.io/Games.jl/latest)
[![codecov](https://codecov.io/gh/QuantEcon/Games.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/QuantEcon/Games.jl)
[![Build Status](https://github.com/QuantEcon/GameTheory.jl/workflows/CI/badge.svg)](https://github.com/QuantEcon/GameTheory.jl/actions/workflows/ci.yml)
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://QuantEcon.github.io/GameTheory.jl/latest)
[![codecov](https://codecov.io/gh/QuantEcon/GameTheory.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/QuantEcon/GameTheory.jl)

Algorithms and data structures for game theory in Julia
8 changes: 4 additions & 4 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Games.jl Benchmarks
# GameTheory.jl Benchmarks

## Running the benchmark suite

Expand All @@ -9,12 +9,12 @@ using PkgBenchmark
```

As an example, let us run the benchmarks (defined in `benchmarks.jl`) and compare the performance changes for the two commits
[`68f3c4b`](https://github.com/QuantEcon/Games.jl/commit/68f3c4bef03554a00384350a047f1e95abd865df) (target)
[`68f3c4b`](https://github.com/QuantEcon/GameTheory.jl/commit/68f3c4bef03554a00384350a047f1e95abd865df) (target)
and
[`d6682de`](https://github.com/QuantEcon/Games.jl/commit/d6682deb9fdae6f16a89b17fbeee9061d763710a) (baseline):
[`d6682de`](https://github.com/QuantEcon/GameTheory.jl/commit/d6682deb9fdae6f16a89b17fbeee9061d763710a) (baseline):

```jl
jud = judge("Games", "68f3c4b", "d6682de")
jud = judge("GameTheory", "68f3c4b", "d6682de")
```

To show the results:
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Games
using Games.Generators
using GameTheory
using GameTheory.Generators
using BenchmarkTools

const SUITE = BenchmarkGroup()
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Generate docs automatically

To generate documentation for `Games.jl` locally, run
To generate documentation for `GameTheory.jl` locally, run

```
$ cd ~/.julia/v0.6/Games/docs
$ cd ~/.julia/v0.6/GameTheory/docs
$ julia make.jl
```

Expand All @@ -16,7 +16,7 @@ There are three parts to generate the documentation.

### auto_doc_gen.jl

Main part of documentation generation. It reads `src/Games.jl` to find
Main part of documentation generation. It reads `src/GameTheory.jl` to find
out all the source files (include the ones used in submodules), and then
write markdown files for each by the structure instructed by
`docs/build/Structure`, which will be utilized by "Documenter.jl" later.
Expand Down
14 changes: 7 additions & 7 deletions docs/auto_doc_gen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docs using `Documenter.jl`.
=#

path = replace(pathof(Games), "src/Games.jl" => "")
path = replace(pathof(GameTheory), "src/GameTheory.jl" => "")

# read the basic structures
order = SubString{String}[]
Expand All @@ -31,19 +31,19 @@ open(joinpath(path, "docs/Structure")) do f
end
end

modules = String["Games"]
# find all files used in Games.jl
modules = String["GameTheory"]
# find all files used in GameTheory.jl
re = r"include\(\"(.*)\.jl\"\)"
files = String[]

open(joinpath(path, "src/Games.jl")) do f
open(joinpath(path, "src/GameTheory.jl")) do f
for match in eachmatch(re, String(read(f)))
# check if it is a submodule
if occursin("/", match.captures[1])
submodule_path = match.captures[1]
submodule_dir, submodule_name = split(submodule_path, "/")
# add submodule name to modules
push!(modules, "Games.$submodule_name")
push!(modules, "GameTheory.$submodule_name")
# find all files used in submodules
open(joinpath(path, "src/$submodule_path.jl")) do f_submodule
for match_sub in eachmatch(re, String(read(f_submodule)))
Expand Down Expand Up @@ -116,9 +116,9 @@ for section_name in sections_names
section_name_lower = replace(lowercase(section_name), " " => "_")
section_file_list = join(map(i -> string("\"", i, ".jl\""),
section_files), ", ")
# include "Games.jl" in "Base Types and Methods"
# include "GameTheory.jl" in "Base Types and Methods"
if section_name == "Base Types and Methods"
section_file_list = string("\"Games.jl\", ", section_file_list)
section_file_list = string("\"GameTheory.jl\", ", section_file_list)
end
section_page = """
# [$section_name](@id $section_name_lower)
Expand Down
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using Documenter, Games
using Documenter, GameTheory

include("auto_doc_gen.jl")

makedocs(
modules = [Games],
modules = [GameTheory],
format = Documenter.HTML(prettyurls = false),
sitename = "Games.jl",
sitename = "GameTheory.jl",
pages = PAGES,
)

deploydocs(
repo = "github.com/QuantEcon/Games.jl.git",
repo = "github.com/QuantEcon/GameTheory.jl.git",
branch = "gh-pages",
target = "build",
deps = nothing,
Expand Down
14 changes: 7 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Games.jl
# GameTheory.jl

*Games.jl* is a [`Julia`](http://www.julialang.org) package about algorithms and data structures for Game Theory.
*GameTheory.jl* is a [`Julia`](http://www.julialang.org) package about algorithms and data structures for Game Theory.

## Installation

*Games.jl* is an unregistered package that is currently under development.
*GameTheory.jl* is an unregistered package that is currently under development.

To install the package, enter the Pkg mode by pressing `]` and run

```julia
add https://github.com/QuantEcon/Games.jl
add https://github.com/QuantEcon/GameTheory.jl
```

## Usage

Once installed, the `Games` package can be used by typing
Once installed, the `GameTheory` package can be used by typing

```@example 1
using Games
using GameTheory
```

The Base type `Player` can be created by passing a payoff matrix.
Expand All @@ -44,7 +44,7 @@ payoff_bimatrix[2, 2, :] = [2, 3]
g = NormalFormGame(payoff_bimatrix)
```

After constructing a `NormalFormGame`, we can find its Nash Equilibria by using methods of `Games`. For example, `pure_nash` finds all pure action Nash Equilibria by enumeration.
After constructing a `NormalFormGame`, we can find its Nash Equilibria by using methods of `GameTheory`. For example, `pure_nash` finds all pure action Nash Equilibria by enumeration.

```@example 1
pure_nash(g)
Expand Down
2 changes: 1 addition & 1 deletion src/Games.jl → src/GameTheory.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Games
module GameTheory

# stdlib
using LinearAlgebra, Random
Expand Down
2 changes: 1 addition & 1 deletion src/generators/Generators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Generators

using Random

using Games: Player, NormalFormGame
using GameTheory: Player, NormalFormGame

include("bimatrix_generators.jl")
export blotto_game, ranking_game, sgc_game, unit_vector_game, tournament_game
Expand Down
8 changes: 4 additions & 4 deletions src/normal_form_game.jl
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ Return true if `action_profile` is Pareto dominant for game `g`.
# is_dominated

"""
is_dominated(player, action; tol=1e-8, lp_solver=Games.clp_optimizer_silent)
is_dominated(player, action; tol=1e-8, lp_solver=GameTheory.clp_optimizer_silent)
Determine whether `action` is strictly dominated by some mixed action.
Expand All @@ -892,7 +892,7 @@ Determine whether `action` is strictly dominated by some mixed action.
- `tol::Real` : Tolerance level used in determining domination.
- `lp_solver` : Linear programming solver to be used internally. Pass a
`MathOptInterface.AbstractOptimizer` type (such as `Clp.Optimizer`) if no
option is needed, or a function (such as `Games.clp_optimizer_silent`) to
option is needed, or a function (such as `GameTheory.clp_optimizer_silent`) to
supply options.
# Returns
Expand Down Expand Up @@ -980,7 +980,7 @@ is_dominated(
# dominated_actions

"""
dominated_actions(player; tol=1e-8, lp_solver=Games.clp_optimizer_silent)
dominated_actions(player; tol=1e-8, lp_solver=GameTheory.clp_optimizer_silent)
Return a vector of actions that are strictly dominated by some mixed actions.
Expand All @@ -991,7 +991,7 @@ Return a vector of actions that are strictly dominated by some mixed actions.
- `lp_solver::Union{Type{<:MathOptInterface.AbstractOptimizer},Function}` :
Linear programming solver to be used internally. Pass a
`MathOptInterface.AbstractOptimizer` type (such as `Clp.Optimizer`) if no
option is needed, or a function (such as `Games.clp_optimizer_silent`) to
option is needed, or a function (such as `GameTheory.clp_optimizer_silent`) to
supply options.
# Returns
Expand Down
6 changes: 3 additions & 3 deletions src/repeated_game.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Given a constraint w ∈ W, this finds the worst possible payoff for agent i.
- `i::Int` : The player of interest.
- `lp_solver` : Linear programming solver to be used internally. Pass a
`MathOptInterface.AbstractOptimizer` type (such as `Clp.Optimizer`) if no
option is needed, or a function (such as `Games.clp_optimizer_silent`)
option is needed, or a function (such as `GameTheory.clp_optimizer_silent`)
to supply options.
Expand Down Expand Up @@ -330,7 +330,7 @@ worst_value_2(
outerapproximation(rpd; nH=32, tol=1e-8, maxiter=500, check_pure_nash=true,
verbose=false, nskipprint=50,
plib=default_library(2, Float64),
lp_solver=Games.clp_optimizer_silent)
lp_solver=GameTheory.clp_optimizer_silent)
Approximates the set of equilibrium values for a repeated game with the outer
hyperplane approximation described by Judd, Yeltekin, Conklin (2002).
Expand All @@ -352,7 +352,7 @@ hyperplane approximation described by Judd, Yeltekin, Conklin (2002).
docs for more info). By default, it chooses to use `Polyhedra.DefaultLibrary`.
- `lp_solver` : Linear programming solver to be used internally. Pass a
`MathOptInterface.AbstractOptimizer` type (such as `Clp.Optimizer`) if no
option is needed, or a function (such as `Games.clp_optimizer_silent`)
option is needed, or a function (such as `GameTheory.clp_optimizer_silent`)
to supply options.
# Returns
Expand Down
2 changes: 1 addition & 1 deletion src/util.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=
Utility functions used in Games.jl
Utility functions used in GameTheory.jl
=#

"""
Expand Down
4 changes: 2 additions & 2 deletions test/generators/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Games: pure_nash
using GameTheory: pure_nash
using QuantEcon: MVNSampler
using Games.Generators
using GameTheory.Generators

include("test_bimatrix_generators.jl")
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Games
using GameTheory
using Test

include("test_pure_nash.jl")
Expand Down
6 changes: 3 additions & 3 deletions test/test_repeated_game.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using CDDLib

# Tests construction of repeated game
rpd = RepeatedGame(nfg, 0.75)
C, H, Z = Games.initialize_sg_hpl(4, [0.0, 0.0], 1.0)
C, H, Z = GameTheory.initialize_sg_hpl(4, [0.0, 0.0], 1.0)

#
# Test various helper functions
Expand All @@ -27,7 +27,7 @@ using CDDLib
end

@testset "Testing unit circle function" begin
H = Games.unitcircle(4)
H = GameTheory.unitcircle(4)
points = [1.0 0.0
0.0 1.0
-1.0 0.0
Expand All @@ -37,7 +37,7 @@ using CDDLib
end

@testset "Testing subgradient and hyperplane level initialize" begin
C, H, Z = Games.initialize_sg_hpl(4, [0.0, 0.0], 1.0)
C, H, Z = GameTheory.initialize_sg_hpl(4, [0.0, 0.0], 1.0)

@test maximum(abs, C - ones(4)) < 1e-12
@test maximum(abs, H - Z') < 1e-12
Expand Down

2 comments on commit 4327d3f

@sglyon
Copy link
Member Author

@sglyon sglyon commented on 4327d3f Sep 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45284

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 4327d3fec5622baad967d218964819161ba24fab
git push origin v0.1.0

Please sign in to comment.