-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from maykinmedia/feature/update-project
Updated Django & package configuration from maykinmedia/default-app
- Loading branch information
Showing
14 changed files
with
269 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Run CI | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ['3.10', '3.11', '3.12'] | ||
django: ['3.2', '4.2'] | ||
|
||
name: Run the test suite (Python ${{ matrix.python }}, Django ${{ matrix.django }}) | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install dependencies | ||
run: pip install tox tox-gh-actions | ||
|
||
- name: Run tests | ||
run: tox | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python }} | ||
DJANGO: ${{ matrix.django }} | ||
|
||
- name: Publish coverage report | ||
uses: codecov/codecov-action@v3 | ||
|
||
publish: | ||
name: Publish package to PyPI | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
|
||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build sdist and wheel | ||
run: | | ||
pip install build --upgrade | ||
python -m build | ||
# TODO: switch to verified publishers | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Code quality checks | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
paths: | ||
- '**.py' | ||
pull_request: | ||
paths: | ||
- '**.py' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linting: | ||
name: Code-quality checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# toxenv: [isort, black, flake8, docs] | ||
toxenv: [isort, black, flake8] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: pip install tox | ||
- run: tox | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mail_editor" | ||
version = "0.3.6" | ||
description = "A Django package for email template editing" | ||
authors = [ | ||
{name = "Maykin Media", email = "support@maykinmedia.nl"} | ||
] | ||
readme = "README.rst" | ||
license = {file = "LICENSE"} | ||
keywords = ["TODO"] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
'Environment :: Web Environment', | ||
"Framework :: Django", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.2", | ||
"Intended Audience :: Developers", | ||
'License :: OSI Approved :: BSD License', | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
'Programming Language :: Python', | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
'Topic :: Internet :: WWW/HTTP', | ||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content', | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
requires-python = ">=3.10" | ||
dependencies = [ | ||
"django>=3.2", | ||
"django-choices", | ||
"django-ckeditor", | ||
"requests", | ||
"lxml", | ||
"css_inline" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/maykinmedia/mail-editor" | ||
Documentation = "https://github.com/maykinmedia/mail-editor" | ||
"Bug Tracker" = "https://github.com/maykinmedia/mail-editor/issues" | ||
"Source Code" = "https://github.com/maykinmedia/mail-editor" | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
"pytest", | ||
"pytest-django", | ||
"tox", | ||
"isort", | ||
"black", | ||
"flake8", | ||
"autoflake", | ||
"django_webtest", | ||
] | ||
coverage = [ | ||
"pytest-cov", | ||
] | ||
release = [ | ||
"bump-my-version", | ||
"twine", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["mail_editor*"] | ||
namespaces = false | ||
|
||
[tool.isort] | ||
profile = "black" | ||
combine_as_imports = true | ||
known_django = "django" | ||
known_first_party="mail_editor" | ||
sections=["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
DJANGO_SETTINGS_MODULE = "tests.settings" | ||
|
||
[tool.bumpversion] | ||
current_version = "0.3.5" | ||
files = [ | ||
{filename = "pyproject.toml"}, | ||
{filename = "README.rst"}, | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
"if (typing\\.)?TYPE_CHECKING:", | ||
"@(typing\\.)?overload", | ||
"class .*\\(.*Protocol.*\\):", | ||
"@(abc\\.)?abstractmethod", | ||
"raise NotImplementedError", | ||
"\\.\\.\\.", | ||
"pass", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.