Skip to content

Commit

Permalink
Merge pull request #2852 from PrincetonUniversity/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
kmantel authored Dec 15, 2023
2 parents 424971b + 5a21b89 commit f062be4
Show file tree
Hide file tree
Showing 169 changed files with 84,750 additions and 6,396 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CodeQL"

on:
push:
branches: [ "master", "devel" ]
branches: [ "master", "devel", "codeql" ]
paths-ignore:
- 'docs/**'
pull_request:
Expand Down Expand Up @@ -33,18 +33,26 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 100

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Cache cleanup
shell: bash
run: |
$CODEQL_PYTHON -m pip cache info
$CODEQL_PYTHON -m pip cache purge
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
4 changes: 2 additions & 2 deletions .github/workflows/compare-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: 'Download docs artifacts'
id: docs-artifacts
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
(diff -r docs-base docs-head && echo 'No differences!' || true) | tee ./result.diff
- name: Post comment with docs diff
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
var fs = require('fs');
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/pnl-ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
# Matrix setup is a hacky way to include 'base' build in pull requests
# The entire matrix is set up and 'base' builds are pruned based
# on event name and final configuration (ubuntu, python3.7).
# on event name and final configuration (ubuntu, python3.11).
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-architecture: ['x64']
Expand All @@ -37,29 +37,29 @@ jobs:
pnl-version: 'base'
- os: windows-latest
pnl-version: 'base'
- python-version: '3.7'
pnl-version: 'base'
- python-version: '3.8'
pnl-version: 'base'
- python-version: '3.9'
pnl-version: 'base'
- python-version: '3.10'
pnl-version: 'base'
- python-version: '3.11'
pnl-version: 'base'

outputs:
on_master: ${{ steps.on_master.outputs.on-branch }}

steps:
# increased fetch-depth and tag checkout needed as in pnl-ci.yml
# Increased fetch-depth and tag checkout needed compared to pnl-ci.yml
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ matrix.pnl-version == 'head' }}
with:
fetch-depth: 200
ref: ${{ github.ref }}

- name: Checkout pull base
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ matrix.pnl-version == 'base' }}
with:
fetch-depth: 200
Expand All @@ -76,7 +76,7 @@ jobs:
branch: master

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Block python3.7.17 on macos. see:
# https://github.com/actions/setup-python/issues/682
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7]
python-version: [3.11]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -163,7 +163,7 @@ jobs:

steps:
- name: Checkout docs
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: gh-pages

Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/pnl-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: PsyNeuLink CI

on:
schedule:
- cron: "22 2 * * *"
push:
branches-ignore:
- 'dependabot/**'
Expand Down Expand Up @@ -52,6 +54,7 @@ jobs:
python-architecture: ['x64']
extra-args: ['']
os: [ubuntu, macos, windows]
version-restrict: ['']
include:
# code-coverage build on macos python 3.9
- python-version: '3.9'
Expand All @@ -78,11 +81,18 @@ jobs:
- python-version: '3.10'
os: macos
# pytest needs both '--benchmark-only' and '-m benchmark'
# The former fails the test if benchamrks cannot be enabled
# The former fails the test if benchmarks cannot be enabled
# (e.g. due to --dist setting)
# The latter works around a crash in pytest when collecting tests:
# https://github.com/ionelmc/pytest-benchmark/issues/243
extra-args: '-m benchmark --benchmark-enable --benchmark-only --benchmark-min-rounds=2 --benchmark-max-time=0.001 --benchmark-warmup=off -n0 --dist=no'

# add python 3.7 with deps restricted to min supported version
- python-version: '3.7'
python-architecture: 'x64'
os: ubuntu
version-restrict: 'min'

# add python 3.8 build on macos since 3.7 is broken
# https://github.com/actions/virtual-environments/issues/4230
- python-version: '3.8'
Expand All @@ -100,7 +110,7 @@ jobs:
# version string from versioneer (must have history to a prior tag);
# otherwise install fails due to circular dependency with modeci_mdf
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 200

Expand All @@ -110,11 +120,20 @@ jobs:
run: git fetch --tags origin master

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}

- name: Restrict version of direct dependencies
if: ${{ matrix.version-restrict == 'min' }}
shell: bash
run: |
sed -i '/^[^#]/s/>=/==/' *requirements.txt
git config user.name "github actions"
git config user.email "none"
git commit -a -m "Restrict version of direct dependencies to min"
- name: Get pip cache location
shell: bash
id: pip_cache
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
wheel: ${{ steps.create_dist.outputs.wheel }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
path: dist/

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
run: pip install dist/${{ needs.create-python-dist.outputs.sdist }}[dev]

- name: Get tests from the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
shell: bash
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
path: dist/

- name: Upload dist files to release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,4 @@ tests/*.pdf

/tests/mdf/*.json
/tests/mdf/*.yml
/Scripts/ScratchPad FIGURES/
2 changes: 1 addition & 1 deletion Scripts/Examples/Rumelhart Semantic Network.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
comp.add_backpropagation_learning_pathway(pathway=[rel_hidden, qual_out])
comp.add_backpropagation_learning_pathway(pathway=[rel_hidden, act_out])
comp.add_backpropagation_learning_pathway(pathway=[rep_in, rep_hidden, rel_hidden])
comp.show_graph(show_learning=True)
comp.show_graph()
Loading

0 comments on commit f062be4

Please sign in to comment.