Skip to content

Commit c0c06f4

Browse files
committed
chore: edx-cookiecutter cookiecutter-python-library
0 parents  commit c0c06f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3421
-0
lines changed

.coveragerc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
branch = True
3+
source = c4_doc_oct

.editorconfig

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# ***************************
2+
# ** DO NOT EDIT THIS FILE **
3+
# ***************************
4+
#
5+
# This file was generated by edx-lint: https://github.com/openedx/edx-lint
6+
#
7+
# If you want to change this file, you have two choices, depending on whether
8+
# you want to make a local change that applies only to this repo, or whether
9+
# you want to make a central change that applies to all repos using edx-lint.
10+
#
11+
# Note: If your .editorconfig file is simply out-of-date relative to the latest
12+
# .editorconfig in edx-lint, ensure you have the latest edx-lint installed
13+
# and then follow the steps for a "LOCAL CHANGE".
14+
#
15+
# LOCAL CHANGE:
16+
#
17+
# 1. Edit the local .editorconfig_tweaks file to add changes just to this
18+
# repo's file.
19+
#
20+
# 2. Run:
21+
#
22+
# $ edx_lint write .editorconfig
23+
#
24+
# 3. This will modify the local file. Submit a pull request to get it
25+
# checked in so that others will benefit.
26+
#
27+
#
28+
# CENTRAL CHANGE:
29+
#
30+
# 1. Edit the .editorconfig file in the edx-lint repo at
31+
# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/.editorconfig
32+
#
33+
# 2. install the updated version of edx-lint (in edx-lint):
34+
#
35+
# $ pip install .
36+
#
37+
# 3. Run (in edx-lint):
38+
#
39+
# $ edx_lint write .editorconfig
40+
#
41+
# 4. Make a new version of edx_lint, submit and review a pull request with the
42+
# .editorconfig update, and after merging, update the edx-lint version and
43+
# publish the new version.
44+
#
45+
# 5. In your local repo, install the newer version of edx-lint.
46+
#
47+
# 6. Run:
48+
#
49+
# $ edx_lint write .editorconfig
50+
#
51+
# 7. This will modify the local file. Submit a pull request to get it
52+
# checked in so that others will benefit.
53+
#
54+
#
55+
#
56+
#
57+
#
58+
# STAY AWAY FROM THIS FILE!
59+
#
60+
#
61+
#
62+
#
63+
#
64+
# SERIOUSLY.
65+
#
66+
# ------------------------------
67+
# Generated by edx-lint version: 5.2.5
68+
# ------------------------------
69+
[*]
70+
end_of_line = lf
71+
insert_final_newline = true
72+
charset = utf-8
73+
indent_style = space
74+
indent_size = 4
75+
max_line_length = 120
76+
trim_trailing_whitespace = true
77+
78+
[{Makefile, *.mk}]
79+
indent_style = tab
80+
indent_size = 8
81+
82+
[*.{yml,yaml,json}]
83+
indent_size = 2
84+
85+
[*.js]
86+
indent_size = 2
87+
88+
[*.diff]
89+
trim_trailing_whitespace = false
90+
91+
[.git/*]
92+
trim_trailing_whitespace = false
93+
94+
[COMMIT_EDITMSG]
95+
max_line_length = 72
96+
97+
[*.rst]
98+
max_line_length = 79
99+
100+
# f2f02689fced7a2e0c62c2f9803184114dc2ae4b

.github/PULL_REQUEST_TEMPLATE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
**Merge checklist:**
3+
Check off if complete *or* not applicable:
4+
- [ ] Version bumped
5+
- [ ] Changelog record added
6+
- [ ] Documentation updated (not only docstrings)
7+
- [ ] Fixup commits are squashed away
8+
- [ ] Unit tests added/updated
9+
- [ ] Noted any: Concerns, dependencies, migration issues, deadlines, tickets

.github/workflows/ci.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches:
8+
- '**'
9+
10+
11+
jobs:
12+
run_tests:
13+
name: tests
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-20.04]
18+
python-version: ['3.8']
19+
toxenv: ["py38", "quality", "docs", "pii_check"]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: setup python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install pip
29+
run: pip install -r requirements/pip.txt
30+
31+
- name: Install Dependencies
32+
run: pip install -r requirements/ci.txt
33+
34+
- name: Run Tests
35+
env:
36+
TOXENV: ${{ matrix.toxenv }}
37+
run: tox
38+
39+
- name: Run coverage
40+
if: matrix.python-version == '3.8' && matrix.toxenv == 'py38'
41+
uses: codecov/codecov-action@v3
42+
with:
43+
flags: unittests
44+
fail_ci_if_error: true

.github/workflows/commitlint.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Run commitlint on the commit messages in a pull request.
2+
3+
name: Lint Commit Messages
4+
5+
on:
6+
- pull_request
7+
8+
jobs:
9+
commitlint:
10+
uses: openedx/.github/.github/workflows/commitlint.yml@master

.github/workflows/pypi-publish.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish package to PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
push:
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: setup python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
19+
20+
- name: Install pip
21+
run: pip install -r requirements/pip.txt
22+
23+
- name: Build package
24+
run: python setup.py sdist bdist_wheel
25+
26+
- name: Publish to PyPi
27+
uses: pypa/gh-action-pypi-publish@master
28+
with:
29+
user: __token__
30+
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Upgrade Python Requirements
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * 1"
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: "Target branch against which to create requirements PR"
10+
required: true
11+
default: 'main'
12+
13+
jobs:
14+
call-upgrade-python-requirements-workflow:
15+
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
16+
with:
17+
branch: ${{ github.event.inputs.branch || 'main' }}
18+
# optional parameters below; fill in if you'd like github or email notifications
19+
# user_reviewers: ""
20+
# team_reviewers: ""
21+
# email_address: ""
22+
# send_success_notification: false
23+
secrets:
24+
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
25+
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
26+
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
27+
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}

.gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*.py[cod]
2+
__pycache__
3+
.pytest_cache
4+
5+
# C extensions
6+
*.so
7+
8+
# Packages
9+
*.egg
10+
*.egg-info
11+
/dist
12+
/build
13+
/eggs
14+
/parts
15+
/bin
16+
/var
17+
/sdist
18+
/develop-eggs
19+
/.installed.cfg
20+
/lib
21+
/lib64
22+
23+
# Installer logs
24+
pip-log.txt
25+
26+
# Unit test / coverage reports
27+
.cache/
28+
.pytest_cache/
29+
.coverage
30+
.coverage.*
31+
.tox
32+
coverage.xml
33+
htmlcov/
34+
35+
36+
37+
# The Silver Searcher
38+
.agignore
39+
40+
# OS X artifacts
41+
*.DS_Store
42+
43+
# Logging
44+
log/
45+
logs/
46+
chromedriver.log
47+
ghostdriver.log
48+
49+
# Complexity
50+
output/*.html
51+
output/*/index.html
52+
53+
# Sphinx
54+
docs/_build
55+
docs/modules.rst
56+
docs/c4_doc_oct.rst
57+
docs/c4_doc_oct.*.rst
58+
59+
# Private requirements
60+
requirements/private.in
61+
requirements/private.txt

.readthedocs.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/conf.py
11+
12+
python:
13+
version: 3.8
14+
install:
15+
- requirements: requirements/doc.txt

CHANGELOG.rst

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Change Log
2+
##########
3+
4+
..
5+
All enhancements and patches to c4_doc_oct will be documented
6+
in this file. It adheres to the structure of https://keepachangelog.com/ ,
7+
but in reStructuredText instead of Markdown (for ease of incorporation into
8+
Sphinx documentation and the PyPI description).
9+
10+
This project adheres to Semantic Versioning (https://semver.org/).
11+
12+
.. There should always be an "Unreleased" section for changes pending release.
13+
14+
Unreleased
15+
**********
16+
17+
*
18+
19+
0.0.1 – 2023-09-24
20+
**********************************************
21+
22+
Added
23+
=====
24+
25+
* First release on PyPI.

0 commit comments

Comments
 (0)