Git Product home page Git Product logo

student-cli's People

Contributors

marshallasch avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

student-cli's Issues

Release to PyPi

Describe the solution you'd like

In order to reduce the number of manual tasks this should be added as a github pipeline to be run every time a new tag is created.

Describe alternatives you've considered

In addition to releasing on PyPi the package would ideally be released in several other locations as well:

  • brew package (mac)
  • chocolaty (windows)
  • apt (debian / its derivitives)
  • aur (arch / its derivitives)
  • dnf (fedora)
  • archive through a github release version

Add the ports specifications to the config file

The ports mappings that get forwarded to the container should should be specified in the config file.

ie:

ports:
  - 'host:container'
  - ....
random_ports: False

The default behaviour should be:

- '3000:3000' # wiki
- '8888:8888' # jupyter
- '8000:8000'  # lectues
- '2222:22' #ssh
  • if random_ports == False then any port not specified in the list must not be passed through
  • if random_ports == True and the exposed ports are specified then the specified ports should override the random ports. **
  • if random_ports == False and no ports are specified then no ports should be forwarded for the container

** = check how this works in docker

The status / about sub commands should list all the passed through ports.

Test the behaviour if:

  • another course is useing the same ports
  • another application is using the same ports

Bundle executable for Windows, Linux and macOS

Hi there, just wanted to thank you both @MarshallAsch and @judiMc for making this for us in CIS2430! Really appreciate having everything I need in one container that I can start/stop/remove.

I have a suggestion for the scioer python package. It appears that installing python and scioer with pip is bit of a hit-and-miss on different systems. How about instead of instructing students to install python + a pip package, scioer would be distributed as a binary for Windows, Linux, and macOS.

The executables could be built using a user-triggered github workflow with pyinstaller to create a github release, and students could run something like
wget https://github.com/sci-oer/student-cli/releases/latest/download/scioer && mv scioer /usr/bin (C:\Windows\System32 for windows users). The idea would be to avoid having to install/upgrade python or dealing with pip.

Load options by default from a config file

Describe the solution you'd like

Having to always specify a number of cli flags is very annoying, tedious, and it is easy to forget one and that can lead to issues.
To resolve this I propose adding support for configuration options that can be loaded from config files.

See: tiangolo/typer#86 and phha/click_config_file for some potential ideas on how to make that work by out of the box with Typer.

This should do the following:

  1. Load from the config file by default, the file should not have to be specified for it to be used
  2. The config file should be located in a well known location (such as ~/.myConfig or ~/.config/myApp/config)
  3. The cli flags should over ride any options specified in the config file
  4. A different config file should be specifiable
  5. An option to ignore the config file should be included
  6. An option to verify an existing config file should be included

Change default storage path to home

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

single custom port should forward the same port

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Default path for making the course folder may need to be changed

Is your feature request related to a problem? Please describe.

When installing the scioer student-cli some Windows 11 users were having issues when the student-cli was trying to create the folder in their Desktop. The issues were mostly related to permission as Windows 11 Desktop folder seems to be very connected to OneDrive (Win 11 may have two Desktop folders - 1 for OneDrive and 1 for local but I am not too sure). For some users, the student-cli was able to create the folder but it was never accessible through their Desktop folder but the user was able to cd into it and find the folder.

Describe the solution you'd like

