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

Cleanup init and init_directory usage #1368

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

nnarayen
Copy link
Contributor

@nnarayen nnarayen commented Feb 5, 2025

🚀 What

Small followup from this PR:

  • Deprecates init, since it was only used in tests
  • Refactor tests to invoke init_directory directly, maintain coverage

💻 How

🔬 Testing

@nnarayen nnarayen force-pushed the nikhil/python-dx-init-cleanup branch from 96f800f to 350bdf6 Compare February 5, 2025 17:26
@@ -205,14 +205,14 @@ def image():
)
@click.option("-n", "--name", type=click.STRING)
@click.option(
"--python-configuration/--no-python-configuration",
"--python-config/--no-python-config",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nnarayen nnarayen force-pushed the nikhil/python-dx-init-cleanup branch from 350bdf6 to 63bae66 Compare February 5, 2025 17:29
assert spec.model_module_dir.exists()
assert spec.data_dir.exists()
assert spec.truss_dir == tmp_path
assert spec.config_path.exists()


def test_truss_init_with_data_file_and_requirements_file_and_bundled_packages(tmp_path):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mentioned in this PR, but this was the only use case of passing data_files / requirements_file / bundled_packages into init. Since no real code uses it, it's safe to delete the test while we delete init in favor of init_directory

@nnarayen nnarayen force-pushed the nikhil/python-dx-init-cleanup branch from 63bae66 to 170a4a4 Compare February 5, 2025 17:35
@nnarayen nnarayen merged commit aee0bd8 into main Feb 6, 2025
5 checks passed
@nnarayen nnarayen deleted the nikhil/python-dx-init-cleanup branch February 6, 2025 17:00
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.

2 participants