Skip to content

Commit

Permalink
Merge branch 'master' into 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
krivit committed Oct 8, 2024
2 parents d140653 + 691c72d commit fae00be
Show file tree
Hide file tree
Showing 148 changed files with 1,294 additions and 896 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Rplots.pdf
^revdep$
^README.md$
^man-roxygen$
^CODE_OF_CONDUCT\.md$
55 changes: 42 additions & 13 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
# debug: compile package with -DDEBUG and -UNDEBUG
#
# covr: run in covr mode may be used with 'full' but probably not with others.
#
#
# Typical public, private, and release configurations are provided in the variables below.

on: [push, pull_request]

Expand All @@ -37,6 +40,21 @@ name: R-CMD-check
env:
PUBLIC: ''
PRIVATE: ''
PUBLIC_CONFIG: '{"config":[
{"os":"windows-latest", "r":"release", "timeout":360, "flags":"binaries"},
{"os":"macOS-latest", "r":"release", "timeout":360, "flags":"binaries, ubsan"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, ubsan, debug"},
{"os":"ubuntu-latest", "r":"devel", "timeout":360, "flags":"vignettes, remote"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, covr"}]}'
RELEASE_CONFIG: '{"config":[
{"os":"windows-latest", "r":"release", "timeout":360, "flags":"binaries, vignettes, remote, strict"},
{"os":"macOS-latest", "r":"release", "timeout":360, "flags":"binaries, ubsan, vignettes, remote, strict"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, ubsan, debug, strict"},
{"os":"ubuntu-latest", "r":"devel", "timeout":360, "flags":"vignettes, remote, strict"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, covr, strict"}]}'
PRIVATE_CONFIG: '{"config":[
{"os":"ubuntu-latest", "r":"release", "timeout":10, "flags":"none"}
]}'

jobs:
Set-Matrix-Private:
Expand Down Expand Up @@ -76,17 +94,10 @@ jobs:
run: |
if [[ "${{ env.IAM }}" == 'public' ]] # Public: full set.
then
config='{"config":[
{"os":"windows-latest", "r":"release", "timeout":360, "flags":"binaries, remote, vignettes, strict"},
{"os":"macOS-latest", "r":"release", "timeout":360, "flags":"binaries, ubsan, remote, vignettes, strict"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, ubsan, debug, strict"},
{"os":"ubuntu-latest", "r":"devel", "timeout":360, "flags":"vignettes, remote, strict"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, covr"}]}'
config='${{ env.RELEASE_CONFIG }}'
elif [[ "${{ env.FOUND_PUBLIC }}" != '0' ]] # Private with no public analogue: reduced set.
then
config='{"config":[
{"os":"ubuntu-latest", "r":"release", "timeout":10, "flags":"none"}
]}'
config='${{ env.PRIVATE_CONFIG }}'
else # Private with public analogue: no checking.
config=''
fi
Expand Down Expand Up @@ -123,7 +134,7 @@ jobs:
fi
shell: bash

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -148,6 +159,7 @@ jobs:
any::rcmdcheck
any::covr
any::V8
any::xml2
needs: |
check
coverage
Expand All @@ -169,7 +181,7 @@ jobs:

- name: Upload build results
if: contains(matrix.config.flags, 'binaries') && !failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-binaries
path: binaries
Expand Down Expand Up @@ -243,7 +255,7 @@ jobs:

- name: Upload check results
if: contains(matrix.config.flags, 'covr') == false && failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: |
Expand All @@ -257,5 +269,22 @@ jobs:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_FORCE_SUGGESTS_: ${{ runner.os != 'macOS' }} # Rmpi is not available on macOS.
ENABLE_statnet_TESTS: ${{ contains(matrix.config.flags, 'full') }}
run: covr::codecov(type=c("tests","examples"))
run: |
cov <- covr::package_coverage(
type=c("tests", "examples"),
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- name: Upload coverage results
if: contains(matrix.config.flags, 'covr')
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
126 changes: 126 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at contact@statnet.org.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
45 changes: 23 additions & 22 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tergm
Version: 4.2.0
Date: 2023-05-30
Version: 4.2.1
Date: 2024-10-08
Title: Fit, Simulate and Diagnose Models for Network Evolution Based on Exponential-Family Random Graph Models
Authors@R: c(
person(c("Pavel", "N."), "Krivitsky", role=c("aut","cre"), email="pavel@statnet.org", comment=c(ORCID="0000-0002-9101-3362")),
Expand All @@ -14,38 +14,39 @@ Authors@R: c(
person("Skye", "Bender-deMoll", role=c("ctb"), email="skyebend@skyeome.net"),
person("Li","Wang",role=c("ctb"),email="lxwang@gmail.com"),
person("Kirk","Li",role=c("ctb"),email="kirkli@uw.edu"),
person("Chad", "Klumb", role=c("ctb"), email="cklumb@gmail.com"))
person("Chad", "Klumb", role=c("ctb"), email="cklumb@gmail.com"),
person("Adrien", "Le Guillou", role=c("ctb"), email="git@aleguillou.org", comment=c(ORCID="0000-0002-4791-418X")))
Depends:
ergm (>= 4.5.0),
network (>= 1.18.0),
networkDynamic (>= 0.11.3)
ergm (>= 4.7.0),
network (>= 1.18.2),
networkDynamic (>= 0.11.4)
Imports:
robustbase (>= 0.95),
coda (>= 0.19-4.1),
statnet.common (>= 4.10.0),
ergm.multi (>= 0.2.1),
purrr (>= 1.0.2),
methods,
utils,
robustbase (>= 0.93.5),
coda (>= 0.19.2),
nlme (>= 3.1.139),
MASS (>= 7.3.51.4),
statnet.common (>= 4.9.0),
ergm.multi (>= 0.2.0),
purrr
nlme,
MASS
LinkingTo:
ergm
Suggests:
lattice (>= 0.20.38),
parallel,
rmarkdown (>= 1.12),
knitr (>= 1.22),
tibble,
testthat,
covr,
networkLite
rmarkdown (>= 2.28),
knitr (>= 1.48),
tibble (>= 3.2.1),
testthat (>= 3.2.1.1),
covr (>= 3.6.4),
networkLite (>= 1.0.5),
lattice,
parallel
BugReports: https://github.com/statnet/tergm/issues
Description: An integrated set of extensions to the 'ergm' package to analyze and simulate network evolution based on exponential-family random graph models (ERGM). 'tergm' is a part of the 'statnet' suite of packages for network analysis. See Krivitsky and Handcock (2014) <doi:10.1111/rssb.12014> and Carnegie, Krivitsky, Hunter, and Goodreau (2015) <doi:10.1080/10618600.2014.903087>.
License: GPL-3 + file LICENSE
URL: https://statnet.org
VignetteBuilder: rmarkdown, knitr
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2.9000
Roxygen: list(markdown = TRUE)
Config/testthat/parallel: true
Config/testthat/edition: 3
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Martina Morris, University of Washington

The 'statnet' development team

Copyright 2008-2023
Copyright 2008-2024
2 changes: 1 addition & 1 deletion R/InitErgmConstraint.hints.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# open source, and has the attribution requirements (GPL Section 7) at
# https://statnet.org/attribution .
#
# Copyright 2008-2023 Statnet Commons
# Copyright 2008-2024 Statnet Commons
################################################################################

#' @templateVar name discord
Expand Down
2 changes: 1 addition & 1 deletion R/InitErgmProposal.DynMLE.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# open source, and has the attribution requirements (GPL Section 7) at
# https://statnet.org/attribution .
#
# Copyright 2008-2023 Statnet Commons
# Copyright 2008-2024 Statnet Commons
################################################################################

#' @templateVar name staticDiscordTNT
Expand Down
8 changes: 4 additions & 4 deletions R/InitErgmProposal.DynMoME.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# open source, and has the attribution requirements (GPL Section 7) at
# https://statnet.org/attribution .
#
# Copyright 2008-2023 Statnet Commons
# Copyright 2008-2024 Statnet Commons
################################################################################

#' @templateVar name discordTNT
#' @aliases InitErgmProposal.discordTNT
#' @title Temperal TNT proposal
#' @description A temporal version of \code{\link[ergm:TNT-ergmProposal]{TNT}}, with approximately
#' code{discordance_fraction} of proposed toggles being made on the set of discordant dyads,
#' \code{discordance_fraction} of proposed toggles being made on the set of discordant dyads,
#' approximately \code{1 - discordance_fraction} of proposed toggles being TNT proposals from
#' network. The value of \code{discordance_fraction} can be set by the user as a proposal argument,
#' defaults to `0.5`.
Expand All @@ -32,7 +32,7 @@ InitErgmProposal.discordTNT <- function(arguments, nw, ...) {
#' @templateVar name discordBDStratTNT
#' @aliases InitErgmProposal.discordBDStratTNT
#' @title Temperal TNT proposal with degree bounds
#' @description A temporal version of \code{\link[ergm:ergm-proposals]{BDStratTNT}}. Within each
#' @description A temporal version of \code{\link[ergm:BDStratTNT-ergmProposal]{BDStratTNT}}. Within each
#' mixing type, approximately 50\% of proposed toggles are made on
#' dyads, and approximately 50\% of proposed toggles are
#' proposals from the network, all subject to the bounded degree
Expand All @@ -42,7 +42,7 @@ InitErgmProposal.discordTNT <- function(arguments, nw, ...) {
#'
#' arguments are the same as for \code{\link[ergm:BDStratTNT-ergmProposal]{BDStratTNT}},
#' and should be passed in via the \code{\link[ergm:bd-ergmConstraint]{bd}} and
#' code{\link[ergm:blocks-ergmConstraint]{blocks}} constraints and
#' \code{\link[ergm:blocks-ergmConstraint]{blocks}} constraints and
#' \code{\link[ergm:strat-ergmHint]{strat}} hint.
#' @template ergmProposal-general
NULL
Expand Down
Loading

0 comments on commit fae00be

Please sign in to comment.