From d4b734170490bfc5dfc7489d928b1390a2a198b0 Mon Sep 17 00:00:00 2001 From: Oliver Bonham-Carter Date: Wed, 8 Feb 2023 14:56:35 -0500 Subject: [PATCH] init --- .github/workflows/build.yml | 67 +-- README.md | 141 +---- config/gatorgrade.yml | 164 +----- dataanalysis/.flake8 | 5 - dataanalysis/.pylintrc | 425 --------------- dataanalysis/dataanalysis/__init__.py | 3 - dataanalysis/dataanalysis/main.py | 60 --- dataanalysis/dataanalysis/summarize.py | 59 --- dataanalysis/dataanalysis/transform.py | 37 -- dataanalysis/input/data.txt | 50 -- dataanalysis/poetry.lock | 689 ------------------------- dataanalysis/pyproject.toml | 37 -- dataanalysis/tests/__init__.py | 1 - dataanalysis/tests/test_summarize.py | 139 ----- dataanalysis/tests/test_transform.py | 25 - src/code.r | 48 ++ writing/reflection.md | 76 --- 17 files changed, 91 insertions(+), 1935 deletions(-) delete mode 100644 dataanalysis/.flake8 delete mode 100644 dataanalysis/.pylintrc delete mode 100644 dataanalysis/dataanalysis/__init__.py delete mode 100644 dataanalysis/dataanalysis/main.py delete mode 100644 dataanalysis/dataanalysis/summarize.py delete mode 100644 dataanalysis/dataanalysis/transform.py delete mode 100644 dataanalysis/input/data.txt delete mode 100644 dataanalysis/poetry.lock delete mode 100644 dataanalysis/pyproject.toml delete mode 100644 dataanalysis/tests/__init__.py delete mode 100644 dataanalysis/tests/test_summarize.py delete mode 100644 dataanalysis/tests/test_transform.py create mode 100644 src/code.r delete mode 100644 writing/reflection.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35c21da..e3e9ac3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,61 +27,20 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - # Run the mdl linting tool - # Refers to .mdlrc file in repository - - name: Run Markdown Linting - uses: actionshub/markdownlint@main - # Setup Python for the current language version - - name: Setup Python ${{ matrix.python-version }} - if: always() - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - # Install pip - - name: Install Pip - if: always() - run: | - pip install -U pip - # Install poetry - - name: Install Poetry - if: always() - uses: abatilo/actions-poetry@v2.0.0 - with: - poetry-version: 1.1.8 - # Run the Python program - - name: Run Python Program - if: always() - run: | - cd dataanalysis - poetry install - poetry run dataanalysis --data-file input/data.txt - # Run the black code formatter in checking mode - - name: Run Black Code Formatter - run: | - cd dataanalysis - poetry run task black - # Run the flake8 linting tool - - name: Run Flake8 Linting Tool - run: | - cd dataanalysis - poetry run task flake8 - # Run the pydocstyle linting tool - - name: Run Pydocstyle Linting Tool - run: | - cd dataanalysis - poetry run task pydocstyle - # Run the pylint linting tool - - name: Run Pylint Linting Tool - run: | - cd dataanalysis - poetry run task pylint - # Run the mypy type checking tool - - name: Run Pylint Linting Tool - run: | - cd dataanalysis - poetry run task mypy + # # Install pip + # - name: Install Pip + # if: always() + # run: | + # pip install -U pip + # # Install poetry + # - name: Install Poetry + # if: always() + # uses: abatilo/actions-poetry@v2.0.0 + # with: + # poetry-version: 1.1.8 # Run GatorGrader: see config/gatorgrade.yml - name: Run GatorGrader with GatorGrade + if: always() run: | - pipx install gatorgrade + pip install gatorgrade gatorgrade --config config/gatorgrade.yml diff --git a/README.md b/README.md index c47c600..f292346 100644 --- a/README.md +++ b/README.md @@ -1,136 +1,45 @@ # Data Analysis -## Assigned: Tuesday, October 18, 2022 +## Assigned: Thursday, 9 Feb 2023 -## Due: Tuesday, 1 November 2022 - -# Data Analysis +## Due: End of class ## Project Goals -This engineering effort invites you to extend your knowledge about the basics of data summarization to implement a program that can summarize a data set of real-world population records. After you finish the `dataanalysis` program it will compute the summary statistics (e.g., mean, median, and standard deviation) of population data from from 1970 until 2019\. As you enhance your technical skills, you will continue to program with tools such as VS Code and both the Python programming language and the Poetry package manager. Ultimately, your goal for this project is to create a program that can efficiently process real-world data about human population size. - -## Project Access - -You can access this assignment by clicking the link provided to you in Discord or in the course schedule. Once you click this link it will create a GitHub repository that you can clone to your computer. Specifically, you will need to use the `git clone` command to download the project from GitHub to your computer. Now you are ready to add source code and documentation to the project! - -## Expected Output - -This project invites you to implement a data summarization program called `dataanalysis`. The `dataanalysis` program takes as input a file of floating point values and computes summary statistics about the numbers. Before you continue to work on this assignment, please make sure that you understand the meaning of the data in this file. To accomplish this task, you should examine the discussion of this data set, including its visualization from 1970 until 2019, from the [Residential Population in Crawford County, PA](https://fred.stlouisfed.org/series/PACRAW0POP) from the [Federal Reserve Bank of St. Louis](https://fred.stlouisfed.org/). The main goal for this program is that it should summarize the population data for Crawford County, the county in which Allegheny College is located. Here is an excerpt from the `input/data.txt` file that contains the real-world population data values that the `dataanalysis` program must summarize: - -``` -1970-01-01,81.342 -1971-01-01,83.300 -1972-01-01,84.700 -1973-01-01,85.500 -1974-01-01,86.100 -1975-01-01,87.000 -1976-01-01,87.600 -1977-01-01,87.600 -1978-01-01,88.000 -1979-01-01,88.100 -1980-01-01,88.869 -``` - -Note: The data contains resident population count information between the years 1970 through 2019. - -As this example indicates, the numbers in this file are either strings, that should be interpreted as a date, or a floating-point value, that is a recording of a population estimate of people living in Crawford County. After you have studied and understood the structure of this file's contents, you are ready to install the project's dependencies with the command `poetry install` and then run it with the command `poetry run dataanalysis --data-file input/data.txt`. After you running the program you can use its output and the data visualization available from the Federal Reserve Bank of St. Louis to better understand the population trends for Crawford County. Finally, it is worth noting that the numerical output from the `dataanalysis` program contains four properly indented floating-point values that are always rounded to two decimal places. - -``` -📦 The data file contains 50 data values in it! - -🚀 Let's do some sophisticated data analysis! - -🧮 Here are the results of the data analysis: - - The computed mean is 87.80! - The computed median is 88.05! - - The computed variance is 3.69! - The computed standard deviation is 1.92! - -💡 What does this tell you about the population of this county? -``` - +* To learn how to edit and run code from R. +* To gain experience working with specific types of code syntax. -``` -Don't forget that if you want to run the `dataanalysis` you must use your -terminal to first go into the GitHub repository containing this project and -then go into the `dataanalysis` directory that contains the project's code. -Finally, remember that before running the program you must run `poetry -install` to add the dependencies. -``` +## Project Code -## Adding Functionality - -If you study the file `dataanalysis/dataanalysis/main.py` you will see that it has many `TODO` markers that designate the parts of the program that you need to implement before `dataanalysis` will produce the correct output. If you run the provided test suite with the command `poetry run task test` or you try to run the program with the command `poetry run dataanalysis --data-file input/data.txt` you will see an error message in your terminal window. This is due to the fact that there are key parts of this program that are missing! In addition to implementing the program's `main` function you also need to correctly `import` the correct modules and objects, like `typer`. Along with adding command-line features to the `main` function in the `main` module, you need to provide an implementation of the following functions: - -- `def compute_mean(numbers: List[float]) -> float` -- `def compute_median(numbers: List[float]) -> float` -- `def compute_difference(numbers: List[float]) -> List[float]` -- `def compute_variance(numbers: List[float]) -> float` -- `def compute_standard_deviation(numbers: List[float]) -> float` - -It is worth noting that, when appropriate, one of the aforementioned functions can call another function. For instance, the `compute_standard_deviation` can call the `compute_variance`, thereby reusing its code and avoiding unnecessary code duplication. In summary, you must follow all of the instructions next to the `TODO` markers in the provided source code to implement a program that can correctly compute the arithmetic mean of the provided data values in the `dataanalysis/input/data.txt` file. In addition to ensuring that your program is adequately documented, has the correct industry-standard format, and adheres to the industry best practices Python programming, you must implement functions that pass a provided Pytest test suite. - -If you look in the files called `test_transform.py` and `test_summarize.py` you will find the test suites for the `transform` and `summarize` modules. As you complete your implementation of `dataanalysis` you should repeatedly run these tests, as explained in the next subsection, to confirm that your program's functions are working correctly. Your program should both produce the correct output and the pass the test suite! - -## Running Checks - -If you study the source code in the `pyproject.toml` file you will see that it includes the following section section of tasks that use [taskipy](https://github.com/illBeRoy/taskipy): - -```toml -[tool.taskipy.tasks] -black = { cmd = "black dataanalysis tests --check", help = "Run the black checks for source code format" } -flake8 = { cmd = "flake8 dataanalysis tests", help = "Run the flake8 checks for source code documentation" } -mypy = { cmd = "poetry run mypy dataanalysis", help = "Run the mypy type checker for potential type errors" } -pydocstyle = { cmd = "pydocstyle dataanalysis tests", help = "Run the pydocstyle checks for source code documentation" } -pylint = { cmd = "pylint dataanalysis tests", help = "Run the pylint checks for source code documentation" } -test = { cmd = "pytest -x -s", help = "Run the pytest test suite" } -test-silent = { cmd = "pytest -x --show-capture=no", help = "Run the pytest test suite without showing output" } -all = "task black && task flake8 && task pydocstyle && task pylint && task mypy && task test" -lint = "task black && task flake8 && task pydocstyle && task pylint" -``` - -This section makes it easy to run commands like `poetry run task lint` to automatically run all of the linters designed to check the Python source code in your program and its test suite. You can also use the command `poetry run task black` to confirm that your source code adheres to the industry-standard format defined by the `black` tool. If it does not adhere to the standard then you can run the command `poetry run black dataanalysis tests` and it will automatically reformat the source code. - -You can also run commands like `poetry run task lint` to automatically run all of the linters designed to check the Python source code in your program and its test suite. - -If `gradle grade` shows that all checks pass, you will know that you made progress towards correctly implementing and writing about `dataanalysis`. If your program has all of the anticipated functionality, you can run the command `poetry run task test` and see that the test suite produces output like the following. It is important to note that `dataanalysis` comes with two test suites, both of which should pass so as to establish a confidence in the correctness of the program. - -``` -collected 13 items - -tests/test_summarize.py ........... -tests/test_transform.py .. -``` +Please address the TODO's in the source code file, `src/code.r`. +## Project Assessment -``` -Don't forget that when you commit source code or technical writing to your -GitHub repository for this project, it will trigger the run of a GitHub -Actions workflow. If you are a student at Allegheny College, then running -this workflow consumes build minutes for the course's organization! As such, -you should only commit to your repository once you have made substantive -changes to your project and you are ready to confirm its correctness. Before -you commit to your repository, you can still run checks on your own computer -by either using Poetry or Docker and GatorGrader. -``` +This is a check mark grade. -## Project Reflection +## GatorGrade -Once you have finished both of the previous technical tasks, you can use a text editor to answer all of the questions in the `writing/reflection.md` file. For instance, you should provide the output of the Python program in a fenced code block, explain the meaning of the Python source code segments that you implemented, and answer all of the other questions about your experiences in completing this project. The reflection's objective is to invite you to explain the Python functions for data summarization and transformation. As part of this project's reflection you should also consider what technical skills taught in the field of computer science will continue to be the most relevant in the future. +You can check the baseline writing and commit requirements for this lab assignment by running department's assignment checking `gatorgrade` tool. To use `gatorgrade`, you first need to make sure you have Python3 installed (type `python --version` to check). If you do not have Python installed, please see: -## Project Assessment +- [Setting Up Python on Windows](https://realpython.com/lessons/python-windows-setup/) +- [Python 3 Installation and Setup Guide](https://realpython.com/installing-python/) +- [How to Install Python 3 and Set Up a Local Programming Environment on Windows 10](https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-windows-10) -The grade that a student receives on this assignment will have the following components. +Then, if you have not done so already, you need to install `gatorgrade`: -- **GitHub Actions CI Build Status [up to 50%]:**: For the lab01 repository associated with this assignment students will receive a checkmark grade if their last before-the-deadline build passes. This is only checking some baseline writing and commit requirements as well as correct running of the program. An additional reduction will given if the commit log shows a cluster of commits at the end clearly used just to pass this requirement. An addition reduction will also be given if there is no commit during lab work times. All other requirements are evaluated manually. +- First, [install `pipx`](https://pypa.github.io/pipx/installation/) +- Then, install `gatorgrade` with `pipx install gatorgrade` -- **Mastery of Technical Writing [up to 25%]:**: Students will also receive a checkmark grade when the responses to the writing questions presented in the `reflection.md` reveal a proficiency of both writing skills and technical knowledge. To receive a checkmark grade, the submitted writing should have correct spelling, grammar, and punctuation in addition to following the rules of Markdown and providing conceptually and technically accurate answers. +Finally, you can run `gatorgrade`: -- **Mastery of Technical Knowledge and Skills [up to 25%]**: Students will receive a portion of their assignment grade when their program implementation reveals that they have mastered all of the technical knowledge and skills developed during the completion of this assignment. As a part of this grade, the instructor will assess aspects of the programming including, but not limited to, the completeness and the correctness of the program and the use of effective source code comments. +`gatorgrade --config config/gatorgrade.yml` ## Seeking Assistance -Students who have questions about this project outside of the lab time are invited to ask them in the course's Discord channel or during instructor's or TLs' office hours. +* Extra resources for using markdown include; + + [Markdown Tidbits](https://www.youtube.com/watch?v=cdJEUAy5IyA) + + [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) +* Do not forget to use the above git commands to push your work to the cloud for the instructor to grade your assignment. You can go to your GitHub repository using your browser to verify that your files have been submitted. Please see the TL’s or the instructor if you have any questions about assignment submission. + +Students who have questions about this project outside of the lab time are invited +to ask them in the course's Discord channel or during instructor's or TL's office hours. diff --git a/config/gatorgrade.yml b/config/gatorgrade.yml index 3519c7c..d93e38c 100644 --- a/config/gatorgrade.yml +++ b/config/gatorgrade.yml @@ -1,99 +1,6 @@ -# --> check the Python program -- dataanalysis/dataanalysis/main.py: - - description: Ensure that main.py file exists in the dataanalysis/dataanalysis/ directory - check: ConfirmFileExists - - description: Complete all TODOs and remove the TODO markers in the main.py - check: MatchFileFragment - options: - fragment: TODO - count: 0 - exact: true - - description: Call the 'transform_string_to_number_list' function in the main.py - check: MatchFileFragment - options: - fragment: "transform.transform_string_to_number_list" - count: 1 - exact: true - - description: Call the 'compute_mean' function in the main.py - check: MatchFileFragment - options: - fragment: "summarize.compute_mean" - count: 1 - exact: true - - description: Create a sufficient number of docstring (i.e., multiple-line) comments in the main.py - check: CountMultipleLineComments - options: - language: "Python" - count: 2 - exact: false - - description: Create a sufficient number of single-line comments in the main.py - check: CountSingleLineComments - options: - language: "Python" - count: 4 - exact: false - -# --> check the Python program -- dataanalysis/dataanalysis/summarize.py: - - description: Ensure that summarize.py file exists in the dataanalysis/dataanalysis/ directory - check: ConfirmFileExists - - description: Complete all TODOs and remove the TODO markers in the summarize.py - check: MatchFileFragment - options: - fragment: TODO - count: 0 - exact: true - - description: Include exactly four float return types as '-> float' in the summarize.py - check: MatchFileFragment - options: - fragment: "-> float" - count: 4 - exact: true - - description: Include exactly six lists of floats as 'List[float]' in the summarize.py - check: MatchFileFragment - options: - fragment: "List[float]" - count: 6 - exact: true - - description: Include one import statement to import List as 'from typing import List' in the summarize.py - check: MatchFileFragment - options: - fragment: "from typing import List" - count: 1 - exact: true - - description: Create a sufficient number of docstring (i.e., multiple-line) comments in the summarize.py - check: CountMultipleLineComments - options: - language: "Python" - count: 2 - exact: false - - description: Create a sufficient number of single-line comments in the summarize.py - check: CountSingleLineComments - options: - language: "Python" - count: 5 - exact: false - -# --> check the Python program -- dataanalysis/dataanalysis/transform.py: - - description: Ensure that transform.py file exists in the dataanalysis/dataanalysis/ directory - check: ConfirmFileExists - - description: Complete all TODOs and remove the TODO markers in the transform.py - check: MatchFileFragment - options: - fragment: TODO - count: 0 - exact: true - - description: Create a sufficient number of docstring (i.e., multiple-line) comments in the transform.py - check: CountMultipleLineComments - options: - language: "Python" - count: 2 - exact: false - -# --> check the Python program -- dataanalysis/tests/test_summarize.py: - - description: Ensure that test_summarize.py file exists in the dataanalysis/tests/ directory +# --> check the R program +- src/code.r: + - description: Ensure that test_summarize.py file exists in the act3/src/code.r directory check: ConfirmFileExists - description: Complete all TODOs and remove the TODO markers in the test_summarize.py check: MatchFileFragment @@ -101,71 +8,10 @@ fragment: TODO count: 0 exact: true - - description: Create a sufficient number of docstring (i.e., multiple-line) comments in the test_summarize.py - check: CountMultipleLineComments - options: - language: "Python" - count: 5 - exact: false -# --> check the Python program -- dataanalysis/tests/test_transform.py: - - description: Ensure that test_transform.py file exists in the dataanalysis/tests/ directory - check: ConfirmFileExists - - description: Complete all TODOs and remove the TODO markers in the test_transform.py - check: MatchFileFragment - options: - fragment: TODO - count: 0 - exact: true - - description: Create a sufficient number of docstring (i.e., multiple-line) comments in the test_transform.py - check: CountMultipleLineComments - options: - language: "Python" - count: 3 - exact: false -# --> check the technical writing for various characteristics -- writing/reflection.md: - - description: Ensure that the reflection.md file exists in the writing/ directory - check: ConfirmFileExists - - description: Complete all TODOs, remove the TODO markers, and rewrite comments for reflection.md - check: MatchFileFragment - options: - fragment: TODO - count: 0 - exact: true - - description: Delete the 'Add Your Name Here' prompt in the reflection file - check: MatchFileFragment - options: - fragment: "Add Your Name Here" - count: 0 - exact: true - - description: Write a minimum number of meaningful words in the reflection - check: CountFileWords - options: - count: 500 - exact: false - - description: Confirm that the markdown file has the correct number of headers - check: CountMarkdownTags - options: - tag: heading - count: 14 - exact: false - - description: Confirm that the markdown file has the correct number of code blocks - check: CountMarkdownTags - options: - tag: code - count: 5 - exact: false - - description: Confirm that the markdown file has the correct number of fenced code blocks - check: CountMarkdownTags - options: - tag: code_block - count: 6 - exact: false # --> check that the number of commits in the Git repository is beyond a threshold -- description: Have at least a specific minimum number of commits (5) in repository +- description: Have at least a specific minimum number of commits (3) in repository check: CountCommits options: - count: 5 + count: 3 diff --git a/dataanalysis/.flake8 b/dataanalysis/.flake8 deleted file mode 100644 index c321e71..0000000 --- a/dataanalysis/.flake8 +++ /dev/null @@ -1,5 +0,0 @@ -[flake8] -ignore = E203, E266, E501, W503 -max-line-length = 80 -max-complexity = 18 -select = B,C,E,F,W,T4,B9 diff --git a/dataanalysis/.pylintrc b/dataanalysis/.pylintrc deleted file mode 100644 index 73b960c..0000000 --- a/dataanalysis/.pylintrc +++ /dev/null @@ -1,425 +0,0 @@ -[MASTER] - -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code -extension-pkg-whitelist= - -# Add files or directories to the blacklist. They should be base names, not -# paths. -ignore=CVS - -# Add files or directories matching the regex patterns to the blacklist. The -# regex matches against base names, not paths. -ignore-patterns= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Use multiple processes to speed up Pylint. -jobs=4 - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins= - -# Pickle collected data for later comparisons. -persistent=yes - -# Specify a configuration file. -#rcfile= - -# Allow loading of arbitrary C extensions. Extensions are imported into the -# active Python interpreter and may run arbitrary code. -unsafe-load-any-extension=no - - -[MESSAGES CONTROL] - -# Only show warnings with the listed confidence levels. Leave empty to show -# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED -confidence=HIGH - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once).You can also use "--disable=all" to -# disable everything first and then re-enable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use"--disable=all --enable=classes -# --disable=W" -disable=invalid-name,import-error,no-name-in-module,no-absolute-import,suppressed-message,locally-disabled,logging-fstring-interpolation -# disable=all - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). See also the "--disable" option for examples. -enable= - -[REPORTS] - -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectively contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Template used to display messages. This is a python new-style format string -# used to format the message information. See doc for all details -#msg-template= - -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio).You can also give a reporter class, eg -# mypackage.mymodule.MyReporterClass. -output-format=text - -# Tells whether to display a full report or only the messages -reports=no - -# Activate the evaluation score. -score=yes - - -[REFACTORING] - -# Maximum number of nested blocks for function / method body -max-nested-blocks=5 - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME,XXX,TODO - - -[LOGGING] - -# Logging modules to check that the string format arguments are in logging -# function parameter format -logging-modules=logging - - -[BASIC] - -# Naming hint for argument names -argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct argument names -argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Naming hint for attribute names -attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct attribute names -attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata - -# Naming hint for class attribute names -class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - -# Regular expression matching correct class attribute names -class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - -# Naming hint for class names -class-name-hint=[A-Z_][a-zA-Z0-9]+$ - -# Regular expression matching correct class names -class-rgx=[A-Z_][a-zA-Z0-9]+$ - -# Naming hint for constant names -const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Regular expression matching correct constant names -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Minimum line length for functions/classes that require docstrings, shorter -# ones are exempt. -docstring-min-length=-1 - -# Naming hint for function names -function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct function names -function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Good variable names which should always be accepted, separated by a comma -good-names=i,j,k,ex,_ - -# Include a hint for the correct naming format with invalid-name -include-naming-hint=yes - -# Naming hint for inline iteration names -inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ - -# Regular expression matching correct inline iteration names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ - -# Naming hint for method names -method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct method names -method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Naming hint for module names -module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Regular expression matching correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Colon-delimited sets of names that determine each other's naming style when -# the name regexes allow several styles. -name-group= - -# Regular expression which should only match function or class names that do -# not require a docstring. -no-docstring-rgx=^_ - -# List of decorators that produce properties, such as abc.abstractproperty. Add -# to this list to register other decorators that produce valid properties. -property-classes=abc.abstractproperty - -# Naming hint for variable names -variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct variable names -variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - - -[VARIABLES] - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= - -# Tells whether unused global variables should be treated as a violation. -allow-global-unused-variables=yes - -# List of strings which can identify a callback function by name. A callback -# name must start or end with one of those strings. -callbacks=cb_,_cb - -# A regular expression matching the name of dummy variables (i.e. expectedly -# not used). -dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore -ignored-argument-names=_.*|^ignored_|^unused_ - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# List of qualified module names which can have objects that can redefine -# builtins. -redefining-builtins-modules=six.moves,future.builtins - - -[TYPECHECK] - -# List of decorators that produce context managers, such as -# contextlib.contextmanager. Add to this list to register other decorators that -# produce valid context managers. -contextmanager-decorators=contextlib.contextmanager - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E1101 when accessed. Python regular -# expressions are accepted. -generated-members= - -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# This flag controls whether pylint should warn about no-member and similar -# checks whenever an opaque object is returned when inferring. The inference -# can return multiple potential results while evaluating a Python object, but -# some branches might not be evaluated, which results in partial inference. In -# that case, it might be useful to still emit no-member and other checks for -# the rest of the inferred objects. -ignore-on-opaque-inference=no - -# List of class names for which member attributes should not be checked (useful -# for classes with dynamically set attributes). This supports the use of -# qualified names. -ignored-classes=optparse.Values,thread._local,_thread._local - -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis. It -# supports qualified module names, as well as Unix pattern matching. -ignored-modules= - -# Show a hint with possible names when a member name was not found. The aspect -# of finding the hint is based on edit distance. -missing-member-hint=yes - -# The minimum edit distance a name should have in order to be considered a -# similar match for a missing member name. -missing-member-hint-distance=1 - -# The total number of similar names that should be taken in consideration when -# showing a hint for a missing member. -missing-member-max-choices=1 - - -[SIMILARITIES] - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes - -# Ignore imports when computing similarities. -ignore-imports=yes - -# Minimum lines number of a similarity. -min-similarity-lines=7 - - -[SPELLING] - -# Spelling dictionary name. Available dictionaries: none. To make it working -# install python-enchant package. -spelling-dict= - -# List of comma separated words that should not be checked. -spelling-ignore-words= - -# A path to a file that contains private dictionary; one word per line. -spelling-private-dict-file= - -# Tells whether to store unknown words to indicated private dictionary in -# --spelling-private-dict-file option instead of raising a message. -spelling-store-unknown-words=no - - -[FORMAT] - -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -expected-line-ending-format= - -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )??$ - -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - -# Maximum number of characters on a single line. -max-line-length=100 - -# Maximum number of lines in a module -max-module-lines=1000 - -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma,dict-separator - -# Allow the body of a class to be on the same line as the declaration if body -# contains single statement. -single-line-class-stmt=no - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt=no - - -[CLASSES] - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp - -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict,_fields,_replace,_source,_make - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=mcs - - -[IMPORTS] - -# Allow wildcard imports from modules that define __all__. -allow-wildcard-with-all=no - -# Analyse import fallback blocks. This can be used to support both Python 2 and -# 3 compatible code, which means that the block might have code that exists -# only in one or another interpreter, leading to false positives when analysed. -analyse-fallback-blocks=no - -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=optparse,tkinter.tix - -# Create a graph of external dependencies in the given file (report RP0402 must -# not be disabled) -ext-import-graph= - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled) -import-graph= - -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled) -int-import-graph= - -# Force import order to recognize a module as part of the standard -# compatibility libraries. -known-standard-library= - -# Force import order to recognize a module as part of a third party library. -known-third-party=enchant - - -[DESIGN] - -# Maximum number of arguments for function / method -max-args=7 - -# Maximum number of attributes for a class (see R0902). -max-attributes=7 - -# Maximum number of boolean expressions in a if statement -max-bool-expr=7 - -# Maximum number of branch for function / method body -max-branches=15 - -# Maximum number of locals for function / method body -max-locals=15 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=16 - -# Maximum number of return / yield for function / method body -max-returns=4 - -# Maximum number of statements in function / method body -max-statements=40 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=2 - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception diff --git a/dataanalysis/dataanalysis/__init__.py b/dataanalysis/dataanalysis/__init__.py deleted file mode 100644 index a3413c6..0000000 --- a/dataanalysis/dataanalysis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Required docstring for an __init__ file.""" - -__version__ = "0.1.0" diff --git a/dataanalysis/dataanalysis/main.py b/dataanalysis/dataanalysis/main.py deleted file mode 100644 index 522f7e0..0000000 --- a/dataanalysis/dataanalysis/main.py +++ /dev/null @@ -1,60 +0,0 @@ -"""Define the command-line interface for the datasummarizer program.""" - -from pathlib import Path - -import typer - -from dataanalysis import summarize -from dataanalysis import transform - -from rich.console import Console - -cli = typer.Typer() - -console = Console() - - -@cli.command() -def main( - data_file: Path = typer.Option(...), -): - """Summarize the data values stored in a file.""" - # display details about the file provided on the command line - data_text = "" - # --> the file was not specified so we cannot continue using program - if data_file is None: - console.print("No data file specified!") - raise typer.Abort() - # --> the file was specified and it is valid so we should read and check it - if data_file.is_file(): - data_text = data_file.read_text() - data_line_count = len(data_text.splitlines()) - console.print("") - console.print( - f":package: The data file contains {data_line_count} data values in it!" - ) - console.print("") - console.print(":rocket: Let's do some sophisticated data analysis!") - # transform the data from a list of textual values to a list of numerical values - data_list = transform.transform_string_to_number_list(data_text) - # TODO: compute the mean from the list of numerical values - console.print("") - console.print(":abacus: Here are the results of the data analysis:") - # TODO: display the computed mean in the terminal window - # TODO: compute the median from the list of numerical values - # TODO: display the computed median in the terminal window - # TODO: compute the variance from the list of numerical values - # TODO: display the computed variance in the terminal window - # TODO: compute the standard deviation from the list of numerical values - # TODO: display the computed standard deviation in the terminal window - # TODO: make sure that you display all floating-point numbers with - # exactly two decimal places (see the expected output for details) - console.print("") - console.print( - ":light_bulb: What does this tell you about the population of this county?" - ) - console.print("") - # --> the file was specified but it does not exist so we cannot continue using program - elif not data_file.exists(): - console.print(":bomb: The data file does not exist!") - console.print("Did you incorrectly specify the name of the file?") diff --git a/dataanalysis/dataanalysis/summarize.py b/dataanalysis/dataanalysis/summarize.py deleted file mode 100644 index 54248c9..0000000 --- a/dataanalysis/dataanalysis/summarize.py +++ /dev/null @@ -1,59 +0,0 @@ -"""Summarize data values to support data analysis.""" - -# TODO: incorrect all of the needed type annotations - - -def compute_mean(numbers: List[float]) -> float: - """Compute the mean of a list of numbers.""" - # TODO: Refer to the book called "Doing Math with Python" - # for details about how to implement this function - # TODO: sum the list of the numbers - # TODO: determine the length of the list of numbers - # TODO: as long as the computation will not be an - # undefined division by zero, compute the mean - # https://stackoverflow.com/questions/58400652/average-returning-a-value-even-when-list-is-empty - # TODO: if the list was empty, then return a mean that is "not a number" - # https://stackoverflow.com/questions/944700/how-can-i-check-for-nan-values - - -def compute_median(numbers: List[float]) -> float: - """Compute the median of a list of numbers.""" - # TODO: Refer to the book called "Doing Math with Python" - # for details about how to implement this function - # TODO: as long as the computation will not be an - # undefined division by zero, compute the median - # TODO: sort the numbers in an "in place" fashion - # TODO: case: the count of the values is even - # TODO: get the two indices that are before and after the middle - # TODO: convert to an integer to prepare for indexing - # adjust for the fact that lists index starting at 0 - # TODO: compute the median value - # TODO: case: the count of the values is odd - # TODO: convert to an integer to prepare for indexing - # adjust for the fact that lists index starting at 0 - # TODO: if the list was empty, then return a median that is "not a number" - # TODO: return the computed median value - - -def compute_difference(numbers: List[float]) -> List[float]: - """Compute difference for each value from the calculated mean.""" - # TODO: Refer to the book called "Doing Math with Python" - # for details about how to implement this function - # TODO: compute the mean - # TODO: compute the differences from the mean - # TODO: return the computed differences from the mean - - -def compute_variance(numbers: List[float]) -> float: - """Compute the variance of a list of numbers.""" - # TODO: compute the difference from the mean - # TODO: compute the squared differences - # TODO: calculate the variance - # TODO: return the calculated variance of the list of numbers - - -def compute_standard_deviation(numbers: List[float]) -> float: - """Compute the standard deviation of a list of numbers.""" - # TODO: call the function to calculate the variance - # TODO: calculate the standard deviation as the square root of the variance - # TODO: return the calculated standard devision of the list of numbers diff --git a/dataanalysis/dataanalysis/transform.py b/dataanalysis/dataanalysis/transform.py deleted file mode 100644 index 3a368c4..0000000 --- a/dataanalysis/dataanalysis/transform.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Transform the data set containing recorded population data values.""" - -from typing import List - -# Reference for the data set: -# https://fred.stlouisfed.org/series/PACRAW0POP - -# Sample of the data set: - -# 1970-01-01,81.342 -# 1971-01-01,83.300 -# 1972-01-01,84.700 -# 1973-01-01,85.500 -# 1974-01-01,86.100 -# 1975-01-01,87.000 -# 1976-01-01,87.600 -# 1977-01-01,87.600 -# 1978-01-01,88.000 -# 1979-01-01,88.100 -# 1980-01-01,88.869 - -# TODO: Fix the defect in the following function - -def transform_string_to_number_list(data_text: str) -> List[float]: - """Transform a string of (date, float) values to a list of floats.""" - data_number_list = [] - # iterate through each line of the data set - for line in data_text.splitlines(): - # extract the ordered pair this line - # the ordered pair has the format: - # (Date, population count in thousands of persons) - ordered_pair = line.split("'") - # convert the population count to a float and store it - # in the data_number_list - data_number_list.append(float(ordered_pair[1])) - # return the data_number_list - return data_number_list diff --git a/dataanalysis/input/data.txt b/dataanalysis/input/data.txt deleted file mode 100644 index 0f3a29f..0000000 --- a/dataanalysis/input/data.txt +++ /dev/null @@ -1,50 +0,0 @@ -1970-01-01,81.342 -1971-01-01,83.300 -1972-01-01,84.700 -1973-01-01,85.500 -1974-01-01,86.100 -1975-01-01,87.000 -1976-01-01,87.600 -1977-01-01,87.600 -1978-01-01,88.000 -1979-01-01,88.100 -1980-01-01,88.869 -1981-01-01,89.402 -1982-01-01,90.069 -1983-01-01,90.280 -1984-01-01,89.902 -1985-01-01,88.674 -1986-01-01,87.864 -1987-01-01,87.168 -1988-01-01,86.514 -1989-01-01,86.170 -1990-01-01,86.205 -1991-01-01,86.661 -1992-01-01,86.843 -1993-01-01,87.764 -1994-01-01,88.533 -1995-01-01,89.334 -1996-01-01,89.618 -1997-01-01,89.863 -1998-01-01,89.925 -1999-01-01,90.149 -2000-01-01,90.295 -2001-01-01,90.033 -2002-01-01,89.907 -2003-01-01,89.651 -2004-01-01,89.388 -2005-01-01,89.065 -2006-01-01,89.024 -2007-01-01,89.056 -2008-01-01,88.510 -2009-01-01,88.495 -2010-01-01,88.614 -2011-01-01,88.167 -2012-01-01,87.73 -2013-01-01,87.508 -2014-01-01,87.154 -2015-01-01,86.51 -2016-01-01,86.306 -2017-01-01,85.772 -2018-01-01,85.11 -2019-01-01,84.629 diff --git a/dataanalysis/poetry.lock b/dataanalysis/poetry.lock deleted file mode 100644 index c35a971..0000000 --- a/dataanalysis/poetry.lock +++ /dev/null @@ -1,689 +0,0 @@ -[[package]] -name = "astroid" -version = "2.7.3" -description = "An abstract syntax tree for Python with inference support." -category = "dev" -optional = false -python-versions = "~=3.6" - -[package.dependencies] -lazy-object-proxy = ">=1.4.0" -wrapt = ">=1.11,<1.13" - -[[package]] -name = "atomicwrites" -version = "1.4.0" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "attrs" -version = "21.4.0" -description = "Classes Without Boilerplate" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] - -[[package]] -name = "black" -version = "21.8b0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.6.2" - -[package.dependencies] -click = ">=7.1.2" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0,<1" -platformdirs = ">=2" -regex = ">=2020.1.8" -tomli = ">=0.2.6,<2.0.0" -typing-extensions = [ - {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, - {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, -] - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.2)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "click" -version = "7.1.2" -description = "Composable command line interface toolkit" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "colorama" -version = "0.4.4" -description = "Cross-platform colored terminal text." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "commonmark" -version = "0.9.1" -description = "Python parser for the CommonMark Markdown spec" -category = "main" -optional = false -python-versions = "*" - -[package.extras] -test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] - -[[package]] -name = "flake8" -version = "3.9.2" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - -[package.dependencies] -mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.7.0,<2.8.0" -pyflakes = ">=2.3.0,<2.4.0" - -[[package]] -name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "isort" -version = "5.9.3" -description = "A Python utility / library to sort Python imports." -category = "dev" -optional = false -python-versions = ">=3.6.1,<4.0" - -[package.extras] -pipfile_deprecated_finder = ["pipreqs", "requirementslib"] -requirements_deprecated_finder = ["pipreqs", "pip-api"] -colors = ["colorama (>=0.4.3,<0.5.0)"] -plugins = ["setuptools"] - -[[package]] -name = "lazy-object-proxy" -version = "1.6.0" -description = "A fast and thorough lazy object proxy." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" - -[[package]] -name = "mccabe" -version = "0.6.1" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "mslex" -version = "0.3.0" -description = "shlex for windows" -category = "dev" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "mypy" -version = "0.910" -description = "Optional static typing for Python" -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -mypy-extensions = ">=0.4.3,<0.5.0" -toml = "*" -typing-extensions = ">=3.7.4" - -[package.extras] -dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<1.5.0)"] - -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "packaging" -version = "21.3" -description = "Core utilities for Python packages" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" - -[[package]] -name = "pathspec" -version = "0.9.0" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - -[[package]] -name = "platformdirs" -version = "2.3.0" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] - -[[package]] -name = "pluggy" -version = "1.0.0" -description = "plugin and hook calling mechanisms for python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "psutil" -version = "5.8.0" -description = "Cross-platform lib for process and system monitoring in Python." -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.extras] -test = ["ipaddress", "mock", "unittest2", "enum34", "pywin32", "wmi"] - -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "pycodestyle" -version = "2.7.0" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "pydocstyle" -version = "6.1.1" -description = "Python docstring style checker" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -snowballstemmer = "*" - -[package.extras] -toml = ["toml"] - -[[package]] -name = "pyflakes" -version = "2.3.1" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "pygments" -version = "2.10.0" -description = "Pygments is a syntax highlighting package written in Python." -category = "main" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "pylint" -version = "2.10.2" -description = "python code static checker" -category = "dev" -optional = false -python-versions = "~=3.6" - -[package.dependencies] -astroid = ">=2.7.2,<2.8" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -isort = ">=4.2.5,<6" -mccabe = ">=0.6,<0.7" -platformdirs = ">=2.2.0" -toml = ">=0.7.1" - -[[package]] -name = "pyparsing" -version = "3.0.7" -description = "Python parsing module" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -diagrams = ["jinja2", "railroad-diagrams"] - -[[package]] -name = "pytest" -version = "7.1.1" -description = "pytest: simple powerful testing with Python" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=19.2.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -tomli = ">=1.0.0" - -[package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] - -[[package]] -name = "regex" -version = "2021.8.28" -description = "Alternative regular expression module, to replace re." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "rich" -version = "10.9.0" -description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" -optional = false -python-versions = ">=3.6,<4.0" - -[package.dependencies] -colorama = ">=0.4.0,<0.5.0" -commonmark = ">=0.9.0,<0.10.0" -pygments = ">=2.6.0,<3.0.0" - -[package.extras] -jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] - -[[package]] -name = "shellingham" -version = "1.4.0" -description = "Tool to Detect Surrounding Shell" -category = "main" -optional = false -python-versions = "!=3.0,!=3.1,!=3.2,!=3.3,>=2.6" - -[[package]] -name = "snowballstemmer" -version = "2.1.0" -description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "taskipy" -version = "1.8.2" -description = "tasks runner for python projects" -category = "dev" -optional = false -python-versions = ">=3.6,<4.0" - -[package.dependencies] -colorama = ">=0.4.4,<0.5.0" -mslex = {version = ">=0.3.0,<0.4.0", markers = "sys_platform == \"win32\""} -psutil = ">=5.7.2,<6.0.0" -toml = ">=0.10.0,<0.11.0" - -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - -[[package]] -name = "tomli" -version = "1.2.1" -description = "A lil' TOML parser" -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "typer" -version = "0.3.2" -description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -click = ">=7.1.1,<7.2.0" -colorama = {version = ">=0.4.3,<0.5.0", optional = true, markers = "extra == \"all\""} -shellingham = {version = ">=1.3.0,<2.0.0", optional = true, markers = "extra == \"all\""} - -[package.extras] -test = ["pytest-xdist (>=1.32.0,<2.0.0)", "pytest-sugar (>=0.9.4,<0.10.0)", "mypy (==0.782)", "black (>=19.10b0,<20.0b0)", "isort (>=5.0.6,<6.0.0)", "shellingham (>=1.3.0,<2.0.0)", "pytest (>=4.4.0,<5.4.0)", "pytest-cov (>=2.10.0,<3.0.0)", "coverage (>=5.2,<6.0)"] -all = ["colorama (>=0.4.3,<0.5.0)", "shellingham (>=1.3.0,<2.0.0)"] -dev = ["autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)"] -doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=5.4.0,<6.0.0)", "markdown-include (>=0.5.1,<0.6.0)"] - -[[package]] -name = "typing-extensions" -version = "3.10.0.2" -description = "Backported and Experimental Type Hints for Python 3.5+" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "wrapt" -version = "1.12.1" -description = "Module for decorators, wrappers and monkey patching." -category = "dev" -optional = false -python-versions = "*" - -[metadata] -lock-version = "1.1" -python-versions = "^3.8" -content-hash = "086078b1a7b3dd0931a30a23f7b61fc3e79d1213e0e251521c1df4ecff836571" - -[metadata.files] -astroid = [ - {file = "astroid-2.7.3-py3-none-any.whl", hash = "sha256:dc1e8b28427d6bbef6b8842b18765ab58f558c42bb80540bd7648c98412af25e"}, - {file = "astroid-2.7.3.tar.gz", hash = "sha256:3b680ce0419b8a771aba6190139a3998d14b413852506d99aff8dc2bf65ee67c"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, -] -attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, -] -black = [ - {file = "black-21.8b0-py3-none-any.whl", hash = "sha256:2a0f9a8c2b2a60dbcf1ccb058842fb22bdbbcb2f32c6cc02d9578f90b92ce8b7"}, - {file = "black-21.8b0.tar.gz", hash = "sha256:570608d28aa3af1792b98c4a337dbac6367877b47b12b88ab42095cfc1a627c2"}, -] -click = [ - {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, - {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, -] -colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, -] -commonmark = [ - {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, - {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, -] -flake8 = [ - {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, - {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -isort = [ - {file = "isort-5.9.3-py3-none-any.whl", hash = "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2"}, - {file = "isort-5.9.3.tar.gz", hash = "sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899"}, -] -lazy-object-proxy = [ - {file = "lazy-object-proxy-1.6.0.tar.gz", hash = "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win32.whl", hash = "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win_amd64.whl", hash = "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win32.whl", hash = "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win32.whl", hash = "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-win32.whl", hash = "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-win32.whl", hash = "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"}, -] -mccabe = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, -] -mslex = [ - {file = "mslex-0.3.0-py2.py3-none-any.whl", hash = "sha256:380cb14abf8fabf40e56df5c8b21a6d533dc5cbdcfe42406bbf08dda8f42e42a"}, - {file = "mslex-0.3.0.tar.gz", hash = "sha256:4a1ac3f25025cad78ad2fe499dd16d42759f7a3801645399cce5c404415daa97"}, -] -mypy = [ - {file = "mypy-0.910-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a155d80ea6cee511a3694b108c4494a39f42de11ee4e61e72bc424c490e46457"}, - {file = "mypy-0.910-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b94e4b785e304a04ea0828759172a15add27088520dc7e49ceade7834275bedb"}, - {file = "mypy-0.910-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:088cd9c7904b4ad80bec811053272986611b84221835e079be5bcad029e79dd9"}, - {file = "mypy-0.910-cp35-cp35m-win_amd64.whl", hash = "sha256:adaeee09bfde366d2c13fe6093a7df5df83c9a2ba98638c7d76b010694db760e"}, - {file = "mypy-0.910-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ecd2c3fe726758037234c93df7e98deb257fd15c24c9180dacf1ef829da5f921"}, - {file = "mypy-0.910-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d9dd839eb0dc1bbe866a288ba3c1afc33a202015d2ad83b31e875b5905a079b6"}, - {file = "mypy-0.910-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:3e382b29f8e0ccf19a2df2b29a167591245df90c0b5a2542249873b5c1d78212"}, - {file = "mypy-0.910-cp36-cp36m-win_amd64.whl", hash = "sha256:53fd2eb27a8ee2892614370896956af2ff61254c275aaee4c230ae771cadd885"}, - {file = "mypy-0.910-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b6fb13123aeef4a3abbcfd7e71773ff3ff1526a7d3dc538f3929a49b42be03f0"}, - {file = "mypy-0.910-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e4dab234478e3bd3ce83bac4193b2ecd9cf94e720ddd95ce69840273bf44f6de"}, - {file = "mypy-0.910-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:7df1ead20c81371ccd6091fa3e2878559b5c4d4caadaf1a484cf88d93ca06703"}, - {file = "mypy-0.910-cp37-cp37m-win_amd64.whl", hash = "sha256:0aadfb2d3935988ec3815952e44058a3100499f5be5b28c34ac9d79f002a4a9a"}, - {file = "mypy-0.910-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ec4e0cd079db280b6bdabdc807047ff3e199f334050db5cbb91ba3e959a67504"}, - {file = "mypy-0.910-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:119bed3832d961f3a880787bf621634ba042cb8dc850a7429f643508eeac97b9"}, - {file = "mypy-0.910-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:866c41f28cee548475f146aa4d39a51cf3b6a84246969f3759cb3e9c742fc072"}, - {file = "mypy-0.910-cp38-cp38-win_amd64.whl", hash = "sha256:ceb6e0a6e27fb364fb3853389607cf7eb3a126ad335790fa1e14ed02fba50811"}, - {file = "mypy-0.910-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1a85e280d4d217150ce8cb1a6dddffd14e753a4e0c3cf90baabb32cefa41b59e"}, - {file = "mypy-0.910-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:42c266ced41b65ed40a282c575705325fa7991af370036d3f134518336636f5b"}, - {file = "mypy-0.910-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3c4b8ca36877fc75339253721f69603a9c7fdb5d4d5a95a1a1b899d8b86a4de2"}, - {file = "mypy-0.910-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:c0df2d30ed496a08de5daed2a9ea807d07c21ae0ab23acf541ab88c24b26ab97"}, - {file = "mypy-0.910-cp39-cp39-win_amd64.whl", hash = "sha256:c6c2602dffb74867498f86e6129fd52a2770c48b7cd3ece77ada4fa38f94eba8"}, - {file = "mypy-0.910-py3-none-any.whl", hash = "sha256:ef565033fa5a958e62796867b1df10c40263ea9ded87164d67572834e57a174d"}, - {file = "mypy-0.910.tar.gz", hash = "sha256:704098302473cb31a218f1775a873b376b30b4c18229421e9e9dc8916fd16150"}, -] -mypy-extensions = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] -packaging = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, -] -pathspec = [ - {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, - {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, -] -platformdirs = [ - {file = "platformdirs-2.3.0-py3-none-any.whl", hash = "sha256:8003ac87717ae2c7ee1ea5a84a1a61e87f3fbd16eb5aadba194ea30a9019f648"}, - {file = "platformdirs-2.3.0.tar.gz", hash = "sha256:15b056538719b1c94bdaccb29e5f81879c7f7f0f4a153f46086d155dffcd4f0f"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -psutil = [ - {file = "psutil-5.8.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:0066a82f7b1b37d334e68697faba68e5ad5e858279fd6351c8ca6024e8d6ba64"}, - {file = "psutil-5.8.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:0ae6f386d8d297177fd288be6e8d1afc05966878704dad9847719650e44fc49c"}, - {file = "psutil-5.8.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:12d844996d6c2b1d3881cfa6fa201fd635971869a9da945cf6756105af73d2df"}, - {file = "psutil-5.8.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:02b8292609b1f7fcb34173b25e48d0da8667bc85f81d7476584d889c6e0f2131"}, - {file = "psutil-5.8.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6ffe81843131ee0ffa02c317186ed1e759a145267d54fdef1bc4ea5f5931ab60"}, - {file = "psutil-5.8.0-cp27-none-win32.whl", hash = "sha256:ea313bb02e5e25224e518e4352af4bf5e062755160f77e4b1767dd5ccb65f876"}, - {file = "psutil-5.8.0-cp27-none-win_amd64.whl", hash = "sha256:5da29e394bdedd9144c7331192e20c1f79283fb03b06e6abd3a8ae45ffecee65"}, - {file = "psutil-5.8.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:74fb2557d1430fff18ff0d72613c5ca30c45cdbfcddd6a5773e9fc1fe9364be8"}, - {file = "psutil-5.8.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:74f2d0be88db96ada78756cb3a3e1b107ce8ab79f65aa885f76d7664e56928f6"}, - {file = "psutil-5.8.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:99de3e8739258b3c3e8669cb9757c9a861b2a25ad0955f8e53ac662d66de61ac"}, - {file = "psutil-5.8.0-cp36-cp36m-win32.whl", hash = "sha256:36b3b6c9e2a34b7d7fbae330a85bf72c30b1c827a4366a07443fc4b6270449e2"}, - {file = "psutil-5.8.0-cp36-cp36m-win_amd64.whl", hash = "sha256:52de075468cd394ac98c66f9ca33b2f54ae1d9bff1ef6b67a212ee8f639ec06d"}, - {file = "psutil-5.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c6a5fd10ce6b6344e616cf01cc5b849fa8103fbb5ba507b6b2dee4c11e84c935"}, - {file = "psutil-5.8.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:61f05864b42fedc0771d6d8e49c35f07efd209ade09a5afe6a5059e7bb7bf83d"}, - {file = "psutil-5.8.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:0dd4465a039d343925cdc29023bb6960ccf4e74a65ad53e768403746a9207023"}, - {file = "psutil-5.8.0-cp37-cp37m-win32.whl", hash = "sha256:1bff0d07e76114ec24ee32e7f7f8d0c4b0514b3fae93e3d2aaafd65d22502394"}, - {file = "psutil-5.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:fcc01e900c1d7bee2a37e5d6e4f9194760a93597c97fee89c4ae51701de03563"}, - {file = "psutil-5.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6223d07a1ae93f86451d0198a0c361032c4c93ebd4bf6d25e2fb3edfad9571ef"}, - {file = "psutil-5.8.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d225cd8319aa1d3c85bf195c4e07d17d3cd68636b8fc97e6cf198f782f99af28"}, - {file = "psutil-5.8.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:28ff7c95293ae74bf1ca1a79e8805fcde005c18a122ca983abf676ea3466362b"}, - {file = "psutil-5.8.0-cp38-cp38-win32.whl", hash = "sha256:ce8b867423291cb65cfc6d9c4955ee9bfc1e21fe03bb50e177f2b957f1c2469d"}, - {file = "psutil-5.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:90f31c34d25b1b3ed6c40cdd34ff122b1887a825297c017e4cbd6796dd8b672d"}, - {file = "psutil-5.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6323d5d845c2785efb20aded4726636546b26d3b577aded22492908f7c1bdda7"}, - {file = "psutil-5.8.0-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:245b5509968ac0bd179287d91210cd3f37add77dad385ef238b275bad35fa1c4"}, - {file = "psutil-5.8.0-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:90d4091c2d30ddd0a03e0b97e6a33a48628469b99585e2ad6bf21f17423b112b"}, - {file = "psutil-5.8.0-cp39-cp39-win32.whl", hash = "sha256:ea372bcc129394485824ae3e3ddabe67dc0b118d262c568b4d2602a7070afdb0"}, - {file = "psutil-5.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:f4634b033faf0d968bb9220dd1c793b897ab7f1189956e1aa9eae752527127d3"}, - {file = "psutil-5.8.0.tar.gz", hash = "sha256:0c9ccb99ab76025f2f0bbecf341d4656e9c1351db8cc8a03ccd62e318ab4b5c6"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pycodestyle = [ - {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, - {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, -] -pydocstyle = [ - {file = "pydocstyle-6.1.1-py3-none-any.whl", hash = "sha256:6987826d6775056839940041beef5c08cc7e3d71d63149b48e36727f70144dc4"}, - {file = "pydocstyle-6.1.1.tar.gz", hash = "sha256:1d41b7c459ba0ee6c345f2eb9ae827cab14a7533a88c5c6f7e94923f72df92dc"}, -] -pyflakes = [ - {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, - {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, -] -pygments = [ - {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, - {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, -] -pylint = [ - {file = "pylint-2.10.2-py3-none-any.whl", hash = "sha256:e178e96b6ba171f8ef51fbce9ca30931e6acbea4a155074d80cc081596c9e852"}, - {file = "pylint-2.10.2.tar.gz", hash = "sha256:6758cce3ddbab60c52b57dcc07f0c5d779e5daf0cf50f6faacbef1d3ea62d2a1"}, -] -pyparsing = [ - {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, - {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, -] -pytest = [ - {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, - {file = "pytest-7.1.1.tar.gz", hash = "sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63"}, -] -regex = [ - {file = "regex-2021.8.28-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9d05ad5367c90814099000442b2125535e9d77581855b9bee8780f1b41f2b1a2"}, - {file = "regex-2021.8.28-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3bf1bc02bc421047bfec3343729c4bbbea42605bcfd6d6bfe2c07ade8b12d2a"}, - {file = "regex-2021.8.28-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f6a808044faae658f546dd5f525e921de9fa409de7a5570865467f03a626fc0"}, - {file = "regex-2021.8.28-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a617593aeacc7a691cc4af4a4410031654f2909053bd8c8e7db837f179a630eb"}, - {file = "regex-2021.8.28-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:79aef6b5cd41feff359acaf98e040844613ff5298d0d19c455b3d9ae0bc8c35a"}, - {file = "regex-2021.8.28-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0fc1f8f06977c2d4f5e3d3f0d4a08089be783973fc6b6e278bde01f0544ff308"}, - {file = "regex-2021.8.28-cp310-cp310-win32.whl", hash = "sha256:6eebf512aa90751d5ef6a7c2ac9d60113f32e86e5687326a50d7686e309f66ed"}, - {file = "regex-2021.8.28-cp310-cp310-win_amd64.whl", hash = "sha256:ac88856a8cbccfc14f1b2d0b829af354cc1743cb375e7f04251ae73b2af6adf8"}, - {file = "regex-2021.8.28-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c206587c83e795d417ed3adc8453a791f6d36b67c81416676cad053b4104152c"}, - {file = "regex-2021.8.28-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8690ed94481f219a7a967c118abaf71ccc440f69acd583cab721b90eeedb77c"}, - {file = "regex-2021.8.28-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:328a1fad67445550b982caa2a2a850da5989fd6595e858f02d04636e7f8b0b13"}, - {file = "regex-2021.8.28-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c7cb4c512d2d3b0870e00fbbac2f291d4b4bf2634d59a31176a87afe2777c6f0"}, - {file = "regex-2021.8.28-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66256b6391c057305e5ae9209941ef63c33a476b73772ca967d4a2df70520ec1"}, - {file = "regex-2021.8.28-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8e44769068d33e0ea6ccdf4b84d80c5afffe5207aa4d1881a629cf0ef3ec398f"}, - {file = "regex-2021.8.28-cp36-cp36m-win32.whl", hash = "sha256:08d74bfaa4c7731b8dac0a992c63673a2782758f7cfad34cf9c1b9184f911354"}, - {file = "regex-2021.8.28-cp36-cp36m-win_amd64.whl", hash = "sha256:abb48494d88e8a82601af905143e0de838c776c1241d92021e9256d5515b3645"}, - {file = "regex-2021.8.28-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b4c220a1fe0d2c622493b0a1fd48f8f991998fb447d3cd368033a4b86cf1127a"}, - {file = "regex-2021.8.28-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4a332404baa6665b54e5d283b4262f41f2103c255897084ec8f5487ce7b9e8e"}, - {file = "regex-2021.8.28-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c61dcc1cf9fd165127a2853e2c31eb4fb961a4f26b394ac9fe5669c7a6592892"}, - {file = "regex-2021.8.28-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ee329d0387b5b41a5dddbb6243a21cb7896587a651bebb957e2d2bb8b63c0791"}, - {file = "regex-2021.8.28-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f60667673ff9c249709160529ab39667d1ae9fd38634e006bec95611f632e759"}, - {file = "regex-2021.8.28-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b844fb09bd9936ed158ff9df0ab601e2045b316b17aa8b931857365ea8586906"}, - {file = "regex-2021.8.28-cp37-cp37m-win32.whl", hash = "sha256:4cde065ab33bcaab774d84096fae266d9301d1a2f5519d7bd58fc55274afbf7a"}, - {file = "regex-2021.8.28-cp37-cp37m-win_amd64.whl", hash = "sha256:1413b5022ed6ac0d504ba425ef02549a57d0f4276de58e3ab7e82437892704fc"}, - {file = "regex-2021.8.28-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ed4b50355b066796dacdd1cf538f2ce57275d001838f9b132fab80b75e8c84dd"}, - {file = "regex-2021.8.28-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28fc475f560d8f67cc8767b94db4c9440210f6958495aeae70fac8faec631797"}, - {file = "regex-2021.8.28-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdc178caebd0f338d57ae445ef8e9b737ddf8fbc3ea187603f65aec5b041248f"}, - {file = "regex-2021.8.28-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:999ad08220467b6ad4bd3dd34e65329dd5d0df9b31e47106105e407954965256"}, - {file = "regex-2021.8.28-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:808ee5834e06f57978da3e003ad9d6292de69d2bf6263662a1a8ae30788e080b"}, - {file = "regex-2021.8.28-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d5111d4c843d80202e62b4fdbb4920db1dcee4f9366d6b03294f45ed7b18b42e"}, - {file = "regex-2021.8.28-cp38-cp38-win32.whl", hash = "sha256:473858730ef6d6ff7f7d5f19452184cd0caa062a20047f6d6f3e135a4648865d"}, - {file = "regex-2021.8.28-cp38-cp38-win_amd64.whl", hash = "sha256:31a99a4796bf5aefc8351e98507b09e1b09115574f7c9dbb9cf2111f7220d2e2"}, - {file = "regex-2021.8.28-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:04f6b9749e335bb0d2f68c707f23bb1773c3fb6ecd10edf0f04df12a8920d468"}, - {file = "regex-2021.8.28-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b006628fe43aa69259ec04ca258d88ed19b64791693df59c422b607b6ece8bb"}, - {file = "regex-2021.8.28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:121f4b3185feaade3f85f70294aef3f777199e9b5c0c0245c774ae884b110a2d"}, - {file = "regex-2021.8.28-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a577a21de2ef8059b58f79ff76a4da81c45a75fe0bfb09bc8b7bb4293fa18983"}, - {file = "regex-2021.8.28-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1743345e30917e8c574f273f51679c294effba6ad372db1967852f12c76759d8"}, - {file = "regex-2021.8.28-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e1e8406b895aba6caa63d9fd1b6b1700d7e4825f78ccb1e5260551d168db38ed"}, - {file = "regex-2021.8.28-cp39-cp39-win32.whl", hash = "sha256:ed283ab3a01d8b53de3a05bfdf4473ae24e43caee7dcb5584e86f3f3e5ab4374"}, - {file = "regex-2021.8.28-cp39-cp39-win_amd64.whl", hash = "sha256:610b690b406653c84b7cb6091facb3033500ee81089867ee7d59e675f9ca2b73"}, - {file = "regex-2021.8.28.tar.gz", hash = "sha256:f585cbbeecb35f35609edccb95efd95a3e35824cd7752b586503f7e6087303f1"}, -] -rich = [ - {file = "rich-10.9.0-py3-none-any.whl", hash = "sha256:2c84d9b3459c16bf413fe0f9644c7ae1791971e0bb944dfae56e7c7634b187ab"}, - {file = "rich-10.9.0.tar.gz", hash = "sha256:ba285f1c519519490034284e6a9d2e6e3f16dc7690f2de3d9140737d81304d22"}, -] -shellingham = [ - {file = "shellingham-1.4.0-py2.py3-none-any.whl", hash = "sha256:536b67a0697f2e4af32ab176c00a50ac2899c5a05e0d8e2dadac8e58888283f9"}, - {file = "shellingham-1.4.0.tar.gz", hash = "sha256:4855c2458d6904829bd34c299f11fdeed7cfefbf8a2c522e4caea6cd76b3171e"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"}, - {file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"}, -] -taskipy = [ - {file = "taskipy-1.8.2-py3-none-any.whl", hash = "sha256:24b899ae17908fe9a61f4dc596792d5d2afef471ecfd8c6e9abb68a9568b40b7"}, - {file = "taskipy-1.8.2.tar.gz", hash = "sha256:36e958f646f2c435b39f748b8bbdb0b9c33a2c4a96b293427feaf48ad4e2caa0"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -tomli = [ - {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, - {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, -] -typer = [ - {file = "typer-0.3.2-py3-none-any.whl", hash = "sha256:ba58b920ce851b12a2d790143009fa00ac1d05b3ff3257061ff69dbdfc3d161b"}, - {file = "typer-0.3.2.tar.gz", hash = "sha256:5455d750122cff96745b0dec87368f56d023725a7ebc9d2e54dd23dc86816303"}, -] -typing-extensions = [ - {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, - {file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"}, - {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, -] -wrapt = [ - {file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"}, -] diff --git a/dataanalysis/pyproject.toml b/dataanalysis/pyproject.toml deleted file mode 100644 index a3d1370..0000000 --- a/dataanalysis/pyproject.toml +++ /dev/null @@ -1,37 +0,0 @@ -[tool.poetry] -name = "dataanalysis" -version = "0.1.0" -description = "" -authors = ["Oliver Bonham-Carter "] - -[tool.poetry.scripts] -dataanalysis = "dataanalysis.main:cli" - -[tool.poetry.dependencies] -python = "^3.8" -typer = {extras = ["all"], version = "^0.3.2"} -rich = "^10.9.0" - -[tool.poetry.dev-dependencies] -black = "^21.8b0" -taskipy = "^1.8.1" -flake8 = "^3.9.2" -pydocstyle = "^6.1.1" -pylint = "^2.10.2" -mypy = "^0.910" -pytest = "^7.1.1" - -[tool.taskipy.tasks] -black = { cmd = "black dataanalysis tests --check", help = "Run the black checks for source code format" } -flake8 = { cmd = "flake8 dataanalysis tests", help = "Run the flake8 checks for source code documentation" } -mypy = { cmd = "poetry run mypy dataanalysis", help = "Run the mypy type checker for potential type errors" } -pydocstyle = { cmd = "pydocstyle dataanalysis tests", help = "Run the pydocstyle checks for source code documentation" } -pylint = { cmd = "pylint dataanalysis tests", help = "Run the pylint checks for source code documentation" } -test = { cmd = "pytest -x -s", help = "Run the pytest test suite" } -test-silent = { cmd = "pytest -x --show-capture=no", help = "Run the pytest test suite without showing output" } -all = "task black && task flake8 && task pydocstyle && task pylint && task mypy && task test" -lint = "task black && task flake8 && task pydocstyle && task pylint" - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" diff --git a/dataanalysis/tests/__init__.py b/dataanalysis/tests/__init__.py deleted file mode 100644 index 3f4613b..0000000 --- a/dataanalysis/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Required docstring for an __init__ file.""" diff --git a/dataanalysis/tests/test_summarize.py b/dataanalysis/tests/test_summarize.py deleted file mode 100644 index 8aeae1b..0000000 --- a/dataanalysis/tests/test_summarize.py +++ /dev/null @@ -1,139 +0,0 @@ -"""Ensure that the data summarization works correctly.""" - -import math - -from dataanalysis import summarize - - -def test_summarize_empty_number_list_mean(): - """Ensure that an empty list of numbers summarizes with mean correctly.""" - data_list_numbers = [] - mean = summarize.compute_mean(data_list_numbers) - assert math.isnan(mean) - - -def test_summarize_pos_neg_number_list(): - """Ensure that a "cancel out" list of numbers summarizes correctly.""" - data_list_numbers = [-10.0, 10.0] - mean = summarize.compute_mean(data_list_numbers) - assert mean == 0.0 - - -def test_summarize_equal_number_list(): - """Ensure that an equal number list of numbers summarizes correctly.""" - data_list_numbers = [10.0, 10.0] - mean = summarize.compute_mean(data_list_numbers) - assert mean == 10.0 - - -def test_summarize_different_number_list(): - """Ensure that an equal number list of numbers summarizes correctly.""" - data_list_numbers = [5.0, 10.0] - mean = summarize.compute_mean(data_list_numbers) - assert mean == 7.5 - - -def test_summarize_empty_number_list_median(): - """Ensure that an empty list of numbers summarizes with median correctly.""" - data_list_numbers = [] - median = summarize.compute_median(data_list_numbers) - assert math.isnan(median) - - -def test_summarize_full_list_median_even(): - """Ensure that a full list of numbers summarizes with median correctly.""" - data_list_numbers = [ - 100.0, - 60.0, - 70.0, - 900.0, - 100.0, - 200.0, - 500.0, - 500.0, - 503.0, - 600.0, - 1000.0, - 1200.0, - ] - median = summarize.compute_median(data_list_numbers) - assert median == 500.0 - - -def test_summarize_full_list_median_odd(): - """Ensure that a full list of numbers summarizes with median correctly.""" - data_list_numbers = [ - 100.0, - 60.0, - 70.0, - 900.0, - 100.0, - 200.0, - 475.0, - 500.0, - 503.0, - 600.0, - 1000.0, - ] - median = summarize.compute_median(data_list_numbers) - assert median == 475.0 - - -def test_compute_difference_empty_list(): - """Ensure that an empty list of numbers has a correct difference from mean.""" - data_list_numbers = [] - differences = summarize.compute_difference(data_list_numbers) - assert len(differences) == 0 - - -def test_summarize_compute_difference(): - """Ensure that the computing of the difference from the mean is correct.""" - data_list_numbers = [10.0, 10.0, 5.0, 5.0] - mean = summarize.compute_mean(data_list_numbers) - assert mean == 7.5 - differences_expected = [] - # directly compute the differences - for number in data_list_numbers: - differences_expected.append(float(number - mean)) - differences_actual = summarize.compute_difference(data_list_numbers) - assert differences_actual == differences_expected - - -def test_summarize_full_list_variance_even(): - """Ensure that a full list of numbers summarizes with variance correctly.""" - data_list_numbers = [ - 100.0, - 60.0, - 70.0, - 900.0, - 100.0, - 200.0, - 500.0, - 500.0, - 503.0, - 600.0, - 1000.0, - 1200.0, - ] - variance = summarize.compute_variance(data_list_numbers) - assert variance == 141047.35416666666 - - -def test_summarize_full_list_standard_deviation_even(): - """Ensure that a full list of numbers summarizes with standard deviation correctly.""" - data_list_numbers = [ - 100.0, - 60.0, - 70.0, - 900.0, - 100.0, - 200.0, - 500.0, - 500.0, - 503.0, - 600.0, - 1000.0, - 1200.0, - ] - standard_deviation = summarize.compute_standard_deviation(data_list_numbers) - assert standard_deviation == 141047.35416666666 ** 0.5 diff --git a/dataanalysis/tests/test_transform.py b/dataanalysis/tests/test_transform.py deleted file mode 100644 index 75d58e4..0000000 --- a/dataanalysis/tests/test_transform.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Ensure that the data transformation works correctly.""" - -from dataanalysis import transform - - -def test_transform_empty_text_list_to_number_list(): - """Ensure that an empty list of textual numbers transforms correctly.""" - data_list_string = "" - data_list_numbers = transform.transform_string_to_number_list(data_list_string) - assert len(data_list_numbers) == 0 - assert sum(data_list_numbers) == 0 - assert data_list_numbers == [] - - -def test_transform_small_text_list_to_number_list(): - """Ensure that a small list of textual numbers transforms correctly.""" - data_list_string = """1970-01-0,10 -1970-01-0,5 -1970-01-0,10 -1970-01-0,5 -1970-01-0,10""" - data_list_numbers = transform.transform_string_to_number_list(data_list_string) - assert len(data_list_numbers) == 5 - assert sum(data_list_numbers) == 10 + 5 + 10 + 5 + 10 - assert data_list_numbers == [10, 5, 10, 5, 10] diff --git a/src/code.r b/src/code.r new file mode 100644 index 0000000..66fc748 --- /dev/null +++ b/src/code.r @@ -0,0 +1,48 @@ +# Add your name here + +rm(list = ls()) # clear out the variables from memory to make a clean execution of the code. + +# If you want to remove all previous plots and clear the console, run the following two lines. +graphics.off() # clear out all plots from previous work. + +cat("\014") # clear the console + +######################################### + +library(tidyverse) + +# We are using the iris dataset for the below activity + +# Q1. What is the the command to view the "iris" dataset as a table? + +# TODO + + + +# Q2. Describe the data dataset. Which columns could be plotted? Please explain how you know this. + +# TODO + + + +# Q4. Fix the below function for plotting Sepal.Length by Sepal.Width. + +# ggplot(data = iris) + geom_point( (x=Sepal.Length, y=Sepal.Width)) + +# TODO + + + +# Q5. Modify the above command to include color in some way to provide more information about the dataset. Note: this will increase the number of dimensions of your plot. + +# TODO + + + +# Q6. In your new plot from Q5, explain what you see and provide some conclusion about a trend that you note. + +# TODO + + + +# Please be sure to add your name at the top. \ No newline at end of file diff --git a/writing/reflection.md b/writing/reflection.md deleted file mode 100644 index 4f1a3c1..0000000 --- a/writing/reflection.md +++ /dev/null @@ -1,76 +0,0 @@ -# Data Analysis - -TODO: Please delete all of the TODO markers and prompts inside of this file. You -also need to ensure that this file does not have any mistakes in Markdown, -syntax, or technical content. This means that when you are finished with this -reflection it should contain polished responses that are suitable for -publication on your professional web site. - -## Add Your Name Here - -## Program Input and Output - -### What is the output from running the following commands? - -TODO: Use a fenced code block to provide the output for this command. - -`poetry run dataanalysis --data-file input/data.txt` - -### What are the first five lines of the contents of the file that is input into the `dataanalysis`? - -TODO: Use a fenced code block to provide the contents of the file. - -### What is the output from running the test suite with the command `poetry run task test`? - -TODO: Use a fenced code block to provide the output from running the test suite. - -## Source Code - -### Describe in detail how your provided source code works - -#### What is a function that analyzes a data set by computing the standard deviation? How does it work? - -TODO: Use a fenced code block to provide the requested source code -TODO: Write at least one paragraph to explain the requested source code - -#### What is the purpose of the following function in the context of the `display` module? - -TODO: Write at least one paragraph to explain the provided source code - -``` -def transform_string_to_number_list(data_text: str) -> List[float]: - """Transform a string of (date, float) values to a list of floats.""" - data_number_list = [] - for line in data_text.splitlines(): - ordered_pair = line.split(",") - data_number_list.append(float(ordered_pair[1])) - return data_number_list -``` - -#### What is the purpose of the following function in the context of the `summarize` module? - -TODO: Write at least one paragraph to explain the provided source code - -``` -def compute_difference(numbers: List[float]) -> List[float]: - """Compute difference for each value from the calculated mean.""" - # compute the mean - mean = compute_mean(numbers) - # compute the differences from the mean - differences = [] - for number in numbers: - differences.append(number - mean) - return differences -``` - -## Professional Development - -### What are some examples of computer science skills that were important 30 years ago but are less important to learn now? Why are they less important now? - -TODO: Provide a one-paragraph response to this question, using source code or commands for reference as needed - -### What are some examples of computer science skills that were important 30 years ago but are just as important to learn now? Why are they as important now as in the past? - -TODO: Provide a one-paragraph response to this question, using source code or commands for reference as needed - -(Did you remember to add your name to the top of this document?)