Squashed commit of the following:
commitb1410a854eMerge:f9ce4d8f8ec9c77eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Dec 29 20:09:09 2022 -0800 Merge pull request #2263 from paperless-ngx/v1.11.0-changelog [Documentation] Add v1.11.0 changelog commit8ec9c77e51Author: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Dec 30 04:08:17 2022 +0000 Changelog v1.11.0 - GHA commitf9ce4d8f6aAuthor: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Dec 29 19:40:25 2022 -0800 Update version strings for 1.11.0 commit8c9a74ee0cMerge:605f86f00b59ef2cAuthor: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Dec 29 19:39:38 2022 -0800 Merge branch 'dev' commit605f86f0cfMerge:800e842a8cbaca22Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Dec 28 15:55:35 2022 -0800 Merge pull request #2256 from mendelk/patch-1 Fixed typo in docs commit8cbaca22c1Author: Mendel Kramer <mendelk@users.noreply.github.com> Date: Wed Dec 28 18:16:00 2022 -0500 Fixed typo in docs commit800e842ab3Author: ThellraAK <github.com@absurdlybored.com> Date: Wed Dec 21 01:36:37 2022 -0900 Removing Mariadb default open port (#2227) * Removing Mariadb default open port Removing the listening port 3306 for the DB, Docker networks will let the containers talk to one another. The existing setup would allow anyone to connect to the DB and use the default passwords. * Update docker-compose.mariadb-tika.yml Adding change to the other compose file to remove open port * Remove excess blank lines * Remove excess blank lines Co-authored-by: Felix E <felix@eckhofer.com> commit6f6f365e2bMerge:6d324dbd43b863b8Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Dec 17 19:58:06 2022 -0800 Merge pull request #2203 from tooomm/docs_updates Docs: More fixes and improvements commit43b863b816Author: tooomm <tooomm@users.noreply.github.com> Date: Sun Dec 11 19:44:18 2022 +0100 doc fixes This reverts commit e015babdc102a65a3cce0cc71812d3eb730da92e. link fix fix escaping, spacing, profile links, typo revert ~~add~~ at fixes Revert "~~add~~ at fixes" This reverts commit ce0192b733c19614048de81ea917660e25bb35f2. commit6d324dbd8eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Dec 16 09:10:11 2022 -0800 Update config.yml commit8ddf05e573Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Dec 16 09:09:48 2022 -0800 Update bug-report.yml commit0472dfe25aAuthor: tooomm <tooomm@users.noreply.github.com> Date: Sun Dec 11 19:12:58 2022 +0100 Docs: Fix leftover issues from conversion (#2172) commit8b36c9ad64Author: tooomm <tooomm@users.noreply.github.com> Date: Sun Dec 11 16:07:08 2022 +0100 more fixes and cleanup commit1266f2d5b9Author: tooomm <tooomm@users.noreply.github.com> Date: Sun Dec 11 12:06:15 2022 +0100 fix links commit8196051959Merge:06a6eb03d198142aAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Dec 9 16:12:20 2022 -0800 Merge pull request #2157 from Weltraumschaf/patch-1 Update setup.md commitd198142a1eAuthor: Sven Strittmatter <ich@weltraumschaf.de> Date: Fri Dec 9 22:09:06 2022 +0100 Update setup.md W/o the slash it resolves to /setup/configuration/ which does 404. commit06a6eb0326Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Dec 9 08:15:03 2022 -0800 fix code block indentation commit28819d6d0fAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Dec 9 08:11:42 2022 -0800 Fix code block indentation commit8cd5e25364Merge:32d546747788d932Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Dec 6 11:23:15 2022 -0800 Merge pull request #2137 from paperless-ngx/more-docs-cleanup Chore: Cleanup of new documentation commit7788d93227Author: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sun Dec 4 08:34:49 2022 -0800 Further cleanup of docs, including fixing autoconvert issues and general cleanups commit32d546740bMerge:b0ca57a724da3e50Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Dec 4 19:12:27 2022 -0800 Merge pull request #2118 from alexander-bauer/chart-bump commit24da3e5034Author: Alexander Bauer <sasha@linux.com> Date: Mon Dec 5 02:51:35 2022 +0000 Bump Helm Chart version to trigger release commitb0ca57a7f0Merge:cdd49c51c864b3cdAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Dec 4 14:36:00 2022 -0800 Merge pull request #2114 from paperless-ngx/v1.10.2-changelog [Documentation] Add v1.10.2 changelog commitcdd49c5142Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Dec 4 14:32:08 2022 -0800 Update frontend compilation info commitc864b3cd19Author: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun Dec 4 21:17:16 2022 +0000 Changelog v1.10.2 - GHA
This commit is contained in:
@@ -39,16 +39,16 @@ guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/main/CONTRIBUTIN
|
||||
## Code formatting with pre-commit Hooks
|
||||
|
||||
To ensure a consistent style and formatting across the project source,
|
||||
the project utilizes a Git [pre-commit]{.title-ref} hook to perform some
|
||||
formatting and linting before a commit is allowed. That way, everyone
|
||||
uses the same style and some common issues can be caught early on. See
|
||||
below for installation instructions.
|
||||
the project utilizes a Git [`pre-commit`](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
|
||||
hook to perform some formatting and linting before a commit is allowed.
|
||||
That way, everyone uses the same style and some common issues can be caught
|
||||
early on. See below for installation instructions.
|
||||
|
||||
Once installed, hooks will run when you commit. If the formatting isn't
|
||||
quite right or a linter catches something, the commit will be rejected.
|
||||
You'll need to look at the output and fix the issue. Some hooks, such
|
||||
as the Python formatting tool [black]{.title-ref}, will format failing
|
||||
files, so all you need to do is [git add]{.title-ref} those files again
|
||||
as the Python formatting tool `black`, will format failing
|
||||
files, so all you need to do is `git add` those files again
|
||||
and retry your commit.
|
||||
|
||||
## Initial setup and first start
|
||||
@@ -58,7 +58,7 @@ first-time setup. To do the setup you need to perform the steps from the
|
||||
following chapters in a certain order:
|
||||
|
||||
1. Install prerequisites + pipenv as mentioned in
|
||||
`[Bare metal route](/setup#bare_metal)
|
||||
[Bare metal route](/setup#bare_metal)
|
||||
|
||||
2. Copy `paperless.conf.example` to `paperless.conf` and enable debug
|
||||
mode.
|
||||
@@ -69,7 +69,7 @@ following chapters in a certain order:
|
||||
$ npm install -g @angular/cli
|
||||
```
|
||||
|
||||
4. Install pre-commit
|
||||
4. Install pre-commit hooks
|
||||
|
||||
```shell-session
|
||||
pre-commit install
|
||||
@@ -81,7 +81,7 @@ following chapters in a certain order:
|
||||
mkdir -p consume media
|
||||
```
|
||||
|
||||
6. You can now either \...
|
||||
6. You can now either ...
|
||||
|
||||
- install redis or
|
||||
|
||||
@@ -91,9 +91,9 @@ following chapters in a certain order:
|
||||
|
||||
- spin up a bare redis container
|
||||
|
||||
> ```shell-session
|
||||
> docker run -d -p 6379:6379 --restart unless-stopped redis:latest
|
||||
> ```
|
||||
```shell-session
|
||||
docker run -d -p 6379:6379 --restart unless-stopped redis:latest
|
||||
```
|
||||
|
||||
7. Install the python dependencies by performing in the src/ directory.
|
||||
|
||||
@@ -101,10 +101,12 @@ following chapters in a certain order:
|
||||
pipenv install --dev
|
||||
```
|
||||
|
||||
> - Make sure you're using python 3.9.x or lower. Otherwise you might
|
||||
> get issues with building dependencies. You can use
|
||||
> [pyenv](https://github.com/pyenv/pyenv) to install a specific
|
||||
> python version.
|
||||
!!! note
|
||||
|
||||
Make sure you're using python 3.10.x or lower. Otherwise you might
|
||||
get issues with building dependencies. You can use
|
||||
[pyenv](https://github.com/pyenv/pyenv) to install a specific
|
||||
python version.
|
||||
|
||||
8. Generate the static UI so you can perform a login to get session
|
||||
that is required for frontend development (this needs to be done one
|
||||
@@ -126,9 +128,9 @@ following chapters in a certain order:
|
||||
you're developing for, you need to have some or all of them
|
||||
running.
|
||||
|
||||
> ```shell-session
|
||||
> python3 manage.py runserver & python3 manage.py document_consumer & celery --app paperless worker
|
||||
> ```
|
||||
```shell-session
|
||||
python3 manage.py runserver & python3 manage.py document_consumer & celery --app paperless worker
|
||||
```
|
||||
|
||||
11. Login with the superuser credentials provided in step 8 at
|
||||
`http://localhost:8000` to create a session that enables you to use
|
||||
@@ -140,15 +142,15 @@ development go to `/src-ui` and run `ng serve`. From there you can use
|
||||
|
||||
## Back end development
|
||||
|
||||
The backend is a django application. PyCharm works well for development,
|
||||
The backend is a [Django](https://www.djangoproject.com/) application. PyCharm works well for development,
|
||||
but you can use whatever you want.
|
||||
|
||||
Configure the IDE to use the src/ folder as the base source folder.
|
||||
Configure the following launch configurations in your IDE:
|
||||
|
||||
- python3 manage.py runserver
|
||||
- celery \--app paperless worker
|
||||
- python3 manage.py document_consumer
|
||||
- `python3 manage.py runserver`
|
||||
- `celery --app paperless worker`
|
||||
- `python3 manage.py document_consumer`
|
||||
|
||||
To start them all:
|
||||
|
||||
@@ -158,24 +160,26 @@ python3 manage.py runserver & python3 manage.py document_consumer & celery --app
|
||||
|
||||
Testing and code style:
|
||||
|
||||
- Run `pytest` in the src/ directory to execute all tests. This also
|
||||
- Run `pytest` in the `src/` directory to execute all tests. This also
|
||||
generates a HTML coverage report. When runnings test, paperless.conf
|
||||
is loaded as well. However: the tests rely on the default
|
||||
configuration. This is not ideal. But for now, make sure no settings
|
||||
except for DEBUG are overridden when testing.
|
||||
|
||||
- Coding style is enforced by the Git pre-commit hooks. These will
|
||||
ensure your code is formatted and do some linting when you do a [git
|
||||
commit]{.title-ref}.
|
||||
ensure your code is formatted and do some linting when you do a `git commit`.
|
||||
|
||||
- You can also run `black` manually to format your code
|
||||
|
||||
!!! note
|
||||
- The `pre-commit` hooks will modify files and interact with each other.
|
||||
It may take a couple of `git add`, `git commit` cycle to satisfy them.
|
||||
|
||||
!!! note
|
||||
|
||||
The line length rule E501 is generally useful for getting multiple
|
||||
source files next to each other on the screen. However, in some
|
||||
cases, its just not possible to make some lines fit, especially
|
||||
complicated IF cases. Append `# NOQA: E501` to disable this check
|
||||
complicated IF cases. Append `# noqa: E501` to disable this check
|
||||
for certain lines.
|
||||
|
||||
## Front end development
|
||||
@@ -353,7 +357,8 @@ LANGUAGES = [
|
||||
|
||||
## Building the documentation
|
||||
|
||||
The documentation is built using material-mkdocs, see their [documentation](https://squidfunk.github.io/mkdocs-material/reference/). If you want to build the documentation locally, this is how you do it:
|
||||
The documentation is built using material-mkdocs, see their [documentation](https://squidfunk.github.io/mkdocs-material/reference/).
|
||||
If you want to build the documentation locally, this is how you do it:
|
||||
|
||||
1. Install python dependencies.
|
||||
|
||||
@@ -366,7 +371,7 @@ The documentation is built using material-mkdocs, see their [documentation](http
|
||||
|
||||
```shell-session
|
||||
$ cd /path/to/paperless
|
||||
$ pipenv mkdocs build
|
||||
$ pipenv mkdocs build --config-file mkdocs.yml
|
||||
```
|
||||
|
||||
## Building the Docker image
|
||||
@@ -379,9 +384,9 @@ helper script `build-docker-image.sh`.
|
||||
|
||||
Building the docker image from source:
|
||||
|
||||
> ```shell-session
|
||||
> ./build-docker-image.sh Dockerfile -t <your-tag>
|
||||
> ```
|
||||
```shell-session
|
||||
./build-docker-image.sh Dockerfile -t <your-tag>
|
||||
```
|
||||
|
||||
## Extending Paperless
|
||||
|
||||
@@ -428,7 +433,7 @@ class MyCustomParser(DocumentParser):
|
||||
def get_thumbnail(self, document_path, mime_type):
|
||||
# This should return the path to a thumbnail you created for this
|
||||
# document.
|
||||
return os.path.join(self.tempdir, "thumb.png")
|
||||
return os.path.join(self.tempdir, "thumb.webp")
|
||||
```
|
||||
|
||||
If you encounter any issues during parsing, raise a
|
||||
|
||||
Reference in New Issue
Block a user