Skip to content

JOSS Tutorial Fixes#2708

Merged
tpike3 merged 1 commit intomesa:mainfrom
tpike3:JOSS_tutorial
Mar 11, 2025
Merged

JOSS Tutorial Fixes#2708
tpike3 merged 1 commit intomesa:mainfrom
tpike3:JOSS_tutorial

Conversation

@tpike3
Copy link
Copy Markdown
Member

@tpike3 tpike3 commented Mar 7, 2025

Summary

Updates for JOSS paper #2666

Motive

Per request

Implementation

  • update line lengths (to 79) in tutorials
  • edit intro tutorial per JOSS requests
  • edit visualization tutorial per JOSS request
  • remove pyprojoect.toml info about line-length being taken care of through ruff formatter
  • add .virtual documents to .gitignore
  • test_agent was reformatted due to pyproject.toml changes

Additional Notes

The line-length is not formatting in pyproject.toml as discussed here what I am confused about is why it is only identifying some issues on my computer (like 1) but lots of issues when the workflow starts.So I will need to dig into this

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2025

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 +1.8% [+1.1%, +2.5%] 🔵 -0.1% [-0.3%, +0.1%]
BoltzmannWealth large 🔵 +0.2% [-0.8%, +1.3%] 🔵 +0.9% [-0.9%, +2.7%]
Schelling small 🔵 -0.4% [-0.7%, -0.2%] 🔵 -0.9% [-1.6%, -0.4%]
Schelling large 🔵 +0.3% [-0.3%, +0.9%] 🔵 +0.6% [-1.5%, +3.0%]
WolfSheep small 🔵 -0.0% [-0.3%, +0.3%] 🔵 +0.1% [-0.2%, +0.4%]
WolfSheep large 🔵 -0.6% [-2.0%, +1.0%] 🔵 -0.8% [-2.5%, +1.2%]
BoidFlockers small 🔵 +0.2% [-0.6%, +1.0%] 🔵 +0.2% [+0.0%, +0.4%]
BoidFlockers large 🔵 -1.5% [-2.0%, -0.9%] 🔵 -0.4% [-0.8%, -0.0%]

@tpike3 tpike3 changed the title JOSS Intro Tutorial Fix JOSS Tutorial Fixes Mar 7, 2025
@tpike3 tpike3 added the docs Release notes label label Mar 7, 2025
@tpike3 tpike3 requested a review from EwoutH March 7, 2025 20:34
# Reminder to update mesa-examples if the value below is changed.
target-version = "py311"
extend-exclude = ["docs", "build"]
extend-exclude = ["build"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This addresses the large package size right? How much does it help?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you mean line-length or am I missing something?

This put docs through the ruff linter and formatter, but I also ignored a lot (see per-file-ignores)

To address the line-length across Mesa we need to add to E501 to [tool.ruff.lint] select and if we want to be compliant with pep 8 we would set the line-length to 79. I am trying to figure out why I am still get a discrepancy between the pre-commit on my machine and the pre-commit in github actions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry I confused this with another comment, you're right.

Personally I won't worry too much about this.

@EwoutH EwoutH requested a review from jofmi March 8, 2025 06:47
@EwoutH
Copy link
Copy Markdown
Member

EwoutH commented Mar 8, 2025

Thanks Tom!

@martibosch could you checkout the rendered docs and confirm this resolves your comments?

@tpike3 are @jofmi’s comments also addressed in this PR?

@tpike3
Copy link
Copy Markdown
Member Author

tpike3 commented Mar 8, 2025

Thanks Tom!

@martibosch could you checkout the rendered docs and confirm this resolves your comments?

@tpike3 are @jofmi’s comments also addressed in this PR?

I addressed all the comments on the checklist except the choose version, this seems to be a readthedocs default, but their documentation on it is not very clear. It was in the conf.py, adding to pull request

JOSS Intro Tutorial Fix

- update line lengths (to 79) in tutorials
- edit intro tutorial per JOSS requests
- edit visualization tutorial per JOSS request
- update pyproject.toml to autofix code cell lengths
- remove pyprojoect.toml spurious assumption about it being taken care of black formatting
- add .virtual documents to .gitignore
- test_agent was reformatted due to pyproject.toml changes
- remove upper left version switcher
- update email in pyproject.toml
@EwoutH
Copy link
Copy Markdown
Member

EwoutH commented Mar 8, 2025

It was added in this PR:

If it’s easier, we could also just reverse this commit: 8d1dd13

@tpike3
Copy link
Copy Markdown
Member Author

tpike3 commented Mar 9, 2025

It was added in this PR:

If it’s easier, we could also just reverse this commit: 8d1dd13

I removed yesterday and it was added to the PR. Every time I mess with the docs its like I have to relearn the whole process. Ohh well maybe this time it will stick. :)

Copy link
Copy Markdown
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

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

Sounds good, merge when you’re ready.

@tpike3 tpike3 merged commit 44308a8 into mesa:main Mar 11, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants