Skip to content

Commit

Permalink
Version 2.2 (#1288)
Browse files Browse the repository at this point in the history
* 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 <safaariman@gmail.com>
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 <zbirder@gmail.com>
Co-authored-by: Mark Walker <mark.walker@realbuzz.com>
Co-authored-by: Simon Krull <krull@punkt.de>
Co-authored-by: Jacob Rief <jacob.rief@uibk.ac.at>
  • Loading branch information
5 people authored Apr 20, 2022
1 parent 9400ff7 commit ee1a72e
Show file tree
Hide file tree
Showing 38 changed files with 487 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- run: python -m pip install sphinx
- run: python -m pip install -r docs/requirements.txt
- name: Build docs
run: |
cd docs
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish-to-live-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Python 🐍 distributions 📦 to pypi

on:
release:
types:
- published

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Python 🐍 distributions 📦 to TestPyPI

on:
push:
branches:
- master

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ jobs:
django-2.2.txt,
django-3.0.txt,
django-3.1.txt,
django-3.2.txt
django-3.2.txt,
django-4.0.txt
]
exclude:
- python-version: 3.7
requirements-file: django-4.0.txt
- python-version: 3.9
requirements-file: django-2.2.txt
- python-version: 3.10
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.log
*.pot
.DS_Store
.coverage
.coverage/
.eggs/
.idea/
Expand All @@ -17,6 +18,8 @@ docs/_build/
dist/
env/
.venv/
/*docs/env*/
/*docs/_build*/

/~
/node_modules
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
CHANGELOG
=========

2.1.3 (next)
============
2.2 (2022-04-20)
================

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


2.1.2 (2021-11-09)
Expand Down
29 changes: 28 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
VENV = env/bin/activate
PORT = 8001

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand All @@ -17,6 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " run to build the docs, watch for changes, and serve them at http://0.0.0.0:8001"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
Expand All @@ -32,7 +35,22 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

@echo " spelling to check for typos in documentation"

install:
@echo "... setting up virtualenv"
python3 -m venv env
. $(VENV); pip install -r requirements.txt

@echo "\n" \
"-------------------------------------------------------------------------------------------------- \n" \
"* watch, build and serve the documentation: make run \n" \
"* check spelling: make spelling \n" \
"\n" \
"enchant must be installed in order for pyenchant (and therefore spelling checks) to work. See \n" \
"http://docs.django-cms.org/en/latest/contributing/documentation.html#install-the-spelling-software \n" \
"-------------------------------------------------------------------------------------------------- \n" \

clean:
-rm -rf $(BUILDDIR)/*

Expand Down Expand Up @@ -128,3 +146,12 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

spelling:
. $(VENV); $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) build/spelling
@echo
@echo "Check finished. Wrong words can be found in " \
"build/spelling/output.txt."

run:
. $(VENV); sphinx-autobuild $(ALLSPHINXOPTS) build/html --host 0.0.0.0 --port $(PORT)
70 changes: 70 additions & 0 deletions docs/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
=========================
Django Filer Documentation
=========================

Run the documentation locally
-----------------------------

Install the Enchant libary
~~~~~~~~~~~~~~~~~~~~~~~~~~

You will need to install the
`enchant <https://www.abisource.com/projects/enchant/>`__ library that
is used by ``pyenchant`` for spelling.

macOS:
^^^^^^

.. code:: bash
brew install enchant
After that:

Fork & Clone the repository:
^^^^^^^^^^^^^^^^^^^^^

.. code:: bash
git@github.com:your-github-username/django-filer.git
Switch to the django-filer/docs directory:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: bash
cd django-filer/docs
Install the dependencies:
^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: bash
make install
This command creates a virtual environment and installs the required
dependencies there.

Start the development server:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: bash
make run
Open the local docs instance in your browser:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: bash
open http://0.0.0.0:8001/
The documentation uses livereload. This means, that every time something
is changed, the documentation will automatically reload in your
browser.

Contribute
----------

If you find anything that could be improved or changed in your opinion,
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.
23 changes: 19 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinxcontrib.spelling',
"sphinx_copybutton",
"sphinxext.opengraph",
'sphinxcontrib.images',
]

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

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

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'furo'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
"navigation_with_keys": True,
}

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

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}

images_config = {
'override_image_directive': True,
}
Loading

0 comments on commit ee1a72e

Please sign in to comment.