Skip to content

Commit

Permalink
feat: First commit!
Browse files Browse the repository at this point in the history
  • Loading branch information
morenol committed Apr 21, 2021
0 parents commit 107e553
Show file tree
Hide file tree
Showing 50 changed files with 4,075 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
branch = True
data_file = .coverage
source=openedx_filters
omit =
tests
94 changes: 94 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# ***************************
# ** DO NOT EDIT THIS FILE **
# ***************************
#
# This file was generated by edx-lint: http://github.com/edx/edx-lint
#
# If you want to change this file, you have two choices, depending on whether
# you want to make a local change that applies only to this repo, or whether
# you want to make a central change that applies to all repos using edx-lint.
#
# LOCAL CHANGE:
#
# 1. Edit the local .editorconfig_tweaks file to add changes just to this
# repo's file.
#
# 2. Run:
#
# $ edx_lint write .editorconfig
#
# 3. This will modify the local file. Submit a pull request to get it
# checked in so that others will benefit.
#
#
# CENTRAL CHANGE:
#
# 1. Edit the .editorconfig file in the edx-lint repo at
# https://github.com/edx/edx-lint/blob/master/edx_lint/files/.editorconfig
#
# 2. install the updated version of edx-lint (in edx-lint):
#
# $ pip install .
#
# 3. Run (in edx-lint):
#
# # uses .editorconfig_tweaks from edx-lint for linting in edx-lint
# # NOTE: Use Python 3.x, which no longer includes comments in the output file
# $ edx_lint write .editorconfig
#
# 4. Make a new version of edx_lint, submit and review a pull request with the
# .editorconfig update, and after merging, update the edx-lint version by
# creating a new tag in the repo (uses pbr).
#
# 5. In your local repo, install the newer version of edx-lint.
#
# 6. Run:
#
# # uses local .editorconfig_tweaks
# $ edx_lint write .editorconfig
#
# 7. This will modify the local file. Submit a pull request to get it
# checked in so that others will benefit.
#
#
#
#
#
# STAY AWAY FROM THIS FILE!
#
#
#
#
#
# SERIOUSLY.
#
# ------------------------------
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
max_line_length = 120
trim_trailing_whitespace = true

[{Makefile, *.mk}]
indent_style = tab
indent_size = 8

[*.{yml,yaml,json}]
indent_size = 2

[*.js]
indent_size = 2

[*.diff]
trim_trailing_whitespace = false

[.git/*]
trim_trailing_whitespace = false

[*.rst]
max_line_length = 79

# 01d24285b953f74272f86b1e42a0235315085e59
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
**Description:** Describe in a couple of sentences what this PR adds

**JIRA:** Link to JIRA ticket

**Dependencies:** dependencies on other outstanding PRs, issues, etc.

**Merge deadline:** List merge deadline (if any)

**Installation instructions:** List any non-trivial installation
instructions.

**Testing instructions:**

1. Open page A
2. Do thing B
3. Expect C to happen
4. If D happened instead - check failed.

**Reviewers:**
- [ ] tag reviewer
- [ ] tag reviewer

**Merge checklist:**
- [ ] All reviewers approved
- [ ] CI build is green
- [ ] Version bumped
- [ ] Changelog record added
- [ ] Documentation updated (not only docstrings)
- [ ] Commits are squashed

**Post merge:**
- [ ] Create a tag
- [ ] Check new version is pushed to PyPI after tag-triggered build is
finished.
- [ ] Delete working branch (if not needed anymore)

**Author concerns:** List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Python CI

on:
push:
branches: [ main ]
pull_request:
branches:
- '**'


jobs:
run_tests:
name: tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: ["py38", "quality", "docs"]

steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install -r requirements/pip.txt

- name: Install Dependencies
run: pip install -r requirements/ci.txt

- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox

- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'quality'
uses: codecov/codecov-action@v1
with:
flags: unittests
fail_ci_if_error: true
30 changes: 30 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish package to PyPi

on:
release:
types: [published]

jobs:

push:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install pip
run: pip install -r requirements/pip.txt

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
*.py[cod]
__pycache__
.pytest_cache

# C extensions
*.so

# Packages
*.egg
*.egg-info
/dist
/build
/eggs
/parts
/bin
/var
/sdist
/develop-eggs
/.installed.cfg
/lib
/lib64

# Installer logs
pip-log.txt

# Unit test / coverage reports
.cache/
.pytest_cache/
.coverage
.coverage.*
.tox
coverage.xml
htmlcov/



# The Silver Searcher
.agignore

# OS X artifacts
*.DS_Store

# Logging
log/
logs/
chromedriver.log
ghostdriver.log

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build
docs/modules.rst
docs/openedx_filters.rst
docs/openedx_filters.*.rst

# Private requirements
requirements/private.in
requirements/private.txt
15 changes: 15 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

python:
version: 3.8
install:
- requirements: requirements/doc.txt
25 changes: 25 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Change Log
----------

..
All enhancements and patches to openedx_filters will be documented
in this file. It adheres to the structure of https://keepachangelog.com/ ,
but in reStructuredText instead of Markdown (for ease of incorporation into
Sphinx documentation and the PyPI description).
This project adheres to Semantic Versioning (https://semver.org/).
.. There should always be an "Unreleased" section for changes pending release.
Unreleased
~~~~~~~~~~

*

[0.1.0] - 2021-04-07
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Added
_____

* First release on PyPI.
Loading

0 comments on commit 107e553

Please sign in to comment.