Skip to content

Commit ee1a72e

Browse files
jriefvicalloymarkswebSimon Krull
authored
Version 2.2 (#1288)
* Update views.py fix 404 error for thumbnail. * feat: Added actions for pypi release automation * Fix typo * Remove duplication of flake8 and isort configs so it's just in setup.cfg * FEATURE: switch to furo theme & add functionality to run the docs locally * TASK: update .gitignore * BUGFIX: fix docs workflow * TASK: Add images & update .gitignore file * Bump to version 2.2 * Squashed commit of the following: commit ec886f1 Author: Safa Ariman <[email protected]> Date: Sun Dec 19 14:24:05 2021 +0300 Fix upload invalid SVG file * add all fixes to Changelog * remove legacy code * add extra test to increase coverage * Update CHANGELOG.rst * prepare for Django-4.0 # Conflicts: # filer/models/foldermodels.py * request.is_ajax has been removed from Django-4 * prepare for Django-4 * fix isort complain * Experimental support for Django-4 * remove double requirement * remove double requirement * fix: add missing comma * add migration required for Django-4 * fix isort complain Co-authored-by: vicalloy <[email protected]> Co-authored-by: Mark Walker <[email protected]> Co-authored-by: Simon Krull <[email protected]> Co-authored-by: Jacob Rief <[email protected]>
1 parent 9400ff7 commit ee1a72e

38 files changed

+487
-98
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: actions/setup-python@v2
1414
with:
1515
python-version: 3.9
16-
- run: python -m pip install sphinx
16+
- run: python -m pip install -r docs/requirements.txt
1717
- name: Build docs
1818
run: |
1919
cd docs
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Python 🐍 distributions 📦 to pypi
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to pypi
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.9
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.9
18+
19+
- name: Install pypa/build
20+
run: >-
21+
python -m
22+
pip install
23+
build
24+
--user
25+
- name: Build a binary wheel and a source tarball
26+
run: >-
27+
python -m
28+
build
29+
--sdist
30+
--wheel
31+
--outdir dist/
32+
.
33+
34+
- name: Publish distribution 📦 to PyPI
35+
if: startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Python 🐍 distributions 📦 to TestPyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.9
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.9
18+
19+
- name: Install pypa/build
20+
run: >-
21+
python -m
22+
pip install
23+
build
24+
--user
25+
- name: Build a binary wheel and a source tarball
26+
run: >-
27+
python -m
28+
build
29+
--sdist
30+
--wheel
31+
--outdir dist/
32+
.
33+
34+
- name: Publish distribution 📦 to Test PyPI
35+
uses: pypa/gh-action-pypi-publish@master
36+
with:
37+
user: __token__
38+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
39+
repository_url: https://test.pypi.org/legacy/
40+
skip_existing: true

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ jobs:
1313
django-2.2.txt,
1414
django-3.0.txt,
1515
django-3.1.txt,
16-
django-3.2.txt
16+
django-3.2.txt,
17+
django-4.0.txt
1718
]
1819
exclude:
20+
- python-version: 3.7
21+
requirements-file: django-4.0.txt
1922
- python-version: 3.9
2023
requirements-file: django-2.2.txt
2124
- python-version: 3.10

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.log
55
*.pot
66
.DS_Store
7+
.coverage
78
.coverage/
89
.eggs/
910
.idea/
@@ -17,6 +18,8 @@ docs/_build/
1718
dist/
1819
env/
1920
.venv/
21+
/*docs/env*/
22+
/*docs/_build*/
2023

2124
/~
2225
/node_modules

CHANGELOG.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22
CHANGELOG
33
=========
44

5-
2.1.3 (next)
6-
============
5+
2.2 (2022-04-20)
6+
================
77

88
* Improve the list view of Folder permissions.
99
* Fix: Folder permissions were disabled for descendants, if parent folder
1010
has type set to CHILDREN.
1111
* The input field for Folder changes from a standard HTML select element to
1212
a very wide autocomplete field, showing the complete path in Filer.
13+
* Fix: Upload invalid SVG file.
14+
* Add support for Python-3.10.
15+
* Switch theme for readthedocs to Furo.
16+
* Fix: 404 error when serving thumbnail.
17+
* Experimental support for Django-4.
1318

1419

1520
2.1.2 (2021-11-09)

docs/Makefile

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = _build
9+
VENV = env/bin/activate
10+
PORT = 8001
911

