sci-oer / student-cli Goto Github PK
View Code? Open in Web Editor NEWThe Docker wrapper script to start and stop the oer container
Home Page: https://pypi.org/project/sci-oer/
License: GNU Affero General Public License v3.0
The Docker wrapper script to start and stop the oer container
Home Page: https://pypi.org/project/sci-oer/
License: GNU Affero General Public License v3.0
Describe the solution you'd like
Creating command documentation in the form of linux man pages is helpful to provide a full set of documentation to go along with the cli application. The man pages
is a predictable location to find documentation for a cli command for most terminal users.
These man pages should be auto installed when the package is installed.
https://www.pragmaticlinux.com/2021/01/create-a-man-page-for-your-own-program-or-script-with-pandoc/
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)please add the location of the configuration file to the output from "scioer status". Would really help with debugging.
Remove the test commands from the application.
I made a mistake and published the package to sci-oer
instead of scioer
. Because the names are so similar it can not be redeployed again with the other name.
The contents of the config file that is being uses is supposed to be printed in the info log but it looks like the dictionary is being printed wrong.
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
random_ports
== False
then any port not specified in the list must not be passed throughrandom_ports
== True
and the exposed ports are specified then the specified ports should override the random ports. **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:
Currenly the same error message is shown both if docker is not running and if the user does not have permissions to interact with docker. The 'fix' steps are different and should have different error messages associated with it
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.
start by default will build a new container but if it was not removed then it will fail to start because the name is already in use.
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:
~/.myConfig
or ~/.config/myApp/config
)when running a shell it says the username is I dont have a name
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.
lets not make it pull by default as students may not be on an internet connection that supports a pull.
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.
should print the version with the -v
and --version
flags
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
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:
Expected behavior
Front-end should be accessible immediately after running scioer start
Screenshots
What I saw after running scioer start the first time:
After running sudo chown logan CIS2430:
Desktop (please complete the following information):
the help command should include basic usage that the students will probably want
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?
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
/course
volume should be mountedAdditional context
Docker needs to be installed and running before this is started.
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.
The unit installed is sci-oer but the unit that must be run is scioer. Can we pick one?
When there is an unkown docker error it just prints unknown error
and does not print the message from the error without the debug level log.
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.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.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
pyproject.toml
setuptools >= 45
setuptools_scm >= 6.2
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
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 /.local/.cache` where it can persist while the machine is running but not between reboots).or
Describe the solution you'd like
This file should track information such as:
Describe alternatives you've considered
Instead of keeping track this information it could be dynamically obtained by invoking docker commands
make sure tilde gets expanded in the file paths
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:
chocolaty
(windows)apt
(debian / its derivitives)aur
(arch / its derivitives)dnf
(fedora)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.