Skip to content

Conversation

@adamamer20
Copy link
Member

@adamamer20 adamamer20 commented Sep 21, 2025

This PR adds the advanced tutorial and introduces general improvement to the documentation. This PR must be merged into main after #172.

…o MesaMoneyModel and MoneyAgent to MesaMoneyAgent; update agent sets to MoneyAgentsConcise and MoneyAgentsNative.
…rom AbstractAgentSet to AgentSet and adjust related documentation.
…r-agentsets-instead-of-list-in-agentsdf' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…-and-agentsetpolars-to-agentsetdf-for-clarity' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…-and-agentsetpolars-to-agentsetdf-for-clarity' of https://github.com/projectmesa/mesa-frames into 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf
…tSetRegistry and add contains method overloads
…methods to use AgentSetSelector; enhance type annotations for clarity
…SetSelector definitions, and add __all__ for better module export
…tSetSelector to AgentSetSelector for clarity
…d improve handling of single values and iterables
adamamer20 and others added 20 commits October 17, 2025 19:33
@adamamer20 adamamer20 modified the milestone: 0.2.0 Oct 28, 2025
@Ben-geo Ben-geo mentioned this pull request Dec 5, 2025
Base automatically changed from 146-enhancement-consider-using-a-key-based-structure-for-agentsets-instead-of-list-in-agentsdf to main December 8, 2025 18:40
Comment on lines +68 to +82
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with: { name: site, path: site }
- name: Deploy to GitHub Pages (main)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site
force_orphan: true

- name: Deploy to GitHub Pages
deploy-preview:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 4 days ago

To fix the problem, add an explicit permissions block at the top level of the workflow file (.github/workflows/docs-gh-pages.yml). This block configures the default token permissions for all jobs.

  • The minimal set of permissions required should be assigned. For docs deployments to GitHub Pages, the main required permission is contents: write (to push to the gh-pages branch).
  • If you want extra caution, you could set contents: write only for the deploy jobs, and contents: read for build, but it’s simpler and secure enough in this context to apply contents: write at the workflow/workflow root (as both deploy jobs need it).
  • Place the permissions block right after the name: (line 1) and before on: (line 3).

No new imports or definitions are necessary for this fix.


Suggested changeset 1
.github/workflows/docs-gh-pages.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/docs-gh-pages.yml b/.github/workflows/docs-gh-pages.yml
--- a/.github/workflows/docs-gh-pages.yml
+++ b/.github/workflows/docs-gh-pages.yml
@@ -1,4 +1,6 @@
 name: Docs — Build & Preview
+permissions:
+  contents: write
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Docs — Build & Preview
permissions:
contents: write

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines 83 to 100
needs: build
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with: { name: site, path: site }
- name: Deploy preview under subfolder
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site
force_orphan: true
destination_dir: preview/${{ github.head_ref || github.ref_name }}/${{ needs.build.outputs.short_sha }}
keep_files: true # keep previous previews
# DO NOT set force_orphan here
- name: Print preview URL
run: |

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 4 days ago

To resolve this issue, add a permissions block that explicitly grants only the minimal required permissions for each job, or set it at the workflow level if that suffices for all jobs. For GitHub Pages deployment using peaceiris/actions-gh-pages, only the contents: write permission is needed, while uploading artifacts and building docs typically require no write privileges.

  • At the root of the workflow (top-level, just under name or on:), add a permissions: block granting read-only access (contents: read) to all jobs by default.
  • For jobs that require write access (for example, jobs using peaceiris/actions-gh-pages), override at the job level with a more permissive block (e.g., contents: write)—namely, both deploy-main and deploy-preview.
  • The build job should remain with only minimal permissions (contents: read), which is inherited from the root.

Required changes:

  • Insert a permissions: block with contents: read at the top-level of the workflow, directly below the name (or just after on: if that's more idiomatic).
  • In the deploy-main and deploy-preview jobs, insert a permissions: block with contents: write to allow pages deployment.
  • No additional imports, methods, or dependencies are required for this fix.

Suggested changeset 1
.github/workflows/docs-gh-pages.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/docs-gh-pages.yml b/.github/workflows/docs-gh-pages.yml
--- a/.github/workflows/docs-gh-pages.yml
+++ b/.github/workflows/docs-gh-pages.yml
@@ -1,5 +1,8 @@
 name: Docs — Build & Preview
 
+permissions:
+  contents: read
+
 on:
   push:
     branches: [ main ]            # regular prod deploy
@@ -68,6 +71,8 @@
     needs: build
     if: github.event_name == 'push' && github.ref == 'refs/heads/main'
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
     steps:
       - uses: actions/download-artifact@v4
         with: { name: site, path: site }
@@ -83,6 +88,8 @@
     needs: build
     if: github.event_name == 'pull_request'
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
     steps:
       - uses: actions/download-artifact@v4
         with: { name: site, path: site }
EOF
@@ -1,5 +1,8 @@
name: Docs — Build & Preview

permissions:
contents: read

on:
push:
branches: [ main ] # regular prod deploy
@@ -68,6 +71,8 @@
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with: { name: site, path: site }
@@ -83,6 +88,8 @@
needs: build
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with: { name: site, path: site }
Copilot is powered by AI and may make mistakes. Always verify output.
@EwoutH
Copy link
Member

EwoutH commented Dec 8, 2025

This PR shouldn’t be 300+ commits, right?

@adamamer20
Copy link
Member Author

Closed in favour of
#187
#188
#189
#190

@adamamer20 adamamer20 closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants