Skip to content
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

docs: Introduce the xDSL book #2465

Closed
wants to merge 14 commits into from
Closed

Conversation

Moxinilian
Copy link
Contributor

@Moxinilian Moxinilian commented Apr 16, 2024

This PR introduces a mdbook that should be used as an entry point for MLIR/xDSL newcomers. This is only an infrastructure setup, actual book content should be discussed later. For now, an example structure has been added for demonstration purposes.

This set up allows embedding Python code within the book. The CI has been updated to verify this Python code will run without error. How to use the infrastructure is detailed in the added book README.

Here is a screenshot of one of the pages, with dark theme enabled:

image

@Moxinilian Moxinilian added the documentation Improvements or additions to documentation label Apr 16, 2024
@Moxinilian Moxinilian self-assigned this Apr 16, 2024
@Moxinilian
Copy link
Contributor Author

I think after rewriting it would be nice to have a chapter about standard dialects, explaining their role and rationale, akin to how CIRCT does it.

Comment on lines 8 to 11
- [Dialects](ir/dialects.md)
- [Attributes](ir/attributes.md)
- [Regions](ir/regions.md)
- [Verifiers](ir/verifiers.md)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- [Dialects](ir/dialects.md)
- [Attributes](ir/attributes.md)
- [Regions](ir/regions.md)
- [Verifiers](ir/verifiers.md)
- [Attributes](ir/attributes.md)
- [Operations](ir/operations.md)
- [Regions](ir/regions.md)
- [Verifiers](ir/verifiers.md)
- [Dialects](ir/dialects.md)

Copy link
Member

Choose a reason for hiding this comment

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

Oh also Traits

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I feel like traits could be introduced later, after rewriting, in a re-visit to introduce more complex concepts like traits/interfaces. But maybe there is not enough material to do this.

Copy link
Member

Choose a reason for hiding this comment

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

Custom syntax also somewhere late

@Moxinilian Moxinilian marked this pull request as ready for review April 16, 2024 13:35
Comment on lines +55 to +58
for f in docs/book/**/*.py; do
echo "Running book code: '$f'";
python "$f";
done
Copy link
Member

Choose a reason for hiding this comment

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

can you please add this to make tests? this script should probably be running those tests also, but that's for another PR. Ideally test book.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure if this script is the best way to do this in the first place. With your Python build system experience, would you do it differently?

Copy link
Member

Choose a reason for hiding this comment

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

Actually why this format and not the way we have it in Toy, as just an extra project with source files and pytest tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you detail a bit more? The files that will be added will most likely not have the usual "list of functions" format used with pytest.

Copy link
Member

Choose a reason for hiding this comment

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

This is partially why I suggested moving the Toy tutorial. Even though it's not what we want to have in the book in the long run, it contains realistic snippets of code, and would immediately surface missing functionality.

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.77%. Comparing base (b93d7ad) to head (01d7446).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2465   +/-   ##
=======================================
  Coverage   89.77%   89.77%           
=======================================
  Files         350      350           
  Lines       42747    42747           
  Branches     6353     6353           
=======================================
  Hits        38376    38376           
  Misses       3434     3434           
  Partials      937      937           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@superlopuh superlopuh closed this Jun 27, 2024
@superlopuh superlopuh deleted the book branch June 27, 2024 09:21
@superlopuh
Copy link
Member

I'm sorry, I intended to delete my local branch, and it deleted both the local and remote branch for some reason

@superlopuh
Copy link
Member

I'm happy to reopen the PR, if you'd like me to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants