Skip to content

Commit

Permalink
Merge pull request #190 from GatorEducator/feature/use-linters-plugins
Browse files Browse the repository at this point in the history
Use a Plugin-Based Approach to Provide a Linter-Inspired Interface
  • Loading branch information
schultzh authored Sep 6, 2019
2 parents dbc6d79 + a62a9ce commit 0170ad1
Show file tree
Hide file tree
Showing 65 changed files with 8,244 additions and 2,338 deletions.
1 change: 1 addition & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ engines:
enabled: true
exclude_paths:
- 'test/**'
- 'gator/checks/**'
- '.github/**'
- '.github/**/*'
- 'LICENSE.md'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ tags
tags.lock
tags.temp
tags.tmp
.maketags

# Extra files #
######################
Expand Down
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ os:

# ignore the virtualenv that Travis creates
# setup a secure login to CodeCov
# set env variables for different jobs
# set environment variables for different jobs
env:
# run build and test on two multiple versions of Python
matrix:
Expand All @@ -33,7 +33,7 @@ before_install:
- wget https://github.com/praekeltfoundation/travis-pyenv/releases/latest/download/setup-pyenv.sh
- source setup-pyenv.sh

# command to install dependencies (from Pipfile, not Pipfile.lock)
# run commands to install dependencies (from Pipfile, not Pipfile.lock)
# cannot use locked dependencies because of possible version changes
# between PYENV_VERSION versions
install:
Expand All @@ -48,9 +48,9 @@ notifications:
on_success: change
on_failure: always

# use a cache to improve performance
# cache pip installations
# cache pyenv installations
# use a cache to improve performance:
# --> cache pip installations
# --> cache pyenv installations
cache:
directories:
- $HOME/.pyenv_cache
Expand All @@ -73,11 +73,14 @@ script:
- mdl CONTRIBUTING.md
- mdl CODE_OF_CONDUCT.md

# report information to CodeCov and Codacy
# report information to CodeCov and Codacy and tag the release of a pull request:
# --> Report coverage to CodeCov, which ensures that coverages does not drop by more than a threshold
# --> Report coverage to Codacy, which reports changes at various levels of granularity
# --> Automatically apply a release tag to the pull request using pr-tag-release
after_success:
- pipenv run codecov
- pipenv run python-codacy-coverage -r coverage.xml
- test "$PYENV_VERSION" = "3.7.2" && test "$TRAVIS_OS_NAME" = "linux" &&
- test "$PYENV_VERSION" = "3.7.3" && test "$TRAVIS_OS_NAME" = "linux" &&
wget https://github.com/Michionlion/pr-tag-release/releases/latest/download/pr_tag_release.sh &&
source pr_tag_release.sh

Expand Down
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ to effectively contribute to the project.
+ [Test Coverage](#test-coverage)
+ [Code Linting](#code-linting)
+ [Continuous Integration](#continuous-integration)
+ [Program Debugging](#program-debugging)
* [External Resources](#external-resources)

## Code of Conduct
Expand Down Expand Up @@ -125,6 +126,25 @@ Linux and MacOS on Travis CI and in Windows on AppVeyor. Whenever feasible, we
run all tests and checks on all three of these operating systems and the most
recent version of Python versions 3.6 and 3.7.

### Program Debugging

The developers of GatorGrader use [Snoop](https://github.com/alexmojaki/snoop)
to suppert interactive debugging in circumstances when, say, a test case fails
or the program crashes during manual testing. You can enable Snoop-based
debugging for a specific Python module by adding the following code to the top
of the file, substituting `rrt` for a [color
scheme](https://help.farbox.com/pygments.html) that you enjoy using.

```python
import snoop
snoop.install(color="rrt")
```

For any Python function for which you want to enable Snoop-based debugging, you
can add the `@snoop` annotation immediately before the declaration of the
function. More details about the use of Snoop for debugging are available on
Snoop's GitHub repository.

## External Resources

GatorGrader's creators give presentations about the development, use, and
Expand Down
16 changes: 8 additions & 8 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
The GNU General Public License is a free, copyleft license for
software and other kinds of works.

The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all iMIT License or the GNU General Public Licensets users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
The licenses for most software and other practical works are designed to take
away your freedom to share and change the works. By contrast, the GNU General
Public License is intended to guarantee your freedom to share and change all
versions of a program--to make sure it remains free software for all MIT
License or the GNU General Public License users. We, the Free Software
Foundation, use the GNU General Public License for most of our software; it
applies also to any other work released this way by its authors. You can
apply it to your programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gitpython = "*"
requests = ">=2.20.0"
commonmark = "*"
num2words = "*"
pluginbase = "*"

[dev-packages]
pylint = "*"
Expand All @@ -24,6 +25,7 @@ codacy-coverage = "*"
pydocstyle = "*"
radon = "*"
xenon = "*"
snoop = "*"

[pipenv]
allow_prereleases = true
Expand Down
80 changes: 68 additions & 12 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coverage:
status:
project:
default:
threshold: 0.2
threshold: 2.0
if_not_found: success
patch:
default:
Expand Down
Loading

0 comments on commit 0170ad1

Please sign in to comment.