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

[guide] Remove ambiguity lib vs. executable #1649

Merged
merged 6 commits into from
Apr 26, 2024

Conversation

syl20bnr
Copy link
Member

@syl20bnr syl20bnr commented Apr 16, 2024

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Changes

This PR transforms the guide example into a regular Rust executable so that people following the Basic Workflow in the Burn book are not surprised that the guide source does not correspond to their project.

In order to maintain the possibility to use the guide source as a library like it is the case in the custom-renderer example, a lib.rs file is added with a comment at the top for users.

In order to maintain the possibility to execute the guide as a regular example the examples/guide.rs has been changed to simply call cargo. The downside is that a new executable has to be compiled.

Testing

cargo run --release --bin guide
cargo run --example guide
cargo run --example custom-renderer

@syl20bnr syl20bnr force-pushed the guide/remove-lib-vs-exec-ambiguity branch 2 times, most recently from 360b91d to 747531f Compare April 16, 2024 22:12
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.45%. Comparing base (6ae3926) to head (4da8c2f).
Report is 2 commits behind head on main.

❗ Current head 4da8c2f differs from pull request most recent head 7eb0f1a. Consider uploading reports for the commit 7eb0f1a to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1649   +/-   ##
=======================================
  Coverage   86.45%   86.45%           
=======================================
  Files         696      696           
  Lines       81236    81236           
=======================================
  Hits        70233    70233           
  Misses      11003    11003           

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

Copy link
Member

@louisfd louisfd left a comment

Choose a reason for hiding this comment

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

I have minor requests, otherwise looks good! Thanks for the change I think it will be much clearer

burn-book/src/basic-workflow/model.md Outdated Show resolved Hide resolved
burn-book/src/basic-workflow/model.md Outdated Show resolved Hide resolved
burn-book/src/basic-workflow/backend.md Show resolved Hide resolved
@syl20bnr syl20bnr force-pushed the guide/remove-lib-vs-exec-ambiguity branch from 747531f to 4e74593 Compare April 17, 2024 01:42
@syl20bnr syl20bnr force-pushed the guide/remove-lib-vs-exec-ambiguity branch from 1404cbe to c0c9a17 Compare April 26, 2024 17:30
syl20bnr and others added 4 commits April 26, 2024 13:31
This commit transforms the guide example into a regular Rust executable
so that people following the Basic Workflow in the Burn book are not
surprised that the guide source does not correspond to their project.

In order to maintain the possibility to use the guide source as a library
like it is the case in the custom-renderer example, a lib.rs file is
added with a comment at the top for users.

In order to maintain the possibility to execute the guide as a regular
example the examples/guide.rs has been changed to simply call cargo. The
downside is that a new executable has to be compiled.
Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

LGTM

@antimora antimora added the documentation Improvements or additions to documentation label Apr 26, 2024
burn-book/src/getting-started.md Outdated Show resolved Hide resolved
burn-book/src/getting-started.md Outdated Show resolved Hide resolved
burn-book/src/getting-started.md Outdated Show resolved Hide resolved
burn-book/src/basic-workflow/README.md Show resolved Hide resolved
@nathanielsimard nathanielsimard merged commit 1f8b5d3 into main Apr 26, 2024
13 checks passed
@nathanielsimard nathanielsimard deleted the guide/remove-lib-vs-exec-ambiguity branch April 26, 2024 19:42
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.

5 participants