Skip to content

Commit

Permalink
testing update
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahim Rasool authored and Rahim Rasool committed Sep 21, 2022
2 parents 60c7611 + f53820c commit 3302923
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 8 deletions.
31 changes: 26 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Textbook: Data Science I
:toc: preamble

This repository contains the source materials, as well as the authoring and publishing tools, of the textbook of the University of Chicago course Data Science I.

Expand All @@ -22,20 +23,40 @@ If you're not sure, you can test for the presence of commands in your terminal a

=== Set-up

Set up your environment for textbook authoring by sourcing the repository's included Bash script:
Set up and check your environment for textbook authoring by sourcing the repository's included Bash script:

$ source setup

The `setup` script will guide you through installation of any further required libraries.

[TIP]
====
==== Troubleshooting set-up

===== Other shells

If you use a shell other than Bash, you may instead execute the following setup command directly:

./setup-install
$ ./setup-install

However, this command is unable to affect your active shell; to correct this, you may simply start a new shell.
====

===== Other situations

Set-up scripting attempts to guide authors in setting up their computers; however, your computer might vary considerably from expectations!

If you have both Docker and Python installed, the only further requirement is to install https://pypi.org/project/argcmdr/[argcmdr].

This may be achieved generally via `pip`, _e.g._:

$ pip install argcmdr

Then, the `manage` command should be available through your `PATH`:

$ which manage
/path/to/manage

`setup` performs the above on your behalf, attempting to correct for environmental variability.

Issues with `setup` and the above instructions may be https://github.com/chicago-cdac/textbook-datascience-1/issues[reported as Issues].


== Authoring content
Expand Down
8 changes: 6 additions & 2 deletions setup
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
./setup-install

if [ -x "$HOME/.local/bin/manage" ] && ! command -v manage > /dev/null; then
export PATH="$HOME/.local/bin:$PATH"
if ! command -v manage > /dev/null; then
if [ -x "$HOME/.local/bin/manage" ]; then
export PATH="$HOME/.local/bin:$PATH"
else
source "$HOME/.profile"
fi
fi
11 changes: 10 additions & 1 deletion setup-install
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,16 @@ manage_on_path() {
}

fix_manage_path() {
[ -x "$HOME/.local/bin/manage" ] && echo -e '\nexport PATH="$HOME/.local/bin:$PATH"' >> $HOME/.profile
local path_prefix

for path_prefix in ".local" "Library/Python/${PYTHON_EXE#python}"; do
if [ -x "$HOME/$path_prefix/bin/manage" ]; then
echo -e "\nexport PATH=\"\$HOME/$path_prefix/bin:\$PATH\"" >> "$HOME/.profile"
return 0
fi
done

return 1
}

require path \
Expand Down

0 comments on commit 3302923

Please sign in to comment.