Package: sci-oer
Student CLIWrapper script to help start and stop the sci-oer docker container.System Requirementspython 3.7 or later installedDocker must be installed and runningInstallationThe following sections cover the various methods to set up the sci-oer student cli.Installing from PyPI or GitHubpipcan be used to install scioer from the Python Package Index (PyPI).
It will also install the necessary Python libraries.# the latest stable versionpython3-mpip3installsci-oer# a specific version (e.g. 1.0.0)python3-mpip3installsci-oer==1.0.0Ifgitis installed, pip can also install the latest snapshot of the official
scioer source code repository on GitHub.# the latest snapshot of the official source code repository (requires git)python3-mpip3installgit+https://github.com/sci-oer/student-cli#egg=scioerWorking LocallyWhen working on the project itself, it is sometimes useful to set up a local development environment, where it is possible to directly run the CLI and the test suite, without building and installing a local package.For this, start by installinggitand any system-level dependencies mentioned inSystem Requirements. Then, clone the repository and change into the created directory:gitclonehttps://github.com/sci-oer/student-clicdstudent-cliOptionally, set up avirtual environment.Finally, if the necessary Python build, test and runtime libraries are not already installed on the environment (virtual or global), manually install them:pip3install.At this point, the environment is set up. To run the test suite, execute:python3-mpytestTo run the CLI directly, without building and installing a local package, execute:python3-mscioer[arguments]And to install scioer into the environment:pip3install.Creating a virtual environmentSetting up a virtual environment is an optional step.  Even so, installing
Python packages directly in the global environment is not generally advised.Instead, it is usual to first set up avirtual environment:# create virtual enviroment at <path>python-mvenv<path>Once set up, the virtual environment can be activated on the current shell
(more information in theofficial documentation).
Alternatively, the virtual environment can also be used directly, without
activation, by prefixing allpythonandpipinvocations with the
environment's bin directory.# Linux/macOS/BSDs (POSIX)<path>/bin/python[arguments]<path>/bin/pip[arguments]# Windows<path>\Scripts\python[arguments]<path>\Scripts\pip[arguments]The Command Line InterfaceThe complete list of commands and options can be found insci-oer --helpand in the man page, but the following topics cover the most common operations.Brackets[ ], parenthesis( ), less than/greater than< >and ellipsis...are used to describe, respectively, optional, required, positional and repeating elements.
Example commands are prefixed with a number sign#, which also serves to indicate that on Linux root permissions (or suitable group membership) may be required.The--verboseoption will print some extra information, like automatically made adjustments to user-provided settings.
And if there is a problem, the--debugflag will makesci-oeroutput more information to help identify its cause; be sure to include this when opening a new issue.Additional Documentation** TODO **Related projectssci-oer/base-resourceThe base open educational resource Docker image.sci-oer/java-resourcesci-oer/c-resourcesci-oer/mariadb-resourcesci-oer/automated-builderThecli toolandDocker imageto create customized versions of the base resource images.ContributingContributions are more than welcome on this project!
Check out the list ofissuesfor tasks that you want to try implementing.Check out theCONTRIBUTING.mdguide for more information about how to contribute to the project.Issues Getting SupportLike any software tool things go wrong and sometimes there are issues.
This section presents some common issues that can arise and solutions to resolve the issue.
If these topics are not able to help you resolve the issue feel free to open asupport request, and we be happy to help.I did some work in the container, and now I can't find my filesIf Any files that you edited in the/coursedirectory within the container will be saved to your computer in one of the following locations:~/Desktop/<container name>$XDG_DATA_HOME/scioer/<container name>$HOME/.local/share/scioer/<container name>Or it will be saved to the location that was specified through the config file or the cli flags that were specified when the container was started.If your file was not created under the/coursedirectory then make sure that you move it into that folderbeforethe container is stopped and removed, otherwise it will be permanently lost.Do not work on any of your files in the~directory from within the container those files will be lost when the container is recreated.Permission denied error when trying to edit the filesIf you are trying to access the files from your computer that you created or edited from within the container and are now getting permission denied errors.
When this happens it is likely because the container is running as a different user.
This can be checked by running the following commands:$id-u# This will print the user id of the current user501$id-g# This will print the group id of the current user20$ls-nd<pathtomount># The 3rd and 4th columns will be the user id and group id that own the filesdrwxr-xr-x14501204483Apr13:33.^^|||groupIdUserIdIf these do not match you cansudo chown -R <userId>:<groupId> <volume dir>to change the ownership of the files.
Then you will need to update the configuration ofsci-oerto launch the container as the correct user.I started the container and all of my work seems to be goneMake sure that you save all of your work in the/coursedirectory, so it can be saved to the persistent volume on your computer.
If you did not save it to the correct spot and the container has not yet been removed then you can still enter the container and move the files, so they can be saved.I went tolocalhost:3000, and it says there is no pageDid you double-check that the container is running?docker psIs3000the correct port?docker psordocker inspect <container name>