1012
# Internal variables.
1113
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -17,6 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1719
help:
1820
@echo "Please use \`make <target>' where <target> is one of"
1921
@echo " html to make standalone HTML files"
22+
@echo " run to build the docs, watch for changes, and serve them at http://0.0.0.0:8001"
2023
@echo " dirhtml to make HTML files named index.html in directories"
2124
@echo " singlehtml to make a single large HTML file"
2225
@echo " pickle to make pickle files"
@@ -32,7 +35,22 @@ help:
3235
@echo " changes to make an overview of all changed/added/deprecated items"
3336
@echo " linkcheck to check all external links for integrity"
3437
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
35-
38+
@echo " spelling to check for typos in documentation"
39+
40+
install:
41+
@echo "... setting up virtualenv"
42+
python3 -m venv env
43+
. $(VENV); pip install -r requirements.txt
44+
45+
@echo "\n" \
46+
"-------------------------------------------------------------------------------------------------- \n" \
47+
"* watch, build and serve the documentation: make run \n" \
48+
"* check spelling: make spelling \n" \
49+
"\n" \
50+
"enchant must be installed in order for pyenchant (and therefore spelling checks) to work. See \n" \
51+
"http://docs.django-cms.org/en/latest/contributing/documentation.html#install-the-spelling-software \n" \
52+
"-------------------------------------------------------------------------------------------------- \n" \
53+
3654
clean:
3755
-rm -rf $(BUILDDIR)/*
3856

@@ -128,3 +146,12 @@ doctest:
128146
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
129147
@echo "Testing of doctests in the sources finished, look at the " \
130148
"results in $(BUILDDIR)/doctest/output.txt."
149+
150+
spelling:
151+
. $(VENV); $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) build/spelling
152+
@echo
153+
@echo "Check finished. Wrong words can be found in " \
154+
"build/spelling/output.txt."
155+
156+
run:
157+
. $(VENV); sphinx-autobuild $(ALLSPHINXOPTS) build/html --host 0.0.0.0 --port $(PORT)

docs/README.rst

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
=========================
2+
Django Filer Documentation
3+
=========================
4+
5+
Run the documentation locally
6+
-----------------------------
7+
8+
Install the Enchant libary
9+
~~~~~~~~~~~~~~~~~~~~~~~~~~
10+
11+
You will need to install the
12+
`enchant <https://www.abisource.com/projects/enchant/>`__ library that
13+
is used by ``pyenchant`` for spelling.
14+
15+
macOS:
16+
^^^^^^
17+
18+
.. code:: bash
19+
20+
brew install enchant
21+
22+
After that:
23+
24+
Fork & Clone the repository:
25+
^^^^^^^^^^^^^^^^^^^^^
26+
27+
.. code:: bash
28+
29+
[email protected]:your-github-username/django-filer.git
30+
31+
Switch to the django-filer/docs directory:
32+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
34+
.. code:: bash
35+
36+
cd django-filer/docs
37+
38+
Install the dependencies:
39+
^^^^^^^^^^^^^^^^^^^^^^^^^
40+
41+
.. code:: bash
42+
43+
make install
44+
45+
This command creates a virtual environment and installs the required
46+
dependencies there.
47+
48+
Start the development server:
49+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
51+
.. code:: bash
52+
53+
make run
54+
55+
Open the local docs instance in your browser:
56+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57+
58+
.. code:: bash
59+
60+
open http://0.0.0.0:8001/
61+
62+
The documentation uses livereload. This means, that every time something
63+
is changed, the documentation will automatically reload in your
64+
browser.
65+
66+
Contribute
67+
----------
68+
69+
If you find anything that could be improved or changed in your opinion,
70+
feel free to create a pull request.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/conf.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@
3030

3131
# Add any Sphinx extension module names here, as strings. They can be extensions
3232
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
33-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode']
33+
extensions = [
34+
'sphinx.ext.autodoc',
35+
'sphinx.ext.doctest',
36+
'sphinx.ext.intersphinx',
37+
'sphinx.ext.todo',
38+
'sphinxcontrib.spelling',
39+
"sphinx_copybutton",
40+
"sphinxext.opengraph",
41+
'sphinxcontrib.images',
42+
]
3443

3544
# Add any paths that contain templates here, relative to this directory.
3645
templates_path = ['_templates']
@@ -69,7 +78,7 @@
6978

7079
# List of patterns, relative to source directory, that match files and
7180
# directories to ignore when looking for source files.
72-
exclude_patterns = ['_build']
81+
exclude_patterns = ['_build', '_images', 'README.rst']
7382

7483
# The reST default role (used for this markup: `text`) to use for all documents.
7584
#default_role = None
@@ -96,12 +105,14 @@
96105

97106
# The theme to use for HTML and HTML Help pages. See the documentation for
98107
# a list of builtin themes.
99-
html_theme = 'default'
108+
html_theme = 'furo'
100109

101110
# Theme options are theme-specific and customize the look and feel of a theme
102111
# further. For a list of options available for each theme, see the
103112
# documentation.
104-
#html_theme_options = {}
113+
html_theme_options = {
114+
"navigation_with_keys": True,
115+
}
105116

106117
# Add any paths that contain custom themes here, relative to this directory.
107118
#html_theme_path = []
@@ -223,3 +234,7 @@
223234

224235
# Example configuration for intersphinx: refer to the Python standard library.
225236
intersphinx_mapping = {'http://docs.python.org/': None}
237+
238+
images_config = {
239+
'override_image_directive': True,
240+
}

0 commit comments

Comments
 (0)