-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from compsys-progtools/sub_command
Sub command // major refactor.
- Loading branch information
Showing
43 changed files
with
1,787 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM mcr.microsoft.com/devcontainers/anaconda:0-3 | ||
|
||
# Copy environment.yml (if found) to a temp location so we update the environment. Also | ||
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. | ||
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ | ||
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ | ||
&& rm -rf /tmp/conda-tmp | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda | ||
{ | ||
"name": "Anaconda (Python 3)", | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ExecutableBookProject.myst-highlight", | ||
"vsls-contrib.codetour", | ||
"searKing.preview-vscode" | ||
] | ||
} | ||
}, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "pip install -r requirements.txt; pip install .", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This file copied into the container along with environment.yml* from the parent | ||
folder. This file is included to prevents the Dockerfile COPY instruction from | ||
failing if no environment.yml is found. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for more information: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# https://containers.dev/guide/dependabot | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
"$schema": "https://aka.ms/codetour-schema", | ||
"title": "overview", | ||
"steps": [ | ||
{ | ||
"title": "Where to start", | ||
"file": "setup.py", | ||
"description": "setuptools is a Python package for installing programs. This file `setup.py` is special that `pip` will look for. ", | ||
"line": 1 | ||
}, | ||
{ | ||
"title": "how it finds modules", | ||
"file": "setup.py", | ||
"description": "here it defines what to be installed, each of these refers to a folder with an `__init__.py` or a `.py` file. ", | ||
"line": 6 | ||
}, | ||
{ | ||
"title": "dependencies", | ||
"file": "setup.py", | ||
"description": "and here it defines the dependencies to install first", | ||
"line": 10 | ||
}, | ||
{ | ||
"title": "Console entry points, aka terminal commands", | ||
"file": "setup.py", | ||
"description": "this is what makes it have CLI programs available this says that the `cspt` command will be found in the `cspt/cli.py` file in the `cspt_cli` function. let's go look at that function next.", | ||
"line": 13 | ||
}, | ||
{ | ||
"title": "top group function", | ||
"file": "cspt/cli.py", | ||
"description": "This funciton is not very interesting, but it defines the entrypoint that uses the [click package](https://click.palletsprojects.com/en/8.1.x/commands/)", | ||
"line": 15 | ||
}, | ||
{ | ||
"title": "first subcommand", | ||
"file": "cspt/cli.py", | ||
"description": "these lines make the following function a sub command of the `cspt_cli` function's command (`cspt`)", | ||
"line": 23 | ||
}, | ||
{ | ||
"title": "another subcommand", | ||
"file": "cspt/cli.py", | ||
"description": "here in this function, it calls other functions provided in the library with a little bit of logic to parse the options. \n\nthen it uses `click`'s `echo` method to print the info to the terminal. ", | ||
"line": 59 | ||
}, | ||
{ | ||
"title": "tracing a function", | ||
"file": "cspt/cli.py", | ||
"description": "here it is not clear where this function comes from, but if we go to the top of the file, we can learn more. We will go there next. ", | ||
"line": 63 | ||
}, | ||
{ | ||
"title": "imported functions", | ||
"file": "cspt/cli.py", | ||
"description": "From here we see that the `fetch_to_checklist` is defined in the `tasktracking.py` let's go there next", | ||
"line": 10 | ||
}, | ||
{ | ||
"title": "a core function", | ||
"file": "cspt/tasktracking.py", | ||
"description": "here it is, this function takes in the date and assignment type", | ||
"line": 105 | ||
}, | ||
{ | ||
"title": "docstring", | ||
"file": "cspt/tasktracking.py", | ||
"description": "here you can see that this line is incomplete. If no one has yet, you could make a suggestion on the PR to fix it. ", | ||
"line": 113 | ||
}, | ||
{ | ||
"title": "requests", | ||
"file": "cspt/tasktracking.py", | ||
"description": "here is that line we talked about in class that fetches the course website. ", | ||
"line": 119 | ||
}, | ||
{ | ||
"title": "regex", | ||
"file": "cspt/tasktracking.py", | ||
"description": "the majority of the work this function does is use regular expressions do clean up the text", | ||
"line": 123 | ||
}, | ||
{ | ||
"title": "return", | ||
"file": "cspt/tasktracking.py", | ||
"description": "then it returns the actual text", | ||
"line": 126 | ||
}, | ||
{ | ||
"title": "shared variable", | ||
"file": "cspt/tasktracking.py", | ||
"description": "this main URL is used in a lot of places, so I made it a variable", | ||
"line": 117 | ||
}, | ||
{ | ||
"title": "imported variable", | ||
"file": "cspt/tasktracking.py", | ||
"description": "this variable is stored in the config.py file so that I only have to change it in one place, despite using it in many. ", | ||
"line": 7 | ||
}, | ||
{ | ||
"title": "variables to update each semester", | ||
"file": "cspt/config.py", | ||
"description": "This is what I have to update each semester", | ||
"line": 4 | ||
}, | ||
{ | ||
"title": "example options", | ||
"file": "cspt/cli.py", | ||
"description": "for this function, I wanted the options to be flags. ", | ||
"line": 26 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
recursive-include cspt/assets * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.