From 94339082189e085c13fba0f6cbc90dbeca3e72d9 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 10 Mar 2022 23:15:12 -0800 Subject: [PATCH 01/13] Delineate -ngx from -ng in changelog --- docs/changelog.rst | 69 ++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index cbabbaa42..e5acbafb4 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -52,8 +52,11 @@ Another big thanks to the people who have contributed translations: * Lars Sørensen (Lrss) suggested 167 translations into Danish. * Philmo67 suggested 11 translations into French. +Paperless-ng +############ + paperless-ng 1.5.0 -################## +================== Support for Python 3.6 was dropped. @@ -64,7 +67,7 @@ Support for Python 3.6 was dropped. * `Daniel Albers`_ added support for making the files and folders ignored by the paperless consume folder scanner configurable. See ``PAPERLESS_CONSUMER_IGNORE_PATTERNS``. paperless-ng 1.4.5 -################## +================== This is a maintenance release. @@ -77,7 +80,7 @@ This is a maintenance release. with PDFminer even from non-PDF files. paperless-ng 1.4.4 -################## +================== * Drastically decreased the startup time of the docker container. The startup script adjusts file permissions of all data only if changes are required. * Paperless mail: Added ability to specify the character set for each server. @@ -86,7 +89,7 @@ paperless-ng 1.4.4 * Updated translations. paperless-ng 1.4.3 -################## +================== * Additions and changes @@ -103,12 +106,12 @@ paperless-ng 1.4.3 * Fixed an issue with the document consumer crashing on certain documents due to issues with pdfminer.six. This library is used for PDF text extraction. paperless-ng 1.4.2 -################## +================== * Fixed an issue with ``sudo`` that caused paperless to not start on many Raspberry Pi devices. Thank you `WhiteHatTux`_! paperless-ng 1.4.1 -################## +================== * Added Polish locale. @@ -124,7 +127,7 @@ paperless-ng 1.4.1 ``PAPERLESS_ADMIN_PASSWORD`` as environment variables to the docker container. paperless-ng 1.4.0 -################## +================== * Docker images now use tesseract 4.1.1, which should fix a series of issues with OCR. @@ -157,7 +160,7 @@ paperless-ng 1.4.0 (see :ref:`administration-index`). paperless-ng 1.3.2 -################## +================== * Added translation into Portuguese. @@ -172,7 +175,7 @@ paperless-ng 1.3.2 * Fixed an issue with any/all/exact matching when characters used in regular expressions were used for the match. paperless-ng 1.3.1 -################## +================== * Added translation into Spanish and Russian. @@ -197,7 +200,7 @@ paperless-ng 1.3.1 * Fixed ``AUTO_LOGIN_USERNAME``: Unable to perform POST/PUT/DELETE requests and unable to receive WebSocket messages. paperless-ng 1.3.0 -################## +================== This release contains new database migrations. @@ -223,7 +226,7 @@ This release contains new database migrations. paperless-ng 1.2.1 -################## +================== * `Rodrigo Avelino `_ translated Paperless into Portuguese (Brazil)! @@ -236,7 +239,7 @@ paperless-ng 1.2.1 * Regression fix: Dates on the front end did not respect date locale settings in some cases. paperless-ng 1.2.0 -################## +================== * Changes to the OCRmyPDF integration @@ -260,14 +263,14 @@ paperless-ng 1.2.0 * Paperless no longer depends on ``libpoppler-cpp-dev``. paperless-ng 1.1.4 -################## +================== * Added English (GB) locale. * Added ISO-8601 date display option. paperless-ng 1.1.3 -################## +================== * Added a docker-specific configuration option to adjust the number of worker processes of the web server. See :ref:`configuration-docker`. @@ -277,7 +280,7 @@ paperless-ng 1.1.3 * Don't show inbox statistics if no inbox tag is defined. paperless-ng 1.1.2 -################## +================== * Always show top left corner of thumbnails, even for extra wide documents. @@ -293,7 +296,7 @@ paperless-ng 1.1.2 * Some memory usage optimizations. paperless-ng 1.1.1 -################## +================== This release contains new database migrations. @@ -314,7 +317,7 @@ This release contains new database migrations. also ensure that they're always executed as the paperless user and you're less likely to run into permission issues. See :ref:`utilities-management-commands`. paperless-ng 1.1.0 -################## +================== * Document processing status @@ -374,7 +377,7 @@ paperless-ng 1.1.0 ``PAPERLESS_LOGROTATE_MAX_BACKUPS``. paperless-ng 1.0.0 -################## +================== Nothing special about this release, but since there are relatively few bug reports coming in, I think that this is reasonably stable. @@ -397,7 +400,7 @@ Nothing special about this release, but since there are relatively few bug repor paperless-ng 0.9.14 -################### +=================== Starting with this version, releases are getting built automatically. This release also comes with changes on how to install and update paperless. @@ -445,13 +448,13 @@ update paperless. * An issue with the consumer crashing when invalid regular expression were used was fixed. paperless-ng 0.9.13 -################### +=================== * Fixed an issue with Paperless not starting due to the new Tika integration when ``USERMAP_UID`` and ``USERMAP_GID`` was used in the ``docker-compose.env`` file. paperless-ng 0.9.12 -################### +=================== * Paperless localization @@ -493,13 +496,13 @@ paperless-ng 0.9.12 a document that did not yet exist in the database. paperless-ng 0.9.11 -################### +=================== * Fixed an issue with the docker image not starting at all due to a configuration change of the web server. paperless-ng 0.9.10 -################### +=================== * Bulk editing @@ -532,7 +535,7 @@ paperless-ng 0.9.10 by :ref:`running the management command document_index with the argument reindex `. paperless-ng 0.9.9 -################## +================== Christmas release! @@ -566,7 +569,7 @@ Christmas release! * Most of the guesswork features have been removed. Paperless no longer tries to extract correspondents and tags from file names. paperless-ng 0.9.8 -################## +================== This release addresses two severe issues with the previous release. @@ -575,7 +578,7 @@ This release addresses two severe issues with the previous release. paperless-ng 0.9.7 -################## +================== * Front end @@ -617,7 +620,7 @@ paperless-ng 0.9.7 paperless-ng 0.9.6 -################## +================== This release focusses primarily on many small issues with the UI. @@ -658,7 +661,7 @@ This release focusses primarily on many small issues with the UI. paperless-ng 0.9.5 -################## +================== This release concludes the big changes I wanted to get rolled into paperless. The next releases before 1.0 will focus on fixing issues, primarily. @@ -708,7 +711,7 @@ focus on fixing issues, primarily. * Assigning correspondents from mail sender names failed for very long names. Paperless no longer assigns correspondents in these cases. paperless-ng 0.9.4 -################## +================== * Searching: @@ -736,7 +739,7 @@ paperless-ng 0.9.4 how to setup the development environment. paperless-ng 0.9.3 -################## +================== * Setting ``PAPERLESS_AUTO_LOGIN_USERNAME`` replaces ``PAPERLESS_DISABLE_LOGIN``. You have to specify your username. @@ -754,7 +757,7 @@ paperless-ng 0.9.3 * Added lots of tests for various parts of the application. paperless-ng 0.9.2 -################## +================== * Major changes to the front end (colors, logo, shadows, layout of the cards, better mobile support) @@ -784,7 +787,7 @@ paperless-ng 0.9.2 up in the admin. paperless-ng 0.9.1 -################## +================== * Moved documentation of the settings to the actual documentation. * Updated release script to force the user to choose between SQLite @@ -792,7 +795,7 @@ paperless-ng 0.9.1 paperless-ng 0.9.0 -################## +================== * **Deprecated:** GnuPG. :ref:`See this note on the state of GnuPG in paperless-ng. ` This features will most likely be removed in future versions. From a757778fbad6713522b555e962503507fe5ef452 Mon Sep 17 00:00:00 2001 From: Quinn Casey Date: Fri, 11 Mar 2022 09:09:48 -0800 Subject: [PATCH 02/13] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..0bb900f82 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +hello@paperless-ngx.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From e1c6042189bd85be7ba4b86b1878d069e8f030ec Mon Sep 17 00:00:00 2001 From: Quinn Casey Date: Fri, 11 Mar 2022 10:23:59 -0800 Subject: [PATCH 03/13] Add Organization Structure & Membership --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 70f58d4fa..79afd3cef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,3 +93,38 @@ Note that _en-us_ needs to stay on top of the list, as it is the default project If you are familiar with Git, feel free to send a Pull Request with those changes. If not, let us know in the issue you created for the language, so that another developer can make these changes. + +# Organization Structure & Membership + +Paperless-ngx is a community project. We do our best to delegate permission and responsibility among a team of people to ensure the longevity of the project. + +## Structure + +As of writing, there are 21 members in paperless-ngx. 4 of these people have complete administrative privliges to the repo: + +* [@shamoon](https://github.com/shamoon) +* [@bauerj](https://github.com/bauerj) +* [@qcasey](https://github.com/qcasey) +* [@FrankStrieter](https://github.com/FrankStrieter) + +There are 5 teams collaborating on specific tasks within paperless-ngx: + +* @paperless-ngx/backend (Python / django) +* @paperless-ngx/frontend (JavaScript / Typescript) +* @paperless-ngx/ci-cd (GitHub Actions / Deployment) +* @paperless-ngx/issues (Issue triage) +* @paperless-ngx/test (General testing for larger PRs) + +## Permissions + +All team members are notified when mentioned or assigned to a relevant issue or pull request. Additionally, each team has slightly different access to paperless-ngx: + +* The **test** team has no special permissions. +* The **issues** team has `triage` access. This means they can organize issues and pull requests. +* The **backend**, **frontend**, and **ci-cd** teams have `write` access. This means they can approve PRs and push code, containers, releases, and more. + +## Joining + +We are not overly strict with inviting people to the organization. If you have read the [team permissions](#permissions) and think having additional access would enhance your contributions, please reach out to an [admin](#structure) of the team. + +The admins occasionally invite contributors directly if we believe having them on a team will accelerate their work. \ No newline at end of file From cae26f4f7095e5d9e3567d0ecebbed2eee098e17 Mon Sep 17 00:00:00 2001 From: Quinn Casey Date: Fri, 11 Mar 2022 11:01:24 -0800 Subject: [PATCH 04/13] Fix typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 79afd3cef..81f9e8a5f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,7 +100,7 @@ Paperless-ngx is a community project. We do our best to delegate permission and ## Structure -As of writing, there are 21 members in paperless-ngx. 4 of these people have complete administrative privliges to the repo: +As of writing, there are 21 members in paperless-ngx. 4 of these people have complete administrative privileges to the repo: * [@shamoon](https://github.com/shamoon) * [@bauerj](https://github.com/bauerj) From b220d15fff0cfb0b2853cf700ee87a9d8a317ed7 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 13 Mar 2022 01:08:49 -0800 Subject: [PATCH 05/13] Create PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..2df49622c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +## Description + +Please include a summary of the change and which issue is fixed (if any) and any relevant motivation / context. List any dependencies that are required for this change. +Screenshots and / or videos can also be helpful if appropriate. + +Fixes # (issue) + +## Type of change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) + +## Checklist: + +- [ ] I have read & agree with the [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/main/CODE_OF_CONDUCT.md). +- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers. +- [ ] If applicable, I have checked that all tests pass, see [documentation](https://paperless-ngx.readthedocs.io/en/latest/extending.html#back-end-development). +- [ ] I have run all `pre-commit` hooks, see [documentation](https://paperless-ngx.readthedocs.io/en/latest/contributing.html#pre-commit-hooks). +- [ ] I have made corresponding changes to the documentation as needed. +- [ ] I have checked my modifications for any breaking changes. From 33a58238015d4b4af3832d33fe534d0737bd3e8a Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 13 Mar 2022 01:15:15 -0800 Subject: [PATCH 06/13] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2df49622c..1f2648101 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,6 +5,12 @@ Screenshots and / or videos can also be helpful if appropriate. Fixes # (issue) +Please also tag the relevant team to help with review. You can tag any of the following: +@paperless-ngx/backend (Python / django, database, etc.) +@paperless-ngx/frontend (JavaScript/Typescript, HTML, CSS, etc.) +@paperless-ngx/ci-cd (GitHub Actions, deployment) +@paperless-ngx/test (General testing for larger PRs) + ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) @@ -13,7 +19,7 @@ Fixes # (issue) ## Checklist: -- [ ] I have read & agree with the [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/main/CODE_OF_CONDUCT.md). +- [ ] I have read & agree with the [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/main/CONTRIBUTING.md). - [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers. - [ ] If applicable, I have checked that all tests pass, see [documentation](https://paperless-ngx.readthedocs.io/en/latest/extending.html#back-end-development). - [ ] I have run all `pre-commit` hooks, see [documentation](https://paperless-ngx.readthedocs.io/en/latest/contributing.html#pre-commit-hooks). From af525447925168dcddafe8bd652e3a1cb632766e Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 13 Mar 2022 03:56:59 -0700 Subject: [PATCH 07/13] Update PR template with suggestions --- .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1f2648101..c942464e1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,21 +1,31 @@ -## Description +## Proposed change + Fixes # (issue) + ## Type of change + + - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Other (please explain) ## Checklist: From 20566b6571831c532ba92ac4c519cecbfcb21ecc Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 13 Mar 2022 04:14:00 -0700 Subject: [PATCH 08/13] Add note to include how to test --- .github/PULL_REQUEST_TEMPLATE.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c942464e1..49e36e35b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,7 @@ ## Proposed change Fixes # (issue) @@ -19,7 +18,7 @@ Please also tag the relevant team to help with review. You can tag any of the fo - [ ] Bug fix (non-breaking change which fixes an issue) From a6d2a390f024fe4fe04de135431a77efef0faea0 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 13 Mar 2022 20:54:06 -0700 Subject: [PATCH 09/13] Add review groups --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0d64b9a15..789d117bb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,6 +11,9 @@ updates: # Check the npm registry for updates every week schedule: interval: "weekly" + # Add reviewers + reviewers: + - "paperless-ngx/frontend" # Enable version updates for Python - package-ecosystem: "pip" @@ -20,3 +23,6 @@ updates: # Check for updates once a week schedule: interval: "weekly" + # Add reviewers + reviewers: + - "paperless-ngx/backend" From 0cf9b11c3ee0615eb1ce5f3a578551a701036c08 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 19 Mar 2022 17:34:28 +0100 Subject: [PATCH 10/13] master to main in paperless development docs --- docs/extending.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extending.rst b/docs/extending.rst index df5f5241d..71dce05b2 100644 --- a/docs/extending.rst +++ b/docs/extending.rst @@ -7,7 +7,7 @@ This section describes the steps you need to take to start development on paperl Check out the source from github. The repository is organized in the following way: -* ``master`` always represents the latest release and will only see changes +* ``main`` always represents the latest release and will only see changes when a new release is made. * ``dev`` contains the code that will be in the next release. * ``feature-X`` contain bigger changes that will be in some release, but not From 30b3510fbd6dfc94c3f3cc7ff5e36f630497c654 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 19 Mar 2022 17:37:43 +0100 Subject: [PATCH 11/13] master to main in CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81f9e8a5f..0d5467751 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ Paperless supports python 3.8 and 3.9. We format Python code with [Black](https: ## Branches -`master` always reflects the latest release. Apart from changes to the documentation or readme, absolutely no functional changes on this branch in between releases. +`main` always reflects the latest release. Apart from changes to the documentation or readme, absolutely no functional changes on this branch in between releases. `dev` contains all changes that will be part of the next release. Use this branch to start making your changes. @@ -127,4 +127,4 @@ All team members are notified when mentioned or assigned to a relevant issue or We are not overly strict with inviting people to the organization. If you have read the [team permissions](#permissions) and think having additional access would enhance your contributions, please reach out to an [admin](#structure) of the team. -The admins occasionally invite contributors directly if we believe having them on a team will accelerate their work. \ No newline at end of file +The admins occasionally invite contributors directly if we believe having them on a team will accelerate their work. From 6f7aaba7faf5a33087809404316005266e8a7fdd Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 20 Mar 2022 20:53:30 -0700 Subject: [PATCH 12/13] Add Automatic Project Actions [ci skip] --- .github/workflows/project-actions.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/project-actions.yml diff --git a/.github/workflows/project-actions.yml b/.github/workflows/project-actions.yml new file mode 100644 index 000000000..2cf98bf4b --- /dev/null +++ b/.github/workflows/project-actions.yml @@ -0,0 +1,44 @@ +name: Project automations +on: + issues: + types: + - opened + - reopened + pull_request: + types: + - opened + - reopened + +# map fields with customized labels +env: + todo: Todo + done: Done + in_progress: In Progress + +jobs: + issue_opened_or_reopened: + name: issue_opened_or_reopened + runs-on: ubuntu-latest + if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened') + steps: + - name: Move issue to ${{ env.todo }} + uses: leonsteinhaeuser/project-beta-automations@v1.2.1 + with: + gh_token: ${{ secrets.GH_TOKEN }} + organization: paperless-ngx + project_id: 2 + resource_node_id: ${{ github.event.issue.node_id }} + status_value: ${{ env.todo }} # Target status + pr_opened_or_reopened_or_reviewrequested: + name: pr_opened_or_reopened_or_reviewrequested + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'review_requested') + steps: + - name: Move PR to ${{ env.in_progress }} + uses: leonsteinhaeuser/project-beta-automations@v1.2.1 + with: + gh_token: ${{ secrets.GH_TOKEN }} + organization: paperless-ngx + project_id: 2 + resource_node_id: ${{ github.event.pull_request.node_id }} + status_value: ${{ env.in_progress }} # Target status From 8059039ef4a2c3ac94c669ab74334a6062fdaa02 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 20 Mar 2022 20:58:57 -0700 Subject: [PATCH 13/13] Remove and integrate content from contributing.rst --- docs/contributing.rst | 145 --------------------------------------- docs/extending.rst | 59 ++++++++++++---- docs/index.rst | 1 - src/paperless/version.py | 2 +- 4 files changed, 47 insertions(+), 160 deletions(-) delete mode 100644 docs/contributing.rst diff --git a/docs/contributing.rst b/docs/contributing.rst deleted file mode 100644 index f24ea9bdc..000000000 --- a/docs/contributing.rst +++ /dev/null @@ -1,145 +0,0 @@ -.. _contributing: - -Contributing to Paperless -######################### - -.. warning:: - - This section is not updated to paperless-ngx yet. - -Maybe you've been using Paperless for a while and want to add a feature or two, -or maybe you've come across a bug that you have some ideas how to solve. The -beauty of Free software is that you can see what's wrong and help to get it -fixed for everyone! - - -How to Get Your Changes Rolled Into Paperless -============================================= - -If you've found a bug, but don't know how to fix it, you can always post an -issue on `GitHub`_ in the hopes that someone will have the time to fix it for -you. If however you're the one with the time, pull requests are always -welcome, you just have to make sure that your code conforms to a few standards: - -Pep8 ----- - -It's the standard for all Python development, so it's `very well documented`_. -The short version is: - -* Lines should wrap at 79 characters -* Use ``snake_case`` for variables, ``CamelCase`` for classes, and ``ALL_CAPS`` - for constants. -* Space out your operators: ``stuff + 7`` instead of ``stuff+7`` -* Two empty lines between classes, and functions, but 1 empty line between - class methods. - -There's more to it than that, but if you follow those, you'll probably be -alright. When you submit your pull request, there's a pep8 checker that'll -look at your code to see if anything is off. If it finds anything, it'll -complain at you until you fix it. - - -Additional Style Guides ------------------------ - -Where pep8 is ambiguous, I've tried to be a little more specific. These rules -aren't hard-and-fast, but if you can conform to them, I'll appreciate it and -spend less time trying to conform your PR before merging: - - -Function calls -.............. - -If you're calling a function and that necessitates more than one line of code, -please format it like this: - -.. code:: python - - my_function( - argument1, - kwarg1="x", - kwarg2="y" - another_really_long_kwarg="some big value" - a_kwarg_calling_another_long_function=another_function( - another_arg, - another_kwarg="kwarg!" - ) - ) - -This is all in the interest of code uniformity rather than anything else. If -we stick to a style, everything is understandable in the same way. - - -Quoting Strings -............... - -pep8 is a little too open-minded on this for my liking. Python strings should -be quoted with double quotes (``"``) except in cases where the resulting string -would require too much escaping of a double quote, in which case, a single -quoted, or triple-quoted string will do: - -.. code:: python - - my_string = "This is my string" - problematic_string = 'This is a "string" with "quotes" in it' - -In HTML templates, please use double-quotes for tag attributes, and single -quotes for arguments passed to Django template tags: - -.. code:: html - -
- link this -
- -This is to keep linters happy they look at an HTML file and see an attribute -closing the ``"`` before it should have been. - --- - -That's all there is in terms of guidelines, so I hope it's not too daunting. - - -Indentation & Spacing -..................... - -When it comes to indentation: - -* For Python, the rule is: follow pep8 and use 4 spaces. -* For Javascript, CSS, and HTML, please use 1 tab. - -Additionally, Django templates making use of block elements like ``{% if %}``, -``{% for %}``, and ``{% block %}`` etc. should be indented: - -Good: - -.. code:: html - - {% block stuff %} -

