Skip to content

Conversation

@mattem
Copy link
Contributor

@mattem mattem commented May 20, 2022

Initial example of using rules_py. Planning to add a Django example as that has more moving parts, but this is simple case, and provides an interactive ipython shell.

@mattem mattem requested a review from alexeagle May 20, 2022 21:13
@@ -0,0 +1,50 @@
workspace(name = "rules_py_ipython_example")
Copy link
Member

Choose a reason for hiding this comment

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

so far our convention in other Aspect rulesets has been that nested workspaces are under an e2e/ folder, and are just meant to protect us from bugs (minimal commenting and content)
User-facing examples are in the examples/ folder and rely on the root WORKSPACE file.

I know we've had a few different iterations on this. It's nice that you can just bazel test ... from the root here and cover all the examples

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then write_source_files doesn't conform to this?
https://github.com/aspect-build/bazel-examples/tree/main/write_source_files

It's nice that you can just bazel test ... from the root here

"here" being this repo, or the rule set? As a lot of the examples in this repo have their own WORKSAPCE etc, so bazel test ... at the root of this repo would kinda do nothing.

@@ -0,0 +1,3 @@
from IPython import start_ipython

start_ipython()
Copy link
Member

Choose a reason for hiding this comment

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

is it possible for a py_binary entrypoint to run ipython without having to add this shim?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No

@mattem mattem closed this May 25, 2022
@mattem
Copy link
Contributor Author

mattem commented May 25, 2022

If ts gazelle is in rules_ts, then this should be in the e2e folder too? #4

Not trying to nit pick, I'm just not understanding the separation with what is going / already in here and the intended use.

@alexeagle
Copy link
Member

let's chat about them - I'm sure we aren't consistent across rulesets. the bazel-examples repo is special since the whole thing is one big e2e - there are only nested WORKSPACEs

@mattem
Copy link
Contributor Author

mattem commented May 25, 2022

Reopened this in aspect-build/rules_py#28

@mattem mattem deleted the feat/rules_py_example branch August 3, 2022 13:55
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