Closed luisfelipec95 closed 1 year ago
Thanks for this, @luisfelipec95. Remember to add end lines in files. You can see in what files here https://github.com/eduNEXT/tutor-contrib-edunext-distro/pull/48/files (with the red symbol)
By the way, you need to add tests for this; you can guide with https://github.com/eduNEXT/tutor-contrib-edunext-distro/tree/master/tests/distro/themes, but for merging this, I think is important to merge the ci for tests first #47, if not have the steps to run the test locally.
On the other hand, as @JuanDavidBuitrago said, we need to update the documentation and add this feature in the readme.
By the way, if you have questions, don't hesitate to ask.
Thanks @MaferMazu. Changes made
Hi @luisfelipec95
Please make a rebase over jdb/add_pipelines
branch and solve the issues. This allows you to run the quality tests.
Hello @luisfelipec95, you still need to add the end line in tests/distro/repository_validator/infrastructure/in_memory_package_repository.py and tutordistro/commands/repository_validator.py I have a question, why are we changing the "package" directory for a "share" one?
Hello @luisfelipec95, you still need to add the end line in tests/distro/repository_validator/infrastructure/in_memory_package_repository.py and tutordistro/commands/repository_validator.py I have a question, why are we changing the "package" directory for a "share" one?
Because some package functionalities are also used by repository_validator
Hi @luisfelipec95, can you rebase against master branch? Please
Hi @luisfelipec95, can you rebase against master branch? Please
Done
Hi @luisfelipec95, can you rebase against master branch? Please
Done
I had a problem when I try to test it. To reproduce:
1. Make a Tutor environment with v15.3.3 2. Run `git clone https://github.com/eduNEXT/tutor-contrib-edunext-distro.git` 3. Run `git checkout lfc/add-repo-validator-command-DS-535` 4. Install distro plugin `pip install tutor-contrib-edunext-distro` 5. Run `tutor plugins enable distro` 6. Find the error
[v15.3.3@distro-felipe-test] juan@juan-X712JA ~/Environment/distro-felipe-test $ tutor plugins enable distro Error applying action 'plugins:loaded:distro': func=<function discover_package.<locals>.load at 0x7ff2ad485510> contexts=['plugins']' ⚠️ Failed to enable plugin 'distro': No module named 'tutordistro.utils' Error applying action 'plugins:loaded:distro': func=<function discover_package.<locals>.load at 0x7ff2ad485510> contexts=['plugins']' Traceback (most recent call last): File "/home/juan/.local/bin/tutor", line 33, in <module> sys.exit(load_entry_point('tutor', 'console_scripts', 'tutor')()) File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/commands/cli.py", line 26, in main cli() # pylint: disable=no-value-for-parameter File "/home/juan/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/juan/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/juan/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/juan/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/juan/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/juan/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home/juan/.local/lib/python3.10/site-packages/click/decorators.py", line 38, in new_func return f(get_current_context().obj, *args, **kwargs) File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/commands/plugins.py", line 140, in enable plugins.load(plugin) File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/plugins/__init__.py", line 93, in load hooks.Actions.PLUGIN_LOADED(name).do() File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/core/hooks/actions.py", line 122, in do self.do_from_context(None, *args, **kwargs) File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/core/hooks/actions.py", line 141, in do_from_context callback.do( File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/core/hooks/actions.py", line 35, in do self.func(*args, **kwargs) File "/home/juan/.tvm/v15.3.3@distro-felipe-test/overhangio-tutor-679fe5f/tutor/plugins/v1.py", line 77, in load entrypoint.load() File "/home/juan/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2517, in load return self.resolve() File "/home/juan/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2523, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/home/juan/.local/lib/python3.10/site-packages/tutordistro/plugin.py", line 11, in <module> from tutordistro.commands.cli import distro File "/home/juan/.local/lib/python3.10/site-packages/tutordistro/commands/cli.py", line 7, in <module> from tutordistro.commands.enable_private_packages import enable_private_packages File "/home/juan/.local/lib/python3.10/site-packages/tutordistro/commands/enable_private_packages.py", line 13, in <module> from tutordistro.utils.packages import get_private_distro_packages ModuleNotFoundError: No module named 'tutordistro.utils'
@luisfelipec95, can you reproduce this in a new environment and let me know if you find the same problem?
problem solved, thanks
Description
This PR adds the command that checks that the git repositories in config.yml are valid:
tutor distro repository-validator
How to test
Run command:
tutor distro repository-validator