The default path (which is the user's Desktop folder) may need to be changed to fix this. Even the Documents folder may not work as that it also connected to OneDrive

Describe alternatives you've considered
N/A

Additional context

Unfortunately, I do not have screenshots today but I will give the student cli a try on a Win 11 machine and post here

'scioer start' file permissions

Describe the bug
Upon running 'scioer start', cannot access front-end as the browser states that the connection was reset. Inspecting docker logs for the container reveals that there were permission issues with creating the required file structure. Turns out that the course folder was created with user/group ownership as root/root. Upon changing the user to logan, front-end became accessible. How can we avoid having to change permissions manually?

To Reproduce
Steps to reproduce the behavior:

  1. scioer config
  2. scioer start
  3. ls -la in the folder directory

Expected behavior
Front-end should be accessible immediately after running scioer start

Screenshots
What I saw after running scioer start the first time:
Screenshot from 2023-09-06 18-33-08

Checking docker logs:
Screenshot from 2023-09-11 18-31-22

Checking folder permissions:
Screenshot from 2023-09-11 18-15-40

After running sudo chown logan CIS2430:
Screenshot from 2023-09-11 18-21-29

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS x86_64
  • Browser: Firefox

message after scioer start

The message after scioer start is uninformative. Perhaps it could print out the login info for the wiki as students will need that and maybe the commands to start, stop, and shell so that students know what to do next?

Implement basic start command

Is your feature request related to a problem? Please describe.

The basic start command should wrap the docker run -d .... command to start the course specific educational resource.

The initial implementation does not need to accept any cli flags, only the name of the container that should be started.

The persistent storage location should be under ~/.local/share/sci-student (to later follow the $XDG_DATA_HOME spec) under *nix systems and FOLDERID_LocalAppData on windows.

See dirs-dev/directories-rs for some more information.

Describe the solution you'd like

  • The container should be started in detached mode
  • The /course volume should be mounted
  • The 'default' ports should be exposed (pass through)
  • Should check if the ports are in use before starting the container
  • Should check if the container is already running before starting

Additional context
Docker needs to be installed and running before this is started.

Check that docker is installed and running

Is your feature request related to a problem? Please describe.

To prevent issues trying to use the script it should first check to ensure that docker is installed, is running, and the current user has permissions to interact with the docker daemon.
This should also provide detailed error messages that provide clear instructions on how to fix the issues.

Describe alternatives you've considered

The check for docker being installed should also be apart of the pip install script.

progress on a 'start' command with a pull

If I issue a 'scioer start' command and the pull flag is enabled the only output is the word 'pull'. that is not informative. Should be at least a sentence that indicates it is pulling the latest version from the internet and that it might take a while. In the best of all possible worlds it would update with a progress bar.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency pyparsing to v3.1.2
  • chore(deps): update dependency pyyaml to v6.0.2
  • chore(deps): update dependency attrs to v23.2.0
  • chore(deps): update dependency colorlog to v6.8.2
  • chore(deps): update dependency pathspec to v0.12.1
  • chore(deps): update dependency typer to v0.12.3
  • chore(deps): update heinrichreimer/github-changelog-generator-action action to v2.4
  • chore(deps): update pypa/gh-action-pypi-publish action to v1.9.0
  • chore(deps): update actions/cache action to v4
  • chore(deps): update actions/setup-python action to v5
  • chore(deps): update dependency attrs to v24
  • chore(deps): update dependency docker to v7
  • chore(deps): update dependency packaging to v24
  • chore(deps): update dependency platformdirs to v4
  • chore(deps): update dependency pytest to v8
  • chore(deps): update dependency pytype to v2024
  • chore(deps): update release-drafter/release-drafter action to v6
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build-tests.yml
  • actions/checkout v4
  • actions/checkout v4
  • actions/setup-python v4
.github/workflows/create-release.yml
  • actions/checkout v4
  • actions/cache v3
  • heinrichreimer/github-changelog-generator-action v2.3
  • release-drafter/release-drafter v5
.github/workflows/deployment.yml
  • actions/setup-python v4
  • pypa/gh-action-pypi-publish v1.8.10
pep621
pyproject.toml
  • setuptools >= 45
  • setuptools_scm >= 6.2
pip_requirements
dev-requirements.txt
  • black ==23.3.0
  • packaging ==23.1
  • pytest ==7.4.1
  • wheel ==0.41.2
  • setuptools ==67.8.0
  • pytype ==2023.4.27
requirements.txt
  • PyYAML ==6.0.1
  • attrs ==23.1.0
  • click ==8.1.7
  • colorlog ==6.7.0
  • docker ==6.1.3
  • iniconfig ==2.0.0
  • mypy-extensions ==1.0.0
  • packaging ==23.1
  • pathspec ==0.11.2
  • platformdirs ==3.10.0
  • pluggy ==1.0.0
  • py ==1.11.0
  • pyparsing ==3.1.1
  • rich ==13.5.2
  • shellingham ==1.5.3
  • tomli ==2.0.1
  • typer ==0.9.0
  • typing_extensions ==4.7.1
  • pyreadline3 ==3.4.1

  • Check this box to trigger a request for Renovate to run again on this repository

Add support for keeping track of runtime information

Is your feature request related to a problem? Please describe.

The cli is meant to be be invoked multiple separate times to interact with the same docker resource.
A feature should be added so that the cli application will save some information about the docker containers it has started to a semi-persistent location (such as /.localor/.cache` where it can persist while the machine is running but not between reboots).

Describe the solution you'd like

This file should track information such as:

  • human friendly name to reference the container through cli invocations
  • the real docker container name
  • persistent file paths
  • forwarded port numbers
  • the real image that is being run

Describe alternatives you've considered

Instead of keeping track this information it could be dynamically obtained by invoking docker commands

Release to homebrew

Describe the solution you'd like

In order to reduce the number of manual tasks this should be added as a github pipeline to be run every time a new tag is created.

Describe alternatives you've considered

In addition to releasing on PyPi the package would ideally be released in several other locations as well:

  • `pypi #1
  • chocolaty (windows)
  • apt (debian / its derivitives)
  • aur (arch / its derivitives)
  • dnf (fedora)
  • archive through a github release version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.