Skip to content

Commit 79c856a

Browse files
committed
feat: output from app cookiecutter
plus make upgrade make requirements to fill those in
1 parent 090177a commit 79c856a

Some content is hidden

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

58 files changed

+3423
-2
lines changed

CHANGELOG.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Change Log
2+
##########
3+
4+
..
5+
All enhancements and patches to ai_aside 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.1.0 – 2023-05-10
20+
**********************************************
21+
22+
Added
23+
=====
24+
25+
* First release on PyPI.

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include CHANGELOG.rst
2+
include LICENSE.txt
3+
include README.rst
4+
include requirements/base.in
5+
include requirements/constraints.txt
6+
recursive-include ai_aside *.html *.png *.gif *.js *.css *.jpg *.jpeg *.svg

Makefile

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
.PHONY: clean compile_translations coverage diff_cover docs dummy_translations \
2+
extract_translations fake_translations help pii_check pull_translations push_translations \
3+
quality requirements selfcheck test test-all upgrade validate install_transifex_client
4+
5+
.DEFAULT_GOAL := help
6+
7+
# For opening files in a browser. Use like: $(BROWSER)relative/path/to/file.html
8+
BROWSER := python -m webbrowser file://$(CURDIR)/
9+
10+
help: ## display this help message
11+
@echo "Please use \`make <target>' where <target> is one of"
12+
@awk -F ':.*?## ' '/^[a-zA-Z]/ && NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
13+
14+
clean: ## remove generated byte code, coverage reports, and build artifacts
15+
find . -name '__pycache__' -exec rm -rf {} +
16+
find . -name '*.pyc' -exec rm -f {} +
17+
find . -name '*.pyo' -exec rm -f {} +
18+
find . -name '*~' -exec rm -f {} +
19+
coverage erase
20+
rm -fr build/
21+
rm -fr dist/
22+
rm -fr *.egg-info
23+
24+
coverage: clean ## generate and view HTML coverage report
25+
pytest --cov-report html
26+
$(BROWSER)htmlcov/index.html
27+
28+
docs: ## generate Sphinx HTML documentation, including API docs
29+
tox -e docs
30+
$(BROWSER)docs/_build/html/index.html
31+
32+
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
33+
PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS)
34+
35+
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
36+
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
37+
pip install -qr requirements/pip-tools.txt
38+
# Make sure to compile files after any other files they include!
39+
$(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in
40+
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
41+
pip install -qr requirements/pip.txt
42+
pip install -qr requirements/pip-tools.txt
43+
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
44+
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
45+
$(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in
46+
$(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in
47+
$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
48+
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
49+
# Let tox control the Django version for tests
50+
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
51+
mv requirements/test.tmp requirements/test.txt
52+
53+
quality: ## check coding style with pycodestyle and pylint
54+
tox -e quality
55+
56+
pii_check: ## check for PII annotations on all Django models
57+
tox -e pii_check
58+
59+
piptools: ## install pinned version of pip-compile and pip-sync
60+
pip install -r requirements/pip.txt
61+
pip install -r requirements/pip-tools.txt
62+
63+
requirements: piptools ## install development environment requirements
64+
pip-sync -q requirements/dev.txt requirements/private.*
65+
66+
test: clean ## run tests in the current virtualenv
67+
pytest
68+
69+
diff_cover: test ## find diff lines that need test coverage
70+
diff-cover coverage.xml
71+
72+
test-all: quality pii_check ## run tests on every supported Python/Django combination
73+
tox
74+
tox -e docs
75+
76+
validate: quality pii_check test ## run tests and quality checks
77+
78+
selfcheck: ## check that the Makefile is well-formed
79+
@echo "The Makefile is well-formed."
80+
81+
## Localization targets
82+
83+
extract_translations: ## extract strings to be translated, outputting .mo files
84+
rm -rf docs/_build
85+
cd ai_aside && ../manage.py makemessages -l en -v1 -d django
86+
cd ai_aside && ../manage.py makemessages -l en -v1 -d djangojs
87+
88+
compile_translations: ## compile translation files, outputting .po files for each supported language
89+
cd ai_aside && ../manage.py compilemessages
90+
91+
detect_changed_source_translations:
92+
cd ai_aside && i18n_tool changed
93+
94+
pull_translations: ## pull translations from Transifex
95+
tx pull -af -t --mode reviewed
96+
97+
push_translations: ## push source translation files (.po) from Transifex
98+
tx push -s
99+
100+
dummy_translations: ## generate dummy translation (.po) files
101+
cd ai_aside && i18n_tool dummy
102+
103+
build_dummy_translations: extract_translations dummy_translations compile_translations ## generate and compile dummy translation files
104+
105+
validate_translations: build_dummy_translations detect_changed_source_translations ## validate translations
106+
107+
install_transifex_client: ## Install the Transifex client
108+
# Instaling client will skip CHANGELOG and LICENSE files from git changes
109+
# so remind the user to commit the change first before installing client.
110+
git diff -s --exit-code HEAD || { echo "Please commit changes first."; exit 1; }
111+
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
112+
git checkout -- LICENSE README.md ## overwritten by Transifex installer

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.rst

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
ai-aside
2+
#############################
3+
4+
.. note::
5+
6+
This README was auto-generated. Maintainer: please review its contents and
7+
update all relevant sections. Instructions to you are marked with
8+
"PLACEHOLDER" or "TODO". Update or remove those sections, and remove this
9+
note when you are done.
10+
11+
|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
12+
|license-badge| |status-badge|
13+
14+
Purpose
15+
*******
16+
17+
temporary readme filler
18+
19+
TODO: The ``README.rst`` file should start with a brief description of the repository and its purpose.
20+
It should be described in the context of other repositories under the ``openedx``
21+
organization. It should make clear where this fits in to the overall Open edX
22+
codebase and should be oriented towards people who are new to the Open edX
23+
project.
24+
25+
Getting Started
26+
***************
27+
28+
Developing
29+
==========
30+
31+
One Time Setup
32+
--------------
33+
.. code-block::
34+
35+
# Clone the repository
36+
git clone [email protected]:openedx/ai-aside.git
37+
cd ai-aside
38+
39+
# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
40+
mkvirtualenv -p python3.8 ai-aside
41+
42+
43+
Every time you develop something in this repo
44+
---------------------------------------------
45+
.. code-block::
46+
47+
# Activate the virtualenv
48+
workon ai-aside
49+
50+
# Grab the latest code
51+
git checkout main
52+
git pull
53+
54+
# Install/update the dev requirements
55+
make requirements
56+
57+
# Run the tests and quality checks (to verify the status before you make any changes)
58+
make validate
59+
60+
# Make a new branch for your changes
61+
git checkout -b <your_github_username>/<short_description>
62+
63+
# Using your favorite editor, edit the code to make your change.
64+
vim ...
65+
66+
# Run your new tests
67+
pytest ./path/to/new/tests
68+
69+
# Run all the tests and quality checks
70+
make validate
71+
72+
# Commit all your changes
73+
git commit ...
74+
git push
75+
76+
# Open a PR and ask for review.
77+
78+
Deploying
79+
=========
80+
81+
TODO: How can a new user go about deploying this component? Is it just a few
82+
commands? Is there a larger how-to that should be linked here?
83+
84+
PLACEHOLDER: For details on how to deploy this component, see the `deployment how-to`_
85+
86+
.. _deployment how-to: https://docs.openedx.org/projects/ai-aside/how-tos/how-to-deploy-this-component.html
87+
88+
Getting Help
89+
************
90+
91+
Documentation
92+
=============
93+
94+
PLACEHOLDER: Start by going through `the documentation`_. If you need more help see below.
95+
96+
.. _the documentation: https://docs.openedx.org/projects/ai-aside
97+
98+
(TODO: `Set up documentation <https://openedx.atlassian.net/wiki/spaces/DOC/pages/21627535/Publish+Documentation+on+Read+the+Docs>`_)
99+
100+
More Help
101+
=========
102+
103+
If you're having trouble, we have discussion forums at
104+
https://discuss.openedx.org where you can connect with others in the
105+
community.
106+
107+
Our real-time conversations are on Slack. You can request a `Slack
108+
invitation`_, then join our `community Slack workspace`_.
109+
110+
For anything non-trivial, the best path is to open an issue in this
111+
repository with as many details about the issue you are facing as you
112+
can provide.
113+
114+
https://github.com/openedx/ai-aside/issues
115+
116+
For more information about these options, see the `Getting Help`_ page.
117+
118+
.. _Slack invitation: https://openedx.org/slack
119+
.. _community Slack workspace: https://openedx.slack.com/
120+
.. _Getting Help: https://openedx.org/getting-help
121+
122+
License
123+
*******
124+
125+
The code in this repository is licensed under the AGPL 3.0 unless
126+
otherwise noted.
127+
128+
Please see `LICENSE.txt <LICENSE.txt>`_ for details.
129+
130+
Contributing
131+
************
132+
133+
Contributions are very welcome.
134+
Please read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.
135+
136+
This project is currently accepting all types of contributions, bug fixes,
137+
security fixes, maintenance work, or new features. However, please make sure
138+
to have a discussion about your new feature idea with the maintainers prior to
139+
beginning development to maximize the chances of your change being accepted.
140+
You can start a conversation by creating a new issue on this repo summarizing
141+
your idea.
142+
143+
The Open edX Code of Conduct
144+
****************************
145+
146+
All community members are expected to follow the `Open edX Code of Conduct`_.
147+
148+
.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
149+
150+
People
151+
******
152+
153+
The assigned maintainers for this component and other project details may be
154+
found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``
155+
file in this repo.
156+
157+
.. _Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/ai-aside
158+
159+
Reporting Security Issues
160+
*************************
161+
162+
Please do not report security issues in public. Please email [email protected].
163+
164+
.. |pypi-badge| image:: https://img.shields.io/pypi/v/ai-aside.svg
165+
:target: https://pypi.python.org/pypi/ai-aside/
166+
:alt: PyPI
167+
168+
.. |ci-badge| image:: https://github.com/openedx/ai-aside/workflows/Python%20CI/badge.svg?branch=main
169+
:target: https://github.com/openedx/ai-aside/actions
170+
:alt: CI
171+
172+
.. |codecov-badge| image:: https://codecov.io/github/openedx/ai-aside/coverage.svg?branch=main
173+
:target: https://codecov.io/github/openedx/ai-aside?branch=main
174+
:alt: Codecov
175+
176+
.. |doc-badge| image:: https://readthedocs.org/projects/ai-aside/badge/?version=latest
177+
:target: https://docs.openedx.org/projects/ai-aside
178+
:alt: Documentation
179+
180+
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/ai-aside.svg
181+
:target: https://pypi.python.org/pypi/ai-aside/
182+
:alt: Supported Python versions
183+
184+
.. |license-badge| image:: https://img.shields.io/github/license/openedx/ai-aside.svg
185+
:target: https://github.com/openedx/ai-aside/blob/main/LICENSE.txt
186+
:alt: License
187+
188+
.. TODO: Choose one of the statuses below and remove the other status-badge lines.
189+
.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow
190+
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen
191+
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Deprecated-orange
192+
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Unsupported-red

ai_aside/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
temporary readme filler
3+
"""
4+
5+
__version__ = '0.1.0'

ai_aside/apps.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
ai_aside Django application initialization.
3+
"""
4+
5+
from django.apps import AppConfig
6+
7+
8+
class AiAsideConfig(AppConfig):
9+
"""
10+
Configuration for the ai_aside Django application.
11+
"""
12+
13+
name = 'ai_aside'

0 commit comments

Comments
 (0)