-
Notifications
You must be signed in to change notification settings - Fork 17
[Documentation]: Adding advanced tutorial and improvements to documentation #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…alth calculations
…o MesaMoneyModel and MoneyAgent to MesaMoneyAgent; update agent sets to MoneyAgentsConcise and MoneyAgentsNative.
…larsBase to AntDFBase for consistency
…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
…management functionality
…methods to use AgentSetSelector; enhance type annotations for clarity
…SetSelector definitions, and add __all__ for better module export
…tSetSelector to AgentSetSelector for clarity
…clarity, and enhance type annotations
…and values for improved agent set iteration
…hanced agent set iteration
…d improve handling of single values and iterables
… and improve key generation logic
…rror handling in the get method
…roved agent set selection and deduplication
… selection using _resolve_selector method
…ent sets and improve id recomputation logic
…or clarity and consistency
… and completeness
…al rules for clarity and detail
for more information, see https://pre-commit.ci
… environment setup
…o improving_documentation
for more information, see https://pre-commit.ci
| 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
Show autofix suggestion
Hide autofix suggestion
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 thegh-pagesbranch). - If you want extra caution, you could set
contents: writeonly for the deploy jobs, andcontents: readfor build, but it’s simpler and secure enough in this context to applycontents: writeat the workflow/workflow root (as both deploy jobs need it). - Place the permissions block right after the
name:(line 1) and beforeon:(line 3).
No new imports or definitions are necessary for this fix.
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Docs — Build & Preview | ||
| permissions: | ||
| contents: write | ||
|
|
||
| on: | ||
| push: |
| 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
Show autofix suggestion
Hide autofix suggestion
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
nameoron:), add apermissions: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, bothdeploy-mainanddeploy-preview. - The
buildjob should remain with only minimal permissions (contents: read), which is inherited from the root.
Required changes:
- Insert a
permissions:block withcontents: readat the top-level of the workflow, directly below thename(or just afteron:if that's more idiomatic). - In the
deploy-mainanddeploy-previewjobs, insert apermissions:block withcontents: writeto allow pages deployment. - No additional imports, methods, or dependencies are required for this fix.
-
Copy modified lines R3-R5 -
Copy modified lines R74-R75 -
Copy modified lines R91-R92
| @@ -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 } |
|
This PR shouldn’t be 300+ commits, right? |
This PR adds the advanced tutorial and introduces general improvement to the documentation. This PR must be merged into main after #172.