Skip to content

Commit

Permalink
Merge branch 'GatorEducator:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanNelson04 authored Nov 28, 2023
2 parents bf4e179 + 13c53d6 commit 75554fe
Show file tree
Hide file tree
Showing 13 changed files with 237 additions and 70 deletions.
1 change: 1 addition & 0 deletions .github/images/cellveyor-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions .github/issue_templates/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Operating System**
What operating system were you using when you encountered the bug?

**Additional context**
Add any other context about the problem here.
11 changes: 11 additions & 0 deletions .github/issue_templates/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
When creating a pull request to add a new feature or alter an existing one,
there are some important elements to include to help our team review and process it more efficiently.

1. Make sure the title is descriptive of what the PR includes. Don't mention issue names/numbers; save that for the description.

2. List the names of those who contributed to the project.

3. Link the issue the pull request is meant to fix/resolve.

4. Add all labels that apply. (e.g. documentation, ready-for-review)

5. Describe the contents and goal of the pull request.

6. Will coverge be maintained/increased?

7. What operating systems has this been tested on? How were these tests conducted?

8. Include a code block and/or screenshots displaying the functionality of your feature, if applicable/possible.

Mark as a draft until it is ready to begin the reviewing process, then tag our Lead Software Architect,
[Jeff Normile](https://github.com/jnormile), our Founding Engineer, [Gregory Kapfhammer](https://github.com/gkapfham),
and our Project Managers, [Haylee Pierce](https://github.com/hayleepierce) and [Sabrina Rodriguez](https://github.com/rodriguez03)
when you mark it as ready for review.
118 changes: 118 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Basic workflow
name: build

# Use more columns for terminal output
env:
COLUMNS: 120
PYTHONIOENCODING: utf8

# Controls when the action will run
# Workflow begins with push or PR events
# Focuses on the master branch only
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Create one single job
# This job performs all of the necessary checks
jobs:
build:
# Use the latest version of Ubuntu, MacOS, and Windows
# Use the latest and most stable version of Python
# Important: test coverage monitoring and reporting
# through a badge and the GitHub Actions job summary
# only takes place with the Linux operating system.
# Important: the MacOS and Windows operating systems
# have test coverage calculation take place but they
# do not report the test coverage beyond its display
# inside of the GitHub Actions panel for that job.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
include:
- os: macos-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.11"
# Define the workflow steps
steps:
# Checkout the code of the repository
- name: Check out Repository Code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Run the mdl linting tool
# Refers to .mdlrc file in repository
- name: Run Markdown Linting
if: matrix.os == 'ubuntu-latest'
uses: actionshub/markdownlint@main
# Setup Python for the current language version
- name: Setup Python ${{ matrix.python-version }}
if: always()
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Install pip
- name: Install Pip
if: always()
run: |
python -m pip install --upgrade pip
# Install poetry
- name: Install Poetry
if: always()
uses: abatilo/[email protected]
with:
poetry-version: 1.4.0
# Install dependencies
- name: Install dependencies
if: always()
run: |
poetry install
# Run the linters
- name: Run Linters
if: always()
run: |
poetry run task lint
# Run the program
- name: Run program
if: always()
run: |
poetry run cellveyor --spreadsheet-directory $PWD/spreadsheets/ --spreadsheet-file $PWD/spreadsheets/fake_spreadsheet.xlsx/ --sheet-name Main --key-attribute "Student GitHub" --key-value "gkapfham" --column-regexp '^(Summary Grade|Final Grade) .*$' --feedback-regexp "Summary Grade 1 - Feedback" --feedback-file $PWD/spreadsheets/feedback.yml/
# Run the tests
- name: Run Tests
if: always()
run: |
poetry run task test
# Run and collect the test coverage
# Important: only run and collect test coverage monitoring on Linux
- name: Run and Collect Test Coverage - Linux Only
if: always() && matrix.os == 'ubuntu-latest'
run: |
poetry run task test-silent > coverage.txt
# Display the Coverage Report
# Important: only report the monitored test coverage on Linux
- name: Display Collected Test Coverage - Linux Only
if: always() && matrix.os == 'ubuntu-latest'
run: |
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
CURRENT_GITHUB_STEP_SUMMARY="\`\`\`\n$(cat coverage.txt)\n\`\`\`"
echo "$CURRENT_GITHUB_STEP_SUMMARY" >> $GITHUB_STEP_SUMMARY
# Run and display the test coverage
# If the current operating system is MacOS, then only run test
# coverage monitoring and display it inside of the GitHub Actions
# panel. This allows for test coverage to be calculated for each
# operating system. However, coverage is only reported for Linux
# through the badge and through the GitHub job summary. Do not
# run any test coverage monitoring in Windows because it seems
# to be much slower and cause hypothesis-based tests to fail.
- name: Run and Report Test Coverage - MacOS Only
if: always() && matrix.os == 'macOS'
run: |
poetry run task test-silent
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: publish
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.11
- run: |
pip install poetry
poetry build
- uses: actions/upload-artifact@v3
with:
path: ./dist

pypi-publish:
needs: ['build']
environment: 'publish'

name: Upload Release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
- name: Publish Package Distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: artifact/
7 changes: 4 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
[www.contributor-covenant.org](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
[www.contributor-covenant.org](https://www.contributor-covenant.org/faq).
Translations are available at
[www.contributor-covenant.org](https://www.contributor-covenant.org/translations).
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

```
poetry run cellveyor --spreadsheet-directory \
/home/gkapfham/working/data/gradebook/2023 --spreadsheet-file CMPSC-203-Fall-2023-Gradebook.xlsx \
/home/gkapfham/working/data/gradebook/2023 --spreadsheet-file
CMPSC-203-Fall-2023-Gradebook.xlsx \
--sheet-name Main \
--key-attribute "Student GitHub" \
--key-value "gkapfham" \
--column-regexp "^(Summary Grade|Final Grade) .*$" \
--feedback-regexp "Summary Grade 1 - Feedback" \
--feedback-file /home/gkapfham/working/teaching/github-classroom/feedback/all/feedback.yml \
--feedback-file /home/gkapfham/working/teaching/github-classroom/feedback/developer-development/feedback-overall-course-assessment.yml \
--feedback-file /home/gkapfham/working/teaching/
github-classroom/feedback/all/feedback.yml \
--feedback-file /home/gkapfham/working/teaching/github-classroom/feedback/
developer-development/feedback-overall-course-assessment.yml \
--github-token <Private GitHub Acess Token> \
--github-organization Allegheny-Computer-Science-203-F2023 \
--github-repository-prefix computer-science-203-fall-2023-course-assessment \
Expand Down
1 change: 0 additions & 1 deletion cellveyor/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ def key_attribute_column_filter(
# for both of the two previous steps, make sure to drop any rows that contain NA values
# return the columns that were selected and then the resulting dataframe
return (selected_columns, result_df) # type: ignore

Loading

0 comments on commit 75554fe

Please sign in to comment.