This is the stuff

- {% endblock %} - -Bad: - -.. code:: html - - {% block stuff %} -

This is the stuff

- {% endblock %} - - -The Code of Conduct -=================== - -Paperless has a `code of conduct`_. It's a lot like the other ones you see out -there, with a few small changes, but basically it boils down to: - -> Don't be an ass, or you might get banned. - -I'm proud to say that the CoC has never had to be enforced because everyone has -been awesome, friendly, and professional. - -.. _GitHub: https://github.com/the-paperless-project/paperless/issues -.. _very well documented: https://www.python.org/dev/peps/pep-0008/ -.. _code of conduct: https://github.com/the-paperless-project/paperless/blob/master/CODE_OF_CONDUCT.md diff --git a/docs/extending.rst b/docs/extending.rst index 71dce05b2..46b1e7ad7 100644 --- a/docs/extending.rst +++ b/docs/extending.rst @@ -1,7 +1,7 @@ .. _extending: -Paperless development -##################### +Paperless-ngx Development +######################### This section describes the steps you need to take to start development on paperless-ngx. @@ -23,6 +23,31 @@ Apart from that, the folder structure is as follows: * ``scripts/`` - Various scripts that help with different parts of development. * ``docker/`` - Files required to build the docker image. +Contributing to Paperless +========================= + +Maybe you've been using Paperless for a while and want to add a feature or two, +or maybe you've come across a bug that you have some ideas how to solve. The +beauty of open source software is that you can see what's wrong and help to get +it fixed for everyone! + +Before contributing please review our `code of conduct`_ and other important +information in the `contributing guidelines`_. + +Code formatting with pre-commit Hooks +===================================== + +To ensure a consistent style and formatting across the project source, the project +utilizes a Git `pre-commit` 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`, +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 ============================= @@ -37,13 +62,19 @@ To do the setup you need to perform the steps from the following chapters in a c $ npm install -g @angular/cli -4. Create ``consume`` and ``media`` folders in the cloned root folder. +4. Install pre-commit + + .. code:: shell-session + + pre-commit install + +5. Create ``consume`` and ``media`` folders in the cloned root folder. .. code:: shell-session mkdir -p consume media -5. You can now either ... +6. You can now either ... * install redis or * use the included scripts/start-services.sh to use docker to fire up a redis instance (and some other services such as tika, gotenberg and a postgresql server) or @@ -53,41 +84,41 @@ To do the setup you need to perform the steps from the following chapters in a c docker run -d -p 6379:6379 --restart unless-stopped redis:latest -6. Install the python dependencies by performing in the src/ directory. +7. Install the python dependencies by performing in the src/ directory. .. code:: shell-session 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 `_ to install a specific python version. -7. 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 time only). From src-ui directory: +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 time only). From src-ui directory: .. code:: shell-session npm install . ./node_modules/.bin/ng build --configuration production -8. Apply migrations and create a superuser for your dev instance: +9. Apply migrations and create a superuser for your dev instance: .. code:: shell-session python3 manage.py migrate python3 manage.py createsuperuser -9. Now spin up the dev backend. Depending on which part of paperless you're developing for, you need to have some or all of them running. +10. Now spin up the dev backend. Depending on which part of paperless you're developing for, you need to have some or all of them running. .. code:: shell-session python3 manage.py runserver & python3 manage.py document_consumer & python3 manage.py qcluster -10. Login with the superuser credentials provided in step 8 at ``http://localhost:8000`` to create a session that enables you to use the backend. +11. Login with the superuser credentials provided in step 8 at ``http://localhost:8000`` to create a session that enables you to use the backend. Backend development environment is now ready, to start Frontend development go to ``/src-ui`` and run ``ng serve``. From there you can use ``http://localhost:4200`` for a preview. Back end development ==================== -The backend is a django application. I use PyCharm for development, but you can use whatever +The backend is a django 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 @@ -121,9 +152,8 @@ Testing and code style: Front end development ===================== -The front end is build using angular. I use the ``Code - OSS`` IDE for development. - -In order to get started, you need ``npm``. Install the Angular CLI interface with +The front end is built using Angular. In order to get started, you need ``npm``. +Install the Angular CLI interface with .. code:: shell-session @@ -361,3 +391,6 @@ that returns information about your parser: download. We could guess that from the file extensions, but some mime types have many extensions associated with them and the python methods responsible for guessing the extension do not always return the same value. + +.. _code of conduct: https://github.com/paperless-ngx/paperless-ngx/blob/main/CODE_OF_CONDUCT.md +.. _contributing guidelines: https://github.com/paperless-ngx/paperless-ngx/blob/main/CONTRIBUTING.md diff --git a/docs/index.rst b/docs/index.rst index ec436b5c1..040d39e4f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -70,7 +70,6 @@ Contents faq troubleshooting extending - contributing scanners screenshots changelog diff --git a/src/paperless/version.py b/src/paperless/version.py index e75384eea..92334dbc3 100644 --- a/src/paperless/version.py +++ b/src/paperless/version.py @@ -1 +1 @@ -__version__ = (1, 5, 0) +__version__ = (1, 6, 0)