Skip to content

Commit

Permalink
chore: removed unnecessary code referring the 'private.txt' file
Browse files Browse the repository at this point in the history
  • Loading branch information
Asespinel committed Mar 27, 2024
1 parent 851cfc1 commit e30d8a8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions features/private_package_enabler.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Feature: Enable private packages
And There is a private package
When I write the command tutor distro enable-private-packages
Then Packages will be cloned into requirements folder
And Packages will be present in the file private.txt

@fixture.behave.tutor_root
Scenario: Add private package when the package has already been cloned
Expand All @@ -16,4 +15,3 @@ Feature: Enable private packages
And Private package has already been cloned
When I write the command tutor distro enable-private-packages and press yes
Then Packages will be cloned again into requirements folder
And Packages will be present in the file private.txt
9 changes: 0 additions & 9 deletions features/steps/private_package_enabler_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ def step_impl(context): # pylint: disable=function-redefined,missing-function-d
assert os.path.exists(path)


@then("Packages will be present in the file private.txt")
def step_impl(context): # pylint: disable=function-redefined,missing-function-docstring
distro_packages = get_private_distro_packages(context.scenario.config)
private_file = f"{context.scenario.tutor_root}/env/build/openedx/requirements/private.txt"
with open(private_file, mode="r", encoding="utf-8") as private_requirements_file:
for package in distro_packages.values():
assert package["name"] in private_requirements_file.read()


@given("There is a private package")
def step_impl(context): # pylint: disable=function-redefined,missing-function-docstring
eox_test = {
Expand Down
4 changes: 0 additions & 4 deletions tutordistro/commands/enable_private_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from tutor import config as tutor_config

from tutordistro.distro.packages.application.package_cloner import PackageCloner
from tutordistro.distro.packages.application.private_package_definer import PrivatePackageDefiner
from tutordistro.distro.packages.infrastructure.package_git_repository import PackageGitRepository
from tutordistro.utils.packages import get_private_distro_packages

Expand All @@ -30,7 +29,6 @@ def enable_private_packages():

repository = PackageGitRepository()
cloner = PackageCloner(repository=repository)
definer = PrivatePackageDefiner(repository=repository)

private_packages = get_private_distro_packages(config)
requirements_directory = f"{directory}/env/build/openedx/requirements/"
Expand All @@ -47,8 +45,6 @@ def enable_private_packages():
},
path=requirements_directory
)
definer(name=package["name"],
file_path=f"{requirements_directory}private.txt")

# Run tutor mounts add command for the package
subprocess.check_output(f"tutor mounts add {requirements_directory}{package['name']}", shell=True)
Expand Down

0 comments on commit e30d8a8

Please sign in to comment.