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

Support loading Definitions from multiple modules in the pyproject.toml file #11439

Closed
bendnorman opened this issue Dec 30, 2022 · 2 comments
Closed

Comments

@bendnorman
Copy link

What's the use case?

I’m able to load multiple definitions from modules using the -m argument:

dagit -m module_1 -m module_2

It would be nice to be able to specify multiple modules in the pyproject.toml file so multiple modules can be loaded by just using the dagit command.

Ideas of implementation

I figure the end result could look like this:

[tool.dagster]
module_name = ["module_1", "module_2]

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@bendnorman
Copy link
Author

I'm happy to take a stab at this if a maintainer can point me in the right direction. Thanks!

schrockn pushed a commit that referenced this issue Sep 13, 2024
## Summary & Motivation

> Copied the same motivation that was stated back here, where it wasn't
proceeded further #12551

It would be nice to load multiple modules using pyproject.toml so users
don't have to type out all the modules they want to load using the CLI
command. See issue #11439
and discussion #11167.

I tried to add the recommendations mentioned here:
#12551 (comment)

## How I Tested These Changes
I added a new unit test in dagster_tests/cli_tests/test_toml_loading.py


## Changes:
### Add: Support for loading multiple modules from `pyproject.toml` in
Dagster (#4bad886)

-------------------------------------------------------------------------------------
* Updated documentation to include example of loading multiple modules
(`DagsterDevTabs.mdx`)
* Added `is_valid_modules_list` function to validate module lists in
`pyproject.toml` (`load_target.py`)
* Modified `get_origins_from_toml` to support loading multiple modules
from `pyproject.toml` (`load_target.py`)
* Added new test case `test_load_multiple_modules_from_toml` to verify
loading multiple modules (`test_toml_loading.py`)
* Created a new TOML test file `multiple_modules.toml` to simulate
loading multiple modules (`toml_tests/multiple_modules.toml`)
@bendnorman
Copy link
Author

This was closed by #22327!

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

No branches or pull requests

1 participant