From 4d0a73dab2c49713491b4793cd95c9ff1c4645ee Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 1 Feb 2020 21:22:57 +0000 Subject: [PATCH 0001/1132] Incrementing version to v2.2 [ci skip] Update changelog --- CHANGELOG.md | 14 +++++--------- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c635848..707e1322 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,15 +12,9 @@ - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) -**Updated documentation:** +## [v2.2](https://pypi.org/project/jrnl/v2.2/) (2020-02-01) -- Updating/clarifying template explanation [\#829](https://github.com/jrnl-org/jrnl/pull/829) ([heymajor](https://github.com/heymajor)) - -# Changelog - -## [Unreleased](https://github.com/jrnl-org/jrnl/) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1.1...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.2-beta2...v2.2) **Implemented enhancements:** @@ -37,7 +31,8 @@ **Build:** -- Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) +- Fix issue where jrnl would always out 'source' for version, fix Poetry config to build and publish properly [\#820](https://github.com/jrnl-org/jrnl/pull/820) ([wren](https://github.com/wren)) +- Unpin poetry [\#808](https://github.com/jrnl-org/jrnl/pull/808) ([wren](https://github.com/wren)) - Change PyPI auth method in build pipeline [\#807](https://github.com/jrnl-org/jrnl/pull/807) ([wren](https://github.com/wren)) - Automagically update the changelog you see before your very eyes! [\#806](https://github.com/jrnl-org/jrnl/pull/806) ([wren](https://github.com/wren)) - Update Black version and lock file to fix builds on develop branch [\#784](https://github.com/jrnl-org/jrnl/pull/784) ([wren](https://github.com/wren)) @@ -50,6 +45,7 @@ **Updated documentation:** +- Explain how fish can be configured to exclude jrnl commands from history by default [\#809](https://github.com/jrnl-org/jrnl/pull/809) ([aureooms](https://github.com/aureooms)) - Remove merge marker in recipes.md [\#782](https://github.com/jrnl-org/jrnl/pull/782) ([markphelps](https://github.com/markphelps)) - Fix merge conflict left-over [\#767](https://github.com/jrnl-org/jrnl/pull/767) ([thejspr](https://github.com/thejspr)) - Display header in docs on mobile devices [\#763](https://github.com/jrnl-org/jrnl/pull/763) ([maebert](https://github.com/maebert)) diff --git a/pyproject.toml b/pyproject.toml index c4a7e41c..beb98479 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.2-beta2" +version = "v2.2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "Manuel Ebert ", From f83f486659dc42b8fd738dfab18a98e7acd811a1 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 1 Feb 2020 14:51:19 -0800 Subject: [PATCH 0002/1132] Take out build system from pyproject config #781 We don't use it, and it breaks the homebrew install. --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index beb98479..e1dfcfbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,3 @@ black = {version = "^19.10b0",allow-prereleases = true} [tool.poetry.scripts] jrnl = 'jrnl.cli:run' -[build-system] -requires = ["poetry>=0.12"] -build-backend = "poetry.masonry.api" - From 252ab7256b480235dc0de71804770115dbe44bad Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Thu, 6 Feb 2020 06:27:18 +0000 Subject: [PATCH 0003/1132] Incrementing version to v2.2.1-beta2 [ci skip] Update changelog --- CHANGELOG.md | 4 ++++ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 707e1322..c19dee9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) +**Updated documentation:** + +- Updating/clarifying template explanation [\#829](https://github.com/jrnl-org/jrnl/pull/829) ([heymajor](https://github.com/heymajor)) + ## [v2.2](https://pypi.org/project/jrnl/v2.2/) (2020-02-01) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.2-beta2...v2.2) diff --git a/pyproject.toml b/pyproject.toml index e1dfcfbd..9dc76df4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.2" +version = "v2.2.1-beta2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "Manuel Ebert ", From a4da8f49e97212b057694443df35e9c351d3425b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Feb 2020 20:12:49 +0000 Subject: [PATCH 0004/1132] Updating changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c19dee9c..c174fa89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Build:** +- Remove poetry from build system in pyproject config to fix `brew install` [\#830](https://github.com/jrnl-org/jrnl/pull/830) ([wren](https://github.com/wren)) - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) **Updated documentation:** From aacc245dc86318859616ab26d389d4402e91c0ca Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 8 Feb 2020 12:13:53 -0800 Subject: [PATCH 0005/1132] Small fixes to changelog --- CHANGELOG.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c174fa89..8ec60e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ ## [v2.2](https://pypi.org/project/jrnl/v2.2/) (2020-02-01) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.2-beta2...v2.2) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1.1...v2.2) **Implemented enhancements:** @@ -57,7 +57,7 @@ ## [v2.1.1](https://pypi.org/project/jrnl/v2.1.1/) (2019-11-26) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1.1-beta...v2.1.1) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1.post2...v2.1.1) **Implemented enhancements:** @@ -80,7 +80,7 @@ ## [v2.1.post2](https://pypi.org/project/jrnl/v2.1.post2/) (2019-11-11) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1-beta6...v2.1.post2) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.0.1...v2.1.post2) **Fixed bugs:** @@ -98,7 +98,7 @@ ## [v2.0.1](https://pypi.org/project/jrnl/v2.0.1/) (2019-09-26) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.0.1-beta...v2.0.1) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.0.0...v2.0.1) **Implemented enhancements:** @@ -116,7 +116,9 @@ ## [v2.0.0](https://pypi.org/project/jrnl/v2.0.0/) (2019-08-24) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.0-rc4...v2.0.0) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/1.9.8...v2.0.0) + +🚨 **BREAKING CHANGES** 🚨 **Implemented enhancements:** - Change cryptographic backend from PyCrypto to cryptography.io From 8b7ebe2dcdb8d3aec9519b593bb283bcb8f1fc43 Mon Sep 17 00:00:00 2001 From: Stav Shamir Date: Sat, 8 Feb 2020 22:18:01 +0200 Subject: [PATCH 0006/1132] Add test scenarios for the export feature (#824) * Fix behave keyword "and" to correct case "And" * Extract export_steps module * Add scenario for XML export * Add scenario for tags export * Add scenario for fancy export * Add scenario for yaml export * Remove unused module export.py * Run `make format` * Fix `create_directory` step --- features/exporting.feature | 73 ++++++++++++++++--- features/steps/core.py | 48 ------------- features/steps/export_steps.py | 124 +++++++++++++++++++++++++++++++++ jrnl/export.py | 62 ----------------- 4 files changed, 187 insertions(+), 120 deletions(-) create mode 100644 features/steps/export_steps.py delete mode 100644 jrnl/export.py diff --git a/features/exporting.feature b/features/exporting.feature index db2ef5b3..5705fda1 100644 --- a/features/exporting.feature +++ b/features/exporting.feature @@ -4,21 +4,20 @@ Feature: Exporting a Journal Given we use the config "tags.yaml" When we run "jrnl --export json" Then we should get no error - and the output should be parsable as json - and "entries" in the json output should have 2 elements - and "tags" in the json output should contain "@idea" - and "tags" in the json output should contain "@journal" - and "tags" in the json output should contain "@dan" + And the output should be parsable as json + And "entries" in the json output should have 2 elements + And "tags" in the json output should contain "@idea" + And "tags" in the json output should contain "@journal" + And "tags" in the json output should contain "@dan" Scenario: Exporting using filters should only export parts of the journal Given we use the config "tags.yaml" When we run "jrnl -until 'may 2013' --export json" - # Then we should get no error Then the output should be parsable as json - and "entries" in the json output should have 1 element - and "tags" in the json output should contain "@idea" - and "tags" in the json output should contain "@journal" - and "tags" in the json output should not contain "@dan" + And "entries" in the json output should have 1 element + And "tags" in the json output should contain "@idea" + And "tags" in the json output should contain "@journal" + And "tags" in the json output should not contain "@dan" Scenario: Exporting using custom templates Given we use the config "basic.yaml" @@ -83,3 +82,57 @@ Feature: Exporting a Journal More stuff more stuff again """ + + Scenario: Exporting to XML + Given we use the config "tags.yaml" + When we run "jrnl --export xml" + Then the output should be a valid XML string + And "entries" node in the xml output should have 2 elements + And "tags" in the xml output should contain ["@idea", "@journal", "@dan"] + + Scenario: Exporting tags + Given we use the config "tags.yaml" + When we run "jrnl --export tags" + Then the output should be + """ + @idea : 2 + @journal : 1 + @dan : 1 + """ + + Scenario: Exporting fancy + Given we use the config "tags.yaml" + When we run "jrnl --export fancy" + Then the output should be + """ + ┎──────────────────────────────────────────────────────────────╮2013-04-09 15:39 + ┃ I have an @idea: ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ (1) write a command line @journal software │ + ┃ (2) ??? │ + ┃ (3) PROFIT! │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + ┎──────────────────────────────────────────────────────────────╮2013-06-10 15:40 + ┃ I met with @dan. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ As alway's he shared his latest @idea on how to rule the world with me. │ + ┃ inst │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + """ + + Scenario: Export to yaml + Given we use the config "tags.yaml" + And we created a directory named "exported_journal" + When we run "jrnl --export yaml -o exported_journal" + Then "exported_journal" should contain the files ["2013-04-09_i-have-an-idea.md", "2013-06-10_i-met-with-dan.md"] + And the content of exported yaml "exported_journal/2013-04-09_i-have-an-idea.md" should be + """ + title: I have an @idea: + date: 2013-04-09 15:39 + stared: False + tags: idea, journal + + (1) write a command line @journal software + (2) ??? + (3) PROFIT! + """ diff --git a/features/steps/core.py b/features/steps/core.py index a52334a7..24d52a51 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -3,7 +3,6 @@ from unittest.mock import patch from behave import given, when, then from jrnl import cli, install, Journal, util, plugins from jrnl import __version__ -from dateutil import parser as date_parser from collections import defaultdict try: @@ -185,53 +184,6 @@ def no_error(context): assert context.exit_status == 0, context.exit_status -@then("the output should be parsable as json") -def check_output_json(context): - out = context.stdout_capture.getvalue() - assert json.loads(out), out - - -@then('"{field}" in the json output should have {number:d} elements') -@then('"{field}" in the json output should have 1 element') -def check_output_field(context, field, number=1): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json, [field, out_json] - assert len(out_json[field]) == number, len(out_json[field]) - - -@then('"{field}" in the json output should not contain "{key}"') -def check_output_field_not_key(context, field, key): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json - assert key not in out_json[field] - - -@then('"{field}" in the json output should contain "{key}"') -def check_output_field_key(context, field, key): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json - assert key in out_json[field] - - -@then('the json output should contain {path} = "{value}"') -def check_json_output_path(context, path, value): - """ E.g. - the json output should contain entries.0.title = "hello" - """ - out = context.stdout_capture.getvalue() - struct = json.loads(out) - - for node in path.split("."): - try: - struct = struct[int(node)] - except ValueError: - struct = struct[node] - assert struct == value, struct - - @then("the output should be") @then('the output should be "{text}"') def check_output(context, text=None): diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py new file mode 100644 index 00000000..b7965ab8 --- /dev/null +++ b/features/steps/export_steps.py @@ -0,0 +1,124 @@ +import json +import os +import shutil +from xml.etree import ElementTree + +from behave import then, given + + +@then("the output should be parsable as json") +def check_output_json(context): + out = context.stdout_capture.getvalue() + assert json.loads(out), out + + +@then('"{field}" in the json output should have {number:d} elements') +@then('"{field}" in the json output should have 1 element') +def check_output_field(context, field, number=1): + out = context.stdout_capture.getvalue() + out_json = json.loads(out) + assert field in out_json, [field, out_json] + assert len(out_json[field]) == number, len(out_json[field]) + + +@then('"{field}" in the json output should not contain "{key}"') +def check_output_field_not_key(context, field, key): + out = context.stdout_capture.getvalue() + out_json = json.loads(out) + assert field in out_json + assert key not in out_json[field] + + +@then('"{field}" in the json output should contain "{key}"') +def check_output_field_key(context, field, key): + out = context.stdout_capture.getvalue() + out_json = json.loads(out) + assert field in out_json + assert key in out_json[field] + + +@then('the json output should contain {path} = "{value}"') +def check_json_output_path(context, path, value): + """ E.g. + the json output should contain entries.0.title = "hello" + """ + out = context.stdout_capture.getvalue() + struct = json.loads(out) + + for node in path.split("."): + try: + struct = struct[int(node)] + except ValueError: + struct = struct[node] + assert struct == value, struct + + +@then("the output should be a valid XML string") +def assert_valid_xml_string(context): + output = context.stdout_capture.getvalue() + xml_tree = ElementTree.fromstring(output) + assert xml_tree, output + + +@then('"entries" node in the xml output should have {number:d} elements') +def assert_xml_output_entries_count(context, number): + output = context.stdout_capture.getvalue() + xml_tree = ElementTree.fromstring(output) + + xml_tags = (node.tag for node in xml_tree) + assert "entries" in xml_tags, str(list(xml_tags)) + + actual_entry_count = len(xml_tree.find("entries")) + assert actual_entry_count == number, actual_entry_count + + +@then('"tags" in the xml output should contain {expected_tags_json_list}') +def assert_xml_output_tags(context, expected_tags_json_list): + output = context.stdout_capture.getvalue() + xml_tree = ElementTree.fromstring(output) + + xml_tags = (node.tag for node in xml_tree) + assert "tags" in xml_tags, str(list(xml_tags)) + + expected_tags = json.loads(expected_tags_json_list) + actual_tags = set(t.attrib["name"] for t in xml_tree.find("tags")) + assert actual_tags == set(expected_tags), [actual_tags, set(expected_tags)] + + +@given('we created a directory named "{dir_name}"') +def create_directory(context, dir_name): + if os.path.exists(dir_name): + shutil.rmtree(dir_name) + os.mkdir(dir_name) + + +@then('"{dir_name}" should contain the files {expected_files_json_list}') +def assert_dir_contains_files(context, dir_name, expected_files_json_list): + actual_files = os.listdir(dir_name) + expected_files = json.loads(expected_files_json_list) + assert actual_files == expected_files, [actual_files, expected_files] + + +@then('the content of exported yaml "{file_path}" should be') +def assert_exported_yaml_file_content(context, file_path): + expected_content = context.text.strip().splitlines() + + with open(file_path, "r") as f: + actual_content = f.read().strip().splitlines() + + for actual_line, expected_line in zip(actual_content, expected_content): + if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): + assert_equal_tags_ignoring_order(actual_line, expected_line) + else: + assert actual_line.strip() == expected_line.strip(), [ + actual_line.strip(), + expected_line.strip(), + ] + + +def assert_equal_tags_ignoring_order(actual_line, expected_line): + actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) + expected_tags = set( + tag.strip() for tag in expected_line[len("tags: ") :].split(",") + ) + assert actual_tags == expected_tags, [actual_tags, expected_tags] diff --git a/jrnl/export.py b/jrnl/export.py deleted file mode 100644 index e95d4c12..00000000 --- a/jrnl/export.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python - -from .util import ERROR_COLOR, RESET_COLOR -from .util import slugify -from .plugins.template import Template -import os - - -class Exporter: - """This Exporter can convert entries and journals into text files.""" - - def __init__(self, format): - with open("jrnl/templates/" + format + ".template") as f: - front_matter, body = f.read().strip("-\n").split("---", 2) - self.template = Template(body) - - def export_entry(self, entry): - """Returns a string representation of a single entry.""" - return str(entry) - - def _get_vars(self, journal): - return {"journal": journal, "entries": journal.entries, "tags": journal.tags} - - def export_journal(self, journal): - """Returns a string representation of an entire journal.""" - return self.template.render_block("journal", **self._get_vars(journal)) - - def write_file(self, journal, path): - """Exports a journal into a single file.""" - try: - with open(path, "w", encoding="utf-8") as f: - f.write(self.export_journal(journal)) - return f"[Journal exported to {path}]" - except OSError as e: - return f"[{ERROR_COLOR}ERROR{RESET_COLOR}: {e.filename} {e.strerror}]" - - def make_filename(self, entry): - return entry.date.strftime( - "%Y-%m-%d_{}.{}".format(slugify(entry.title), self.extension) - ) - - def write_files(self, journal, path): - """Exports a journal into individual files for each entry.""" - for entry in journal.entries: - try: - full_path = os.path.join(path, self.make_filename(entry)) - with open(full_path, "w", encoding="utf-8") as f: - f.write(self.export_entry(entry)) - except OSError as e: - return f"[{ERROR_COLOR}ERROR{RESET_COLOR}: {e.filename} {e.strerror}]" - return f"[Journal exported to {path}]" - - def export(self, journal, format="text", output=None): - """Exports to individual files if output is an existing path, or into - a single file if output is a file name, or returns the exporter's - representation as string if output is None.""" - if output and os.path.isdir(output): # multiple files - return self.write_files(journal, output) - elif output: # single file - return self.write_file(journal, output) - else: - return self.export_journal(journal) From 66027e774613db34f18b6bae851cb4c2b6d340bc Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Sat, 8 Feb 2020 13:34:52 -0700 Subject: [PATCH 0007/1132] Add UTC support for failing DayOne tests (#785) * [Dayone] don't break if the system timezone is UTC * [DayOne] re-enable tests that were failing on Travis * [DayOne] change as per code review to avoid `except: pass` --- features/dayone.feature | 13 +------------ jrnl/DayOneJournal.py | 6 +++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/features/dayone.feature b/features/dayone.feature index 51aa2033..8e50b42b 100644 --- a/features/dayone.feature +++ b/features/dayone.feature @@ -1,7 +1,5 @@ Feature: Dayone specific implementation details. - # fails when system time is UTC (as on Travis-CI) - @skip Scenario: Loading a DayOne Journal Given we use the config "dayone.yaml" When we run "jrnl -from 'feb 2013'" @@ -15,7 +13,7 @@ Feature: Dayone specific implementation details. 2013-07-17 11:38 This entry is starred! """ - # fails when system time is UTC (as on Travis-CI) + # broken still @skip Scenario: Entries without timezone information will be interpreted as in the current timezone Given we use the config "dayone.yaml" @@ -23,7 +21,6 @@ Feature: Dayone specific implementation details. Then we should get no error and the output should contain "2013-01-17T18:37Z" in the local time - @skip Scenario: Writing into Dayone Given we use the config "dayone.yaml" When we run "jrnl 01 may 1979: Being born hurts." @@ -33,8 +30,6 @@ Feature: Dayone specific implementation details. 1979-05-01 09:00 Being born hurts. """ - # fails when system time is UTC (as on Travis-CI) - @skip Scenario: Loading tags from a DayOne Journal Given we use the config "dayone.yaml" When we run "jrnl --tags" @@ -44,8 +39,6 @@ Feature: Dayone specific implementation details. @play : 1 """ - # fails when system time is UTC (as on Travis-CI) - @skip Scenario: Saving tags from a DayOne Journal Given we use the config "dayone.yaml" When we run "jrnl A hard day at @work" @@ -56,8 +49,6 @@ Feature: Dayone specific implementation details. @play : 1 """ - # fails when system time is UTC (as on Travis-CI) - @skip Scenario: Filtering by tags from a DayOne Journal Given we use the config "dayone.yaml" When we run "jrnl @work" @@ -66,8 +57,6 @@ Feature: Dayone specific implementation details. 2013-05-17 11:39 This entry has tags! """ - # fails when system time is UTC (as on Travis-CI) - @skip Scenario: Exporting dayone to json Given we use the config "dayone.yaml" When we run "jrnl --export json" diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 83eb6788..8e8b2cd0 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -52,7 +52,11 @@ class DayOne(Journal.Journal): except (KeyError, pytz.exceptions.UnknownTimeZoneError): timezone = tzlocal.get_localzone() date = dict_entry["Creation Date"] - date = date + timezone.utcoffset(date, is_dst=False) + # convert the date to UTC rather than keep messing with + # timezones + if timezone.zone != "UTC": + date = date + timezone.utcoffset(date, is_dst=False) + entry = Entry.Entry( self, date, From 839ce7d42d8e2ef2dd643af2600542b522852e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Sat, 8 Feb 2020 16:53:01 -0400 Subject: [PATCH 0008/1132] Fix typo in encryption docs (#812) * Explain how fish can be configured to exclude jrnl commands from history by default * Fix typo in encryption docs --- docs/encryption.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/encryption.md b/docs/encryption.md index 35a26313..dc3216d1 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -60,7 +60,7 @@ If you are using `fish` instead of `bash` or `zsh`, you can get the same behavio adding this to your `fish` configuration: ``` sh -abbr jrnl=" jrnl" +abbr jrnl " jrnl" ``` To delete existing `jrnl` commands from `fish`’s history, run From 06aa8b50d0ddc79394e4dd8ed15ee871abd46119 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Feb 2020 21:06:40 +0000 Subject: [PATCH 0009/1132] Updating changelog [ci skip] --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ec60e6f..b6121716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,12 @@ - Update YAML exporter to handle Dayone format [\#773](https://github.com/jrnl-org/jrnl/pull/773) ([MinchinWeb](https://github.com/MinchinWeb)) +**Fixed bugs:** + +- Add UTC support for failing DayOne tests [\#785](https://github.com/jrnl-org/jrnl/pull/785) ([MinchinWeb](https://github.com/MinchinWeb)) + **Build:** -- Remove poetry from build system in pyproject config to fix `brew install` [\#830](https://github.com/jrnl-org/jrnl/pull/830) ([wren](https://github.com/wren)) - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) **Updated documentation:** From cec0beff9ace8b34987f30b7e41eebb3ff210bbc Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Sat, 8 Feb 2020 14:14:33 -0700 Subject: [PATCH 0010/1132] Listing all entries in DayOne Classic journal throws IndexError (#786) * Reproduce bug in #780 :musical_note: I have no body, no body to love me... :musical_note: The bug is cause by a DayOne entry that has to entry body. * Deal with empty bodies Close #780. * [Travis-CI] add "tree" command to debug missing files * Fix file location I have no idea why, but it ran locally fine without issue. Travis is more particular... --- .travis.yml | 6 ++++ features/data/configs/bug780.yaml | 12 +++++++ .../48A25033B34047C591160A4480197D8B.doentry | 33 +++++++++++++++++++ features/regression.feature | 20 +++++++---- jrnl/Entry.py | 2 +- 5 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 features/data/configs/bug780.yaml create mode 100644 features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry diff --git a/.travis.yml b/.travis.yml index 7263ff8c..fa132a09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,14 @@ git: depth: false autocrlf: false +addons: + apt: + packages: + - tree + before_install: - date + - tree install: - pip install poetry diff --git a/features/data/configs/bug780.yaml b/features/data/configs/bug780.yaml new file mode 100644 index 00000000..e1d830c2 --- /dev/null +++ b/features/data/configs/bug780.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +journals: + default: features/journals/bug780.dayone +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry b/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry new file mode 100644 index 00000000..426f1ea8 --- /dev/null +++ b/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry @@ -0,0 +1,33 @@ + + + + + Activity + Stationary + Creation Date + 2019-12-30T21:28:54Z + Entry Text + + Starred + + UUID + 48A25033B34047C591160A4480197D8B + Creator + + Device Agent + PC + Generation Date + 2019-12-30T21:28:54Z + Host Name + LE-TREPORT + OS Agent + Microsoft Windows/10 Home + Software Agent + Journaley/2.1 + + Tags + + i_have_no_body + + + diff --git a/features/regression.feature b/features/regression.feature index bedc1295..a8c1e237 100644 --- a/features/regression.feature +++ b/features/regression.feature @@ -15,13 +15,6 @@ Feature: Zapped bugs should stay dead. Then we should see the message "Entry added" and the journal should contain "[2013-11-30 15:42] Project Started." - Scenario: Date in the future should be parsed correctly - # https://github.com/maebert/jrnl/issues/185 - Given we use the config "basic.yaml" - When we run "jrnl 26/06/2019: Planet? Earth. Year? 2019." - Then we should see the message "Entry added" - and the journal should contain "[2019-06-26 09:00] Planet?" - Scenario: Loading entry with ambiguous time stamp #https://github.com/maebert/jrnl/issues/153 Given we use the config "bug153.yaml" @@ -32,6 +25,19 @@ Feature: Zapped bugs should stay dead. 2013-10-27 03:27 Some text. """ + Scenario: Date in the future should be parsed correctly + # https://github.com/maebert/jrnl/issues/185 + Given we use the config "basic.yaml" + When we run "jrnl 26/06/2019: Planet? Earth. Year? 2019." + Then we should see the message "Entry added" + and the journal should contain "[2019-06-26 09:00] Planet?" + + Scenario: Empty DayOne entry bodies should not error + # https://github.com/jrnl-org/jrnl/issues/780 + Given we use the config "bug780.yaml" + When we run "jrnl --short" + Then we should get no error + Scenario: Title with an embedded period. Given we use the config "basic.yaml" When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic." diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 80754e05..01f56d5a 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -22,7 +22,7 @@ class Entry: def _parse_text(self): raw_text = self.text lines = raw_text.splitlines() - if lines[0].strip().endswith("*"): + if lines and lines[0].strip().endswith("*"): self.starred = True raw_text = lines[0].strip("\n *") + "\n" + "\n".join(lines[1:]) self._title, self._body = split_title(raw_text) From 4757deee668f896a826143a9bc9d123f7438e94d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Feb 2020 21:26:08 +0000 Subject: [PATCH 0011/1132] Updating changelog [ci skip] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6121716..a9074bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,14 @@ **Fixed bugs:** +- Listing all entries in DayOne Classic journal throws IndexError [\#786](https://github.com/jrnl-org/jrnl/pull/786) ([MinchinWeb](https://github.com/MinchinWeb)) - Add UTC support for failing DayOne tests [\#785](https://github.com/jrnl-org/jrnl/pull/785) ([MinchinWeb](https://github.com/MinchinWeb)) **Build:** +- Remove poetry from build system in pyproject config to fix `brew install` [\#830](https://github.com/jrnl-org/jrnl/pull/830) ([wren](https://github.com/wren)) - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) +- Update Black version and lock file to fix builds on develop branch [\#784](https://github.com/jrnl-org/jrnl/pull/784) ([wren](https://github.com/wren)) **Updated documentation:** From 3e1061df5f5d95b3f30fde664cf13b30629b9440 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 8 Feb 2020 13:51:14 -0800 Subject: [PATCH 0012/1132] Fix crashing unicode Travis tests on Windows and fail build if Windows tests fail (#836) --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fa132a09..d3406717 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,6 @@ jobs: fast_finish: true allow_failures: - python: nightly - - os: windows include: - name: Lint, via Black @@ -80,6 +79,7 @@ jobs: env: - JRNL_PYTHON_VERSION=3.6.8 - PATH=/c/Python36:/c/Python36/Scripts:$PATH + - PYTHONIOENCODING=UTF-8 # Python 3.7 Tests - name: Python 3.7 on Linux @@ -95,6 +95,7 @@ jobs: env: - JRNL_PYTHON_VERSION=3.7.5 - PATH=/c/Python37:/c/Python37/Scripts:$PATH + - PYTHONIOENCODING=UTF-8 # Python 3.8 Tests - name: Python 3.8 on Linux @@ -110,6 +111,7 @@ jobs: env: - JRNL_PYTHON_VERSION=3.8.0 - PATH=/c/Python38:/c/Python38/Scripts:$PATH + - PYTHONIOENCODING=UTF-8 # ... and beyond! - name: Python nightly on Linux From 864df9906acf73ba1f9919a4c61fd374bd6e3144 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Feb 2020 22:03:03 +0000 Subject: [PATCH 0013/1132] Updating changelog [ci skip] --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9074bc9..32821110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,10 @@ **Build:** +- Fix crashing unicode Travis tests on Windows and fail build if Windows tests fail [\#836](https://github.com/jrnl-org/jrnl/pull/836) ([micahellison](https://github.com/micahellison)) - Remove poetry from build system in pyproject config to fix `brew install` [\#830](https://github.com/jrnl-org/jrnl/pull/830) ([wren](https://github.com/wren)) - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) -- Update Black version and lock file to fix builds on develop branch [\#784](https://github.com/jrnl-org/jrnl/pull/784) ([wren](https://github.com/wren)) +- Automagically update the changelog you see before your very eyes! [\#806](https://github.com/jrnl-org/jrnl/pull/806) ([wren](https://github.com/wren)) **Updated documentation:** From bae53267bf4a55f5de38c16f2935e1b470bd95ca Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 8 Feb 2020 17:33:47 -0800 Subject: [PATCH 0014/1132] Stop multipe changelog generators from crashing into each other --- .build/generate_changelog.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.build/generate_changelog.sh b/.build/generate_changelog.sh index 58867c20..ea586f4c 100755 --- a/.build/generate_changelog.sh +++ b/.build/generate_changelog.sh @@ -1,5 +1,20 @@ #!/usr/bin/env bash +BRANCH=$TRAVIS_BRANCH +if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then + BRANCH='master' +fi + +# Check if branch has been updated since this build started +# This tends to happen if multiple things have been merged in at the same time. +if [[ -z $TRAVIS_TAG ]]; then + git fetch origin + if [[ $(git rev-parse "origin/${BRANCH}") != $TRAVIS_COMMIT ]]; then + echo "${BRANCH} has been updated since build started. Aborting changelog." + exit 0 + fi +fi + FILENAME='CHANGELOG.md' # get the latest git tags @@ -40,11 +55,6 @@ docker run -it --rm -v "$(pwd)":/usr/local/src/your-app ferrarimarco/github-chan # Put back our link (instead of the broken one) sed -i 's!https://pypi.org/project/jrnl/HEAD/!https://github.com/jrnl-org/jrnl/!' "$FILENAME" -BRANCH=$TRAVIS_BRANCH -if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then - BRANCH='master' -fi - git config --global user.email "jrnl.bot@gmail.com" git config --global user.name "Jrnl Bot" git checkout $BRANCH From bafe7a19aea3a7658f9225eab9f76286eeb195b3 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 8 Feb 2020 18:20:06 -0800 Subject: [PATCH 0015/1132] get rid of debug code --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d3406717..a6fa27fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,8 @@ git: depth: false autocrlf: false -addons: - apt: - packages: - - tree - before_install: - date - - tree install: - pip install poetry From 9acdba1ec711ed3152fecf07b6e6ab788feb68d8 Mon Sep 17 00:00:00 2001 From: Jonathan Wren <9453067+wren@users.noreply.github.com> Date: Sat, 8 Feb 2020 18:31:47 -0800 Subject: [PATCH 0016/1132] Update old links (#844) Since we moved the core repo to jrnl-org, the old links no longer work. --- docs/theme/index.html | 6 +++--- features/regression.feature | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/theme/index.html b/docs/theme/index.html index a0f620fb..2221e76f 100755 --- a/docs/theme/index.html +++ b/docs/theme/index.html @@ -34,7 +34,7 @@ "operatingSystem": ["macOS", "Windows", "Linux"], "thumbnailUrl": "https://jrnl.sh/img/banner_og.png", "installUrl": "https://jrnl.sh/installation", - "softwareVersion": "2.0.0rc2" + "softwareVersion": "2.2" } @@ -42,7 +42,7 @@
@@ -58,7 +58,7 @@
diff --git a/features/regression.feature b/features/regression.feature index a8c1e237..5aa1db06 100644 --- a/features/regression.feature +++ b/features/regression.feature @@ -1,7 +1,7 @@ Feature: Zapped bugs should stay dead. Scenario: Writing an entry does not print the entire journal - # https://github.com/maebert/jrnl/issues/87 + # https://github.com/jrnl-org/jrnl/issues/87 Given we use the config "basic.yaml" When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." Then we should see the message "Entry added" @@ -9,14 +9,14 @@ Feature: Zapped bugs should stay dead. Then the output should not contain "Life is good" Scenario: Date with time should be parsed correctly - # https://github.com/maebert/jrnl/issues/117 + # https://github.com/jrnl-org/jrnl/issues/117 Given we use the config "basic.yaml" When we run "jrnl 2013-11-30 15:42: Project Started." Then we should see the message "Entry added" and the journal should contain "[2013-11-30 15:42] Project Started." Scenario: Loading entry with ambiguous time stamp - #https://github.com/maebert/jrnl/issues/153 + #https://github.com/jrnl-org/jrnl/issues/153 Given we use the config "bug153.yaml" When we run "jrnl -1" Then we should get no error @@ -26,7 +26,7 @@ Feature: Zapped bugs should stay dead. """ Scenario: Date in the future should be parsed correctly - # https://github.com/maebert/jrnl/issues/185 + # https://github.com/jrnl-org/jrnl/issues/185 Given we use the config "basic.yaml" When we run "jrnl 26/06/2019: Planet? Earth. Year? 2019." Then we should see the message "Entry added" From 5135f6a4b37c4bc69d4a268a0a7ba0bcd61b9e6e Mon Sep 17 00:00:00 2001 From: Jonathan Wren <9453067+wren@users.noreply.github.com> Date: Sat, 8 Feb 2020 18:32:30 -0800 Subject: [PATCH 0017/1132] Update site description (#841) Don't know why this was what it was. Maybe an old joke I don't get? Either way, new description makes more sense. --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index ed1795d1..4c56567b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,7 +12,7 @@ markdown_extensions: - admonition repo_url: https://github.com/jrnl-org/jrnl/ site_author: Manuel Ebert -site_description: Never Worry about Money Again. +site_description: Collect your thoughts and notes without leaving the command line. nav: - Overview: overview.md - Quickstart: installation.md From 4190494a4ff7c10424c3a4ef701f1ff918878f47 Mon Sep 17 00:00:00 2001 From: Jonathan Wren <9453067+wren@users.noreply.github.com> Date: Sat, 8 Feb 2020 18:32:58 -0800 Subject: [PATCH 0018/1132] Get rid of dumb sex joke (#840) These kinds of jokes make us look bad, and have gotten this project bad PR on social media. It's best to get rid of them. We can still be super glib and funny without crass jokes. --- docs/usage.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 18b35d68..deb612be 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -119,10 +119,10 @@ Will print all entries in which either `@pinkie` or `@WorldDomination` occurred. ```sh -jrnl -n 5 -and @pineapple @lubricant +jrnl -n 5 -and @pinkie @WorldDomination ``` -the last five entries containing both `@pineapple` **and** `@lubricant`. +the last five entries containing both `@pinkie` **and** `@worldDomination`. You can change which symbols you'd like to use for tagging in the configuration. @@ -154,7 +154,7 @@ encrypt) your edited journal after you save and exit the editor. You can also use this feature for deleting entries from your journal ```sh -jrnl @girlfriend -until 'june 2012' --edit +jrnl @texas -until 'june 2012' --edit ``` Just select all text, press delete, and everything is gone... From db6b0aa56cac4c09a4cf32182d984ec5525d07f6 Mon Sep 17 00:00:00 2001 From: Jonathan Wren <9453067+wren@users.noreply.github.com> Date: Sat, 8 Feb 2020 18:33:28 -0800 Subject: [PATCH 0019/1132] Don't re-run tests on deployment (#839) By the time we get to the deployment step, we've already run these tests dozens of times. We don't need to run them yet again at deploy time. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a6fa27fc..ed720ee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -131,6 +131,8 @@ jobs: - poetry version "$TRAVIS_TAG" - echo __version__ = \"$TRAVIS_TAG\" > jrnl/__version__.py - poetry build + script: + - echo "Deployment starting..." deploy: - provider: script script: poetry publish From 480b881bdac518ca1223f576dde810af0146f2eb Mon Sep 17 00:00:00 2001 From: Jonathan Wren <9453067+wren@users.noreply.github.com> Date: Sat, 8 Feb 2020 18:33:54 -0800 Subject: [PATCH 0020/1132] Put back build lines in poetry config (#838) Taking out these lines earlier fixed the homebrew release, but broke other things. So, I'm putting them back for now until we can find a better solution. --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 9dc76df4..c8c9984e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,3 +38,7 @@ black = {version = "^19.10b0",allow-prereleases = true} [tool.poetry.scripts] jrnl = 'jrnl.cli:run' +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" + From 32bd4a2b71c39c32f2df9bdfbad01ca4f937299f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 8 Feb 2020 13:54:39 -0800 Subject: [PATCH 0021/1132] Restore emoji test now that it works in Windows Travis builds --- features/core.feature | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/features/core.feature b/features/core.feature index c023cd4c..34539efb 100644 --- a/features/core.feature +++ b/features/core.feature @@ -41,6 +41,14 @@ Feature: Basic reading and writing to a journal When we run "jrnl -on 'june 6 2013' --short" Then the output should be "2013-06-10 15:40 Life is good." + Scenario: Emoji support + Given we use the config "basic.yaml" + When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should contain "🌞" + and the output should contain "🐘" + Scenario: Writing an entry at the prompt Given we use the config "basic.yaml" When we run "jrnl" and enter "25 jul 2013: I saw Elvis. He's alive." From 5e6517ef754dde3b40ee4a9e8d0cf98ed4857e06 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 9 Feb 2020 03:31:51 +0000 Subject: [PATCH 0022/1132] Updating changelog [ci skip] --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32821110..a28429c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,13 +15,18 @@ **Build:** +- Stop multipe changelog generators from crashing into each other [\#845](https://github.com/jrnl-org/jrnl/pull/845) ([wren](https://github.com/wren)) +- Don't re-run tests on deployment [\#839](https://github.com/jrnl-org/jrnl/pull/839) ([wren](https://github.com/wren)) +- Put back build lines in Poetry config [\#838](https://github.com/jrnl-org/jrnl/pull/838) ([wren](https://github.com/wren)) +- Restore emoji test [\#837](https://github.com/jrnl-org/jrnl/pull/837) ([micahellison](https://github.com/micahellison)) - Fix crashing unicode Travis tests on Windows and fail build if Windows tests fail [\#836](https://github.com/jrnl-org/jrnl/pull/836) ([micahellison](https://github.com/micahellison)) - Remove poetry from build system in pyproject config to fix `brew install` [\#830](https://github.com/jrnl-org/jrnl/pull/830) ([wren](https://github.com/wren)) - Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) -- Automagically update the changelog you see before your very eyes! [\#806](https://github.com/jrnl-org/jrnl/pull/806) ([wren](https://github.com/wren)) **Updated documentation:** +- Update site description [\#841](https://github.com/jrnl-org/jrnl/pull/841) ([wren](https://github.com/wren)) +- Get rid of dumb sex joke [\#840](https://github.com/jrnl-org/jrnl/pull/840) ([wren](https://github.com/wren)) - Updating/clarifying template explanation [\#829](https://github.com/jrnl-org/jrnl/pull/829) ([heymajor](https://github.com/heymajor)) ## [v2.2](https://pypi.org/project/jrnl/v2.2/) (2020-02-01) From 7cf71c19a987849bdda84fcc99d77b5f57f058e5 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 22 Feb 2020 19:22:51 +0000 Subject: [PATCH 0023/1132] Updating changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a28429c2..d9bb2774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ **Updated documentation:** +- Docs: Fix broken links in recipes.md [\#854](https://github.com/jrnl-org/jrnl/pull/854) ([lrvl](https://github.com/lrvl)) - Update site description [\#841](https://github.com/jrnl-org/jrnl/pull/841) ([wren](https://github.com/wren)) - Get rid of dumb sex joke [\#840](https://github.com/jrnl-org/jrnl/pull/840) ([wren](https://github.com/wren)) - Updating/clarifying template explanation [\#829](https://github.com/jrnl-org/jrnl/pull/829) ([heymajor](https://github.com/heymajor)) From cbea2596482b62a0d386f7064fd862ff362ee70d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 22 Feb 2020 19:50:50 +0000 Subject: [PATCH 0024/1132] Updating changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9bb2774..af84c90c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ **Updated documentation:** - Docs: Fix broken links in recipes.md [\#854](https://github.com/jrnl-org/jrnl/pull/854) ([lrvl](https://github.com/lrvl)) +- docs: Fix fish history instructions. [\#846](https://github.com/jrnl-org/jrnl/pull/846) ([aureooms](https://github.com/aureooms)) - Update site description [\#841](https://github.com/jrnl-org/jrnl/pull/841) ([wren](https://github.com/wren)) - Get rid of dumb sex joke [\#840](https://github.com/jrnl-org/jrnl/pull/840) ([wren](https://github.com/wren)) - Updating/clarifying template explanation [\#829](https://github.com/jrnl-org/jrnl/pull/829) ([heymajor](https://github.com/heymajor)) From 55eff3b7774ee8d546aac31f7edf43c116b43a8d Mon Sep 17 00:00:00 2001 From: Leroy van Logchem Date: Mon, 17 Feb 2020 23:24:24 +0100 Subject: [PATCH 0025/1132] Update recipes.md Fixed links to various documentation files --- docs/recipes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/recipes.md b/docs/recipes.md index d688b429..a702b9d6 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -71,7 +71,7 @@ jrnlimport () { ### Using templates !!! note - Templates require an [external editor](../advanced) be configured. + Templates require an [external editor](./advanced.md) be configured. A template is a code snippet that makes it easier to enter use repeated text each time a new journal entry is started. There are two ways you can utilize @@ -113,7 +113,7 @@ logged as a new entry in the journal you specified in the original argument. !!! tip To read your journal entry or to verify the entry saved, you can use this - command: `jrnl -n 1` (Check out [Import and Export](../export/#export-to-files) for more export options). + command: `jrnl -n 1` (Check out [Import and Export](./export.md) for more export options). ```sh jrnl -n 1 @@ -155,7 +155,7 @@ jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)" ## External editors Configure your preferred external editor by updating the `editor` option -in your `jrnl.yaml` file. (See [advanced usage](../advanced) for details). +in your `jrnl.yaml` file. (See [advanced usage](./advanced.md) for details). !!! note To save and log any entry edits, save and close the file. From 1b3d2961a15dabf8c8bd4603b90b191250b54028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Sun, 9 Feb 2020 15:23:53 +0100 Subject: [PATCH 0026/1132] docs: Fix fish history instructions. Use `--add` flag in fish `abbr` command. --- docs/encryption.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/encryption.md b/docs/encryption.md index dc3216d1..9909af67 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -60,7 +60,7 @@ If you are using `fish` instead of `bash` or `zsh`, you can get the same behavio adding this to your `fish` configuration: ``` sh -abbr jrnl " jrnl" +abbr --add jrnl " jrnl" ``` To delete existing `jrnl` commands from `fish`’s history, run From a3afa112ab4ab122121219814eead34fa62a04c7 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Fri, 21 Feb 2020 18:36:16 -0800 Subject: [PATCH 0027/1132] Clean up shortcut for Limit This piece of code has bothered me for more than 6 years! (See #131) - this moves parsing arguments to where it belongs. --- jrnl/cli.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/jrnl/cli.py b/jrnl/cli.py index 1c53dc29..408f3518 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -15,6 +15,7 @@ from .util import ERROR_COLOR, RESET_COLOR, UserAbort import jrnl import argparse import sys +import re import logging log = logging.getLogger(__name__) @@ -173,7 +174,11 @@ def parse_args(args=None): action="store_true", ) - return parser.parse_args(args) + # Handle '-123' as a shortcut for '-n 123' + num = re.compile(r"^-(\d+)$") + if args is None: + args = sys.argv[1:] + return parser.parse_args([num.sub(r"-n \1", a) for a in args]) def guess_mode(args, config): @@ -309,14 +314,6 @@ def run(manual_args=None): config = util.scope_config(config, journal_name) - # If the first remaining argument looks like e.g. '-3', interpret that as a limiter - if not args.limit and args.text and args.text[0].startswith("-"): - try: - args.limit = int(args.text[0].lstrip("-")) - args.text = args.text[1:] - except ValueError: - pass - log.debug('Using journal "%s"', journal_name) mode_compose, mode_export, mode_import = guess_mode(args, config) From a3c81d46fe9552cea692ef25aee75d302a29f1c9 Mon Sep 17 00:00:00 2001 From: Craig Moyer Date: Fri, 13 Jan 2017 19:55:41 -0500 Subject: [PATCH 0028/1132] Add support for folder base journal. Adds feature for issue #170 (and #398) where you configure your journal to be a directory and entries are added as sub-directories and files: yyyy/mm/dd.txt. Multiple entries in a day will go in the same file, but a new entry for a specific day will create a new file (and directory structure). Fix failed test scenarios for folder journal. --- .../empty_folder/{empty.txt => empty} | 0 features/folder.feature | 43 ++++++++++ features/steps/core.py | 9 ++ jrnl/FolderJournal.py | 84 +++++++++++++++++++ jrnl/Journal.py | 7 +- 5 files changed, 138 insertions(+), 5 deletions(-) rename features/data/journals/empty_folder/{empty.txt => empty} (100%) create mode 100644 features/folder.feature create mode 100644 jrnl/FolderJournal.py diff --git a/features/data/journals/empty_folder/empty.txt b/features/data/journals/empty_folder/empty similarity index 100% rename from features/data/journals/empty_folder/empty.txt rename to features/data/journals/empty_folder/empty diff --git a/features/folder.feature b/features/folder.feature new file mode 100644 index 00000000..b747e6c1 --- /dev/null +++ b/features/folder.feature @@ -0,0 +1,43 @@ +Feature: Testing a journal with a root directory and multiple files in the format of yyyy/mm/dd.txt + + Scenario: Opening an folder that's not a DayOne folder should treat as folder journal + Given we use the config "empty_folder.yaml" + When we run "jrnl 23 july 2013: Testing folder journal." + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should be + """ + 2013-07-23 09:00 Testing folder journal. + """ + + Scenario: Adding entries to a Folder journal should generate date files + Given we use the config "empty_folder.yaml" + When we run "jrnl 23 July 2013: Testing folder journal." + Then we should see the message "Entry added" + When the journal directory is listed + Then the output should contain "2013/07/23.txt" + + + Scenario: Adding multiple entries to a Folder journal should generate multiple date files + Given we use the config "empty_folder.yaml" + When we run "jrnl 23 July 2013: Testing folder journal." + And we run "jrnl 3/7/2014: Second entry of journal." + Then we should see the message "Entry added" + When the journal directory is listed + Then the output should contain "2013/07/23.txt" + And the output should contain "2014/03/07.txt" + + + Scenario: Out of order entries to a Folder journal should be listed in date order + Given we use the config "empty_folder.yaml" + When we run "jrnl 3/7/2014 4:37pm: Second entry of journal." + Then we should see the message "Entry added" + When we run "jrnl 23 July 2013: Testing folder journal." + Then we should see the message "Entry added" + When we run "jrnl -2" + Then the output should be + """ + 2013-07-23 09:00 Testing folder journal. + + 2014-03-07 16:37 Second entry of journal. + """ diff --git a/features/steps/core.py b/features/steps/core.py index 24d52a51..d2b3811a 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -269,6 +269,15 @@ def check_journal_entries(context, number, journal_name="default"): journal = open_journal(journal_name) assert len(journal.entries) == number +@when('the journal directory is listed') +def list_journal_directory(context, journal="default"): + files=[] + with open(install.CONFIG_FILE_PATH) as config_file: + config = yaml.load(config_file, Loader=yaml.FullLoader) + journal_path = config['journals'][journal] + for root, dirnames, f in os.walk(journal_path): + for file in f: + print(os.path.join(root,file)) @then("fail") def debug_fail(context): diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py new file mode 100644 index 00000000..4ca55335 --- /dev/null +++ b/jrnl/FolderJournal.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python +# encoding: utf-8 + +from __future__ import absolute_import, unicode_literals +from . import Entry +from . import Journal +import codecs +import os +import fnmatch + +def get_files(journal_config): + """Searches through sub directories starting with journal_config and find all text files""" + filenames = [] + for root, dirnames, f in os.walk(journal_config): + for filename in fnmatch.filter(f, '*.txt'): + filenames.append(os.path.join(root, filename)) + return filenames + + +class Folder(Journal.Journal): + """A Journal handling multiple files in a folder""" + + def __init__(self, **kwargs): + self.entries = [] + self._diff_entry_dates = [] + super(Folder, self).__init__(**kwargs) + + + def open(self): + filenames = [] + self.entries = [] + filenames = get_files(self.config['journal']) + for filename in filenames: + with codecs.open(filename, "r", "utf-8") as f: + journal = f.read() + self.entries.extend(self._parse(journal)) + self.sort() + return self + + def write(self): + """Writes only the entries that have been modified into proper files.""" + #Create a list of dates of modified entries. Start with diff_entry_dates + modified_dates = self._diff_entry_dates + seen_dates = set(self._diff_entry_dates) + for e in self.entries: + if e.modified: + if e.date not in seen_dates: + modified_dates.append(e.date) + seen_dates.add(e.date) + + #For every date that had a modified entry, write to a file + for d in modified_dates: + write_entries=[] + filename = os.path.join(self.config['journal'], d.strftime("%Y"), d.strftime("%m"), d.strftime("%d")+".txt") + dirname = os.path.dirname(filename) + #create directory if it doesn't exist + if not os.path.exists(dirname): + os.makedirs(dirname) + for e in self.entries: + if e.date.year == d.year and e.date.month == d.month and e.date.day == d.day: + write_entries.append(e) + journal = "\n".join([e.__unicode__() for e in write_entries]) + with codecs.open(filename, 'w', "utf-8") as journal_file: + journal_file.write(journal) + #look for and delete empty files + filenames = [] + filenames = get_files(self.config['journal']) + for filename in filenames: + if os.stat(filename).st_size <= 0: + #print("empty file: {}".format(filename)) + os.remove(filename) + + def parse_editable_str(self, edited): + """Parses the output of self.editable_str and updates it's entries.""" + mod_entries = self._parse(edited) + diff_entries = set(self.entries) - set(mod_entries) + for e in diff_entries: + self._diff_entry_dates.append(e.date) + # Match those entries that can be found in self.entries and set + # these to modified, so we can get a count of how many entries got + # modified and how many got deleted later. + for entry in mod_entries: + entry.modified = not any(entry == old_entry for old_entry in self.entries) + self.entries = mod_entries diff --git a/jrnl/Journal.py b/jrnl/Journal.py index e5bf4ecc..9d868807 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -378,12 +378,9 @@ def open_journal(name, config, legacy=False): return DayOneJournal.DayOne(**config).open() else: - print( - f"[Error: {config['journal']} is a directory, but doesn't seem to be a DayOne journal either.", - file=sys.stderr, - ) + from . import FolderJournal - sys.exit(1) + return FolderJournal.Folder(**config).open() if not config["encrypt"]: if legacy: From 6985de284444842f36b4923b0c222be48806f531 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 29 Feb 2020 12:35:05 -0800 Subject: [PATCH 0029/1132] Add support to save journals to multiple files in a directory Update FolderJournal reference to entry __unicode__ method to __str__ Remove DayOne test made obsolete by FolderJournal Fix FolderJournal path tests for Windows paths Apply Black linting --- features/dayone_regressions.feature | 6 ----- features/folder.feature | 7 +++--- features/steps/core.py | 17 +++++++------ jrnl/EncryptedJournal.py | 2 +- jrnl/FolderJournal.py | 37 ++++++++++++++++++----------- 5 files changed, 37 insertions(+), 32 deletions(-) diff --git a/features/dayone_regressions.feature b/features/dayone_regressions.feature index 62c8cc24..3e98f9e9 100644 --- a/features/dayone_regressions.feature +++ b/features/dayone_regressions.feature @@ -23,9 +23,3 @@ Feature: Zapped Dayone bugs stay dead! 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. | I'm feeling sore because I forgot to stretch. """ - - Scenario: Opening an folder that's not a DayOne folder gives a nice error message - Given we use the config "empty_folder.yaml" - When we run "jrnl Herro" - Then we should get an error - Then we should see the message "is a directory, but doesn't seem to be a DayOne journal either" diff --git a/features/folder.feature b/features/folder.feature index b747e6c1..650ac53e 100644 --- a/features/folder.feature +++ b/features/folder.feature @@ -15,7 +15,7 @@ Feature: Testing a journal with a root directory and multiple files in the forma When we run "jrnl 23 July 2013: Testing folder journal." Then we should see the message "Entry added" When the journal directory is listed - Then the output should contain "2013/07/23.txt" + Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" Scenario: Adding multiple entries to a Folder journal should generate multiple date files @@ -24,9 +24,8 @@ Feature: Testing a journal with a root directory and multiple files in the forma And we run "jrnl 3/7/2014: Second entry of journal." Then we should see the message "Entry added" When the journal directory is listed - Then the output should contain "2013/07/23.txt" - And the output should contain "2014/03/07.txt" - + Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" + Then the output should contain "2014/03/07.txt" or "2014\03\07.txt" Scenario: Out of order entries to a Folder journal should be listed in date order Given we use the config "empty_folder.yaml" diff --git a/features/steps/core.py b/features/steps/core.py index d2b3811a..401f94cf 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -210,10 +210,11 @@ def check_output_time_inline(context, text): @then("the output should contain") @then('the output should contain "{text}"') -def check_output_inline(context, text=None): +@then('the output should contain "{text}" or "{text2}"') +def check_output_inline(context, text=None, text2=None): text = text or context.text out = context.stdout_capture.getvalue() - assert text in out, text + assert text in out or text2 in out, text or text2 @then('the output should not contain "{text}"') @@ -269,15 +270,17 @@ def check_journal_entries(context, number, journal_name="default"): journal = open_journal(journal_name) assert len(journal.entries) == number -@when('the journal directory is listed') + +@when("the journal directory is listed") def list_journal_directory(context, journal="default"): - files=[] + files = [] with open(install.CONFIG_FILE_PATH) as config_file: config = yaml.load(config_file, Loader=yaml.FullLoader) - journal_path = config['journals'][journal] + journal_path = config["journals"][journal] for root, dirnames, f in os.walk(journal_path): - for file in f: - print(os.path.join(root,file)) + for file in f: + print(os.path.join(root, file)) + @then("fail") def debug_fail(context): diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index d6681a47..cc5af748 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -23,7 +23,7 @@ def make_key(password): length=32, # Salt is hard-coded salt=b"\xf2\xd5q\x0e\xc1\x8d.\xde\xdc\x8e6t\x89\x04\xce\xf8", - iterations=100000, + iterations=100_000, backend=default_backend(), ) key = kdf.derive(password) diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index 4ca55335..19519a14 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -8,11 +8,12 @@ import codecs import os import fnmatch + def get_files(journal_config): """Searches through sub directories starting with journal_config and find all text files""" filenames = [] for root, dirnames, f in os.walk(journal_config): - for filename in fnmatch.filter(f, '*.txt'): + for filename in fnmatch.filter(f, "*.txt"): filenames.append(os.path.join(root, filename)) return filenames @@ -25,11 +26,10 @@ class Folder(Journal.Journal): self._diff_entry_dates = [] super(Folder, self).__init__(**kwargs) - def open(self): filenames = [] self.entries = [] - filenames = get_files(self.config['journal']) + filenames = get_files(self.config["journal"]) for filename in filenames: with codecs.open(filename, "r", "utf-8") as f: journal = f.read() @@ -39,7 +39,7 @@ class Folder(Journal.Journal): def write(self): """Writes only the entries that have been modified into proper files.""" - #Create a list of dates of modified entries. Start with diff_entry_dates + # Create a list of dates of modified entries. Start with diff_entry_dates modified_dates = self._diff_entry_dates seen_dates = set(self._diff_entry_dates) for e in self.entries: @@ -48,26 +48,35 @@ class Folder(Journal.Journal): modified_dates.append(e.date) seen_dates.add(e.date) - #For every date that had a modified entry, write to a file + # For every date that had a modified entry, write to a file for d in modified_dates: - write_entries=[] - filename = os.path.join(self.config['journal'], d.strftime("%Y"), d.strftime("%m"), d.strftime("%d")+".txt") + write_entries = [] + filename = os.path.join( + self.config["journal"], + d.strftime("%Y"), + d.strftime("%m"), + d.strftime("%d") + ".txt", + ) dirname = os.path.dirname(filename) - #create directory if it doesn't exist + # create directory if it doesn't exist if not os.path.exists(dirname): os.makedirs(dirname) for e in self.entries: - if e.date.year == d.year and e.date.month == d.month and e.date.day == d.day: + if ( + e.date.year == d.year + and e.date.month == d.month + and e.date.day == d.day + ): write_entries.append(e) - journal = "\n".join([e.__unicode__() for e in write_entries]) - with codecs.open(filename, 'w', "utf-8") as journal_file: + journal = "\n".join([e.__str__() for e in write_entries]) + with codecs.open(filename, "w", "utf-8") as journal_file: journal_file.write(journal) - #look for and delete empty files + # look for and delete empty files filenames = [] - filenames = get_files(self.config['journal']) + filenames = get_files(self.config["journal"]) for filename in filenames: if os.stat(filename).st_size <= 0: - #print("empty file: {}".format(filename)) + # print("empty file: {}".format(filename)) os.remove(filename) def parse_editable_str(self, edited): From 9e5d160bbd96b532090a6c9ed0f691a1cc1fe704 Mon Sep 17 00:00:00 2001 From: Aaron Lichtman Date: Tue, 19 Nov 2019 04:56:57 +0100 Subject: [PATCH 0030/1132] Pretty print journal entries (#692) * Pretty print journal entry titles and dates. Changes appearance of all jrnl viewing commands, such as $ jrnl --short and $ jrnl -n {NUM}. Fix #508 * Removed extra newline at end of title * Use ansiwrap to properly wrap strings with ANSI escapes * Add ansiwrap to pyproject.toml * Allow configuration of colors - Replaced raw escapes with colorama - Added colors key to config - Add checks for validity of color values * Add color configuration documentation * Fix broken tests due to config change * Add tests for colors in configs - Identifying invalid color configs - Upgrading config from no colors -> colors * Add colorama dependency for all platforms * Allow users to disable colorization of output * Update poetry.lock * Add tag and body color customization options * Fix colorization of tags in title and body * Updated tests to use no color by default * Change pass to continue in verify_config() * Better style in Entry.py * Reduce code duplication for tag highlighting - Breaks "unreadable date" regression test for unknown reason * Properly colorize tags and print body * Reformatting and clean up * Replace list comprehension with generator * Handle invalid colors by not using a color * Process ANSI escapes properly with behave * Fixed the 'spaces after tags directly next to punctuation' bug Broke processing of tags next to any punctuation at all * Closer to working tag colorization but not perfect * Add tests printing for multiline journals Fix #717 * Correctly indent first line of multiline entry * Add test for multiline entries with tags * Remove redundant UNICODE flag * Progress towards proper tag colorization and body formatting * Fix newline colorization bug Debug code left intact since there are more bugs to fix :/ * And now the space just ends up before the tag instead of after it * Fix assertion syntax warning * Moved tag test to tagging.feature file * Strip out debug code and clean up * Bold datetimes in title * Bold all titles Fix #720 * Remove PY2 and PY3 constants * Fix regression in features/steps/core.py * Fix tag_regex * Remove redundant re.UNICODE flag * Remove extraneous code --- docs/advanced.md | 5 +- features/core.feature | 21 + features/data/configs/basic.yaml | 5 + features/data/configs/bug153.yaml | 5 + features/data/configs/invalid_color.yaml | 17 + .../data/configs/markdown-headings-335.yaml | 5 + features/data/configs/multiline-tags.yaml | 17 + features/data/configs/multiline.yaml | 17 + features/data/configs/no_colors.yaml | 12 + features/data/configs/tags-216.yaml | 5 + features/data/configs/tags-237.yaml | 5 + features/data/configs/tags.yaml | 5 + features/data/configs/unreadabledates.yaml | 5 + features/data/journals/multiline-tags.journal | 7 + features/data/journals/multiline.journal | 5 + features/steps/core.py | 77 ++- features/tagging.feature | 16 + features/upgrade.feature | 6 + jrnl/Entry.py | 74 ++- jrnl/Journal.py | 15 +- jrnl/install.py | 6 +- jrnl/util.py | 107 +++- poetry.lock | 514 +++++++++++++++--- pyproject.toml | 3 +- 24 files changed, 835 insertions(+), 119 deletions(-) create mode 100644 features/data/configs/invalid_color.yaml create mode 100644 features/data/configs/multiline-tags.yaml create mode 100644 features/data/configs/multiline.yaml create mode 100644 features/data/configs/no_colors.yaml create mode 100644 features/data/journals/multiline-tags.journal create mode 100644 features/data/journals/multiline.journal diff --git a/docs/advanced.md b/docs/advanced.md index 0375da10..84bf022d 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -35,8 +35,9 @@ and can be edited with a plain text editor. - `highlight` if `true`, tags will be highlighted in cyan. - `linewrap` - controls the width of the output. Set to `false` if you don't - want to wrap long lines. + controls the width of the output. Set to `false` if you don't want to wrap long lines. + - `colors` + dictionary that controls the colors used to display journal entries. It has two subkeys, which are: `date` and `title`. Current valid values are: `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `MAGENTA`, `CYAN`, and `WHITE`. `colorama.Fore` is used for colorization, and you can find the [docs here](https://github.com/tartley/colorama#colored-output). To disable colored output, set the value to `NONE`. If you set the value of any color subkey to an invalid color, no color will be used. !!! note Although it seems intuitive to use the `#` diff --git a/features/core.feature b/features/core.feature index 34539efb..3c49324c 100644 --- a/features/core.feature +++ b/features/core.feature @@ -13,6 +13,19 @@ Feature: Basic reading and writing to a journal | But I'm better. """ + Scenario: Printing a journal that has multiline entries + Given we use the config "multiline.yaml" + When we run "jrnl -n 1" + Then we should get no error + and the output should be + """ + 2013-06-09 15:39 Multiple line entry. + | This is the first line. + | This line doesn't have any ending punctuation + | + | There is a blank line above this. + """ + Scenario: Writing an entry from command line Given we use the config "basic.yaml" When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." @@ -72,3 +85,11 @@ Feature: Basic reading and writing to a journal When we run "jrnl -on 2013-06-10 -s" Then the output should be "2013-06-10 15:40 Life is good." + Scenario: Invalid color configuration + Given we use the config "invalid_color.yaml" + When we run "jrnl -on 2013-06-10 -s" + Then the output should be + """ + 2013-06-10 15:40 Life is good. + """ + And we should get no error diff --git a/features/data/configs/basic.yaml b/features/data/configs/basic.yaml index 9111b561..020bab18 100644 --- a/features/data/configs/basic.yaml +++ b/features/data/configs/basic.yaml @@ -10,3 +10,8 @@ tagsymbols: "@" template: false timeformat: "%Y-%m-%d %H:%M" indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/bug153.yaml b/features/data/configs/bug153.yaml index 5bbcbf4a..ff645ab6 100644 --- a/features/data/configs/bug153.yaml +++ b/features/data/configs/bug153.yaml @@ -10,3 +10,8 @@ tagsymbols: '@' template: false timeformat: '%Y-%m-%d %H:%M' indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/invalid_color.yaml b/features/data/configs/invalid_color.yaml new file mode 100644 index 00000000..25c0e58d --- /dev/null +++ b/features/data/configs/invalid_color.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: not-a-color + title: also-not-a-color + body: still-no-color + tags: me-too diff --git a/features/data/configs/markdown-headings-335.yaml b/features/data/configs/markdown-headings-335.yaml index 5c33c53e..4368f641 100644 --- a/features/data/configs/markdown-headings-335.yaml +++ b/features/data/configs/markdown-headings-335.yaml @@ -10,3 +10,8 @@ linewrap: 80 tagsymbols: '@' timeformat: '%Y-%m-%d %H:%M' indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/multiline-tags.yaml b/features/data/configs/multiline-tags.yaml new file mode 100644 index 00000000..033aaa27 --- /dev/null +++ b/features/data/configs/multiline-tags.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/multiline-tags.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/multiline.yaml b/features/data/configs/multiline.yaml new file mode 100644 index 00000000..aa35b3f5 --- /dev/null +++ b/features/data/configs/multiline.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/multiline.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/no_colors.yaml b/features/data/configs/no_colors.yaml new file mode 100644 index 00000000..9111b561 --- /dev/null +++ b/features/data/configs/no_colors.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/features/data/configs/tags-216.yaml b/features/data/configs/tags-216.yaml index b71abea5..81b3865f 100644 --- a/features/data/configs/tags-216.yaml +++ b/features/data/configs/tags-216.yaml @@ -10,3 +10,8 @@ linewrap: 80 tagsymbols: '@' timeformat: '%Y-%m-%d %H:%M' indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/tags-237.yaml b/features/data/configs/tags-237.yaml index a5a70d99..5aecd61e 100644 --- a/features/data/configs/tags-237.yaml +++ b/features/data/configs/tags-237.yaml @@ -10,3 +10,8 @@ linewrap: 80 tagsymbols: '@' timeformat: '%Y-%m-%d %H:%M' indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/tags.yaml b/features/data/configs/tags.yaml index 28ef5f69..4b55952c 100644 --- a/features/data/configs/tags.yaml +++ b/features/data/configs/tags.yaml @@ -10,3 +10,8 @@ linewrap: 80 tagsymbols: '@' timeformat: '%Y-%m-%d %H:%M' indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/configs/unreadabledates.yaml b/features/data/configs/unreadabledates.yaml index 474e7aae..99304e5a 100644 --- a/features/data/configs/unreadabledates.yaml +++ b/features/data/configs/unreadabledates.yaml @@ -10,3 +10,8 @@ tagsymbols: "@" template: false timeformat: "%Y-%m-%d %H:%M" indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/journals/multiline-tags.journal b/features/data/journals/multiline-tags.journal new file mode 100644 index 00000000..1fb8706f --- /dev/null +++ b/features/data/journals/multiline-tags.journal @@ -0,0 +1,7 @@ +[2013-06-09 15:39] Multiple @line entry with @tags. +Tag with @punctuation. afterwards +@TagOnLineAloneWithOutPunctuation +@TagOnLineAloneWithPunctuation. +Text before @tag. And After. +@hi. Hello +hi Hello \ No newline at end of file diff --git a/features/data/journals/multiline.journal b/features/data/journals/multiline.journal new file mode 100644 index 00000000..294ed141 --- /dev/null +++ b/features/data/journals/multiline.journal @@ -0,0 +1,5 @@ +[2013-06-09 15:39] Multiple line entry. +This is the first line. +This line doesn't have any ending punctuation + +There is a blank line above this. diff --git a/features/steps/core.py b/features/steps/core.py index 401f94cf..5de028ed 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -10,7 +10,9 @@ try: except ImportError: import parsedatetime as pdt import time +from codecs import encode, decode import os +import ast import json import yaml import keyring @@ -184,11 +186,69 @@ def no_error(context): assert context.exit_status == 0, context.exit_status +@then("the output should be parsable as json") +def check_output_json(context): + out = context.stdout_capture.getvalue() + assert json.loads(out), out + + +@then('"{field}" in the json output should have {number:d} elements') +@then('"{field}" in the json output should have 1 element') +def check_output_field(context, field, number=1): + out = context.stdout_capture.getvalue() + out_json = json.loads(out) + assert field in out_json, [field, out_json] + assert len(out_json[field]) == number, len(out_json[field]) + + +@then('"{field}" in the json output should not contain "{key}"') +def check_output_field_not_key(context, field, key): + out = context.stdout_capture.getvalue() + out_json = json.loads(out) + assert field in out_json + assert key not in out_json[field] + + +@then('"{field}" in the json output should contain "{key}"') +def check_output_field_key(context, field, key): + out = context.stdout_capture.getvalue() + out_json = json.loads(out) + assert field in out_json + assert key in out_json[field] + + +@then('the json output should contain {path} = "{value}"') +def check_json_output_path(context, path, value): + """ E.g. + the json output should contain entries.0.title = "hello" + """ + out = context.stdout_capture.getvalue() + struct = json.loads(out) + + for node in path.split("."): + try: + struct = struct[int(node)] + except ValueError: + struct = struct[node] + assert struct == value, struct + + +def process_ANSI_escapes(text): + """Escapes and 'unescapes' a string with ANSI escapes so that behave stdout + comparisons work properly. This will render colors, and works with unicode + characters. https://stackoverflow.com/a/57192592 + :param str text: The text to be escaped and unescaped + :return: Colorized / escaped text + :rtype: str + """ + return decode(encode(text, "latin-1", "backslashreplace"), "unicode-escape") + + @then("the output should be") @then('the output should be "{text}"') def check_output(context, text=None): text = (text or context.text).strip().splitlines() - out = context.stdout_capture.getvalue().strip().splitlines() + out = process_ANSI_escapes(context.stdout_capture.getvalue().strip()).splitlines() assert len(text) == len(out), "Output has {} lines (expected: {})".format( len(out), len(text) ) @@ -201,7 +261,7 @@ def check_output(context, text=None): @then('the output should contain "{text}" in the local time') def check_output_time_inline(context, text): - out = context.stdout_capture.getvalue() + out = process_ANSI_escapes(context.stdout_capture.getvalue()) local_tz = tzlocal.get_localzone() date, flag = CALENDAR.parse(text) output_date = time.strftime("%Y-%m-%d %H:%M", date) @@ -213,7 +273,7 @@ def check_output_time_inline(context, text): @then('the output should contain "{text}" or "{text2}"') def check_output_inline(context, text=None, text2=None): text = text or context.text - out = context.stdout_capture.getvalue() + out = process_ANSI_escapes(context.stdout_capture.getvalue()) assert text in out or text2 in out, text or text2 @@ -253,8 +313,15 @@ def journal_doesnt_exist(context, journal_name="default"): @then('the config should have "{key}" set to "{value}"') @then('the config for journal "{journal}" should have "{key}" set to "{value}"') def config_var(context, key, value, journal=None): - t, value = value.split(":") - value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t](value) + if not value[0] == "{": + t, value = value.split(":") + value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t]( + value + ) + else: + # Handle value being a dictionary + value = ast.literal_eval(value) + config = util.load_config(install.CONFIG_FILE_PATH) if journal: config = config["journals"][journal] diff --git a/features/tagging.feature b/features/tagging.feature index 2cbf7ce1..8b4cefb7 100644 --- a/features/tagging.feature +++ b/features/tagging.feature @@ -82,3 +82,19 @@ Feature: Tagging """ @thought : 2 """ + + + Scenario: Printing a journal that has multiline entries with tags + Given we use the config "multiline-tags.yaml" + When we run "jrnl -n 1" + Then we should get no error + and the output should be + """ + 2013-06-09 15:39 Multiple @line entry with @tags. + | Tag with @punctuation. afterwards + | @TagOnLineAloneWithOutPunctuation + | @TagOnLineAloneWithPunctuation. + | Text before @tag. And After. + | @hi. Hello + | hi Hello + """ \ No newline at end of file diff --git a/features/upgrade.feature b/features/upgrade.feature index ef597d4f..e4377970 100644 --- a/features/upgrade.feature +++ b/features/upgrade.feature @@ -22,6 +22,11 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Then the output should contain "Password" and the output should contain "2013-06-10 15:40 Life is good" + Scenario: Upgrading a config without colors to colors + Given we use the config "no_colors.yaml" + When we run "jrnl -n 1" + Then the config should have "colors" set to "{'date':'none', 'title':'none', 'body':'none', 'tags':'none'}" + Scenario: Upgrade and parse journals with little endian date format Given we use the config "upgrade_from_195_little_endian_dates.json" When we run "jrnl -9" and enter "Y" @@ -32,3 +37,4 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x 10.06.2013 15:40 He said "[this] is the best time to be alive". """ Then the journal should have 2 entries + diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 01f56d5a..02f7c468 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -1,9 +1,9 @@ #!/usr/bin/env python import re -import textwrap +import ansiwrap from datetime import datetime -from .util import split_title +from .util import split_title, colorize, highlight_tags_with_background_color class Entry: @@ -49,7 +49,7 @@ class Entry: @staticmethod def tag_regex(tagsymbols): - pattern = fr"(?u)(?:^|\s)([{tagsymbols}][-+*#/\w]+)" + pattern = fr"(? 20 or not all( diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 9d868807..3302cfdd 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -153,20 +153,7 @@ class Journal: def pprint(self, short=False): """Prettyprints the journal's entries""" - sep = "\n" - pp = sep.join([e.pprint(short=short) for e in self.entries]) - if self.config["highlight"]: # highlight tags - if self.search_tags: - for tag in self.search_tags: - tagre = re.compile(re.escape(tag), re.IGNORECASE) - pp = re.sub(tagre, lambda match: util.colorize(match.group(0)), pp) - else: - pp = re.sub( - Entry.Entry.tag_regex(self.config["tagsymbols"]), - lambda match: util.colorize(match.group(0)), - pp, - ) - return pp + return "\n".join([e.pprint(short=short) for e in self.entries]) def __str__(self): return self.pprint() diff --git a/jrnl/install.py b/jrnl/install.py index 118b7c32..d8b3255f 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -9,7 +9,7 @@ from . import upgrade from . import __version__ from .Journal import PlainJournal from .EncryptedJournal import EncryptedJournal -from .util import UserAbort +from .util import UserAbort, verify_config import yaml import logging import sys @@ -47,7 +47,7 @@ def module_exists(module_name): default_config = { "version": __version__, - "journals": {DEFAULT_JOURNAL_KEY: JOURNAL_FILE_PATH}, + "journals": {"default": JOURNAL_FILE_PATH}, "editor": os.getenv("VISUAL") or os.getenv("EDITOR") or "", "encrypt": False, "template": False, @@ -58,6 +58,7 @@ default_config = { "highlight": True, "linewrap": 79, "indent_character": "|", + "colors": {"date": "none", "title": "none", "body": "none", "tags": "none",}, } @@ -114,6 +115,7 @@ def load_or_install_jrnl(): sys.exit(1) upgrade_config(config) + verify_config(config) return config else: diff --git a/jrnl/util.py b/jrnl/util.py index add70ff3..9bc6e4b6 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -4,24 +4,24 @@ import sys import os import getpass as gp import yaml +import colorama if "win32" in sys.platform: - import colorama - colorama.init() import re import tempfile import subprocess import unicodedata import shlex +from string import punctuation, whitespace import logging from typing import Optional, Callable log = logging.getLogger(__name__) -WARNING_COLOR = "\033[33m" -ERROR_COLOR = "\033[31m" -RESET_COLOR = "\033[0m" +WARNING_COLOR = colorama.Fore.YELLOW +ERROR_COLOR = colorama.Fore.RED +RESET_COLOR = colorama.Fore.RESET # Based on Segtok by Florian Leitner # https://github.com/fnl/segtok @@ -140,6 +140,27 @@ def scope_config(config, journal_name): return config +def verify_config(config): + """ + Ensures the keys set for colors are valid colorama.Fore attributes, or "None" + :return: True if all keys are set correctly, False otherwise + """ + all_valid_colors = True + for key, color in config["colors"].items(): + upper_color = color.upper() + if upper_color == "NONE": + continue + if not getattr(colorama.Fore, upper_color, None): + print( + "[{2}ERROR{3}: {0} set to invalid color: {1}]".format( + key, color, ERROR_COLOR, RESET_COLOR + ), + file=sys.stderr, + ) + all_valid_colors = False + return all_valid_colors + + def get_text_from_editor(config, template=""): filehandle, tmpfile = tempfile.mkstemp(prefix="jrnl", text=True, suffix=".txt") os.close(filehandle) @@ -165,9 +186,79 @@ def get_text_from_editor(config, template=""): return raw -def colorize(string): - """Returns the string wrapped in cyan ANSI escape""" - return f"\033[36m{string}\033[39m" +def colorize(string, color, bold=False): + """Returns the string colored with colorama.Fore.color. If the color set by + the user is "NONE" or the color doesn't exist in the colorama.Fore attributes, + it returns the string without any modification.""" + color_escape = getattr(colorama.Fore, color.upper(), None) + if not color_escape: + return string + elif not bold: + return color_escape + string + colorama.Fore.RESET + else: + return colorama.Style.BRIGHT + color_escape + string + colorama.Style.RESET_ALL + + +def highlight_tags_with_background_color(entry, text, color, is_title=False): + """ + Takes a string and colorizes the tags in it based upon the config value for + color.tags, while colorizing the rest of the text based on `color`. + :param entry: Entry object, for access to journal config + :param text: Text to be colorized + :param color: Color for non-tag text, passed to colorize() + :param is_title: Boolean flag indicating if the text is a title or not + :return: Colorized str + """ + + def colorized_text_generator(fragments): + """Efficiently generate colorized tags / text from text fragments. + Taken from @shobrook. Thanks, buddy :) + :param fragments: List of strings representing parts of entry (tag or word). + :rtype: List of tuples + :returns [(colorized_str, original_str)]""" + for part in fragments: + if part and part[0] not in config["tagsymbols"]: + yield (colorize(part, color, bold=is_title), part) + elif part: + yield (colorize(part, config["colors"]["tags"], bold=True), part) + + config = entry.journal.config + if config["highlight"]: # highlight tags + if entry.journal.search_tags: + text_fragments = [] + for tag in entry.search_tags: + text_fragments.extend( + re.split( + re.compile(re.escape(tag), re.IGNORECASE), + text, + flags=re.UNICODE, + ) + ) + else: + text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text) + + # Colorizing tags inside of other blocks of text + final_text = "" + previous_piece = "" + for colorized_piece, piece in colorized_text_generator(text_fragments): + # If this piece is entirely punctuation or whitespace or the start + # of a line or the previous piece was a tag or this piece is a tag, + # then add it to the final text without a leading space. + if ( + all(char in punctuation + whitespace for char in piece) + or previous_piece.endswith("\n") + or (previous_piece and previous_piece[0] in config["tagsymbols"]) + or piece[0] in config["tagsymbols"] + ): + final_text += colorized_piece + else: + # Otherwise add a leading space and then append the piece. + final_text += " " + colorized_piece + + previous_piece = piece + return final_text.lstrip() + else: + return text def slugify(string): diff --git a/poetry.lock b/poetry.lock index 16be3709..1a24ab9b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,3 +1,14 @@ +[[package]] +category = "main" +description = "textwrap, but savvy to ANSI colors and styles" +name = "ansiwrap" +optional = false +python-versions = "*" +version = "0.8.4" + +[package.dependencies] +textwrap3 = ">=0.9.2" + [[package]] category = "dev" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." @@ -22,6 +33,12 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "19.3.0" +[package.extras] +azure-pipelines = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "pytest-azurepipelines"] +dev = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "pre-commit"] +docs = ["sphinx", "zope.interface"] +tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] + [[package]] category = "dev" description = "behave is behaviour-driven development, Python style" @@ -35,6 +52,10 @@ parse = ">=1.8.2" parse-type = ">=0.4.2" six = ">=1.11" +[package.extras] +develop = ["coverage", "pytest (>=3.0)", "pytest-cov", "tox", "invoke (>=0.21.0)", "path.py (>=8.1.2)", "pycmd", "pathlib", "modernize (>=0.5)", "pylint"] +docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] + [[package]] category = "dev" description = "The uncompromising code formatter." @@ -52,13 +73,16 @@ regex = "*" toml = ">=0.9.4" typed-ast = ">=1.4.0" +[package.extras] +d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] + [[package]] category = "main" description = "Foreign Function Interface for Python calling C code." name = "cffi" optional = false python-versions = "*" -version = "1.13.2" +version = "1.14.0" [package.dependencies] pycparser = "*" @@ -74,7 +98,6 @@ version = "7.0" [[package]] category = "main" description = "Cross-platform colored terminal text." -marker = "sys_platform == \"win32\"" name = "colorama" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -92,6 +115,13 @@ version = "2.8" cffi = ">=1.8,<1.11.3 || >1.11.3" six = ">=1.4.1" +[package.extras] +docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0)", "sphinx-rtd-theme"] +docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +idna = ["idna (>=2.1)"] +pep8test = ["flake8", "flake8-import-order", "pep8-naming"] +test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] + [[package]] category = "dev" description = "Discover and load entry points from installed packages." @@ -114,6 +144,14 @@ mccabe = ">=0.6.0,<0.7.0" pycodestyle = ">=2.5.0,<2.6.0" pyflakes = ">=2.1.0,<2.2.0" +[[package]] +category = "dev" +description = "Clean single-source support for Python 3 and 2" +name = "future" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "0.18.2" + [[package]] category = "main" description = "Read metadata from Python packages" @@ -121,11 +159,15 @@ marker = "python_version < \"3.8\"" name = "importlib-metadata" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "1.3.0" +version = "1.5.0" [package.dependencies] zipp = ">=0.5" +[package.extras] +docs = ["sphinx", "rst.linker"] +testing = ["packaging", "importlib-resources"] + [[package]] category = "main" description = "Low-level, pure Python DBus protocol wrapper." @@ -135,17 +177,23 @@ optional = false python-versions = ">=3.5" version = "0.4.2" +[package.extras] +dev = ["testpath"] + [[package]] category = "dev" description = "A very fast and expressive template engine." name = "jinja2" optional = false -python-versions = "*" -version = "2.10.3" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.11.1" [package.dependencies] MarkupSafe = ">=0.23" +[package.extras] +i18n = ["Babel (>=0.8)"] + [[package]] category = "main" description = "Store and access your passwords safely." @@ -162,6 +210,10 @@ secretstorage = "*" python = "<3.8" version = "*" +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] + [[package]] category = "dev" description = "Python LiveReload is an awesome tool for web developers" @@ -174,17 +226,39 @@ version = "2.6.1" six = "*" tornado = "*" +[[package]] +category = "dev" +description = "A Python implementation of Lunr.js" +name = "lunr" +optional = false +python-versions = "*" +version = "0.5.6" + +[package.dependencies] +future = ">=0.16.0" +six = ">=1.11.0" + +[package.dependencies.nltk] +optional = true +version = ">=3.2.5" + +[package.extras] +languages = ["nltk (>=3.2.5)"] + [[package]] category = "dev" description = "Python implementation of Markdown." name = "markdown" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" -version = "3.1.1" +python-versions = ">=3.5" +version = "3.2.1" [package.dependencies] setuptools = ">=36" +[package.extras] +testing = ["coverage", "pyyaml"] + [[package]] category = "dev" description = "Safely add untrusted strings to HTML/XML markup." @@ -206,25 +280,39 @@ category = "dev" description = "Project documentation with Markdown." name = "mkdocs" optional = false -python-versions = ">=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "1.0.4" +python-versions = ">=3.5" +version = "1.1" [package.dependencies] -Jinja2 = ">=2.7.1" -Markdown = ">=2.3.1" +Jinja2 = ">=2.10.1" +Markdown = ">=3.2.1" PyYAML = ">=3.10" click = ">=3.3" livereload = ">=2.5.1" tornado = ">=5.0" +[package.dependencies.lunr] +extras = ["languages"] +version = "0.5.6" + [[package]] -category = "main" -description = "More routines for operating on iterables, beyond itertools" -marker = "python_version < \"3.8\"" -name = "more-itertools" +category = "dev" +description = "Natural Language Toolkit" +name = "nltk" optional = false -python-versions = ">=3.5" -version = "8.0.2" +python-versions = "*" +version = "3.4.5" + +[package.dependencies] +six = "*" + +[package.extras] +all = ["pyparsing", "scikit-learn", "python-crfsuite", "matplotlib", "scipy", "gensim", "requests", "twython", "numpy"] +corenlp = ["requests"] +machine_learning = ["gensim", "numpy", "python-crfsuite", "scikit-learn", "scipy"] +plot = ["matplotlib"] +tgrep = ["pyparsing"] +twitter = ["twython"] [[package]] category = "dev" @@ -246,6 +334,10 @@ version = "0.5.2" parse = ">=1.8.4" six = ">=1.11" +[package.extras] +develop = ["coverage (>=4.4)", "pytest (>=3.2)", "pytest-cov", "tox (>=2.8)"] +docs = ["sphinx (>=1.2)"] + [[package]] category = "main" description = "Parse human-readable date/time text." @@ -262,6 +354,12 @@ optional = false python-versions = "*" version = "1.7.2" +[package.extras] +argon2 = ["argon2-cffi (>=18.2.0)"] +bcrypt = ["bcrypt (>=3.1.0)"] +build_docs = ["sphinx (>=1.6)", "sphinxcontrib-fulltoc (>=1.2.0)", "cloud-sptheme (>=1.10.0)"] +totp = ["cryptography"] + [[package]] category = "dev" description = "Utility library for gitignore style pattern matching of file paths." @@ -335,8 +433,8 @@ category = "main" description = "YAML parser and emitter for Python" name = "pyyaml" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "5.2" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "5.3" [[package]] category = "dev" @@ -344,7 +442,7 @@ description = "Alternative regular expression module, to replace re." name = "regex" optional = false python-versions = "*" -version = "2019.12.20" +version = "2020.2.20" [[package]] category = "main" @@ -353,19 +451,27 @@ marker = "sys_platform == \"linux\"" name = "secretstorage" optional = false python-versions = ">=3.5" -version = "3.1.1" +version = "3.1.2" [package.dependencies] cryptography = "*" -jeepney = "*" +jeepney = ">=0.4.2" [[package]] category = "main" description = "Python 2 and 3 compatibility utilities" name = "six" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*" -version = "1.13.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +version = "1.14.0" + +[[package]] +category = "main" +description = "textwrap from Python 3.6 backport (plus a few tweaks)" +name = "textwrap3" +optional = false +python-versions = "*" +version = "0.9.2" [[package]] category = "dev" @@ -389,7 +495,7 @@ description = "a fork of Python 2 and 3 ast modules with type comment support" name = "typed-ast" optional = false python-versions = "*" -version = "1.4.0" +version = "1.4.1" [[package]] category = "main" @@ -408,56 +514,318 @@ description = "Backport of pathlib-compatible object wrapper for zip files" marker = "python_version < \"3.8\"" name = "zipp" optional = false -python-versions = ">=2.7" -version = "0.6.0" +python-versions = ">=3.6" +version = "3.0.0" -[package.dependencies] -more-itertools = "*" +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "98e23837423d5d8621f14cbe592d209ef98e1926b7a3f94e0f88bb6be908aae8" +content-hash = "98c4d0d25bb309075ca86c1ed3ed0d46b0fd1dad66510f8fe95b0ad350065df5" python-versions = ">=3.6.0, <3.9.0" -[metadata.hashes] -appdirs = ["9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92", "d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e"] -asteval = ["5d64e18b8a72c2c7ae8f9b70d1f80b68bbcaa98c1c0d7047c35489d03209bc86"] -attrs = ["08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"] -behave = ["b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86", "ebda1a6c9e5bfe95c5f9f0a2794e01c7098b3dde86c10a95d8621c5907ff6f1c"] -black = ["1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b", "c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"] -cffi = ["0b49274afc941c626b605fb59b59c3485c17dc776dc3cc7cc14aca74cc19cc42", "0e3ea92942cb1168e38c05c1d56b0527ce31f1a370f6117f1d490b8dcd6b3a04", "135f69aecbf4517d5b3d6429207b2dff49c876be724ac0c8bf8e1ea99df3d7e5", "19db0cdd6e516f13329cba4903368bff9bb5a9331d3410b1b448daaadc495e54", "2781e9ad0e9d47173c0093321bb5435a9dfae0ed6a762aabafa13108f5f7b2ba", "291f7c42e21d72144bb1c1b2e825ec60f46d0a7468f5346841860454c7aa8f57", "2c5e309ec482556397cb21ede0350c5e82f0eb2621de04b2633588d118da4396", "2e9c80a8c3344a92cb04661115898a9129c074f7ab82011ef4b612f645939f12", "32a262e2b90ffcfdd97c7a5e24a6012a43c61f1f5a57789ad80af1d26c6acd97", "3c9fff570f13480b201e9ab69453108f6d98244a7f495e91b6c654a47486ba43", "415bdc7ca8c1c634a6d7163d43fb0ea885a07e9618a64bda407e04b04333b7db", "42194f54c11abc8583417a7cf4eaff544ce0de8187abaf5d29029c91b1725ad3", "4424e42199e86b21fc4db83bd76909a6fc2a2aefb352cb5414833c030f6ed71b", "4a43c91840bda5f55249413037b7a9b79c90b1184ed504883b72c4df70778579", "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346", "5c4fae4e9cdd18c82ba3a134be256e98dc0596af1e7285a3d2602c97dcfa5159", "5ecfa867dea6fabe2a58f03ac9186ea64da1386af2159196da51c4904e11d652", "62f2578358d3a92e4ab2d830cd1c2049c9c0d0e6d3c58322993cc341bdeac22e", "6471a82d5abea994e38d2c2abc77164b4f7fbaaf80261cb98394d5793f11b12a", "6d4f18483d040e18546108eb13b1dfa1000a089bcf8529e30346116ea6240506", "71a608532ab3bd26223c8d841dde43f3516aa5d2bf37b50ac410bb5e99053e8f", "74a1d8c85fb6ff0b30fbfa8ad0ac23cd601a138f7509dc617ebc65ef305bb98d", "7b93a885bb13073afb0aa73ad82059a4c41f4b7d8eb8368980448b52d4c7dc2c", "7d4751da932caaec419d514eaa4215eaf14b612cff66398dd51129ac22680b20", "7f627141a26b551bdebbc4855c1157feeef18241b4b8366ed22a5c7d672ef858", "8169cf44dd8f9071b2b9248c35fc35e8677451c52f795daa2bb4643f32a540bc", "aa00d66c0fab27373ae44ae26a66a9e43ff2a678bf63a9c7c1a9a4d61172827a", "ccb032fda0873254380aa2bfad2582aedc2959186cce61e3a17abc1a55ff89c3", "d754f39e0d1603b5b24a7f8484b22d2904fa551fe865fd0d4c3332f078d20d4e", "d75c461e20e29afc0aee7172a0950157c704ff0dd51613506bd7d82b718e7410", "dcd65317dd15bc0451f3e01c80da2216a31916bdcffd6221ca1202d96584aa25", "e570d3ab32e2c2861c4ebe6ffcad6a8abf9347432a37608fe1fbd157b3f0036b", "fd43a88e045cf992ed09fa724b5315b790525f2676883a6ea64e3263bae6549d"] -click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] -colorama = ["7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff", "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"] -cryptography = ["02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c", "1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595", "369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad", "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651", "44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2", "4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff", "58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d", "6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42", "7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d", "73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e", "7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912", "90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793", "971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13", "a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7", "b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0", "b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879", "d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f", "de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9", "df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2", "ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf", "fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"] -entrypoints = ["589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"] -flake8 = ["45681a117ecc81e870cbf1262835ae4af5e7a8b08e40b944a8a6e6b895914cfb", "49356e766643ad15072a789a20915d3c91dc89fd313ccd71802303fd67e4deca"] -importlib-metadata = ["073a852570f92da5f744a3472af1b61e28e9f78ccf0c9117658dc32b15de7b45", "d95141fbfa7ef2ec65cfd945e2af7e5a6ddbd7c8d9a25e66ff3be8e3daf9f60f"] -jeepney = ["0ba6d8c597e9bef1ebd18aaec595f942a264e25c1a48f164d46120eacaa2e9bb", "6f45dce1125cf6c58a1c88123d3831f36a789f9204fbad3172eac15f8ccd08d0"] -jinja2 = ["74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f", "9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de"] -keyring = ["9b80469783d3f6106bce1d389c6b8b20c8d4d739943b1b8cd0ddc2a45d065f9d", "ee3d35b7f1ac3cb69e9a1e4323534649d3ab2fea402738a77e4250c152970fed"] -livereload = ["78d55f2c268a8823ba499305dcac64e28ddeb9a92571e12d543cd304faf5817b", "89254f78d7529d7ea0a3417d224c34287ebfe266b05e67e51facaf82c27f0f66"] -markdown = ["2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a", "56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c"] -markupsafe = ["00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", "09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", "09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", "1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", "24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", "43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", "46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", "535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", "62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", "6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", "717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", "79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", "7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", "88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", "8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", "98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", "9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", "9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", "ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", "b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", "b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", "b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", "ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", "c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", "cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", "e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"] -mccabe = ["ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"] -mkdocs = ["17d34329aad75d5de604b9ed4e31df3a4d235afefdc46ce7b1964fddb2e1e939", "8cc8b38325456b9e942c981a209eaeb1e9f3f77b493ad755bfef889b9c8d356a"] -more-itertools = ["b84b238cce0d9adad5ed87e745778d20a3f8487d0f0cb8b8a586816c7496458d", "c833ef592a0324bcc6a60e48440da07645063c453880c9477ceb22490aec1564"] -parse = ["95a4f4469e37c57b5e924629ac99926f28bee7da59515dc5b8078c4c3e779249"] -parse-type = ["089a471b06327103865dfec2dd844230c3c658a4a1b5b4c8b6c16c8f77577f9e", "7f690b18d35048c15438d6d0571f9045cffbec5907e0b1ccf006f889e3a38c0b"] -parsedatetime = ["3b835fc54e472c17ef447be37458b400e3fefdf14bb1ffdedb5d2c853acf4ba1", "d2e9ddb1e463de871d32088a3f3cea3dc8282b1b2800e081bd0ef86900451667"] -passlib = ["68c35c98a7968850e17f1b6892720764cc7eed0ef2b7cb3116a89a28e43fe177", "8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8"] -pathspec = ["163b0632d4e31cef212976cf57b43d9fd6b0bac6e67c26015d611a647d5e7424", "562aa70af2e0d434367d9790ad37aed893de47f1693e4201fd1d3dca15d19b96"] -pycodestyle = ["95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56", "e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"] -pycparser = ["a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"] -pyflakes = ["17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0", "d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2"] -python-dateutil = ["73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"] -pytz = ["1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d", "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"] -pywin32-ctypes = ["24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942", "9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"] -pyxdg = ["1948ff8e2db02156c0cccd2529b43c0cff56ebaa71f5f021bbd755bc1419190e", "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06"] -pyyaml = ["0e7f69397d53155e55d10ff68fdfb2cf630a35e6daf65cf0bdeaf04f127c09dc", "2e9f0b7c5914367b0916c3c104a024bb68f269a486b9d04a2e8ac6f6597b7803", "35ace9b4147848cafac3db142795ee42deebe9d0dad885ce643928e88daebdcc", "38a4f0d114101c58c0f3a88aeaa44d63efd588845c5a2df5290b73db8f246d15", "483eb6a33b671408c8529106df3707270bfacb2447bf8ad856a4b4f57f6e3075", "4b6be5edb9f6bb73680f5bf4ee08ff25416d1400fbd4535fe0069b2994da07cd", "7f38e35c00e160db592091751d385cd7b3046d6d51f578b29943225178257b31", "8100c896ecb361794d8bfdb9c11fce618c7cf83d624d73d5ab38aef3bc82d43f", "c0ee8eca2c582d29c3c2ec6e2c4f703d1b7f1fb10bc72317355a746057e7346c", "e4c015484ff0ff197564917b4b4246ca03f411b9bd7f16e02a2f586eb48b6d04", "ebc4ed52dcc93eeebeae5cf5deb2ae4347b3a81c3fa12b0b8c976544829396a4"] -regex = ["032fdcc03406e1a6485ec09b826eac78732943840c4b29e503b789716f051d8d", "0e6cf1e747f383f52a0964452658c04300a9a01e8a89c55ea22813931b580aa8", "106e25a841921d8259dcef2a42786caae35bc750fb996f830065b3dfaa67b77e", "1768cf42a78a11dae63152685e7a1d90af7a8d71d2d4f6d2387edea53a9e0588", "27d1bd20d334f50b7ef078eba0f0756a640fd25f5f1708d3b5bed18a5d6bced9", "29b20f66f2e044aafba86ecf10a84e611b4667643c42baa004247f5dfef4f90b", "4850c78b53acf664a6578bba0e9ebeaf2807bb476c14ec7e0f936f2015133cae", "57eacd38a5ec40ed7b19a968a9d01c0d977bda55664210be713e750dd7b33540", "724eb24b92fc5fdc1501a1b4df44a68b9c1dda171c8ef8736799e903fb100f63", "77ae8d926f38700432807ba293d768ba9e7652df0cbe76df2843b12f80f68885", "78b3712ec529b2a71731fbb10b907b54d9c53a17ca589b42a578bc1e9a2c82ea", "7bbbdbada3078dc360d4692a9b28479f569db7fc7f304b668787afc9feb38ec8", "8d9ef7f6c403e35e73b7fc3cde9f6decdc43b1cb2ff8d058c53b9084bfcb553e", "a83049eb717ae828ced9cf607845929efcb086a001fc8af93ff15c50012a5716", "adc35d38952e688535980ae2109cad3a109520033642e759f987cf47fe278aa1", "c29a77ad4463f71a506515d9ec3a899ed026b4b015bf43245c919ff36275444b", "cfd31b3300fefa5eecb2fe596c6dee1b91b3a05ece9d5cfd2631afebf6c6fadd", "d3ee0b035816e0520fac928de31b6572106f0d75597f6fa3206969a02baba06f", "d508875793efdf6bab3d47850df8f40d4040ae9928d9d80864c1768d6aeaf8e3", "ef0b828a7e22e58e06a1cceddba7b4665c6af8afeb22a0d8083001330572c147", "faad39fdbe2c2ccda9846cd21581063086330efafa47d87afea4073a08128656"] -secretstorage = ["20c797ae48a4419f66f8d28fc221623f11fc45b6828f96bdb1ad9990acb59f92", "7a119fb52a88e398dbb22a4b3eb39b779bfbace7e4153b7bc6e5954d86282a8a"] -six = ["1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd", "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"] -toml = ["229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c", "235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e", "f1db651f9657708513243e61e6cc67d101a39bad662eaa9b5546f789338e07a3"] -tornado = ["349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c", "398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60", "4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281", "559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5", "abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7", "c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9", "c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5"] -typed-ast = ["1170afa46a3799e18b4c977777ce137bb53c7485379d9706af8a59f2ea1aa161", "18511a0b3e7922276346bcb47e2ef9f38fb90fd31cb9223eed42c85d1312344e", "262c247a82d005e43b5b7f69aff746370538e176131c32dda9cb0f324d27141e", "2b907eb046d049bcd9892e3076c7a6456c93a25bebfe554e931620c90e6a25b0", "354c16e5babd09f5cb0ee000d54cfa38401d8b8891eefa878ac772f827181a3c", "48e5b1e71f25cfdef98b013263a88d7145879fbb2d5185f2a0c79fa7ebbeae47", "4e0b70c6fc4d010f8107726af5fd37921b666f5b31d9331f0bd24ad9a088e631", "630968c5cdee51a11c05a30453f8cd65e0cc1d2ad0d9192819df9978984529f4", "66480f95b8167c9c5c5c87f32cf437d585937970f3fc24386f313a4c97b44e34", "71211d26ffd12d63a83e079ff258ac9d56a1376a25bc80b1cdcdf601b855b90b", "7954560051331d003b4e2b3eb822d9dd2e376fa4f6d98fee32f452f52dd6ebb2", "838997f4310012cf2e1ad3803bce2f3402e9ffb71ded61b5ee22617b3a7f6b6e", "95bd11af7eafc16e829af2d3df510cecfd4387f6453355188342c3e79a2ec87a", "bc6c7d3fa1325a0c6613512a093bc2a2a15aeec350451cbdf9e1d4bffe3e3233", "cc34a6f5b426748a507dd5d1de4c1978f2eb5626d51326e43280941206c209e1", "d755f03c1e4a51e9b24d899561fec4ccaf51f210d52abdf8c07ee2849b212a36", "d7c45933b1bdfaf9f36c579671fec15d25b06c8398f113dab64c18ed1adda01d", "d896919306dd0aa22d0132f62a1b78d11aaf4c9fc5b3410d3c666b818191630a", "fdc1c9bbf79510b76408840e009ed65958feba92a88833cdceecff93ae8fff66", "ffde2fbfad571af120fcbfbbc61c72469e72f550d676c3342492a9dfdefb8f12"] -tzlocal = ["4ebeb848845ac898da6519b9b31879cf13b6626f7184c496037b818e238f2c4e"] -zipp = ["3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e", "f06903e9f1f43b12d371004b4ac7b06ab39a44adc747266928ae6debfa7b3335"] +[metadata.files] +ansiwrap = [ + {file = "ansiwrap-0.8.4-py2.py3-none-any.whl", hash = "sha256:7b053567c88e1ad9eed030d3ac41b722125e4c1271c8a99ade797faff1f49fb1"}, + {file = "ansiwrap-0.8.4.zip", hash = "sha256:ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7"}, +] +appdirs = [ + {file = "appdirs-1.4.3-py2.py3-none-any.whl", hash = "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e"}, + {file = "appdirs-1.4.3.tar.gz", hash = "sha256:9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92"}, +] +asteval = [ + {file = "asteval-0.9.18.tar.gz", hash = "sha256:5d64e18b8a72c2c7ae8f9b70d1f80b68bbcaa98c1c0d7047c35489d03209bc86"}, +] +attrs = [ + {file = "attrs-19.3.0-py2.py3-none-any.whl", hash = "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"}, + {file = "attrs-19.3.0.tar.gz", hash = "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"}, +] +behave = [ + {file = "behave-1.2.6-py2.py3-none-any.whl", hash = "sha256:ebda1a6c9e5bfe95c5f9f0a2794e01c7098b3dde86c10a95d8621c5907ff6f1c"}, + {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, +] +black = [ + {file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, + {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, +] +cffi = [ + {file = "cffi-1.14.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384"}, + {file = "cffi-1.14.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30"}, + {file = "cffi-1.14.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c"}, + {file = "cffi-1.14.0-cp27-cp27m-win32.whl", hash = "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78"}, + {file = "cffi-1.14.0-cp27-cp27m-win_amd64.whl", hash = "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793"}, + {file = "cffi-1.14.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e"}, + {file = "cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a"}, + {file = "cffi-1.14.0-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff"}, + {file = "cffi-1.14.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f"}, + {file = "cffi-1.14.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa"}, + {file = "cffi-1.14.0-cp35-cp35m-win32.whl", hash = "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5"}, + {file = "cffi-1.14.0-cp35-cp35m-win_amd64.whl", hash = "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4"}, + {file = "cffi-1.14.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d"}, + {file = "cffi-1.14.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc"}, + {file = "cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac"}, + {file = "cffi-1.14.0-cp36-cp36m-win32.whl", hash = "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f"}, + {file = "cffi-1.14.0-cp36-cp36m-win_amd64.whl", hash = "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b"}, + {file = "cffi-1.14.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3"}, + {file = "cffi-1.14.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66"}, + {file = "cffi-1.14.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0"}, + {file = "cffi-1.14.0-cp37-cp37m-win32.whl", hash = "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f"}, + {file = "cffi-1.14.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26"}, + {file = "cffi-1.14.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd"}, + {file = "cffi-1.14.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55"}, + {file = "cffi-1.14.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2"}, + {file = "cffi-1.14.0-cp38-cp38-win32.whl", hash = "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8"}, + {file = "cffi-1.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b"}, + {file = "cffi-1.14.0.tar.gz", hash = "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6"}, +] +click = [ + {file = "Click-7.0-py2.py3-none-any.whl", hash = "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13"}, + {file = "Click-7.0.tar.gz", hash = "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"}, +] +colorama = [ + {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, + {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, +] +cryptography = [ + {file = "cryptography-2.8-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"}, + {file = "cryptography-2.8-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2"}, + {file = "cryptography-2.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad"}, + {file = "cryptography-2.8-cp27-cp27m-win32.whl", hash = "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2"}, + {file = "cryptography-2.8-cp27-cp27m-win_amd64.whl", hash = "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912"}, + {file = "cryptography-2.8-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d"}, + {file = "cryptography-2.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42"}, + {file = "cryptography-2.8-cp34-abi3-macosx_10_6_intel.whl", hash = "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879"}, + {file = "cryptography-2.8-cp34-abi3-manylinux1_x86_64.whl", hash = "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d"}, + {file = "cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl", hash = "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9"}, + {file = "cryptography-2.8-cp34-cp34m-win32.whl", hash = "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c"}, + {file = "cryptography-2.8-cp34-cp34m-win_amd64.whl", hash = "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0"}, + {file = "cryptography-2.8-cp35-cp35m-win32.whl", hash = "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf"}, + {file = "cryptography-2.8-cp35-cp35m-win_amd64.whl", hash = "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793"}, + {file = "cryptography-2.8-cp36-cp36m-win32.whl", hash = "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595"}, + {file = "cryptography-2.8-cp36-cp36m-win_amd64.whl", hash = "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7"}, + {file = "cryptography-2.8-cp37-cp37m-win32.whl", hash = "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff"}, + {file = "cryptography-2.8-cp37-cp37m-win_amd64.whl", hash = "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f"}, + {file = "cryptography-2.8-cp38-cp38-win32.whl", hash = "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e"}, + {file = "cryptography-2.8-cp38-cp38-win_amd64.whl", hash = "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13"}, + {file = "cryptography-2.8.tar.gz", hash = "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651"}, +] +entrypoints = [ + {file = "entrypoints-0.3-py2.py3-none-any.whl", hash = "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19"}, + {file = "entrypoints-0.3.tar.gz", hash = "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"}, +] +flake8 = [ + {file = "flake8-3.7.9-py2.py3-none-any.whl", hash = "sha256:49356e766643ad15072a789a20915d3c91dc89fd313ccd71802303fd67e4deca"}, + {file = "flake8-3.7.9.tar.gz", hash = "sha256:45681a117ecc81e870cbf1262835ae4af5e7a8b08e40b944a8a6e6b895914cfb"}, +] +future = [ + {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, +] +importlib-metadata = [ + {file = "importlib_metadata-1.5.0-py2.py3-none-any.whl", hash = "sha256:b97607a1a18a5100839aec1dc26a1ea17ee0d93b20b0f008d80a5a050afb200b"}, + {file = "importlib_metadata-1.5.0.tar.gz", hash = "sha256:06f5b3a99029c7134207dd882428a66992a9de2bef7c2b699b5641f9886c3302"}, +] +jeepney = [ + {file = "jeepney-0.4.2-py3-none-any.whl", hash = "sha256:6f45dce1125cf6c58a1c88123d3831f36a789f9204fbad3172eac15f8ccd08d0"}, + {file = "jeepney-0.4.2.tar.gz", hash = "sha256:0ba6d8c597e9bef1ebd18aaec595f942a264e25c1a48f164d46120eacaa2e9bb"}, +] +jinja2 = [ + {file = "Jinja2-2.11.1-py2.py3-none-any.whl", hash = "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49"}, + {file = "Jinja2-2.11.1.tar.gz", hash = "sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250"}, +] +keyring = [ + {file = "keyring-19.3.0-py2.py3-none-any.whl", hash = "sha256:9b80469783d3f6106bce1d389c6b8b20c8d4d739943b1b8cd0ddc2a45d065f9d"}, + {file = "keyring-19.3.0.tar.gz", hash = "sha256:ee3d35b7f1ac3cb69e9a1e4323534649d3ab2fea402738a77e4250c152970fed"}, +] +livereload = [ + {file = "livereload-2.6.1-py2.py3-none-any.whl", hash = "sha256:78d55f2c268a8823ba499305dcac64e28ddeb9a92571e12d543cd304faf5817b"}, + {file = "livereload-2.6.1.tar.gz", hash = "sha256:89254f78d7529d7ea0a3417d224c34287ebfe266b05e67e51facaf82c27f0f66"}, +] +lunr = [ + {file = "lunr-0.5.6-py2.py3-none-any.whl", hash = "sha256:1208622930c915a07e6f8e8640474357826bad48534c0f57969b6fca9bffc88e"}, + {file = "lunr-0.5.6.tar.gz", hash = "sha256:7be69d7186f65784a4f2adf81e5c58efd6a9921aa95966babcb1f2f2ada75c20"}, +] +markdown = [ + {file = "Markdown-3.2.1-py2.py3-none-any.whl", hash = "sha256:e4795399163109457d4c5af2183fbe6b60326c17cfdf25ce6e7474c6624f725d"}, + {file = "Markdown-3.2.1.tar.gz", hash = "sha256:90fee683eeabe1a92e149f7ba74e5ccdc81cd397bd6c516d93a8da0ef90b6902"}, +] +markupsafe = [ + {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, + {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, +] +mccabe = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] +mkdocs = [ + {file = "mkdocs-1.1-py2.py3-none-any.whl", hash = "sha256:1e385a70aea8a9dedb731aea4fd5f3704b2074801c4f96f06b2920999babda8a"}, + {file = "mkdocs-1.1.tar.gz", hash = "sha256:9243291392f59e20b655e4e46210233453faf97787c2cf72176510e868143174"}, +] +nltk = [ + {file = "nltk-3.4.5.win32.exe", hash = "sha256:a08bdb4b8a1c13de16743068d9eb61c8c71c2e5d642e8e08205c528035843f82"}, + {file = "nltk-3.4.5.zip", hash = "sha256:bed45551259aa2101381bbdd5df37d44ca2669c5c3dad72439fa459b29137d94"}, +] +parse = [ + {file = "parse-1.14.0.tar.gz", hash = "sha256:95a4f4469e37c57b5e924629ac99926f28bee7da59515dc5b8078c4c3e779249"}, +] +parse-type = [ + {file = "parse_type-0.5.2-py2.py3-none-any.whl", hash = "sha256:089a471b06327103865dfec2dd844230c3c658a4a1b5b4c8b6c16c8f77577f9e"}, + {file = "parse_type-0.5.2.tar.gz", hash = "sha256:7f690b18d35048c15438d6d0571f9045cffbec5907e0b1ccf006f889e3a38c0b"}, +] +parsedatetime = [ + {file = "parsedatetime-2.5-py2-none-any.whl", hash = "sha256:3b835fc54e472c17ef447be37458b400e3fefdf14bb1ffdedb5d2c853acf4ba1"}, + {file = "parsedatetime-2.5.tar.gz", hash = "sha256:d2e9ddb1e463de871d32088a3f3cea3dc8282b1b2800e081bd0ef86900451667"}, +] +passlib = [ + {file = "passlib-1.7.2-py2.py3-none-any.whl", hash = "sha256:68c35c98a7968850e17f1b6892720764cc7eed0ef2b7cb3116a89a28e43fe177"}, + {file = "passlib-1.7.2.tar.gz", hash = "sha256:8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8"}, +] +pathspec = [ + {file = "pathspec-0.7.0-py2.py3-none-any.whl", hash = "sha256:163b0632d4e31cef212976cf57b43d9fd6b0bac6e67c26015d611a647d5e7424"}, + {file = "pathspec-0.7.0.tar.gz", hash = "sha256:562aa70af2e0d434367d9790ad37aed893de47f1693e4201fd1d3dca15d19b96"}, +] +pycodestyle = [ + {file = "pycodestyle-2.5.0-py2.py3-none-any.whl", hash = "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56"}, + {file = "pycodestyle-2.5.0.tar.gz", hash = "sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"}, +] +pycparser = [ + {file = "pycparser-2.19.tar.gz", hash = "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"}, +] +pyflakes = [ + {file = "pyflakes-2.1.1-py2.py3-none-any.whl", hash = "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0"}, + {file = "pyflakes-2.1.1.tar.gz", hash = "sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2"}, +] +python-dateutil = [ + {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, + {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, +] +pytz = [ + {file = "pytz-2019.3-py2.py3-none-any.whl", hash = "sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d"}, + {file = "pytz-2019.3.tar.gz", hash = "sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"}, +] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] +pyxdg = [ + {file = "pyxdg-0.26-py2.py3-none-any.whl", hash = "sha256:1948ff8e2db02156c0cccd2529b43c0cff56ebaa71f5f021bbd755bc1419190e"}, + {file = "pyxdg-0.26.tar.gz", hash = "sha256:fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06"}, +] +pyyaml = [ + {file = "PyYAML-5.3-cp27-cp27m-win32.whl", hash = "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d"}, + {file = "PyYAML-5.3-cp27-cp27m-win_amd64.whl", hash = "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6"}, + {file = "PyYAML-5.3-cp35-cp35m-win32.whl", hash = "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e"}, + {file = "PyYAML-5.3-cp35-cp35m-win_amd64.whl", hash = "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689"}, + {file = "PyYAML-5.3-cp36-cp36m-win32.whl", hash = "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994"}, + {file = "PyYAML-5.3-cp36-cp36m-win_amd64.whl", hash = "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e"}, + {file = "PyYAML-5.3-cp37-cp37m-win32.whl", hash = "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5"}, + {file = "PyYAML-5.3-cp37-cp37m-win_amd64.whl", hash = "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf"}, + {file = "PyYAML-5.3-cp38-cp38-win32.whl", hash = "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811"}, + {file = "PyYAML-5.3-cp38-cp38-win_amd64.whl", hash = "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20"}, + {file = "PyYAML-5.3.tar.gz", hash = "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615"}, +] +regex = [ + {file = "regex-2020.2.20-cp27-cp27m-win32.whl", hash = "sha256:99272d6b6a68c7ae4391908fc15f6b8c9a6c345a46b632d7fdb7ef6c883a2bbb"}, + {file = "regex-2020.2.20-cp27-cp27m-win_amd64.whl", hash = "sha256:974535648f31c2b712a6b2595969f8ab370834080e00ab24e5dbb9d19b8bfb74"}, + {file = "regex-2020.2.20-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:5de40649d4f88a15c9489ed37f88f053c15400257eeb18425ac7ed0a4e119400"}, + {file = "regex-2020.2.20-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:82469a0c1330a4beb3d42568f82dffa32226ced006e0b063719468dcd40ffdf0"}, + {file = "regex-2020.2.20-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d58a4fa7910102500722defbde6e2816b0372a4fcc85c7e239323767c74f5cbc"}, + {file = "regex-2020.2.20-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:f1ac2dc65105a53c1c2d72b1d3e98c2464a133b4067a51a3d2477b28449709a0"}, + {file = "regex-2020.2.20-cp36-cp36m-win32.whl", hash = "sha256:8c2b7fa4d72781577ac45ab658da44c7518e6d96e2a50d04ecb0fd8f28b21d69"}, + {file = "regex-2020.2.20-cp36-cp36m-win_amd64.whl", hash = "sha256:269f0c5ff23639316b29f31df199f401e4cb87529eafff0c76828071635d417b"}, + {file = "regex-2020.2.20-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:bed7986547ce54d230fd8721aba6fd19459cdc6d315497b98686d0416efaff4e"}, + {file = "regex-2020.2.20-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:046e83a8b160aff37e7034139a336b660b01dbfe58706f9d73f5cdc6b3460242"}, + {file = "regex-2020.2.20-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:b33ebcd0222c1d77e61dbcd04a9fd139359bded86803063d3d2d197b796c63ce"}, + {file = "regex-2020.2.20-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:bba52d72e16a554d1894a0cc74041da50eea99a8483e591a9edf1025a66843ab"}, + {file = "regex-2020.2.20-cp37-cp37m-win32.whl", hash = "sha256:01b2d70cbaed11f72e57c1cfbaca71b02e3b98f739ce33f5f26f71859ad90431"}, + {file = "regex-2020.2.20-cp37-cp37m-win_amd64.whl", hash = "sha256:113309e819634f499d0006f6200700c8209a2a8bf6bd1bdc863a4d9d6776a5d1"}, + {file = "regex-2020.2.20-cp38-cp38-manylinux1_i686.whl", hash = "sha256:25f4ce26b68425b80a233ce7b6218743c71cf7297dbe02feab1d711a2bf90045"}, + {file = "regex-2020.2.20-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:9b64a4cc825ec4df262050c17e18f60252cdd94742b4ba1286bcfe481f1c0f26"}, + {file = "regex-2020.2.20-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:9ff16d994309b26a1cdf666a6309c1ef51ad4f72f99d3392bcd7b7139577a1f2"}, + {file = "regex-2020.2.20-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:c7f58a0e0e13fb44623b65b01052dae8e820ed9b8b654bb6296bc9c41f571b70"}, + {file = "regex-2020.2.20-cp38-cp38-win32.whl", hash = "sha256:200539b5124bc4721247a823a47d116a7a23e62cc6695744e3eb5454a8888e6d"}, + {file = "regex-2020.2.20-cp38-cp38-win_amd64.whl", hash = "sha256:7f78f963e62a61e294adb6ff5db901b629ef78cb2a1cfce3cf4eeba80c1c67aa"}, + {file = "regex-2020.2.20.tar.gz", hash = "sha256:9e9624440d754733eddbcd4614378c18713d2d9d0dc647cf9c72f64e39671be5"}, +] +secretstorage = [ + {file = "SecretStorage-3.1.2-py3-none-any.whl", hash = "sha256:b5ec909dde94d4ae2fa26af7c089036997030f0cf0a5cb372b4cccabd81c143b"}, + {file = "SecretStorage-3.1.2.tar.gz", hash = "sha256:15da8a989b65498e29be338b3b279965f1b8f09b9668bd8010da183024c8bff6"}, +] +six = [ + {file = "six-1.14.0-py2.py3-none-any.whl", hash = "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c"}, + {file = "six-1.14.0.tar.gz", hash = "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a"}, +] +textwrap3 = [ + {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, + {file = "textwrap3-0.9.2.zip", hash = "sha256:5008eeebdb236f6303dcd68f18b856d355f6197511d952ba74bc75e40e0c3414"}, +] +toml = [ + {file = "toml-0.10.0-py2.7.egg", hash = "sha256:f1db651f9657708513243e61e6cc67d101a39bad662eaa9b5546f789338e07a3"}, + {file = "toml-0.10.0-py2.py3-none-any.whl", hash = "sha256:235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e"}, + {file = "toml-0.10.0.tar.gz", hash = "sha256:229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c"}, +] +tornado = [ + {file = "tornado-6.0.3-cp35-cp35m-win32.whl", hash = "sha256:c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5"}, + {file = "tornado-6.0.3-cp35-cp35m-win_amd64.whl", hash = "sha256:398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60"}, + {file = "tornado-6.0.3-cp36-cp36m-win32.whl", hash = "sha256:4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281"}, + {file = "tornado-6.0.3-cp36-cp36m-win_amd64.whl", hash = "sha256:349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c"}, + {file = "tornado-6.0.3-cp37-cp37m-win32.whl", hash = "sha256:559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5"}, + {file = "tornado-6.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7"}, + {file = "tornado-6.0.3.tar.gz", hash = "sha256:c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9"}, +] +typed-ast = [ + {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, + {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb"}, + {file = "typed_ast-1.4.1-cp35-cp35m-win32.whl", hash = "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919"}, + {file = "typed_ast-1.4.1-cp35-cp35m-win_amd64.whl", hash = "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01"}, + {file = "typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75"}, + {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652"}, + {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"}, + {file = "typed_ast-1.4.1-cp36-cp36m-win32.whl", hash = "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1"}, + {file = "typed_ast-1.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa"}, + {file = "typed_ast-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614"}, + {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41"}, + {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b"}, + {file = "typed_ast-1.4.1-cp37-cp37m-win32.whl", hash = "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe"}, + {file = "typed_ast-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355"}, + {file = "typed_ast-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6"}, + {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907"}, + {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d"}, + {file = "typed_ast-1.4.1-cp38-cp38-win32.whl", hash = "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c"}, + {file = "typed_ast-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4"}, + {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, + {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, +] +tzlocal = [ + {file = "tzlocal-1.5.1.tar.gz", hash = "sha256:4ebeb848845ac898da6519b9b31879cf13b6626f7184c496037b818e238f2c4e"}, +] +zipp = [ + {file = "zipp-3.0.0-py3-none-any.whl", hash = "sha256:12248a63bbdf7548f89cb4c7cda4681e537031eda29c02ea29674bc6854460c2"}, + {file = "zipp-3.0.0.tar.gz", hash = "sha256:7c0f8e91abc0dc07a5068f315c52cb30c66bfbc581e5b50704c8a2f6ebae794a"}, +] diff --git a/pyproject.toml b/pyproject.toml index c8c9984e..d1d48168 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,9 +25,10 @@ keyring = "^19.0" pytz = "^2019.1" tzlocal = "^1.5" asteval = "^0.9.14" -colorama = {version = "^0.4.1",platform = "win32"} +colorama = "^0.4.1" python-dateutil = "^2.8" pyyaml = "^5.1" +ansiwrap = "^0.8.4" [tool.poetry.dev-dependencies] behave = "^1.2" From 302d353c4df45689499579357fb32f9e43b50d0c Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 29 Feb 2020 14:44:42 -0800 Subject: [PATCH 0031/1132] Fix up tests and related issues Upgrade poetry if already installed Get rid of test function that was causing windows problems --- .travis.yml | 2 +- features/contains.feature | 2 +- features/core.feature | 4 +-- features/steps/core.py | 75 ++++----------------------------------- jrnl/util.py | 8 ++--- 5 files changed, 13 insertions(+), 78 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed720ee0..12cb1d8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_install: - date install: - - pip install poetry + - pip install --upgrade poetry - poetry install - poetry run python --version diff --git a/features/contains.feature b/features/contains.feature index 5813be20..eac3a464 100644 --- a/features/contains.feature +++ b/features/contains.feature @@ -14,7 +14,7 @@ Feature: Contains Given we use the config "tags.yaml" When we run "jrnl @idea -contains software" Then we should get no error - and the output should contain "software" + And the output should contain "software" Scenario: Searching for a string within AND tag results Given we use the config "tags.yaml" diff --git a/features/core.feature b/features/core.feature index 3c49324c..df214494 100644 --- a/features/core.feature +++ b/features/core.feature @@ -36,12 +36,12 @@ Feature: Basic reading and writing to a journal @skip_win Scenario: Writing an empty entry from the editor Given we use the config "editor.yaml" - When we open the editor and enter "" + When we open the editor and enter nothing Then we should see the message "[Nothing saved to file]" Scenario: Writing an empty entry from the command line Given we use the config "basic.yaml" - When we run "jrnl" and enter "" + When we run "jrnl" and enter nothing Then the output should be """ diff --git a/features/steps/core.py b/features/steps/core.py index 5de028ed..a97e5009 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -82,18 +82,15 @@ def set_config(context, config_file): cf.write("version: {}".format(__version__)) -@when('we open the editor and enter ""') @when('we open the editor and enter "{text}"') +@when("we open the editor and enter nothing") def open_editor_and_enter(context, text=""): - text = text or context.text + text = text or context.text or "" def _mock_editor_function(command): tmpfile = command[-1] with open(tmpfile, "w+") as f: - if text is not None: - f.write(text) - else: - f.write("") + f.write(text) return tmpfile @@ -119,7 +116,7 @@ def _mock_input(inputs): @when('we run "{command}" and enter') -@when('we run "{command}" and enter ""') +@when('we run "{command}" and enter nothing') @when('we run "{command}" and enter "{inputs}"') def run_with_input(context, command, inputs=""): # create an iterator through all inputs. These inputs will be fed one by one @@ -186,69 +183,11 @@ def no_error(context): assert context.exit_status == 0, context.exit_status -@then("the output should be parsable as json") -def check_output_json(context): - out = context.stdout_capture.getvalue() - assert json.loads(out), out - - -@then('"{field}" in the json output should have {number:d} elements') -@then('"{field}" in the json output should have 1 element') -def check_output_field(context, field, number=1): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json, [field, out_json] - assert len(out_json[field]) == number, len(out_json[field]) - - -@then('"{field}" in the json output should not contain "{key}"') -def check_output_field_not_key(context, field, key): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json - assert key not in out_json[field] - - -@then('"{field}" in the json output should contain "{key}"') -def check_output_field_key(context, field, key): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json - assert key in out_json[field] - - -@then('the json output should contain {path} = "{value}"') -def check_json_output_path(context, path, value): - """ E.g. - the json output should contain entries.0.title = "hello" - """ - out = context.stdout_capture.getvalue() - struct = json.loads(out) - - for node in path.split("."): - try: - struct = struct[int(node)] - except ValueError: - struct = struct[node] - assert struct == value, struct - - -def process_ANSI_escapes(text): - """Escapes and 'unescapes' a string with ANSI escapes so that behave stdout - comparisons work properly. This will render colors, and works with unicode - characters. https://stackoverflow.com/a/57192592 - :param str text: The text to be escaped and unescaped - :return: Colorized / escaped text - :rtype: str - """ - return decode(encode(text, "latin-1", "backslashreplace"), "unicode-escape") - - @then("the output should be") @then('the output should be "{text}"') def check_output(context, text=None): text = (text or context.text).strip().splitlines() - out = process_ANSI_escapes(context.stdout_capture.getvalue().strip()).splitlines() + out = context.stdout_capture.getvalue().strip().splitlines() assert len(text) == len(out), "Output has {} lines (expected: {})".format( len(out), len(text) ) @@ -261,7 +200,7 @@ def check_output(context, text=None): @then('the output should contain "{text}" in the local time') def check_output_time_inline(context, text): - out = process_ANSI_escapes(context.stdout_capture.getvalue()) + out = context.stdout_capture.getvalue() local_tz = tzlocal.get_localzone() date, flag = CALENDAR.parse(text) output_date = time.strftime("%Y-%m-%d %H:%M", date) @@ -273,7 +212,7 @@ def check_output_time_inline(context, text): @then('the output should contain "{text}" or "{text2}"') def check_output_inline(context, text=None, text2=None): text = text or context.text - out = process_ANSI_escapes(context.stdout_capture.getvalue()) + out = context.stdout_capture.getvalue() assert text in out or text2 in out, text or text2 diff --git a/jrnl/util.py b/jrnl/util.py index 9bc6e4b6..d6b796c3 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -226,13 +226,9 @@ def highlight_tags_with_background_color(entry, text, color, is_title=False): if config["highlight"]: # highlight tags if entry.journal.search_tags: text_fragments = [] - for tag in entry.search_tags: + for tag in entry.journal.search_tags: text_fragments.extend( - re.split( - re.compile(re.escape(tag), re.IGNORECASE), - text, - flags=re.UNICODE, - ) + re.split(re.compile(re.escape(tag), re.IGNORECASE), text) ) else: text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text) From cd437e8c8f8406bed3321f81bf16b10d04e1ee8f Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 7 Mar 2020 14:11:05 -0800 Subject: [PATCH 0032/1132] Update stalebot emoji to :pushpin: instead of :star: The pushpin better reflects the functionality (stops the issue from staling). --- .github/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 323b3928..4df56d7b 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -4,8 +4,8 @@ daysUntilStale: 60 daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - ':star:' - - security + - ':pushpin:' + - critical # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable From 507914ff3c4273075fc808c2074ef770894e99ef Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 7 Mar 2020 22:38:24 +0000 Subject: [PATCH 0033/1132] Updating changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af84c90c..868776c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ **Build:** -- Stop multipe changelog generators from crashing into each other [\#845](https://github.com/jrnl-org/jrnl/pull/845) ([wren](https://github.com/wren)) +- Stop multiple changelog generators from crashing into each other [\#845](https://github.com/jrnl-org/jrnl/pull/845) ([wren](https://github.com/wren)) - Don't re-run tests on deployment [\#839](https://github.com/jrnl-org/jrnl/pull/839) ([wren](https://github.com/wren)) - Put back build lines in Poetry config [\#838](https://github.com/jrnl-org/jrnl/pull/838) ([wren](https://github.com/wren)) - Restore emoji test [\#837](https://github.com/jrnl-org/jrnl/pull/837) ([micahellison](https://github.com/micahellison)) @@ -26,7 +26,7 @@ **Updated documentation:** - Docs: Fix broken links in recipes.md [\#854](https://github.com/jrnl-org/jrnl/pull/854) ([lrvl](https://github.com/lrvl)) -- docs: Fix fish history instructions. [\#846](https://github.com/jrnl-org/jrnl/pull/846) ([aureooms](https://github.com/aureooms)) +- Fix fish history instructions. [\#846](https://github.com/jrnl-org/jrnl/pull/846) ([aureooms](https://github.com/aureooms)) - Update site description [\#841](https://github.com/jrnl-org/jrnl/pull/841) ([wren](https://github.com/wren)) - Get rid of dumb sex joke [\#840](https://github.com/jrnl-org/jrnl/pull/840) ([wren](https://github.com/wren)) - Updating/clarifying template explanation [\#829](https://github.com/jrnl-org/jrnl/pull/829) ([heymajor](https://github.com/heymajor)) From 2a4f5ca5c95cd5ac8fbe87406f2d8b0877478ba8 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 8 Mar 2020 22:11:09 -0700 Subject: [PATCH 0034/1132] fix up remnants of merge conflicts --- .travis.yml | 1 - CHANGELOG.md | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 12cb1d8f..7933134a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -147,4 +147,3 @@ jobs: - git add pyproject.toml - git commit -m "Incrementing version to ${TRAVIS_TAG} [ci skip]" - git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git master - diff --git a/CHANGELOG.md b/CHANGELOG.md index 868776c2..f52a2428 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1.1...v2.2) + **Implemented enhancements:** - Update YAML exporter to handle Dayone format [\#773](https://github.com/jrnl-org/jrnl/pull/773) ([MinchinWeb](https://github.com/MinchinWeb)) @@ -52,6 +53,7 @@ - Fix issue where jrnl would always out 'source' for version, fix Poetry config to build and publish properly [\#820](https://github.com/jrnl-org/jrnl/pull/820) ([wren](https://github.com/wren)) - Unpin poetry [\#808](https://github.com/jrnl-org/jrnl/pull/808) ([wren](https://github.com/wren)) +- Fix all skipped tests on Travis Windows builds by preserving newlines [\#823](https://github.com/jrnl-org/jrnl/pull/823) ([micahellison](https://github.com/micahellison)) - Change PyPI auth method in build pipeline [\#807](https://github.com/jrnl-org/jrnl/pull/807) ([wren](https://github.com/wren)) - Automagically update the changelog you see before your very eyes! [\#806](https://github.com/jrnl-org/jrnl/pull/806) ([wren](https://github.com/wren)) - Update Black version and lock file to fix builds on develop branch [\#784](https://github.com/jrnl-org/jrnl/pull/784) ([wren](https://github.com/wren)) From 327af80997e26dc38a21a6ea21c7015b7f558f64 Mon Sep 17 00:00:00 2001 From: Nathan Genetzky Date: Sat, 21 Mar 2020 13:12:44 -0500 Subject: [PATCH 0035/1132] docs: Update url for "beautiful timeline" in export.md (#879) The previous URL was invalid. Used way back time machine, and at least at some point a redirect was setup to this site. --- docs/export.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/export.md b/docs/export.md index f786a318..464dd550 100644 --- a/docs/export.md +++ b/docs/export.md @@ -28,7 +28,7 @@ Can do jrnl --export json ``` -Why not create a [beautiful timeline](http://timeline.verite.co/) of +Why not create a [beautiful timeline](http://timeline.knightlab.com/) of your journal? ## Markdown export From 3a72ea4af143855536eba65f16082fcdf63cc512 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 Mar 2020 22:13:33 +0000 Subject: [PATCH 0036/1132] Updating changelog [ci skip] --- CHANGELOG.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f52a2428..1db29c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,19 @@ ## [Unreleased](https://github.com/jrnl-org/jrnl/) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.2...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...HEAD) + +**Build:** + +- Update travis caching to speed up builds [\#871](https://github.com/jrnl-org/jrnl/pull/871) ([wren](https://github.com/wren)) + +**Updated documentation:** + +- Update and reorganize CONTRIBUTING [\#885](https://github.com/jrnl-org/jrnl/pull/885) ([micahellison](https://github.com/micahellison)) + +## [v2.3](https://pypi.org/project/jrnl/v2.3/) (2020-03-21) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3-beta...v2.3) **Implemented enhancements:** @@ -25,7 +37,9 @@ **Updated documentation:** +- Update url for "beautiful timeline" in export.md [\#879](https://github.com/jrnl-org/jrnl/pull/879) ([NGenetzky](https://github.com/NGenetzky)) - Docs: Fix broken links in recipes.md [\#854](https://github.com/jrnl-org/jrnl/pull/854) ([lrvl](https://github.com/lrvl)) +- Fix configuration slashes and indentation in advanced usage documentation [\#852](https://github.com/jrnl-org/jrnl/pull/852) ([aallbrig](https://github.com/aallbrig)) - Fix fish history instructions. [\#846](https://github.com/jrnl-org/jrnl/pull/846) ([aureooms](https://github.com/aureooms)) - Update site description [\#841](https://github.com/jrnl-org/jrnl/pull/841) ([wren](https://github.com/wren)) - Get rid of dumb sex joke [\#840](https://github.com/jrnl-org/jrnl/pull/840) ([wren](https://github.com/wren)) From bc35c356a95272c399f19fc6bdf5eee1fd7d9bda Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 Mar 2020 22:15:08 +0000 Subject: [PATCH 0037/1132] Incrementing version to v2.3 [ci skip] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1d48168..2774f707 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.2.1-beta2" +version = "v2.3" description = "Collect your thoughts and notes without leaving the command line." authors = [ "Manuel Ebert ", From 047140218369b48cef65ed5a60800736fd2a69e9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 10 Mar 2020 20:58:17 -0700 Subject: [PATCH 0038/1132] Create FUNDING.yml (#861) Test out using Github sponsors --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..e9eb3084 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: jrnl +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From aae55aa193905295c5ec55ed9bef33cb682dee12 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 21 Mar 2020 13:21:28 -0700 Subject: [PATCH 0039/1132] Update Travis caching to speed up builds (#871) --- .travis.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7933134a..af08d670 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,9 @@ os: linux language: python cache: - - pip + pip: true + directories: + - $HOME/virtualenv git: depth: false @@ -28,6 +30,7 @@ aliases: cache: directories: - $HOME/.pyenv/versions + - $HOME/Library/Caches/pypoetry before_install: - eval "$(pyenv init -)" - pyenv install -s $JRNL_PYTHON_VERSION @@ -37,11 +40,17 @@ aliases: test_windows: &test_windows os: windows language: shell + env: &env_windows + PATH: /c/Python36:/c/Python36/Scripts:/c/Python37:/c/Python37/Scripts:/c/Python38:/c/Python38/Scripts:$PATH + PYTHONIOENCODING: UTF-8 cache: directories: - /c/Python36 - /c/Python37 - /c/Python38 + - /c/ProgramData/chocolatey/lib + - /c/ProgramData/chocolatey/bin + - /c/Users/travis/AppData/Local/pypoetry/Cache before_install: - choco install python --version $JRNL_PYTHON_VERSION - python -m pip install --upgrade pip @@ -66,14 +75,13 @@ jobs: name: Python 3.6 on MacOS python: 3.6 env: - - JRNL_PYTHON_VERSION=3.6.8 + JRNL_PYTHON_VERSION: 3.6.8 - <<: *test_windows name: Python 3.6 on Windows python: 3.6 env: - - JRNL_PYTHON_VERSION=3.6.8 - - PATH=/c/Python36:/c/Python36/Scripts:$PATH - - PYTHONIOENCODING=UTF-8 + <<: *env_windows + JRNL_PYTHON_VERSION: 3.6.8 # Python 3.7 Tests - name: Python 3.7 on Linux @@ -82,14 +90,13 @@ jobs: name: Python 3.7 on MacOS python: 3.7 env: - - JRNL_PYTHON_VERSION=3.7.5 + JRNL_PYTHON_VERSION: 3.7.5 - <<: *test_windows name: Python 3.7 on Windows python: 3.7 env: - - JRNL_PYTHON_VERSION=3.7.5 - - PATH=/c/Python37:/c/Python37/Scripts:$PATH - - PYTHONIOENCODING=UTF-8 + <<: *env_windows + JRNL_PYTHON_VERSION: 3.7.5 # Python 3.8 Tests - name: Python 3.8 on Linux @@ -98,14 +105,13 @@ jobs: name: Python 3.8 on MacOS python: 3.8 env: - - JRNL_PYTHON_VERSION=3.8.0 + JRNL_PYTHON_VERSION: 3.8.0 - <<: *test_windows name: Python 3.8 on Windows python: 3.8 env: - - JRNL_PYTHON_VERSION=3.8.0 - - PATH=/c/Python38:/c/Python38/Scripts:$PATH - - PYTHONIOENCODING=UTF-8 + <<: *env_windows + JRNL_PYTHON_VERSION: 3.8.0 # ... and beyond! - name: Python nightly on Linux @@ -115,7 +121,7 @@ jobs: - name: Python 3.7 on Linux, not UTC python: 3.7 env: - - TZ=America/Edmonton + TZ: America/Edmonton # Changelog for Unreleased changes - stage: Update Changelog From 7a328d0fe34baf24f2df4b2e1d53971701a71a6b Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 21 Mar 2020 14:35:17 -0700 Subject: [PATCH 0040/1132] Update and reorganize CONTRIBUTING (#885) * Include information about branching strategy * Re-organize documentation and include information on testing * Use gerund form in Contributing headlines * Fix markdown links and expand developing documentation * Add pipx link and explain test code structure * Include pull request process in CONTRIBUTING * Update CONTRIBUTING with small changes from PR review * Mention failing tests in CONTRIBUTING * Add information for developers about issue labels --- CONTRIBUTING.md | 123 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 100 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 414a7091..5a50a4db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,27 +1,60 @@ # Contributing -If you use jrnl, you can totally make our day by just saying "thanks for the code." It's your chance to make a programmer happy today! If you have a moment, let us know what you use jrnl for and how; it'll help us to make it even better! +We welcome contributions to jrnl, whether it's through reporting bugs, improving the documentation, testing releases, engaging in discussion on features and bugs, or writing code. +## Table of Contents + * [Code of Conduct](#code-of-conduct) + * [Reporting Bugs](#reporting-bugs) + * [Editing Documentation](#editing-documentation) + * [Testing](#testing) + * [Submitting feature requests and ideas](#submitting-feature-requests-and-ideas) + * [Developing](#developing) -# Table of Contents - * [Docs and Typos](#docs-and-typos) - * [Bugs](#bugs) - * [Feature requests and ideas](#feature-requests-and-ideas) - * [New programmers and programmers new to python](#new-programmers-and-programmers-new-to-python) - * [Developing jrnl](#developing-jrnl) +## Code of Conduct +Before starting, please read the [Code of Conduct](CODE_OF_CONDUCT.md). -## Docs and Typos +## Reporting Bugs -If you find a typo or a mistake in the docs, please fix it right away and send a pull request. The Right Way™ to fix the docs is to edit the `docs/*.md` files on the **master** branch. You can see the result if you run `make html` inside the project's root directory, which will open a browser that hot-reloads as you change the docs. This requires [mkdocs](https://www.mkdocs.org) to be installed. The `gh-pages` branch is automatically maintained and updates from `master`; you should never have to edit that. +Please report bugs by [opening a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describing it as well as possible. Many bugs are specific to a particular operating system and Python version, so please include that information! -## Bugs +## Editing Documentation -Unfortunately, bugs happen. If you found one, please [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describe it as well as possible. If you're a programmer with some time, go ahead and send us a pull request that references the issue! We'll review as quickly as we can. +If you find a typo or a mistake in the docs, please fix it right away and send a pull request. -## Feature requests and ideas +To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result if you run `make html` (or `poetry run mkdocs serve` if on Windows) inside the project's root directory, then navigating your browser to [locahost:8000](http://localhost:8000). -So, you have an idea for a great feature? Awesome! We'd love to hear from you! Please [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describe the goal of the feature, and any relevant use cases. We'll discuss the issue with you, and decide if it's a good fit for the project. +The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. + +### Recipes and external editors + +If you'd like to share a jrnl command line trick that you find useful, or advice on how to integrate a particular external editor, you may find it worthwile to add it to the ["Recipes" section](docs/recipes.md). + +## Testing + +Much of the work of maintaining jrnl involves testing rather than coding. + +The nature of jrnl means we deal with extremely sensitive data, and can't risk data loss. While jrnl does have a comprehensive automated testing suite, user testing is crucial to mitigating this risk. + +### Prereleases + +[Prereleases are deployed through PyPi much like normal releases](https://pypi.org/project/jrnl/#history). You can use [pipx](https://pypi.org/project/pipx/) to fetch them and test them. See the [changelog](CHANGELOG.md) for information on what has changed with each release. + +### Pull requests + +If you are comfortable enough with git, feel free to fetch particular [pull requests](https://github.com/jrnl-org/jrnl/pulls), test them yourself, and report back your findings. Bonus points if you can add a screencast of how the new feature works. + +### Confirm bug reports + +There are always [open bugs among our GitHub issues](https://github.com/jrnl-org/jrnl/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and many are specific to a particular OS, Python version, or jrnl version. A simple comment like "Confirmed on jrnl v2.2, MacOS 10.15, Python 3.8.1" would be extremely helpful in tracking down bugs. + +### Automate tests + +See the develop section below for information on how to contribute new automated tests. + +## Submitting feature requests and ideas + +If you have a feature request or idea for jrnl, please [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describe the goal of the feature, and any relevant use cases. We'll discuss the issue with you, and decide if it's a good fit for the project. When discussing new features, please keep in mind our design goals. jrnl strives to do one thing well. To us, that means: @@ -29,17 +62,61 @@ When discussing new features, please keep in mind our design goals. jrnl strives * have a simple interface * avoid duplicating functionality -## New programmers and programmers new to python +## Developing + +### Getting your environment set up + +You will need to install [poetry](https://poetry.eustace.io/) to develop jrnl. It will take care of all of the project's other dependencies. + +### Understanding the branches + +jrnl uses two primary branches: + + * `develop` - for ongoing development + * `master` - for releases + +In general, pull requests should be made on the `develop` branch. + +### Common development commands + +You can find an inventory of commands in the `makefile`. \*nix users can run the commands by typing `make` followed by the name of the command; however, Windows users will need to type out the commands directly, or install a third-party make tool such as [GNU Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm). + +A typical development workflow includes: + + * Running tests: `make test` + * Running the source in a virtual environment: + * `poetry install` + * `poetry shell` + * `jrnl` (with or without arguments as necessary) + * Linting the code to standardize its style: `make lint` + +### Updating automated tests + +When resolving bugs or adding new functionality, please add tests to prevent that functionality from breaking in the future. If you notice any functionality that isn't covered in the tests, feel free to submit a test-only pull request as well. + +For testing, jrnl uses [behave](https://behave.readthedocs.io/) tests, which are all in the `features` folder. + +Many tests can be created by only editing `feature` files with the same format as other tests. For more complicated functionality, you may need to implement steps in `features/steps` which are then executed by your tests in the `feature` files. + +### Submitting pull requests + +When you're ready, feel free to submit a pull request (PR). The jrnl maintainers generally review the pull requests every two weeks, but the continuous integration pipeline will run on automated tests on it within a matter of minutes and will report back any issues it has found with your code across a variety of environments. + +The pull request template contains a checklist full of housekeeping items. Please fill them out as necessary when you submit. + +If a pull request contains failing tests, it probably will not be reviewed, and it definitely will not be approved. However, if you need help resolving a failing test, please mention that in your PR. + +### Finding things to work on + +You can search the [jrnl GitHub issues](https://github.com/jrnl-org/jrnl/issues) by [label](https://github.com/jrnl-org/jrnl/labels) for things to work on. Here are some labels worth searching: + +* [critical](https://github.com/jrnl-org/jrnl/labels/critical) +* [help wanted](https://github.com/jrnl-org/jrnl/labels/help%20wanted) +* [bug](https://github.com/jrnl-org/jrnl/labels/bug) +* [enhancement](https://github.com/jrnl-org/jrnl/labels/enhancement) + +### A note for new programmers and programmers new to python Although jrnl has grown quite a bit since its inception, the overall complexity (for an end-user program) is fairly low, and we hope you'll find the code easy enough to understand. If you have a question, please don't hesitate to ask! Python is known for its welcoming community and openness to novice programmers, so feel free to fork the code and play around with it! If you create something you want to share with us, please create a pull request. We never expect pull requests to be perfect, idiomatic, instantly mergeable code. We can work through it together! - -## Developing jrnl - -The jrnl source uses [poetry](https://poetry.eustace.io/) for dependency management. You will need to install it to develop journal. - - * To run tests: `make test` (or `poetry run behave` if on Windows) - * To run the source: `poetry install` then `poetry shell` then run `jrnl` with or without arguments as necessary - -For testing, jrnl uses [behave](https://behave.readthedocs.io/). From 59624a49419b5f7880547bb1ac2d9ddb34f97768 Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Sun, 22 Mar 2020 13:09:25 -0600 Subject: [PATCH 0041/1132] Syntax fix (#886) SyntaxWarning: "is" with a literal. Did you mean "=="? This works otherwise due to an implementation quirk of cPython. --- jrnl/time.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/time.py b/jrnl/time.py index 5e91cd1b..ef6dd4d9 100644 --- a/jrnl/time.py +++ b/jrnl/time.py @@ -57,7 +57,7 @@ def parse( except TypeError: return None - if flag is 1: # Date found, but no time. Use the default time. + if flag == 1: # Date found, but no time. Use the default time. date = datetime( *date[:3], hour=23 if inclusive else default_hour or 0, From ff8a0c3f1690e7514e5028ae4f470ef7a291f03b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 22 Mar 2020 19:17:00 +0000 Subject: [PATCH 0042/1132] Updating changelog [ci skip] --- CHANGELOG.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1db29c5c..97ff98e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,14 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...HEAD) - -**Build:** - -- Update travis caching to speed up builds [\#871](https://github.com/jrnl-org/jrnl/pull/871) ([wren](https://github.com/wren)) - -**Updated documentation:** - -- Update and reorganize CONTRIBUTING [\#885](https://github.com/jrnl-org/jrnl/pull/885) ([micahellison](https://github.com/micahellison)) - ## [v2.3](https://pypi.org/project/jrnl/v2.3/) (2020-03-21) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3-beta...v2.3) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.2...v2.3) **Implemented enhancements:** - Update YAML exporter to handle Dayone format [\#773](https://github.com/jrnl-org/jrnl/pull/773) ([MinchinWeb](https://github.com/MinchinWeb)) +- Pretty print journal entries (add color) [\#692](https://github.com/jrnl-org/jrnl/pull/692) ([alichtman](https://github.com/alichtman)) +- Allow journals to be saved into multiple files in a directory structure [\#485](https://github.com/jrnl-org/jrnl/pull/485) ([notbalanced](https://github.com/notbalanced)) **Fixed bugs:** @@ -52,7 +42,6 @@ **Implemented enhancements:** -- Update YAML exporter to handle Dayone format [\#773](https://github.com/jrnl-org/jrnl/pull/773) ([MinchinWeb](https://github.com/MinchinWeb)) - Full text search \(case insensitive\) with "-contains" [\#740](https://github.com/jrnl-org/jrnl/pull/740) ([empireshades](https://github.com/empireshades)) - Reduce startup time by 55% [\#719](https://github.com/jrnl-org/jrnl/pull/719) ([maebert](https://github.com/maebert)) - Refactor password logic to prevent accidental password leakage [\#708](https://github.com/jrnl-org/jrnl/pull/708) ([pspeter](https://github.com/pspeter)) From edc49cf5a2f5960f0c394a768c59a88be495b8f4 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Mon, 23 Mar 2020 05:09:25 +0000 Subject: [PATCH 0043/1132] Incrementing version to v2.3.1-beta [ci skip] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2774f707..adb35763 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.3" +version = "v2.3.1-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "Manuel Ebert ", From 87d0c84757bad790e9fa9e8b732347a6a00d3113 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 28 Mar 2020 13:27:16 -0700 Subject: [PATCH 0044/1132] Hotfix for keeping the version in sync in code (testing to come later) (#895) hotfix for keeping the version in sync in code (testing to come later) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index af08d670..8f50d1c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -150,6 +150,6 @@ jobs: - git config --global user.email "jrnl.bot@gmail.com" - git config --global user.name "Jrnl Bot" - git checkout master - - git add pyproject.toml + - git add pyproject.toml jrnl/__version__.py - git commit -m "Incrementing version to ${TRAVIS_TAG} [ci skip]" - git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git master From d4a0895163f7bcf28abcb6aab61b01e9a6bb578f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 28 Mar 2020 20:54:08 +0000 Subject: [PATCH 0045/1132] Updating changelog [ci skip] --- CHANGELOG.md | 16 +++++++++++++++- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97ff98e9..84dfdf90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [v2.3.1](https://pypi.org/project/jrnl/v2.3.1/) (2020-03-28) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...v2.3.1) + +**Fixed bugs:** +- Syntax fix [\#886](https://github.com/jrnl-org/jrnl/pull/886) ([minchinweb](https://github.com/minchinweb)) + +**Build:** +- Hotfix to keep the version from releases in sync in repo [\#895](https://github.com/jrnl-org/jrnl/pull/895) ([wren](https://github.com/wren)) +- Update travis caching to speed up builds [\#871](https://github.com/jrnl-org/jrnl/pull/871) ([wren](https://github.com/wren)) + +**Updated documentation:** +- Update and reorganize CONTRIBUTING [\#885](https://github.com/jrnl-org/jrnl/pull/885) ([micahellison](https://github.com/micahellison)) +- Update url for "beautiful timeline" in export.md [\#879](https://github.com/jrnl-org/jrnl/pull/879) ([NGenetzky](https://github.com/NGenetzky)) + ## [v2.3](https://pypi.org/project/jrnl/v2.3/) (2020-03-21) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.2...v2.3) @@ -39,7 +54,6 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.1.1...v2.2) - **Implemented enhancements:** - Full text search \(case insensitive\) with "-contains" [\#740](https://github.com/jrnl-org/jrnl/pull/740) ([empireshades](https://github.com/empireshades)) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 4bf5d5ff..bdca9ec4 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.2-beta" +__version__ = "v2.3.1" diff --git a/pyproject.toml b/pyproject.toml index adb35763..36519e7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.3.1-beta" +version = "v2.3.1" description = "Collect your thoughts and notes without leaving the command line." authors = [ "Manuel Ebert ", From f4fca3e5a431d3a94e466670c4db871e3349bd6d Mon Sep 17 00:00:00 2001 From: Aaron Lichtman Date: Sat, 21 Mar 2020 14:32:20 -0500 Subject: [PATCH 0046/1132] Add --delete for interactive removal of entries (#698) * Add --delete for interactive removal of entries * Add inquirer dependency for fancy prompting * Fix some minor style issues * Fix #434 * Use PyInquirer instead of inquirer for Windows compatibility * Add WIP (broken) test * Change deletion interface to be more basic * Update environment.py Co-authored-by: Jonathan Wren --- features/core.feature | 14 ++++++++++++++ features/data/configs/deletion.yaml | 12 ++++++++++++ features/data/journals/deletion.journal | 5 +++++ jrnl/Journal.py | 11 +++++++++++ jrnl/cli.py | 13 ++++++++++++- 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 features/data/configs/deletion.yaml create mode 100644 features/data/journals/deletion.journal diff --git a/features/core.feature b/features/core.feature index df214494..c3399da5 100644 --- a/features/core.feature +++ b/features/core.feature @@ -93,3 +93,17 @@ Feature: Basic reading and writing to a journal 2013-06-10 15:40 Life is good. """ And we should get no error + + # The input for this test is y + Scenario: --delete flag allows deletion of single entry + Given we use the config "deletion.yaml" + When we run "jrnl --delete" + And we type " " + And we type + """ + + y + """ + When we run "jrnl -on 2019-10-29 -s" + Then the output should not contain "2019-10-29 11:11 First entry." + diff --git a/features/data/configs/deletion.yaml b/features/data/configs/deletion.yaml new file mode 100644 index 00000000..d4155260 --- /dev/null +++ b/features/data/configs/deletion.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/deletion.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/features/data/journals/deletion.journal b/features/data/journals/deletion.journal new file mode 100644 index 00000000..c0fa689d --- /dev/null +++ b/features/data/journals/deletion.journal @@ -0,0 +1,5 @@ +[2019-10-29 11:11] First entry. + +[2019-10-29 11:11] Second entry. + +[2019-10-29 11:13] Third entry. \ No newline at end of file diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 3302cfdd..2eaf8705 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -234,6 +234,17 @@ class Journal: self.entries = result + def prompt_delete_entries(self): + """Prompts for deletion of entries in a journal.""" + print("Confirm each entry you want to delete [N/y]:") + to_delete: List[Entry] = [] + for entry in self.entries: + response = input("jrnl: Delete entry '{}'? ".format(entry.pprint(short=True))) + if response == "y": + to_delete.append(entry) + + self.entries = [entry for entry in self.entries if entry not in to_delete] + def new_entry(self, raw, date=None, sort=True): """Constructs a new entry from some raw text input. If a date is given, it will parse and use this, otherwise scan for a date in the input first.""" diff --git a/jrnl/cli.py b/jrnl/cli.py index 408f3518..52ca8c19 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -174,6 +174,13 @@ def parse_args(args=None): action="store_true", ) + exporting.add_argument( + "--delete", + dest="delete", + action="store_true", + help="Opens an interactive interface for deleting entries.", + ) + # Handle '-123' as a shortcut for '-n 123' num = re.compile(r"^-(\d+)$") if args is None: @@ -194,7 +201,7 @@ def guess_mode(args, config): args.decrypt is not False or args.encrypt is not False or args.export is not False - or any((args.short, args.tags, args.edit)) + or any((args.short, args.tags, args.edit, args.delete)) ): compose = False export = True @@ -456,3 +463,7 @@ def run(manual_args=None): journal.entries += other_entries journal.sort() journal.write() + + elif args.delete: + journal.prompt_delete_entries() + journal.write() From 15429d4f61c1c5f46551f60157a442e059f249e4 Mon Sep 17 00:00:00 2001 From: dbxnr Date: Sat, 21 Mar 2020 20:22:30 +0000 Subject: [PATCH 0047/1132] Interactive delete (#850) * fixup alichtman's implementation * cleanup imports Co-authored-by: Aaron Lichtman Co-authored-by: Jonathan Wren --- features/core.feature | 14 -------------- features/delete.feature | 20 ++++++++++++++++++++ jrnl/Journal.py | 25 +++++++++++++++---------- jrnl/util.py | 2 +- 4 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 features/delete.feature diff --git a/features/core.feature b/features/core.feature index c3399da5..df214494 100644 --- a/features/core.feature +++ b/features/core.feature @@ -93,17 +93,3 @@ Feature: Basic reading and writing to a journal 2013-06-10 15:40 Life is good. """ And we should get no error - - # The input for this test is y - Scenario: --delete flag allows deletion of single entry - Given we use the config "deletion.yaml" - When we run "jrnl --delete" - And we type " " - And we type - """ - - y - """ - When we run "jrnl -on 2019-10-29 -s" - Then the output should not contain "2019-10-29 11:11 First entry." - diff --git a/features/delete.feature b/features/delete.feature new file mode 100644 index 00000000..df6a1055 --- /dev/null +++ b/features/delete.feature @@ -0,0 +1,20 @@ +Feature: Delete entries from journal + + Scenario: --delete flag allows deletion of single entry + Given we use the config "deletion.yaml" + When we run "jrnl -n 1" + Then the output should contain + """ + 2019-10-29 11:13 Third entry. + """ + When we run "jrnl --delete" and enter + """ + N + N + Y + """ + When we run "jrnl -n 1" + Then the output should contain + """ + 2019-10-29 11:11 Second entry. + """ diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 2eaf8705..64b245ff 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -1,13 +1,12 @@ #!/usr/bin/env python -from . import Entry -from . import util -from . import time +import logging import os import sys import re + from datetime import datetime -import logging +from jrnl import Entry, util, time log = logging.getLogger(__name__) @@ -111,7 +110,8 @@ class Journal: def _load(self, filename): raise NotImplementedError - def _store(self, filename, text): + @classmethod + def _store(filename, text): raise NotImplementedError def _parse(self, journal_txt): @@ -236,21 +236,26 @@ class Journal: def prompt_delete_entries(self): """Prompts for deletion of entries in a journal.""" - print("Confirm each entry you want to delete [N/y]:") - to_delete: List[Entry] = [] + + to_delete = [] + + def ask_delete(entry): + return util.yesno( + f"Delete entry '{entry.pprint(short=True)}'?", default=False, + ) + for entry in self.entries: - response = input("jrnl: Delete entry '{}'? ".format(entry.pprint(short=True))) - if response == "y": + if ask_delete(entry): to_delete.append(entry) self.entries = [entry for entry in self.entries if entry not in to_delete] + self.write() def new_entry(self, raw, date=None, sort=True): """Constructs a new entry from some raw text input. If a date is given, it will parse and use this, otherwise scan for a date in the input first.""" raw = raw.replace("\\n ", "\n").replace("\\n", "\n") - starred = False # Split raw text into title and body sep = re.search(r"\n|[?!.]+ +\n?", raw) first_line = raw[: sep.end()].strip() if sep else raw diff --git a/jrnl/util.py b/jrnl/util.py index d6b796c3..1acf89e6 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -112,7 +112,7 @@ def set_keychain(journal_name, password): def yesno(prompt, default=True): prompt = f"{prompt.strip()} {'[Y/n]' if default else '[y/N]'} " response = input(prompt) - return {"y": True, "n": False}.get(response.lower(), default) + return {"y": True, "n": False}.get(response.lower().strip(), default) def load_config(config_path): From 65a3b2ce7c4cbbead0d9bf936d4e7d6de5b509a1 Mon Sep 17 00:00:00 2001 From: dbxnr Date: Sat, 21 Mar 2020 22:05:57 +0000 Subject: [PATCH 0048/1132] Fix for upgrade with missing journal (#796) * Fix for upgrade with missing journal * add test, refactor solution * add missing test config Co-authored-by: Jonathan Wren --- ...om_195_with_missing_encrypted_journal.json | 11 ++++++ ...upgrade_from_195_with_missing_journal.json | 11 ++++++ features/upgrade.feature | 18 ++++++++++ jrnl/upgrade.py | 34 ++++++++++++++++--- 4 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json create mode 100644 features/data/configs/upgrade_from_195_with_missing_journal.json diff --git a/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json b/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json new file mode 100644 index 00000000..5bbfb5b1 --- /dev/null +++ b/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": true, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/encrypted_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, +"tagsymbols": "@" +} diff --git a/features/data/configs/upgrade_from_195_with_missing_journal.json b/features/data/configs/upgrade_from_195_with_missing_journal.json new file mode 100644 index 00000000..8d456159 --- /dev/null +++ b/features/data/configs/upgrade_from_195_with_missing_journal.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, +"tagsymbols": "@" +} diff --git a/features/upgrade.feature b/features/upgrade.feature index e4377970..e05d4351 100644 --- a/features/upgrade.feature +++ b/features/upgrade.feature @@ -38,3 +38,21 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x """ Then the journal should have 2 entries + Scenario: Upgrade with missing journal + Given we use the config "upgrade_from_195_with_missing_journal.json" + When we run "jrnl -ls" and enter + """" + Y + """ + Then the output should contain "Error: features/journals/missing.journal does not exist." + + Scenario: Upgrade with missing encrypted journal + Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json" + When we run "jrnl -ls" and enter + """ + Y + bad doggie no biscuit + bad doggie no biscuit + """ + Then the output should contain "Error: features/journals/missing.journal does not exist." + and the output should contain "We're all done here" diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index e252d2d0..fe0e0f4b 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -11,10 +11,29 @@ import os def backup(filename, binary=False): print(f" Created a backup at {filename}.backup", file=sys.stderr) filename = os.path.expanduser(os.path.expandvars(filename)) - with open(filename, "rb" if binary else "r") as original: - contents = original.read() - with open(filename + ".backup", "wb" if binary else "w") as backup: - backup.write(contents) + + try: + with open(filename, "rb" if binary else "r") as original: + contents = original.read() + + with open(filename + ".backup", "wb" if binary else "w") as backup: + backup.write(contents) + except FileNotFoundError: + print(f"\nError: {filename} does not exist.") + try: + cont = util.yesno(f"\nCreate {filename}?", default=False) + if not cont: + raise KeyboardInterrupt + + except KeyboardInterrupt: + raise UserAbort("jrnl NOT upgraded, exiting.") + + +def check_exists(path): + """ + Checks if a given path exists. + """ + return os.path.exists(path) def upgrade_jrnl_if_necessary(config_path): @@ -56,7 +75,11 @@ older versions of jrnl anymore. encrypt = config.get("encrypt") path = journal_conf - path = os.path.expanduser(path) + if os.path.exists(os.path.expanduser(path)): + path = os.path.expanduser(path) + else: + print(f"\nError: {path} does not exist.") + continue if encrypt: encrypted_journals[journal_name] = path @@ -144,6 +167,7 @@ older versions of jrnl anymore. j.write() print("\nUpgrading config...", file=sys.stderr) + backup(config_path) print("\nWe're all done here and you can start enjoying jrnl 2.", file=sys.stderr) From 0e1f415c979d860ceafd122488c5acf7c80c330d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 28 Mar 2020 15:09:40 -0700 Subject: [PATCH 0049/1132] Fix failing tests and linting issues --- features/steps/core.py | 9 +++++++++ features/upgrade.feature | 5 +++-- jrnl/cli.py | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/features/steps/core.py b/features/steps/core.py index a97e5009..00fe01df 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -216,6 +216,15 @@ def check_output_inline(context, text=None, text2=None): assert text in out or text2 in out, text or text2 +@then("the error output should contain") +@then('the error output should contain "{text}"') +@then('the error output should contain "{text}" or "{text2}"') +def check_output_inline(context, text=None, text2=None): + text = text or context.text + out = context.stderr_capture.getvalue() + assert text in out or text2 in out, text or text2 + + @then('the output should not contain "{text}"') def check_output_not_inline(context, text): out = context.stdout_capture.getvalue() diff --git a/features/upgrade.feature b/features/upgrade.feature index e05d4351..b0a54c16 100644 --- a/features/upgrade.feature +++ b/features/upgrade.feature @@ -45,6 +45,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Y """ Then the output should contain "Error: features/journals/missing.journal does not exist." + And we should get no error Scenario: Upgrade with missing encrypted journal Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json" @@ -52,7 +53,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x """ Y bad doggie no biscuit - bad doggie no biscuit """ Then the output should contain "Error: features/journals/missing.journal does not exist." - and the output should contain "We're all done here" + And the error output should contain "We're all done" + And we should get no error diff --git a/jrnl/cli.py b/jrnl/cli.py index 52ca8c19..3f331217 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -180,7 +180,7 @@ def parse_args(args=None): action="store_true", help="Opens an interactive interface for deleting entries.", ) - + # Handle '-123' as a shortcut for '-n 123' num = re.compile(r"^-(\d+)$") if args is None: From c49e028dea17ee297b36e31c1a5712d62639b355 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 28 Mar 2020 23:15:49 +0000 Subject: [PATCH 0050/1132] Updating changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84dfdf90..116dc692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3.1...HEAD) + +**Implemented enhancements:** + +- Merge in temp branches for v2.4 [\#897](https://github.com/jrnl-org/jrnl/pull/897) ([wren](https://github.com/wren)) + ## [v2.3.1](https://pypi.org/project/jrnl/v2.3.1/) (2020-03-28) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...v2.3.1) From d3d3ef4c3e55c2884a70c77d55fc22d4853e1fad Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 31 Mar 2020 18:16:45 -0700 Subject: [PATCH 0051/1132] Update Poetry requirements for testing latest Python version (#898) Poetry errors out if we try to run a different version of Python that what is specified in the config file. We want to run tests against the latest Python version so we can see problems before they happen. This fix updates the config file so Poetry will allow us to test. Nothing is committed after the update. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8f50d1c8..8c4ff73d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,6 +115,8 @@ jobs: # ... and beyond! - name: Python nightly on Linux + before_install: + - sed -i 's/^python = ">=3\.6\.0.*"$/python = "*"/' pyproject.toml python: nightly # Specialty tests From f57dcf5cab9d8023f0a2e1288d6196a6a2689dc3 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Wed, 1 Apr 2020 01:24:31 +0000 Subject: [PATCH 0052/1132] Updating changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 116dc692..d1471292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Merge in temp branches for v2.4 [\#897](https://github.com/jrnl-org/jrnl/pull/897) ([wren](https://github.com/wren)) +**Build:** + +- Update Poetry requirements for testing latest Python version [\#898](https://github.com/jrnl-org/jrnl/pull/898) ([wren](https://github.com/wren)) + ## [v2.3.1](https://pypi.org/project/jrnl/v2.3.1/) (2020-03-28) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...v2.3.1) From aece97075184a098291f321474a1563402c2efec Mon Sep 17 00:00:00 2001 From: notbalanced Date: Sat, 4 Apr 2020 14:32:04 -0400 Subject: [PATCH 0053/1132] Properly display entries during a tag search. (#902) --- features/tagging.feature | 10 ++++++++++ jrnl/util.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/features/tagging.feature b/features/tagging.feature index 8b4cefb7..b20c2b3d 100644 --- a/features/tagging.feature +++ b/features/tagging.feature @@ -97,4 +97,14 @@ Feature: Tagging | Text before @tag. And After. | @hi. Hello | hi Hello + """ + + Scenario: Searching a journal for tags should display entries with that tag. + Given we use the config "tags.yaml" + When we run "jrnl @dan" + Then the output should be + """ + 2013-06-10 15:40 I met with @dan. + | As alway's he shared his latest @idea on how to rule the world with me. + | inst """ \ No newline at end of file diff --git a/jrnl/util.py b/jrnl/util.py index 1acf89e6..154b0b28 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -228,7 +228,7 @@ def highlight_tags_with_background_color(entry, text, color, is_title=False): text_fragments = [] for tag in entry.journal.search_tags: text_fragments.extend( - re.split(re.compile(re.escape(tag), re.IGNORECASE), text) + re.split(re.compile(f"({re.escape(tag)})", re.IGNORECASE), text) ) else: text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text) From 42e22950b1df2da227e98322cfba96c0acfc2641 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 4 Apr 2020 11:40:04 -0700 Subject: [PATCH 0054/1132] Allow tzlocal version >1.5 <3.0 instead of >1.5 <2.0 (#900) * Allow tzlocal version >1.5 instead of ^1.5 (#883) * Change tzlocal version restriction to <3.0 --- poetry.lock | 133 ++++++++++++++++++++++++++----------------------- pyproject.toml | 2 +- 2 files changed, 71 insertions(+), 64 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1a24ab9b..65356424 100644 --- a/poetry.lock +++ b/poetry.lock @@ -92,8 +92,8 @@ category = "dev" description = "Composable command line interface toolkit" name = "click" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "7.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "7.1.1" [[package]] category = "main" @@ -108,8 +108,8 @@ category = "main" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." name = "cryptography" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "2.8" +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" +version = "2.9" [package.dependencies] cffi = ">=1.8,<1.11.3 || >1.11.3" @@ -159,7 +159,7 @@ marker = "python_version < \"3.8\"" name = "importlib-metadata" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "1.5.0" +version = "1.6.0" [package.dependencies] zipp = ">=0.5" @@ -175,7 +175,7 @@ marker = "sys_platform == \"linux\"" name = "jeepney" optional = false python-versions = ">=3.5" -version = "0.4.2" +version = "0.4.3" [package.extras] dev = ["testpath"] @@ -320,7 +320,7 @@ description = "parse() is the opposite of format()" name = "parse" optional = false python-versions = "*" -version = "1.14.0" +version = "1.15.0" [[package]] category = "dev" @@ -382,7 +382,7 @@ description = "C parser in Python" name = "pycparser" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.19" +version = "2.20" [[package]] category = "dev" @@ -434,7 +434,7 @@ description = "YAML parser and emitter for Python" name = "pyyaml" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "5.3" +version = "5.3.1" [[package]] category = "dev" @@ -487,7 +487,7 @@ description = "Tornado is a Python web framework and asynchronous networking lib name = "tornado" optional = false python-versions = ">= 3.5" -version = "6.0.3" +version = "6.0.4" [[package]] category = "dev" @@ -503,7 +503,7 @@ description = "tzinfo object for the local timezone" name = "tzlocal" optional = false python-versions = "*" -version = "1.5.1" +version = "2.0.0" [package.dependencies] pytz = "*" @@ -515,14 +515,14 @@ marker = "python_version < \"3.8\"" name = "zipp" optional = false python-versions = ">=3.6" -version = "3.0.0" +version = "3.1.0" [package.extras] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "98c4d0d25bb309075ca86c1ed3ed0d46b0fd1dad66510f8fe95b0ad350065df5" +content-hash = "17cf8d4cf5a772217160daf312f590901dea4a3f5545d003035f3fb713a70f07" python-versions = ">=3.6.0, <3.9.0" [metadata.files] @@ -580,35 +580,33 @@ cffi = [ {file = "cffi-1.14.0.tar.gz", hash = "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6"}, ] click = [ - {file = "Click-7.0-py2.py3-none-any.whl", hash = "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13"}, - {file = "Click-7.0.tar.gz", hash = "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"}, + {file = "click-7.1.1-py2.py3-none-any.whl", hash = "sha256:e345d143d80bf5ee7534056164e5e112ea5e22716bbb1ce727941f4c8b471b9a"}, + {file = "click-7.1.1.tar.gz", hash = "sha256:8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc"}, ] colorama = [ {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, ] cryptography = [ - {file = "cryptography-2.8-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"}, - {file = "cryptography-2.8-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2"}, - {file = "cryptography-2.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad"}, - {file = "cryptography-2.8-cp27-cp27m-win32.whl", hash = "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2"}, - {file = "cryptography-2.8-cp27-cp27m-win_amd64.whl", hash = "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912"}, - {file = "cryptography-2.8-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d"}, - {file = "cryptography-2.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42"}, - {file = "cryptography-2.8-cp34-abi3-macosx_10_6_intel.whl", hash = "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879"}, - {file = "cryptography-2.8-cp34-abi3-manylinux1_x86_64.whl", hash = "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d"}, - {file = "cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl", hash = "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9"}, - {file = "cryptography-2.8-cp34-cp34m-win32.whl", hash = "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c"}, - {file = "cryptography-2.8-cp34-cp34m-win_amd64.whl", hash = "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0"}, - {file = "cryptography-2.8-cp35-cp35m-win32.whl", hash = "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf"}, - {file = "cryptography-2.8-cp35-cp35m-win_amd64.whl", hash = "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793"}, - {file = "cryptography-2.8-cp36-cp36m-win32.whl", hash = "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595"}, - {file = "cryptography-2.8-cp36-cp36m-win_amd64.whl", hash = "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7"}, - {file = "cryptography-2.8-cp37-cp37m-win32.whl", hash = "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff"}, - {file = "cryptography-2.8-cp37-cp37m-win_amd64.whl", hash = "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f"}, - {file = "cryptography-2.8-cp38-cp38-win32.whl", hash = "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e"}, - {file = "cryptography-2.8-cp38-cp38-win_amd64.whl", hash = "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13"}, - {file = "cryptography-2.8.tar.gz", hash = "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651"}, + {file = "cryptography-2.9-cp27-cp27m-macosx_10_9_intel.whl", hash = "sha256:ef9a55013676907df6c9d7dd943eb1770d014f68beaa7e73250fb43c759f4585"}, + {file = "cryptography-2.9-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2a2ad24d43398d89f92209289f15265107928f22a8d10385f70def7a698d6a02"}, + {file = "cryptography-2.9-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:95e1296e0157361fe2f5f0ed307fd31f94b0ca13372e3673fa95095a627636a1"}, + {file = "cryptography-2.9-cp27-cp27m-win32.whl", hash = "sha256:192ca04a36852a994ef21df13cca4d822adbbdc9d5009c0f96f1d2929e375d4f"}, + {file = "cryptography-2.9-cp27-cp27m-win_amd64.whl", hash = "sha256:ed1d0760c7e46436ec90834d6f10477ff09475c692ed1695329d324b2c5cd547"}, + {file = "cryptography-2.9-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:19ae795137682a9778892fb4390c07811828b173741bce91e30f899424b3934d"}, + {file = "cryptography-2.9-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d1bf5a1a0d60c7f9a78e448adcb99aa101f3f9588b16708044638881be15d6bc"}, + {file = "cryptography-2.9-cp35-abi3-macosx_10_9_intel.whl", hash = "sha256:1b9b535d6b55936a79dbe4990b64bb16048f48747c76c29713fea8c50eca2acf"}, + {file = "cryptography-2.9-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:7a279f33a081d436e90e91d1a7c338553c04e464de1c9302311a5e7e4b746088"}, + {file = "cryptography-2.9-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:49870684da168b90110bbaf86140d4681032c5e6a2461adc7afdd93be5634216"}, + {file = "cryptography-2.9-cp35-cp35m-win32.whl", hash = "sha256:6b91cab3841b4c7cb70e4db1697c69f036c8bc0a253edc0baa6783154f1301e4"}, + {file = "cryptography-2.9-cp35-cp35m-win_amd64.whl", hash = "sha256:587f98ce27ac4547177a0c6fe0986b8736058daffe9160dcf5f1bd411b7fbaa1"}, + {file = "cryptography-2.9-cp36-cp36m-win32.whl", hash = "sha256:cc20316e3f5a6b582fc3b029d8dc03aabeb645acfcb7fc1d9848841a33265748"}, + {file = "cryptography-2.9-cp36-cp36m-win_amd64.whl", hash = "sha256:3be7a5722d5bfe69894d3f7bbed15547b17619f3a88a318aab2e37f457524164"}, + {file = "cryptography-2.9-cp37-cp37m-win32.whl", hash = "sha256:7598974f6879a338c785c513e7c5a4329fbc58b9f6b9a6305035fca5b1076552"}, + {file = "cryptography-2.9-cp37-cp37m-win_amd64.whl", hash = "sha256:5aca6f00b2f42546b9bdf11a69f248d1881212ce5b9e2618b04935b87f6f82a1"}, + {file = "cryptography-2.9-cp38-cp38-win32.whl", hash = "sha256:9fc9da390e98cb6975eadf251b6e5fa088820141061bf041cd5c72deba1dc526"}, + {file = "cryptography-2.9-cp38-cp38-win_amd64.whl", hash = "sha256:6b744039b55988519cc183149cceb573189b3e46e16ccf6f8c46798bb767c9dc"}, + {file = "cryptography-2.9.tar.gz", hash = "sha256:0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e"}, ] entrypoints = [ {file = "entrypoints-0.3-py2.py3-none-any.whl", hash = "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19"}, @@ -622,12 +620,12 @@ future = [ {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, ] importlib-metadata = [ - {file = "importlib_metadata-1.5.0-py2.py3-none-any.whl", hash = "sha256:b97607a1a18a5100839aec1dc26a1ea17ee0d93b20b0f008d80a5a050afb200b"}, - {file = "importlib_metadata-1.5.0.tar.gz", hash = "sha256:06f5b3a99029c7134207dd882428a66992a9de2bef7c2b699b5641f9886c3302"}, + {file = "importlib_metadata-1.6.0-py2.py3-none-any.whl", hash = "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f"}, + {file = "importlib_metadata-1.6.0.tar.gz", hash = "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e"}, ] jeepney = [ - {file = "jeepney-0.4.2-py3-none-any.whl", hash = "sha256:6f45dce1125cf6c58a1c88123d3831f36a789f9204fbad3172eac15f8ccd08d0"}, - {file = "jeepney-0.4.2.tar.gz", hash = "sha256:0ba6d8c597e9bef1ebd18aaec595f942a264e25c1a48f164d46120eacaa2e9bb"}, + {file = "jeepney-0.4.3-py3-none-any.whl", hash = "sha256:d6c6b49683446d2407d2fe3acb7a368a77ff063f9182fe427da15d622adc24cf"}, + {file = "jeepney-0.4.3.tar.gz", hash = "sha256:3479b861cc2b6407de5188695fa1a8d57e5072d7059322469b62628869b8e36e"}, ] jinja2 = [ {file = "Jinja2-2.11.1-py2.py3-none-any.whl", hash = "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49"}, @@ -677,6 +675,11 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] mccabe = [ @@ -692,7 +695,7 @@ nltk = [ {file = "nltk-3.4.5.zip", hash = "sha256:bed45551259aa2101381bbdd5df37d44ca2669c5c3dad72439fa459b29137d94"}, ] parse = [ - {file = "parse-1.14.0.tar.gz", hash = "sha256:95a4f4469e37c57b5e924629ac99926f28bee7da59515dc5b8078c4c3e779249"}, + {file = "parse-1.15.0.tar.gz", hash = "sha256:a6d4e2c2f1fbde6717d28084a191a052950f758c0cbd83805357e6575c2b95c0"}, ] parse-type = [ {file = "parse_type-0.5.2-py2.py3-none-any.whl", hash = "sha256:089a471b06327103865dfec2dd844230c3c658a4a1b5b4c8b6c16c8f77577f9e"}, @@ -715,7 +718,8 @@ pycodestyle = [ {file = "pycodestyle-2.5.0.tar.gz", hash = "sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"}, ] pycparser = [ - {file = "pycparser-2.19.tar.gz", hash = "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"}, + {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, + {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, ] pyflakes = [ {file = "pyflakes-2.1.1-py2.py3-none-any.whl", hash = "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0"}, @@ -738,17 +742,17 @@ pyxdg = [ {file = "pyxdg-0.26.tar.gz", hash = "sha256:fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06"}, ] pyyaml = [ - {file = "PyYAML-5.3-cp27-cp27m-win32.whl", hash = "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d"}, - {file = "PyYAML-5.3-cp27-cp27m-win_amd64.whl", hash = "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6"}, - {file = "PyYAML-5.3-cp35-cp35m-win32.whl", hash = "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e"}, - {file = "PyYAML-5.3-cp35-cp35m-win_amd64.whl", hash = "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689"}, - {file = "PyYAML-5.3-cp36-cp36m-win32.whl", hash = "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994"}, - {file = "PyYAML-5.3-cp36-cp36m-win_amd64.whl", hash = "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e"}, - {file = "PyYAML-5.3-cp37-cp37m-win32.whl", hash = "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5"}, - {file = "PyYAML-5.3-cp37-cp37m-win_amd64.whl", hash = "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf"}, - {file = "PyYAML-5.3-cp38-cp38-win32.whl", hash = "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811"}, - {file = "PyYAML-5.3-cp38-cp38-win_amd64.whl", hash = "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20"}, - {file = "PyYAML-5.3.tar.gz", hash = "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615"}, + {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, + {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, + {file = "PyYAML-5.3.1-cp35-cp35m-win32.whl", hash = "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2"}, + {file = "PyYAML-5.3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c"}, + {file = "PyYAML-5.3.1-cp36-cp36m-win32.whl", hash = "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2"}, + {file = "PyYAML-5.3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648"}, + {file = "PyYAML-5.3.1-cp37-cp37m-win32.whl", hash = "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"}, + {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, + {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, + {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, + {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, ] regex = [ {file = "regex-2020.2.20-cp27-cp27m-win32.whl", hash = "sha256:99272d6b6a68c7ae4391908fc15f6b8c9a6c345a46b632d7fdb7ef6c883a2bbb"}, @@ -791,13 +795,15 @@ toml = [ {file = "toml-0.10.0.tar.gz", hash = "sha256:229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c"}, ] tornado = [ - {file = "tornado-6.0.3-cp35-cp35m-win32.whl", hash = "sha256:c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5"}, - {file = "tornado-6.0.3-cp35-cp35m-win_amd64.whl", hash = "sha256:398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60"}, - {file = "tornado-6.0.3-cp36-cp36m-win32.whl", hash = "sha256:4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281"}, - {file = "tornado-6.0.3-cp36-cp36m-win_amd64.whl", hash = "sha256:349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c"}, - {file = "tornado-6.0.3-cp37-cp37m-win32.whl", hash = "sha256:559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5"}, - {file = "tornado-6.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7"}, - {file = "tornado-6.0.3.tar.gz", hash = "sha256:c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9"}, + {file = "tornado-6.0.4-cp35-cp35m-win32.whl", hash = "sha256:5217e601700f24e966ddab689f90b7ea4bd91ff3357c3600fa1045e26d68e55d"}, + {file = "tornado-6.0.4-cp35-cp35m-win_amd64.whl", hash = "sha256:c98232a3ac391f5faea6821b53db8db461157baa788f5d6222a193e9456e1740"}, + {file = "tornado-6.0.4-cp36-cp36m-win32.whl", hash = "sha256:5f6a07e62e799be5d2330e68d808c8ac41d4a259b9cea61da4101b83cb5dc673"}, + {file = "tornado-6.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c952975c8ba74f546ae6de2e226ab3cc3cc11ae47baf607459a6728585bb542a"}, + {file = "tornado-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:2c027eb2a393d964b22b5c154d1a23a5f8727db6fda837118a776b29e2b8ebc6"}, + {file = "tornado-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:5618f72e947533832cbc3dec54e1dffc1747a5cb17d1fd91577ed14fa0dc081b"}, + {file = "tornado-6.0.4-cp38-cp38-win32.whl", hash = "sha256:22aed82c2ea340c3771e3babc5ef220272f6fd06b5108a53b4976d0d722bcd52"}, + {file = "tornado-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:c58d56003daf1b616336781b26d184023ea4af13ae143d9dda65e31e534940b9"}, + {file = "tornado-6.0.4.tar.gz", hash = "sha256:0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc"}, ] typed-ast = [ {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, @@ -823,9 +829,10 @@ typed-ast = [ {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, ] tzlocal = [ - {file = "tzlocal-1.5.1.tar.gz", hash = "sha256:4ebeb848845ac898da6519b9b31879cf13b6626f7184c496037b818e238f2c4e"}, + {file = "tzlocal-2.0.0-py2.py3-none-any.whl", hash = "sha256:11c9f16e0a633b4b60e1eede97d8a46340d042e67b670b290ca526576e039048"}, + {file = "tzlocal-2.0.0.tar.gz", hash = "sha256:949b9dd5ba4be17190a80c0268167d7e6c92c62b30026cf9764caf3e308e5590"}, ] zipp = [ - {file = "zipp-3.0.0-py3-none-any.whl", hash = "sha256:12248a63bbdf7548f89cb4c7cda4681e537031eda29c02ea29674bc6854460c2"}, - {file = "zipp-3.0.0.tar.gz", hash = "sha256:7c0f8e91abc0dc07a5068f315c52cb30c66bfbc581e5b50704c8a2f6ebae794a"}, + {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, + {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, ] diff --git a/pyproject.toml b/pyproject.toml index 36519e7e..20f2c306 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ passlib = "^1.7" parsedatetime = "^2.4" keyring = "^19.0" pytz = "^2019.1" -tzlocal = "^1.5" +tzlocal = ">1.5, <3.0" asteval = "^0.9.14" colorama = "^0.4.1" python-dateutil = "^2.8" From 79d2bd5ec7165cddfec32964927413d5c2dcca43 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 4 Apr 2020 14:21:13 -0700 Subject: [PATCH 0055/1132] Change install doc guideline from pip to pipx and mention minimum Python version --- docs/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 8bf29bb0..4c80eb0d 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -3,16 +3,16 @@ ## Installation On OS X, the easiest way to install *jrnl* is using -[Homebrew](http://brew.sh/) +[Homebrew](http://brew.sh/): ``` sh brew install jrnl ``` -On other platforms, install *jrnl* using pip +On other platforms, install *jrnl* using [Python](https://www.python.org/) 3.6+ and [pipx](https://pipxproject.github.io/pipx/): ``` sh -pip install jrnl +pipx install jrnl ``` The first time you run `jrnl` you will be asked where your journal file From 333dbca78325760794fdb4de8cd95719080a07a2 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 4 Apr 2020 14:25:09 -0700 Subject: [PATCH 0056/1132] Update twitter buttons, contribution in footer (#905) --- docs/theme/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/theme/index.html b/docs/theme/index.html index 2221e76f..89aa3641 100755 --- a/docs/theme/index.html +++ b/docs/theme/index.html @@ -42,7 +42,7 @@
@@ -58,7 +58,7 @@
@@ -95,7 +95,7 @@
@@ -45,7 +46,7 @@ Tell your friends
- +

Collect your thoughts and notes
without leaving the command line.

@@ -57,9 +58,9 @@
diff --git a/docs/theme/index.js b/docs_theme/index.js similarity index 100% rename from docs/theme/index.js rename to docs_theme/index.js diff --git a/docs_theme/main.html b/docs_theme/main.html new file mode 100644 index 00000000..4291adce --- /dev/null +++ b/docs_theme/main.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block search_button %} + +{% endblock %} diff --git a/docs/requirements.txt b/docs_theme/requirements.txt similarity index 100% rename from docs/requirements.txt rename to docs_theme/requirements.txt diff --git a/mkdocs.yml b/mkdocs.yml index 66a4f9d5..c70d3807 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,11 +2,12 @@ site_name: jrnl site_url: https://jrnl.sh theme: name: readthedocs - custom_dir: docs/theme + custom_dir: docs_theme static_templates: - index.html extra_css: - https://fonts.googleapis.com/css?family=Open+Sans:300,600 + - assets/colors.css - assets/theme.css - assets/highlight.css markdown_extensions: diff --git a/readthedocs.yml b/readthedocs.yml index dabbddc7..f74f3d23 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -19,4 +19,4 @@ formats: python: version: 3.7 install: - - requirements: docs/requirements.txt + - requirements: docs_theme/requirements.txt From b1f936e65c379f1d0a13c89c51bf96a793d8fa24 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 12 Dec 2020 20:06:56 +0000 Subject: [PATCH 0247/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41c7568f..ba7c8247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,19 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5.1-alpha...HEAD) +**Implemented enhancements:** + +- Low Contrast Text on Webpage [\#1061](https://github.com/jrnl-org/jrnl/issues/1061) + **Fixed bugs:** - Missing readline module can be dealt with more gracefully [\#1015](https://github.com/jrnl-org/jrnl/issues/1015) - Check for readline module instead of Windows when initializing autocomplete in install [\#1104](https://github.com/jrnl-org/jrnl/pull/1104) +**Documentation:** + +- Make docs site \(jrnl.sh\) fully meet Web Content Accessibility Guidelines \(WCAG\) 2.1 [\#1105](https://github.com/jrnl-org/jrnl/pull/1105) + ## [v2.5.1-alpha](https://pypi.org/project/jrnl/v2.5.1-alpha/) (2020-11-28) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.5.1-alpha) From ae6041a010f45b471679e05caddace8afb9f2090 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 12 Dec 2020 12:33:40 -0800 Subject: [PATCH 0248/1132] fix readme header (#1108) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da42eb2d..6868c61c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- +

From eddf37a1b575f9b1bcb4feae5d2af55bce922749 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 12 Dec 2020 12:41:49 -0800 Subject: [PATCH 0249/1132] Fix readme links (#1109) * fix links to docs now that we use readthedocs * fix badge links in readme --- .github/ISSUE_TEMPLATE/documentation.md | 2 +- README.md | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md index 47c8410b..24aacdd3 100644 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -18,7 +18,7 @@ Please fill out the points below, as it will make our process much easier. Please tell us which page, or pages, from the documentation site (https://jrnl.sh) are affected in this issue --> - - + - ### What Could Be Better? # Contributing We welcome contributions to jrnl, whether it's through reporting bugs, improving the documentation, testing releases, engaging in discussion on features and bugs, or writing code. diff --git a/docs/advanced.md b/docs/advanced.md index 3a0172e7..51c4d1af 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -1,3 +1,5 @@ + # Advanced Usage ## Configuration File diff --git a/docs/encryption.md b/docs/encryption.md index 6b966aa3..ae1af43f 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -1,3 +1,5 @@ + # Encryption ## A Note on Security diff --git a/docs/formats.md b/docs/formats.md index 93aac9ef..99b3e69b 100644 --- a/docs/formats.md +++ b/docs/formats.md @@ -1,3 +1,5 @@ + # Formats `jrnl` supports a variety of alternate formats. These can be used to display your diff --git a/docs/installation.md b/docs/installation.md index 9912a382..ee70893a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,3 +1,5 @@ + # Getting started ## Installation diff --git a/docs/overview.md b/docs/overview.md index fdfb2159..57269585 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,3 +1,5 @@ + # Overview `jrnl` is a simple journal application for the command line. diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index b93e99a1..39f4863c 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -1,3 +1,5 @@ + # Privacy and Security `jrnl` is designed with privacy and security in mind, but like any other diff --git a/docs/recipes.md b/docs/recipes.md index a80a0c09..b7d370a4 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -1,3 +1,5 @@ + # FAQ ## Recipes diff --git a/docs/usage.md b/docs/usage.md index ab7e143f..6d5cd765 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,3 +1,5 @@ + # Basic Usage # `jrnl` has two modes: **composing** and **viewing**. Whenever you don't enter diff --git a/docs_theme/assets/colors.css b/docs_theme/assets/colors.css index c8280af3..1a518461 100644 --- a/docs_theme/assets/colors.css +++ b/docs_theme/assets/colors.css @@ -1,3 +1,6 @@ +/* Copyright (C) 2012-2021 jrnl contributors + License: https://www.gnu.org/licenses/gpl-3.0.html */ + :root { /* For dark bg */ --white: #fcfcfc; diff --git a/docs_theme/assets/index.css b/docs_theme/assets/index.css index b447dec6..6a05be25 100644 --- a/docs_theme/assets/index.css +++ b/docs_theme/assets/index.css @@ -1,3 +1,5 @@ +/* Copyright (C) 2012-2021 jrnl contributors + License: https://www.gnu.org/licenses/gpl-3.0.html */ /* reset */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0} body { diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index f394d6d3..9c78ded8 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -1,3 +1,6 @@ +/* Copyright (C) 2012-2021 jrnl contributors + License: https://www.gnu.org/licenses/gpl-3.0.html */ + /* ------------------------------------------------------------ */ /* Overrides for jrnl theme */ /* ------------------------------------------------------------ */ diff --git a/docs_theme/index.html b/docs_theme/index.html index 2570a75c..491da4c7 100755 --- a/docs_theme/index.html +++ b/docs_theme/index.html @@ -1,3 +1,5 @@ + diff --git a/features/core.feature b/features/core.feature index 0861f231..26640c00 100644 --- a/features/core.feature +++ b/features/core.feature @@ -4,13 +4,13 @@ Feature: Functionality of jrnl outside of actually handling journals Given we use the config "simple.yaml" When we run "jrnl --version" Then we should get no error - Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta))?$" + Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" Scenario: Displaying the version number Given we use the config "simple.yaml" When we run "jrnl -v" Then we should get no error - Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta))?$" + Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" Scenario: Running the diagnostic command When we run "jrnl --diagnostic" diff --git a/features/steps/core.py b/features/steps/core.py index 58c0a71d..d579b6d2 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import ast from collections import defaultdict import os diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py index d7173ace..6a5c8e46 100644 --- a/features/steps/export_steps.py +++ b/features/steps/export_steps.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import json import os import shutil diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 0ca6c3b5..2a85e015 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from datetime import datetime import re diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index 9a6ea3c0..e727cdf0 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -1,5 +1,8 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import codecs import fnmatch diff --git a/jrnl/Journal.py b/jrnl/Journal.py index dc6292b7..1871e3c2 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from datetime import datetime import logging diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 8b0c4181..8f4dc3ec 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -1,4 +1,6 @@ #!/usr/bin/env python +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html try: from .__version__ import __version__ diff --git a/jrnl/__main__.py b/jrnl/__main__.py index a67d0add..e977369f 100644 --- a/jrnl/__main__.py +++ b/jrnl/__main__.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import sys from .cli import cli diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 74135de9..68cf1775 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1,4 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + __version__ = "v2.6-beta" diff --git a/jrnl/args.py b/jrnl/args.py index 0ba55961..5efb00ba 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import argparse import re import textwrap diff --git a/jrnl/cli.py b/jrnl/cli.py index 47b7c303..e010f38e 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -1,21 +1,7 @@ #!/usr/bin/env python -""" - jrnl +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html - license: GPLv3, see LICENSE.md for more details. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -""" import logging import sys diff --git a/jrnl/commands.py b/jrnl/commands.py index d8d36571..8473954e 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -29,7 +29,13 @@ def preconfig_version(_): from jrnl import __title__ from jrnl import __version__ - version_str = f"{__title__} version {__version__}" + version_str = f"""{__title__} version {__version__} + +Copyright (C) 2012-2021 jrnl contributors + +This is free software, and you are welcome to redistribute it under certain +conditions; for details, see: https://www.gnu.org/licenses/gpl-3.0.html""" + print(version_str) diff --git a/jrnl/exception.py b/jrnl/exception.py index 9ed93e25..f1a509f5 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -1,3 +1,7 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + + class UserAbort(Exception): pass diff --git a/jrnl/install.py b/jrnl/install.py index 9dff5a1a..a5023815 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import glob import logging diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index ccbca33e..ad5b07d0 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import logging import sys diff --git a/jrnl/os_compat.py b/jrnl/os_compat.py index 33fd47e1..b38d9d60 100644 --- a/jrnl/os_compat.py +++ b/jrnl/os_compat.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from sys import platform on_windows = "win32" in platform diff --git a/jrnl/output.py b/jrnl/output.py index 624dd8be..43390346 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import logging diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index 9fcafca2..0d2b39b4 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html from .fancy_exporter import FancyExporter from .jrnl_importer import JRNLImporter diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index 7e3358d5..74cc6958 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html from textwrap import TextWrapper diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index 9ea9ee26..af5ea6ce 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html import sys diff --git a/jrnl/plugins/json_exporter.py b/jrnl/plugins/json_exporter.py index 9254e51a..dd07b0ce 100644 --- a/jrnl/plugins/json_exporter.py +++ b/jrnl/plugins/json_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html import json diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 7ee20472..693f2fa5 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html import os import re diff --git a/jrnl/plugins/tag_exporter.py b/jrnl/plugins/tag_exporter.py index 89d54a1a..bc3736eb 100644 --- a/jrnl/plugins/tag_exporter.py +++ b/jrnl/plugins/tag_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html from .text_exporter import TextExporter from .util import get_tags_count diff --git a/jrnl/plugins/template.py b/jrnl/plugins/template.py index d08ae6e8..147cd7af 100644 --- a/jrnl/plugins/template.py +++ b/jrnl/plugins/template.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import re import yaml diff --git a/jrnl/plugins/template_exporter.py b/jrnl/plugins/template_exporter.py index f8d704ef..af081f8c 100644 --- a/jrnl/plugins/template_exporter.py +++ b/jrnl/plugins/template_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html from glob import glob import os diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index ebe50016..7714606c 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html import os import re diff --git a/jrnl/plugins/util.py b/jrnl/plugins/util.py index a030f8d3..04159ca4 100644 --- a/jrnl/plugins/util.py +++ b/jrnl/plugins/util.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html def get_tags_count(journal): diff --git a/jrnl/plugins/xml_exporter.py b/jrnl/plugins/xml_exporter.py index 4ffcc731..b9467912 100644 --- a/jrnl/plugins/xml_exporter.py +++ b/jrnl/plugins/xml_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html from xml.dom import minidom diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 0d431967..df3b0548 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html import os import re diff --git a/jrnl/prompt.py b/jrnl/prompt.py index 13828620..3cdd3f6f 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import getpass import sys diff --git a/jrnl/time.py b/jrnl/time.py index 45fc15cc..b9ea8e84 100644 --- a/jrnl/time.py +++ b/jrnl/time.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from datetime import datetime FAKE_YEAR = 9999 diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index fb526e97..158f8de3 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import os import sys diff --git a/mkdocs.yml b/mkdocs.yml index c70d3807..65a515da 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,7 +14,7 @@ markdown_extensions: - admonition repo_url: https://github.com/jrnl-org/jrnl/ edit_uri: edit/develop/docs/ -site_author: Manuel Ebert +site_author: jrnl contributors site_description: Collect your thoughts and notes without leaving the command line. nav: - Overview: overview.md diff --git a/pyproject.toml b/pyproject.toml index 9893cebd..9a082829 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ name = "jrnl" version = "v2.6-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ + "jrnl contributors ", "Manuel Ebert ", "Jonathan Wren ", "Micah Ellison " From 3dec22651eef4249d963629155ac7b389fa487b1 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 19 Dec 2020 22:54:47 +0000 Subject: [PATCH 0266/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a137c3a7..ae8e2c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ **Documentation:** - Small accessibility fixes for docs site [\#1122](https://github.com/jrnl-org/jrnl/pull/1122) +- Comply with GPL by acknowledging all authors and including license info in each source file [\#1121](https://github.com/jrnl-org/jrnl/pull/1121) - Fix lone closing parenthesis [\#1118](https://github.com/jrnl-org/jrnl/pull/1118) ## [v2.6-beta](https://pypi.org/project/jrnl/v2.6-beta/) (2020-12-12) From 2e9e857b7b68a3f5e9b07102e7b243b15428a0ca Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Dec 2020 15:07:45 -0800 Subject: [PATCH 0267/1132] standardize version regex in release pipeline (#1124) --- .github/workflows/changelog.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 471acb79..ffacd90e 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -35,7 +35,7 @@ jobs: if [[ $GITHUB_REF =~ ^refs/tags/ ]]; then # This is a tag build (i.e. a release) echo '::debug::Release build' - if [[ ! $BRANCH =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)(\.[0-9]+)?)?$ ]]; then + if [[ ! $BRANCH =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)([0-9]+)?)?$ ]]; then echo "::error::Invalid tag format: ${BRANCH}" exit 1 fi diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 67d70065..b8474967 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ on: workflow_dispatch: inputs: version: - description: 'Version (e.g. v2.5 or v2.5.1-beta)' + description: 'Version (e.g. v2.5, v2.5.1-beta, v2.6-beta2)' required: true jobs: @@ -15,7 +15,7 @@ jobs: run: | JRNL_VERSION="${{ github.event.inputs.version }}" echo "::debug::version: $JRNL_VERSION" - if [[ ! $JRNL_VERSION =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)(\.[0-9]+)?)?$ ]]; then + if [[ ! $JRNL_VERSION =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)([0-9]+)?)?$ ]]; then echo echo "::error::Bad version" echo From 68cf2d773d53030328c6c9ed0260475e4b7ca10a Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Dec 2020 16:36:25 -0800 Subject: [PATCH 0268/1132] do additional check for json data, and retry for 5-ish minutes on failure (#1125) --- .github/workflows/release.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b8474967..c959d810 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -162,7 +162,15 @@ jobs: run: brew install pipgrip - name: Query PyPI API - run: curl -Ls https://pypi.org/pypi/jrnl/json > api_response.json + uses: nick-invision/retry@v2 + with: + timeout_seconds: 10 + max_attempts: 30 + retry_wait_seconds: 10 + command: | + curl -Ls https://pypi.org/pypi/jrnl/json > api_response.json + # if query doesn't have our version yet, give it some time before trying again + [[ "null" == "$(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json)" ]] && exit 1 - name: Update Homebrew Formula run: > From e1cbce8a08718375d03f7b3784375347960c1641 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Dec 2020 16:56:23 -0800 Subject: [PATCH 0269/1132] add more debug data to changelog workflow, update changelog --- .github/workflows/changelog.yaml | 4 ++-- .github/workflows/release.yaml | 34 ++++++++++++++++++++++---------- CHANGELOG.md | 4 ++-- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index ffacd90e..62cf0408 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -56,7 +56,7 @@ jobs: if [[ "$(git rev-parse "origin/$BRANCH")" != $GITHUB_SHA ]]; then # Normal build on a branch (no tag) - echo "::debug::BRANCH: $BRANCH" + echo "::debug::BRANCH: $BRANCH $(git rev-parse origin/$BRANCH)" echo "::debug::GITHUB_SHA: $GITHUB_SHA" echo "::error::$BRANCH has been updated since build started. Aborting changelog." exit 1 @@ -130,7 +130,7 @@ jobs: echo "SOMETHING_CHANGED=$SOMETHING_CHANGED" >> $GITHUB_ENV - name: Commit - if: env.SOMETHING_CHANGED + if: env.SOMETHING_CHANGED == 'true' run: | git config user.email "jrnl.bot@gmail.com" git config user.name "Jrnl Bot" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c959d810..884a8c48 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -75,6 +75,7 @@ jobs: git add pyproject.toml jrnl/__version__.py git commit -m "Increment version to ${JRNL_VERSION}" git tag -a -m "$JRNL_VERSION" "$JRNL_VERSION" + git push git push --tags - name: Build @@ -170,18 +171,31 @@ jobs: command: | curl -Ls https://pypi.org/pypi/jrnl/json > api_response.json # if query doesn't have our version yet, give it some time before trying again - [[ "null" == "$(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json)" ]] && exit 1 + if [[ "null" == "$(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json)" ]]; then + echo "::debug::PYPI_VERSION: $PYPI_VERSION" + echo "::debug::JQ VALUE: $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json)" + echo "::group::cat api_response.json" + cat api_response.json + echo "::endgroup::" + exit 1 + fi - name: Update Homebrew Formula - run: > - brew bump-formula-pr "Formula/${FORMULA_NAME}.rb" - --url $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json) - --sha256 $(jq ".releases[\"${PYPI_VERSION}\"][1].digests.sha256" -r api_response.json) - --version=$PYPI_VERSION - --no-audit - --write - --commit - --force + uses: nick-invision/retry@v2 + with: + timeout_minutes: 8 + max_attempts: 6 + retry_wait_seconds: 30 + command: > + brew bump-formula-pr "Formula/${FORMULA_NAME}.rb" + --url $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json) + --sha256 $(jq ".releases[\"${PYPI_VERSION}\"][1].digests.sha256" -r api_response.json) + --version=$PYPI_VERSION + --no-audit + --write + --commit + --force + --verbose - name: Update commit message run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index ae8e2c8b..085ac509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.6-beta3](https://pypi.org/project/jrnl/v2.6-beta3/) (2020-12-19) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6-beta...v2.6-beta3) **Fixed bugs:** From 7cf977a3cb68b2b0add8dc87a630f5b21c6cb3b7 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 20 Dec 2020 02:24:38 +0000 Subject: [PATCH 0270/1132] Increment version to v2.6-beta5 --- jrnl/__version__.py | 5 +---- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 68cf1775..2765f166 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1,4 +1 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -__version__ = "v2.6-beta" +__version__ = "v2.6-beta5" diff --git a/pyproject.toml b/pyproject.toml index 9a082829..9c1dee37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.6-beta" +version = "v2.6-beta5" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From b0de760621fb57e834836d62f7ed060b9ab6524c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 20 Dec 2020 02:31:26 +0000 Subject: [PATCH 0271/1132] Increment version to v2.6 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 2765f166..fc38b65a 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.6-beta5" +__version__ = "v2.6" diff --git a/pyproject.toml b/pyproject.toml index 9c1dee37..c03a4f88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.6-beta5" +version = "v2.6" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 3fb9fe5e28f04088498532d9ba8135a8bf92b3d6 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 20 Dec 2020 02:32:59 +0000 Subject: [PATCH 0272/1132] Update changelog [ci skip] --- CHANGELOG.md | 80 ++++++++++++++++------------------------------------ 1 file changed, 24 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 085ac509..a0b430aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,77 +1,45 @@ # Changelog -## [v2.6-beta3](https://pypi.org/project/jrnl/v2.6-beta3/) (2020-12-19) +## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6-beta...v2.6-beta3) - -**Fixed bugs:** - -- Typo fix in output.py: "us" -\> "use" [\#1117](https://github.com/jrnl-org/jrnl/pull/1117) - -**Build:** - -- Change approach for docs workflow to use pa11y-ci [\#1116](https://github.com/jrnl-org/jrnl/pull/1116) -- Fix trigger for changelog [\#1114](https://github.com/jrnl-org/jrnl/pull/1114) -- Add automatic deployment for homebrew releases \(and prereleases\) [\#1111](https://github.com/jrnl-org/jrnl/pull/1111) - -**Documentation:** - -- Small accessibility fixes for docs site [\#1122](https://github.com/jrnl-org/jrnl/pull/1122) -- Comply with GPL by acknowledging all authors and including license info in each source file [\#1121](https://github.com/jrnl-org/jrnl/pull/1121) -- Fix lone closing parenthesis [\#1118](https://github.com/jrnl-org/jrnl/pull/1118) - -## [v2.6-beta](https://pypi.org/project/jrnl/v2.6-beta/) (2020-12-12) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5.1-alpha...v2.6-beta) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.6) **Implemented enhancements:** -- Low Contrast Text on Webpage [\#1061](https://github.com/jrnl-org/jrnl/issues/1061) - -**Fixed bugs:** - -- Missing readline module can be dealt with more gracefully [\#1015](https://github.com/jrnl-org/jrnl/issues/1015) -- Check for readline module instead of Windows when initializing autocomplete in install [\#1104](https://github.com/jrnl-org/jrnl/pull/1104) - -**Build:** - -- Conduct a dependency audit [\#1052](https://github.com/jrnl-org/jrnl/issues/1052) -- Update all dependencies and lock file [\#1110](https://github.com/jrnl-org/jrnl/pull/1110) - -**Documentation:** - -- Make docs site \(jrnl.sh\) fully meet Web Content Accessibility Guidelines \(WCAG\) 2.1 [\#1105](https://github.com/jrnl-org/jrnl/pull/1105) - -## [v2.5.1-alpha](https://pypi.org/project/jrnl/v2.5.1-alpha/) (2020-11-28) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.5.1-alpha) - -**Implemented enhancements:** - -- Configure default display format in config [\#1014](https://github.com/jrnl-org/jrnl/issues/1014) +- Add ability to put --edit partly through a cli entry to move it to the editor [\#1091](https://github.com/jrnl-org/jrnl/pull/1091) ([wren](https://github.com/wren)) - Allow --edit flag partway through an entry [\#906](https://github.com/jrnl-org/jrnl/issues/906) -- Add ability to put --edit partly through a cli entry to move it to the editor [\#1091](https://github.com/jrnl-org/jrnl/pull/1091) **Fixed bugs:** +- Check for readline module instead of Windows when initializing autocomplete in install [\#1104](https://github.com/jrnl-org/jrnl/pull/1104) ([micahellison](https://github.com/micahellison)) - Directory export crashes in Windows with certain characters - UnicodeEncodeError: 'locale' codec can't encode character [\#1089](https://github.com/jrnl-org/jrnl/issues/1089) -- Fix Unicode encoding failure in directory export when creating filenames from journal titles with certain characters [\#1090](https://github.com/jrnl-org/jrnl/pull/1090) +- Fix Unicode encoding failure in directory export when creating filenames from journal titles with certain characters [\#1090](https://github.com/jrnl-org/jrnl/pull/1090) ([micahellison](https://github.com/micahellison)) +- Typo fix in output.py: "us" -\> "use" [\#1117](https://github.com/jrnl-org/jrnl/pull/1117) ([signal-9](https://github.com/signal-9)) **Build:** +- Add a release workflow for PyPI in CI \(Github Actions\) [\#1095](https://github.com/jrnl-org/jrnl/pull/1095) ([wren](https://github.com/wren)) +- Add automatic deployment for homebrew releases \(and prereleases\) [\#1111](https://github.com/jrnl-org/jrnl/pull/1111) ([wren](https://github.com/wren)) +- Add changelog generation workflow to github actions [\#1086](https://github.com/jrnl-org/jrnl/pull/1086) ([wren](https://github.com/wren)) +- Add fix for changelog conditional always returning false [\#1101](https://github.com/jrnl-org/jrnl/pull/1101) ([wren](https://github.com/wren)) +- Change approach for docs workflow to use pa11y-ci [\#1116](https://github.com/jrnl-org/jrnl/pull/1116) ([wren](https://github.com/wren)) +- Changelog fixes [\#1088](https://github.com/jrnl-org/jrnl/pull/1088) ([wren](https://github.com/wren)) +- Fix trigger for changelog [\#1114](https://github.com/jrnl-org/jrnl/pull/1114) ([wren](https://github.com/wren)) +- Make changelog auto exclude stale and wontfix issues [\#1081](https://github.com/jrnl-org/jrnl/pull/1081) ([wren](https://github.com/wren)) - Migrate to Github Actions from Travis CI [\#1060](https://github.com/jrnl-org/jrnl/issues/1060) -- Add fix for changelog conditional always returning false [\#1101](https://github.com/jrnl-org/jrnl/pull/1101) -- Add a release workflow for PyPI in CI \(Github Actions\) [\#1095](https://github.com/jrnl-org/jrnl/pull/1095) -- Udpate build badge in readme to point at github instead of travis [\#1094](https://github.com/jrnl-org/jrnl/pull/1094) -- More changelog fixes [\#1092](https://github.com/jrnl-org/jrnl/pull/1092) -- Changelog fixes [\#1088](https://github.com/jrnl-org/jrnl/pull/1088) -- Add changelog generation workflow to github actions [\#1086](https://github.com/jrnl-org/jrnl/pull/1086) -- get rid of travis and circle configs \(in favor of github actions\) [\#1082](https://github.com/jrnl-org/jrnl/pull/1082) -- Make changelog auto exclude stale and wontfix issues [\#1081](https://github.com/jrnl-org/jrnl/pull/1081) +- More changelog fixes [\#1092](https://github.com/jrnl-org/jrnl/pull/1092) ([wren](https://github.com/wren)) +- Standardize version regex in release pipeline [\#1124](https://github.com/jrnl-org/jrnl/pull/1124) ([wren](https://github.com/wren)) +- Udpate build badge in readme to point at github instead of travis [\#1094](https://github.com/jrnl-org/jrnl/pull/1094) ([wren](https://github.com/wren)) +- Update all dependencies and lock file [\#1110](https://github.com/jrnl-org/jrnl/pull/1110) ([wren](https://github.com/wren)) +- get rid of travis and circle configs \(in favor of github actions\) [\#1082](https://github.com/jrnl-org/jrnl/pull/1082) ([wren](https://github.com/wren)) **Documentation:** -- Add visual header to readme [\#1085](https://github.com/jrnl-org/jrnl/pull/1085) +- Add visual header to readme [\#1085](https://github.com/jrnl-org/jrnl/pull/1085) ([wren](https://github.com/wren)) +- Comply with GPL by acknowledging all authors and including license info in each source file [\#1121](https://github.com/jrnl-org/jrnl/pull/1121) ([micahellison](https://github.com/micahellison)) +- Fix lone closing parenthesis [\#1118](https://github.com/jrnl-org/jrnl/pull/1118) ([maebert](https://github.com/maebert)) +- Make docs site \(jrnl.sh\) fully meet Web Content Accessibility Guidelines \(WCAG\) 2.1 [\#1105](https://github.com/jrnl-org/jrnl/pull/1105) ([wren](https://github.com/wren)) +- Small accessibility fixes for docs site [\#1122](https://github.com/jrnl-org/jrnl/pull/1122) ([wren](https://github.com/wren)) ## [v2.5](https://pypi.org/project/jrnl/v2.5/) (2020-11-07) From f999caa3a362fe6f74df2275435316323a936cd6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 26 Dec 2020 10:52:55 -0800 Subject: [PATCH 0273/1132] Bump pytest from 6.2.0 to 6.2.1 (#1129) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.0...6.2.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2452e1aa..55033cef 100644 --- a/poetry.lock +++ b/poetry.lock @@ -424,7 +424,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "6.2.0" +version = "6.2.1" description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -671,11 +671,13 @@ cffi = [ {file = "cffi-1.14.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a7711edca4dcef1a75257b50a2fbfe92a65187c47dab5a0f1b9b332c5919a3fb"}, {file = "cffi-1.14.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:00e28066507bfc3fe865a31f325c8391a1ac2916219340f87dfad602c3e48e5d"}, {file = "cffi-1.14.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:798caa2a2384b1cbe8a2a139d80734c9db54f9cc155c99d7cc92441a23871c03"}, + {file = "cffi-1.14.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:a5ed8c05548b54b998b9498753fb9cadbfd92ee88e884641377d8a8b291bcc01"}, {file = "cffi-1.14.4-cp37-cp37m-win32.whl", hash = "sha256:00a1ba5e2e95684448de9b89888ccd02c98d512064b4cb987d48f4b40aa0421e"}, {file = "cffi-1.14.4-cp37-cp37m-win_amd64.whl", hash = "sha256:9cc46bc107224ff5b6d04369e7c595acb700c3613ad7bcf2e2012f62ece80c35"}, {file = "cffi-1.14.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:df5169c4396adc04f9b0a05f13c074df878b6052430e03f50e68adf3a57aa28d"}, {file = "cffi-1.14.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:9ffb888f19d54a4d4dfd4b3f29bc2c16aa4972f1c2ab9c4ab09b8ab8685b9c2b"}, {file = "cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8d6603078baf4e11edc4168a514c5ce5b3ba6e3e9c374298cb88437957960a53"}, + {file = "cffi-1.14.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:d5ff0621c88ce83a28a10d2ce719b2ee85635e85c515f12bac99a95306da4b2e"}, {file = "cffi-1.14.4-cp38-cp38-win32.whl", hash = "sha256:b4e248d1087abf9f4c10f3c398896c87ce82a9856494a7155823eb45a892395d"}, {file = "cffi-1.14.4-cp38-cp38-win_amd64.whl", hash = "sha256:ec80dc47f54e6e9a78181ce05feb71a0353854cc26999db963695f950b5fb375"}, {file = "cffi-1.14.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:840793c68105fe031f34d6a086eaea153a0cd5c491cde82a74b420edd0a2b909"}, @@ -833,8 +835,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.2.0-py3-none-any.whl", hash = "sha256:d69e1a80b34fe4d596c9142f35d9e523d98a2838976f1a68419a8f051b24cec6"}, - {file = "pytest-6.2.0.tar.gz", hash = "sha256:b12e09409c5bdedc28d308469e156127004a436b41e9b44f9bff6446cbab9152"}, + {file = "pytest-6.2.1-py3-none-any.whl", hash = "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8"}, + {file = "pytest-6.2.1.tar.gz", hash = "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, @@ -863,6 +865,8 @@ pyyaml = [ {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, + {file = "PyYAML-5.3.1-cp39-cp39-win32.whl", hash = "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a"}, + {file = "PyYAML-5.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e"}, {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, ] regex = [ @@ -979,19 +983,28 @@ typed-ast = [ {file = "typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75"}, {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652"}, {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"}, + {file = "typed_ast-1.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f"}, {file = "typed_ast-1.4.1-cp36-cp36m-win32.whl", hash = "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1"}, {file = "typed_ast-1.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa"}, {file = "typed_ast-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614"}, {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41"}, {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b"}, + {file = "typed_ast-1.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298"}, {file = "typed_ast-1.4.1-cp37-cp37m-win32.whl", hash = "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe"}, {file = "typed_ast-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355"}, {file = "typed_ast-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6"}, {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907"}, {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d"}, + {file = "typed_ast-1.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d"}, {file = "typed_ast-1.4.1-cp38-cp38-win32.whl", hash = "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c"}, {file = "typed_ast-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4"}, {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, + {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c"}, + {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072"}, + {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91"}, + {file = "typed_ast-1.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d"}, + {file = "typed_ast-1.4.1-cp39-cp39-win32.whl", hash = "sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395"}, + {file = "typed_ast-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c"}, {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, ] typing-extensions = [ From b25ea7409a60ca37edd1718789586a8f6e489ae2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 26 Dec 2020 10:53:47 -0800 Subject: [PATCH 0274/1132] Bump keyring from 21.5.0 to 21.7.0 (#1128) Bumps [keyring](https://github.com/jaraco/keyring) from 21.5.0 to 21.7.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v21.5.0...v21.7.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 55033cef..d6d997a0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -212,7 +212,7 @@ python-versions = ">=3.6" [[package]] name = "keyring" -version = "21.5.0" +version = "21.7.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -735,8 +735,8 @@ joblib = [ {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, ] keyring = [ - {file = "keyring-21.5.0-py3-none-any.whl", hash = "sha256:12de23258a95f3b13e5b167f7a641a878e91eab8ef16fafc077720a95e6115bb"}, - {file = "keyring-21.5.0.tar.gz", hash = "sha256:207bd66f2a9881c835dad653da04e196c678bf104f8252141d2d3c4f31051579"}, + {file = "keyring-21.7.0-py3-none-any.whl", hash = "sha256:4c41ce4f6d1ee91d589a346699ef5a94ba3429603ac8f700cc0097644cdd6748"}, + {file = "keyring-21.7.0.tar.gz", hash = "sha256:a144f7e1044c897c3976202af868cb0ac860f4d433d5d0f8e750fa1a2f0f0b50"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, From 16e313ab704a24859fb1df3283f8c611a33da766 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 26 Dec 2020 10:55:19 -0800 Subject: [PATCH 0275/1132] Bump pytz from 2020.4 to 2020.5 (#1130) Bumps [pytz](https://github.com/stub42/pytz) from 2020.4 to 2020.5. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2020.4...release_2020.5) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index d6d997a0..cd5ac6d2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -457,7 +457,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2020.4" +version = "2020.5" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -843,8 +843,8 @@ python-dateutil = [ {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, ] pytz = [ - {file = "pytz-2020.4-py2.py3-none-any.whl", hash = "sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd"}, - {file = "pytz-2020.4.tar.gz", hash = "sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268"}, + {file = "pytz-2020.5-py2.py3-none-any.whl", hash = "sha256:16962c5fb8db4a8f63a26646d8886e9d769b6c511543557bc84e9569fb9a9cb4"}, + {file = "pytz-2020.5.tar.gz", hash = "sha256:180befebb1927b16f6b57101720075a984c019ac16b1b7575673bea42c6c3da5"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, From 2f4ec7ca986d21f1a20b117f8f41b2cee9c101bd Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Dec 2020 18:56:53 +0000 Subject: [PATCH 0276/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b430aa..b2211998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...HEAD) + +**Implemented enhancements:** + +- Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) + ## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.6) From 37c5b0eb110973e056029cc1650da64486bd8da6 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Dec 2020 10:58:23 -0800 Subject: [PATCH 0277/1132] Fixes to changelog generator (#1127) * Fix version header detection in changelog This updates the regex to find the version header in our changelog. There was a bug that affected patch, alpha, and beta versions. For example, if we were looking for "v2.5" we might find "v2.5.1" or "v2.5.1-alpha" or other versions like that. This led to the changelog not being cleared properly on update, and old versions sticking around longer than they should. * re-add option to include author link for merged PRs in changelog This option was accidentally left out when migrating the changelog generator tool to github actions. * fix conditional in changelog workflow In github actions, booleans always end up as strings. So, it's not enough to test `env.FULL_RELEASE` because both 'true' and 'false' will evaluate as true. This fixes the conditional to check for the string value 'true' instead of relying on a boolean. --- .github/workflows/changelog.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 62cf0408..5d18ca9d 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -77,7 +77,7 @@ jobs: - name: Prep changelog file (clear out old lines) run: | # delete the top of the changelog up to the correct tag - tagline=$(grep -n "^## \[\?${SINCE_TAG}\]\?" "$FILENAME" | awk '{print $1}' FS=':' | head -1) + tagline=$(grep -n "^## \[${SINCE_TAG}\]" "$FILENAME" | awk '{print $1}' FS=':' | head -1) echo "tagline: ${tagline}" if [[ -z $tagline ]]; then @@ -112,6 +112,7 @@ jobs: releaseUrl: https://pypi.org/project/jrnl/%s/ releaseBranch: develop verbose: false + author: true - name: Small fixes run: | @@ -139,7 +140,7 @@ jobs: git push origin $BRANCH - name: Merge to Release branch - if: env.FULL_RELEASE + if: env.FULL_RELEASE == 'true' run: | git checkout release git merge --ff-only $BRANCH From 9a4c3e41a6edb4d4ab3a6b126db23cba68365f85 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Dec 2020 19:00:18 +0000 Subject: [PATCH 0278/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2211998..513031c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) +**Build:** + +- Fix changelog generator [\#1127](https://github.com/jrnl-org/jrnl/pull/1127) ([wren](https://github.com/wren)) + ## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.6) From 870f9aed17d85cccb6a4a53b0b998024e9d20a74 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Dec 2020 11:01:27 -0800 Subject: [PATCH 0279/1132] Fix failing contrast test in accessibility tools on docs site (#1126) * add background-color as fallback for gradients on docs site This is both for old browser support, and for accessibility. Some accessibility tools turn off gradients since they can make text hard to read for those with visual impairment. * change mobile header color for docs site The mobile header was using a light-purple to dark-purple gradient, even though every other gradient on the site is mid-purple to dark-purple. This commit changes that both for consistency on the site, and because light-purple causes an accessibility issue with the white text in the header (even though the accessibility tools don't notice because of the gradient). --- docs_theme/assets/index.css | 3 +++ docs_theme/assets/theme.css | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs_theme/assets/index.css b/docs_theme/assets/index.css index 6a05be25..472de17e 100644 --- a/docs_theme/assets/index.css +++ b/docs_theme/assets/index.css @@ -66,6 +66,7 @@ h3 { } header { + background-color: --mid-purple; background-image: linear-gradient(211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); color: var(--white); border: 0px solid transparent; @@ -202,6 +203,7 @@ nav a:visited:hover { nav a.cta { display: inline-block; color: var(--white); + background-color: --mid-purple; background-image: linear-gradient(259deg, var(--mid-purple) 0%, var(--dark-purple) 100%); box-shadow: 0 2px 8px 0 var(--blacker-shadow); border-radius: 50px; @@ -213,6 +215,7 @@ nav a.cta { nav a.cta:hover { text-decoration: none; + background-color: --mid-purple; background-image: linear-gradient(259deg, var(--bright-purple) 0%, var(--dark-purple) 100%); box-shadow: 0 4px 16px 0 var(--black-shadow); color: var(--off-white); diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index 9c78ded8..29b32c68 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -76,7 +76,8 @@ div.rst-content { } .wy-nav-top { - background-image: linear-gradient(-211deg, var(--light-purple) 0%, var(--dark-purple) 100%); + background-color: --mid-purple; + background-image: linear-gradient(-211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); } .wy-nav-top .fa-bars { @@ -172,6 +173,7 @@ a.icon-home:before { .wy-nav-side { + background-color: --mid-purple; background-image: linear-gradient(211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); font-weight: 300; height: 100%; From fc8eafa451670176e41d502b777f24fa2c25ffed Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Dec 2020 19:02:42 +0000 Subject: [PATCH 0280/1132] Update changelog [ci skip] --- CHANGELOG.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 513031c2..43eb217b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,3 @@ -# Changelog - -## [Unreleased](https://github.com/jrnl-org/jrnl/) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...HEAD) - -**Implemented enhancements:** - -- Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) - -**Build:** - -- Fix changelog generator [\#1127](https://github.com/jrnl-org/jrnl/pull/1127) ([wren](https://github.com/wren)) - ## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.6) @@ -546,6 +532,3 @@ ## v0.0 (2012-03-29) * __0.0.1__ Composing entries works. That's pretty much it. - - -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 8b70497802e2e747c60886c1ca32026f1cc6f9cb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 26 Dec 2020 11:59:53 -0800 Subject: [PATCH 0281/1132] Create Dependabot config file (#1131) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..070f47f8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + reviewers: + - wren + - micahellison + labels: + - packaging From 3bce055c899890699402b0ae7afb999948482705 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Dec 2020 20:01:40 +0000 Subject: [PATCH 0282/1132] Update changelog [ci skip] --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43eb217b..717b42ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# Changelog + +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...HEAD) + +**Implemented enhancements:** + +- Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) + +**Build:** + +- Fix changelog generator [\#1127](https://github.com/jrnl-org/jrnl/pull/1127) ([wren](https://github.com/wren)) + +**Documentation:** + +- Fix failing contrast test in accessibility tools on docs site [\#1126](https://github.com/jrnl-org/jrnl/pull/1126) ([wren](https://github.com/wren)) + ## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.6) From f8513d3859b48b950f9146f42cb2f7e5cee8ff84 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Dec 2020 13:08:39 -0800 Subject: [PATCH 0283/1132] Add packaging label to changelog generator config (#1132) We added dependabot and told it to use a new packaging label. This change gives that label its own separate section in the changelog. --- .github/workflows/changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 5d18ca9d..23177052 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -98,7 +98,7 @@ jobs: repo: jrnl-org/jrnl token: ${{ secrets.JRNL_BOT_TOKEN }} base: CHANGELOG.md - addSections: '{"build":{"prefix":"**Build:**","labels":["build"]},"docs":{"prefix":"**Documentation:**","labels":["documentation"]}}' + addSections: '{"build":{"prefix":"**Build:**","labels":["build"]},"docs":{"prefix":"**Documentation:**","labels":["documentation"]},"packaging":{"prefix":"**Packaging:**","labels":["packaging"]}}' issues: true pullRequests: true issuesWoLabels: false From d111b04c14d8ee8a0e68efc7ca4e1a045f5dd248 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Dec 2020 21:10:29 +0000 Subject: [PATCH 0284/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 717b42ee..c8ec3d92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ **Documentation:** +- Add packaging label to changelog generator config [\#1132](https://github.com/jrnl-org/jrnl/pull/1132) ([wren](https://github.com/wren)) - Fix failing contrast test in accessibility tools on docs site [\#1126](https://github.com/jrnl-org/jrnl/pull/1126) ([wren](https://github.com/wren)) ## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) @@ -550,3 +551,6 @@ ## v0.0 (2012-03-29) * __0.0.1__ Composing entries works. That's pretty much it. + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 7930d9750a4de3e715be512b0e006ff16db05b01 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Dec 2020 15:23:01 -0800 Subject: [PATCH 0285/1132] Fix search on docs site (#1133) --- docs_theme/main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_theme/main.html b/docs_theme/main.html index 4291adce..7d18ba8d 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block search_button %} - From 4d58bac123b98e235fd9006d580cd2179f16c02b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Dec 2020 23:24:54 +0000 Subject: [PATCH 0286/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ec3d92..dc43f372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ **Documentation:** +- Fix search on docs site [\#1133](https://github.com/jrnl-org/jrnl/pull/1133) ([wren](https://github.com/wren)) - Add packaging label to changelog generator config [\#1132](https://github.com/jrnl-org/jrnl/pull/1132) ([wren](https://github.com/wren)) - Fix failing contrast test in accessibility tools on docs site [\#1126](https://github.com/jrnl-org/jrnl/pull/1126) ([wren](https://github.com/wren)) From 31ada29a37c0f00ec840f9199308f5449fd87f3b Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Mon, 28 Dec 2020 09:55:15 -0800 Subject: [PATCH 0287/1132] fix doc site css --- docs_theme/assets/index.css | 6 +++--- docs_theme/assets/theme.css | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs_theme/assets/index.css b/docs_theme/assets/index.css index 472de17e..a7ed63ee 100644 --- a/docs_theme/assets/index.css +++ b/docs_theme/assets/index.css @@ -66,7 +66,7 @@ h3 { } header { - background-color: --mid-purple; + background-color: var(--mid-purple); background-image: linear-gradient(211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); color: var(--white); border: 0px solid transparent; @@ -203,7 +203,7 @@ nav a:visited:hover { nav a.cta { display: inline-block; color: var(--white); - background-color: --mid-purple; + background-color: var(--mid-purple); background-image: linear-gradient(259deg, var(--mid-purple) 0%, var(--dark-purple) 100%); box-shadow: 0 2px 8px 0 var(--blacker-shadow); border-radius: 50px; @@ -215,7 +215,7 @@ nav a.cta { nav a.cta:hover { text-decoration: none; - background-color: --mid-purple; + background-color: var(--mid-purple); background-image: linear-gradient(259deg, var(--bright-purple) 0%, var(--dark-purple) 100%); box-shadow: 0 4px 16px 0 var(--black-shadow); color: var(--off-white); diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index 29b32c68..a98c49bc 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -76,7 +76,7 @@ div.rst-content { } .wy-nav-top { - background-color: --mid-purple; + background-color: var(--mid-purple); background-image: linear-gradient(-211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); } @@ -173,7 +173,7 @@ a.icon-home:before { .wy-nav-side { - background-color: --mid-purple; + background-color: var(--mid-purple); background-image: linear-gradient(211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); font-weight: 300; height: 100%; From d4ca29ed2c9f0ec9a803013fd915ae705dfe38af Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 2 Jan 2021 12:24:21 -0800 Subject: [PATCH 0288/1132] Fix broken search bar in docs site (#1135) * Fixes for search on docs site We previously didn't include the search results page in our CI testing, so we missed some issues on that page. This ensures that page is part of regular testing, and also includes fixes for the issues present. * fix sidebar contrast --- .github/workflows/docs.yaml | 2 +- docs_theme/assets/colors.css | 1 + docs_theme/assets/theme.css | 56 ++++++++++++++++++++++++++++++------ docs_theme/main.html | 16 +++++++---- docs_theme/search.html | 29 +++++++++++++++++++ 5 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 docs_theme/search.html diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6208ad5e..3b8cfa96 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -61,7 +61,7 @@ jobs: env: site_url: http://127.0.0.1:8000 run: | - select="{urls: [\"${site_url}/\", .urlset.url[].loc]}" + select="{urls: [\"${site_url}/\", \"${site_url}/search.html?q=jrnl\", .urlset.url[].loc]}" curl -s "$site_url/sitemap.xml" | poetry run xq "$select" > list.json - name: Accessibility testing (Pa11y) diff --git a/docs_theme/assets/colors.css b/docs_theme/assets/colors.css index 1a518461..93d84b4d 100644 --- a/docs_theme/assets/colors.css +++ b/docs_theme/assets/colors.css @@ -15,6 +15,7 @@ --yellow: #e2b93d; /* For light bg */ + --black: #404040; --teal: #2a8068; --dark-blue: #356eb7; --mid-purple: #846392; diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index a98c49bc..491a0baa 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -8,6 +8,7 @@ body.wy-body-for-nav, section.wy-nav-content-wrap { background-color: var(--white); + color: var(--black); } .rst-content pre { @@ -102,7 +103,7 @@ a.icon-home:before { .wy-menu-vertical a, .wy-menu-vertical li ul li a { font-size: 16px; - color: var(--off-white); + color: var(--white); line-height: 2em; } @@ -167,7 +168,7 @@ a.icon-home:before { } .wy-menu-vertical li a { - color: var(--off-white) !important; + color: var(--white) !important; font-weight: 300; } @@ -185,18 +186,20 @@ footer { } .wy-side-nav-search input[type=text], +.mkdocs-search input[type=text], form .search-query { - background-color: var(--black-shadow) !important; + background-color: var(--off-white); border: none; - box-shadow: none; margin-bottom: 1em; - color: var(--white); + color: var(--black); font-weight: 500; + box-shadow: none; } .wy-side-nav-search input[type=text]::placeholder, +.mkdocs-search input[type=text]::placeholder, form .search-query::placeholder { - color: var(--off-white); + color: var(--dark-purple); } .wy-side-nav-search > a:hover { @@ -298,19 +301,54 @@ ol>li:before { margin-top: 20px; } -.wy-side-nav-search input[type="text"] { +.wy-side-nav-search input[type="text"], +.mkdocs-search input[type=text] { border-radius: 50px 0 0 50px; height: 32px; border-right: none; + margin: 0; } .mkdocs-search button { - background-color: var(--black-shadow); + background-color: var(--off-white); border: none; box-shadow: none; - color: var(--white); + color: var(--mid-purple); border-radius: 0 50px 50px 0; height: 32px; width: 2.5em; overflow: hidden; } + +.mkdocs-search { + border-radius: 50px; +} + +.mkdocs-search:focus-within { + box-shadow: 0 2px 25px 0 var(--blacker-shadow); + transition: all .5s ease; +} + +.rst-content div[role="main"] .mkdocs-search input[type="text"] { + border-right: none; + font-size: 100%; + height: 48px; + margin: 0; +} + +.rst-content div[role="main"] .mkdocs-search button { + border-left: none; + font-size: 100%; + height: 48px; +} + +.rst-content div[role="main"] .mkdocs-search button:before { + font-size: 140%; + position: relative; + left: -7px; + top: -1px; +} + +.search-results { + margin-top: 0; +} diff --git a/docs_theme/main.html b/docs_theme/main.html index 7d18ba8d..18a4f1cf 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -1,8 +1,12 @@ {% extends "base.html" %} -{% block search_button %} - -{% endblock %} +{%- block search_button %} + {% if 'search' in config['plugins'] %} +
+ +
+ {% endif %} +{%- endblock %} diff --git a/docs_theme/search.html b/docs_theme/search.html new file mode 100644 index 00000000..b191fc2a --- /dev/null +++ b/docs_theme/search.html @@ -0,0 +1,29 @@ +{% extends "main.html" %} + +{% block content %} + +
+ +
+ +

Results

+ +
+ Searching... +
+ +{% endblock %} From ada73939791bded7a67b331e70d6dd61f672d8eb Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 2 Jan 2021 20:27:26 +0000 Subject: [PATCH 0289/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc43f372..0b0143b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ **Documentation:** +- Fix broken search bar in docs site [\#1135](https://github.com/jrnl-org/jrnl/pull/1135) ([wren](https://github.com/wren)) - Fix search on docs site [\#1133](https://github.com/jrnl-org/jrnl/pull/1133) ([wren](https://github.com/wren)) - Add packaging label to changelog generator config [\#1132](https://github.com/jrnl-org/jrnl/pull/1132) ([wren](https://github.com/wren)) - Fix failing contrast test in accessibility tools on docs site [\#1126](https://github.com/jrnl-org/jrnl/pull/1126) ([wren](https://github.com/wren)) From c47c1e209e544dd4d41b82d8a2217fd8b4ea3f40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Jan 2021 12:28:03 -0800 Subject: [PATCH 0290/1132] Bump keyring from 21.7.0 to 21.8.0 (#1136) Bumps [keyring](https://github.com/jaraco/keyring) from 21.7.0 to 21.8.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v21.7.0...v21.8.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index cd5ac6d2..fc0f5895 100644 --- a/poetry.lock +++ b/poetry.lock @@ -212,7 +212,7 @@ python-versions = ">=3.6" [[package]] name = "keyring" -version = "21.7.0" +version = "21.8.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -225,7 +225,7 @@ pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] @@ -735,8 +735,8 @@ joblib = [ {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, ] keyring = [ - {file = "keyring-21.7.0-py3-none-any.whl", hash = "sha256:4c41ce4f6d1ee91d589a346699ef5a94ba3429603ac8f700cc0097644cdd6748"}, - {file = "keyring-21.7.0.tar.gz", hash = "sha256:a144f7e1044c897c3976202af868cb0ac860f4d433d5d0f8e750fa1a2f0f0b50"}, + {file = "keyring-21.8.0-py3-none-any.whl", hash = "sha256:4be9cbaaaf83e61d6399f733d113ede7d1c73bc75cb6aeb64eee0f6ac39b30ea"}, + {file = "keyring-21.8.0.tar.gz", hash = "sha256:1746d3ac913d449a090caf11e9e4af00e26c3f7f7e81027872192b2398b98675"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, From e9fd5cdc0eef8d881c401825bfe04ce071220555 Mon Sep 17 00:00:00 2001 From: Karim Rahal Date: Sat, 2 Jan 2021 23:23:15 +0200 Subject: [PATCH 0291/1132] Allow custom extensions when editing (for easier syntax highlighting) (#1139) * Create tests and steps for temporary filename suffix * Have temporary filename suffix be -{template_filename} or .jrnl * Finalize extension_editor_file * Make suffix local variable in get_text_from_editor --- .../configs/editor_markdown_extension.yaml | 18 ++++++++++++++++++ features/data/templates/extension.md | 0 features/file_storage.feature | 10 ++++++++++ features/steps/core.py | 8 ++++++++ jrnl/editor.py | 7 ++++++- 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 features/data/configs/editor_markdown_extension.yaml create mode 100644 features/data/templates/extension.md diff --git a/features/data/configs/editor_markdown_extension.yaml b/features/data/configs/editor_markdown_extension.yaml new file mode 100644 index 00000000..bf3b8d8e --- /dev/null +++ b/features/data/configs/editor_markdown_extension.yaml @@ -0,0 +1,18 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +editor: "vim" +journals: + default: features/journals/editor_markdown_extension.journal +linewrap: 80 +tagsymbols: "@" +template: features/templates/extension.md +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/features/data/templates/extension.md b/features/data/templates/extension.md new file mode 100644 index 00000000..e69de29b diff --git a/features/file_storage.feature b/features/file_storage.feature index 0e2c0b3c..33619365 100644 --- a/features/file_storage.feature +++ b/features/file_storage.feature @@ -44,3 +44,13 @@ Feature: Journals iteracting with the file system in a way that users can see And we change directory to "features" And we run "jrnl -n 1" Then the output should contain "hello world" + + Scenario: the temporary filename suffix should default to ".jrnl" + Given we use the config "editor.yaml" + When we run "jrnl --edit" + Then the temporary filename suffix should be ".jrnl" + + Scenario: the temporary filename suffix should be "-{template_filename}" + Given we use the config "editor_markdown_extension.yaml" + When we run "jrnl --edit" + Then the temporary filename suffix should be "-extension.md" diff --git a/features/steps/core.py b/features/steps/core.py index d579b6d2..af22c0cd 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -248,6 +248,14 @@ def contains_editor_file(context, method, text=""): assert False, f"Method '{method}' not supported" +@then('the temporary filename suffix should be "{suffix}"') +def extension_editor_file(context, suffix): + filename = Path(context.editor_file["name"]).name + delimiter = "-" if "-" in filename else "." + filename_suffix = delimiter + filename.split(delimiter)[-1] + assert filename_suffix == suffix + + def _mock_getpass(inputs): def prompt_return(prompt=""): if type(inputs) == str: diff --git a/jrnl/editor.py b/jrnl/editor.py index 3397cdac..1a68028d 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -5,6 +5,7 @@ import subprocess import sys import tempfile import textwrap +from pathlib import Path from .color import ERROR_COLOR from .color import RESET_COLOR @@ -12,7 +13,11 @@ from .os_compat import on_windows def get_text_from_editor(config, template=""): - filehandle, tmpfile = tempfile.mkstemp(prefix="jrnl", text=True, suffix=".txt") + suffix = ".jrnl" + if config["template"]: + template_filename = Path(config["template"]).name + suffix = "-" + template_filename + filehandle, tmpfile = tempfile.mkstemp(prefix="jrnl", text=True, suffix=suffix) os.close(filehandle) with open(tmpfile, "w", encoding="utf-8") as f: From 9f1bef7fdef3b9198a88ebe6cb46ec72f27d9eb6 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 2 Jan 2021 21:24:55 +0000 Subject: [PATCH 0292/1132] Update changelog [ci skip] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0143b4..84e79207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ **Implemented enhancements:** - Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) +- Change temporary file names for better text editor integration [\#1080](https://github.com/jrnl-org/jrnl/issues/1080) +- Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) +- Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) **Build:** From 57de4f9ba44eb4be9ca31814bab4e4772d136a3c Mon Sep 17 00:00:00 2001 From: Karim Rahal Date: Sat, 2 Jan 2021 23:26:45 +0200 Subject: [PATCH 0293/1132] Fix keyring error handling (#1138) * Capture KeyringLocked exception and allow manual password entry * Create LockedKeyring for steps * Support types in set_keyring step * Clarify LockedKeyring docs * Deal with locked exceptions elsewhere too * Create behave tests for locked keyring * Fix linting * Fix keyring step to allow no type * Handle all keyring retrieval errors * Better keyring error handling * Remove locked keyring for steps; generalize failed keyring * Finalize tests for keyring handling * Update set_keyring step * Make password of failed keyring encryption test more semantic --- features/password.feature | 39 ++++++++++++++++++++++++++++++++++----- features/steps/core.py | 18 ++++++++++-------- jrnl/EncryptedJournal.py | 19 ++++++++++++------- 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/features/password.feature b/features/password.feature index 86fa7f6b..332ba86e 100644 --- a/features/password.feature +++ b/features/password.feature @@ -24,6 +24,7 @@ Feature: Using the installed keyring n """ Then we should get no error + And we should not see the message "Failed to retrieve keyring" Scenario: Encrypt journal with no keyring backend and do store in keyring Given we use the config "simple.yaml" @@ -36,25 +37,53 @@ Feature: Using the installed keyring y """ Then we should get no error + And we should not see the message "Failed to retrieve keyring" # @todo add step to check contents of keyring @todo Scenario: Open an encrypted journal with wrong password in keyring # This should ask the user for the password after the keyring fails - @todo - Scenario: Open encrypted journal when keyring exists but fails - # This should ask the user for the password after the keyring fails - @todo Scenario: Decrypt journal with password in keyring @todo Scenario: Decrypt journal without a keyring - @todo + Scenario: Encrypt journal when keyring exists but fails + Given we use the config "simple.yaml" + And we have a failed keyring + When we run "jrnl --encrypt" and enter + """ + this password will not be saved in keyring + this password will not be saved in keyring + y + """ + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And the config for journal "default" should have "encrypt" set to "bool:True" + Scenario: Decrypt journal when keyring exists but fails + Given we use the config "encrypted.yaml" + And we have a failed keyring + When we run "jrnl --decrypt" and enter "bad doggie no biscuit" + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And we should see the message "Journal decrypted" + And the config for journal "default" should have "encrypt" set to "bool:False" + And the journal should have 2 entries + + Scenario: Open encrypted journal when keyring exists but fails # This should ask the user for the password after the keyring fails + Given we use the config "encrypted.yaml" + And we have a failed keyring + When we run "jrnl -n 1" and enter "bad doggie no biscuit" + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And the output should contain "2013-06-10 15:40 Life is good" Scenario: Mistyping your password Given we use the config "simple.yaml" diff --git a/features/steps/core.py b/features/steps/core.py index af22c0cd..2f72a473 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -69,21 +69,19 @@ class NoKeyring(keyring.backend.KeyringBackend): class FailedKeyring(keyring.backend.KeyringBackend): """ - A keyring that simulates an environment with a keyring that has passwords, but fails - to return them. + A keyring that cannot be retrieved. """ priority = 2 - keys = defaultdict(dict) def set_password(self, servicename, username, password): - self.keys[servicename][username] = password + raise keyring.errors.KeyringError def get_password(self, servicename, username): - raise keyring.errors.NoKeyringError + raise keyring.errors.KeyringError def delete_password(self, servicename, username): - self.keys[servicename][username] = None + raise keyring.errors.KeyringError # set a default keyring @@ -148,8 +146,12 @@ def use_password(context, password, num=1): @given("we have a keyring") -def set_keyring(context): - keyring.set_keyring(TestKeyring()) +@given("we have a {type} keyring") +def set_keyring(context, type=""): + if type == "failed": + keyring.set_keyring(FailedKeyring()) + else: + keyring.set_keyring(TestKeyring()) @given("we do not have a keyring") diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index e1d248aa..7354e7a2 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -176,7 +176,9 @@ def get_keychain(journal_name): try: return keyring.get_password("jrnl", journal_name) - except RuntimeError: + except keyring.errors.KeyringError as e: + if not isinstance(e, keyring.errors.NoKeyringError): + print("Failed to retrieve keyring", file=sys.stderr) return "" @@ -186,13 +188,16 @@ def set_keychain(journal_name, password): if password is None: try: keyring.delete_password("jrnl", journal_name) - except keyring.errors.PasswordDeleteError: + except keyring.errors.KeyringError: pass else: try: keyring.set_password("jrnl", journal_name, password) - except keyring.errors.NoKeyringError: - print( - "Keyring backend not found. Please install one of the supported backends by visiting: https://pypi.org/project/keyring/", - file=sys.stderr, - ) + except keyring.errors.KeyringError as e: + if isinstance(e, keyring.errors.NoKeyringError): + print( + "Keyring backend not found. Please install one of the supported backends by visiting: https://pypi.org/project/keyring/", + file=sys.stderr, + ) + else: + print("Failed to retrieve keyring", file=sys.stderr) From bddec64faa5584a69f2f498439cb2cb592d27067 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 2 Jan 2021 21:28:22 +0000 Subject: [PATCH 0294/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e79207..dd2e3f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ - Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) - Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) +**Fixed bugs:** + +- Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) +- Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) + **Build:** - Fix changelog generator [\#1127](https://github.com/jrnl-org/jrnl/pull/1127) ([wren](https://github.com/wren)) From f0414025339eb6cd5e882c7881dd2e12c88b466f Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 2 Jan 2021 14:53:54 -0800 Subject: [PATCH 0295/1132] Add packaging label to included sections in changelog (#1140) --- .github/workflows/changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 23177052..dc52daed 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -104,7 +104,7 @@ jobs: issuesWoLabels: false unreleased: true compareLink: true - includeLabels: bug,enhancement,documentation,build,deprecated + includeLabels: bug,enhancement,documentation,build,packaging,deprecated excludeLabels: stale,wontfix excludeTagsRegex: ${{ env.TAG_REGEX }} sinceTag: ${{ env.SINCE_TAG }} From e0c53c28bbd2cbefe0a1ecfec3e8319b6bfab1a1 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 2 Jan 2021 22:55:45 +0000 Subject: [PATCH 0296/1132] Update changelog [ci skip] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd2e3f38..a75baaf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,13 @@ - Add packaging label to changelog generator config [\#1132](https://github.com/jrnl-org/jrnl/pull/1132) ([wren](https://github.com/wren)) - Fix failing contrast test in accessibility tools on docs site [\#1126](https://github.com/jrnl-org/jrnl/pull/1126) ([wren](https://github.com/wren)) +**Packaging:** + +- Bump keyring from 21.7.0 to 21.8.0 [\#1136](https://github.com/jrnl-org/jrnl/pull/1136) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytz from 2020.4 to 2020.5 [\#1130](https://github.com/jrnl-org/jrnl/pull/1130) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) +- Bump pytest from 6.2.0 to 6.2.1 [\#1129](https://github.com/jrnl-org/jrnl/pull/1129) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) +- Bump keyring from 21.5.0 to 21.7.0 [\#1128](https://github.com/jrnl-org/jrnl/pull/1128) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) + ## [v2.6](https://pypi.org/project/jrnl/v2.6/) (2020-12-20) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.5...v2.6) From c155bafa848445531ac01f60422e95c59111dd16 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 2 Jan 2021 15:19:44 -0800 Subject: [PATCH 0297/1132] Notify user when config directory can't be created because there is already a file with the same name (#1134) * Moving configuration values and methods from install.py to config.py -- everything is broken right now * Using context to store config path - still lots broken * Use mocks and context.config_path to store test configs - many tests still broken though * Update changelog [ci skip] * Fix jrnl --ls crash * Fix crash when no editor configured * Attempt to patch config path with test data - doesn't appear to be working * Properly use patched config path and add config given to scenario that wasn't using it * Fix copypasta * Fix editor test that needed patched config and trapping for system exit * Add exception and handling for when configuration directory is actually a file * Remove extraneous comment * Use more generic JrnlError with messaging switchboard * Format code a bit nicer * Remove unnecessary given in diagnostic test * Ensure full error message is output * Remove unnecessary whitespace characters --- features/steps/core.py | 77 +++++++++++++++++++++++------------------ jrnl/cli.py | 5 +++ jrnl/config.py | 70 ++++++++++++++++++++++++++++++++++--- jrnl/exception.py | 26 ++++++++++++++ jrnl/install.py | 69 ++++++++---------------------------- jrnl/jrnl.py | 3 +- jrnl/output.py | 10 +++--- tests/test_exception.py | 19 ++++++++++ 8 files changed, 182 insertions(+), 97 deletions(-) create mode 100644 tests/test_exception.py diff --git a/features/steps/core.py b/features/steps/core.py index 2f72a473..e3af8243 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -19,7 +19,6 @@ import yaml from jrnl import Journal from jrnl import __version__ -from jrnl import install from jrnl import plugins from jrnl.cli import cli from jrnl.config import load_config @@ -92,25 +91,25 @@ def ushlex(command): return shlex.split(command, posix=not on_windows) -def read_journal(journal_name="default"): - config = load_config(install.CONFIG_FILE_PATH) - with open(config["journals"][journal_name]) as journal_file: +def read_journal(context, journal_name="default"): + configuration = load_config(context.config_path) + with open(configuration["journals"][journal_name]) as journal_file: journal = journal_file.read() return journal -def open_journal(journal_name="default"): - config = load_config(install.CONFIG_FILE_PATH) - journal_conf = config["journals"][journal_name] +def open_journal(context, journal_name="default"): + configuration = load_config(context.config_path) + journal_conf = configuration["journals"][journal_name] # We can override the default config on a by-journal basis if type(journal_conf) is dict: - config.update(journal_conf) + configuration.update(journal_conf) # But also just give them a string to point to the journal file else: - config["journal"] = journal_conf + configuration["journal"] = journal_conf - return Journal.open_journal(journal_name, config) + return Journal.open_journal(journal_name, configuration) def read_value_from_string(string): @@ -128,10 +127,11 @@ def read_value_from_string(string): def set_config(context, config_file): full_path = os.path.join("features/configs", config_file) - install.CONFIG_FILE_PATH = os.path.abspath(full_path) + context.config_path = os.path.abspath(full_path) + if config_file.endswith("yaml") and os.path.exists(full_path): # Add jrnl version to file for 2.x journals - with open(install.CONFIG_FILE_PATH, "a") as cf: + with open(context.config_path, "a") as cf: cf.write("version: {}".format(__version__)) @@ -196,11 +196,18 @@ def open_editor_and_enter(context, method, text=""): with \ patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ - patch("sys.stdin.isatty", return_value=True) \ + patch("sys.stdin.isatty", return_value=True), \ + patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ + patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ : context.editor = mock_editor context.getpass = mock_getpass - cli(["--edit"]) + try: + cli(["--edit"]) + context.exit_status = 0 + except SystemExit as e: + context.exit_status = e.code + # fmt: on @@ -314,7 +321,9 @@ def run_with_input(context, command, inputs=""): patch("builtins.input", side_effect=_mock_input(text)) as mock_input, \ patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ patch("sys.stdin.read", side_effect=text) as mock_read, \ - patch("subprocess.call", side_effect=_mock_editor) as mock_editor \ + patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ + patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ + patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ : try: cli(args or []) @@ -396,7 +405,9 @@ def run(context, command, text=""): patch("sys.argv", args), \ patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ - patch("sys.stdin.read", side_effect=lambda: text) \ + patch("sys.stdin.read", side_effect=lambda: text), \ + patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ + patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ : context.editor = mock_editor context.getpass = mock_getpass @@ -544,32 +555,32 @@ def check_not_message(context, text): @then('the journal should contain "{text}"') @then('journal "{journal_name}" should contain "{text}"') def check_journal_content(context, text, journal_name="default"): - journal = read_journal(journal_name) + journal = read_journal(context, journal_name) assert text in journal, journal @then('the journal should not contain "{text}"') @then('journal "{journal_name}" should not contain "{text}"') def check_not_journal_content(context, text, journal_name="default"): - journal = read_journal(journal_name) + journal = read_journal(context, journal_name) assert text not in journal, journal @then("the journal should not exist") @then('journal "{journal_name}" should not exist') def journal_doesnt_exist(context, journal_name="default"): - config = load_config(install.CONFIG_FILE_PATH) + configuration = load_config(context.config_path) - journal_path = config["journals"][journal_name] + journal_path = configuration["journals"][journal_name] assert not os.path.exists(journal_path) @then("the journal should exist") @then('journal "{journal_name}" should exist') def journal_exists(context, journal_name="default"): - config = load_config(install.CONFIG_FILE_PATH) + configuration = load_config(context.config_path) - journal_path = config["journals"][journal_name] + journal_path = configuration["journals"][journal_name] assert os.path.exists(journal_path) @@ -578,23 +589,23 @@ def journal_exists(context, journal_name="default"): @then('the config for journal "{journal}" should have "{key}" set to "{value}"') def config_var(context, key, value="", journal=None): value = read_value_from_string(value or context.text or "") - config = load_config(install.CONFIG_FILE_PATH) + configuration = load_config(context.config_path) if journal: - config = config["journals"][journal] + configuration = configuration["journals"][journal] - assert key in config - assert config[key] == value + assert key in configuration + assert configuration[key] == value @then('the config for journal "{journal}" should not have "{key}" set') def config_no_var(context, key, value="", journal=None): - config = load_config(install.CONFIG_FILE_PATH) + configuration = load_config(context.config_path) if journal: - config = config["journals"][journal] + configuration = configuration["journals"][journal] - assert key not in config + assert key not in configuration @then("the journal should have {number:d} entries") @@ -602,15 +613,15 @@ def config_no_var(context, key, value="", journal=None): @then('journal "{journal_name}" should have {number:d} entries') @then('journal "{journal_name}" should have {number:d} entry') def check_journal_entries(context, number, journal_name="default"): - journal = open_journal(journal_name) + journal = open_journal(context, journal_name) assert len(journal.entries) == number @when("the journal directory is listed") def list_journal_directory(context, journal="default"): - with open(install.CONFIG_FILE_PATH) as config_file: - config = yaml.load(config_file, Loader=yaml.FullLoader) - journal_path = config["journals"][journal] + with open(context.config_path) as config_file: + configuration = yaml.load(config_file, Loader=yaml.FullLoader) + journal_path = configuration["journals"][journal] for root, dirnames, f in os.walk(journal_path): for file in f: print(os.path.join(root, file)) diff --git a/jrnl/cli.py b/jrnl/cli.py index e010f38e..93a7e899 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -7,6 +7,7 @@ import sys from .jrnl import run from .args import parse_args +from .exception import JrnlError def configure_logger(debug=False): @@ -33,5 +34,9 @@ def cli(manual_args=None): return run(args) + except JrnlError as e: + print(e.message, file=sys.stderr) + return 1 + except KeyboardInterrupt: return 1 diff --git a/jrnl/config.py b/jrnl/config.py index da772927..9e57de3d 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -1,13 +1,77 @@ import logging +import os import sys import colorama import yaml +import xdg.BaseDirectory +from . import __version__ +from .exception import JrnlError from .color import ERROR_COLOR from .color import RESET_COLOR from .output import list_journals +# Constants +DEFAULT_CONFIG_NAME = "jrnl.yaml" +XDG_RESOURCE = "jrnl" + +DEFAULT_JOURNAL_NAME = "journal.txt" +DEFAULT_JOURNAL_KEY = "default" + + +def save_config(config): + config["version"] = __version__ + with open(get_config_path(), "w") as f: + yaml.safe_dump( + config, f, encoding="utf-8", allow_unicode=True, default_flow_style=False + ) + + +def get_config_path(): + try: + config_directory_path = xdg.BaseDirectory.save_config_path(XDG_RESOURCE) + except FileExistsError: + raise JrnlError( + "ConfigDirectoryIsFile", + config_directory_path=os.path.join( + xdg.BaseDirectory.xdg_config_home, XDG_RESOURCE + ), + ) + return os.path.join( + config_directory_path or os.path.expanduser("~"), DEFAULT_CONFIG_NAME + ) + + +def get_default_config(): + return { + "version": __version__, + "journals": {"default": get_default_journal_path()}, + "editor": os.getenv("VISUAL") or os.getenv("EDITOR") or "", + "encrypt": False, + "template": False, + "default_hour": 9, + "default_minute": 0, + "timeformat": "%Y-%m-%d %H:%M", + "tagsymbols": "@", + "highlight": True, + "linewrap": 79, + "indent_character": "|", + "colors": { + "date": "none", + "title": "none", + "body": "none", + "tags": "none", + }, + } + + +def get_default_journal_path(): + journal_data_path = xdg.BaseDirectory.save_data_path( + XDG_RESOURCE + ) or os.path.expanduser("~") + return os.path.join(journal_data_path, DEFAULT_JOURNAL_NAME) + def scope_config(config, journal_name): if journal_name not in config["journals"]: @@ -73,13 +137,11 @@ def update_config(config, new_config, scope, force_local=False): def get_journal_name(args, config): - from . import install - - args.journal_name = install.DEFAULT_JOURNAL_KEY + args.journal_name = DEFAULT_JOURNAL_KEY if args.text and args.text[0] in config["journals"]: args.journal_name = args.text[0] args.text = args.text[1:] - elif install.DEFAULT_JOURNAL_KEY not in config["journals"]: + elif DEFAULT_JOURNAL_KEY not in config["journals"]: print("No default journal configured.", file=sys.stderr) print(list_journals(config), file=sys.stderr) sys.exit(1) diff --git a/jrnl/exception.py b/jrnl/exception.py index f1a509f5..82a562a0 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -1,5 +1,6 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import textwrap class UserAbort(Exception): @@ -10,3 +11,28 @@ class UpgradeValidationException(Exception): """Raised when the contents of an upgraded journal do not match the old journal""" pass + + +class JrnlError(Exception): + """Common exceptions raised by jrnl. """ + + def __init__(self, error_type, **kwargs): + self.error_type = error_type + self.message = self._get_error_message(**kwargs) + + def _get_error_message(self, **kwargs): + error_messages = { + "ConfigDirectoryIsFile": textwrap.dedent( + """ + The path to your jrnl configuration directory is a file, not a directory: + + {config_directory_path} + + Removing this file will allow jrnl to save its configuration. + """ + ) + } + + return error_messages[self.error_type].format(**kwargs) + + pass diff --git a/jrnl/install.py b/jrnl/install.py index a5023815..db4c0fba 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -8,86 +8,45 @@ import logging import os import sys -import xdg.BaseDirectory -import yaml - -from . import __version__ +from .config import DEFAULT_JOURNAL_KEY +from .config import get_config_path +from .config import get_default_config +from .config import get_default_journal_path from .config import load_config +from .config import save_config from .config import verify_config_colors from .exception import UserAbort from .prompt import yesno from .upgrade import is_old_version -DEFAULT_CONFIG_NAME = "jrnl.yaml" -DEFAULT_JOURNAL_NAME = "journal.txt" -DEFAULT_JOURNAL_KEY = "default" -XDG_RESOURCE = "jrnl" - -USER_HOME = os.path.expanduser("~") - -CONFIG_PATH = xdg.BaseDirectory.save_config_path(XDG_RESOURCE) or USER_HOME -CONFIG_FILE_PATH = os.path.join(CONFIG_PATH, DEFAULT_CONFIG_NAME) -CONFIG_FILE_PATH_FALLBACK = os.path.join(USER_HOME, ".jrnl_config") - -JOURNAL_PATH = xdg.BaseDirectory.save_data_path(XDG_RESOURCE) or USER_HOME -JOURNAL_FILE_PATH = os.path.join(JOURNAL_PATH, DEFAULT_JOURNAL_NAME) - - -default_config = { - "version": __version__, - "journals": {"default": JOURNAL_FILE_PATH}, - "editor": os.getenv("VISUAL") or os.getenv("EDITOR") or "", - "encrypt": False, - "template": False, - "default_hour": 9, - "default_minute": 0, - "timeformat": "%Y-%m-%d %H:%M", - "tagsymbols": "@", - "highlight": True, - "linewrap": 79, - "indent_character": "|", - "colors": { - "date": "none", - "title": "none", - "body": "none", - "tags": "none", - }, -} - def upgrade_config(config): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. This essentially automatically ports jrnl installations if new config parameters are introduced in later versions.""" + default_config = get_default_config() missing_keys = set(default_config).difference(config) if missing_keys: for key in missing_keys: config[key] = default_config[key] save_config(config) print( - f"[Configuration updated to newest version at {CONFIG_FILE_PATH}]", + f"[Configuration updated to newest version at {get_config_path()}]", file=sys.stderr, ) -def save_config(config): - config["version"] = __version__ - with open(CONFIG_FILE_PATH, "w") as f: - yaml.safe_dump( - config, f, encoding="utf-8", allow_unicode=True, default_flow_style=False - ) - - def load_or_install_jrnl(): """ If jrnl is already installed, loads and returns a config object. Else, perform various prompts to install jrnl. """ config_path = ( - CONFIG_FILE_PATH - if os.path.exists(CONFIG_FILE_PATH) - else CONFIG_FILE_PATH_FALLBACK + get_config_path() + if os.path.exists(get_config_path()) + else os.path.join(os.path.expanduser("~"), ".jrnl_config") ) + if os.path.exists(config_path): logging.debug("Reading configuration from file %s", config_path) config = load_config(config_path) @@ -128,8 +87,10 @@ def install(): _initialize_autocomplete() # Where to create the journal? - path_query = f"Path to your journal file (leave blank for {JOURNAL_FILE_PATH}): " - journal_path = os.path.abspath(input(path_query).strip() or JOURNAL_FILE_PATH) + default_journal_path = get_default_journal_path() + path_query = f"Path to your journal file (leave blank for {default_journal_path}): " + journal_path = os.path.abspath(input(path_query).strip() or default_journal_path) + default_config = get_default_config() default_config["journals"][DEFAULT_JOURNAL_KEY] = os.path.expanduser( os.path.expandvars(journal_path) ) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index ad5b07d0..415200fa 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -11,6 +11,7 @@ from .color import ERROR_COLOR from .color import RESET_COLOR from .config import get_journal_name from .config import scope_config +from .config import get_config_path from .editor import get_text_from_editor from .editor import get_text_from_stdin from .exception import UserAbort @@ -228,7 +229,7 @@ def _edit_search_results(config, journal, old_entries, **kwargs): f""" [{ERROR_COLOR}ERROR{RESET_COLOR}: There is no editor configured.] - Please specify an editor in config file ({install.CONFIG_FILE_PATH}) + Please specify an editor in config file ({get_config_path()}) to use the --edit option. """, file=sys.stderr, diff --git a/jrnl/output.py b/jrnl/output.py index 43390346..60c5d5aa 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -23,13 +23,13 @@ def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs): callback(**kwargs) -def list_journals(config): - from . import install +def list_journals(configuration): + from . import config """List the journals specified in the configuration file""" - result = f"Journals defined in {install.CONFIG_FILE_PATH}\n" - ml = min(max(len(k) for k in config["journals"]), 20) - for journal, cfg in config["journals"].items(): + result = f"Journals defined in {config.get_config_path()}\n" + ml = min(max(len(k) for k in configuration["journals"]), 20) + for journal, cfg in configuration["journals"].items(): result += " * {:{}} -> {}\n".format( journal, ml, cfg["journal"] if isinstance(cfg, dict) else cfg ) diff --git a/tests/test_exception.py b/tests/test_exception.py new file mode 100644 index 00000000..85eb77e9 --- /dev/null +++ b/tests/test_exception.py @@ -0,0 +1,19 @@ +import textwrap + +from jrnl.exception import JrnlError + + +def test_config_directory_exception_message(): + ex = JrnlError( + "ConfigDirectoryIsFile", config_directory_path="/config/directory/path" + ) + + assert ex.message == textwrap.dedent( + """ + The path to your jrnl configuration directory is a file, not a directory: + + /config/directory/path + + Removing this file will allow jrnl to save its configuration. + """ + ) From 6980ed1906f46a3aab5d0ab06cb6a31445f88cfb Mon Sep 17 00:00:00 2001 From: Gustavo Matias <681278+gumatias@users.noreply.github.com> Date: Sat, 9 Jan 2021 11:07:03 -0800 Subject: [PATCH 0298/1132] Emphasize installing dependencies before testing (#1148) As a beginner in Python it wasn't clear that `poetry install` needed to be run before `make test` for instance. That threw a sort of obscure error until I figured it out what the solution was. This is extremely minor, but make sure installing dependencies is the very first instruction can reduce some friction when contributing. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bf19932..1f5e691a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,9 +85,9 @@ You can find an inventory of commands in the `makefile`. \*nix users can run the A typical development workflow includes: + * Installing dependencies: `poetry install` * Running tests: `make test` * Running the source in a virtual environment: - * `poetry install` * `poetry shell` * `jrnl` (with or without arguments as necessary) * Linting the code to standardize its style: `make lint` From 08a0c2d11ff9a0a0794d206ee785d7dfcfa74d96 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Jan 2021 19:08:44 +0000 Subject: [PATCH 0299/1132] Update changelog [ci skip] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a75baaf9..da3164cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ **Implemented enhancements:** - Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) +- Automate Arch deployment [\#1112](https://github.com/jrnl-org/jrnl/issues/1112) - Change temporary file names for better text editor integration [\#1080](https://github.com/jrnl-org/jrnl/issues/1080) - Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) - Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) @@ -15,6 +16,7 @@ - Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) - Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) +- Notify user when config directory can't be created because there is already a file with the same name [\#1134](https://github.com/jrnl-org/jrnl/pull/1134) ([micahellison](https://github.com/micahellison)) **Build:** @@ -22,6 +24,7 @@ **Documentation:** +- Emphasize installing dependencies before testing [\#1148](https://github.com/jrnl-org/jrnl/pull/1148) ([gumatias](https://github.com/gumatias)) - Fix broken search bar in docs site [\#1135](https://github.com/jrnl-org/jrnl/pull/1135) ([wren](https://github.com/wren)) - Fix search on docs site [\#1133](https://github.com/jrnl-org/jrnl/pull/1133) ([wren](https://github.com/wren)) - Add packaging label to changelog generator config [\#1132](https://github.com/jrnl-org/jrnl/pull/1132) ([wren](https://github.com/wren)) From dbd12fc50093fea97a7df25ac4c5124ab42b8841 Mon Sep 17 00:00:00 2001 From: Seopril <49238562+Seopril@users.noreply.github.com> Date: Sat, 9 Jan 2021 15:39:06 -0500 Subject: [PATCH 0300/1132] Clarify installation documentation (#1097) (#1137) * Clarify installation documentation (#1097) * Update installation docs --- docs/installation.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index ee70893a..a37e21fd 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -17,6 +17,14 @@ On other platforms, install `jrnl` using [Python](https://www.python.org/) 3.6+ pipx install jrnl ``` +!!! note + `pipx` should be installed through either `brew` or `pip`. Missing dependencies and other issues + may occur when installing `pipx` through `apt` or another package manager. Further installation + instructions can be found in [pipx's documentation](https://pipxproject.github.io/pipx/installation/). + +!!! tip + Do not use `sudo` while installing `jrnl`. This may lead to path issues. + The first time you run `jrnl` you will be asked where your journal file should be created and whether you wish to encrypt it. From 61f8406412e9e29aab197bd39b9b437509bb800c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Jan 2021 20:40:42 +0000 Subject: [PATCH 0301/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da3164cb..6b9323db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,9 @@ **Documentation:** +- Clarify installation docs [\#1097](https://github.com/jrnl-org/jrnl/issues/1097) - Emphasize installing dependencies before testing [\#1148](https://github.com/jrnl-org/jrnl/pull/1148) ([gumatias](https://github.com/gumatias)) +- Clarify installation documentation \(\#1097\) [\#1137](https://github.com/jrnl-org/jrnl/pull/1137) ([Seopril](https://github.com/Seopril)) - Fix broken search bar in docs site [\#1135](https://github.com/jrnl-org/jrnl/pull/1135) ([wren](https://github.com/wren)) - Fix search on docs site [\#1133](https://github.com/jrnl-org/jrnl/pull/1133) ([wren](https://github.com/wren)) - Add packaging label to changelog generator config [\#1132](https://github.com/jrnl-org/jrnl/pull/1132) ([wren](https://github.com/wren)) From 5c0a2d4c4e632466371620c98aa4fe127490d779 Mon Sep 17 00:00:00 2001 From: Seopril <49238562+Seopril@users.noreply.github.com> Date: Sat, 16 Jan 2021 17:44:55 -0500 Subject: [PATCH 0302/1132] Fix YAML export formatting(#1065) (#1150) * Fix YAML export syntax * Fix YAML body block indentation --- features/format.feature | 60 +++++++++++++++++++---------------- jrnl/plugins/yaml_exporter.py | 12 +++++-- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/features/format.feature b/features/format.feature index f5156301..610e3a1e 100644 --- a/features/format.feature +++ b/features/format.feature @@ -410,29 +410,31 @@ Feature: Custom formats """ And the content of file "2020-08-29_entry-the-first.md" in the cache should be """ + --- title: Entry the first. date: 2020-08-29 11:11 starred: False tags: tagone, ipsum, tagtwo + body: | + Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada + quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque + augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu + consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In + commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget + venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada - quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque - augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu - consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In - commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget - venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - - Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo - ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse - potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget - molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus - hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis - feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum - urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget - velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac - porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per - conubia nostra, per inceptos himenaeos. + Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo + ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse + potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget + molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus + hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis + feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum + urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget + velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac + porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per + conubia nostra, per inceptos himenaeos. + ... """ Examples: configs @@ -458,21 +460,23 @@ Feature: Custom formats """ And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in the cache should be """ + --- title: The third entry finally after weeks without writing. date: 2020-09-24 09:14 starred: False tags: tagone, tagthree + body: | + I'm so excited about emojis. 💯 🎶 💩 - I'm so excited about emojis. 💯 🎶 💩 - - Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. - Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla - eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis - dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. - Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis - vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. - Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at - ante eget fringilla. @tagthree and also @tagone + Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. + Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla + eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis + dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. + Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis + vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. + Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at + ante eget fringilla. @tagthree and also @tagone + ... """ Examples: configs diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index df3b0548..7716c6c1 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -75,6 +75,11 @@ class YAMLExporter(TextExporter): if previous_line not in ["\r", "\n", "\r\n", "\n\r"]: newbody = newbody + os.linesep + # set indentation for YAML body block + spacebody = "\t" + for line in newbody.splitlines(True): + spacebody = spacebody + "\t" + line + if warn_on_heading_level is True: print( "{}WARNING{}: Headings increased past H6 on export - {} {}".format( @@ -113,14 +118,15 @@ class YAMLExporter(TextExporter): # source directory is entry.journal.config['journal'] # output directory is...? - return "title: {title}\ndate: {date}\nstarred: {starred}\ntags: {tags}\n{dayone} {body} {space}".format( + return "{start}\ntitle: {title}\ndate: {date}\nstarred: {starred}\ntags: {tags}\n{dayone}body: |{body}{end}".format( + start="---", date=date_str, title=entry.title, starred=entry.starred, tags=", ".join([tag[1:] for tag in entry.tags]), dayone=dayone_attributes, - body=newbody, - space="", + body=spacebody, + end="...", ) @classmethod From a6b828e892539fc27271ecf94761bbb9f2a75192 Mon Sep 17 00:00:00 2001 From: Karim Rahal Date: Sun, 17 Jan 2021 00:50:47 +0200 Subject: [PATCH 0303/1132] Add new date format (`--format date`) for heatmapping (#1146) * Create datecount plugin * Fix plugin import * Update datecount format * Create datecount test * Remove outdated comment * Remove unnecessary datecount export condition * Update test config * Move get_date_counts into DateCountExporter; misc changes * Use --format instead of --export in datecount test * Update datecount test to include configs * Better datecount test * Remove old tests * Change 'datecounts' to 'dates' --- features/format.feature | 19 +++++++++++++++++++ jrnl/plugins/__init__.py | 2 ++ jrnl/plugins/dates_exporter.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 jrnl/plugins/dates_exporter.py diff --git a/features/format.feature b/features/format.feature index 610e3a1e..4981f685 100644 --- a/features/format.feature +++ b/features/format.feature @@ -558,3 +558,22 @@ Feature: Custom formats | basic_encrypted | | basic_folder | | basic_dayone | + + Scenario Outline: Export date counts + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 2020-08-31 01:01: Hi." + And we run "jrnl --format dates" + Then the output should be + """ + 2020-08-29, 1 + 2020-08-31, 2 + 2020-09-24, 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index 0d2b39b4..ad174f0b 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -8,6 +8,7 @@ from .jrnl_importer import JRNLImporter from .json_exporter import JSONExporter from .markdown_exporter import MarkdownExporter from .tag_exporter import TagExporter +from .dates_exporter import DatesExporter from .template_exporter import __all__ as template_exporters from .text_exporter import TextExporter from .xml_exporter import XMLExporter @@ -17,6 +18,7 @@ __exporters = [ JSONExporter, MarkdownExporter, TagExporter, + DatesExporter, TextExporter, XMLExporter, YAMLExporter, diff --git a/jrnl/plugins/dates_exporter.py b/jrnl/plugins/dates_exporter.py new file mode 100644 index 00000000..d11e527c --- /dev/null +++ b/jrnl/plugins/dates_exporter.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# encoding: utf-8 +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html +from collections import Counter + +from .text_exporter import TextExporter + + +class DatesExporter(TextExporter): + """This Exporter lists dates and their respective counts, for heatingmapping etc.""" + + names = ["dates"] + extension = "dates" + + @classmethod + def export_entry(cls, entry): + raise NotImplementedError + + @classmethod + def export_journal(cls, journal): + """Returns dates and their frequencies for an entire journal.""" + date_counts = Counter() + for entry in journal.entries: + # entry.date.date() gets date without time + date = str(entry.date.date()) + date_counts[date] += 1 + result = "\n".join(f"{date}, {count}" for date, count in date_counts.items()) + return result From 18058c74e51af46576d596c48ef2a4f414026194 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Jan 2021 22:52:40 +0000 Subject: [PATCH 0304/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9323db..b32e8e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,13 @@ - Automate Arch deployment [\#1112](https://github.com/jrnl-org/jrnl/issues/1112) - Change temporary file names for better text editor integration [\#1080](https://github.com/jrnl-org/jrnl/issues/1080) - Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) +- Add new date format \(`--format date`\) for heatmapping [\#1146](https://github.com/jrnl-org/jrnl/pull/1146) ([KarimPwnz](https://github.com/KarimPwnz)) - Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) **Fixed bugs:** - Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) +- Fix YAML export formatting\(\#1065\) [\#1150](https://github.com/jrnl-org/jrnl/pull/1150) ([Seopril](https://github.com/Seopril)) - Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) - Notify user when config directory can't be created because there is already a file with the same name [\#1134](https://github.com/jrnl-org/jrnl/pull/1134) ([micahellison](https://github.com/micahellison)) From f0e8fa20606688e3c3cdc1ca9aedd9997875ac1a Mon Sep 17 00:00:00 2001 From: Karim Rahal Date: Sun, 17 Jan 2021 00:55:27 +0200 Subject: [PATCH 0305/1132] Add new `-today-in-history`, `-month`, `-day`, and `-year` search filters (#1145) * Introduce -reminisce, -month, -day, and -year * Update expected_args in parse_args tests * Add check before creating compare_d * Misc changes * Implement testing for -month, -day, -year, and -reminisce * Compress tests into one Scenario Outline * Fix failing tests by updating dates_similar journal * Create 'we set current date and time to' step * Use time.parse in reminisce * Update dates_similar journal * Make 'Searching in a journal' test shorter * Lint * Implement reminiscing test * Add combination tests * Finalize tests * Finalize pytests * Simplify reminisce tests * Change reminsice help (since it also shows today's entries) * Re-do tests; use various tests * Remove old test data * Better scenario description * Standardize format for compare_d * Rename -reminisce to -today-in-history --- features/search.feature | 90 ++++++++++++++++++++++++++++++++++++++++ features/steps/core.py | 21 ++++++++++ jrnl/Journal.py | 11 +++++ jrnl/args.py | 24 +++++++++++ jrnl/jrnl.py | 13 ++++++ tests/test_parse_args.py | 25 +++++++++++ 6 files changed, 184 insertions(+) diff --git a/features/search.feature b/features/search.feature index 9d31bb06..22351b7e 100644 --- a/features/search.feature +++ b/features/search.feature @@ -214,6 +214,96 @@ Feature: Searching in a journal | But I'm better. """ + Scenario Outline: Searching by month + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -month 9 --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + And we flush the output + When we run "jrnl -month Sept --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + And we flush the output + When we run "jrnl -month September --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching by day + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -day 31 --short" + Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching by year + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 2019-01-01 01:01: I like this year." + And we run "jrnl -year 2019 --short" + Then the output should be "2019-01-01 01:01 I like this year." + And we flush the output + When we run "jrnl -year 19 --short" + Then the output should be "2019-01-01 01:01 I like this year." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Combining month, day, and year search terms + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -month 08 -day 29 --short" + Then the output should be "2020-08-29 11:11 Entry the first." + And we flush the output + When we run "jrnl -day 29 -year 2020 --short" + Then the output should be "2020-08-29 11:11 Entry the first." + And we flush the output + When we run "jrnl -month 09 -year 2020 --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + And we flush the output + When we run "jrnl -month 08 -day 29 -year 2020 --short" + Then the output should be "2020-08-29 11:11 Entry the first." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching today in history + Given we use the config ".yaml" + And we use the password "test" if prompted + And we set current date and time to "2020-08-31 14:32" + When we run "jrnl 2019-08-31 01:01: Hi, from last year." + And we run "jrnl -today-in-history --short" + Then the output should be + """ + 2019-08-31 01:01 Hi, from last year. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + Scenario: Loading a DayOne Journal Given we use the config "dayone.yaml" When we run "jrnl -from 'feb 2013'" diff --git a/features/steps/core.py b/features/steps/core.py index e3af8243..f5215d58 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -17,6 +17,7 @@ import keyring import toml import yaml +import jrnl.time from jrnl import Journal from jrnl import __version__ from jrnl import plugins @@ -159,6 +160,11 @@ def disable_keyring(context): keyring.core.set_keyring(NoKeyring()) +@given('we set current date and time to "{dt}"') +def set_datetime(context, dt): + context.now = dt + + @when('we change directory to "{path}"') def move_up_dir(context, path): os.chdir(path) @@ -197,6 +203,7 @@ def open_editor_and_enter(context, method, text=""): patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ patch("sys.stdin.isatty", return_value=True), \ + patch("jrnl.time.parse", side_effect=_mock_time_parse(context)), \ patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ : @@ -289,6 +296,18 @@ def _mock_input(inputs): return prompt_return +def _mock_time_parse(context): + original_parse = jrnl.time.parse + if "now" not in context: + return original_parse + + def wrapper(input, *args, **kwargs): + input = context.now if input == "now" else input + return original_parse(input, *args, **kwargs) + + return wrapper + + @when('we run "{command}" and enter') @when('we run "{command}" and enter nothing') @when('we run "{command}" and enter "{inputs}"') @@ -322,6 +341,7 @@ def run_with_input(context, command, inputs=""): patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ patch("sys.stdin.read", side_effect=text) as mock_read, \ patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ + patch("jrnl.time.parse", side_effect=_mock_time_parse(context)), \ patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ : @@ -406,6 +426,7 @@ def run(context, command, text=""): patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ patch("sys.stdin.read", side_effect=lambda: text), \ + patch("jrnl.time.parse", side_effect=_mock_time_parse(context)), \ patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ : diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 1871e3c2..4196571d 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -189,6 +189,9 @@ class Journal: def filter( self, tags=[], + month=None, + day=None, + year=None, start_date=None, end_date=None, starred=False, @@ -220,11 +223,19 @@ class Journal: if contains: contains_lower = contains.casefold() + # Create datetime object for comparison below + # this approach allows various formats + if month or day or year: + compare_d = time.parse(f"{month or 1}.{day or 1}.{year or 1}") + result = [ entry for entry in self.entries if (not tags or tagged(entry.tags)) and (not starred or entry.starred) + and (not month or entry.date.month == compare_d.month) + and (not day or entry.date.day == compare_d.day) + and (not year or entry.date.year == compare_d.year) and (not start_date or entry.date >= start_date) and (not end_date or entry.date <= end_date) and (not exclude or not excluded(entry.tags)) diff --git a/jrnl/args.py b/jrnl/args.py index 5efb00ba..f934ca16 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -176,6 +176,30 @@ def parse_args(args=[]): reading.add_argument( "-on", dest="on_date", metavar="DATE", help="Show entries on this date" ) + reading.add_argument( + "-today-in-history", + dest="today_in_history", + action="store_true", + help="Show entries of today over the years", + ) + reading.add_argument( + "-month", + dest="month", + metavar="DATE", + help="Show entries on this month of any year", + ) + reading.add_argument( + "-day", + dest="day", + metavar="DATE", + help="Show entries on this day of any month", + ) + reading.add_argument( + "-year", + dest="year", + metavar="DATE", + help="Show entries of a specific year", + ) reading.add_argument( "-from", dest="start_date", diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 415200fa..257358c4 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -15,6 +15,7 @@ from .config import get_config_path from .editor import get_text_from_editor from .editor import get_text_from_stdin from .exception import UserAbort +from . import time def run(args): @@ -77,6 +78,10 @@ def _is_write_mode(args, config, **kwargs): args.edit, args.export, args.end_date, + args.today_in_history, + args.month, + args.day, + args.year, args.limit, args.on_date, args.short, @@ -206,8 +211,16 @@ def _search_journal(args, journal, **kwargs): if args.on_date: args.start_date = args.end_date = args.on_date + if args.today_in_history: + now = time.parse("now") + args.day = now.day + args.month = now.month + journal.filter( tags=args.text, + month=args.month, + day=args.day, + year=args.year, start_date=args.start_date, end_date=args.end_date, strict=args.strict, diff --git a/tests/test_parse_args.py b/tests/test_parse_args.py index b9147ac0..252638c9 100644 --- a/tests/test_parse_args.py +++ b/tests/test_parse_args.py @@ -18,6 +18,10 @@ def expected_args(**kwargs): "delete": False, "edit": False, "end_date": None, + "today_in_history": False, + "month": None, + "day": None, + "year": None, "excluded": [], "export": False, "filename": None, @@ -147,6 +151,27 @@ def test_on_date_alone(): assert cli_as_dict("-on 'saturday'") == expected_args(on_date="saturday") +def test_month_alone(): + assert cli_as_dict("-month 1") == expected_args(month="1") + assert cli_as_dict("-month 01") == expected_args(month="01") + assert cli_as_dict("-month January") == expected_args(month="January") + assert cli_as_dict("-month Jan") == expected_args(month="Jan") + + +def test_day_alone(): + assert cli_as_dict("-day 1") == expected_args(day="1") + assert cli_as_dict("-day 01") == expected_args(day="01") + + +def test_year_alone(): + assert cli_as_dict("-year 2021") == expected_args(year="2021") + assert cli_as_dict("-year 21") == expected_args(year="21") + + +def test_today_in_history_alone(): + assert cli_as_dict("-today-in-history") == expected_args(today_in_history=True) + + def test_short_alone(): assert cli_as_dict("--short") == expected_args(short=True) From b6b6e7750ebd1fc26c95d02c9b8ae156840c2c41 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Jan 2021 22:57:15 +0000 Subject: [PATCH 0306/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b32e8e41..c4360eb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,20 @@ **Implemented enhancements:** +- Filter for entries from the same date in previous years [\#1143](https://github.com/jrnl-org/jrnl/issues/1143) - Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) - Automate Arch deployment [\#1112](https://github.com/jrnl-org/jrnl/issues/1112) - Change temporary file names for better text editor integration [\#1080](https://github.com/jrnl-org/jrnl/issues/1080) - Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) - Add new date format \(`--format date`\) for heatmapping [\#1146](https://github.com/jrnl-org/jrnl/pull/1146) ([KarimPwnz](https://github.com/KarimPwnz)) +- Add new `-today-in-history`, `-month`, `-day`, and `-year` search filters [\#1145](https://github.com/jrnl-org/jrnl/pull/1145) ([KarimPwnz](https://github.com/KarimPwnz)) - Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) **Fixed bugs:** +- YAML Export lacking delimiters [\#1065](https://github.com/jrnl-org/jrnl/issues/1065) - Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) -- Fix YAML export formatting\(\#1065\) [\#1150](https://github.com/jrnl-org/jrnl/pull/1150) ([Seopril](https://github.com/Seopril)) +- Add delimiters in YAML format [\#1150](https://github.com/jrnl-org/jrnl/pull/1150) ([Seopril](https://github.com/Seopril)) - Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) - Notify user when config directory can't be created because there is already a file with the same name [\#1134](https://github.com/jrnl-org/jrnl/pull/1134) ([micahellison](https://github.com/micahellison)) From 9e6cd8820f3e7ff426bafd27d9ae955806404425 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 16 Jan 2021 15:19:11 -0800 Subject: [PATCH 0307/1132] Fix OS compatibility issues for editors with spaces, slashes, and quotes (#1153) * Fix inverted POSIX check, refactor os_compat, and add tests for it * Fix missing parentheses and remove skip_win on test that is passing in Windows now * Fix expected quotes in quoted args * Make output clearer on failing test * Bringing skip_win back to test whose failure is a bit more complicated than expected --- features/environment.py | 4 +- features/steps/core.py | 11 ++--- features/steps/export_steps.py | 17 +++++-- jrnl/color.py | 2 +- jrnl/editor.py | 6 +-- jrnl/os_compat.py | 14 +++++- tests/test_os_compat.py | 87 ++++++++++++++++++++++++++++++++++ 7 files changed, 121 insertions(+), 20 deletions(-) create mode 100644 tests/test_os_compat.py diff --git a/features/environment.py b/features/environment.py index 71ed8969..f4baab34 100644 --- a/features/environment.py +++ b/features/environment.py @@ -42,7 +42,7 @@ def before_feature(context, feature): feature.skip() return - if "skip_win" in feature.tags and on_windows: + if "skip_win" in feature.tags and on_windows(): feature.skip("Skipping on Windows") return @@ -69,7 +69,7 @@ def before_scenario(context, scenario): scenario.skip() return - if "skip_win" in scenario.effective_tags and on_windows: + if "skip_win" in scenario.effective_tags and on_windows(): scenario.skip("Skipping on Windows") return diff --git a/features/steps/core.py b/features/steps/core.py index f5215d58..abac4917 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -6,7 +6,6 @@ from collections import defaultdict import os from pathlib import Path import re -import shlex import time from unittest.mock import patch @@ -23,7 +22,7 @@ from jrnl import __version__ from jrnl import plugins from jrnl.cli import cli from jrnl.config import load_config -from jrnl.os_compat import on_windows +from jrnl.os_compat import split_args try: import parsedatetime.parsedatetime_consts as pdt @@ -88,10 +87,6 @@ class FailedKeyring(keyring.backend.KeyringBackend): keyring.set_keyring(TestKeyring()) -def ushlex(command): - return shlex.split(command, posix=not on_windows) - - def read_journal(context, journal_name="default"): configuration = load_config(context.config_path) with open(configuration["journals"][journal_name]) as journal_file: @@ -319,7 +314,7 @@ def run_with_input(context, command, inputs=""): else: text = iter([inputs]) - args = ushlex(command)[1:] + args = split_args(command)[1:] def _mock_editor(command): context.editor_command = command @@ -403,7 +398,7 @@ def run(context, command, text=""): cache_dir = os.path.join("features", "cache", context.cache_dir) command = command.format(cache_dir=cache_dir) - args = ushlex(command) + args = split_args(command) def _mock_editor(command): context.editor_command = command diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py index 6a5c8e46..f885591c 100644 --- a/features/steps/export_steps.py +++ b/features/steps/export_steps.py @@ -169,17 +169,24 @@ def assert_exported_yaml_file_content(context, file_path, cache_dir=None): for actual_line, expected_line in zip(actual_content, expected_content): if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): - assert_equal_tags_ignoring_order(actual_line, expected_line) + assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content + ) else: assert actual_line.strip() == expected_line.strip(), [ - actual_line.strip(), - expected_line.strip(), + [actual_line.strip(), expected_line.strip()], + [actual_content, expected_content], ] -def assert_equal_tags_ignoring_order(actual_line, expected_line): +def assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content +): actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) expected_tags = set( tag.strip() for tag in expected_line[len("tags: ") :].split(",") ) - assert actual_tags == expected_tags, [actual_tags, expected_tags] + assert actual_tags == expected_tags, [ + [actual_tags, expected_tags], + [expected_content, actual_content], + ] diff --git a/jrnl/color.py b/jrnl/color.py index dca28117..3bdd4149 100644 --- a/jrnl/color.py +++ b/jrnl/color.py @@ -7,7 +7,7 @@ import colorama from .os_compat import on_windows -if on_windows: +if on_windows(): colorama.init() WARNING_COLOR = colorama.Fore.YELLOW diff --git a/jrnl/editor.py b/jrnl/editor.py index 1a68028d..086d84db 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -1,6 +1,5 @@ import logging import os -import shlex import subprocess import sys import tempfile @@ -10,6 +9,7 @@ from pathlib import Path from .color import ERROR_COLOR from .color import RESET_COLOR from .os_compat import on_windows +from .os_compat import split_args def get_text_from_editor(config, template=""): @@ -25,7 +25,7 @@ def get_text_from_editor(config, template=""): f.write(template) try: - subprocess.call(shlex.split(config["editor"], posix=on_windows) + [tmpfile]) + subprocess.call(split_args(config["editor"]) + [tmpfile]) except Exception as e: error_msg = f""" {ERROR_COLOR}{str(e)}{RESET_COLOR} @@ -47,7 +47,7 @@ def get_text_from_editor(config, template=""): def get_text_from_stdin(): - _how_to_quit = "Ctrl+z and then Enter" if on_windows else "Ctrl+d" + _how_to_quit = "Ctrl+z and then Enter" if on_windows() else "Ctrl+d" print( f"[Writing Entry; on a blank line, press {_how_to_quit} to finish writing]\n", file=sys.stderr, diff --git a/jrnl/os_compat.py b/jrnl/os_compat.py index b38d9d60..6615b886 100644 --- a/jrnl/os_compat.py +++ b/jrnl/os_compat.py @@ -1,6 +1,18 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import shlex from sys import platform -on_windows = "win32" in platform + +def on_windows(): + return "win32" in platform + + +def on_posix(): + return not on_windows() + + +def split_args(args): + """Split arguments and add escape characters as appropriate for the OS""" + return shlex.split(args, posix=on_posix()) diff --git a/tests/test_os_compat.py b/tests/test_os_compat.py new file mode 100644 index 00000000..f7c058f1 --- /dev/null +++ b/tests/test_os_compat.py @@ -0,0 +1,87 @@ +from unittest import mock +import pytest + +from jrnl.os_compat import on_windows +from jrnl.os_compat import on_posix +from jrnl.os_compat import split_args + + +@pytest.mark.parametrize( + "systems", + [ + ["linux", False], + ["win32", True], + ["cygwin", False], + ["msys", False], + ["darwin", False], + ["os2", False], + ["os2emx", False], + ["riscos", False], + ["atheos", False], + ["freebsd7", False], + ["freebsd8", False], + ["freebsdN", False], + ["openbsd6", False], + ], +) +def test_on_windows(systems): + osname, expected_on_windows = systems[0], systems[1] + with mock.patch("jrnl.os_compat.platform", osname): + assert on_windows() == expected_on_windows + + +@pytest.mark.parametrize( + "systems", + [ + ["linux", True], + ["win32", False], + ["cygwin", True], + ["msys", True], + ["darwin", True], + ["os2", True], + ["os2emx", True], + ["riscos", True], + ["atheos", True], + ["freebsd7", True], + ["freebsd8", True], + ["freebsdN", True], + ["openbsd6", True], + ], +) +def test_on_posix(systems): + osname, expected_on_posix = systems[0], systems[1] + with mock.patch("jrnl.os_compat.platform", osname): + assert on_posix() == expected_on_posix + + +@pytest.mark.parametrize( + "args", + [ + ["notepad", ["notepad"]], + ["subl -w", ["subl", "-w"]], + [ + '"C:\\Program Files\\Sublime Text 3\\subl.exe" -w', + ['"C:\\Program Files\\Sublime Text 3\\subl.exe"', "-w"], + ], + ], +) +def test_split_args_on_windows(args): + input_arguments, expected_split_args = args[0], args[1] + with mock.patch("jrnl.os_compat.on_windows", lambda: True): + assert split_args(input_arguments) == expected_split_args + + +@pytest.mark.parametrize( + "args", + [ + ["vim", ["vim"]], + [ + 'vim -f +Goyo +Limelight "+set spell linebreak"', + ["vim", "-f", "+Goyo", "+Limelight", '"+set spell linebreak"'], + ], + ], +) +def test_split_args_on_not_windows(args): + input_arguments, expected_split_args = args[0], args[1] + with mock.patch("jrnl.os_compat.on_windows", lambda: True): + assert split_args(input_arguments) == expected_split_args From b117c7a2601a09206b7d62dc9fd8e1b3d3b7c286 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Jan 2021 23:20:59 +0000 Subject: [PATCH 0308/1132] Increment version to v2.7-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index fc38b65a..b9dc436f 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.6" +__version__ = "v2.7-beta" diff --git a/pyproject.toml b/pyproject.toml index c03a4f88..0bf1460e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.6" +version = "v2.7-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 2e254d55fb2b27067760f7733b6d344d60a529c2 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Jan 2021 23:22:56 +0000 Subject: [PATCH 0309/1132] Update changelog [ci skip] --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4360eb8..7999a69f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.7-beta](https://pypi.org/project/jrnl/v2.7-beta/) (2021-01-16) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...v2.7-beta) **Implemented enhancements:** @@ -17,8 +17,10 @@ **Fixed bugs:** +- `shlex.split` usage for editor config with commands that have spaces [\#1151](https://github.com/jrnl-org/jrnl/issues/1151) - YAML Export lacking delimiters [\#1065](https://github.com/jrnl-org/jrnl/issues/1065) - Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) +- Fix OS compatibility issues for editors with spaces, slashes, and quotes [\#1153](https://github.com/jrnl-org/jrnl/pull/1153) ([micahellison](https://github.com/micahellison)) - Add delimiters in YAML format [\#1150](https://github.com/jrnl-org/jrnl/pull/1150) ([Seopril](https://github.com/Seopril)) - Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) - Notify user when config directory can't be created because there is already a file with the same name [\#1134](https://github.com/jrnl-org/jrnl/pull/1134) ([micahellison](https://github.com/micahellison)) From c06b5cf297d64a2424e8c94e64a6f18dc9f96978 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 16 Jan 2021 17:40:09 -0800 Subject: [PATCH 0310/1132] Fix homebrew release, add options for relase pipeline (#1154) --- .github/workflows/release.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 884a8c48..b3ac7dbe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,6 +5,18 @@ on: version: description: 'Version (e.g. v2.5, v2.5.1-beta, v2.6-beta2)' required: true + include_repo_version: + description: 'Update version in repo? (yes/no)' + require: true + default: yes + include_pypi: + description: 'Publish to PyPI? (yes/no)' + required: true + default: yes + include_brew: + description: 'Publish to Homebrew? (yes/no)' + required: true + default: yes jobs: validate: @@ -65,12 +77,13 @@ jobs: run: pip install poetry - name: Update version in files + if: {{ github.event.inputs.include_repo_version == 'yes' }} run: | poetry version "$JRNL_VERSION" echo __version__ = \"$JRNL_VERSION\" > jrnl/__version__.py - name: Commit updated files - if: ${{ github.repository == env.HOME_REPO }} + if: ${{ github.event.inputs.include_repo_version == 'yes' && github.repository == env.HOME_REPO }} run: | git add pyproject.toml jrnl/__version__.py git commit -m "Increment version to ${JRNL_VERSION}" @@ -82,7 +95,7 @@ jobs: run: poetry build - name: Deploy to PyPI - if: ${{ github.repository == env.HOME_REPO }} + if: ${{ github.event.inputs.include_pypi == 'yes' && github.repository == env.HOME_REPO }} env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} run: poetry publish @@ -94,6 +107,7 @@ jobs: echo "::set-output name=pypi_version::$pypi_version" release_homebrew: + if: ${{ github.event.inputs.include_brew == 'yes' }} needs: release_pypi name: "Release to Homebrew" runs-on: macos-latest @@ -155,6 +169,7 @@ jobs: BRANCH_NAME="jrnl-${JRNL_VERSION}--${RANDOM}" git remote rename origin upstream git remote add origin "https://github.com/${BOT_REPO}.git" + git fetch --unshallow upstream git fetch origin git checkout -b $BRANCH_NAME git push -u origin $BRANCH_NAME From 99d01985302ecb6ceb0255ec1509d332d6a04667 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 17 Jan 2021 01:42:03 +0000 Subject: [PATCH 0311/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7999a69f..f2110f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...HEAD) + +**Build:** + +- Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) + ## [v2.7-beta](https://pypi.org/project/jrnl/v2.7-beta/) (2021-01-16) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...v2.7-beta) From f80f033d5d9c9ba593d0375c3ee6d76074fd4139 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 17 Jan 2021 10:51:22 -0800 Subject: [PATCH 0312/1132] fix typos --- .github/workflows/release.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b3ac7dbe..3d57918a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,17 +6,17 @@ on: description: 'Version (e.g. v2.5, v2.5.1-beta, v2.6-beta2)' required: true include_repo_version: - description: 'Update version in repo? (yes/no)' + description: 'Update version in repo? (true/false)' require: true - default: yes + default: true include_pypi: - description: 'Publish to PyPI? (yes/no)' + description: 'Publish to PyPI? (true/false)' required: true - default: yes + default: true include_brew: - description: 'Publish to Homebrew? (yes/no)' + description: 'Publish to Homebrew? (true/false)' required: true - default: yes + default: true jobs: validate: @@ -77,13 +77,13 @@ jobs: run: pip install poetry - name: Update version in files - if: {{ github.event.inputs.include_repo_version == 'yes' }} + if: ${{ github.event.inputs.include_repo_version == 'true' }} run: | poetry version "$JRNL_VERSION" echo __version__ = \"$JRNL_VERSION\" > jrnl/__version__.py - name: Commit updated files - if: ${{ github.event.inputs.include_repo_version == 'yes' && github.repository == env.HOME_REPO }} + if: ${{ github.event.inputs.include_repo_version == 'true' && github.repository == env.HOME_REPO }} run: | git add pyproject.toml jrnl/__version__.py git commit -m "Increment version to ${JRNL_VERSION}" @@ -95,7 +95,7 @@ jobs: run: poetry build - name: Deploy to PyPI - if: ${{ github.event.inputs.include_pypi == 'yes' && github.repository == env.HOME_REPO }} + if: ${{ github.event.inputs.include_pypi == 'true' && github.repository == env.HOME_REPO }} env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} run: poetry publish @@ -107,7 +107,7 @@ jobs: echo "::set-output name=pypi_version::$pypi_version" release_homebrew: - if: ${{ github.event.inputs.include_brew == 'yes' }} + if: ${{ github.event.inputs.include_brew == 'true' }} needs: release_pypi name: "Release to Homebrew" runs-on: macos-latest From ea7357ca26c611c18383b11ce325aee5cfd2547a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Jan 2021 13:27:54 -0800 Subject: [PATCH 0313/1132] Bump pyyaml from 5.3.1 to 5.4.1 (#1158) Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.3.1 to 5.4.1. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/5.3.1...5.4.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/poetry.lock b/poetry.lock index fc0f5895..abb802cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -481,11 +481,11 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.3.1" +version = "5.4.1" description = "YAML parser and emitter for Python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [[package]] name = "regex" @@ -855,19 +855,27 @@ pyxdg = [ {file = "pyxdg-0.27.tar.gz", hash = "sha256:80bd93aae5ed82435f20462ea0208fb198d8eec262e831ee06ce9ddb6b91c5a5"}, ] pyyaml = [ - {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, - {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, - {file = "PyYAML-5.3.1-cp35-cp35m-win32.whl", hash = "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2"}, - {file = "PyYAML-5.3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c"}, - {file = "PyYAML-5.3.1-cp36-cp36m-win32.whl", hash = "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2"}, - {file = "PyYAML-5.3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648"}, - {file = "PyYAML-5.3.1-cp37-cp37m-win32.whl", hash = "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"}, - {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, - {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, - {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, - {file = "PyYAML-5.3.1-cp39-cp39-win32.whl", hash = "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a"}, - {file = "PyYAML-5.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e"}, - {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, + {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, + {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, + {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, + {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, + {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, + {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, + {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, + {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, ] regex = [ {file = "regex-2020.11.13-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8b882a78c320478b12ff024e81dc7d43c1462aa4a3341c754ee65d857a521f85"}, From b53578262182788d0a5c4e43584babdd5238ccbc Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 21:29:43 +0000 Subject: [PATCH 0314/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2110f8b..bf2bb051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,18 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...HEAD) +**Fixed bugs:** + +- Editor can't be launched on Windows when using full path to editor executable [\#1096](https://github.com/jrnl-org/jrnl/issues/1096) + **Build:** - Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) +**Packaging:** + +- Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.7-beta](https://pypi.org/project/jrnl/v2.7-beta/) (2021-01-16) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...v2.7-beta) From 897943857dde82d53d8d12cd2649e66c1a09158e Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 23 Jan 2021 13:35:32 -0800 Subject: [PATCH 0315/1132] Simplify VS Code documentation for all platforms and add note about PATH variable (#1160) --- docs/recipes.md | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/docs/recipes.md b/docs/recipes.md index b7d370a4..14e08e14 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -162,10 +162,13 @@ in your `jrnl.yaml` file. (See [advanced usage](./advanced.md) for details). !!! note To save and log any entry edits, save and close the file. +If your editor is not in your operating system's `PATH` environment variable, +then you will have to enter in the full path of your editor. + ### Sublime Text -To use Sublime Text, install the command line tools for Sublime Text and -configure your `jrnl.yaml` like this: +To use [Sublime Text](https://www.sublimetext.com/), install the command line +tools for Sublime Text and configure your `jrnl.yaml` like this: ```yaml editor: "subl -w" @@ -174,9 +177,21 @@ editor: "subl -w" Note the `-w` flag to make sure jrnl waits for Sublime Text to close the file before writing into the journal. +### Visual Studio Code + +[Visual Studio Code](https://code.visualstudio.com) also requires a flag +that tells the process to wait until the file is closed before exiting: + +```yaml +editor: "code --wait" +``` + +On Windows, `code` is not added to the path by default, so you'll need to +enter the full path to your `code.exe` file, or add it to the `PATH` variable. + ### MacVim -Similar to Sublime Text, MacVim must be started with a flag that tells +Also similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is `-f`: @@ -219,29 +234,3 @@ editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession The double backslashes are needed so jrnl can read the file path correctly. The `-multiInst -nosession` options will cause jrnl to open its own Notepad++ window. - -### Visual Studio Code - -To set [Visual Studo Code](https://code.visualstudio.com) as your editor on Linux, edit `jrnl.yaml` like this: - -```yaml -editor: "/usr/bin/code --wait" -``` - -The `--wait` argument tells VS Code to wait for files to be written out before handing back control to jrnl. - -On MacOS you will need to add VS Code to your PATH. You can do that by adding: - -```sh -export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" -``` - -to your `.bash_profile`, or by running the **Install 'code' command in PATH** command from the command pallet in VS Code. - -Then you can add: - -```yaml -editor: "code --wait" -``` - -to `jrnl.yaml`. See also the [Visual Studio Code documentation](https://code.visualstudio.com/docs/setup/mac) From 9f386163a42ceb6450bf5e01c782ccf8370d3180 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 21:37:04 +0000 Subject: [PATCH 0316/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2bb051..1dfcd423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ - Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) +**Documentation:** + +- add instructions to add VSCode as an external editor for Windows [\#1155](https://github.com/jrnl-org/jrnl/issues/1155) +- Clarify editor documentation for PATH variable and VS Code [\#1160](https://github.com/jrnl-org/jrnl/pull/1160) ([micahellison](https://github.com/micahellison)) + **Packaging:** - Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) From a32070b08a640e18033a57cbfb548b75b138b20d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 22:49:45 +0000 Subject: [PATCH 0317/1132] Increment version to v2.7 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index b9dc436f..57da66a0 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.7-beta" +__version__ = "v2.7" diff --git a/pyproject.toml b/pyproject.toml index 0bf1460e..e47f27f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.7-beta" +version = "v2.7" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From ef563c807f9a4b84e0aedcf48e425a220b91d8e4 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 22:51:22 +0000 Subject: [PATCH 0318/1132] Update changelog [ci skip] --- CHANGELOG.md | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dfcd423..72eb0379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,46 +1,18 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.7](https://pypi.org/project/jrnl/v2.7/) (2021-01-23) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...HEAD) - -**Fixed bugs:** - -- Editor can't be launched on Windows when using full path to editor executable [\#1096](https://github.com/jrnl-org/jrnl/issues/1096) - -**Build:** - -- Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) - -**Documentation:** - -- add instructions to add VSCode as an external editor for Windows [\#1155](https://github.com/jrnl-org/jrnl/issues/1155) -- Clarify editor documentation for PATH variable and VS Code [\#1160](https://github.com/jrnl-org/jrnl/pull/1160) ([micahellison](https://github.com/micahellison)) - -**Packaging:** - -- Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.7-beta](https://pypi.org/project/jrnl/v2.7-beta/) (2021-01-16) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...v2.7-beta) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...v2.7) **Implemented enhancements:** -- Filter for entries from the same date in previous years [\#1143](https://github.com/jrnl-org/jrnl/issues/1143) -- Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) -- Automate Arch deployment [\#1112](https://github.com/jrnl-org/jrnl/issues/1112) -- Change temporary file names for better text editor integration [\#1080](https://github.com/jrnl-org/jrnl/issues/1080) -- Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) - Add new date format \(`--format date`\) for heatmapping [\#1146](https://github.com/jrnl-org/jrnl/pull/1146) ([KarimPwnz](https://github.com/KarimPwnz)) - Add new `-today-in-history`, `-month`, `-day`, and `-year` search filters [\#1145](https://github.com/jrnl-org/jrnl/pull/1145) ([KarimPwnz](https://github.com/KarimPwnz)) - Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) **Fixed bugs:** -- `shlex.split` usage for editor config with commands that have spaces [\#1151](https://github.com/jrnl-org/jrnl/issues/1151) -- YAML Export lacking delimiters [\#1065](https://github.com/jrnl-org/jrnl/issues/1065) -- Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) +- Editor can't be launched on Windows when using full path to editor executable [\#1096](https://github.com/jrnl-org/jrnl/issues/1096) - Fix OS compatibility issues for editors with spaces, slashes, and quotes [\#1153](https://github.com/jrnl-org/jrnl/pull/1153) ([micahellison](https://github.com/micahellison)) - Add delimiters in YAML format [\#1150](https://github.com/jrnl-org/jrnl/pull/1150) ([Seopril](https://github.com/Seopril)) - Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) @@ -48,11 +20,13 @@ **Build:** +- Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) - Fix changelog generator [\#1127](https://github.com/jrnl-org/jrnl/pull/1127) ([wren](https://github.com/wren)) **Documentation:** -- Clarify installation docs [\#1097](https://github.com/jrnl-org/jrnl/issues/1097) +- add instructions to add VSCode as an external editor for Windows [\#1155](https://github.com/jrnl-org/jrnl/issues/1155) +- Clarify editor documentation for PATH variable and VS Code [\#1160](https://github.com/jrnl-org/jrnl/pull/1160) ([micahellison](https://github.com/micahellison)) - Emphasize installing dependencies before testing [\#1148](https://github.com/jrnl-org/jrnl/pull/1148) ([gumatias](https://github.com/gumatias)) - Clarify installation documentation \(\#1097\) [\#1137](https://github.com/jrnl-org/jrnl/pull/1137) ([Seopril](https://github.com/Seopril)) - Fix broken search bar in docs site [\#1135](https://github.com/jrnl-org/jrnl/pull/1135) ([wren](https://github.com/wren)) @@ -62,6 +36,7 @@ **Packaging:** +- Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 21.7.0 to 21.8.0 [\#1136](https://github.com/jrnl-org/jrnl/pull/1136) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2020.4 to 2020.5 [\#1130](https://github.com/jrnl-org/jrnl/pull/1130) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) - Bump pytest from 6.2.0 to 6.2.1 [\#1129](https://github.com/jrnl-org/jrnl/pull/1129) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) From 8a78c349175da90c7c79e3bec81698a6b910b821 Mon Sep 17 00:00:00 2001 From: eshrh <16175276+eshrh@users.noreply.github.com> Date: Sat, 23 Jan 2021 18:29:43 -0500 Subject: [PATCH 0319/1132] Support title splitting for fullwidth CJK terminals (#1163) * Split by fullwidth terminals without spaces. * Add test * Update write.feature --- features/write.feature | 14 ++++++++++++++ jrnl/Entry.py | 13 ++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/features/write.feature b/features/write.feature index efa26201..eb22e480 100644 --- a/features/write.feature +++ b/features/write.feature @@ -28,6 +28,20 @@ Feature: Writing new entries. | basic_folder | | basic_dayone | + Scenario Outline: CJK entry should be split at fullwidth period without following space. + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 七転び。八起き" + And we run "jrnl -1" + Then the output should contain "| 八起き" + + Examples: configs + | config_file | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + Scenario Outline: Writing an entry from command line should store the entry Given we use the config ".yaml" And we use the password "bad doggie no biscuit" if prompted diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 2a85e015..67ba84f3 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -204,14 +204,17 @@ class Entry: # https://github.com/fnl/segtok SENTENCE_SPLITTER = re.compile( r""" -( # A sentence ends at one of two sequences: - [.!?\u2026\u203C\u203D\u2047\u2048\u2049\u22EF\u3002\uFE52\uFE57\uFF01\uFF0E\uFF1F\uFF61] # Either, a sequence starting with a sentence terminal, + ( + [.!?\u2026\u203C\u203D\u2047\u2048\u2049\u22EF\uFE52\uFE57] # Sequence starting with a sentence terminal, [\'\u2019\"\u201D]? # an optional right quote, - [\]\)]* # optional closing brackets and - \s+ # a sequence of required spaces. -)""", + [\]\)]* # optional closing bracket + \s+ # AND a sequence of required spaces. + ) + |[\uFF01\uFF0E\uFF1F\uFF61\u3002] # CJK full/half width terminals usually do not have following spaces. + """, re.VERBOSE, ) + SENTENCE_SPLITTER_ONLY_NEWLINE = re.compile("\n") From bd1c5c3f624b7bcebb23ad91f76218572727a585 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 30 Jan 2021 13:31:24 -0800 Subject: [PATCH 0320/1132] Add brew and gitter badges to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bc295f6c..55202436 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ jrnl [![Testing](https://github.com/jrnl-org/jrnl/workflows/Testing/badge.svg)](https://github.com/jrnl-org/jrnl/actions?query=workflow%3ATesting) [![Downloads](https://pepy.tech/badge/jrnl)](https://pepy.tech/project/jrnl) [![Version](http://img.shields.io/pypi/v/jrnl.svg?style=flat)](https://pypi.python.org/pypi/jrnl/) + [![Homebrew](https://img.shields.io/homebrew/v/jrnl?style=flat-square)](https://formulae.brew.sh/formula/jrnl) + [![Gitter](https://img.shields.io/gitter/room/jrnl-org/jrnl)](https://gitter.im/jrnl-org/jrnl) ==== _To get help, [submit an issue](https://github.com/jrnl-org/jrnl/issues/new/choose) on From ac0c49918d1c4ec9ec6639f7ab43f408e3cc6dd3 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jan 2021 21:34:06 +0000 Subject: [PATCH 0321/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72eb0379..a3ba6eca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...HEAD) + +**Implemented enhancements:** + +- Allow timestamps in command line for new entries with editor [\#1083](https://github.com/jrnl-org/jrnl/issues/1083) + ## [v2.7](https://pypi.org/project/jrnl/v2.7/) (2021-01-23) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...v2.7) From ea845a84088a89d9d59605aef80629512557ec14 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 30 Jan 2021 13:47:26 -0800 Subject: [PATCH 0322/1132] Make journal selection behavior more consistent when there's a colon with no date (#1164) --- features/multiple_journals.feature | 14 ++++++++++++++ jrnl/config.py | 16 ++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/features/multiple_journals.feature b/features/multiple_journals.feature index 6a9efe78..222be100 100644 --- a/features/multiple_journals.feature +++ b/features/multiple_journals.feature @@ -29,6 +29,20 @@ Feature: Multiple journals And journal "work" should have 1 entry And journal "work" should contain "2012-07-23" + Scenario: Write to specified journal without a timestamp but with colon + Given we use the config "multiple.yaml" + When we run "jrnl work : a long day in the office" + Then journal "default" should have 2 entries + And journal "work" should have 1 entry + And journal "work" should contain "a long day in the office" + + Scenario: Write to specified journal without a timestamp but with colon + Given we use the config "multiple.yaml" + When we run "jrnl work: a long day in the office" + Then journal "default" should have 2 entries + And journal "work" should have 1 entry + And journal "work" should contain "a long day in the office" + Scenario: Create new journals as required Given we use the config "multiple.yaml" Then journal "ideas" should not exist diff --git a/jrnl/config.py b/jrnl/config.py index 9e57de3d..a5a1d1cc 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -138,10 +138,18 @@ def update_config(config, new_config, scope, force_local=False): def get_journal_name(args, config): args.journal_name = DEFAULT_JOURNAL_KEY - if args.text and args.text[0] in config["journals"]: - args.journal_name = args.text[0] - args.text = args.text[1:] - elif DEFAULT_JOURNAL_KEY not in config["journals"]: + + # The first arg might be a journal name + if args.text: + potential_journal_name = args.text[0] + if potential_journal_name[-1] == ":": + potential_journal_name = potential_journal_name[0:-1] + + if potential_journal_name in config["journals"]: + args.journal_name = potential_journal_name + args.text = args.text[1:] + + if args.journal_name not in config["journals"]: print("No default journal configured.", file=sys.stderr) print(list_journals(config), file=sys.stderr) sys.exit(1) From fbb40b75f6dd754be2a477a259d4ceba124699ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Jan 2021 13:47:37 -0800 Subject: [PATCH 0323/1132] Bump pytest from 6.2.1 to 6.2.2 (#1167) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.1...6.2.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index abb802cb..6e8193dc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -424,7 +424,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "6.2.1" +version = "6.2.2" description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -835,8 +835,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.2.1-py3-none-any.whl", hash = "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8"}, - {file = "pytest-6.2.1.tar.gz", hash = "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306"}, + {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, + {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, From 6e28b0b4a124e51212a640d310c4ad1f700335bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Jan 2021 13:48:08 -0800 Subject: [PATCH 0324/1132] Bump keyring from 21.8.0 to 22.0.1 (#1168) Bumps [keyring](https://github.com/jaraco/keyring) from 21.8.0 to 22.0.1. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v21.8.0...v22.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6e8193dc..50135423 100644 --- a/poetry.lock +++ b/poetry.lock @@ -212,7 +212,7 @@ python-versions = ">=3.6" [[package]] name = "keyring" -version = "21.8.0" +version = "22.0.1" description = "Store and access your passwords safely." category = "main" optional = false @@ -226,7 +226,7 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "livereload" @@ -735,8 +735,8 @@ joblib = [ {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, ] keyring = [ - {file = "keyring-21.8.0-py3-none-any.whl", hash = "sha256:4be9cbaaaf83e61d6399f733d113ede7d1c73bc75cb6aeb64eee0f6ac39b30ea"}, - {file = "keyring-21.8.0.tar.gz", hash = "sha256:1746d3ac913d449a090caf11e9e4af00e26c3f7f7e81027872192b2398b98675"}, + {file = "keyring-22.0.1-py3-none-any.whl", hash = "sha256:9f44660a5d4931bdc14c08a1d01ef30b18a7a8147380710d8c9f9531e1f6c3c0"}, + {file = "keyring-22.0.1.tar.gz", hash = "sha256:9acb3e1452edbb7544822b12fd25459078769e560fa51f418b6d00afaa6178df"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, From eca002ac290c9590e1f507088622663283f5f45a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jan 2021 21:49:37 +0000 Subject: [PATCH 0325/1132] Update changelog [ci skip] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ba6eca..88b1286d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ - Allow timestamps in command line for new entries with editor [\#1083](https://github.com/jrnl-org/jrnl/issues/1083) +**Fixed bugs:** + +- Make journal selection behavior more consistent when there's a colon with no date [\#1164](https://github.com/jrnl-org/jrnl/pull/1164) ([wren](https://github.com/wren)) + +**Packaging:** + +- Bump keyring from 21.8.0 to 22.0.1 [\#1168](https://github.com/jrnl-org/jrnl/pull/1168) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest from 6.2.1 to 6.2.2 [\#1167](https://github.com/jrnl-org/jrnl/pull/1167) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.7](https://pypi.org/project/jrnl/v2.7/) (2021-01-23) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...v2.7) From 115f790210778d555d2e9950927398eada817ab8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Feb 2021 12:17:40 -0800 Subject: [PATCH 0326/1132] Bump pytz from 2020.5 to 2021.1 (#1174) Bumps [pytz](https://github.com/stub42/pytz) from 2020.5 to 2021.1. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2020.5...release_2021.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 50135423..276418d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -457,7 +457,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2020.5" +version = "2021.1" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -768,20 +768,39 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] mkdocs = [ @@ -843,8 +862,8 @@ python-dateutil = [ {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, ] pytz = [ - {file = "pytz-2020.5-py2.py3-none-any.whl", hash = "sha256:16962c5fb8db4a8f63a26646d8886e9d769b6c511543557bc84e9569fb9a9cb4"}, - {file = "pytz-2020.5.tar.gz", hash = "sha256:180befebb1927b16f6b57101720075a984c019ac16b1b7575673bea42c6c3da5"}, + {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, + {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, From 3f3bdbeeda9acf4352b706b0bef5393a33721c02 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Feb 2021 20:19:19 +0000 Subject: [PATCH 0327/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b1286d..4a199419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,13 @@ - Make journal selection behavior more consistent when there's a colon with no date [\#1164](https://github.com/jrnl-org/jrnl/pull/1164) ([wren](https://github.com/wren)) +**Documentation:** + +- Add the -a flag to documentation. [\#1119](https://github.com/jrnl-org/jrnl/issues/1119) + **Packaging:** +- Bump pytz from 2020.5 to 2021.1 [\#1174](https://github.com/jrnl-org/jrnl/pull/1174) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 21.8.0 to 22.0.1 [\#1168](https://github.com/jrnl-org/jrnl/pull/1168) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.1 to 6.2.2 [\#1167](https://github.com/jrnl-org/jrnl/pull/1167) ([dependabot[bot]](https://github.com/apps/dependabot)) From dc776b171acbdfba2dd554a0b2c163377a0a51c3 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 6 Feb 2021 14:10:21 -0800 Subject: [PATCH 0328/1132] Fix case on documentation tag in issue template --- .github/ISSUE_TEMPLATE/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md index 24aacdd3..dc186ee9 100644 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -2,7 +2,7 @@ name: Documentation Change about: Request or report any updates to our documentation (https://jrnl.sh) title: '' -labels: ":new:, Documentation" +labels: ":new:, documentation" assignees: '' --- From 2244672e33bea69dacc3a547671b96028c10f0d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Feb 2021 11:13:24 -0800 Subject: [PATCH 0329/1132] Bump yq from 2.11.1 to 2.12.0 (#1186) Bumps [yq](https://github.com/kislyuk/yq) from 2.11.1 to 2.12.0. - [Release notes](https://github.com/kislyuk/yq/releases) - [Changelog](https://github.com/kislyuk/yq/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/yq/compare/v2.11.1...v2.12.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 276418d1..c24c50bb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -587,7 +587,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "yq" -version = "2.11.1" +version = "2.12.0" description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" category = "dev" optional = false @@ -596,6 +596,7 @@ python-versions = "*" [package.dependencies] argcomplete = ">=1.8.1" PyYAML = ">=3.11" +toml = ">=0.10.0" xmltodict = ">=0.11.0" [package.extras] @@ -683,6 +684,7 @@ cffi = [ {file = "cffi-1.14.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:840793c68105fe031f34d6a086eaea153a0cd5c491cde82a74b420edd0a2b909"}, {file = "cffi-1.14.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:b18e0a9ef57d2b41f5c68beefa32317d286c3d6ac0484efd10d6e07491bb95dd"}, {file = "cffi-1.14.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:045d792900a75e8b1e1b0ab6787dd733a8190ffcf80e8c8ceb2fb10a29ff238a"}, + {file = "cffi-1.14.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:7ef7d4ced6b325e92eb4d3502946c78c5367bc416398d387b39591532536734e"}, {file = "cffi-1.14.4-cp39-cp39-win32.whl", hash = "sha256:ba4e9e0ae13fc41c6b23299545e5ef73055213e466bd107953e4a013a5ddd7e3"}, {file = "cffi-1.14.4-cp39-cp39-win_amd64.whl", hash = "sha256:f032b34669220030f905152045dfa27741ce1a6db3324a5bc0b96b6c7420c87b"}, {file = "cffi-1.14.4.tar.gz", hash = "sha256:1a465cbe98a7fd391d47dce4b8f7e5b921e6cd805ef421d04f5f66ba8f06086c"}, @@ -1048,8 +1050,8 @@ xmltodict = [ {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, ] yq = [ - {file = "yq-2.11.1-py2.py3-none-any.whl", hash = "sha256:c1e1d6abb6e80beacb9c40f9eb1105b6fc2a08d3dc908237f69f197e683cff1b"}, - {file = "yq-2.11.1.tar.gz", hash = "sha256:74f64e3784a34d8a18efd8addc83cf5ca3478a0a69517d70fd9158a3809f99e0"}, + {file = "yq-2.12.0-py2.py3-none-any.whl", hash = "sha256:1f124f48dee77ad5e0be8607777fed183e96c8d31fa577de14201c7a614e4819"}, + {file = "yq-2.12.0.tar.gz", hash = "sha256:1d2ad403504d306b5258b86c698f9856d7ad58b7bb17a2b875691a6a7b8c4c20"}, ] zipp = [ {file = "zipp-3.4.0-py3-none-any.whl", hash = "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108"}, From 3df5c62b5e5d439c0c83b0f97a16f624def32da1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Feb 2021 11:14:03 -0800 Subject: [PATCH 0330/1132] Bump cryptography from 3.3.1 to 3.4.4 (#1188) Bumps [cryptography](https://github.com/pyca/cryptography) from 3.3.1 to 3.4.4. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.3.1...3.4.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/poetry.lock b/poetry.lock index c24c50bb..d8dd2b4c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -129,22 +129,22 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "cryptography" -version = "3.3.1" +version = "3.4.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*" +python-versions = ">=3.6" [package.dependencies] cffi = ">=1.12" -six = ">=1.4.1" [package.extras] docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=3.6.0,!=3.9.0,!=3.9.1,!=3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "future" @@ -698,20 +698,13 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] cryptography = [ - {file = "cryptography-3.3.1-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:c366df0401d1ec4e548bebe8f91d55ebcc0ec3137900d214dd7aac8427ef3030"}, - {file = "cryptography-3.3.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9f6b0492d111b43de5f70052e24c1f0951cb9e6022188ebcb1cc3a3d301469b0"}, - {file = "cryptography-3.3.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:a69bd3c68b98298f490e84519b954335154917eaab52cf582fa2c5c7efc6e812"}, - {file = "cryptography-3.3.1-cp27-cp27m-win32.whl", hash = "sha256:84ef7a0c10c24a7773163f917f1cb6b4444597efd505a8aed0a22e8c4780f27e"}, - {file = "cryptography-3.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:594a1db4511bc4d960571536abe21b4e5c3003e8750ab8365fafce71c5d86901"}, - {file = "cryptography-3.3.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0003a52a123602e1acee177dc90dd201f9bb1e73f24a070db7d36c588e8f5c7d"}, - {file = "cryptography-3.3.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:83d9d2dfec70364a74f4e7c70ad04d3ca2e6a08b703606993407bf46b97868c5"}, - {file = "cryptography-3.3.1-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:dc42f645f8f3a489c3dd416730a514e7a91a59510ddaadc09d04224c098d3302"}, - {file = "cryptography-3.3.1-cp36-abi3-manylinux1_x86_64.whl", hash = "sha256:788a3c9942df5e4371c199d10383f44a105d67d401fb4304178020142f020244"}, - {file = "cryptography-3.3.1-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:69e836c9e5ff4373ce6d3ab311c1a2eed274793083858d3cd4c7d12ce20d5f9c"}, - {file = "cryptography-3.3.1-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:9e21301f7a1e7c03dbea73e8602905a4ebba641547a462b26dd03451e5769e7c"}, - {file = "cryptography-3.3.1-cp36-abi3-win32.whl", hash = "sha256:b4890d5fb9b7a23e3bf8abf5a8a7da8e228f1e97dc96b30b95685df840b6914a"}, - {file = "cryptography-3.3.1-cp36-abi3-win_amd64.whl", hash = "sha256:0e85aaae861d0485eb5a79d33226dd6248d2a9f133b81532c8f5aae37de10ff7"}, - {file = "cryptography-3.3.1.tar.gz", hash = "sha256:7e177e4bea2de937a584b13645cab32f25e3d96fc0bc4a4cf99c27dc77682be6"}, + {file = "cryptography-3.4.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:287032b6a7d86abc98e8e977b20138c53fea40e5b24e29090d5a675a973dcd10"}, + {file = "cryptography-3.4.4-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:7eed937ad9b53280a5f53570d3a7dc93cb4412b6a3d58d4c6bb78cc26319c729"}, + {file = "cryptography-3.4.4-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:f21be9ec6b44c223b2024bbe59d394fadc7be320d18a8d595419afadb6cd5620"}, + {file = "cryptography-3.4.4-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:dab437c2e84628703e3358f0f06555a6259bc5039209d51aa3b05af667ff4fd0"}, + {file = "cryptography-3.4.4-cp36-abi3-win32.whl", hash = "sha256:f6ea140d2736b7e1f0de4f988c43f76b0b3f3d365080e091715429ba218dce28"}, + {file = "cryptography-3.4.4-cp36-abi3-win_amd64.whl", hash = "sha256:288c65eea20bd89b11102c47b118bc1e0749386b0a0dfebba414076c5d4c8188"}, + {file = "cryptography-3.4.4.tar.gz", hash = "sha256:ee5e19f0856b6fbbdbab15c2787ca65d203801d2d65d0b8de6218f424206c848"}, ] future = [ {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, From 0d61e102c09409137e5c0058e3d40a916de9a46c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Feb 2021 11:14:13 -0800 Subject: [PATCH 0331/1132] Bump asteval from 0.9.21 to 0.9.22 (#1189) Bumps [asteval](https://github.com/newville/asteval) from 0.9.21 to 0.9.22. - [Release notes](https://github.com/newville/asteval/releases) - [Commits](https://github.com/newville/asteval/compare/0.9.21...0.9.22) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index d8dd2b4c..580b96f7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -33,7 +33,7 @@ test = ["coverage", "flake8", "pexpect", "wheel"] [[package]] name = "asteval" -version = "0.9.21" +version = "0.9.22" description = "Safe, minimalistic evaluator of python expression using ast module" category = "main" optional = false @@ -633,7 +633,7 @@ argcomplete = [ {file = "argcomplete-1.12.2.tar.gz", hash = "sha256:de0e1282330940d52ea92a80fea2e4b9e0da1932aaa570f84d268939d1897b04"}, ] asteval = [ - {file = "asteval-0.9.21.tar.gz", hash = "sha256:ee14ba2211cda1c76114e3e7b552cdd57e940309203d5f4106e6d6f2c2346a2e"}, + {file = "asteval-0.9.22.tar.gz", hash = "sha256:74a0939765fc6b1421e6672ccf74c52edc3c7af7d6a8298b057b0d50ac51aea8"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, From 76fd1324091624ed0af74848a534dd9a3034c385 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Feb 2021 19:15:50 +0000 Subject: [PATCH 0332/1132] Update changelog [ci skip] --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a199419..5ad7b677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,11 @@ - Make journal selection behavior more consistent when there's a colon with no date [\#1164](https://github.com/jrnl-org/jrnl/pull/1164) ([wren](https://github.com/wren)) -**Documentation:** - -- Add the -a flag to documentation. [\#1119](https://github.com/jrnl-org/jrnl/issues/1119) - **Packaging:** +- Bump asteval from 0.9.21 to 0.9.22 [\#1189](https://github.com/jrnl-org/jrnl/pull/1189) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump cryptography from 3.3.1 to 3.4.4 [\#1188](https://github.com/jrnl-org/jrnl/pull/1188) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump yq from 2.11.1 to 2.12.0 [\#1186](https://github.com/jrnl-org/jrnl/pull/1186) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2020.5 to 2021.1 [\#1174](https://github.com/jrnl-org/jrnl/pull/1174) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 21.8.0 to 22.0.1 [\#1168](https://github.com/jrnl-org/jrnl/pull/1168) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.1 to 6.2.2 [\#1167](https://github.com/jrnl-org/jrnl/pull/1167) ([dependabot[bot]](https://github.com/apps/dependabot)) From 487b0c44aef68fe0241af433f45acfb446600908 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Feb 2021 11:30:33 -0800 Subject: [PATCH 0333/1132] Bump cryptography from 3.4.4 to 3.4.6 (#1195) Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.4 to 3.4.6. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.4.4...3.4.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index 580b96f7..6418862f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -129,7 +129,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "cryptography" -version = "3.4.4" +version = "3.4.6" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -698,13 +698,13 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] cryptography = [ - {file = "cryptography-3.4.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:287032b6a7d86abc98e8e977b20138c53fea40e5b24e29090d5a675a973dcd10"}, - {file = "cryptography-3.4.4-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:7eed937ad9b53280a5f53570d3a7dc93cb4412b6a3d58d4c6bb78cc26319c729"}, - {file = "cryptography-3.4.4-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:f21be9ec6b44c223b2024bbe59d394fadc7be320d18a8d595419afadb6cd5620"}, - {file = "cryptography-3.4.4-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:dab437c2e84628703e3358f0f06555a6259bc5039209d51aa3b05af667ff4fd0"}, - {file = "cryptography-3.4.4-cp36-abi3-win32.whl", hash = "sha256:f6ea140d2736b7e1f0de4f988c43f76b0b3f3d365080e091715429ba218dce28"}, - {file = "cryptography-3.4.4-cp36-abi3-win_amd64.whl", hash = "sha256:288c65eea20bd89b11102c47b118bc1e0749386b0a0dfebba414076c5d4c8188"}, - {file = "cryptography-3.4.4.tar.gz", hash = "sha256:ee5e19f0856b6fbbdbab15c2787ca65d203801d2d65d0b8de6218f424206c848"}, + {file = "cryptography-3.4.6-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:57ad77d32917bc55299b16d3b996ffa42a1c73c6cfa829b14043c561288d2799"}, + {file = "cryptography-3.4.6-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:93cfe5b7ff006de13e1e89830810ecbd014791b042cbe5eec253be11ac2b28f3"}, + {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:5ecf2bcb34d17415e89b546dbb44e73080f747e504273e4d4987630493cded1b"}, + {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:fec7fb46b10da10d9e1d078d1ff8ed9e05ae14f431fdbd11145edd0550b9a964"}, + {file = "cryptography-3.4.6-cp36-abi3-win32.whl", hash = "sha256:df186fcbf86dc1ce56305becb8434e4b6b7504bc724b71ad7a3239e0c9d14ef2"}, + {file = "cryptography-3.4.6-cp36-abi3-win_amd64.whl", hash = "sha256:66b57a9ca4b3221d51b237094b0303843b914b7d5afd4349970bb26518e350b0"}, + {file = "cryptography-3.4.6.tar.gz", hash = "sha256:2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87"}, ] future = [ {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, From 0e90342b0284acc2dd2d65448ad663ba834647d7 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 20 Feb 2021 19:32:09 +0000 Subject: [PATCH 0334/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad7b677..9eabe591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ **Packaging:** +- Bump cryptography from 3.4.4 to 3.4.6 [\#1195](https://github.com/jrnl-org/jrnl/pull/1195) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump asteval from 0.9.21 to 0.9.22 [\#1189](https://github.com/jrnl-org/jrnl/pull/1189) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 3.3.1 to 3.4.4 [\#1188](https://github.com/jrnl-org/jrnl/pull/1188) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump yq from 2.11.1 to 2.12.0 [\#1186](https://github.com/jrnl-org/jrnl/pull/1186) ([dependabot[bot]](https://github.com/apps/dependabot)) From 021ec61a8119d69c35596863c7f9cdd6768b18a7 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 20 Feb 2021 19:50:52 +0000 Subject: [PATCH 0335/1132] Increment version to v2.7.1-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 57da66a0..53f900b9 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.7" +__version__ = "v2.7.1-beta" diff --git a/pyproject.toml b/pyproject.toml index e47f27f7..6342f91a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.7" +version = "v2.7.1-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From e6c0a16342a31bc2fca1e2e865646c27bd43d0b4 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 20 Feb 2021 19:52:38 +0000 Subject: [PATCH 0336/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eabe591..057106ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.7.1-beta](https://pypi.org/project/jrnl/v2.7.1-beta/) (2021-02-20) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...HEAD) - -**Implemented enhancements:** - -- Allow timestamps in command line for new entries with editor [\#1083](https://github.com/jrnl-org/jrnl/issues/1083) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...v2.7.1-beta) **Fixed bugs:** From 67682e7e9347de7026d310f5f84a8586e83648d8 Mon Sep 17 00:00:00 2001 From: Suhas Date: Sat, 27 Feb 2021 13:53:21 -0500 Subject: [PATCH 0337/1132] Add per-journal config documentation (#1199) * update documentation with example config * make format * clarify meaning of config --- docs/advanced.md | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/docs/advanced.md b/docs/advanced.md index 51c4d1af..10da134b 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -1,5 +1,6 @@ + # Advanced Usage ## Configuration File @@ -19,29 +20,29 @@ and can be edited with a plain text editor. Backup your journal and config file before editing. Changes to the config file can have destructive effects on your journal! - - `journals` +- `journals` paths to your journal files - - `editor` +- `editor` if set, executes this command to launch an external editor for writing your entries, e.g. `vim`. Some editors require special options to work properly, see `FAQ ` for details. - - `encrypt` +- `encrypt` if `true`, encrypts your journal using AES. - - `tagsymbols` +- `tagsymbols` Symbols to be interpreted as tags. (See note below) - - `default_hour` and `default_minute` +- `default_hour` and `default_minute` if you supply a date, such as `last thursday`, but no specific time, the entry will be created at this time - - `timeformat` +- `timeformat` how to format the timestamps in your journal, see the [python docs](http://docs.python.org/library/time.html#time.strftime) for reference - - `highlight` +- `highlight` if `true`, tags will be highlighted in cyan. - - `linewrap` +- `linewrap` controls the width of the output. Set to `false` if you don't want to wrap long lines. - - `colors` +- `colors` dictionary that controls the colors used to display journal entries. It has four subkeys, which are: `body`, `date`, `tags`, and `title`. Current valid values are: `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `MAGENTA`, `CYAN`, `WHITE`, and `NONE`. `colorama.Fore` is used for colorization, and you can find the [docs here](https://github.com/tartley/colorama#colored-output). To disable colored output, set the value to `NONE`. If you set the value of any color subkey to an invalid color, no color will be used. - - `display_format` - specifies formatter to use, formatters available are: +- `display_format` + specifies formatter to use, formatters available are: `boxed`, `fancy`, `json`, `markdown`, `md`, `tags`, `text`, `txt`, `xml`, or `yaml`. !!! note @@ -99,11 +100,31 @@ food: ~/my_recipes.txt ``` Your `default` and your `food` journals won't be encrypted, however your -`work` journal will! You can override all options that are present at +`work` journal will! + +You can override all options that are present at the top level of `jrnl.yaml`, just make sure that at the very least you specify a `journal: ...` key that points to the journal file of that journal. +Consider the following example configuration + +```yaml +editor: vi -c startinsert +journals: + default: ~/journal.txt + work: + journal: ~/work.txt + encrypt: true + display_format: json + editor: code -rw + food: + display_format: markdown + journal: ~/recipes.txt +``` + +The `work` journal is encrypted, prints to `json` by default, and is edited using an existing window of VSCode. Similarly, the `food` journal prints to markdown by default, but uses all the other defaults. + !!! note Changing `encrypt` to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal From f7c78f63a093fa7fcfa8d357f46f8979ff036314 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Feb 2021 18:55:07 +0000 Subject: [PATCH 0338/1132] Update changelog [ci skip] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 057106ae..ec6c6f98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...HEAD) + +**Documentation:** + +- Update documentation about journal-level config values [\#1196](https://github.com/jrnl-org/jrnl/issues/1196) +- update per-journal config documentation [\#1199](https://github.com/jrnl-org/jrnl/pull/1199) ([sriniv27](https://github.com/sriniv27)) + ## [v2.7.1-beta](https://pypi.org/project/jrnl/v2.7.1-beta/) (2021-02-20) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...v2.7.1-beta) From 2ac4bab4d5bbe4abc7cfd8ccff8c6609f2bde91b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Feb 2021 19:04:21 +0000 Subject: [PATCH 0339/1132] Increment version to v2.7.1 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 53f900b9..36d130de 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.7.1-beta" +__version__ = "v2.7.1" diff --git a/pyproject.toml b/pyproject.toml index 6342f91a..e87de592 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.7.1-beta" +version = "v2.7.1" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From b99cebcee623a52dd1a5e7d66912deb747efff2b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Feb 2021 19:05:55 +0000 Subject: [PATCH 0340/1132] Update changelog [ci skip] --- CHANGELOG.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6c6f98..f85eae2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,18 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.7.1](https://pypi.org/project/jrnl/v2.7.1/) (2021-02-27) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1) + +**Fixed bugs:** + +- Make journal selection behavior more consistent when there's a colon with no date [\#1164](https://github.com/jrnl-org/jrnl/pull/1164) ([wren](https://github.com/wren)) **Documentation:** - Update documentation about journal-level config values [\#1196](https://github.com/jrnl-org/jrnl/issues/1196) - update per-journal config documentation [\#1199](https://github.com/jrnl-org/jrnl/pull/1199) ([sriniv27](https://github.com/sriniv27)) -## [v2.7.1-beta](https://pypi.org/project/jrnl/v2.7.1-beta/) (2021-02-20) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...v2.7.1-beta) - -**Fixed bugs:** - -- Make journal selection behavior more consistent when there's a colon with no date [\#1164](https://github.com/jrnl-org/jrnl/pull/1164) ([wren](https://github.com/wren)) - **Packaging:** - Bump cryptography from 3.4.4 to 3.4.6 [\#1195](https://github.com/jrnl-org/jrnl/pull/1195) ([dependabot[bot]](https://github.com/apps/dependabot)) From 4f79803885c955b1ce9cd908738085476d02b5e2 Mon Sep 17 00:00:00 2001 From: Suhas Date: Tue, 2 Mar 2021 21:47:57 -0500 Subject: [PATCH 0341/1132] Allow runtime configuration overrides from the commandline (#1169) Add --config-override feature * add test and argument handler for runtime override of configurations. * identify location to apply override in "main" * update gitignore * remove unneeded import * add jrnl interface test for overriden configurations * trivial whitespace change * implement runtime override * make format * refactor override unittest * clean up unused import * start writing integration test * add linewrap override scenario * implement editor override step * add dev dependencies on pytest -mock and -cov * make format * remove unused imports * make format * rename --override to --config-override * move override implementation into own module * begin TDD of dot notated overrides * rewrite behavior scenario * implement recursive config overrides * clean up unittests * iterate on behave step * make format * cleanup * move override behave tests out of core * refactor recursive code * make format * code cleanup * remove unused import * update test config * rewrite test for better mock call expect * make format * binary search misbehaving windows test * unittest multiple overrides * uncomment dot notation unittest * add multiple override scenario spec * make format * make format * update unittests for new syntax * update integ tests for new syntax * update gitignore * guard override application * deserialize function as return type * make format * organize deserialization unittests * better, more specific behave tests * test different editor launch commands * formatting * handle datatypes in deserialization and update helptext * stick to config convention in testbed * update tests ith better verifications * make format * space * review feedbac * make format * skip on win * update deps * update tests with better verifications make format space review feedbac * skip on win * update deps * refactor deserialization organize test_parse_args make format * skip on win * refactor deserialization organize test_parse_args make format * update tests ith better verifications * make format * space * make format * document apply_overrides * update gitignore * document config-override enhancement * Simplify config override syntax (#5) * update tests and expected behavior * clean up arg parsing tests * update deserialization * update deserialization * config argparse action * update override application logic * update tests; delete unused imports * override param must be list * update docstring * update test input to SUT * update remaining override unittests * make format * forgot to update CLI syntax * update documentation to sphinx style * variable renames * Lockfile merge (#7) * Add brew and gitter badges to README * Update changelog [ci skip] * Make journal selection behavior more consistent when there's a colon with no date (#1164) * Simplify config override syntax (#8) * update tests and expected behavior * clean up arg parsing tests * update deserialization * update deserialization * config argparse action * update override application logic * update tests; delete unused imports * override param must be list * update docstring * update test input to SUT * update remaining override unittests * make format * forgot to update CLI syntax * formatting * Update pyproject.toml * update lockfile to remove pytest-cov and pytest-mock deps * update docs * reuse existing mock; delete unneeded code * move overrides earlier in the execution use existing configs instead of custom make format clean up imports * update for passworded access context.parser -> parsed_args * test that no editor is launched * remove unnecessary mocks * rename variable for intent * reinstate getpass deletion * update gitignore * capture failure mode * remove unneeded imports * renamed variable * delete redundant step * comment on step * clean up step behavior description * [WIP] lock down journal access behavior * skip -> wip * correct command for overriding journal via dot keys * update wip test for updating a "temp" journal and then reading baack its entries * remove "mock" from poetry file * make CI happy * complex behavior sequence for default journal override * separate out smaller pieces of logic test that apply_overrides acts on base configuration and not the copy * defer modification of loaded configuration to update_config remove unused fixtures delete complicated UT since behavior is covered in overrides.feature integ test delete redundant UT * Update .gitignore * remove skip_win * forward override unpacking to yaml library * merge config override step with existing config_var step in core delete config_override step unify step description syntax * delete unused and redundant code * rebases are hard * remove wip tag from test * remove skipped tests for windows * Address code review yield -> return remove needless copy adjust spacing re-inline args return reset packaging info to e6c0a16342a31bc2fca1e2e865646c27bd43d0b4 revert package version for this PR * consolidate imports * Defer config_override unpacking to dict *after* base config is loaded store cli overrides without unpacking just yet move deserialize_config_args to config module delete custom Action class for config operations apply [k,v] -> {k, v} for each override update test data update import * rename deserialize_config_args to better express intent make format --- .gitignore | 7 +++ docs/advanced.md | 23 +++++++++ docs/recipes.md | 27 +++++++++++ features/overrides.feature | 98 ++++++++++++++++++++++++++++++++++++++ features/steps/core.py | 41 ++++++++++++++-- features/steps/override.py | 77 ++++++++++++++++++++++++++++++ jrnl/args.py | 23 +++++++++ jrnl/config.py | 26 ++++++++++ jrnl/jrnl.py | 7 +++ jrnl/override.py | 65 +++++++++++++++++++++++++ tests/test_override.py | 79 ++++++++++++++++++++++++++++++ tests/test_parse_args.py | 57 ++++++++++++++++++++++ 12 files changed, 526 insertions(+), 4 deletions(-) create mode 100644 features/overrides.feature create mode 100644 features/steps/override.py create mode 100644 jrnl/override.py create mode 100644 tests/test_override.py diff --git a/.gitignore b/.gitignore index afb0d874..374deb4b 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,10 @@ exp/ _extras/ *.sublime-* site/ + +.vscode/settings.json +coverage.xml +.vscode/launch.json +.coverage +.vscode/tasks.json +todo.txt diff --git a/docs/advanced.md b/docs/advanced.md index 10da134b..b1b7bef0 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -62,6 +62,29 @@ and can be edited with a plain text editor. Or use the built-in prompt or an external editor to compose your entries. +### Modifying Configurations from the Command line + +You can override a configuration field for the current instance of `jrnl` using `--config-override CONFIG_KEY CONFIG_VALUE` where `CONFIG_KEY` is a valid configuration field, specified in dot-notation and `CONFIG_VALUE` is the (valid) desired override value. + +You can specify multiple overrides as multiple calls to `--config-override`. +!!! note + These overrides allow you to modify ***any*** field of your jrnl configuration. We trust that you know what you are doing. + +#### Examples: + +``` sh +#Create an entry using the `stdin` prompt, for rapid logging +jrnl --config-override editor "" + +#Populate a project's log +jrnl --config-override journals.todo "$(git rev-parse --show-toplevel)/todo.txt" todo find my towel + +#Pass multiple overrides +jrnl --config-override display_format fancy --config-override linewrap 20 \ +--config-override colors.title green + +``` + ## Multiple journal files You can configure `jrnl`to use with multiple journals (eg. diff --git a/docs/recipes.md b/docs/recipes.md index 14e08e14..ef45666a 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -154,6 +154,33 @@ only field 1. jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)" ``` + +### Launch a terminal for rapid logging +You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately. + +```bash +jrnl now --config-override editor:"" +``` + +Bind this to a keyboard shortcut. + +Map `Super+Alt+J` to launch the terminal with jrnl prompt + +- **xbindkeys** +In your `.xbindkeysrc` + +```ini +Mod4+Mod1+j + alacritty -t floating-jrnl -e jrnl now --config-override editor:"", +``` + +- **I3 WM** Launch a floating terminal with the `jrnl` prompt + +```ini +bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor:"" +for_window[title="floating *"] floating enable +``` + ## External editors Configure your preferred external editor by updating the `editor` option diff --git a/features/overrides.feature b/features/overrides.feature new file mode 100644 index 00000000..e0cdd9f0 --- /dev/null +++ b/features/overrides.feature @@ -0,0 +1,98 @@ +Feature: Implementing Runtime Overrides for Select Configuration Keys + + Scenario: Override configured editor with built-in input === editor:'' + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override editor ''" + Then the stdin prompt should have been called + + Scenario: Postconfig commands with overrides + Given We use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl --decrypt --config-override highlight false --config-override editor nano" + Then the config should have "highlight" set to "bool:false" + And no editor should have been called + + Scenario: Override configured linewrap with a value of 23 + Given we use the config "simple.yaml" + And we use the password "test" if prompted + When we run "jrnl -2 --config-override linewrap 23 --format fancy" + Then the output should be + + """ + ┎─────╮2013-06-09 15:39 + ┃ My ╘═══════════════╕ + ┃ fir st ent ry. │ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ Everything is │ + ┃ alright │ + ┖─────────────────────┘ + ┎─────╮2013-06-10 15:40 + ┃ Lif ╘═══════════════╕ + ┃ e is goo d. │ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ But I'm better. │ + ┖─────────────────────┘ + """ + + Scenario: Override color selections with runtime overrides + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl -1 --config-override colors.body blue" + Then the config should have "colors.body" set to "blue" + + Scenario: Apply multiple config overrides + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl -1 --config-override colors.body green --config-override editor 'nano'" + Then the config should have "colors.body" set to "green" + And the config should have "editor" set to "nano" + + + Scenario Outline: Override configured editor + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override editor ''" + Then the editor should have been called + Examples: Editor Commands + | editor | + | nano | + | vi -c startinsert | + | code -w | + + Scenario: Override default journal + Given we use the config "basic_dayone.yaml" + And we use the password "test" if prompted + When we run "jrnl --debug --config-override journals.default features/journals/simple.journal 20 Mar 2000: The rain in Spain comes from clouds" + Then we should get no error + And we should see the message "Entry added" + When we run "jrnl -3 --debug --config-override journals.default features/journals/simple.journal" + Then the output should be + """ + 2000-03-20 09:00 The rain in Spain comes from clouds + + 2013-06-09 15:39 My first entry. + | Everything is alright + + 2013-06-10 15:40 Life is good. + | But I'm better. + """ + + + Scenario: Make an entry into an overridden journal + Given we use the config "basic_dayone.yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override journals.temp features/journals/simple.journal temp Sep 06 1969: @say Ni" + Then we should get no error + And we should see the message "Entry added" + When we run "jrnl --config-override journals.temp features/journals/simple.journal temp -3" + Then the output should be + """ + 1969-09-06 09:00 @say Ni + + 2013-06-09 15:39 My first entry. + | Everything is alright + + 2013-06-10 15:40 Life is good. + | But I'm better. + """ diff --git a/features/steps/core.py b/features/steps/core.py index abac4917..f471acfb 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -3,6 +3,7 @@ import ast from collections import defaultdict +from jrnl.args import parse_args import os from pathlib import Path import re @@ -13,8 +14,11 @@ from behave import given from behave import then from behave import when import keyring + import toml import yaml +from yaml.loader import FullLoader + import jrnl.time from jrnl import Journal @@ -23,6 +27,7 @@ from jrnl import plugins from jrnl.cli import cli from jrnl.config import load_config from jrnl.os_compat import split_args +from jrnl.override import apply_overrides, _recursively_apply try: import parsedatetime.parsedatetime_consts as pdt @@ -114,8 +119,15 @@ def read_value_from_string(string): return ast.literal_eval(string) # Takes strings like "bool:true" or "int:32" and coerces them into proper type - t, value = string.split(":") - value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t](value) + string_parts = string.split(":") + if len(string_parts) > 1: + type = string_parts[0] + value = string_parts[1:][0] # rest of the text + value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[type]( + value + ) + else: + value = string_parts[0] return value @@ -315,6 +327,7 @@ def run_with_input(context, command, inputs=""): text = iter([inputs]) args = split_args(command)[1:] + context.args = args def _mock_editor(command): context.editor_command = command @@ -397,8 +410,13 @@ def run(context, command, text=""): if "cache_dir" in context and context.cache_dir is not None: cache_dir = os.path.join("features", "cache", context.cache_dir) command = command.format(cache_dir=cache_dir) + if "config_path" in context and context.config_path is not None: + with open(context.config_path, "r") as f: + cfg = yaml.load(f, Loader=FullLoader) + context.jrnl_config = cfg args = split_args(command) + context.args = args[1:] def _mock_editor(command): context.editor_command = command @@ -604,14 +622,29 @@ def journal_exists(context, journal_name="default"): @then('the config should have "{key}" set to "{value}"') @then('the config for journal "{journal}" should have "{key}" set to "{value}"') def config_var(context, key, value="", journal=None): + key_as_vec = key.split(".") + + if "args" in context: + parsed = parse_args(context.args) + overrides = parsed.config_override value = read_value_from_string(value or context.text or "") configuration = load_config(context.config_path) if journal: configuration = configuration["journals"][journal] - assert key in configuration - assert configuration[key] == value + if overrides: + with patch.object( + jrnl.override, "_recursively_apply", wraps=_recursively_apply + ) as spy_recurse: + configuration = apply_overrides(overrides, configuration) + runtime_cfg = spy_recurse.call_args_list[0][0][0] + else: + runtime_cfg = configuration + # extract the value of the desired key from the configuration after overrides have been applied + for k in key_as_vec: + runtime_cfg = runtime_cfg["%s" % k] + assert runtime_cfg == value @then('the config for journal "{journal}" should not have "{key}" set') diff --git a/features/steps/override.py b/features/steps/override.py new file mode 100644 index 00000000..ff1760ed --- /dev/null +++ b/features/steps/override.py @@ -0,0 +1,77 @@ +from jrnl.jrnl import run +from unittest import mock + +# from __future__ import with_statement +from jrnl.args import parse_args +from behave import then + +from features.steps.core import _mock_getpass, _mock_time_parse + + +@then("the editor {editor} should have been called") +@then("No editor should have been called") +def editor_override(context, editor=None): + def _mock_write_in_editor(config): + editor = config["editor"] + journal = "features/journals/journal.jrnl" + context.tmpfile = journal + print("%s has been launched" % editor) + return journal + + if "password" in context: + password = context.password + else: + password = "" + # fmt: off + # see: https://github.com/psf/black/issues/664 + with \ + mock.patch("jrnl.jrnl._write_in_editor", side_effect=_mock_write_in_editor(context.jrnl_config)) as mock_write_in_editor, \ + mock.patch("sys.stdin.isatty", return_value=True), \ + mock.patch('getpass.getpass',side_effect=_mock_getpass(password)), \ + mock.patch("jrnl.time.parse", side_effect = _mock_time_parse(context)), \ + mock.patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ + mock.patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ + : + try : + parsed_args = parse_args(context.args) + run(parsed_args) + context.exit_status = 0 + context.editor = mock_write_in_editor + expected_config = context.jrnl_config + expected_config['editor'] = '%s'%editor + expected_config['journal'] ='features/journals/journal.jrnl' + + if editor is not None: + assert mock_write_in_editor.call_count == 1 + assert mock_write_in_editor.call_args[0][0]['editor']==editor + else: + # Expect that editor is *never* called + mock_write_in_editor.assert_not_called() + except SystemExit as e: + context.exit_status = e.code + # fmt: on + + +@then("the stdin prompt should have been called") +def override_editor_to_use_stdin(context): + + try: + with mock.patch( + "sys.stdin.read", + return_value="Zwei peanuts walk into a bar und one of zem was a-salted", + ) as mock_stdin_read, mock.patch( + "jrnl.install.load_or_install_jrnl", return_value=context.jrnl_config + ), mock.patch( + "jrnl.Journal.open_journal", + spec=False, + return_value="features/journals/journal.jrnl", + ), mock.patch( + "getpass.getpass", side_effect=_mock_getpass("test") + ): + parsed_args = parse_args(context.args) + run(parsed_args) + context.exit_status = 0 + mock_stdin_read.assert_called_once() + + except SystemExit as e: + context.exit_status = e.code diff --git a/jrnl/args.py b/jrnl/args.py index f934ca16..c8bd7743 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -314,6 +314,29 @@ def parse_args(args=[]): help=argparse.SUPPRESS, ) + config_overrides = parser.add_argument_group( + "Config file override", + textwrap.dedent("Apply a one-off override of the config file option"), + ) + config_overrides.add_argument( + "--config-override", + dest="config_override", + action="append", + type=str, + nargs=2, + default=[], + metavar="CONFIG_KV_PAIR", + help=""" + Override configured key-value pair with CONFIG_KV_PAIR for this command invocation only. + + Examples: \n + \t - Use a different editor for this jrnl entry, call: \n + \t jrnl --config-override editor: "nano" \n + \t - Override color selections\n + \t jrnl --config-override colors.body blue --config-override colors.title green + """, + ) + # Handle '-123' as a shortcut for '-n 123' num = re.compile(r"^-(\d+)$") args = [num.sub(r"-n \1", arg) for arg in args] diff --git a/jrnl/config.py b/jrnl/config.py index a5a1d1cc..da2df2cc 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -19,6 +19,32 @@ XDG_RESOURCE = "jrnl" DEFAULT_JOURNAL_NAME = "journal.txt" DEFAULT_JOURNAL_KEY = "default" +YAML_SEPARATOR = ": " + + +def make_yaml_valid_dict(input: list) -> dict: + + """ + + Convert a two-element list of configuration key-value pair into a flat dict. + + The dict is created through the yaml loader, with the assumption that + "input[0]: input[1]" is valid yaml. + + :param input: list of configuration keys in dot-notation and their respective values. + :type input: list + :return: A single level dict of the configuration keys in dot-notation and their respective desired values + :rtype: dict + """ + + assert len(input) == 2 + + # yaml compatible strings are of the form Key:Value + yamlstr = YAML_SEPARATOR.join(input) + runtime_modifications = yaml.load(yamlstr, Loader=yaml.FullLoader) + + return runtime_modifications + def save_config(config): config["version"] = __version__ diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 257358c4..383cceee 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -16,6 +16,7 @@ from .editor import get_text_from_editor from .editor import get_text_from_stdin from .exception import UserAbort from . import time +from .override import apply_overrides def run(args): @@ -37,6 +38,12 @@ def run(args): try: config = install.load_or_install_jrnl() original_config = config.copy() + + # Apply config overrides + overrides = args.config_override + if overrides: + config = apply_overrides(overrides, config) + args = get_journal_name(args, config) config = scope_config(config, args.journal_name) except UserAbort as err: diff --git a/jrnl/override.py b/jrnl/override.py new file mode 100644 index 00000000..7fd718f0 --- /dev/null +++ b/jrnl/override.py @@ -0,0 +1,65 @@ +from .config import update_config, make_yaml_valid_dict + +# import logging +def apply_overrides(overrides: list, base_config: dict) -> dict: + """Unpack CLI provided overrides into the configuration tree. + + :param overrides: List of configuration key-value pairs collected from the CLI + :type overrides: list + :param base_config: Configuration Loaded from the saved YAML + :type base_config: dict + :return: Configuration to be used during runtime with the overrides applied + :rtype: dict + """ + cfg_with_overrides = base_config.copy() + for pairs in overrides: + + pairs = make_yaml_valid_dict(pairs) + key_as_dots, override_value = _get_key_and_value_from_pair(pairs) + keys = _convert_dots_to_list(key_as_dots) + cfg_with_overrides = _recursively_apply( + cfg_with_overrides, keys, override_value + ) + + update_config(base_config, cfg_with_overrides, None) + return base_config + + +def _get_key_and_value_from_pair(pairs): + key_as_dots, override_value = list(pairs.items())[0] + return key_as_dots, override_value + + +def _convert_dots_to_list(key_as_dots): + keys = key_as_dots.split(".") + keys = [k for k in keys if k != ""] # remove empty elements + return keys + + +def _recursively_apply(tree: dict, nodes: list, override_value) -> dict: + """Recurse through configuration and apply overrides at the leaf of the config tree + + Credit to iJames on SO: https://stackoverflow.com/a/47276490 for algorithm + + Args: + config (dict): Configuration to modify + nodes (list): Vector of override keys; the length of the vector indicates tree depth + override_value (str): Runtime override passed from the command-line + """ + key = nodes[0] + if len(nodes) == 1: + tree[key] = override_value + else: + next_key = nodes[1:] + next_node = _get_config_node(tree, key) + _recursively_apply(next_node, next_key, override_value) + + return tree + + +def _get_config_node(config: dict, key: str): + if key in config: + pass + else: + config[key] = None + return config[key] diff --git a/tests/test_override.py b/tests/test_override.py new file mode 100644 index 00000000..32ec0595 --- /dev/null +++ b/tests/test_override.py @@ -0,0 +1,79 @@ +import pytest + +from jrnl.override import ( + apply_overrides, + _recursively_apply, + _get_config_node, + _get_key_and_value_from_pair, + _convert_dots_to_list, +) + + +@pytest.fixture() +def minimal_config(): + cfg = { + "colors": {"body": "red", "date": "green"}, + "default": "/tmp/journal.jrnl", + "editor": "vim", + "journals": {"default": "/tmp/journals/journal.jrnl"}, + } + return cfg + + +def test_apply_override(minimal_config): + overrides = [["editor", "nano"]] + apply_overrides(overrides, minimal_config) + assert minimal_config["editor"] == "nano" + + +def test_override_dot_notation(minimal_config): + overrides = [["colors.body", "blue"]] + + cfg = apply_overrides(overrides=overrides, base_config=minimal_config) + assert cfg["colors"] == {"body": "blue", "date": "green"} + + +def test_multiple_overrides(minimal_config): + overrides = [ + ["colors.title", "magenta"], + ["editor", "nano"], + ["journals.burner", "/tmp/journals/burner.jrnl"], + ] # as returned by parse_args, saved in parser.config_override + + cfg = apply_overrides(overrides, minimal_config) + assert cfg["editor"] == "nano" + assert cfg["colors"]["title"] == "magenta" + assert "burner" in cfg["journals"] + assert cfg["journals"]["burner"] == "/tmp/journals/burner.jrnl" + + +def test_recursively_apply(): + cfg = {"colors": {"body": "red", "title": "green"}} + cfg = _recursively_apply(cfg, ["colors", "body"], "blue") + assert cfg["colors"]["body"] == "blue" + + +def test_get_config_node(minimal_config): + assert len(minimal_config.keys()) == 4 + assert _get_config_node(minimal_config, "editor") == "vim" + assert _get_config_node(minimal_config, "display_format") == None + + +def test_get_kv_from_pair(): + pair = {"ab.cde": "fgh"} + k, v = _get_key_and_value_from_pair(pair) + assert k == "ab.cde" + assert v == "fgh" + + +class TestDotNotationToList: + def test_unpack_dots_to_list(self): + + keys = "a.b.c.d.e.f" + keys_list = _convert_dots_to_list(keys) + assert len(keys_list) == 6 + + def test_sequential_delimiters(self): + k = "g.r..h.v" + k_l = _convert_dots_to_list(k) + assert len(k_l) == 4 diff --git a/tests/test_parse_args.py b/tests/test_parse_args.py index 252638c9..4b140fc1 100644 --- a/tests/test_parse_args.py +++ b/tests/test_parse_args.py @@ -3,6 +3,7 @@ import shlex import pytest from jrnl.args import parse_args +from jrnl.config import make_yaml_valid_dict def cli_as_dict(str): @@ -35,6 +36,7 @@ def expected_args(**kwargs): "strict": False, "tags": False, "text": [], + "config_override": [], } return {**default_args, **kwargs} @@ -205,6 +207,31 @@ def test_version_alone(): assert cli_as_dict("--version") == expected_args(preconfig_cmd=preconfig_version) +def test_editor_override(): + + parsed_args = cli_as_dict('--config-override editor "nano"') + assert parsed_args == expected_args(config_override=[["editor", "nano"]]) + + +def test_color_override(): + assert cli_as_dict("--config-override colors.body blue") == expected_args( + config_override=[["colors.body", "blue"]] + ) + + +def test_multiple_overrides(): + parsed_args = cli_as_dict( + '--config-override colors.title green --config-override editor "nano" --config-override journal.scratchpad "/tmp/scratchpad"' + ) + assert parsed_args == expected_args( + config_override=[ + ["colors.title", "green"], + ["editor", "nano"], + ["journal.scratchpad", "/tmp/scratchpad"], + ] + ) + + # @see https://github.com/jrnl-org/jrnl/issues/520 @pytest.mark.parametrize( "cli", @@ -233,3 +260,33 @@ def test_and_ordering(cli): def test_edit_ordering(cli): result = expected_args(edit=True, text=["second", "@oldtag", "@newtag"]) assert cli_as_dict(cli) == result + + +class TestDeserialization: + @pytest.mark.parametrize( + "input_str", + [ + ["editor", "nano"], + ["colors.title", "blue"], + ["default", "/tmp/egg.txt"], + ], + ) + def test_deserialize_multiword_strings(self, input_str): + + runtime_config = make_yaml_valid_dict(input_str) + assert runtime_config.__class__ == dict + assert input_str[0] in runtime_config.keys() + assert runtime_config[input_str[0]] == input_str[1] + + def test_deserialize_multiple_datatypes(self): + cfg = make_yaml_valid_dict(["linewrap", "23"]) + assert cfg["linewrap"] == 23 + + cfg = make_yaml_valid_dict(["encrypt", "false"]) + assert cfg["encrypt"] == False + + cfg = make_yaml_valid_dict(["editor", "vi -c startinsert"]) + assert cfg["editor"] == "vi -c startinsert" + + cfg = make_yaml_valid_dict(["highlight", "true"]) + assert cfg["highlight"] == True From 1d222d67d51754a3a3ff78ceef7d304945b45b2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Mar 2021 18:49:29 -0800 Subject: [PATCH 0342/1132] Bump asteval from 0.9.22 to 0.9.23 (#1209) Bumps [asteval](https://github.com/newville/asteval) from 0.9.22 to 0.9.23. - [Release notes](https://github.com/newville/asteval/releases) - [Commits](https://github.com/newville/asteval/compare/0.9.22...0.9.23) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6418862f..860d37c1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -33,7 +33,7 @@ test = ["coverage", "flake8", "pexpect", "wheel"] [[package]] name = "asteval" -version = "0.9.22" +version = "0.9.23" description = "Safe, minimalistic evaluator of python expression using ast module" category = "main" optional = false @@ -633,7 +633,7 @@ argcomplete = [ {file = "argcomplete-1.12.2.tar.gz", hash = "sha256:de0e1282330940d52ea92a80fea2e4b9e0da1932aaa570f84d268939d1897b04"}, ] asteval = [ - {file = "asteval-0.9.22.tar.gz", hash = "sha256:74a0939765fc6b1421e6672ccf74c52edc3c7af7d6a8298b057b0d50ac51aea8"}, + {file = "asteval-0.9.23.tar.gz", hash = "sha256:f5096a924b1d2f147e70327245d95fc8f534dbe94277b6828ce2a8c049d3a438"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -699,11 +699,16 @@ colorama = [ ] cryptography = [ {file = "cryptography-3.4.6-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:57ad77d32917bc55299b16d3b996ffa42a1c73c6cfa829b14043c561288d2799"}, + {file = "cryptography-3.4.6-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:4169a27b818de4a1860720108b55a2801f32b6ae79e7f99c00d79f2a2822eeb7"}, {file = "cryptography-3.4.6-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:93cfe5b7ff006de13e1e89830810ecbd014791b042cbe5eec253be11ac2b28f3"}, {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:5ecf2bcb34d17415e89b546dbb44e73080f747e504273e4d4987630493cded1b"}, {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:fec7fb46b10da10d9e1d078d1ff8ed9e05ae14f431fdbd11145edd0550b9a964"}, {file = "cryptography-3.4.6-cp36-abi3-win32.whl", hash = "sha256:df186fcbf86dc1ce56305becb8434e4b6b7504bc724b71ad7a3239e0c9d14ef2"}, {file = "cryptography-3.4.6-cp36-abi3-win_amd64.whl", hash = "sha256:66b57a9ca4b3221d51b237094b0303843b914b7d5afd4349970bb26518e350b0"}, + {file = "cryptography-3.4.6-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:066bc53f052dfeda2f2d7c195cf16fb3e5ff13e1b6b7415b468514b40b381a5b"}, + {file = "cryptography-3.4.6-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:600cf9bfe75e96d965509a4c0b2b183f74a4fa6f5331dcb40fb7b77b7c2484df"}, + {file = "cryptography-3.4.6-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:0923ba600d00718d63a3976f23cab19aef10c1765038945628cd9be047ad0336"}, + {file = "cryptography-3.4.6-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:9e98b452132963678e3ac6c73f7010fe53adf72209a32854d55690acac3f6724"}, {file = "cryptography-3.4.6.tar.gz", hash = "sha256:2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87"}, ] future = [ From 0560963c63208736cc64e95995bf761987c55b2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Mar 2021 18:49:50 -0800 Subject: [PATCH 0343/1132] Bump keyring from 22.0.1 to 22.3.0 (#1210) Bumps [keyring](https://github.com/jaraco/keyring) from 22.0.1 to 22.3.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v22.0.1...v22.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 860d37c1..4c558280 100644 --- a/poetry.lock +++ b/poetry.lock @@ -212,7 +212,7 @@ python-versions = ">=3.6" [[package]] name = "keyring" -version = "22.0.1" +version = "22.3.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -226,7 +226,7 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "livereload" @@ -735,8 +735,8 @@ joblib = [ {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, ] keyring = [ - {file = "keyring-22.0.1-py3-none-any.whl", hash = "sha256:9f44660a5d4931bdc14c08a1d01ef30b18a7a8147380710d8c9f9531e1f6c3c0"}, - {file = "keyring-22.0.1.tar.gz", hash = "sha256:9acb3e1452edbb7544822b12fd25459078769e560fa51f418b6d00afaa6178df"}, + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, From 5a44385a542075269daf8a8bcdf06043bb992b63 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Wed, 3 Mar 2021 02:51:39 +0000 Subject: [PATCH 0344/1132] Update changelog [ci skip] --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f85eae2b..7a938b7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...HEAD) + +**Implemented enhancements:** + +- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) + +**Fixed bugs:** + +- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208) + +**Packaging:** + +- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.7.1](https://pypi.org/project/jrnl/v2.7.1/) (2021-02-27) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1) From b9cf470871cbe691ce2bc2846a5d1bd7453bb93f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 6 Mar 2021 07:18:35 -0800 Subject: [PATCH 0345/1132] Add pypi links for documentation, issue tracking, and funding (#1204) --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e87de592..925a936c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,11 @@ classifiers = [ "Operating System :: OS Independent" ] +[tool.poetry.urls] +"Documentation" = "https://jrnl.sh" +"Issue Tracker" = "https://github.com/jrnl-org/jrnl/issues" +"Funding" = "https://opencollective.com/jrnl" + [tool.poetry.dependencies] python = ">=3.7.0, <3.10" From b9a6d029e21bb8f97fe7a720329f98ef323b16c8 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Mar 2021 15:20:14 +0000 Subject: [PATCH 0346/1132] Update changelog [ci skip] --- CHANGELOG.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a938b7f..5d04559f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,3 @@ -# Changelog - -## [Unreleased](https://github.com/jrnl-org/jrnl/) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...HEAD) - -**Implemented enhancements:** - -- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) - -**Fixed bugs:** - -- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208) - -**Packaging:** - -- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) - ## [v2.7.1](https://pypi.org/project/jrnl/v2.7.1/) (2021-02-27) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1) @@ -616,6 +597,3 @@ ## v0.0 (2012-03-29) * __0.0.1__ Composing entries works. That's pretty much it. - - -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From a3f4f6b944984fae22d2eab8813caf5765095baf Mon Sep 17 00:00:00 2001 From: Suhas Date: Sat, 6 Mar 2021 13:47:03 -0500 Subject: [PATCH 0347/1132] Fix bug that prevented --format pretty and --format short from working (#1177) --- features/format.feature | 26 ++++++++++++++++++++++++++ features/steps/core.py | 6 ++++++ features/steps/export_steps.py | 2 +- jrnl/jrnl.py | 5 ++++- jrnl/plugins/__init__.py | 2 ++ tests/test_color.py | 17 +++++++++++++++++ tests/test_display.py | 23 +++++++++++++++++++++++ 7 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 tests/test_color.py create mode 100644 tests/test_display.py diff --git a/features/format.feature b/features/format.feature index 4981f685..7bdaac4d 100644 --- a/features/format.feature +++ b/features/format.feature @@ -1,5 +1,31 @@ Feature: Custom formats + Scenario Outline: Short printing via --format flag + Given We use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --format short -3" + Then we should get no error + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Pretty Printing aka the Default + Given We use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --format pretty -3" + Then we should get no error + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + Scenario Outline: JSON format Given we use the config ".yaml" And we use the password "test" if prompted diff --git a/features/steps/core.py b/features/steps/core.py index f471acfb..ac5d8950 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -407,6 +407,12 @@ def all_input_was_used(context): def run(context, command, text=""): text = text or context.text or "" + if "config_path" in context and context.config_path is not None: + with open(context.config_path) as f: + context.jrnl_config = yaml.load(f, Loader=yaml.FullLoader) + else: + context.jrnl_config = None + if "cache_dir" in context and context.cache_dir is not None: cache_dir = os.path.join("features", "cache", context.cache_dir) command = command.format(cache_dir=cache_dir) diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py index f885591c..3df86237 100644 --- a/features/steps/export_steps.py +++ b/features/steps/export_steps.py @@ -1,13 +1,13 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html + import json import os import shutil import random import string from xml.etree import ElementTree - from behave import given from behave import then diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 383cceee..cf2b3bbb 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -323,9 +323,12 @@ def _delete_search_results(journal, old_entries, **kwargs): def _display_search_results(args, journal, **kwargs): - if args.short: + if args.short or args.export == "short": print(journal.pprint(short=True)) + elif args.export == "pretty": + print(journal.pprint()) + elif args.tags: print(plugins.get_exporter("tags").export(journal)) diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index ad174f0b..3eb4d5a2 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -27,6 +27,8 @@ __exporters = [ __importers = [JRNLImporter] __exporter_types = {name: plugin for plugin in __exporters for name in plugin.names} +__exporter_types["pretty"] = None +__exporter_types["short"] = None __importer_types = {name: plugin for plugin in __importers for name in plugin.names} EXPORT_FORMATS = sorted(__exporter_types.keys()) diff --git a/tests/test_color.py b/tests/test_color.py new file mode 100644 index 00000000..14dc7938 --- /dev/null +++ b/tests/test_color.py @@ -0,0 +1,17 @@ +import pytest + +from jrnl.color import colorize +from colorama import Fore, Style + + +@pytest.fixture() +def data_fixture(): + string = "Zwei peanuts walked into a bar" + yield string + + +def test_colorize(data_fixture): + string = data_fixture + colorized_string = colorize(string, "BLUE", True) + + assert colorized_string == Style.BRIGHT + Fore.BLUE + string + Style.RESET_ALL diff --git a/tests/test_display.py b/tests/test_display.py new file mode 100644 index 00000000..72a9c451 --- /dev/null +++ b/tests/test_display.py @@ -0,0 +1,23 @@ +import argparse +import jrnl +import pytest +from unittest import mock +from jrnl.jrnl import _display_search_results + + +# fmt: off +# see: https://github.com/psf/black/issues/664 +@pytest.mark.parametrize("export_format", [ "pretty", "short","markdown"]) +#fmt: on +@mock.patch.object(argparse, "Namespace", return_value={"export": "markdown", "filename": "irrele.vant"}) +def test_export_format(mock_args, export_format): + + test_journal = jrnl.Journal.Journal + mock_args.export = export_format + #fmt: off + # see: https://github.com/psf/black/issues/664 + with mock.patch("builtins.print") as mock_spy_print, \ + mock.patch('jrnl.Journal.Journal.pprint') as mock_pprint: + _display_search_results(mock_args, test_journal) + mock_spy_print.assert_called_once_with(mock_pprint()) + #fmt: on From c3ddd7f2bfc20eadf8a3c08f40db65ff2e05ce1d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Mar 2021 18:48:31 +0000 Subject: [PATCH 0348/1132] Update changelog [ci skip] --- CHANGELOG.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d04559f..2e003e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,26 @@ -## [v2.7.1](https://pypi.org/project/jrnl/v2.7.1/) (2021-02-27) +# Changelog + +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...HEAD) + +**Implemented enhancements:** + +- Add pypi project links [\#1197](https://github.com/jrnl-org/jrnl/issues/1197) +- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) + +**Fixed bugs:** + +- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208) +- `jrnl --format short` returns an error [\#1173](https://github.com/jrnl-org/jrnl/issues/1173) +- `jrnl --format pretty` returns an error [\#1172](https://github.com/jrnl-org/jrnl/issues/1172) +- Fix bug that prevented --format pretty and --format short from working [\#1177](https://github.com/jrnl-org/jrnl/pull/1177) ([sriniv27](https://github.com/sriniv27)) + +**Packaging:** + +- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) + [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1) @@ -597,3 +619,6 @@ ## v0.0 (2012-03-29) * __0.0.1__ Composing entries works. That's pretty much it. + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 06e5b4baf61ab4bc2799608a0e419a53cd01e6ea Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 6 Mar 2021 13:47:11 -0800 Subject: [PATCH 0349/1132] Fix broken brew release process (#1211) * Add homebrew symlink for releases * Fix indentation problem * Fix bad env var name * Change filename to formula name * Fix formula name * Attempt tap instead of symlink * Fix formula repo referece * add tracer * Attempt working directory fix * Remove --unshallow * Use token for remote * Move set tap directory step * Remove tracer * Clean up spacing and wrap quotes to tap directory --- .github/workflows/release.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3d57918a..7b4dfb18 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -116,7 +116,6 @@ jobs: HOMEBREW_NO_INSTALL_CLEANUP: 1 HOME_REPO: ${{ secrets.HOME_REPO }} steps: - - name: Get version run: | JRNL_VERSION="${{ github.event.inputs.version }}" @@ -153,23 +152,26 @@ jobs: } >> $GITHUB_ENV fi - - name: Checkout homebrew repo - uses: actions/checkout@v2 - with: - token: ${{ secrets.JRNL_BOT_TOKEN }} - repository: ${{ env.FORMULA_REPO }} + - name: Tap formula + run: | + brew tap ${FORMULA_REPO} + echo '::debug::Set tap directory' + echo "BREW_TAP_DIRECTORY='$(brew --repository)/Library/Taps/${FORMULA_REPO}'" >> $GITHUB_ENV - name: Config git user + working-directory: ${{ env.BREW_TAP_DIRECTORY }} run: | git config --global user.name "${{ secrets.JRNL_BOT_NAME }}" git config --global user.email "${{ secrets.JRNL_BOT_EMAIL }}" - name: Create branch + working-directory: ${{ env.BREW_TAP_DIRECTORY }} run: | BRANCH_NAME="jrnl-${JRNL_VERSION}--${RANDOM}" git remote rename origin upstream - git remote add origin "https://github.com/${BOT_REPO}.git" - git fetch --unshallow upstream + git remote add origin "https://${{ secrets.JRNL_BOT_NAME }}:${{ secrets.JRNL_BOT_TOKEN }}@github.com/${BOT_REPO}.git" + + git fetch upstream git fetch origin git checkout -b $BRANCH_NAME git push -u origin $BRANCH_NAME @@ -202,7 +204,7 @@ jobs: max_attempts: 6 retry_wait_seconds: 30 command: > - brew bump-formula-pr "Formula/${FORMULA_NAME}.rb" + brew bump-formula-pr "${FORMULA_NAME}" --url $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json) --sha256 $(jq ".releases[\"${PYPI_VERSION}\"][1].digests.sha256" -r api_response.json) --version=$PYPI_VERSION @@ -213,6 +215,7 @@ jobs: --verbose - name: Update commit message + working-directory: ${{ env.BREW_TAP_DIRECTORY }} run: | git commit --amend \ -m "jrnl ${JRNL_VERSION}" \ @@ -220,11 +223,13 @@ jobs: -m '${{ secrets.RELEASE_COAUTHORS }}' - name: Push commit + working-directory: ${{ env.BREW_TAP_DIRECTORY }} run: | git show head git push - name: Open pull request + working-directory: ${{ env.BREW_TAP_DIRECTORY }} env: GH_TOKEN: ${{ secrets.JRNL_BOT_TOKEN }} run: > From 66395464132b3f034fc70c3074eb4bf188614dc8 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 6 Mar 2021 14:01:03 -0800 Subject: [PATCH 0350/1132] Remove global flag from git config --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7b4dfb18..0c020811 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -161,8 +161,8 @@ jobs: - name: Config git user working-directory: ${{ env.BREW_TAP_DIRECTORY }} run: | - git config --global user.name "${{ secrets.JRNL_BOT_NAME }}" - git config --global user.email "${{ secrets.JRNL_BOT_EMAIL }}" + git config user.name "${{ secrets.JRNL_BOT_NAME }}" + git config user.email "${{ secrets.JRNL_BOT_EMAIL }}" - name: Create branch working-directory: ${{ env.BREW_TAP_DIRECTORY }} From df151d4dbce2369859a90097801dbd32e902b467 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 6 Mar 2021 14:05:48 -0800 Subject: [PATCH 0351/1132] Add --local flag in git config calls --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c020811..32912a9f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -161,8 +161,8 @@ jobs: - name: Config git user working-directory: ${{ env.BREW_TAP_DIRECTORY }} run: | - git config user.name "${{ secrets.JRNL_BOT_NAME }}" - git config user.email "${{ secrets.JRNL_BOT_EMAIL }}" + git config --local user.name "${{ secrets.JRNL_BOT_NAME }}" + git config --local user.email "${{ secrets.JRNL_BOT_EMAIL }}" - name: Create branch working-directory: ${{ env.BREW_TAP_DIRECTORY }} From 1714d1eeef4ac3f366de619b5df95d7966d2839d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Mar 2021 22:18:39 +0000 Subject: [PATCH 0352/1132] Increment version to v2.7.2-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 36d130de..3c06caa8 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.7.1" +__version__ = "v2.7.2-beta" diff --git a/pyproject.toml b/pyproject.toml index 925a936c..6950cd1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.7.1" +version = "v2.7.2-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 98863bcc23703eaaed9df802f48d2767706f4ebb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Mar 2021 11:09:59 -0800 Subject: [PATCH 0353/1132] Bump keyring from 22.3.0 to 23.0.0 (#1213) Bumps [keyring](https://github.com/jaraco/keyring) from 22.3.0 to 23.0.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v22.3.0...v23.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4c558280..f92282e3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -156,18 +156,19 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "importlib-metadata" -version = "3.1.1" +version = "3.7.2" description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -212,14 +213,14 @@ python-versions = ">=3.6" [[package]] name = "keyring" -version = "22.3.0" +version = "23.0.0" description = "Store and access your passwords safely." category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +importlib-metadata = ">=3.6" jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} @@ -562,7 +563,7 @@ python-versions = "*" name = "typing-extensions" version = "3.7.4.3" description = "Backported and Experimental Type Hints for Python 3.5+" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -715,8 +716,8 @@ future = [ {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, ] importlib-metadata = [ - {file = "importlib_metadata-3.1.1-py3-none-any.whl", hash = "sha256:6112e21359ef8f344e7178aa5b72dc6e62b38b0d008e6d3cb212c5b84df72013"}, - {file = "importlib_metadata-3.1.1.tar.gz", hash = "sha256:b0c2d3b226157ae4517d9625decf63591461c66b3a808c2666d538946519d170"}, + {file = "importlib_metadata-3.7.2-py3-none-any.whl", hash = "sha256:407d13f55dc6f2a844e62325d18ad7019a436c4bfcaee34cda35f2be6e7c3e34"}, + {file = "importlib_metadata-3.7.2.tar.gz", hash = "sha256:18d5ff601069f98d5d605b6a4b50c18a34811d655c55548adc833e687289acde"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -735,8 +736,8 @@ joblib = [ {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, ] keyring = [ - {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, - {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, + {file = "keyring-23.0.0-py3-none-any.whl", hash = "sha256:29f407fd5509c014a6086f17338c70215c8d1ab42d5d49e0254273bc0a64bbfc"}, + {file = "keyring-23.0.0.tar.gz", hash = "sha256:237ff44888ba9b3918a7dcb55c8f1db909c95b6f071bfb46c6918f33f453a68a"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, From 1c66ac2da22665ee78e2acdba9970b1578254535 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Mar 2021 19:29:14 +0000 Subject: [PATCH 0354/1132] Increment version to v2.8-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 3c06caa8..790c604a 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.7.2-beta" +__version__ = "v2.8-beta" diff --git a/pyproject.toml b/pyproject.toml index 6950cd1f..32018559 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.7.2-beta" +version = "v2.8-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 7bacf4a5f0026d271e17b1558153bebfe9a40cde Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Mar 2021 13:22:16 -0800 Subject: [PATCH 0355/1132] Changelog generator fixes There were several problems that this fixes: - shallow fetch broke merging to release branch - bad changelog was only outputting error msg (not exiting) - latest version being on first line deleted itself and broke the changelog updates This also has manual fixes to the changelog to bring it up to date. Co-authored-by: Micah Jerome Ellison --- .github/workflows/changelog.yaml | 9 +++++++++ CHANGELOG.md | 27 +++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index dc52daed..c8d184ec 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -85,6 +85,13 @@ jobs: exit 1 fi + if [[ $tagline == 1 ]]; then + echo "::error::Something is wrong." + echo "::error::The latest release ${SINCE_TAG} is the first line in the changelog," + echo "::error::but the h1 '# Changelog' should always be the first line." + exit 1 + fi + sed -i "1,$(expr $tagline - 1)d" "$FILENAME" # delete generated line (or it will be added multiple times) sed -i '/This Changelog was automatically generated by/d' "$FILENAME" @@ -124,6 +131,7 @@ jobs: git diff if [[ $(grep -c '^# Changelog$' "$FILENAME") != 1 ]]; then echo '::error::Something is wrong with the changelog.' + exit 1 fi SOMETHING_CHANGED=false git diff --exit-code || SOMETHING_CHANGED=true @@ -142,6 +150,7 @@ jobs: - name: Merge to Release branch if: env.FULL_RELEASE == 'true' run: | + git fetch --unshallow origin git checkout release git merge --ff-only $BRANCH git push origin release diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e003e80..17059d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,7 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...HEAD) +## [v2.8-beta](https://pypi.org/project/jrnl/v2.8-beta/) (2021-03-13) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.2-beta...HEAD) **Implemented enhancements:** @@ -21,8 +20,28 @@ - Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) +## [v2.7.2-beta](https://pypi.org/project/jrnl/v2.7.2-beta/) (2021-03-06) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...v2.7.2-beta) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1) +**Implemented enhancements:** + +- Add pypi project links [\#1197](https://github.com/jrnl-org/jrnl/issues/1197) +- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) + +**Fixed bugs:** + +- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208) +- `jrnl --format short` returns an error [\#1173](https://github.com/jrnl-org/jrnl/issues/1173) +- `jrnl --format pretty` returns an error [\#1172](https://github.com/jrnl-org/jrnl/issues/1172) +- Fix bug that prevented --format pretty and --format short from working [\#1177](https://github.com/jrnl-org/jrnl/pull/1177) ([sriniv27](https://github.com/sriniv27)) + +**Packaging:** + +- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## [v2.7.1](https://pypi.org/project/jrnl/v2.7.1/) (2021-02-27) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...v2.7.1) **Fixed bugs:** From f849805a73b3828e5c13819e4ff7424ad231102b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Mar 2021 10:55:59 -0700 Subject: [PATCH 0356/1132] Bump pyflakes from 2.2.0 to 2.3.0 (#1215) Bumps [pyflakes](https://github.com/PyCQA/pyflakes) from 2.2.0 to 2.3.0. - [Release notes](https://github.com/PyCQA/pyflakes/releases) - [Changelog](https://github.com/PyCQA/pyflakes/blob/master/NEWS.rst) - [Commits](https://github.com/PyCQA/pyflakes/compare/2.2.0...2.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index f92282e3..48e111ee 100644 --- a/poetry.lock +++ b/poetry.lock @@ -409,7 +409,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pyflakes" -version = "2.2.0" +version = "2.3.0" description = "passive checker of Python programs" category = "dev" optional = false @@ -847,8 +847,8 @@ pycparser = [ {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, ] pyflakes = [ - {file = "pyflakes-2.2.0-py2.py3-none-any.whl", hash = "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92"}, - {file = "pyflakes-2.2.0.tar.gz", hash = "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8"}, + {file = "pyflakes-2.3.0-py2.py3-none-any.whl", hash = "sha256:910208209dcea632721cb58363d0f72913d9e8cf64dc6f8ae2e02a3609aba40d"}, + {file = "pyflakes-2.3.0.tar.gz", hash = "sha256:e59fd8e750e588358f1b8885e5a4751203a0516e0ee6d34811089ac294c8806f"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, @@ -881,18 +881,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, From e116a95e34251e4b0963e7b9f6065d44c0de2f54 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Mar 2021 13:08:59 -0700 Subject: [PATCH 0357/1132] Change PR steps for brew release The hub cli tool wasn't working anymore, so we took it out. Co-authored-by: Micah Jerome Ellison --- .github/workflows/release.yaml | 61 +++++++++++----------------------- 1 file changed, 20 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 32912a9f..1631f901 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -127,7 +127,7 @@ jobs: echo "JRNL_VERSION=$JRNL_VERSION" >> $GITHUB_ENV echo "PYPI_VERSION=$PYPI_VERSION" >> $GITHUB_ENV - - name: Determine type of release + - name: Set env variables env: REPO_OWNER: ${{ github.repository_owner }} run: | @@ -158,24 +158,6 @@ jobs: echo '::debug::Set tap directory' echo "BREW_TAP_DIRECTORY='$(brew --repository)/Library/Taps/${FORMULA_REPO}'" >> $GITHUB_ENV - - name: Config git user - working-directory: ${{ env.BREW_TAP_DIRECTORY }} - run: | - git config --local user.name "${{ secrets.JRNL_BOT_NAME }}" - git config --local user.email "${{ secrets.JRNL_BOT_EMAIL }}" - - - name: Create branch - working-directory: ${{ env.BREW_TAP_DIRECTORY }} - run: | - BRANCH_NAME="jrnl-${JRNL_VERSION}--${RANDOM}" - git remote rename origin upstream - git remote add origin "https://${{ secrets.JRNL_BOT_NAME }}:${{ secrets.JRNL_BOT_TOKEN }}@github.com/${BOT_REPO}.git" - - git fetch upstream - git fetch origin - git checkout -b $BRANCH_NAME - git push -u origin $BRANCH_NAME - - name: Install dependencies run: brew install pipgrip @@ -210,29 +192,26 @@ jobs: --version=$PYPI_VERSION --no-audit --write - --commit --force - --verbose - - name: Update commit message - working-directory: ${{ env.BREW_TAP_DIRECTORY }} - run: | - git commit --amend \ - -m "jrnl ${JRNL_VERSION}" \ - -m "Update jrnl to ${JRNL_VERSION}" \ - -m '${{ secrets.RELEASE_COAUTHORS }}' + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + path: ${{ env.BREW_TAP_DIRECTORY }} + token: ${{ secrets.JRNL_BOT_TOKEN }} + push-to-fork: ${{ env.BOT_REPO }} - - name: Push commit - working-directory: ${{ env.BREW_TAP_DIRECTORY }} - run: | - git show head - git push + committer: ${{ secrets.JRNL_BOT_NAME }} <${{ secrets.JRNL_BOT_EMAIL }}> + author: ${{ secrets.JRNL_BOT_NAME }} <${{ secrets.JRNL_BOT_EMAIL }}> - - name: Open pull request - working-directory: ${{ env.BREW_TAP_DIRECTORY }} - env: - GH_TOKEN: ${{ secrets.JRNL_BOT_TOKEN }} - run: > - gh pr create - --title "jrnl ${JRNL_VERSION}" - --body 'Created with `brew bump-formula-pr`.' + title: jrnl ${{ env.JRNL_VERSION }} + body: Created with `brew bump-formula-pr` + + branch: jrnl-${{ env.JRNL_VERSION }}-- + branch-suffix: random + commit-message: | + jrnl ${{ env.JRNL_VERSION }} + + Update jrnl to ${{ env.JRNL_VERSION }} + + ${{ secrets.RELEASE_COAUTHORS }} From eb0c694cc83f52c208381f967447ec4700b9f366 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 20 Mar 2021 21:15:38 +0000 Subject: [PATCH 0358/1132] Update changelog [ci skip] --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17059d78..ca2f5a8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8-beta...HEAD) + +**Implemented enhancements:** + +- Assigning a number to each entry when viewing [\#1218](https://github.com/jrnl-org/jrnl/issues/1218) + +**Packaging:** + +- Bump pyflakes from 2.2.0 to 2.3.0 [\#1215](https://github.com/jrnl-org/jrnl/pull/1215) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8-beta](https://pypi.org/project/jrnl/v2.8-beta/) (2021-03-13) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.2-beta...HEAD) From dc95b4c0988a6262a353d9dbbcc01685ce470f3c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Mar 2021 19:24:06 +0000 Subject: [PATCH 0359/1132] Increment version to v2.8 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 790c604a..d01f99f3 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8-beta" +__version__ = "v2.8" diff --git a/pyproject.toml b/pyproject.toml index 32018559..56773289 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8-beta" +version = "v2.8" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 50c053cf56027302062ceb1ad62cad86c8babc3e Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Mar 2021 19:25:37 +0000 Subject: [PATCH 0360/1132] Update changelog [ci skip] --- CHANGELOG.md | 53 ++++++++++++---------------------------------------- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca2f5a8b..607f4e70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,54 +1,25 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8](https://pypi.org/project/jrnl/v2.8/) (2021-03-27) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8-beta...v2.8) **Implemented enhancements:** -- Assigning a number to each entry when viewing [\#1218](https://github.com/jrnl-org/jrnl/issues/1218) +- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) + +**Fixed bugs:** + +- Fix bug that prevented --format pretty and --format short from working [\#1177](https://github.com/jrnl-org/jrnl/pull/1177) ([sriniv27](https://github.com/sriniv27)) + +**Build:** + +- Fix broken brew release process [\#1211](https://github.com/jrnl-org/jrnl/pull/1211) ([micahellison](https://github.com/micahellison)) **Packaging:** - Bump pyflakes from 2.2.0 to 2.3.0 [\#1215](https://github.com/jrnl-org/jrnl/pull/1215) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.8-beta](https://pypi.org/project/jrnl/v2.8-beta/) (2021-03-13) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.2-beta...HEAD) - -**Implemented enhancements:** - -- Add pypi project links [\#1197](https://github.com/jrnl-org/jrnl/issues/1197) -- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) - -**Fixed bugs:** - -- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208) -- `jrnl --format short` returns an error [\#1173](https://github.com/jrnl-org/jrnl/issues/1173) -- `jrnl --format pretty` returns an error [\#1172](https://github.com/jrnl-org/jrnl/issues/1172) -- Fix bug that prevented --format pretty and --format short from working [\#1177](https://github.com/jrnl-org/jrnl/pull/1177) ([sriniv27](https://github.com/sriniv27)) - -**Packaging:** - -- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.7.2-beta](https://pypi.org/project/jrnl/v2.7.2-beta/) (2021-03-06) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...v2.7.2-beta) - -**Implemented enhancements:** - -- Add pypi project links [\#1197](https://github.com/jrnl-org/jrnl/issues/1197) -- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27)) - -**Fixed bugs:** - -- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208) -- `jrnl --format short` returns an error [\#1173](https://github.com/jrnl-org/jrnl/issues/1173) -- `jrnl --format pretty` returns an error [\#1172](https://github.com/jrnl-org/jrnl/issues/1172) -- Fix bug that prevented --format pretty and --format short from working [\#1177](https://github.com/jrnl-org/jrnl/pull/1177) ([sriniv27](https://github.com/sriniv27)) - -**Packaging:** - +- Bump keyring from 22.3.0 to 23.0.0 [\#1213](https://github.com/jrnl-org/jrnl/pull/1213) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot)) From 09bcfa2242c4b667986bcf62906eae473884b342 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 27 Mar 2021 13:11:42 -0700 Subject: [PATCH 0361/1132] Update brew tap for release pipeline This was left out of a previous commit. Co-authored-by: Micah Jerome Ellison --- .github/workflows/release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1631f901..3e4987e9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -156,8 +156,7 @@ jobs: run: | brew tap ${FORMULA_REPO} echo '::debug::Set tap directory' - echo "BREW_TAP_DIRECTORY='$(brew --repository)/Library/Taps/${FORMULA_REPO}'" >> $GITHUB_ENV - + echo "BREW_TAP_DIRECTORY=$(brew --repo ${FORMULA_REPO})" >> $GITHUB_ENV - name: Install dependencies run: brew install pipgrip From b357f935d4f8603ef35fe7361b45bd4691ad3c99 Mon Sep 17 00:00:00 2001 From: Mandar Vaze Date: Sun, 28 Mar 2021 01:51:44 +0530 Subject: [PATCH 0362/1132] Docs: Add emacs as external editor to recipes (#1220) Add emacs as external editor to recipes --- docs/recipes.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/recipes.md b/docs/recipes.md index ef45666a..1a1097d6 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -261,3 +261,14 @@ editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession The double backslashes are needed so jrnl can read the file path correctly. The `-multiInst -nosession` options will cause jrnl to open its own Notepad++ window. + + +### emacs + +To use `emacs` as your editor, edit the jrnl config file (`jrnl.yaml`) like this: + +```yaml +editor: emacsclient -a "" -c +``` + +When you're done editing the message, save and `C-x #` to close the buffer and stop the emacsclient process. From 6369026925df0927ff898845b0205f5452bcbe37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Mar 2021 13:23:05 -0700 Subject: [PATCH 0363/1132] Bump cryptography from 3.4.6 to 3.4.7 (#1223) Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.6 to 3.4.7. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.4.6...3.4.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/poetry.lock b/poetry.lock index 48e111ee..b003c4eb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -129,7 +129,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "cryptography" -version = "3.4.6" +version = "3.4.7" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -699,18 +699,18 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] cryptography = [ - {file = "cryptography-3.4.6-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:57ad77d32917bc55299b16d3b996ffa42a1c73c6cfa829b14043c561288d2799"}, - {file = "cryptography-3.4.6-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:4169a27b818de4a1860720108b55a2801f32b6ae79e7f99c00d79f2a2822eeb7"}, - {file = "cryptography-3.4.6-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:93cfe5b7ff006de13e1e89830810ecbd014791b042cbe5eec253be11ac2b28f3"}, - {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:5ecf2bcb34d17415e89b546dbb44e73080f747e504273e4d4987630493cded1b"}, - {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:fec7fb46b10da10d9e1d078d1ff8ed9e05ae14f431fdbd11145edd0550b9a964"}, - {file = "cryptography-3.4.6-cp36-abi3-win32.whl", hash = "sha256:df186fcbf86dc1ce56305becb8434e4b6b7504bc724b71ad7a3239e0c9d14ef2"}, - {file = "cryptography-3.4.6-cp36-abi3-win_amd64.whl", hash = "sha256:66b57a9ca4b3221d51b237094b0303843b914b7d5afd4349970bb26518e350b0"}, - {file = "cryptography-3.4.6-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:066bc53f052dfeda2f2d7c195cf16fb3e5ff13e1b6b7415b468514b40b381a5b"}, - {file = "cryptography-3.4.6-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:600cf9bfe75e96d965509a4c0b2b183f74a4fa6f5331dcb40fb7b77b7c2484df"}, - {file = "cryptography-3.4.6-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:0923ba600d00718d63a3976f23cab19aef10c1765038945628cd9be047ad0336"}, - {file = "cryptography-3.4.6-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:9e98b452132963678e3ac6c73f7010fe53adf72209a32854d55690acac3f6724"}, - {file = "cryptography-3.4.6.tar.gz", hash = "sha256:2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87"}, + {file = "cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1"}, + {file = "cryptography-3.4.7-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959"}, + {file = "cryptography-3.4.7-cp36-abi3-win32.whl", hash = "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d"}, + {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, + {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, + {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, + {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] future = [ {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, From e76762dd4dfd94bf68050dc27f44f8b13f927a53 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Mar 2021 20:24:44 +0000 Subject: [PATCH 0364/1132] Update changelog [ci skip] --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 607f4e70..a8d4cb8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8...HEAD) + +**Documentation:** + +- Docs: Add emacs as external editor to recipes [\#1220](https://github.com/jrnl-org/jrnl/pull/1220) ([mandarvaze](https://github.com/mandarvaze)) + +**Packaging:** + +- Bump cryptography from 3.4.6 to 3.4.7 [\#1223](https://github.com/jrnl-org/jrnl/pull/1223) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8](https://pypi.org/project/jrnl/v2.8/) (2021-03-27) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8-beta...v2.8) From 1e7d682df5da4a99a25da4f0327a0219e6af0fd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Mar 2021 13:40:49 -0700 Subject: [PATCH 0365/1132] Bump pyflakes from 2.3.0 to 2.3.1 (#1221) Bumps [pyflakes](https://github.com/PyCQA/pyflakes) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/PyCQA/pyflakes/releases) - [Changelog](https://github.com/PyCQA/pyflakes/blob/master/NEWS.rst) - [Commits](https://github.com/PyCQA/pyflakes/compare/2.3.0...2.3.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index b003c4eb..d179968a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -409,7 +409,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pyflakes" -version = "2.3.0" +version = "2.3.1" description = "passive checker of Python programs" category = "dev" optional = false @@ -847,8 +847,8 @@ pycparser = [ {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, ] pyflakes = [ - {file = "pyflakes-2.3.0-py2.py3-none-any.whl", hash = "sha256:910208209dcea632721cb58363d0f72913d9e8cf64dc6f8ae2e02a3609aba40d"}, - {file = "pyflakes-2.3.0.tar.gz", hash = "sha256:e59fd8e750e588358f1b8885e5a4751203a0516e0ee6d34811089ac294c8806f"}, + {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, + {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, From 002a39db2a798ec43e471c871c6af7e7b8081080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Mar 2021 13:41:11 -0700 Subject: [PATCH 0366/1132] Bump keyring from 23.0.0 to 23.0.1 (#1222) Bumps [keyring](https://github.com/jaraco/keyring) from 23.0.0 to 23.0.1. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.0.0...v23.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index d179968a..a851f03e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -213,7 +213,7 @@ python-versions = ">=3.6" [[package]] name = "keyring" -version = "23.0.0" +version = "23.0.1" description = "Store and access your passwords safely." category = "main" optional = false @@ -227,7 +227,7 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "livereload" @@ -736,8 +736,8 @@ joblib = [ {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, ] keyring = [ - {file = "keyring-23.0.0-py3-none-any.whl", hash = "sha256:29f407fd5509c014a6086f17338c70215c8d1ab42d5d49e0254273bc0a64bbfc"}, - {file = "keyring-23.0.0.tar.gz", hash = "sha256:237ff44888ba9b3918a7dcb55c8f1db909c95b6f071bfb46c6918f33f453a68a"}, + {file = "keyring-23.0.1-py3-none-any.whl", hash = "sha256:8f607d7d1cc502c43a932a275a56fe47db50271904513a379d39df1af277ac48"}, + {file = "keyring-23.0.1.tar.gz", hash = "sha256:045703609dd3fccfcdb27da201684278823b72af515aedec1a8515719a038cb8"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, From eebadd188aa4a1c37057dd2a281a9aee53dbd065 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Mar 2021 20:42:44 +0000 Subject: [PATCH 0367/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d4cb8b..e35227ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ **Packaging:** - Bump cryptography from 3.4.6 to 3.4.7 [\#1223](https://github.com/jrnl-org/jrnl/pull/1223) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump keyring from 23.0.0 to 23.0.1 [\#1222](https://github.com/jrnl-org/jrnl/pull/1222) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pyflakes from 2.3.0 to 2.3.1 [\#1221](https://github.com/jrnl-org/jrnl/pull/1221) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8](https://pypi.org/project/jrnl/v2.8/) (2021-03-27) From 202859cea1f4a7f263fd2299848541312f198da3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 10 Apr 2021 11:50:37 -0700 Subject: [PATCH 0368/1132] Bump pytest from 6.2.2 to 6.2.3 (#1228) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.2 to 6.2.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.2...6.2.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index a851f03e..58769e8c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -425,7 +425,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "6.2.2" +version = "6.2.3" description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -855,8 +855,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, - {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, + {file = "pytest-6.2.3-py3-none-any.whl", hash = "sha256:6ad9c7bdf517a808242b998ac20063c41532a570d088d77eec1ee12b0b5574bc"}, + {file = "pytest-6.2.3.tar.gz", hash = "sha256:671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, From 1f19bd9f1e505540e5e0acd1808a7aef0cfac775 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 10 Apr 2021 18:52:04 +0000 Subject: [PATCH 0369/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e35227ad..408f9b4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Packaging:** +- Bump pytest from 6.2.2 to 6.2.3 [\#1228](https://github.com/jrnl-org/jrnl/pull/1228) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 3.4.6 to 3.4.7 [\#1223](https://github.com/jrnl-org/jrnl/pull/1223) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.0.0 to 23.0.1 [\#1222](https://github.com/jrnl-org/jrnl/pull/1222) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pyflakes from 2.3.0 to 2.3.1 [\#1221](https://github.com/jrnl-org/jrnl/pull/1221) ([dependabot[bot]](https://github.com/apps/dependabot)) From dd74b14d76de6c29f1ea37ad239aa3092b7e4d6b Mon Sep 17 00:00:00 2001 From: Suhas Date: Sat, 10 Apr 2021 19:49:56 -0400 Subject: [PATCH 0370/1132] More graceful handling of low linewrap values (#1219) * behavior outline * enforce positive initial linewrap Check column widths update gitignore throw error when linewrap too small simply check for large enough linewrap value * delete unused error message * PR feedback make exception more informative update check_linewrap signature in src and test make check_linewrap a free function * delete unused function * delete else..pass block * newline for make format --- features/format.feature | 16 ++++++++++++++++ features/steps/export_steps.py | 8 ++++++++ jrnl/exception.py | 10 +++++++++- jrnl/plugins/fancy_exporter.py | 19 ++++++++++++++++++- tests/test_export.py | 28 ++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 tests/test_export.py diff --git a/features/format.feature b/features/format.feature index 7bdaac4d..f935e8c8 100644 --- a/features/format.feature +++ b/features/format.feature @@ -323,6 +323,22 @@ Feature: Custom formats | basic_folder | | basic_dayone | + + + Scenario Outline: Export fancy with small linewrap + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override linewrap 35 --format fancy -3" + Then we should get no error + And the output should be 35 columns wide + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + @todo Scenario Outline: Exporting fancy # Needs better emoji support diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py index 3df86237..8141dc36 100644 --- a/features/steps/export_steps.py +++ b/features/steps/export_steps.py @@ -12,6 +12,14 @@ from behave import given from behave import then +@then("the output should be {width:d} columns wide") +def check_output_width(context, width): + out = context.stdout_capture.getvalue() + out_lines = out.splitlines() + for line in out_lines: + assert len(line) <= width + + @then("the output should be parsable as json") def check_output_json(context): out = context.stdout_capture.getvalue() diff --git a/jrnl/exception.py b/jrnl/exception.py index 82a562a0..ac7cd0b2 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -30,7 +30,15 @@ class JrnlError(Exception): Removing this file will allow jrnl to save its configuration. """ - ) + ), + "LineWrapTooSmallForDateFormat": textwrap.dedent( + """ + The provided linewrap value of {config_linewrap} is too small by {columns} columns + to display the timestamps in the configured time format for journal {journal}. + + You can avoid this error by specifying a linewrap value that is larger by at least {columns} in the configuration file or by using --config-override at the command line + """ + ), } return error_messages[self.error_type].format(**kwargs) diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index 74cc6958..15efc19b 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -3,6 +3,7 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +from jrnl.exception import JrnlError from textwrap import TextWrapper from .text_exporter import TextExporter @@ -14,12 +15,14 @@ class FancyExporter(TextExporter): names = ["fancy", "boxed"] extension = "txt" + # Top border of the card border_a = "┎" border_b = "─" border_c = "╮" border_d = "╘" border_e = "═" border_f = "╕" + border_g = "┃" border_h = "│" border_i = "┠" @@ -33,16 +36,19 @@ class FancyExporter(TextExporter): """Returns a fancy unicode representation of a single entry.""" date_str = entry.date.strftime(entry.journal.config["timeformat"]) linewrap = entry.journal.config["linewrap"] or 78 - initial_linewrap = linewrap - len(date_str) - 2 + initial_linewrap = max((1, linewrap - len(date_str) - 2)) body_linewrap = linewrap - 2 card = [ cls.border_a + cls.border_b * (initial_linewrap) + cls.border_c + date_str ] + check_provided_linewrap_viability(linewrap, card, entry.journal) + w = TextWrapper( width=initial_linewrap, initial_indent=cls.border_g + " ", subsequent_indent=cls.border_g + " ", ) + title_lines = w.wrap(entry.title) card.append( title_lines[0].ljust(initial_linewrap + 1) @@ -74,3 +80,14 @@ class FancyExporter(TextExporter): def export_journal(cls, journal): """Returns a unicode representation of an entire journal.""" return "\n".join(cls.export_entry(entry) for entry in journal) + + +def check_provided_linewrap_viability(linewrap, card, journal): + if len(card[0]) > linewrap: + width_violation = len(card[0]) - linewrap + raise JrnlError( + "LineWrapTooSmallForDateFormat", + config_linewrap=linewrap, + columns=width_violation, + journal=journal, + ) diff --git a/tests/test_export.py b/tests/test_export.py new file mode 100644 index 00000000..0f494f79 --- /dev/null +++ b/tests/test_export.py @@ -0,0 +1,28 @@ +from jrnl.exception import JrnlError +from jrnl.plugins.fancy_exporter import check_provided_linewrap_viability + +import pytest + + +@pytest.fixture() +def datestr(): + yield "2020-10-20 16:59" + + +def build_card_header(datestr): + top_left_corner = "┎─╮" + content = top_left_corner + datestr + return content + + +class TestFancy: + def test_too_small_linewrap(self, datestr): + + journal = "test_journal" + content = build_card_header(datestr) + + total_linewrap = 12 + + with pytest.raises(JrnlError) as e: + check_provided_linewrap_viability(total_linewrap, [content], journal) + assert e.value.error_type == "LineWrapTooSmallForDateFormat" From 192c05ce0d63c4e69e727a52e96e97c631f1b75b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 10 Apr 2021 23:51:26 +0000 Subject: [PATCH 0371/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 408f9b4f..8765f5a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8...HEAD) +**Fixed bugs:** + +- Fancy format crashes on low linewrap values [\#1201](https://github.com/jrnl-org/jrnl/issues/1201) +- More graceful handling of low linewrap values [\#1219](https://github.com/jrnl-org/jrnl/pull/1219) ([sriniv27](https://github.com/sriniv27)) + **Documentation:** - Docs: Add emacs as external editor to recipes [\#1220](https://github.com/jrnl-org/jrnl/pull/1220) ([mandarvaze](https://github.com/mandarvaze)) From 4c5d59a5bc09becd5ed81f3f940eec75cd4d3571 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 15 Apr 2021 00:47:10 -0500 Subject: [PATCH 0372/1132] Update index.html (#1229) --- docs_theme/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs_theme/index.html b/docs_theme/index.html index 491da4c7..b21493d2 100755 --- a/docs_theme/index.html +++ b/docs_theme/index.html @@ -7,18 +7,18 @@ jrnl - The Command Line Journal - + - + - + - + @@ -35,8 +35,8 @@ "name": "jrnl", "description": "Collect your thoughts and notes without leaving the command line.", "operatingSystem": ["macOS", "Windows", "Linux"], - "thumbnailUrl": "https://jrnl.sh/img/banner_og.png", - "installUrl": "https://jrnl.sh/installation", + "thumbnailUrl": "https://jrnl.sh/en/stable/img/banner_og.png", + "installUrl": "https://jrnl.sh/en/stable/installation", "softwareVersion": "2.5" } From a6362a993c35a3facf7ad40618ae14490244f3a1 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Tue, 20 Apr 2021 02:24:47 +0000 Subject: [PATCH 0373/1132] Increment version to v2.8.1-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index d01f99f3..740e8abc 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8" +__version__ = "v2.8.1-beta" diff --git a/pyproject.toml b/pyproject.toml index 56773289..8325128b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8" +version = "v2.8.1-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From f13a0b58491b0cf932d184e835cb3802de39f035 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Tue, 20 Apr 2021 02:26:27 +0000 Subject: [PATCH 0374/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8765f5a4..ce61677e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8.1-beta](https://pypi.org/project/jrnl/v2.8.1-beta/) (2021-04-20) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8...v2.8.1-beta) **Fixed bugs:** From 0e9ae8ee8a9ddf5ae32ec7d24ee6493dbd3dfe92 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 24 Apr 2021 18:07:52 +0000 Subject: [PATCH 0375/1132] Increment version to v2.8.1 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 740e8abc..51977ba3 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.1-beta" +__version__ = "v2.8.1" diff --git a/pyproject.toml b/pyproject.toml index 8325128b..46ff65ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.1-beta" +version = "v2.8.1" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From e23909881a9420bc25c73622e6d430624956c66c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 24 Apr 2021 18:09:15 +0000 Subject: [PATCH 0376/1132] Update changelog [ci skip] --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce61677e..1382c90d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,16 @@ # Changelog -## [v2.8.1-beta](https://pypi.org/project/jrnl/v2.8.1-beta/) (2021-04-20) +## [v2.8.1](https://pypi.org/project/jrnl/v2.8.1/) (2021-04-24) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8...v2.8.1-beta) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1-beta...v2.8.1) **Fixed bugs:** -- Fancy format crashes on low linewrap values [\#1201](https://github.com/jrnl-org/jrnl/issues/1201) - More graceful handling of low linewrap values [\#1219](https://github.com/jrnl-org/jrnl/pull/1219) ([sriniv27](https://github.com/sriniv27)) **Documentation:** +- Update absolute URLs to preview images in metatags [\#1229](https://github.com/jrnl-org/jrnl/pull/1229) ([maebert](https://github.com/maebert)) - Docs: Add emacs as external editor to recipes [\#1220](https://github.com/jrnl-org/jrnl/pull/1220) ([mandarvaze](https://github.com/mandarvaze)) **Packaging:** From 305127137aea11c6a72ae453c238937c00c82b2c Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 24 Apr 2021 11:27:32 -0700 Subject: [PATCH 0377/1132] Remove `--version` from brew release workflow (#1233) Homebrew doesn't like explicitly declaring a version for a formula (it prefers to infer it from the url), and will throw an error on PRs. So, this removes that part of the workflow. --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3e4987e9..5e0169c1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -188,7 +188,6 @@ jobs: brew bump-formula-pr "${FORMULA_NAME}" --url $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json) --sha256 $(jq ".releases[\"${PYPI_VERSION}\"][1].digests.sha256" -r api_response.json) - --version=$PYPI_VERSION --no-audit --write --force From 36db809588bcb134d79a25064670d37d8364369b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 24 Apr 2021 18:28:59 +0000 Subject: [PATCH 0378/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1382c90d..020a0069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...HEAD) + +**Build:** + +- Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) + ## [v2.8.1](https://pypi.org/project/jrnl/v2.8.1/) (2021-04-24) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1-beta...v2.8.1) From b66ce460b6bce3ba4ef598333630e86a3acbe5b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 May 2021 12:32:01 -0700 Subject: [PATCH 0379/1132] Bump pytest from 6.2.3 to 6.2.4 (#1240) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.3 to 6.2.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.3...6.2.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 58769e8c..cfbc3c2f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -425,7 +425,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "6.2.3" +version = "6.2.4" description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -855,8 +855,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.2.3-py3-none-any.whl", hash = "sha256:6ad9c7bdf517a808242b998ac20063c41532a570d088d77eec1ee12b0b5574bc"}, - {file = "pytest-6.2.3.tar.gz", hash = "sha256:671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634"}, + {file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"}, + {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, From f99387b3e546225fc48e998a2a3a81067db5e8c8 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 May 2021 19:33:41 +0000 Subject: [PATCH 0380/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020a0069..05956cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) +**Packaging:** + +- Bump pytest from 6.2.3 to 6.2.4 [\#1240](https://github.com/jrnl-org/jrnl/pull/1240) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8.1](https://pypi.org/project/jrnl/v2.8.1/) (2021-04-24) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1-beta...v2.8.1) From b38d765759b150e75c3f44b7429e2be59dec097e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 May 2021 12:39:00 -0700 Subject: [PATCH 0381/1132] Bump black from 20.8b1 to 21.5b0 (#1241) * Bump black from 20.8b1 to 21.5b0 Bumps [black](https://github.com/psf/black) from 20.8b1 to 21.5b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/master/CHANGES.md) - [Commits](https://github.com/psf/black/commits) Signed-off-by: dependabot[bot] * Run make format with latest version of black Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Micah Jerome Ellison --- jrnl/commands.py | 2 +- jrnl/exception.py | 2 +- jrnl/jrnl.py | 2 +- poetry.lock | 78 ++++++++++++++++++++++++----------------------- pyproject.toml | 2 +- 5 files changed, 44 insertions(+), 42 deletions(-) diff --git a/jrnl/commands.py b/jrnl/commands.py index 8473954e..07ca0767 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -87,7 +87,7 @@ def postconfig_encrypt(args, config, original_config, **kwargs): def postconfig_decrypt(args, config, original_config, **kwargs): - """ Decrypts into new file. If filename is not set, we encrypt the journal file itself. """ + """Decrypts into new file. If filename is not set, we encrypt the journal file itself.""" from .Journal import PlainJournal from .Journal import open_journal from .config import update_config diff --git a/jrnl/exception.py b/jrnl/exception.py index ac7cd0b2..cb6672d7 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -14,7 +14,7 @@ class UpgradeValidationException(Exception): class JrnlError(Exception): - """Common exceptions raised by jrnl. """ + """Common exceptions raised by jrnl.""" def __init__(self, error_type, **kwargs): self.error_type = error_type diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index cf2b3bbb..2d06115d 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -214,7 +214,7 @@ def _get_editor_template(config, **kwargs): def _search_journal(args, journal, **kwargs): - """ Search the journal with the given args""" + """Search the journal with the given args""" if args.on_date: args.start_date = args.end_date = args.on_date diff --git a/poetry.lock b/poetry.lock index cfbc3c2f..25c20495 100644 --- a/poetry.lock +++ b/poetry.lock @@ -80,25 +80,26 @@ docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] [[package]] name = "black" -version = "20.8b1" +version = "21.5b0" description = "The uncompromising code formatter." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.2" [package.dependencies] appdirs = "*" click = ">=7.1.2" mypy-extensions = ">=0.4.3" -pathspec = ">=0.6,<1" +pathspec = ">=0.8.1,<1" regex = ">=2020.1.8" toml = ">=0.10.1" -typed-ast = ">=1.4.0" -typing-extensions = ">=3.7.4" +typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} +typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] +python2 = ["typed-ast (>=1.4.2)"] [[package]] name = "cffi" @@ -553,7 +554,7 @@ dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown", "wheel"] [[package]] name = "typed-ast" -version = "1.4.1" +version = "1.4.3" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false @@ -618,7 +619,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "1757c9f22bd1c3e2e4c6b7785d4c8e14a670334a21ab5de2137faf0fd10819b9" +content-hash = "564ac922fb9bc8c9691eebf4464f3827fa52cfd92d45853f714cdb36d6aa6a90" [metadata.files] ansiwrap = [ @@ -649,7 +650,8 @@ behave = [ {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, ] black = [ - {file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"}, + {file = "black-21.5b0-py3-none-any.whl", hash = "sha256:0e80435b8a88f383c9149ae89d671eb2095b72344b0fe8a1d61d2ff5110ed173"}, + {file = "black-21.5b0.tar.gz", hash = "sha256:9dc2042018ca10735366d944c2c12d9cad6dec74a3d5f679d09384ea185d9943"}, ] cffi = [ {file = "cffi-1.14.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ebb253464a5d0482b191274f1c8bf00e33f7e0b9c66405fbffc61ed2c839c775"}, @@ -1012,36 +1014,36 @@ tqdm = [ {file = "tqdm-4.54.1.tar.gz", hash = "sha256:38b658a3e4ecf9b4f6f8ff75ca16221ae3378b2e175d846b6b33ea3a20852cf5"}, ] typed-ast = [ - {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, - {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb"}, - {file = "typed_ast-1.4.1-cp35-cp35m-win32.whl", hash = "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919"}, - {file = "typed_ast-1.4.1-cp35-cp35m-win_amd64.whl", hash = "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01"}, - {file = "typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75"}, - {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652"}, - {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"}, - {file = "typed_ast-1.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f"}, - {file = "typed_ast-1.4.1-cp36-cp36m-win32.whl", hash = "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1"}, - {file = "typed_ast-1.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa"}, - {file = "typed_ast-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614"}, - {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41"}, - {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b"}, - {file = "typed_ast-1.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298"}, - {file = "typed_ast-1.4.1-cp37-cp37m-win32.whl", hash = "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe"}, - {file = "typed_ast-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355"}, - {file = "typed_ast-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6"}, - {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907"}, - {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d"}, - {file = "typed_ast-1.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d"}, - {file = "typed_ast-1.4.1-cp38-cp38-win32.whl", hash = "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c"}, - {file = "typed_ast-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4"}, - {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, - {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c"}, - {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072"}, - {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91"}, - {file = "typed_ast-1.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d"}, - {file = "typed_ast-1.4.1-cp39-cp39-win32.whl", hash = "sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395"}, - {file = "typed_ast-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c"}, - {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, + {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, + {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, + {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, + {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, + {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, + {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, + {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, + {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, + {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, + {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, + {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, + {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, + {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, + {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, + {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, + {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, + {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, + {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, + {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, + {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, + {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, + {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, + {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, + {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, + {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, + {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, + {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, + {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, + {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, + {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ] typing-extensions = [ {file = "typing_extensions-3.7.4.3-py2-none-any.whl", hash = "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"}, diff --git a/pyproject.toml b/pyproject.toml index 46ff65ab..95670898 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE [tool.poetry.dev-dependencies] behave = "^1.2" mkdocs = "^1.0" -black = {version = "^20.8b1",allow-prereleases = true} +black = {version = "^21.5b0",allow-prereleases = true} toml = ">=0.10" pyflakes = ">=2.2.0" pytest = ">=6.2" From c6815621df11d5bfd22aab6f0219399aa89ab198 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 May 2021 19:40:25 +0000 Subject: [PATCH 0382/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05956cff..e65cf3bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Packaging:** +- Bump black from 20.8b1 to 21.5b0 [\#1241](https://github.com/jrnl-org/jrnl/pull/1241) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.3 to 6.2.4 [\#1240](https://github.com/jrnl-org/jrnl/pull/1240) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.1](https://pypi.org/project/jrnl/v2.8.1/) (2021-04-24) From 17c7f4c648e0427a3508278d04b299f7dfe06a38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 May 2021 11:46:46 -0700 Subject: [PATCH 0383/1132] Bump black from 21.5b0 to 21.5b1 (#1244) Bumps [black](https://github.com/psf/black) from 21.5b0 to 21.5b1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 25c20495..5cc5c163 100644 --- a/poetry.lock +++ b/poetry.lock @@ -80,7 +80,7 @@ docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] [[package]] name = "black" -version = "21.5b0" +version = "21.5b1" description = "The uncompromising code formatter." category = "dev" optional = false @@ -98,7 +98,7 @@ typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] +d = ["aiohttp (>=3.6.0)", "aiohttp-cors"] python2 = ["typed-ast (>=1.4.2)"] [[package]] @@ -619,7 +619,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "564ac922fb9bc8c9691eebf4464f3827fa52cfd92d45853f714cdb36d6aa6a90" +content-hash = "7e44a55c0f4c1a504674d707acdf875d8f53fd2d9d30ed241a2dc8f2d6af8375" [metadata.files] ansiwrap = [ @@ -650,8 +650,8 @@ behave = [ {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, ] black = [ - {file = "black-21.5b0-py3-none-any.whl", hash = "sha256:0e80435b8a88f383c9149ae89d671eb2095b72344b0fe8a1d61d2ff5110ed173"}, - {file = "black-21.5b0.tar.gz", hash = "sha256:9dc2042018ca10735366d944c2c12d9cad6dec74a3d5f679d09384ea185d9943"}, + {file = "black-21.5b1-py3-none-any.whl", hash = "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008"}, + {file = "black-21.5b1.tar.gz", hash = "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1"}, ] cffi = [ {file = "cffi-1.14.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ebb253464a5d0482b191274f1c8bf00e33f7e0b9c66405fbffc61ed2c839c775"}, diff --git a/pyproject.toml b/pyproject.toml index 95670898..5eaf1fbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE [tool.poetry.dev-dependencies] behave = "^1.2" mkdocs = "^1.0" -black = {version = "^21.5b0",allow-prereleases = true} +black = {version = "^21.5b1",allow-prereleases = true} toml = ">=0.10" pyflakes = ">=2.2.0" pytest = ">=6.2" From 104fa2cacaab6fe32e073a2f4100172dcb902241 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 29 May 2021 18:48:21 +0000 Subject: [PATCH 0384/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e65cf3bb..6cd48883 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,17 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...HEAD) +**Implemented enhancements:** + +- Multiple entries with same timestamp should be grouped together [\#1247](https://github.com/jrnl-org/jrnl/issues/1247) + **Build:** - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) **Packaging:** +- Bump black from 21.5b0 to 21.5b1 [\#1244](https://github.com/jrnl-org/jrnl/pull/1244) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 20.8b1 to 21.5b0 [\#1241](https://github.com/jrnl-org/jrnl/pull/1241) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.3 to 6.2.4 [\#1240](https://github.com/jrnl-org/jrnl/pull/1240) ([dependabot[bot]](https://github.com/apps/dependabot)) From 6fc252b2c73f9b9a87a85cc1290f45ba5f156b37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Jun 2021 13:14:05 -0700 Subject: [PATCH 0385/1132] Bump black from 21.5b1 to 21.5b2 (#1254) Bumps [black](https://github.com/psf/black) from 21.5b1 to 21.5b2. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 11 ++++++----- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5cc5c163..238b977c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -80,7 +80,7 @@ docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] [[package]] name = "black" -version = "21.5b1" +version = "21.5b2" description = "The uncompromising code formatter." category = "dev" optional = false @@ -98,8 +98,9 @@ typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.6.0)", "aiohttp-cors"] +d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] python2 = ["typed-ast (>=1.4.2)"] +uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cffi" @@ -619,7 +620,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "7e44a55c0f4c1a504674d707acdf875d8f53fd2d9d30ed241a2dc8f2d6af8375" +content-hash = "4d9054a240b279da990b8038623d8b2025487ef37162f7f7ef4a4ff8cbae872b" [metadata.files] ansiwrap = [ @@ -650,8 +651,8 @@ behave = [ {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, ] black = [ - {file = "black-21.5b1-py3-none-any.whl", hash = "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008"}, - {file = "black-21.5b1.tar.gz", hash = "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1"}, + {file = "black-21.5b2-py3-none-any.whl", hash = "sha256:e5cf21ebdffc7a9b29d73912b6a6a9a4df4ce70220d523c21647da2eae0751ef"}, + {file = "black-21.5b2.tar.gz", hash = "sha256:1fc0e0a2c8ae7d269dfcf0c60a89afa299664f3e811395d40b1922dff8f854b5"}, ] cffi = [ {file = "cffi-1.14.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ebb253464a5d0482b191274f1c8bf00e33f7e0b9c66405fbffc61ed2c839c775"}, diff --git a/pyproject.toml b/pyproject.toml index 5eaf1fbc..8a46fe34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE [tool.poetry.dev-dependencies] behave = "^1.2" mkdocs = "^1.0" -black = {version = "^21.5b1",allow-prereleases = true} +black = {version = "^21.5b2",allow-prereleases = true} toml = ">=0.10" pyflakes = ">=2.2.0" pytest = ">=6.2" From e84bb603eb66d2dc3e2531ad2b67cb7beba8556f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 5 Jun 2021 13:15:17 -0700 Subject: [PATCH 0386/1132] Ensure that line endings in all py files are Linux style instead of Windows (#1250) --- tests/test_exception.py | 38 +++++++++++++++++------------------ tests/test_install.py | 26 ++++++++++++------------ tests/test_time.py | 44 ++++++++++++++++++++--------------------- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/tests/test_exception.py b/tests/test_exception.py index 85eb77e9..1fee1982 100644 --- a/tests/test_exception.py +++ b/tests/test_exception.py @@ -1,19 +1,19 @@ -import textwrap - -from jrnl.exception import JrnlError - - -def test_config_directory_exception_message(): - ex = JrnlError( - "ConfigDirectoryIsFile", config_directory_path="/config/directory/path" - ) - - assert ex.message == textwrap.dedent( - """ - The path to your jrnl configuration directory is a file, not a directory: - - /config/directory/path - - Removing this file will allow jrnl to save its configuration. - """ - ) +import textwrap + +from jrnl.exception import JrnlError + + +def test_config_directory_exception_message(): + ex = JrnlError( + "ConfigDirectoryIsFile", config_directory_path="/config/directory/path" + ) + + assert ex.message == textwrap.dedent( + """ + The path to your jrnl configuration directory is a file, not a directory: + + /config/directory/path + + Removing this file will allow jrnl to save its configuration. + """ + ) diff --git a/tests/test_install.py b/tests/test_install.py index e24d3b9c..31ec150c 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,13 +1,13 @@ -from unittest import mock -import pytest -import sys - - -@pytest.mark.filterwarnings( - "ignore:.*imp module is deprecated.*" -) # ansiwrap spits out an unrelated warning -def test_initialize_autocomplete_runs_without_readline(): - from jrnl import install - - with mock.patch.dict(sys.modules, {"readline": None}): - install._initialize_autocomplete() # should not throw exception +from unittest import mock +import pytest +import sys + + +@pytest.mark.filterwarnings( + "ignore:.*imp module is deprecated.*" +) # ansiwrap spits out an unrelated warning +def test_initialize_autocomplete_runs_without_readline(): + from jrnl import install + + with mock.patch.dict(sys.modules, {"readline": None}): + install._initialize_autocomplete() # should not throw exception diff --git a/tests/test_time.py b/tests/test_time.py index 89f65cb7..c829c52b 100644 --- a/tests/test_time.py +++ b/tests/test_time.py @@ -1,22 +1,22 @@ -import datetime - -from jrnl import time - - -def test_default_hour_is_added(): - assert time.parse( - "2020-06-20", inclusive=False, default_hour=9, default_minute=0, bracketed=False - ) == datetime.datetime(2020, 6, 20, 9) - - -def test_default_minute_is_added(): - assert ( - time.parse( - "2020-06-20", - inclusive=False, - default_hour=0, - default_minute=30, - bracketed=False, - ) - == datetime.datetime(2020, 6, 20, 0, 30) - ) +import datetime + +from jrnl import time + + +def test_default_hour_is_added(): + assert time.parse( + "2020-06-20", inclusive=False, default_hour=9, default_minute=0, bracketed=False + ) == datetime.datetime(2020, 6, 20, 9) + + +def test_default_minute_is_added(): + assert ( + time.parse( + "2020-06-20", + inclusive=False, + default_hour=0, + default_minute=30, + bracketed=False, + ) + == datetime.datetime(2020, 6, 20, 0, 30) + ) From 5e87ff1ce696c5b59fb1389e7e45c20c90047781 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Jun 2021 20:16:47 +0000 Subject: [PATCH 0387/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cd48883..62d28c70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,9 @@ **Packaging:** +- Bump black from 21.5b1 to 21.5b2 [\#1254](https://github.com/jrnl-org/jrnl/pull/1254) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.5b0 to 21.5b1 [\#1244](https://github.com/jrnl-org/jrnl/pull/1244) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 20.8b1 to 21.5b0 [\#1241](https://github.com/jrnl-org/jrnl/pull/1241) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump pytest from 6.2.3 to 6.2.4 [\#1240](https://github.com/jrnl-org/jrnl/pull/1240) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.1](https://pypi.org/project/jrnl/v2.8.1/) (2021-04-24) From a9c539821f127c0bda93e35617858e3b73b717fe Mon Sep 17 00:00:00 2001 From: Ben Beasley Date: Sat, 3 Jul 2021 18:20:52 -0400 Subject: [PATCH 0388/1132] Remove useless shebangs and executable permissions (#1283) * Remove executable permissions from non-script files * Remove harmless-but-useless shebang lines --- docs_theme/index.html | 0 jrnl/DayOneJournal.py | 2 -- jrnl/Entry.py | 1 - jrnl/FolderJournal.py | 1 - jrnl/Journal.py | 1 - jrnl/__init__.py | 1 - jrnl/__main__.py | 1 - jrnl/cli.py | 1 - jrnl/color.py | 1 - jrnl/install.py | 1 - jrnl/plugins/__init__.py | 1 - jrnl/plugins/dates_exporter.py | 1 - jrnl/plugins/fancy_exporter.py | 1 - jrnl/plugins/jrnl_importer.py | 1 - jrnl/plugins/json_exporter.py | 1 - jrnl/plugins/markdown_exporter.py | 1 - jrnl/plugins/tag_exporter.py | 1 - jrnl/plugins/template_exporter.py | 1 - jrnl/plugins/text_exporter.py | 1 - jrnl/plugins/util.py | 1 - jrnl/plugins/xml_exporter.py | 1 - jrnl/plugins/yaml_exporter.py | 1 - 22 files changed, 22 deletions(-) mode change 100755 => 100644 docs_theme/index.html mode change 100755 => 100644 jrnl/Entry.py diff --git a/docs_theme/index.html b/docs_theme/index.html old mode 100755 new mode 100644 diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 6e1b8345..61a60ca0 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from datetime import datetime import fnmatch import os diff --git a/jrnl/Entry.py b/jrnl/Entry.py old mode 100755 new mode 100644 index 67ba84f3..e227794f --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index e727cdf0..954a9436 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 4196571d..b889c0d3 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 8f4dc3ec..550d580f 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/__main__.py b/jrnl/__main__.py index e977369f..49497161 100644 --- a/jrnl/__main__.py +++ b/jrnl/__main__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/cli.py b/jrnl/cli.py index 93a7e899..6a1c6a0f 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/color.py b/jrnl/color.py index 3bdd4149..691cce9c 100644 --- a/jrnl/color.py +++ b/jrnl/color.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import re from string import punctuation from string import whitespace diff --git a/jrnl/install.py b/jrnl/install.py index db4c0fba..b0ae2aa1 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index 3eb4d5a2..da6199fb 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/dates_exporter.py b/jrnl/plugins/dates_exporter.py index d11e527c..e032b652 100644 --- a/jrnl/plugins/dates_exporter.py +++ b/jrnl/plugins/dates_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index 15efc19b..2cb27eca 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index af5ea6ce..214fc70b 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/json_exporter.py b/jrnl/plugins/json_exporter.py index dd07b0ce..666d9a3d 100644 --- a/jrnl/plugins/json_exporter.py +++ b/jrnl/plugins/json_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 693f2fa5..11f748b6 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/tag_exporter.py b/jrnl/plugins/tag_exporter.py index bc3736eb..1153fa01 100644 --- a/jrnl/plugins/tag_exporter.py +++ b/jrnl/plugins/tag_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/template_exporter.py b/jrnl/plugins/template_exporter.py index af081f8c..d2e5ce3e 100644 --- a/jrnl/plugins/template_exporter.py +++ b/jrnl/plugins/template_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index 7714606c..c9eaaf14 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/util.py b/jrnl/plugins/util.py index 04159ca4..ae49a2a8 100644 --- a/jrnl/plugins/util.py +++ b/jrnl/plugins/util.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/xml_exporter.py b/jrnl/plugins/xml_exporter.py index b9467912..9901f4b7 100644 --- a/jrnl/plugins/xml_exporter.py +++ b/jrnl/plugins/xml_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 7716c6c1..887fdaf1 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html From ace6b8004c44a5db66c90f82e1e68015b2b7be8b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Jul 2021 22:22:37 +0000 Subject: [PATCH 0389/1132] Update changelog [ci skip] --- CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d28c70..c8f71a70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,9 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...HEAD) -**Implemented enhancements:** - -- Multiple entries with same timestamp should be grouped together [\#1247](https://github.com/jrnl-org/jrnl/issues/1247) - **Build:** +- Remove useless shebangs and executable permissions [\#1283](https://github.com/jrnl-org/jrnl/pull/1283) ([musicinmybrain](https://github.com/musicinmybrain)) - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) **Packaging:** @@ -17,6 +14,7 @@ - Bump black from 21.5b1 to 21.5b2 [\#1254](https://github.com/jrnl-org/jrnl/pull/1254) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.5b0 to 21.5b1 [\#1244](https://github.com/jrnl-org/jrnl/pull/1244) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 20.8b1 to 21.5b0 [\#1241](https://github.com/jrnl-org/jrnl/pull/1241) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest from 6.2.3 to 6.2.4 [\#1240](https://github.com/jrnl-org/jrnl/pull/1240) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.1](https://pypi.org/project/jrnl/v2.8.1/) (2021-04-24) From 1390493a29e734f6507407137da4d4dd0f22a84c Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Mon, 28 Dec 2020 09:45:22 -0800 Subject: [PATCH 0390/1132] Install pytest-bdd (which will eventually replace behave) - Copy over the current tests from behave into the new directory that pytest-bdd will use them in Co-authored-by: Micah Jerome Ellison --- __init__.py | 3 + poetry.lock | 639 ++++++++---------- pyproject.toml | 4 + tests/features/build.feature | 8 + tests/features/configs/basic_dayone.yaml | 17 + tests/features/configs/basic_encrypted.yaml | 17 + tests/features/configs/basic_folder.yaml | 17 + tests/features/configs/basic_onefile.yaml | 17 + tests/features/configs/brackets.yaml | 12 + tests/features/configs/bug153.yaml | 17 + tests/features/configs/bug343.yaml | 13 + tests/features/configs/bug780.yaml | 12 + tests/features/configs/dayone.yaml | 12 + tests/features/configs/dayone_empty.yaml | 17 + tests/features/configs/deletion.yaml | 12 + tests/features/configs/deletion_filters.yaml | 12 + tests/features/configs/editor-args.yaml | 12 + tests/features/configs/editor.yaml | 12 + .../features/configs/editor_empty_folder.yaml | 12 + tests/features/configs/editor_encrypted.yaml | 17 + .../configs/editor_markdown_extension.yaml | 18 + tests/features/configs/empty_folder.yaml | 12 + tests/features/configs/encrypted.yaml | 12 + tests/features/configs/encrypted_old.json | 13 + tests/features/configs/encrypted_old.yaml | 11 + tests/features/configs/format_md.yaml | 19 + tests/features/configs/format_text.yaml | 19 + tests/features/configs/invalid_color.yaml | 17 + .../features/configs/little_endian_dates.yaml | 12 + .../configs/markdown-headings-335.yaml | 17 + tests/features/configs/missing_directory.yaml | 17 + tests/features/configs/missing_journal.yaml | 17 + .../features/configs/mostlyreadabledates.yaml | 12 + tests/features/configs/multiline-tags.yaml | 17 + tests/features/configs/multiline.yaml | 17 + tests/features/configs/multiple.yaml | 18 + tests/features/configs/no_colors.yaml | 12 + tests/features/configs/simple.yaml | 18 + tests/features/configs/tags-216.yaml | 17 + tests/features/configs/tags-237.yaml | 17 + tests/features/configs/tags.yaml | 17 + tests/features/configs/unreadabledates.yaml | 17 + tests/features/configs/upgrade_from_195.json | 11 + .../upgrade_from_195_little_endian_dates.json | 11 + ...om_195_with_missing_encrypted_journal.json | 11 + ...upgrade_from_195_with_missing_journal.json | 11 + tests/features/core.feature | 7 + tests/features/data/configs/basic_dayone.yaml | 17 + .../data/configs/basic_encrypted.yaml | 17 + tests/features/data/configs/basic_folder.yaml | 17 + .../features/data/configs/basic_onefile.yaml | 17 + tests/features/data/configs/brackets.yaml | 12 + tests/features/data/configs/bug153.yaml | 17 + tests/features/data/configs/bug343.yaml | 13 + tests/features/data/configs/bug780.yaml | 12 + tests/features/data/configs/dayone.yaml | 12 + tests/features/data/configs/dayone_empty.yaml | 17 + tests/features/data/configs/deletion.yaml | 12 + .../data/configs/deletion_filters.yaml | 12 + tests/features/data/configs/editor-args.yaml | 12 + tests/features/data/configs/editor.yaml | 12 + .../data/configs/editor_empty_folder.yaml | 12 + .../data/configs/editor_encrypted.yaml | 17 + tests/features/data/configs/empty_folder.yaml | 12 + tests/features/data/configs/encrypted.yaml | 12 + .../features/data/configs/encrypted_old.json | 13 + .../features/data/configs/encrypted_old.yaml | 11 + tests/features/data/configs/format_md.yaml | 19 + tests/features/data/configs/format_text.yaml | 19 + .../features/data/configs/invalid_color.yaml | 17 + .../data/configs/little_endian_dates.yaml | 12 + .../data/configs/markdown-headings-335.yaml | 17 + .../data/configs/missing_directory.yaml | 17 + .../data/configs/missing_journal.yaml | 17 + .../data/configs/mostlyreadabledates.yaml | 12 + .../features/data/configs/multiline-tags.yaml | 17 + tests/features/data/configs/multiline.yaml | 17 + tests/features/data/configs/multiple.yaml | 18 + tests/features/data/configs/no_colors.yaml | 12 + tests/features/data/configs/simple.yaml | 17 + tests/features/data/configs/tags-216.yaml | 17 + tests/features/data/configs/tags-237.yaml | 17 + tests/features/data/configs/tags.yaml | 17 + .../data/configs/unreadabledates.yaml | 17 + .../data/configs/upgrade_from_195.json | 11 + .../upgrade_from_195_little_endian_dates.json | 11 + ...om_195_with_missing_encrypted_journal.json | 11 + ...upgrade_from_195_with_missing_journal.json | 11 + .../D04D335AFED711EABA18FAFFC2100C3D.doentry | 53 ++ .../FC8A86CAFED711EA8892FAFFC2100C3D.doentry | 55 ++ .../FD8ABC8EFED711EABC35FAFFC2100C3D.doentry | 44 ++ .../data/journals/basic_encrypted.journal | 1 + .../data/journals/basic_folder/2020/08/29.txt | 19 + .../data/journals/basic_folder/2020/08/31.txt | 23 + .../data/journals/basic_folder/2020/09/24.txt | 11 + .../data/journals/basic_onefile.journal | 58 ++ tests/features/data/journals/brackets.journal | 2 + .../B40EE704E15846DE8D45C44118A4D511.doentry | 56 ++ .../B40EE704E15846DE8D45C44118A4D512.doentry | 52 ++ .../48A25033B34047C591160A4480197D8B.doentry | 33 + .../044F3747A38546168B572C2E3F217FA2.doentry | 34 + .../0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry | 46 ++ .../422BC895507944A291E6FC44FC6B8BFC.doentry | 31 + .../4BB1F46946AD439996C9B59DE7C4DDC1.doentry | 29 + .../dayone_empty.dayone/entries/empty.txt | 1 + tests/features/data/journals/deletion.journal | 5 + .../data/journals/deletion_filters.journal | 14 + .../features/data/journals/empty_folder/empty | 1 + .../features/data/journals/encrypted.journal | 1 + .../journals/encrypted_jrnl-1-9-5.journal | Bin 0 -> 128 bytes .../data/journals/little_endian_dates.journal | 5 + .../journals/markdown-headings-335.journal | 42 ++ .../data/journals/mostlyreadabledates.journal | 8 + .../data/journals/multiline-tags.journal | 7 + .../features/data/journals/multiline.journal | 5 + tests/features/data/journals/simple.journal | 5 + .../data/journals/simple_jrnl-1-9-5.journal | 13 + ...ple_jrnl-1-9-5_little_endian_dates.journal | 13 + tests/features/data/journals/tags-216.journal | 2 + tests/features/data/journals/tags-237.journal | 3 + tests/features/data/journals/tags.journal | 8 + .../data/journals/unreadabledates.journal | 5 + tests/features/data/journals/work.journal | 0 tests/features/data/templates/sample.template | 19 + tests/features/datetime.feature | 155 +++++ tests/features/delete.feature | 229 +++++++ tests/features/encrypt.feature | 35 + tests/features/environment.py | 0 tests/features/file_storage.feature | 56 ++ tests/features/format.feature | 579 ++++++++++++++++ tests/features/import.feature | 93 +++ .../D04D335AFED711EABA18FAFFC2100C3D.doentry | 53 ++ .../FC8A86CAFED711EA8892FAFFC2100C3D.doentry | 55 ++ .../FD8ABC8EFED711EABC35FAFFC2100C3D.doentry | 44 ++ .../features/journals/basic_encrypted.journal | 1 + .../journals/basic_folder/2020/08/29.txt | 19 + .../journals/basic_folder/2020/08/31.txt | 23 + .../journals/basic_folder/2020/09/24.txt | 11 + tests/features/journals/basic_onefile.journal | 58 ++ tests/features/journals/brackets.journal | 2 + .../B40EE704E15846DE8D45C44118A4D511.doentry | 56 ++ .../B40EE704E15846DE8D45C44118A4D512.doentry | 52 ++ .../48A25033B34047C591160A4480197D8B.doentry | 33 + .../044F3747A38546168B572C2E3F217FA2.doentry | 34 + .../0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry | 46 ++ .../422BC895507944A291E6FC44FC6B8BFC.doentry | 31 + .../4BB1F46946AD439996C9B59DE7C4DDC1.doentry | 29 + .../dayone_empty.dayone/entries/empty.txt | 1 + tests/features/journals/deletion.journal | 5 + .../journals/deletion_filters.journal | 14 + tests/features/journals/empty_folder/empty | 1 + tests/features/journals/encrypted.journal | 1 + .../journals/encrypted_jrnl-1-9-5.journal | Bin 0 -> 128 bytes .../journals/little_endian_dates.journal | 5 + .../journals/markdown-headings-335.journal | 42 ++ .../journals/mostlyreadabledates.journal | 8 + .../features/journals/multiline-tags.journal | 7 + tests/features/journals/multiline.journal | 5 + tests/features/journals/simple.journal | 5 + .../journals/simple_jrnl-1-9-5.journal | 13 + ...ple_jrnl-1-9-5_little_endian_dates.journal | 13 + tests/features/journals/tags-216.journal | 2 + tests/features/journals/tags-237.journal | 3 + tests/features/journals/tags.journal | 8 + .../features/journals/unreadabledates.journal | 5 + tests/features/journals/work.journal | 0 tests/features/multiple_journals.feature | 65 ++ tests/features/password.feature | 116 ++++ tests/features/search.feature | 318 +++++++++ tests/features/star.feature | 35 + tests/features/tag.feature | 53 ++ tests/features/templates/extension.md | 0 tests/features/upgrade.feature | 71 ++ tests/features/write.feature | 216 ++++++ tests/step_defs/__init__.py | 3 + tests/step_defs/conftest.py | 111 +++ tests/step_defs/test_features.py | 3 + 177 files changed, 5065 insertions(+), 340 deletions(-) create mode 100644 __init__.py create mode 100644 tests/features/build.feature create mode 100644 tests/features/configs/basic_dayone.yaml create mode 100644 tests/features/configs/basic_encrypted.yaml create mode 100644 tests/features/configs/basic_folder.yaml create mode 100644 tests/features/configs/basic_onefile.yaml create mode 100644 tests/features/configs/brackets.yaml create mode 100644 tests/features/configs/bug153.yaml create mode 100644 tests/features/configs/bug343.yaml create mode 100644 tests/features/configs/bug780.yaml create mode 100644 tests/features/configs/dayone.yaml create mode 100644 tests/features/configs/dayone_empty.yaml create mode 100644 tests/features/configs/deletion.yaml create mode 100644 tests/features/configs/deletion_filters.yaml create mode 100644 tests/features/configs/editor-args.yaml create mode 100644 tests/features/configs/editor.yaml create mode 100644 tests/features/configs/editor_empty_folder.yaml create mode 100644 tests/features/configs/editor_encrypted.yaml create mode 100644 tests/features/configs/editor_markdown_extension.yaml create mode 100644 tests/features/configs/empty_folder.yaml create mode 100644 tests/features/configs/encrypted.yaml create mode 100644 tests/features/configs/encrypted_old.json create mode 100644 tests/features/configs/encrypted_old.yaml create mode 100644 tests/features/configs/format_md.yaml create mode 100644 tests/features/configs/format_text.yaml create mode 100644 tests/features/configs/invalid_color.yaml create mode 100644 tests/features/configs/little_endian_dates.yaml create mode 100644 tests/features/configs/markdown-headings-335.yaml create mode 100644 tests/features/configs/missing_directory.yaml create mode 100644 tests/features/configs/missing_journal.yaml create mode 100644 tests/features/configs/mostlyreadabledates.yaml create mode 100644 tests/features/configs/multiline-tags.yaml create mode 100644 tests/features/configs/multiline.yaml create mode 100644 tests/features/configs/multiple.yaml create mode 100644 tests/features/configs/no_colors.yaml create mode 100644 tests/features/configs/simple.yaml create mode 100644 tests/features/configs/tags-216.yaml create mode 100644 tests/features/configs/tags-237.yaml create mode 100644 tests/features/configs/tags.yaml create mode 100644 tests/features/configs/unreadabledates.yaml create mode 100644 tests/features/configs/upgrade_from_195.json create mode 100644 tests/features/configs/upgrade_from_195_little_endian_dates.json create mode 100644 tests/features/configs/upgrade_from_195_with_missing_encrypted_journal.json create mode 100644 tests/features/configs/upgrade_from_195_with_missing_journal.json create mode 100644 tests/features/core.feature create mode 100644 tests/features/data/configs/basic_dayone.yaml create mode 100644 tests/features/data/configs/basic_encrypted.yaml create mode 100644 tests/features/data/configs/basic_folder.yaml create mode 100644 tests/features/data/configs/basic_onefile.yaml create mode 100644 tests/features/data/configs/brackets.yaml create mode 100644 tests/features/data/configs/bug153.yaml create mode 100644 tests/features/data/configs/bug343.yaml create mode 100644 tests/features/data/configs/bug780.yaml create mode 100644 tests/features/data/configs/dayone.yaml create mode 100644 tests/features/data/configs/dayone_empty.yaml create mode 100644 tests/features/data/configs/deletion.yaml create mode 100644 tests/features/data/configs/deletion_filters.yaml create mode 100644 tests/features/data/configs/editor-args.yaml create mode 100644 tests/features/data/configs/editor.yaml create mode 100644 tests/features/data/configs/editor_empty_folder.yaml create mode 100644 tests/features/data/configs/editor_encrypted.yaml create mode 100644 tests/features/data/configs/empty_folder.yaml create mode 100644 tests/features/data/configs/encrypted.yaml create mode 100644 tests/features/data/configs/encrypted_old.json create mode 100644 tests/features/data/configs/encrypted_old.yaml create mode 100644 tests/features/data/configs/format_md.yaml create mode 100644 tests/features/data/configs/format_text.yaml create mode 100644 tests/features/data/configs/invalid_color.yaml create mode 100644 tests/features/data/configs/little_endian_dates.yaml create mode 100644 tests/features/data/configs/markdown-headings-335.yaml create mode 100644 tests/features/data/configs/missing_directory.yaml create mode 100644 tests/features/data/configs/missing_journal.yaml create mode 100644 tests/features/data/configs/mostlyreadabledates.yaml create mode 100644 tests/features/data/configs/multiline-tags.yaml create mode 100644 tests/features/data/configs/multiline.yaml create mode 100644 tests/features/data/configs/multiple.yaml create mode 100644 tests/features/data/configs/no_colors.yaml create mode 100644 tests/features/data/configs/simple.yaml create mode 100644 tests/features/data/configs/tags-216.yaml create mode 100644 tests/features/data/configs/tags-237.yaml create mode 100644 tests/features/data/configs/tags.yaml create mode 100644 tests/features/data/configs/unreadabledates.yaml create mode 100644 tests/features/data/configs/upgrade_from_195.json create mode 100644 tests/features/data/configs/upgrade_from_195_little_endian_dates.json create mode 100644 tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json create mode 100644 tests/features/data/configs/upgrade_from_195_with_missing_journal.json create mode 100644 tests/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry create mode 100644 tests/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry create mode 100644 tests/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry create mode 100644 tests/features/data/journals/basic_encrypted.journal create mode 100644 tests/features/data/journals/basic_folder/2020/08/29.txt create mode 100644 tests/features/data/journals/basic_folder/2020/08/31.txt create mode 100644 tests/features/data/journals/basic_folder/2020/09/24.txt create mode 100644 tests/features/data/journals/basic_onefile.journal create mode 100644 tests/features/data/journals/brackets.journal create mode 100644 tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry create mode 100644 tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry create mode 100644 tests/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry create mode 100644 tests/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry create mode 100644 tests/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry create mode 100644 tests/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry create mode 100644 tests/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry create mode 100644 tests/features/data/journals/dayone_empty.dayone/entries/empty.txt create mode 100644 tests/features/data/journals/deletion.journal create mode 100644 tests/features/data/journals/deletion_filters.journal create mode 100644 tests/features/data/journals/empty_folder/empty create mode 100644 tests/features/data/journals/encrypted.journal create mode 100644 tests/features/data/journals/encrypted_jrnl-1-9-5.journal create mode 100644 tests/features/data/journals/little_endian_dates.journal create mode 100644 tests/features/data/journals/markdown-headings-335.journal create mode 100644 tests/features/data/journals/mostlyreadabledates.journal create mode 100644 tests/features/data/journals/multiline-tags.journal create mode 100644 tests/features/data/journals/multiline.journal create mode 100644 tests/features/data/journals/simple.journal create mode 100644 tests/features/data/journals/simple_jrnl-1-9-5.journal create mode 100644 tests/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal create mode 100644 tests/features/data/journals/tags-216.journal create mode 100644 tests/features/data/journals/tags-237.journal create mode 100644 tests/features/data/journals/tags.journal create mode 100644 tests/features/data/journals/unreadabledates.journal create mode 100644 tests/features/data/journals/work.journal create mode 100644 tests/features/data/templates/sample.template create mode 100644 tests/features/datetime.feature create mode 100644 tests/features/delete.feature create mode 100644 tests/features/encrypt.feature create mode 100644 tests/features/environment.py create mode 100644 tests/features/file_storage.feature create mode 100644 tests/features/format.feature create mode 100644 tests/features/import.feature create mode 100644 tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry create mode 100644 tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry create mode 100644 tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry create mode 100644 tests/features/journals/basic_encrypted.journal create mode 100644 tests/features/journals/basic_folder/2020/08/29.txt create mode 100644 tests/features/journals/basic_folder/2020/08/31.txt create mode 100644 tests/features/journals/basic_folder/2020/09/24.txt create mode 100644 tests/features/journals/basic_onefile.journal create mode 100644 tests/features/journals/brackets.journal create mode 100644 tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry create mode 100644 tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry create mode 100644 tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry create mode 100644 tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry create mode 100644 tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry create mode 100644 tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry create mode 100644 tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry create mode 100644 tests/features/journals/dayone_empty.dayone/entries/empty.txt create mode 100644 tests/features/journals/deletion.journal create mode 100644 tests/features/journals/deletion_filters.journal create mode 100644 tests/features/journals/empty_folder/empty create mode 100644 tests/features/journals/encrypted.journal create mode 100644 tests/features/journals/encrypted_jrnl-1-9-5.journal create mode 100644 tests/features/journals/little_endian_dates.journal create mode 100644 tests/features/journals/markdown-headings-335.journal create mode 100644 tests/features/journals/mostlyreadabledates.journal create mode 100644 tests/features/journals/multiline-tags.journal create mode 100644 tests/features/journals/multiline.journal create mode 100644 tests/features/journals/simple.journal create mode 100644 tests/features/journals/simple_jrnl-1-9-5.journal create mode 100644 tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal create mode 100644 tests/features/journals/tags-216.journal create mode 100644 tests/features/journals/tags-237.journal create mode 100644 tests/features/journals/tags.journal create mode 100644 tests/features/journals/unreadabledates.journal create mode 100644 tests/features/journals/work.journal create mode 100644 tests/features/multiple_journals.feature create mode 100644 tests/features/password.feature create mode 100644 tests/features/search.feature create mode 100644 tests/features/star.feature create mode 100644 tests/features/tag.feature create mode 100644 tests/features/templates/extension.md create mode 100644 tests/features/upgrade.feature create mode 100644 tests/features/write.feature create mode 100644 tests/step_defs/__init__.py create mode 100644 tests/step_defs/conftest.py create mode 100644 tests/step_defs/test_features.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 00000000..46468510 --- /dev/null +++ b/__init__.py @@ -0,0 +1,3 @@ +import sys + +sys.path.append("..") diff --git a/poetry.lock b/poetry.lock index 238b977c..e999d3af 100644 --- a/poetry.lock +++ b/poetry.lock @@ -19,14 +19,14 @@ python-versions = "*" [[package]] name = "argcomplete" -version = "1.12.2" +version = "1.12.3" description = "Bash tab completion for argparse" category = "dev" optional = false python-versions = "*" [package.dependencies] -importlib-metadata = {version = ">=0.23,<4", markers = "python_version == \"3.7\""} +importlib-metadata = {version = ">=0.23,<5", markers = "python_version == \"3.7\""} [package.extras] test = ["coverage", "flake8", "pexpect", "wheel"] @@ -49,17 +49,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "20.3.0" +version = "21.2.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "furo", "sphinx", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] [[package]] name = "behave" @@ -80,7 +80,7 @@ docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] [[package]] name = "black" -version = "21.5b2" +version = "21.6b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -104,7 +104,7 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cffi" -version = "1.14.4" +version = "1.14.5" description = "Foreign Function Interface for Python calling C code." category = "main" optional = false @@ -115,11 +115,15 @@ pycparser = "*" [[package]] name = "click" -version = "7.1.2" +version = "8.0.1" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" @@ -149,16 +153,30 @@ ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] -name = "future" -version = "0.18.2" -description = "Clean single-source support for Python 3 and 2" +name = "ghp-import" +version = "2.0.1" +description = "Copy your docs directly to the gh-pages branch." category = "dev" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = "*" + +[package.dependencies] +python-dateutil = ">=2.8.1" + +[package.extras] +dev = ["twine", "markdown", "flake8"] + +[[package]] +name = "glob2" +version = "0.7" +description = "Version of the glob module that can capture patterns and supports recursive wildcards" +category = "dev" +optional = false +python-versions = "*" [[package]] name = "importlib-metadata" -version = "3.7.2" +version = "4.5.0" description = "Read metadata from Python packages" category = "main" optional = false @@ -170,7 +188,7 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -193,25 +211,17 @@ test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio"] [[package]] name = "jinja2" -version = "2.11.2" +version = "3.0.1" description = "A very fast and expressive template engine." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [package.dependencies] -MarkupSafe = ">=0.23" +MarkupSafe = ">=2.0" [package.extras] -i18n = ["Babel (>=0.8)"] - -[[package]] -name = "joblib" -version = "0.17.0" -description = "Lightweight pipelining: using Python functions as pipeline jobs." -category = "dev" -optional = false -python-versions = ">=3.6" +i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" @@ -232,36 +242,23 @@ docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] -name = "livereload" -version = "2.6.3" -description = "Python LiveReload is an awesome tool for web developers" +name = "mako" +version = "1.1.4" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." category = "dev" optional = false -python-versions = "*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] -six = "*" -tornado = {version = "*", markers = "python_version > \"2.7\""} - -[[package]] -name = "lunr" -version = "0.5.8" -description = "A Python implementation of Lunr.js" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -future = ">=0.16.0" -nltk = {version = ">=3.2.5", optional = true, markers = "python_version > \"2.7\" and extra == \"languages\""} -six = ">=1.11.0" +MarkupSafe = ">=0.9.2" [package.extras] -languages = ["nltk (>=3.2.5,<3.5)", "nltk (>=3.2.5)"] +babel = ["babel"] +lingua = ["lingua"] [[package]] name = "markdown" -version = "3.3.3" +version = "3.3.4" description = "Python implementation of Markdown." category = "dev" optional = false @@ -275,28 +272,42 @@ testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" -version = "1.1.1" +version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +python-versions = ">=3.6" + +[[package]] +name = "mergedeep" +version = "1.3.4" +description = "A deep merge function for 🐍." +category = "dev" +optional = false +python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.1.2" +version = "1.2.1" description = "Project documentation with Markdown." category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] click = ">=3.3" +ghp-import = ">=1.0" +importlib-metadata = ">=3.10" Jinja2 = ">=2.10.1" -livereload = ">=2.5.1" -lunr = {version = "0.5.8", extras = ["languages"]} Markdown = ">=3.2.1" +mergedeep = ">=1.3.4" +packaging = ">=20.5" PyYAML = ">=3.10" -tornado = ">=5.0" +pyyaml-env-tag = ">=0.1" +watchdog = ">=2.0" + +[package.extras] +i18n = ["babel (>=2.9.0)"] [[package]] name = "mypy-extensions" @@ -306,31 +317,9 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "nltk" -version = "3.5" -description = "Natural Language Toolkit" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -click = "*" -joblib = "*" -regex = "*" -tqdm = "*" - -[package.extras] -all = ["requests", "numpy", "python-crfsuite", "scikit-learn", "twython", "pyparsing", "scipy", "matplotlib", "gensim"] -corenlp = ["requests"] -machine_learning = ["gensim", "numpy", "python-crfsuite", "scikit-learn", "scipy"] -plot = ["matplotlib"] -tgrep = ["pyparsing"] -twitter = ["twython"] - [[package]] name = "packaging" -version = "20.8" +version = "20.9" description = "Core utilities for Python packages" category = "dev" optional = false @@ -341,7 +330,7 @@ pyparsing = ">=2.0.2" [[package]] name = "parse" -version = "1.18.0" +version = "1.19.0" description = "parse() is the opposite of format()" category = "dev" optional = false @@ -447,6 +436,23 @@ toml = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +[[package]] +name = "pytest-bdd" +version = "4.0.2" +description = "BDD for pytest" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +glob2 = "*" +Mako = "*" +parse = "*" +parse-type = "*" +py = "*" +pytest = ">=4.3" +six = ">=1.9.0" + [[package]] name = "python-dateutil" version = "2.8.1" @@ -490,9 +496,20 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +[[package]] +name = "pyyaml-env-tag" +version = "0.1" +description = "A custom YAML tag for referencing environment variables in YAML files. " +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pyyaml = "*" + [[package]] name = "regex" -version = "2020.11.13" +version = "2021.4.4" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -500,7 +517,7 @@ python-versions = "*" [[package]] name = "secretstorage" -version = "3.3.0" +version = "3.3.1" description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = false @@ -512,7 +529,7 @@ jeepney = ">=0.6" [[package]] name = "six" -version = "1.15.0" +version = "1.16.0" description = "Python 2 and 3 compatibility utilities" category = "main" optional = false @@ -534,25 +551,6 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -[[package]] -name = "tornado" -version = "6.1" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "dev" -optional = false -python-versions = ">= 3.5" - -[[package]] -name = "tqdm" -version = "4.54.1" -description = "Fast, Extensible Progress Meter" -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" - -[package.extras] -dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown", "wheel"] - [[package]] name = "typed-ast" version = "1.4.3" @@ -563,7 +561,7 @@ python-versions = "*" [[package]] name = "typing-extensions" -version = "3.7.4.3" +version = "3.10.0.0" description = "Backported and Experimental Type Hints for Python 3.5+" category = "main" optional = false @@ -580,6 +578,17 @@ python-versions = "*" [package.dependencies] pytz = "*" +[[package]] +name = "watchdog" +version = "2.1.2" +description = "Filesystem events monitoring" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] + [[package]] name = "xmltodict" version = "0.12.0" @@ -590,7 +599,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "yq" -version = "2.12.0" +version = "2.12.2" description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" category = "dev" optional = false @@ -607,20 +616,20 @@ test = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" -version = "3.4.0" +version = "3.4.1" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.6" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "4d9054a240b279da990b8038623d8b2025487ef37162f7f7ef4a4ff8cbae872b" +content-hash = "4bb72b50e012bd9b58e47835e1fd5d767ce68ac869505f77bb6ad9d564dbf139" [metadata.files] ansiwrap = [ @@ -632,8 +641,8 @@ appdirs = [ {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] argcomplete = [ - {file = "argcomplete-1.12.2-py2.py3-none-any.whl", hash = "sha256:17f01a9b9b9ece3e6b07058eae737ad6e10de8b4e149105f84614783913aba71"}, - {file = "argcomplete-1.12.2.tar.gz", hash = "sha256:de0e1282330940d52ea92a80fea2e4b9e0da1932aaa570f84d268939d1897b04"}, + {file = "argcomplete-1.12.3-py2.py3-none-any.whl", hash = "sha256:291f0beca7fd49ce285d2f10e4c1c77e9460cf823eef2de54df0c0fec88b0d81"}, + {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, ] asteval = [ {file = "asteval-0.9.23.tar.gz", hash = "sha256:f5096a924b1d2f147e70327245d95fc8f534dbe94277b6828ce2a8c049d3a438"}, @@ -643,59 +652,59 @@ atomicwrites = [ {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, ] attrs = [ - {file = "attrs-20.3.0-py2.py3-none-any.whl", hash = "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6"}, - {file = "attrs-20.3.0.tar.gz", hash = "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"}, + {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, + {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, ] behave = [ {file = "behave-1.2.6-py2.py3-none-any.whl", hash = "sha256:ebda1a6c9e5bfe95c5f9f0a2794e01c7098b3dde86c10a95d8621c5907ff6f1c"}, {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, ] black = [ - {file = "black-21.5b2-py3-none-any.whl", hash = "sha256:e5cf21ebdffc7a9b29d73912b6a6a9a4df4ce70220d523c21647da2eae0751ef"}, - {file = "black-21.5b2.tar.gz", hash = "sha256:1fc0e0a2c8ae7d269dfcf0c60a89afa299664f3e811395d40b1922dff8f854b5"}, + {file = "black-21.6b0-py3-none-any.whl", hash = "sha256:dfb8c5a069012b2ab1e972e7b908f5fb42b6bbabcba0a788b86dc05067c7d9c7"}, + {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, ] cffi = [ - {file = "cffi-1.14.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ebb253464a5d0482b191274f1c8bf00e33f7e0b9c66405fbffc61ed2c839c775"}, - {file = "cffi-1.14.4-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:2c24d61263f511551f740d1a065eb0212db1dbbbbd241db758f5244281590c06"}, - {file = "cffi-1.14.4-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9f7a31251289b2ab6d4012f6e83e58bc3b96bd151f5b5262467f4bb6b34a7c26"}, - {file = "cffi-1.14.4-cp27-cp27m-win32.whl", hash = "sha256:5cf4be6c304ad0b6602f5c4e90e2f59b47653ac1ed9c662ed379fe48a8f26b0c"}, - {file = "cffi-1.14.4-cp27-cp27m-win_amd64.whl", hash = "sha256:f60567825f791c6f8a592f3c6e3bd93dd2934e3f9dac189308426bd76b00ef3b"}, - {file = "cffi-1.14.4-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:c6332685306b6417a91b1ff9fae889b3ba65c2292d64bd9245c093b1b284809d"}, - {file = "cffi-1.14.4-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d9efd8b7a3ef378dd61a1e77367f1924375befc2eba06168b6ebfa903a5e59ca"}, - {file = "cffi-1.14.4-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:51a8b381b16ddd370178a65360ebe15fbc1c71cf6f584613a7ea08bfad946698"}, - {file = "cffi-1.14.4-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:1d2c4994f515e5b485fd6d3a73d05526aa0fcf248eb135996b088d25dfa1865b"}, - {file = "cffi-1.14.4-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:af5c59122a011049aad5dd87424b8e65a80e4a6477419c0c1015f73fb5ea0293"}, - {file = "cffi-1.14.4-cp35-cp35m-win32.whl", hash = "sha256:594234691ac0e9b770aee9fcdb8fa02c22e43e5c619456efd0d6c2bf276f3eb2"}, - {file = "cffi-1.14.4-cp35-cp35m-win_amd64.whl", hash = "sha256:64081b3f8f6f3c3de6191ec89d7dc6c86a8a43911f7ecb422c60e90c70be41c7"}, - {file = "cffi-1.14.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f803eaa94c2fcda012c047e62bc7a51b0bdabda1cad7a92a522694ea2d76e49f"}, - {file = "cffi-1.14.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:105abaf8a6075dc96c1fe5ae7aae073f4696f2905fde6aeada4c9d2926752362"}, - {file = "cffi-1.14.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0638c3ae1a0edfb77c6765d487fee624d2b1ee1bdfeffc1f0b58c64d149e7eec"}, - {file = "cffi-1.14.4-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:7c6b1dece89874d9541fc974917b631406233ea0440d0bdfbb8e03bf39a49b3b"}, - {file = "cffi-1.14.4-cp36-cp36m-win32.whl", hash = "sha256:155136b51fd733fa94e1c2ea5211dcd4c8879869008fc811648f16541bf99668"}, - {file = "cffi-1.14.4-cp36-cp36m-win_amd64.whl", hash = "sha256:6bc25fc545a6b3d57b5f8618e59fc13d3a3a68431e8ca5fd4c13241cd70d0009"}, - {file = "cffi-1.14.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a7711edca4dcef1a75257b50a2fbfe92a65187c47dab5a0f1b9b332c5919a3fb"}, - {file = "cffi-1.14.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:00e28066507bfc3fe865a31f325c8391a1ac2916219340f87dfad602c3e48e5d"}, - {file = "cffi-1.14.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:798caa2a2384b1cbe8a2a139d80734c9db54f9cc155c99d7cc92441a23871c03"}, - {file = "cffi-1.14.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:a5ed8c05548b54b998b9498753fb9cadbfd92ee88e884641377d8a8b291bcc01"}, - {file = "cffi-1.14.4-cp37-cp37m-win32.whl", hash = "sha256:00a1ba5e2e95684448de9b89888ccd02c98d512064b4cb987d48f4b40aa0421e"}, - {file = "cffi-1.14.4-cp37-cp37m-win_amd64.whl", hash = "sha256:9cc46bc107224ff5b6d04369e7c595acb700c3613ad7bcf2e2012f62ece80c35"}, - {file = "cffi-1.14.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:df5169c4396adc04f9b0a05f13c074df878b6052430e03f50e68adf3a57aa28d"}, - {file = "cffi-1.14.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:9ffb888f19d54a4d4dfd4b3f29bc2c16aa4972f1c2ab9c4ab09b8ab8685b9c2b"}, - {file = "cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8d6603078baf4e11edc4168a514c5ce5b3ba6e3e9c374298cb88437957960a53"}, - {file = "cffi-1.14.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:d5ff0621c88ce83a28a10d2ce719b2ee85635e85c515f12bac99a95306da4b2e"}, - {file = "cffi-1.14.4-cp38-cp38-win32.whl", hash = "sha256:b4e248d1087abf9f4c10f3c398896c87ce82a9856494a7155823eb45a892395d"}, - {file = "cffi-1.14.4-cp38-cp38-win_amd64.whl", hash = "sha256:ec80dc47f54e6e9a78181ce05feb71a0353854cc26999db963695f950b5fb375"}, - {file = "cffi-1.14.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:840793c68105fe031f34d6a086eaea153a0cd5c491cde82a74b420edd0a2b909"}, - {file = "cffi-1.14.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:b18e0a9ef57d2b41f5c68beefa32317d286c3d6ac0484efd10d6e07491bb95dd"}, - {file = "cffi-1.14.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:045d792900a75e8b1e1b0ab6787dd733a8190ffcf80e8c8ceb2fb10a29ff238a"}, - {file = "cffi-1.14.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:7ef7d4ced6b325e92eb4d3502946c78c5367bc416398d387b39591532536734e"}, - {file = "cffi-1.14.4-cp39-cp39-win32.whl", hash = "sha256:ba4e9e0ae13fc41c6b23299545e5ef73055213e466bd107953e4a013a5ddd7e3"}, - {file = "cffi-1.14.4-cp39-cp39-win_amd64.whl", hash = "sha256:f032b34669220030f905152045dfa27741ce1a6db3324a5bc0b96b6c7420c87b"}, - {file = "cffi-1.14.4.tar.gz", hash = "sha256:1a465cbe98a7fd391d47dce4b8f7e5b921e6cd805ef421d04f5f66ba8f06086c"}, + {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, + {file = "cffi-1.14.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1"}, + {file = "cffi-1.14.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99cd03ae7988a93dd00bcd9d0b75e1f6c426063d6f03d2f90b89e29b25b82dfa"}, + {file = "cffi-1.14.5-cp27-cp27m-win32.whl", hash = "sha256:65fa59693c62cf06e45ddbb822165394a288edce9e276647f0046e1ec26920f3"}, + {file = "cffi-1.14.5-cp27-cp27m-win_amd64.whl", hash = "sha256:51182f8927c5af975fece87b1b369f722c570fe169f9880764b1ee3bca8347b5"}, + {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:43e0b9d9e2c9e5d152946b9c5fe062c151614b262fda2e7b201204de0b99e482"}, + {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbde590d4faaa07c72bf979734738f328d239913ba3e043b1e98fe9a39f8b2b6"}, + {file = "cffi-1.14.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:5de7970188bb46b7bf9858eb6890aad302577a5f6f75091fd7cdd3ef13ef3045"}, + {file = "cffi-1.14.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a465da611f6fa124963b91bf432d960a555563efe4ed1cc403ba5077b15370aa"}, + {file = "cffi-1.14.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:d42b11d692e11b6634f7613ad8df5d6d5f8875f5d48939520d351007b3c13406"}, + {file = "cffi-1.14.5-cp35-cp35m-win32.whl", hash = "sha256:72d8d3ef52c208ee1c7b2e341f7d71c6fd3157138abf1a95166e6165dd5d4369"}, + {file = "cffi-1.14.5-cp35-cp35m-win_amd64.whl", hash = "sha256:29314480e958fd8aab22e4a58b355b629c59bf5f2ac2492b61e3dc06d8c7a315"}, + {file = "cffi-1.14.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:3d3dd4c9e559eb172ecf00a2a7517e97d1e96de2a5e610bd9b68cea3925b4892"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, + {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, + {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, + {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, + {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, + {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, + {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, + {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, + {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, ] click = [ - {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, - {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, + {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, + {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -715,12 +724,15 @@ cryptography = [ {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] -future = [ - {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, +ghp-import = [ + {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, +] +glob2 = [ + {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-3.7.2-py3-none-any.whl", hash = "sha256:407d13f55dc6f2a844e62325d18ad7019a436c4bfcaee34cda35f2be6e7c3e34"}, - {file = "importlib_metadata-3.7.2.tar.gz", hash = "sha256:18d5ff601069f98d5d605b6a4b50c18a34811d655c55548adc833e687289acde"}, + {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"}, + {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -731,99 +743,74 @@ jeepney = [ {file = "jeepney-0.6.0.tar.gz", hash = "sha256:7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657"}, ] jinja2 = [ - {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, - {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, -] -joblib = [ - {file = "joblib-0.17.0-py3-none-any.whl", hash = "sha256:698c311779f347cf6b7e6b8a39bb682277b8ee4aba8cf9507bc0cf4cd4737b72"}, - {file = "joblib-0.17.0.tar.gz", hash = "sha256:9e284edd6be6b71883a63c9b7f124738a3c16195513ad940eae7e3438de885d5"}, + {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, + {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, ] keyring = [ {file = "keyring-23.0.1-py3-none-any.whl", hash = "sha256:8f607d7d1cc502c43a932a275a56fe47db50271904513a379d39df1af277ac48"}, {file = "keyring-23.0.1.tar.gz", hash = "sha256:045703609dd3fccfcdb27da201684278823b72af515aedec1a8515719a038cb8"}, ] -livereload = [ - {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, -] -lunr = [ - {file = "lunr-0.5.8-py2.py3-none-any.whl", hash = "sha256:aab3f489c4d4fab4c1294a257a30fec397db56f0a50273218ccc3efdbf01d6ca"}, - {file = "lunr-0.5.8.tar.gz", hash = "sha256:c4fb063b98eff775dd638b3df380008ae85e6cb1d1a24d1cd81a10ef6391c26e"}, +mako = [ + {file = "Mako-1.1.4.tar.gz", hash = "sha256:17831f0b7087c313c0ffae2bcbbd3c1d5ba9eeac9c38f2eb7b50e8c99fe9d5ab"}, ] markdown = [ - {file = "Markdown-3.3.3-py3-none-any.whl", hash = "sha256:c109c15b7dc20a9ac454c9e6025927d44460b85bd039da028d85e2b6d0bcc328"}, - {file = "Markdown-3.3.3.tar.gz", hash = "sha256:5d9f2b5ca24bc4c7a390d22323ca4bad200368612b5aaa7796babf971d2b2f18"}, + {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, + {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ - {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, - {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, +] +mergedeep = [ + {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, + {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.1.2-py3-none-any.whl", hash = "sha256:096f52ff52c02c7e90332d2e53da862fde5c062086e1b5356a6e392d5d60f5e9"}, - {file = "mkdocs-1.1.2.tar.gz", hash = "sha256:f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39"}, + {file = "mkdocs-1.2.1-py3-none-any.whl", hash = "sha256:11141126e5896dd9d279b3e4814eb488e409a0990fb638856255020406a8e2e7"}, + {file = "mkdocs-1.2.1.tar.gz", hash = "sha256:6e0ea175366e3a50d334597b0bc042b8cebd512398cdd3f6f34842d0ef524905"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] -nltk = [ - {file = "nltk-3.5.zip", hash = "sha256:845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35"}, -] packaging = [ - {file = "packaging-20.8-py2.py3-none-any.whl", hash = "sha256:24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858"}, - {file = "packaging-20.8.tar.gz", hash = "sha256:78598185a7008a470d64526a8059de9aaa449238f280fc9eb6b13ba6c4109093"}, + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, ] parse = [ - {file = "parse-1.18.0.tar.gz", hash = "sha256:91666032d6723dc5905248417ef0dc9e4c51df9526aaeef271eacad6491f06a4"}, + {file = "parse-1.19.0.tar.gz", hash = "sha256:9ff82852bcb65d139813e2a5197627a94966245c897796760a3a2a8eb66f020b"}, ] parse-type = [ {file = "parse_type-0.5.2-py2.py3-none-any.whl", hash = "sha256:089a471b06327103865dfec2dd844230c3c658a4a1b5b4c8b6c16c8f77577f9e"}, @@ -861,6 +848,10 @@ pytest = [ {file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"}, {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, ] +pytest-bdd = [ + {file = "pytest-bdd-4.0.2.tar.gz", hash = "sha256:982489f2f036c7561affe4eeb5b392a37e1ace2a9f260cad747b1c8119e63cfd"}, + {file = "pytest_bdd-4.0.2-py2.py3-none-any.whl", hash = "sha256:74ea5a147ea558c99ae83d838e6acbe5c9e6843884a958f8231615d96838733d"}, +] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, @@ -884,80 +875,76 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, ] +pyyaml-env-tag = [ + {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, + {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, +] regex = [ - {file = "regex-2020.11.13-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8b882a78c320478b12ff024e81dc7d43c1462aa4a3341c754ee65d857a521f85"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a63f1a07932c9686d2d416fb295ec2c01ab246e89b4d58e5fa468089cab44b70"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:6e4b08c6f8daca7d8f07c8d24e4331ae7953333dbd09c648ed6ebd24db5a10ee"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:bba349276b126947b014e50ab3316c027cac1495992f10e5682dc677b3dfa0c5"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:56e01daca75eae420bce184edd8bb341c8eebb19dd3bce7266332258f9fb9dd7"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:6a8ce43923c518c24a2579fda49f093f1397dad5d18346211e46f134fc624e31"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:1ab79fcb02b930de09c76d024d279686ec5d532eb814fd0ed1e0051eb8bd2daa"}, - {file = "regex-2020.11.13-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:9801c4c1d9ae6a70aeb2128e5b4b68c45d4f0af0d1535500884d644fa9b768c6"}, - {file = "regex-2020.11.13-cp36-cp36m-win32.whl", hash = "sha256:49cae022fa13f09be91b2c880e58e14b6da5d10639ed45ca69b85faf039f7a4e"}, - {file = "regex-2020.11.13-cp36-cp36m-win_amd64.whl", hash = "sha256:749078d1eb89484db5f34b4012092ad14b327944ee7f1c4f74d6279a6e4d1884"}, - {file = "regex-2020.11.13-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b2f4007bff007c96a173e24dcda236e5e83bde4358a557f9ccf5e014439eae4b"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:38c8fd190db64f513fe4e1baa59fed086ae71fa45083b6936b52d34df8f86a88"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5862975b45d451b6db51c2e654990c1820523a5b07100fc6903e9c86575202a0"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:262c6825b309e6485ec2493ffc7e62a13cf13fb2a8b6d212f72bd53ad34118f1"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:bafb01b4688833e099d79e7efd23f99172f501a15c44f21ea2118681473fdba0"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:e32f5f3d1b1c663af7f9c4c1e72e6ffe9a78c03a31e149259f531e0fed826512"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:3bddc701bdd1efa0d5264d2649588cbfda549b2899dc8d50417e47a82e1387ba"}, - {file = "regex-2020.11.13-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:02951b7dacb123d8ea6da44fe45ddd084aa6777d4b2454fa0da61d569c6fa538"}, - {file = "regex-2020.11.13-cp37-cp37m-win32.whl", hash = "sha256:0d08e71e70c0237883d0bef12cad5145b84c3705e9c6a588b2a9c7080e5af2a4"}, - {file = "regex-2020.11.13-cp37-cp37m-win_amd64.whl", hash = "sha256:1fa7ee9c2a0e30405e21031d07d7ba8617bc590d391adfc2b7f1e8b99f46f444"}, - {file = "regex-2020.11.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:baf378ba6151f6e272824b86a774326f692bc2ef4cc5ce8d5bc76e38c813a55f"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e3faaf10a0d1e8e23a9b51d1900b72e1635c2d5b0e1bea1c18022486a8e2e52d"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:2a11a3e90bd9901d70a5b31d7dd85114755a581a5da3fc996abfefa48aee78af"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d1ebb090a426db66dd80df8ca85adc4abfcbad8a7c2e9a5ec7513ede522e0a8f"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:b2b1a5ddae3677d89b686e5c625fc5547c6e492bd755b520de5332773a8af06b"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:2c99e97d388cd0a8d30f7c514d67887d8021541b875baf09791a3baad48bb4f8"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:c084582d4215593f2f1d28b65d2a2f3aceff8342aa85afd7be23a9cad74a0de5"}, - {file = "regex-2020.11.13-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:a3d748383762e56337c39ab35c6ed4deb88df5326f97a38946ddd19028ecce6b"}, - {file = "regex-2020.11.13-cp38-cp38-win32.whl", hash = "sha256:7913bd25f4ab274ba37bc97ad0e21c31004224ccb02765ad984eef43e04acc6c"}, - {file = "regex-2020.11.13-cp38-cp38-win_amd64.whl", hash = "sha256:6c54ce4b5d61a7129bad5c5dc279e222afd00e721bf92f9ef09e4fae28755683"}, - {file = "regex-2020.11.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1862a9d9194fae76a7aaf0150d5f2a8ec1da89e8b55890b1786b8f88a0f619dc"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux1_i686.whl", hash = "sha256:4902e6aa086cbb224241adbc2f06235927d5cdacffb2425c73e6570e8d862364"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7a25fcbeae08f96a754b45bdc050e1fb94b95cab046bf56b016c25e9ab127b3e"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:d2d8ce12b7c12c87e41123997ebaf1a5767a5be3ec545f64675388970f415e2e"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:f7d29a6fc4760300f86ae329e3b6ca28ea9c20823df123a2ea8693e967b29917"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:717881211f46de3ab130b58ec0908267961fadc06e44f974466d1887f865bd5b"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:3128e30d83f2e70b0bed9b2a34e92707d0877e460b402faca908c6667092ada9"}, - {file = "regex-2020.11.13-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:8f6a2229e8ad946e36815f2a03386bb8353d4bde368fdf8ca5f0cb97264d3b5c"}, - {file = "regex-2020.11.13-cp39-cp39-win32.whl", hash = "sha256:f8f295db00ef5f8bae530fc39af0b40486ca6068733fb860b42115052206466f"}, - {file = "regex-2020.11.13-cp39-cp39-win_amd64.whl", hash = "sha256:a15f64ae3a027b64496a71ab1f722355e570c3fac5ba2801cafce846bf5af01d"}, - {file = "regex-2020.11.13.tar.gz", hash = "sha256:83d6b356e116ca119db8e7c6fc2983289d87b27b3fac238cfe5dca529d884562"}, + {file = "regex-2021.4.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:619d71c59a78b84d7f18891fe914446d07edd48dc8328c8e149cbe0929b4e000"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:47bf5bf60cf04d72bf6055ae5927a0bd9016096bf3d742fa50d9bf9f45aa0711"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:281d2fd05555079448537fe108d79eb031b403dac622621c78944c235f3fcf11"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:bd28bc2e3a772acbb07787c6308e00d9626ff89e3bfcdebe87fa5afbfdedf968"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:7c2a1af393fcc09e898beba5dd59196edaa3116191cc7257f9224beaed3e1aa0"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c38c71df845e2aabb7fb0b920d11a1b5ac8526005e533a8920aea97efb8ec6a4"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:96fcd1888ab4d03adfc9303a7b3c0bd78c5412b2bfbe76db5b56d9eae004907a"}, + {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:ade17eb5d643b7fead300a1641e9f45401c98eee23763e9ed66a43f92f20b4a7"}, + {file = "regex-2021.4.4-cp36-cp36m-win32.whl", hash = "sha256:e8e5b509d5c2ff12f8418006d5a90e9436766133b564db0abaec92fd27fcee29"}, + {file = "regex-2021.4.4-cp36-cp36m-win_amd64.whl", hash = "sha256:11d773d75fa650cd36f68d7ca936e3c7afaae41b863b8c387a22aaa78d3c5c79"}, + {file = "regex-2021.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d3029c340cfbb3ac0a71798100ccc13b97dddf373a4ae56b6a72cf70dfd53bc8"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:18c071c3eb09c30a264879f0d310d37fe5d3a3111662438889ae2eb6fc570c31"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:4c557a7b470908b1712fe27fb1ef20772b78079808c87d20a90d051660b1d69a"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:01afaf2ec48e196ba91b37451aa353cb7eda77efe518e481707e0515025f0cd5"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:3a9cd17e6e5c7eb328517969e0cb0c3d31fd329298dd0c04af99ebf42e904f82"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:90f11ff637fe8798933fb29f5ae1148c978cccb0452005bf4c69e13db951e765"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:919859aa909429fb5aa9cf8807f6045592c85ef56fdd30a9a3747e513db2536e"}, + {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:339456e7d8c06dd36a22e451d58ef72cef293112b559010db3d054d5560ef439"}, + {file = "regex-2021.4.4-cp37-cp37m-win32.whl", hash = "sha256:67bdb9702427ceddc6ef3dc382455e90f785af4c13d495f9626861763ee13f9d"}, + {file = "regex-2021.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:32e65442138b7b76dd8173ffa2cf67356b7bc1768851dded39a7a13bf9223da3"}, + {file = "regex-2021.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1e1c20e29358165242928c2de1482fb2cf4ea54a6a6dea2bd7a0e0d8ee321500"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:314d66636c494ed9c148a42731b3834496cc9a2c4251b1661e40936814542b14"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6d1b01031dedf2503631d0903cb563743f397ccaf6607a5e3b19a3d76fc10480"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:741a9647fcf2e45f3a1cf0e24f5e17febf3efe8d4ba1281dcc3aa0459ef424dc"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:4c46e22a0933dd783467cf32b3516299fb98cfebd895817d685130cc50cd1093"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:e512d8ef5ad7b898cdb2d8ee1cb09a8339e4f8be706d27eaa180c2f177248a10"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:980d7be47c84979d9136328d882f67ec5e50008681d94ecc8afa8a65ed1f4a6f"}, + {file = "regex-2021.4.4-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:ce15b6d103daff8e9fee13cf7f0add05245a05d866e73926c358e871221eae87"}, + {file = "regex-2021.4.4-cp38-cp38-win32.whl", hash = "sha256:a91aa8619b23b79bcbeb37abe286f2f408d2f2d6f29a17237afda55bb54e7aac"}, + {file = "regex-2021.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:c0502c0fadef0d23b128605d69b58edb2c681c25d44574fc673b0e52dce71ee2"}, + {file = "regex-2021.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:598585c9f0af8374c28edd609eb291b5726d7cbce16be6a8b95aa074d252ee17"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:ee54ff27bf0afaf4c3b3a62bcd016c12c3fdb4ec4f413391a90bd38bc3624605"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7d9884d86dd4dd489e981d94a65cd30d6f07203d90e98f6f657f05170f6324c9"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:bf5824bfac591ddb2c1f0a5f4ab72da28994548c708d2191e3b87dd207eb3ad7"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:563085e55b0d4fb8f746f6a335893bda5c2cef43b2f0258fe1020ab1dd874df8"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9c3db21af35e3b3c05764461b262d6f05bbca08a71a7849fd79d47ba7bc33ed"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:3916d08be28a1149fb97f7728fca1f7c15d309a9f9682d89d79db75d5e52091c"}, + {file = "regex-2021.4.4-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:fd45ff9293d9274c5008a2054ecef86a9bfe819a67c7be1afb65e69b405b3042"}, + {file = "regex-2021.4.4-cp39-cp39-win32.whl", hash = "sha256:fa4537fb4a98fe8fde99626e4681cc644bdcf2a795038533f9f711513a862ae6"}, + {file = "regex-2021.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:97f29f57d5b84e73fbaf99ab3e26134e6687348e95ef6b48cfd2c06807005a07"}, + {file = "regex-2021.4.4.tar.gz", hash = "sha256:52ba3d3f9b942c49d7e4bc105bb28551c44065f139a65062ab7912bef10c9afb"}, ] secretstorage = [ - {file = "SecretStorage-3.3.0-py3-none-any.whl", hash = "sha256:5c36f6537a523ec5f969ef9fad61c98eb9e017bc601d811e53aa25bece64892f"}, - {file = "SecretStorage-3.3.0.tar.gz", hash = "sha256:30cfdef28829dad64d6ea1ed08f8eff6aa115a77068926bcc9f5225d5a3246aa"}, + {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, + {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, ] six = [ - {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, - {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] textwrap3 = [ {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, @@ -967,53 +954,6 @@ toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] -tornado = [ - {file = "tornado-6.1-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:d371e811d6b156d82aa5f9a4e08b58debf97c302a35714f6f45e35139c332e32"}, - {file = "tornado-6.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:0d321a39c36e5f2c4ff12b4ed58d41390460f798422c4504e09eb5678e09998c"}, - {file = "tornado-6.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9de9e5188a782be6b1ce866e8a51bc76a0fbaa0e16613823fc38e4fc2556ad05"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:61b32d06ae8a036a6607805e6720ef00a3c98207038444ba7fd3d169cd998910"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:3e63498f680547ed24d2c71e6497f24bca791aca2fe116dbc2bd0ac7f191691b"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:6c77c9937962577a6a76917845d06af6ab9197702a42e1346d8ae2e76b5e3675"}, - {file = "tornado-6.1-cp35-cp35m-win32.whl", hash = "sha256:6286efab1ed6e74b7028327365cf7346b1d777d63ab30e21a0f4d5b275fc17d5"}, - {file = "tornado-6.1-cp35-cp35m-win_amd64.whl", hash = "sha256:fa2ba70284fa42c2a5ecb35e322e68823288a4251f9ba9cc77be04ae15eada68"}, - {file = "tornado-6.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0a00ff4561e2929a2c37ce706cb8233b7907e0cdc22eab98888aca5dd3775feb"}, - {file = "tornado-6.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:748290bf9112b581c525e6e6d3820621ff020ed95af6f17fedef416b27ed564c"}, - {file = "tornado-6.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:e385b637ac3acaae8022e7e47dfa7b83d3620e432e3ecb9a3f7f58f150e50921"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:25ad220258349a12ae87ede08a7b04aca51237721f63b1808d39bdb4b2164558"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:65d98939f1a2e74b58839f8c4dab3b6b3c1ce84972ae712be02845e65391ac7c"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:e519d64089b0876c7b467274468709dadf11e41d65f63bba207e04217f47c085"}, - {file = "tornado-6.1-cp36-cp36m-win32.whl", hash = "sha256:b87936fd2c317b6ee08a5741ea06b9d11a6074ef4cc42e031bc6403f82a32575"}, - {file = "tornado-6.1-cp36-cp36m-win_amd64.whl", hash = "sha256:cc0ee35043162abbf717b7df924597ade8e5395e7b66d18270116f8745ceb795"}, - {file = "tornado-6.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7250a3fa399f08ec9cb3f7b1b987955d17e044f1ade821b32e5f435130250d7f"}, - {file = "tornado-6.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:ed3ad863b1b40cd1d4bd21e7498329ccaece75db5a5bf58cd3c9f130843e7102"}, - {file = "tornado-6.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:dcef026f608f678c118779cd6591c8af6e9b4155c44e0d1bc0c87c036fb8c8c4"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:70dec29e8ac485dbf57481baee40781c63e381bebea080991893cd297742b8fd"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:d3f7594930c423fd9f5d1a76bee85a2c36fd8b4b16921cae7e965f22575e9c01"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:3447475585bae2e77ecb832fc0300c3695516a47d46cefa0528181a34c5b9d3d"}, - {file = "tornado-6.1-cp37-cp37m-win32.whl", hash = "sha256:e7229e60ac41a1202444497ddde70a48d33909e484f96eb0da9baf8dc68541df"}, - {file = "tornado-6.1-cp37-cp37m-win_amd64.whl", hash = "sha256:cb5ec8eead331e3bb4ce8066cf06d2dfef1bfb1b2a73082dfe8a161301b76e37"}, - {file = "tornado-6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:20241b3cb4f425e971cb0a8e4ffc9b0a861530ae3c52f2b0434e6c1b57e9fd95"}, - {file = "tornado-6.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:c77da1263aa361938476f04c4b6c8916001b90b2c2fdd92d8d535e1af48fba5a"}, - {file = "tornado-6.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:fba85b6cd9c39be262fcd23865652920832b61583de2a2ca907dbd8e8a8c81e5"}, - {file = "tornado-6.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:1e8225a1070cd8eec59a996c43229fe8f95689cb16e552d130b9793cb570a288"}, - {file = "tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d14d30e7f46a0476efb0deb5b61343b1526f73ebb5ed84f23dc794bdb88f9d9f"}, - {file = "tornado-6.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8f959b26f2634a091bb42241c3ed8d3cedb506e7c27b8dd5c7b9f745318ddbb6"}, - {file = "tornado-6.1-cp38-cp38-win32.whl", hash = "sha256:34ca2dac9e4d7afb0bed4677512e36a52f09caa6fded70b4e3e1c89dbd92c326"}, - {file = "tornado-6.1-cp38-cp38-win_amd64.whl", hash = "sha256:6196a5c39286cc37c024cd78834fb9345e464525d8991c21e908cc046d1cc02c"}, - {file = "tornado-6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f0ba29bafd8e7e22920567ce0d232c26d4d47c8b5cf4ed7b562b5db39fa199c5"}, - {file = "tornado-6.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:33892118b165401f291070100d6d09359ca74addda679b60390b09f8ef325ffe"}, - {file = "tornado-6.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7da13da6f985aab7f6f28debab00c67ff9cbacd588e8477034c0652ac141feea"}, - {file = "tornado-6.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:e0791ac58d91ac58f694d8d2957884df8e4e2f6687cdf367ef7eb7497f79eaa2"}, - {file = "tornado-6.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:66324e4e1beede9ac79e60f88de548da58b1f8ab4b2f1354d8375774f997e6c0"}, - {file = "tornado-6.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:a48900ecea1cbb71b8c71c620dee15b62f85f7c14189bdeee54966fbd9a0c5bd"}, - {file = "tornado-6.1-cp39-cp39-win32.whl", hash = "sha256:d3d20ea5782ba63ed13bc2b8c291a053c8d807a8fa927d941bd718468f7b950c"}, - {file = "tornado-6.1-cp39-cp39-win_amd64.whl", hash = "sha256:548430be2740e327b3fe0201abe471f314741efcb0067ec4f2d7dcfb4825f3e4"}, - {file = "tornado-6.1.tar.gz", hash = "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791"}, -] -tqdm = [ - {file = "tqdm-4.54.1-py2.py3-none-any.whl", hash = "sha256:d4f413aecb61c9779888c64ddf0c62910ad56dcbe857d8922bb505d4dbff0df1"}, - {file = "tqdm-4.54.1.tar.gz", hash = "sha256:38b658a3e4ecf9b4f6f8ff75ca16221ae3378b2e175d846b6b33ea3a20852cf5"}, -] typed-ast = [ {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, @@ -1047,23 +987,42 @@ typed-ast = [ {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ] typing-extensions = [ - {file = "typing_extensions-3.7.4.3-py2-none-any.whl", hash = "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"}, - {file = "typing_extensions-3.7.4.3-py3-none-any.whl", hash = "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918"}, - {file = "typing_extensions-3.7.4.3.tar.gz", hash = "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c"}, + {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, + {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, + {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"}, ] tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] +watchdog = [ + {file = "watchdog-2.1.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:581e3548159fe7d2a9f377a1fbcb41bdcee46849cca8ab803c7ac2e5e04ec77c"}, + {file = "watchdog-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:edcd9ef3fd460bb8a98eb1fcf99941e9fd9f275f45f1a82cb1359ec92975d647"}, + {file = "watchdog-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d34ce2261f118ecd57eedeef95fc2a495fc4a40b3ed7b3bf0bd7a8ccc1ab4f8f"}, + {file = "watchdog-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:668391e6c32742d76e5be5db6bf95c455fa4b3d11e76a77c13b39bccb3a47a72"}, + {file = "watchdog-2.1.2-pp36-pypy36_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6ef9fe57162c4c361692620e1d9167574ba1975ee468b24051ca11c9bba6438e"}, + {file = "watchdog-2.1.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:58ebb1095ee493008a7789d47dd62e4999505d82be89fc884d473086fccc6ebd"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:91387ee2421f30b75f7ff632c9d48f76648e56bf346a7c805c0a34187a93aab4"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_armv7l.whl", hash = "sha256:a6471517315a8541a943c00b45f1d252e36898a3ae963d2d52509b89a50cb2b9"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_i686.whl", hash = "sha256:a42e6d652f820b2b94cd03156c62559a2ea68d476476dfcd77d931e7f1012d4a"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_ppc64.whl", hash = "sha256:3d6405681471ebe0beb3aa083998c4870e48b57f8afdb45ea1b5957cc5cf1014"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:598d772beeaf9c98d0df946fbabf0c8365dd95ea46a250c224c725fe0c4730bc"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_s390x.whl", hash = "sha256:4b219d46d89cfa49af1d73175487c14a318a74cb8c5442603fd13c6a5b418c86"}, + {file = "watchdog-2.1.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:188145185c08c73c56f1478ccf1f0f0f85101191439679b35b6b100886ce0b39"}, + {file = "watchdog-2.1.2-py3-none-win32.whl", hash = "sha256:255a32d44bbbe62e52874ff755e2eefe271b150e0ec240ad7718a62a7a7a73c4"}, + {file = "watchdog-2.1.2-py3-none-win_amd64.whl", hash = "sha256:1a62a4671796dc93d1a7262286217d9e75823c63d4c42782912d39a506d30046"}, + {file = "watchdog-2.1.2-py3-none-win_ia64.whl", hash = "sha256:104266a778906ae0e971368d368a65c4cd032a490a9fca5ba0b78c6c7ae11720"}, + {file = "watchdog-2.1.2.tar.gz", hash = "sha256:0237db4d9024859bea27d0efb59fe75eef290833fd988b8ead7a879b0308c2db"}, +] xmltodict = [ {file = "xmltodict-0.12.0-py2.py3-none-any.whl", hash = "sha256:8bbcb45cc982f48b2ca8fe7e7827c5d792f217ecf1792626f808bf41c3b86051"}, {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, ] yq = [ - {file = "yq-2.12.0-py2.py3-none-any.whl", hash = "sha256:1f124f48dee77ad5e0be8607777fed183e96c8d31fa577de14201c7a614e4819"}, - {file = "yq-2.12.0.tar.gz", hash = "sha256:1d2ad403504d306b5258b86c698f9856d7ad58b7bb17a2b875691a6a7b8c4c20"}, + {file = "yq-2.12.2-py2.py3-none-any.whl", hash = "sha256:9fdf4487a6dbf985ca1d357ec93f926d982813e8e896e8892bae95162b6defe3"}, + {file = "yq-2.12.2.tar.gz", hash = "sha256:2f156d0724b61487ac8752ed4eaa702a5737b804d5afa46fa55866951cd106d2"}, ] zipp = [ - {file = "zipp-3.4.0-py3-none-any.whl", hash = "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108"}, - {file = "zipp-3.4.0.tar.gz", hash = "sha256:ed5eee1974372595f9e416cc7bbeeb12335201d8081ca8a0743c954d4446e5cb"}, + {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, + {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, ] diff --git a/pyproject.toml b/pyproject.toml index 8a46fe34..b8c4731e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ black = {version = "^21.5b2",allow-prereleases = true} toml = ">=0.10" pyflakes = ">=2.2.0" pytest = ">=6.2" +pytest-bdd = "^4.0.1" yq = ">=2.11" [tool.poetry.scripts] @@ -62,6 +63,9 @@ line_length = 88 known_first_party = ["jrnl"] force_sort_within_sections = true +[tool.pytest.ini_options] +minversion = "6.0" + [build-system] requires = ["poetry>=1.1"] build-backend = "poetry.masonry.api" diff --git a/tests/features/build.feature b/tests/features/build.feature new file mode 100644 index 00000000..4725ea85 --- /dev/null +++ b/tests/features/build.feature @@ -0,0 +1,8 @@ +Feature: Build process + + @deployment_tests + Scenario: Version numbers should stay in sync + Given we use the config "simple.yaml" + When we run "jrnl --version" + Then we should get no error + And the output should contain pyproject.toml version diff --git a/tests/features/configs/basic_dayone.yaml b/tests/features/configs/basic_dayone.yaml new file mode 100644 index 00000000..0209f2f7 --- /dev/null +++ b/tests/features/configs/basic_dayone.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: false +highlight: true +journals: + default: features/journals/basic_dayone.dayone +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/basic_encrypted.yaml b/tests/features/configs/basic_encrypted.yaml new file mode 100644 index 00000000..77f4e48d --- /dev/null +++ b/tests/features/configs/basic_encrypted.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: true +highlight: true +journals: + default: features/journals/basic_encrypted.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/basic_folder.yaml b/tests/features/configs/basic_folder.yaml new file mode 100644 index 00000000..ba0de638 --- /dev/null +++ b/tests/features/configs/basic_folder.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: false +highlight: true +journals: + default: features/journals/basic_folder +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/basic_onefile.yaml b/tests/features/configs/basic_onefile.yaml new file mode 100644 index 00000000..fb48c6f8 --- /dev/null +++ b/tests/features/configs/basic_onefile.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: false +highlight: true +journals: + default: features/journals/basic_onefile.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/brackets.yaml b/tests/features/configs/brackets.yaml new file mode 100644 index 00000000..e658947c --- /dev/null +++ b/tests/features/configs/brackets.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/brackets.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/bug153.yaml b/tests/features/configs/bug153.yaml new file mode 100644 index 00000000..ff645ab6 --- /dev/null +++ b/tests/features/configs/bug153.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +journals: + default: features/journals/bug153.dayone +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/bug343.yaml b/tests/features/configs/bug343.yaml new file mode 100644 index 00000000..a4e25d8a --- /dev/null +++ b/tests/features/configs/bug343.yaml @@ -0,0 +1,13 @@ +default_hour: 9 +default_minute: 0 +editor: '' +template: false +encrypt: false +highlight: true +journals: + simple: features/journals/simple.journal + work: features/journals/work.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/bug780.yaml b/tests/features/configs/bug780.yaml new file mode 100644 index 00000000..e1d830c2 --- /dev/null +++ b/tests/features/configs/bug780.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +journals: + default: features/journals/bug780.dayone +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/dayone.yaml b/tests/features/configs/dayone.yaml new file mode 100644 index 00000000..894cb911 --- /dev/null +++ b/tests/features/configs/dayone.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: noop +template: false +encrypt: false +highlight: true +journals: + default: features/journals/dayone.dayone +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/dayone_empty.yaml b/tests/features/configs/dayone_empty.yaml new file mode 100644 index 00000000..7750d389 --- /dev/null +++ b/tests/features/configs/dayone_empty.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: noop +template: false +encrypt: false +highlight: true +journals: + default: features/journals/dayone_empty.dayone +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/deletion.yaml b/tests/features/configs/deletion.yaml new file mode 100644 index 00000000..d4155260 --- /dev/null +++ b/tests/features/configs/deletion.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/deletion.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/deletion_filters.yaml b/tests/features/configs/deletion_filters.yaml new file mode 100644 index 00000000..73a88e4d --- /dev/null +++ b/tests/features/configs/deletion_filters.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/deletion_filters.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/editor-args.yaml b/tests/features/configs/editor-args.yaml new file mode 100644 index 00000000..12c5bd9c --- /dev/null +++ b/tests/features/configs/editor-args.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: vim -f -c 'setf markdown' +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/editor.yaml b/tests/features/configs/editor.yaml new file mode 100644 index 00000000..8a06f916 --- /dev/null +++ b/tests/features/configs/editor.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "vim" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/editor_empty_folder.yaml b/tests/features/configs/editor_empty_folder.yaml new file mode 100644 index 00000000..1724bbfb --- /dev/null +++ b/tests/features/configs/editor_empty_folder.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: 'vim' +template: false +encrypt: false +highlight: true +journals: + default: features/journals/empty_folder +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/editor_encrypted.yaml b/tests/features/configs/editor_encrypted.yaml new file mode 100644 index 00000000..75273c96 --- /dev/null +++ b/tests/features/configs/editor_encrypted.yaml @@ -0,0 +1,17 @@ +colors: + body: green + date: blue + tags: none + title: yellow +default_hour: 9 +default_minute: 0 +editor: "vim" +encrypt: true +template: false +highlight: true +journals: + default: features/journals/encrypted.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/editor_markdown_extension.yaml b/tests/features/configs/editor_markdown_extension.yaml new file mode 100644 index 00000000..bf3b8d8e --- /dev/null +++ b/tests/features/configs/editor_markdown_extension.yaml @@ -0,0 +1,18 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +editor: "vim" +journals: + default: features/journals/editor_markdown_extension.journal +linewrap: 80 +tagsymbols: "@" +template: features/templates/extension.md +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/empty_folder.yaml b/tests/features/configs/empty_folder.yaml new file mode 100644 index 00000000..52a21854 --- /dev/null +++ b/tests/features/configs/empty_folder.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +template: false +encrypt: false +highlight: true +journals: + default: features/journals/empty_folder +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/encrypted.yaml b/tests/features/configs/encrypted.yaml new file mode 100644 index 00000000..4d50b607 --- /dev/null +++ b/tests/features/configs/encrypted.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: true +template: false +highlight: true +journals: + default: features/journals/encrypted.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/encrypted_old.json b/tests/features/configs/encrypted_old.json new file mode 100644 index 00000000..e69d9b79 --- /dev/null +++ b/tests/features/configs/encrypted_old.json @@ -0,0 +1,13 @@ +{ + "default_hour": 9, + "default_minute": 0, + "editor": "", + "encrypt": true, + "highlight": true, + "journals": { + "default": "features/journals/encrypted_jrnl-1-9-5.journal" + }, + "linewrap": 80, + "tagsymbols": "@", + "timeformat": "%Y-%m-%d %H:%M" +} diff --git a/tests/features/configs/encrypted_old.yaml b/tests/features/configs/encrypted_old.yaml new file mode 100644 index 00000000..bc7b1440 --- /dev/null +++ b/tests/features/configs/encrypted_old.yaml @@ -0,0 +1,11 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: true +highlight: true +journals: + default: features/journals/encrypted_jrnl1-9-5.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/format_md.yaml b/tests/features/configs/format_md.yaml new file mode 100644 index 00000000..0b9f1c3b --- /dev/null +++ b/tests/features/configs/format_md.yaml @@ -0,0 +1,19 @@ +colors: + body: none + date: none + tags: none + title: none +default_hour: 9 +default_minute: 0 +display_format: markdown +editor: '' +encrypt: false +highlight: true +indent_character: '|' +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +version: v2.4.5 diff --git a/tests/features/configs/format_text.yaml b/tests/features/configs/format_text.yaml new file mode 100644 index 00000000..c82ff7a7 --- /dev/null +++ b/tests/features/configs/format_text.yaml @@ -0,0 +1,19 @@ +colors: + body: none + date: none + tags: none + title: none +default_hour: 9 +default_minute: 0 +display_format: text +editor: '' +encrypt: false +highlight: true +indent_character: '|' +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +version: v2.4.5 diff --git a/tests/features/configs/invalid_color.yaml b/tests/features/configs/invalid_color.yaml new file mode 100644 index 00000000..25c0e58d --- /dev/null +++ b/tests/features/configs/invalid_color.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: not-a-color + title: also-not-a-color + body: still-no-color + tags: me-too diff --git a/tests/features/configs/little_endian_dates.yaml b/tests/features/configs/little_endian_dates.yaml new file mode 100644 index 00000000..223c820d --- /dev/null +++ b/tests/features/configs/little_endian_dates.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/little_endian_dates.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%d.%m.%Y %H:%M" +indent_character: "|" diff --git a/tests/features/configs/markdown-headings-335.yaml b/tests/features/configs/markdown-headings-335.yaml new file mode 100644 index 00000000..4368f641 --- /dev/null +++ b/tests/features/configs/markdown-headings-335.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/markdown-headings-335.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/missing_directory.yaml b/tests/features/configs/missing_directory.yaml new file mode 100644 index 00000000..d600404c --- /dev/null +++ b/tests/features/configs/missing_directory.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/missing_directory/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/missing_journal.yaml b/tests/features/configs/missing_journal.yaml new file mode 100644 index 00000000..a1f6f8cf --- /dev/null +++ b/tests/features/configs/missing_journal.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/missing.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/mostlyreadabledates.yaml b/tests/features/configs/mostlyreadabledates.yaml new file mode 100644 index 00000000..5e3e1a15 --- /dev/null +++ b/tests/features/configs/mostlyreadabledates.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/mostlyreadabledates.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/multiline-tags.yaml b/tests/features/configs/multiline-tags.yaml new file mode 100644 index 00000000..033aaa27 --- /dev/null +++ b/tests/features/configs/multiline-tags.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/multiline-tags.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/multiline.yaml b/tests/features/configs/multiline.yaml new file mode 100644 index 00000000..aa35b3f5 --- /dev/null +++ b/tests/features/configs/multiline.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/multiline.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/multiple.yaml b/tests/features/configs/multiple.yaml new file mode 100644 index 00000000..65f2c256 --- /dev/null +++ b/tests/features/configs/multiple.yaml @@ -0,0 +1,18 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/simple.journal + ideas: features/journals/nothing.journal + simple: features/journals/simple.journal + work: features/journals/work.journal + new_encrypted: + encrypt: true + journal: features/journals/new_encrypted.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/configs/no_colors.yaml b/tests/features/configs/no_colors.yaml new file mode 100644 index 00000000..9111b561 --- /dev/null +++ b/tests/features/configs/no_colors.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/configs/simple.yaml b/tests/features/configs/simple.yaml new file mode 100644 index 00000000..f8739142 --- /dev/null +++ b/tests/features/configs/simple.yaml @@ -0,0 +1,18 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none +version: v2.5 \ No newline at end of file diff --git a/tests/features/configs/tags-216.yaml b/tests/features/configs/tags-216.yaml new file mode 100644 index 00000000..81b3865f --- /dev/null +++ b/tests/features/configs/tags-216.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/tags-216.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/tags-237.yaml b/tests/features/configs/tags-237.yaml new file mode 100644 index 00000000..5aecd61e --- /dev/null +++ b/tests/features/configs/tags-237.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/tags-237.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/tags.yaml b/tests/features/configs/tags.yaml new file mode 100644 index 00000000..4b55952c --- /dev/null +++ b/tests/features/configs/tags.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/tags.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/unreadabledates.yaml b/tests/features/configs/unreadabledates.yaml new file mode 100644 index 00000000..99304e5a --- /dev/null +++ b/tests/features/configs/unreadabledates.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/unreadabledates.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/configs/upgrade_from_195.json b/tests/features/configs/upgrade_from_195.json new file mode 100644 index 00000000..ec380372 --- /dev/null +++ b/tests/features/configs/upgrade_from_195.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/configs/upgrade_from_195_little_endian_dates.json b/tests/features/configs/upgrade_from_195_little_endian_dates.json new file mode 100644 index 00000000..7d3c470c --- /dev/null +++ b/tests/features/configs/upgrade_from_195_little_endian_dates.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%d.%m.%Y %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5_little_endian_dates.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/configs/upgrade_from_195_with_missing_encrypted_journal.json b/tests/features/configs/upgrade_from_195_with_missing_encrypted_journal.json new file mode 100644 index 00000000..5bbfb5b1 --- /dev/null +++ b/tests/features/configs/upgrade_from_195_with_missing_encrypted_journal.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": true, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/encrypted_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/configs/upgrade_from_195_with_missing_journal.json b/tests/features/configs/upgrade_from_195_with_missing_journal.json new file mode 100644 index 00000000..8d456159 --- /dev/null +++ b/tests/features/configs/upgrade_from_195_with_missing_journal.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/core.feature b/tests/features/core.feature new file mode 100644 index 00000000..3115fd57 --- /dev/null +++ b/tests/features/core.feature @@ -0,0 +1,7 @@ +Feature: Functionality of jrnl outside of actually handling journals + + Scenario: Displaying the version number + Given we use the config "simple.yaml" + When we run "jrnl --version" + Then we should get no error + Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" diff --git a/tests/features/data/configs/basic_dayone.yaml b/tests/features/data/configs/basic_dayone.yaml new file mode 100644 index 00000000..0209f2f7 --- /dev/null +++ b/tests/features/data/configs/basic_dayone.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: false +highlight: true +journals: + default: features/journals/basic_dayone.dayone +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/basic_encrypted.yaml b/tests/features/data/configs/basic_encrypted.yaml new file mode 100644 index 00000000..77f4e48d --- /dev/null +++ b/tests/features/data/configs/basic_encrypted.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: true +highlight: true +journals: + default: features/journals/basic_encrypted.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/basic_folder.yaml b/tests/features/data/configs/basic_folder.yaml new file mode 100644 index 00000000..ba0de638 --- /dev/null +++ b/tests/features/data/configs/basic_folder.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: false +highlight: true +journals: + default: features/journals/basic_folder +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/basic_onefile.yaml b/tests/features/data/configs/basic_onefile.yaml new file mode 100644 index 00000000..fb48c6f8 --- /dev/null +++ b/tests/features/data/configs/basic_onefile.yaml @@ -0,0 +1,17 @@ +colors: + date: none + title: none + body: none + tags: none +default_hour: 9 +default_minute: 0 +editor: noop +encrypt: false +highlight: true +journals: + default: features/journals/basic_onefile.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/brackets.yaml b/tests/features/data/configs/brackets.yaml new file mode 100644 index 00000000..e658947c --- /dev/null +++ b/tests/features/data/configs/brackets.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/brackets.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/bug153.yaml b/tests/features/data/configs/bug153.yaml new file mode 100644 index 00000000..ff645ab6 --- /dev/null +++ b/tests/features/data/configs/bug153.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +journals: + default: features/journals/bug153.dayone +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/bug343.yaml b/tests/features/data/configs/bug343.yaml new file mode 100644 index 00000000..a4e25d8a --- /dev/null +++ b/tests/features/data/configs/bug343.yaml @@ -0,0 +1,13 @@ +default_hour: 9 +default_minute: 0 +editor: '' +template: false +encrypt: false +highlight: true +journals: + simple: features/journals/simple.journal + work: features/journals/work.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/bug780.yaml b/tests/features/data/configs/bug780.yaml new file mode 100644 index 00000000..e1d830c2 --- /dev/null +++ b/tests/features/data/configs/bug780.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +journals: + default: features/journals/bug780.dayone +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/dayone.yaml b/tests/features/data/configs/dayone.yaml new file mode 100644 index 00000000..894cb911 --- /dev/null +++ b/tests/features/data/configs/dayone.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: noop +template: false +encrypt: false +highlight: true +journals: + default: features/journals/dayone.dayone +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/dayone_empty.yaml b/tests/features/data/configs/dayone_empty.yaml new file mode 100644 index 00000000..7750d389 --- /dev/null +++ b/tests/features/data/configs/dayone_empty.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: noop +template: false +encrypt: false +highlight: true +journals: + default: features/journals/dayone_empty.dayone +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/deletion.yaml b/tests/features/data/configs/deletion.yaml new file mode 100644 index 00000000..d4155260 --- /dev/null +++ b/tests/features/data/configs/deletion.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/deletion.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/deletion_filters.yaml b/tests/features/data/configs/deletion_filters.yaml new file mode 100644 index 00000000..73a88e4d --- /dev/null +++ b/tests/features/data/configs/deletion_filters.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/deletion_filters.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/editor-args.yaml b/tests/features/data/configs/editor-args.yaml new file mode 100644 index 00000000..12c5bd9c --- /dev/null +++ b/tests/features/data/configs/editor-args.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: vim -f -c 'setf markdown' +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/editor.yaml b/tests/features/data/configs/editor.yaml new file mode 100644 index 00000000..8a06f916 --- /dev/null +++ b/tests/features/data/configs/editor.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "vim" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/editor_empty_folder.yaml b/tests/features/data/configs/editor_empty_folder.yaml new file mode 100644 index 00000000..1724bbfb --- /dev/null +++ b/tests/features/data/configs/editor_empty_folder.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: 'vim' +template: false +encrypt: false +highlight: true +journals: + default: features/journals/empty_folder +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/editor_encrypted.yaml b/tests/features/data/configs/editor_encrypted.yaml new file mode 100644 index 00000000..75273c96 --- /dev/null +++ b/tests/features/data/configs/editor_encrypted.yaml @@ -0,0 +1,17 @@ +colors: + body: green + date: blue + tags: none + title: yellow +default_hour: 9 +default_minute: 0 +editor: "vim" +encrypt: true +template: false +highlight: true +journals: + default: features/journals/encrypted.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/empty_folder.yaml b/tests/features/data/configs/empty_folder.yaml new file mode 100644 index 00000000..52a21854 --- /dev/null +++ b/tests/features/data/configs/empty_folder.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +template: false +encrypt: false +highlight: true +journals: + default: features/journals/empty_folder +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/encrypted.yaml b/tests/features/data/configs/encrypted.yaml new file mode 100644 index 00000000..4d50b607 --- /dev/null +++ b/tests/features/data/configs/encrypted.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: true +template: false +highlight: true +journals: + default: features/journals/encrypted.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/encrypted_old.json b/tests/features/data/configs/encrypted_old.json new file mode 100644 index 00000000..e69d9b79 --- /dev/null +++ b/tests/features/data/configs/encrypted_old.json @@ -0,0 +1,13 @@ +{ + "default_hour": 9, + "default_minute": 0, + "editor": "", + "encrypt": true, + "highlight": true, + "journals": { + "default": "features/journals/encrypted_jrnl-1-9-5.journal" + }, + "linewrap": 80, + "tagsymbols": "@", + "timeformat": "%Y-%m-%d %H:%M" +} diff --git a/tests/features/data/configs/encrypted_old.yaml b/tests/features/data/configs/encrypted_old.yaml new file mode 100644 index 00000000..bc7b1440 --- /dev/null +++ b/tests/features/data/configs/encrypted_old.yaml @@ -0,0 +1,11 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: true +highlight: true +journals: + default: features/journals/encrypted_jrnl1-9-5.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/format_md.yaml b/tests/features/data/configs/format_md.yaml new file mode 100644 index 00000000..0b9f1c3b --- /dev/null +++ b/tests/features/data/configs/format_md.yaml @@ -0,0 +1,19 @@ +colors: + body: none + date: none + tags: none + title: none +default_hour: 9 +default_minute: 0 +display_format: markdown +editor: '' +encrypt: false +highlight: true +indent_character: '|' +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +version: v2.4.5 diff --git a/tests/features/data/configs/format_text.yaml b/tests/features/data/configs/format_text.yaml new file mode 100644 index 00000000..c82ff7a7 --- /dev/null +++ b/tests/features/data/configs/format_text.yaml @@ -0,0 +1,19 @@ +colors: + body: none + date: none + tags: none + title: none +default_hour: 9 +default_minute: 0 +display_format: text +editor: '' +encrypt: false +highlight: true +indent_character: '|' +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: '@' +template: false +timeformat: '%Y-%m-%d %H:%M' +version: v2.4.5 diff --git a/tests/features/data/configs/invalid_color.yaml b/tests/features/data/configs/invalid_color.yaml new file mode 100644 index 00000000..25c0e58d --- /dev/null +++ b/tests/features/data/configs/invalid_color.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: not-a-color + title: also-not-a-color + body: still-no-color + tags: me-too diff --git a/tests/features/data/configs/little_endian_dates.yaml b/tests/features/data/configs/little_endian_dates.yaml new file mode 100644 index 00000000..223c820d --- /dev/null +++ b/tests/features/data/configs/little_endian_dates.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/little_endian_dates.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%d.%m.%Y %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/markdown-headings-335.yaml b/tests/features/data/configs/markdown-headings-335.yaml new file mode 100644 index 00000000..4368f641 --- /dev/null +++ b/tests/features/data/configs/markdown-headings-335.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/markdown-headings-335.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/missing_directory.yaml b/tests/features/data/configs/missing_directory.yaml new file mode 100644 index 00000000..d600404c --- /dev/null +++ b/tests/features/data/configs/missing_directory.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/missing_directory/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/missing_journal.yaml b/tests/features/data/configs/missing_journal.yaml new file mode 100644 index 00000000..a1f6f8cf --- /dev/null +++ b/tests/features/data/configs/missing_journal.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/missing.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/mostlyreadabledates.yaml b/tests/features/data/configs/mostlyreadabledates.yaml new file mode 100644 index 00000000..5e3e1a15 --- /dev/null +++ b/tests/features/data/configs/mostlyreadabledates.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/mostlyreadabledates.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/multiline-tags.yaml b/tests/features/data/configs/multiline-tags.yaml new file mode 100644 index 00000000..033aaa27 --- /dev/null +++ b/tests/features/data/configs/multiline-tags.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/multiline-tags.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/multiline.yaml b/tests/features/data/configs/multiline.yaml new file mode 100644 index 00000000..aa35b3f5 --- /dev/null +++ b/tests/features/data/configs/multiline.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/multiline.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/multiple.yaml b/tests/features/data/configs/multiple.yaml new file mode 100644 index 00000000..65f2c256 --- /dev/null +++ b/tests/features/data/configs/multiple.yaml @@ -0,0 +1,18 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/simple.journal + ideas: features/journals/nothing.journal + simple: features/journals/simple.journal + work: features/journals/work.journal + new_encrypted: + encrypt: true + journal: features/journals/new_encrypted.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/tests/features/data/configs/no_colors.yaml b/tests/features/data/configs/no_colors.yaml new file mode 100644 index 00000000..9111b561 --- /dev/null +++ b/tests/features/data/configs/no_colors.yaml @@ -0,0 +1,12 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" diff --git a/tests/features/data/configs/simple.yaml b/tests/features/data/configs/simple.yaml new file mode 100644 index 00000000..020bab18 --- /dev/null +++ b/tests/features/data/configs/simple.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/tags-216.yaml b/tests/features/data/configs/tags-216.yaml new file mode 100644 index 00000000..81b3865f --- /dev/null +++ b/tests/features/data/configs/tags-216.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/tags-216.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/tags-237.yaml b/tests/features/data/configs/tags-237.yaml new file mode 100644 index 00000000..5aecd61e --- /dev/null +++ b/tests/features/data/configs/tags-237.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/tags-237.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/tags.yaml b/tests/features/data/configs/tags.yaml new file mode 100644 index 00000000..4b55952c --- /dev/null +++ b/tests/features/data/configs/tags.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + default: features/journals/tags.journal +linewrap: 80 +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/unreadabledates.yaml b/tests/features/data/configs/unreadabledates.yaml new file mode 100644 index 00000000..99304e5a --- /dev/null +++ b/tests/features/data/configs/unreadabledates.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/unreadabledates.journal +linewrap: 80 +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none diff --git a/tests/features/data/configs/upgrade_from_195.json b/tests/features/data/configs/upgrade_from_195.json new file mode 100644 index 00000000..ec380372 --- /dev/null +++ b/tests/features/data/configs/upgrade_from_195.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/data/configs/upgrade_from_195_little_endian_dates.json b/tests/features/data/configs/upgrade_from_195_little_endian_dates.json new file mode 100644 index 00000000..7d3c470c --- /dev/null +++ b/tests/features/data/configs/upgrade_from_195_little_endian_dates.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%d.%m.%Y %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5_little_endian_dates.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json b/tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json new file mode 100644 index 00000000..5bbfb5b1 --- /dev/null +++ b/tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": true, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/encrypted_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/data/configs/upgrade_from_195_with_missing_journal.json b/tests/features/data/configs/upgrade_from_195_with_missing_journal.json new file mode 100644 index 00000000..8d456159 --- /dev/null +++ b/tests/features/data/configs/upgrade_from_195_with_missing_journal.json @@ -0,0 +1,11 @@ +{ +"default_hour": 9, +"timeformat": "%Y-%m-%d %H:%M", +"linewrap": 80, +"encrypt": false, +"editor": "", +"default_minute": 0, +"highlight": true, +"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, +"tagsymbols": "@" +} diff --git a/tests/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry b/tests/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry new file mode 100644 index 00000000..9721dd55 --- /dev/null +++ b/tests/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry @@ -0,0 +1,53 @@ + + + + + Creation Date + 2020-08-29T18:11:00Z + Starred + + Entry Text + Entry the first. +Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu +consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In +commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget +venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + +Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo +ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse +potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget +molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus +hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis +feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum +urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget +velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac +porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. + Time Zone + America/Los_Angeles + UUID + D04D335AFED711EABA18FAFFC2100C3D + Tags + + ipsum + tagone + tagtwo + + Creator + + Device Agent + + Generation Date + 2020-09-25T02:35:45Z + Host Name + iris.lan + OS Agent + Darwin/19.3.0 + Software Agent + jrnl/v2.4.5 + + + diff --git a/tests/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry b/tests/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry new file mode 100644 index 00000000..8c2f3c52 --- /dev/null +++ b/tests/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry @@ -0,0 +1,55 @@ + + + + + Creation Date + 2020-08-31T21:32:00Z + Starred + + Entry Text + A second entry in what I hope to be a long series. +Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo +vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, +vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, +eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id +lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, +egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. +Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. + +Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel +vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et +malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, +non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel +ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo +eros. + +Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non +tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. +Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum +quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum +interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. +Quisque auctor lacinia consectetur. + Time Zone + America/Los_Angeles + UUID + FC8A86CAFED711EA8892FAFFC2100C3D + Tags + + tagtwo + + Creator + + Device Agent + + Generation Date + 2020-09-25T02:36:59Z + Host Name + iris.lan + OS Agent + Darwin/19.3.0 + Software Agent + jrnl/v2.4.5 + + + diff --git a/tests/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry b/tests/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry new file mode 100644 index 00000000..d998c36b --- /dev/null +++ b/tests/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry @@ -0,0 +1,44 @@ + + + + + Creation Date + 2020-09-24T16:14:00Z + Starred + + Entry Text + The third entry finally after weeks without writing. +I'm so excited about emojis. 💯 🎶 💩 + +Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. +Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla +eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis +dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. +Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis +vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. +Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at +ante eget fringilla. @tagthree and also @tagone + Time Zone + America/Los_Angeles + UUID + FD8ABC8EFED711EABC35FAFFC2100C3D + Tags + + tagthree + tagone + + Creator + + Device Agent + + Generation Date + 2020-09-25T02:37:01Z + Host Name + iris.lan + OS Agent + Darwin/19.3.0 + Software Agent + jrnl/v2.4.5 + + + diff --git a/tests/features/data/journals/basic_encrypted.journal b/tests/features/data/journals/basic_encrypted.journal new file mode 100644 index 00000000..ffc122df --- /dev/null +++ b/tests/features/data/journals/basic_encrypted.journal @@ -0,0 +1 @@ +gAAAAABfb4gQBMqqGn_W8v_s7qCi14bX7inuCOKbsBqIUf7_ch14vTUp7lrysPFvhBp5vGijTwDIbk4LKoIISj8NwM31I8L0zEbMx9y6iyF_zseGGNxBvNN0wzAXa67bs-ohiQhhebcdIc_52sltxL2ELh8JAKUaXRwyapgnMgJ7z6deJppLK-B7RE7BiT0eKjWTDMd2x6cZDswvHs9opDp5yjuKWV5m7x6ggCKYgHT3savT9Tg7V0Fq6K3LGWaE59lCrqlAB0u6dnrDX3qcF4SKyckaniXzRShZGebdkUKDcLFun2V2syZwYQN772xjznIsJ16iXicox2uYKg8CnTefsyCwaOZyBvySGEy3CrlBiuIRIcxCtjKbYJ2B-Aq7LZitnBR7Ny_6_Wm8HsBf3N-cFCp4GShiCKrxuXKcOZ7vszG5EKb78JS85bb0mswU5CSdgp6UAHjIZqfJq00qQsViBCbXq3oklCPZXdQkOf5U0KpG2MVUiD-Zcn5Qj3gnUhSEr-5wKU9tWrE63MGPyE6KjZlArZX2W2LeGnW2CEYw9eREGon06AzLJ4mj3BgtjVWLIdGcCwORXvHRjUqazWgbEmXNVTbtp_cKnkW-rFzRBrUoVme9v-1Y3sH0VvHBq7QIj915VzBklzWs1qzIyTPZG5Db9LvdQ7SiV8slf1Jo7l-ayUUdVj6igvKZcgfB4RUHolJoMps5p4lZ5sPqv59KtSa8DCpuoRczIj71OCpuRVARZgy1m5sUD9xSMxOBdy46u1Jnry6iMtzXWI3mEZe5m7UhmW_L4Zcv4bbk8XjkBeHjPdgm2B69jkLmCBFecD5ztoGesCGt_pNo_sWSKqLHV1-coKFB2Nn__a4utU9NJNdeNRkr8_ahU6tn3jmaFjfQ7cKfrXG_NCcYBRX9fja8EQIeBEp_3TCoXQqhuV_bGsNPA2qL63Pt6YiRaUf1g9FNBqJRlKCSOYNixSXQZN_rTePzx0SQ0aIQhADWls62WX-LG5-byJcB6W2P_cH21hDOXkoNEIyLnCz9HQ6Yd6Fbv7298ps3F6jiUDdWES23zv8sDgBuKUN94qSN34j6MDYGFnGI9zsJ-Y-I2frdlLfWPx3pUL7afcKh1nRgXdjctsTSxU2BDrsu03eBz2IoZjoOR0U51IrNMOD1NNT3kctXxHLuOHSEkwAzS3doncQbdRLi5Gc1dQuOUa4sC-p8gVjUKXO-oi_49kp9Km2Ay9wFg0epBbXx2QMzyMsN2dXeSbHF-BDXD6sULaq5syC0fOHqaMLycTCMk2wLfNyXgEt05WvAiDn-LDsRdylMRW2hXp5HWq3Poaul-7VNg6UEMlwVfgJ-7hNreuO6IRtwmx6YdqMscw0ms6mU_MQZU_dTIPg3JU4KL0YyMqPBPSGNCx3gMp41O05Ubir45FoJSnT5Dkj4v3N0S87Ys3HuFLverASsGt9bkcSzd2uMKCJjkspemPPi9VhrY4IOO03DWSWbHmxYzFc1SJ-24WM8Ch404QKpe1qy5LNzFgLvDwQhSIHjluezHXqrD-DVh1lWNNY3WmHI2ubOZfaorvLKqzBPZ6AhpIa60rKjm0OZIQOmJwWXwkdnzut6m8PtoiLzRN897YMgeztf1nmDwp0xE-EhknVZ3WV3TeqgZJ5ykfHQ5BU8x0Db57-UtKSuesKbqPPdBe91OdsPpkGlyl6psHj1_gPm4nLvzXQePwiPaEemR_gYCWGPvl9l1ANJufgCV9qQTmZGof3fb9mjv-9lS-9l_m8KirPPRpSBToNeDtk50ceYUsOlDGzIyusppG9pOcIGyiln1IO5aZ8d4_1E83qjcHTSaKGizICZU7a-pt5STBPMesy3JgBm23A2jO4m68ayBRMcLnw_RirHvvBaj0C6UR2tac45F0Ob3PpXcvFuK0g54ziIAhzGqwF9I-LZ6asXQWMW4y4EBOak8JJBorkfztzfkMaIgGu-4ZoRKOkVfdr4uzcghk3r6KUxD4-nv1ioX69-G5RwhMHppYk7z8RXS1cq5FkvzXbfEQ-Uv6M-sx32DcUy9dH-ZYhc7UWm75JJfiNXLaXT_bsc6VqQ7KPkg2-RA7CywUFCW9S0S-XdO03VdwqlUVo7fp1SKywEfhZv_9bhDCdMJBwZmigv2KP9Iz7fF6LrpLwZkzHuQGFPcyTHFpsVIFrFyJjNYCXpET9y0Q5Vt4fnea5fy-9ZiCt3S8aS0YOFJ35_kM5i3ss8eFPL0v7fIQS3ZilzdGB3bWL0J7kppHN_ekHu-wVk3UZxauoFh7hXLjPcipua-FYUIklLjcK6DG1bYP7_q6OnkC8Jl650FNezeWPomHEv7l_DO3y0tjI6SGdWvL3ZJns7Xp3ew8KsCREAUO7ffqumD03uF9N-9uWbDDjM7rk0vcg0ggfOs9Ni725mxqYpu4R285XCOVWHDvw7iU6eAvE6ry8TDXQBbNgGjTuTYFYYli7GuOqMxFIe1op2s7sRnoJE8O0J76S6APhjhjcnZRSuONWkVG_5o83uFMPSF8DtqLwuRA5E8AGfIwAUcj324sw-DA0ixBGUqomb-osUIisv3x0b044xn-FvD-8R3PZDnPbPsao8XYNxfQWStrNcZSrX2Ua-WAcv9qbQ73_57RKW4pao4ajOu7K5800D231WGiIa6aJzDnFUlzXEzYxFQyx7qegkm_9rrEp_v8TC9mfAcjWX5DMrCkxUskx9YKDfpFYq4NuxO_414gReKzd-lmorfigvttgS10N1XD74SwFluXJv-bqTbI5-SuYAhDGMv1dqrn38i3rOMQqqnQomvaUJRprqxUsKz14sSE1Y-cNqq1FXzZ6vIJq-K3YTfFWPRLeqi6gHzqS_R2YBXXUduKuYgmakiVdP3bWc-Ca8WKh5sVi6P51MO-cS7i9AZWOaOz7F8PsB4JZxAJjSOr3NBmv3EEve9auTFCudRjfC6668I_NMHaTP5CCV4cuhuAxUuKUGgd6WFjDcvoYPyn_lu3bQiqD9MEag4CaJYI9PlraRv5mbqptwxv3pca7usd0GmXN_2No_nwxB4gVb48LsBBkH35njCa5iv2EKXUSOf0k3swaTSEahqbyI4EDzPXtU5uBO39iQzNpgfV_sUpnGdysjqueUVcdWGI_s5CnrNJ-_yDAY06AoXfLrjP8_3NXB2058xZ2rfmTNJNCULz9634dICJReXNnmplxIg3i6GbzFvjfNtqjrWr_iqBShyIwuOUJRbXzdJNggx2BDNG-PEWDXl89SaudFICkDvyZKEcATIss6ZXfULIMfCrqmWmFwgXfNEd9TuvjqoxFlLSaY4UfDMiYa_arUMblFfoo5nV07GANhUoQd-6HRe7LjYeX5VRodOx6ZmZjIAUq-DYr-hatJJFR2tjT_qZht2MJeYT3GZ3o54m8zBBt0JTN7HVpKaOaM3A2hEM_Ah0QZ-DkLDxtCzMuv987GDiLT2-Riya97a47yHIJhZFzFpflW2FcuC8RFWXlfUKTQfZkFmxh3MUekUuS4yu4Z121xojVswk_4P7-FqLaSnGT2epI69I_cvalRx3wjds9-5TFYqf4GridlFBRx6Fv2fpNB9Zvp9k7NQ9oYcPuXGLoXH5kmWBagPhEGKHA_pjFUZmCuwUIoeP4nP8lhFrX8OGezsbSBG773CRJzEdfcgAc5G-p6M_24WZLZHDrsVBAvgrNt6R9eQbEviWU28t_417QCp-or9qqt4OTKv1dp_4MlZh8YBg2-dtpvzSc1l5e4kQFJu7oWlpbgsjB6pl1oRRKp1maedX-gOAf559zC4l85gfEpPln9Cnl6xvERQzfO0Ey4q91SdsgK7i7FBrKKmi2wGiemFvnaQsrjZ_IFujLo8-2c8g9zTiyH1knyoVOAAnQxqGpsz6z6PNfSxr3_G8tOlNFTV-yqN_LdVHMgXtXjn3U9koGsfMulyUcBDdR3d_0Yn6iEjBt77tbxKi2ry-0gQrB1fdGsgKjyE_tMrW8D_lQz0IXsVOzd2ixsFVXMFzD6OOD8JldV0FbA-VDAS-Tp_ezIZVp6lRq54XBgvsjzDyOmOgDbSOQN6SQmvxPnIsml1wgmtm80z-9gHBqmimHBtLKB6L7CtLmmPICMS2pX3eWOmakxscxqs8AVjijJdz_NYNfcdBeDj_fhm6dqD6iwk3EBZZfsrmMGdXtAMqf1r9ng9tsz-FriXwQiJ3IM3loBsk5DKr9CcaJtKSPuwDDlRynD2vwcD-XyF6YTQdSJa9fEcq-qXya2Scj4mqQ4RDemJgErdradRfwJfII3fWHh18XxmYVqi9Bwn3YRgwEadyo0-HjbNq6vJXi12igmP99ciRAfMVQLjfUfTwoOHj44Y2Ru_hPjJcvB6FIn6KLrrCSrZnrshFdFn4L36z1CrS8fbtdvrG3kdZQxsUJnMqttuwKRpLnDWTWkIwj_GRBFrzCFgbwGp1XYhemxggyKVuhZPfyyTIM9rhlPth6eGyrpYfap24Av_mGPRBLnzcjtpGbACGdKQL034kVmI7yENGvmY40KSrWsVG_BE9bSJhx0EptFsT2IxnxbuFD4hGb4fFag9V0BDiKpUoOZqIVqVO8cAp-5w4twvWZKkrhu16JNlLoXWMoFANrw-tp5LKSin1CUeRa4LWVI1GR8tRkIad_GnCHRv9JEMswlNy9wi2sDNsSxWT7WNasUW5-glgK9pR7d2pXGGOWfHj1U6CKIqmAiO3iw8igzhvyx_dAxMxPo \ No newline at end of file diff --git a/tests/features/data/journals/basic_folder/2020/08/29.txt b/tests/features/data/journals/basic_folder/2020/08/29.txt new file mode 100644 index 00000000..c8af54ca --- /dev/null +++ b/tests/features/data/journals/basic_folder/2020/08/29.txt @@ -0,0 +1,19 @@ +[2020-08-29 11:11:00 AM] Entry the first. +Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu +consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In +commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget +venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + +Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo +ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse +potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget +molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus +hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis +feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum +urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget +velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac +porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. diff --git a/tests/features/data/journals/basic_folder/2020/08/31.txt b/tests/features/data/journals/basic_folder/2020/08/31.txt new file mode 100644 index 00000000..826e7cdb --- /dev/null +++ b/tests/features/data/journals/basic_folder/2020/08/31.txt @@ -0,0 +1,23 @@ +[2020-08-31 02:32:00 PM] A second entry in what I hope to be a long series. * +Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo +vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, +vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, +eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id +lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, +egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. +Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. + +Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel +vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et +malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, +non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel +ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo +eros. + +Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non +tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. +Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum +quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum +interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. +Quisque auctor lacinia consectetur. diff --git a/tests/features/data/journals/basic_folder/2020/09/24.txt b/tests/features/data/journals/basic_folder/2020/09/24.txt new file mode 100644 index 00000000..2bd885ce --- /dev/null +++ b/tests/features/data/journals/basic_folder/2020/09/24.txt @@ -0,0 +1,11 @@ +[2020-09-24 09:14:00 AM] The third entry finally after weeks without writing. +I'm so excited about emojis. 💯 🎶 💩 + +Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. +Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla +eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis +dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. +Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis +vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. +Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at +ante eget fringilla. @tagthree and also @tagone diff --git a/tests/features/data/journals/basic_onefile.journal b/tests/features/data/journals/basic_onefile.journal new file mode 100644 index 00000000..0d988049 --- /dev/null +++ b/tests/features/data/journals/basic_onefile.journal @@ -0,0 +1,58 @@ +[2020-08-29 11:11] Entry the first. + +Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu +consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In +commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget +venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + +Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo +ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse +potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget +molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus +hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis +feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum +urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget +velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac +porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. + +[2020-08-31 14:32] A second entry in what I hope to be a long series. * + +Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo +vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, +vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, +eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id +lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, +egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. +Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. + +Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel +vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et +malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, +non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel +ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo +eros. + +Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non +tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. +Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum +quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum +interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. +Quisque auctor lacinia consectetur. + +[2020-09-24 09:14] The third entry finally after weeks without writing. + +I'm so excited about emojis. 💯 🎶 💩 + +Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. +Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla +eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis +dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. +Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis +vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. +Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at +ante eget fringilla. @tagthree and also @tagone diff --git a/tests/features/data/journals/brackets.journal b/tests/features/data/journals/brackets.journal new file mode 100644 index 00000000..4649ea3e --- /dev/null +++ b/tests/features/data/journals/brackets.journal @@ -0,0 +1,2 @@ +[2019-07-08 05:42] Entry subject +[1] line starting with 1 diff --git a/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry b/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry new file mode 100644 index 00000000..066821bb --- /dev/null +++ b/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry @@ -0,0 +1,56 @@ + + + + + Creation Date + 2013-10-27T02:27:27Z + Creator + + Device Agent + iPhone/iPhone3,1 + Generation Date + 2013-10-27T07:02:27Z + Host Name + omrt104001 + OS Agent + iOS/7.0.3 + Software Agent + Day One (iOS)/1.11.4 + + Entry Text + Some text. + Location + + Administrative Area + Östergötlands län + Country + Sverige + Latitude + 58.383400000000000 + Locality + City + Longitude + 15.577170000000000 + Place Name + Street + + Starred + + Time Zone + Europe/Stockholm + UUID + B40EE704E15846DE8D45C44118A4D511 + Weather + + Celsius + 12 + Description + Clear + Fahrenheit + 54 + IconName + sunnyn.png + + + diff --git a/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry b/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry new file mode 100644 index 00000000..ea3efec5 --- /dev/null +++ b/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry @@ -0,0 +1,52 @@ + + Creation Date + 2013-10-27T02:27:27Z + Creator + + Device Agent + iPhone/iPhone3,1 + Generation Date + 2013-10-27T07:02:27Z + Host Name + omrt104001 + OS Agent + iOS/7.0.3 + Software Agent + Day One (iOS)/1.11.4 + + Entry Text + This is not a valid plist. + Location + + Administrative Area + Östergötlands län + Country + Sverige + Latitude + 58.383400000000000 + Locality + City + Longitude + 15.577170000000000 + Place Name + Street + + Starred + + Time Zone + Europe/Stockholm + UUID + B40EE704E15846DE8D45C44118A4D511 + Weather + + Celsius + 12 + Description + Clear + Fahrenheit + 54 + IconName + sunnyn.png + + + diff --git a/tests/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry b/tests/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry new file mode 100644 index 00000000..426f1ea8 --- /dev/null +++ b/tests/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry @@ -0,0 +1,33 @@ + + + + + Activity + Stationary + Creation Date + 2019-12-30T21:28:54Z + Entry Text + + Starred + + UUID + 48A25033B34047C591160A4480197D8B + Creator + + Device Agent + PC + Generation Date + 2019-12-30T21:28:54Z + Host Name + LE-TREPORT + OS Agent + Microsoft Windows/10 Home + Software Agent + Journaley/2.1 + + Tags + + i_have_no_body + + + diff --git a/tests/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry b/tests/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry new file mode 100644 index 00000000..1ac26242 --- /dev/null +++ b/tests/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry @@ -0,0 +1,34 @@ + + + + + Creation Date + 2013-05-17T18:39:20Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:39:20Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This entry has tags! + Starred + + Tags + + work + PLaY + + Time Zone + America/Los_Angeles + UUID + 044F3747A38546168B572C2E3F217FA2 + + diff --git a/tests/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry b/tests/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry new file mode 100644 index 00000000..927de884 --- /dev/null +++ b/tests/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry @@ -0,0 +1,46 @@ + + + + + Creation Date + 2013-06-17T18:38:29Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:38:29Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This entry has a location. + Location + + Administrative Area + California + Country + Germany + Latitude + 52.4979764 + Locality + Berlin + Longitude + 13.2404758 + Place Name + Abandoned Spy Tower + + Starred + + Tags + + Time Zone + Europe/Berlin + UUID + 0BDDD6CDA43C4A9AA2681517CC35AD9D + + diff --git a/tests/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry b/tests/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry new file mode 100644 index 00000000..16260763 --- /dev/null +++ b/tests/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry @@ -0,0 +1,31 @@ + + + + + Creation Date + 2013-07-17T18:38:08Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:38:08Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This entry is starred! + Starred + + Tags + + Time Zone + America/Los_Angeles + UUID + 422BC895507944A291E6FC44FC6B8BFC + + diff --git a/tests/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry b/tests/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry new file mode 100644 index 00000000..9ebaf538 --- /dev/null +++ b/tests/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry @@ -0,0 +1,29 @@ + + + + + Creation Date + 2013-01-17T18:37:50Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:37:50Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This is a DayOne entry without Timezone. + Starred + + Tags + + UUID + 4BB1F46946AD439996C9B59DE7C4DDC1 + + diff --git a/tests/features/data/journals/dayone_empty.dayone/entries/empty.txt b/tests/features/data/journals/dayone_empty.dayone/entries/empty.txt new file mode 100644 index 00000000..c86b8f66 --- /dev/null +++ b/tests/features/data/journals/dayone_empty.dayone/entries/empty.txt @@ -0,0 +1 @@ +This file exists to preserve the directory structure, but should be ignored by jrnl. diff --git a/tests/features/data/journals/deletion.journal b/tests/features/data/journals/deletion.journal new file mode 100644 index 00000000..c0fa689d --- /dev/null +++ b/tests/features/data/journals/deletion.journal @@ -0,0 +1,5 @@ +[2019-10-29 11:11] First entry. + +[2019-10-29 11:11] Second entry. + +[2019-10-29 11:13] Third entry. \ No newline at end of file diff --git a/tests/features/data/journals/deletion_filters.journal b/tests/features/data/journals/deletion_filters.journal new file mode 100644 index 00000000..9a3747db --- /dev/null +++ b/tests/features/data/journals/deletion_filters.journal @@ -0,0 +1,14 @@ +[2019-10-01 08:00] It's just another day in October. +Not much to write about. + +[2020-01-01 08:00] Happy New Year! +So this is the New Year. @holidays + +[2020-03-01 08:00] It's just another day in March. +A stick, a stone, it's the end of the road. + +[2020-05-01 09:00] Happy May Day! +@holidays @springtime Several holidays fall on this date. + +[2020-05-02 12:10] Writing tests. * +@springtime They will help prevent bugs. diff --git a/tests/features/data/journals/empty_folder/empty b/tests/features/data/journals/empty_folder/empty new file mode 100644 index 00000000..175b82b5 --- /dev/null +++ b/tests/features/data/journals/empty_folder/empty @@ -0,0 +1 @@ +Nothing to see here diff --git a/tests/features/data/journals/encrypted.journal b/tests/features/data/journals/encrypted.journal new file mode 100644 index 00000000..d2a5fcbe --- /dev/null +++ b/tests/features/data/journals/encrypted.journal @@ -0,0 +1 @@ +gAAAAABVIHB7tnwKExG7aC5ZbAbBL9SG2oY2GENeoOJ22i1PZigOvCYvrQN3kpsu0KGr7ay5K-_46R5YFlqJvtQ8anPH2FSITsaZy-l5Lz_5quw3rmzhLwAR1tc0icgtR4MEpXEdsuQ7cyb12Xq-JLDrnATs0id5Vow9Ri_tE7Xe4BXgXaySn3aRPwWKoninVxVPVvETY3MXHSUEXV9OZ-pH5kYBLGYbLA== diff --git a/tests/features/data/journals/encrypted_jrnl-1-9-5.journal b/tests/features/data/journals/encrypted_jrnl-1-9-5.journal new file mode 100644 index 0000000000000000000000000000000000000000..339b47baf9671f4550efeb9b6a0cfcd5032255d6 GIT binary patch literal 128 zcmV-`0Du3(bJIGVsY(mXmoW-2hF&*L`0NbJTYlTUr8*^Qm97}8E^3^1bZ$P^M literal 0 HcmV?d00001 diff --git a/tests/features/data/journals/little_endian_dates.journal b/tests/features/data/journals/little_endian_dates.journal new file mode 100644 index 00000000..d7492969 --- /dev/null +++ b/tests/features/data/journals/little_endian_dates.journal @@ -0,0 +1,5 @@ +[09.06.2013 15:39] My first entry. +Everything is alright + +[10.07.2013 15:40] Life is good. +But I'm better. diff --git a/tests/features/data/journals/markdown-headings-335.journal b/tests/features/data/journals/markdown-headings-335.journal new file mode 100644 index 00000000..30f592ef --- /dev/null +++ b/tests/features/data/journals/markdown-headings-335.journal @@ -0,0 +1,42 @@ +[2015-04-14 13:23] Heading Test + +H1-1 += + +H1-2 +=== + +H1-3 +============================ + +H2-1 +- + +H2-2 +--- + +H2-3 +---------------------------------- + +Horizontal Rules (ignore) + +--- + +=== + +# ATX H1 + +## ATX H2 + +### ATX H3 + +#### ATX H4 + +##### ATX H5 + +###### ATX H6 + +Stuff + +More stuff +more stuff again diff --git a/tests/features/data/journals/mostlyreadabledates.journal b/tests/features/data/journals/mostlyreadabledates.journal new file mode 100644 index 00000000..bd211bf5 --- /dev/null +++ b/tests/features/data/journals/mostlyreadabledates.journal @@ -0,0 +1,8 @@ +[2019-07-18 14:23] Entry subject +Time machines are possible. I know, because I've built one in my garage. + +[2019-07-19 14:23] Entry subject +I'm going to activate the machine. Nobody knows what comes next after this. Or before this? + +[2019-07 14:23] Entry subject +I've crossed so many timelines. Is there any going back? diff --git a/tests/features/data/journals/multiline-tags.journal b/tests/features/data/journals/multiline-tags.journal new file mode 100644 index 00000000..1fb8706f --- /dev/null +++ b/tests/features/data/journals/multiline-tags.journal @@ -0,0 +1,7 @@ +[2013-06-09 15:39] Multiple @line entry with @tags. +Tag with @punctuation. afterwards +@TagOnLineAloneWithOutPunctuation +@TagOnLineAloneWithPunctuation. +Text before @tag. And After. +@hi. Hello +hi Hello \ No newline at end of file diff --git a/tests/features/data/journals/multiline.journal b/tests/features/data/journals/multiline.journal new file mode 100644 index 00000000..294ed141 --- /dev/null +++ b/tests/features/data/journals/multiline.journal @@ -0,0 +1,5 @@ +[2013-06-09 15:39] Multiple line entry. +This is the first line. +This line doesn't have any ending punctuation + +There is a blank line above this. diff --git a/tests/features/data/journals/simple.journal b/tests/features/data/journals/simple.journal new file mode 100644 index 00000000..8336068e --- /dev/null +++ b/tests/features/data/journals/simple.journal @@ -0,0 +1,5 @@ +[2013-06-09 15:39] My first entry. +Everything is alright + +[2013-06-10 15:40] Life is good. +But I'm better. diff --git a/tests/features/data/journals/simple_jrnl-1-9-5.journal b/tests/features/data/journals/simple_jrnl-1-9-5.journal new file mode 100644 index 00000000..7bb6c5ac --- /dev/null +++ b/tests/features/data/journals/simple_jrnl-1-9-5.journal @@ -0,0 +1,13 @@ +2010-06-10 15:00 A life without chocolate is like a bad analogy. + +2013-06-10 15:40 He said "[this] is the best time to be alive". +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. + +[2019-08-03 12:55] Some chat log or something + +Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, +elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus +placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor +dui. diff --git a/tests/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal b/tests/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal new file mode 100644 index 00000000..328b23f4 --- /dev/null +++ b/tests/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal @@ -0,0 +1,13 @@ +10.06.2010 15:00 A life without chocolate is like a bad analogy. + +10.06.2013 15:40 He said "[this] is the best time to be alive". +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. + +[03.08.2019 12:55] Some chat log or something + +Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, +elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus +placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor +dui. diff --git a/tests/features/data/journals/tags-216.journal b/tests/features/data/journals/tags-216.journal new file mode 100644 index 00000000..08b6d630 --- /dev/null +++ b/tests/features/data/journals/tags-216.journal @@ -0,0 +1,2 @@ +[2013-06-10 15:40] I programmed for @OS/2. +Almost makes me want to go back to @C++, though. (Still better than @C#). diff --git a/tests/features/data/journals/tags-237.journal b/tests/features/data/journals/tags-237.journal new file mode 100644 index 00000000..be050652 --- /dev/null +++ b/tests/features/data/journals/tags-237.journal @@ -0,0 +1,3 @@ +[2014-07-22 11:11] This entry has an email. +@Newline tag should show as a tag. +Kyla's @email is kyla@clevelandunderdog.org and Guinness's is guinness@fortheloveofpits.org. diff --git a/tests/features/data/journals/tags.journal b/tests/features/data/journals/tags.journal new file mode 100644 index 00000000..a28f3159 --- /dev/null +++ b/tests/features/data/journals/tags.journal @@ -0,0 +1,8 @@ +[2013-04-09 15:39] I have an @idea: +(1) write a command line @journal software +(2) ??? +(3) PROFIT! + +[2013-06-10 15:40] I met with @dan. +As alway's he shared his latest @idea on how to rule the world with me. +inst diff --git a/tests/features/data/journals/unreadabledates.journal b/tests/features/data/journals/unreadabledates.journal new file mode 100644 index 00000000..53ef1d60 --- /dev/null +++ b/tests/features/data/journals/unreadabledates.journal @@ -0,0 +1,5 @@ +[ashasd7zdskhz7asdkjasd] Entry subject +I've lost track of time. + +[sadfhakjsdf88sdf7sdff] Entry subject +Time has no meaning. diff --git a/tests/features/data/journals/work.journal b/tests/features/data/journals/work.journal new file mode 100644 index 00000000..e69de29b diff --git a/tests/features/data/templates/sample.template b/tests/features/data/templates/sample.template new file mode 100644 index 00000000..a356d823 --- /dev/null +++ b/tests/features/data/templates/sample.template @@ -0,0 +1,19 @@ +--- +extension: txt +--- + +{% block journal %} +{% for entry in entries %} +{% include entry %} +{% endfor %} + +{% endblock %} + +{% block entry %} +{{ entry.title }} +{{ "-" * len(entry.title) }} + +{{ entry.body }} + +{% endblock %} +` diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature new file mode 100644 index 00000000..8fe335c9 --- /dev/null +++ b/tests/features/datetime.feature @@ -0,0 +1,155 @@ +Feature: Reading and writing to journal with custom date formats + + Scenario: Dates can include a time + # https://github.com/jrnl-org/jrnl/issues/117 + Given we use the config "simple.yaml" + When we run "jrnl 2013-11-30 15:42: Project Started." + Then we should see the message "Entry added" + And the journal should contain "[2013-11-30 15:42] Project Started." + + Scenario: Dates can be in the future + # https://github.com/jrnl-org/jrnl/issues/185 + Given we use the config "simple.yaml" + When we run "jrnl 26/06/2099: Planet? Earth. Year? 2099." + Then we should see the message "Entry added" + And the journal should contain "[2099-06-26 09:00] Planet?" + + Scenario: Loading a sample journal with custom date + Given we use the config "little_endian_dates.yaml" + When we run "jrnl -n 2" + Then we should get no error + And the output should be + """ + 09.06.2013 15:39 My first entry. + | Everything is alright + + 10.07.2013 15:40 Life is good. + | But I'm better. + """ + + Scenario Outline: Writing an entry from command line with custom date + Given we use the config ".yaml" + When we run "jrnl " + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should contain "" + + Examples: Day-first Dates + | config | input | output | + | little_endian_dates | 2020-09-19: My first entry. | 19.09.2020 09:00 My first entry. | + | little_endian_dates | 2020-08-09: My second entry. | 09.08.2020 09:00 My second entry. | + | little_endian_dates | 2020-02-29: Test. | 29.02.2020 09:00 Test. | + | little_endian_dates | 2019-02-29: Test. | 2019-02-29: Test. | + | little_endian_dates | 2020-08-32: Test. | 2020-08-32: Test. | + | little_endian_dates | 2032-02-01: Test. | 01.02.2032 09:00 Test. | + | little_endian_dates | 2020-01-01: Test. | 01.01.2020 09:00 Test. | + | little_endian_dates | 2020-12-31: Test. | 31.12.2020 09:00 Test. | + + Scenario Outline: Searching for dates with custom date + Given we use the config ".yaml" + When we run "jrnl -on '' --short" + Then the output should be "" + + Examples: Day-first Dates + | config | input | output | + | little_endian_dates | 2013-07-10 | 10.07.2013 15:40 Life is good. | + | little_endian_dates | june 9 2013 | 09.06.2013 15:39 My first entry. | + | little_endian_dates | july 10 2013 | 10.07.2013 15:40 Life is good. | + | little_endian_dates | june 2013 | 09.06.2013 15:39 My first entry. | + | little_endian_dates | july 2013 | 10.07.2013 15:40 Life is good. | + # @todo month alone with no year should work + # | little_endian_dates | june | 09.06.2013 15:39 My first entry. | + # | little_endian_dates | july | 10.07.2013 15:40 Life is good. | + + Scenario: Writing an entry at the prompt with custom date + Given we use the config "little_endian_dates.yaml" + When we run "jrnl" and enter "2013-05-10: I saw Elvis. He's alive." + Then we should get no error + And the journal should contain "[10.05.2013 09:00] I saw Elvis." + And the journal should contain "He's alive." + + Scenario: Viewing today's entries does not print the entire journal + # https://github.com/jrnl-org/jrnl/issues/741 + Given we use the config "simple.yaml" + When we run "jrnl -on today" + Then the output should not contain "Life is good" + And the output should not contain "But I'm better." + + Scenario Outline: Create entry using day of the week as entry date. + Given we use the config "simple.yaml" + When we run "jrnl : This is an entry on a ." + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should contain " at 9am" in the local time + And the output should contain "This is an entry on a ." + + Examples: Days of the week + | day | + | Monday | + | Tuesday | + | Wednesday | + | Thursday | + | Friday | + | Saturday | + | Sunday | + | sunday | + | sUndAy | + + Scenario Outline: Create entry using day of the week abbreviations as entry date. + Given we use the config "simple.yaml" + When we run "jrnl : This is an entry on a ." + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should contain " at 9am" in the local time + + Examples: Days of the week + | day | weekday | + | mon | Monday | + | tue | Tuesday | + | wed | Wednesday | + | thu | Thursday | + | fri | Friday | + | sat | Saturday | + | sun | Sunday | + + Scenario: Journals with unreadable dates should still be loaded + Given we use the config "unreadabledates.yaml" + When we run "jrnl -2" + Then the output should contain "I've lost track of time." + And the output should contain "Time has no meaning." + + Scenario: Journals with readable dates AND unreadable dates should still contain all data. + Given we use the config "mostlyreadabledates.yaml" + When we run "jrnl -3" + Then the output should contain "Time machines are possible." + Then the output should contain "I'm going to activate the machine." + And the output should contain "I've crossed so many timelines. Is there any going back?" + And the journal should have 3 entries + + Scenario: Update near-valid dates after journal is edited + Given we use the config "mostlyreadabledates.yaml" + When we run "jrnl 2222-08-19: I have made it exactly one month into the future." + Then the journal should contain "[2019-07-01 14:23] Entry subject" + + Scenario: Integers in square brackets should not be read as dates + Given we use the config "brackets.yaml" + When we run "jrnl -1" + Then the output should contain "[1] line starting with 1" + + # broken still + @skip + Scenario: Dayone entries without timezone information are interpreted in current timezone + Given we use the config "dayone.yaml" + When we run "jrnl -until 'feb 2013'" + Then we should get no error + And the output should contain "2013-01-17T18:37Z" in the local time + + Scenario: Loading entry with ambiguous time stamp in timezone-aware journal (like Dayone) + #https://github.com/jrnl-org/jrnl/issues/153 + Given we use the config "bug153.yaml" + When we run "jrnl -1" + Then we should get no error + And the output should be + """ + 2013-10-27 03:27 Some text. + """ diff --git a/tests/features/delete.feature b/tests/features/delete.feature new file mode 100644 index 00000000..2fc3f8f7 --- /dev/null +++ b/tests/features/delete.feature @@ -0,0 +1,229 @@ +Feature: Delete entries from journal + Scenario Outline: Delete flag allows deletion of single entry + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -1" + Then the output should contain "2020-09-24 09:14 The third entry finally" + When we run "jrnl --delete" and enter + """ + N + N + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + """ + + Examples: Configs + | config | + | basic_onefile | + | basic_encrypted | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: Backing out of interactive delete does not change journal + Given we use the config ".yaml" + When we run "jrnl --delete -n 1" and enter + """ + N + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + + Scenario Outline: Delete flag with nonsense input deletes nothing (issue #932) + Given we use the config ".yaml" + When we run "jrnl --delete asdfasdf" + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Delete flag with tag only deletes tagged entries + Given we use the config ".yaml" + When we run "jrnl --delete @ipsum" and enter + """ + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + + Scenario Outline: Delete flag with multiple tags deletes all entries matching any of the tags + Given we use the config ".yaml" + When we run "jrnl --delete @ipsum @tagthree" and enter + """ + Y + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-31 14:32 A second entry in what I hope to be a long series. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: Delete flag with -and deletes boolean AND of tagged entries + Given we use the config ".yaml" + When we run "jrnl --delete -and @tagone @tagtwo" and enter + """ + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: Delete flag with -not does not delete entries from given tag + Given we use the config ".yaml" + When we run "jrnl --delete @tagone -not @ipsum" and enter + """ + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: Delete flag with -from search operator only deletes entries since that date + Given we use the config ".yaml" + When we run "jrnl --delete -from 2020-09-01" and enter + """ + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: Delete flag with -to only deletes entries up to specified date + Given we use the config ".yaml" + When we run "jrnl --delete -to 2020-08-31" and enter + """ + Y + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + + Scenario Outline: Delete flag with -starred only deletes starred entries + Given we use the config ".yaml" + When we run "jrnl --delete -starred" and enter + """ + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-29 11:11 Entry the first. + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: Delete flag with -contains only entries containing expression + Given we use the config ".yaml" + When we run "jrnl --delete -contains dignissim" and enter + """ + Y + """ + Then we flush the output + When we run "jrnl -99 --short" + Then the output should be + """ + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + """ + + Examples: Configs + | config | + | basic_onefile | + # | basic_folder | @todo + # | basic_dayone | @todo + diff --git a/tests/features/encrypt.feature b/tests/features/encrypt.feature new file mode 100644 index 00000000..f2d0a62f --- /dev/null +++ b/tests/features/encrypt.feature @@ -0,0 +1,35 @@ +Feature: Encrypting and decrypting journals + + Scenario: Decrypting a journal + Given we use the config "encrypted.yaml" + When we run "jrnl --decrypt" and enter "bad doggie no biscuit" + Then the config for journal "default" should have "encrypt" set to "bool:False" + And we should see the message "Journal decrypted" + And the journal should have 2 entries + + @todo + Scenario: Trying to decrypt an already unencrypted journal + # This should warn the user that the journal is already encrypted + Given we use the config "simple.yaml" + When we run "jrnl --decrypt" + Then the config for journal "default" should have "encrypt" set to "bool:False" + And the journal should have 2 entries + + @todo + Scenario: Trying to encrypt an already encrypted journal + # This should warn the user that the journal is already encrypted + + Scenario: Encrypting a journal + Given we use the config "simple.yaml" + When we run "jrnl --encrypt" and enter + """ + swordfish + swordfish + n + """ + Then we should see the message "Journal encrypted" + And the config for journal "default" should have "encrypt" set to "bool:True" + When we run "jrnl -n 1" and enter "swordfish" + Then we should be prompted for a password + And the output should contain "2013-06-10 15:40 Life is good" + diff --git a/tests/features/environment.py b/tests/features/environment.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/features/file_storage.feature b/tests/features/file_storage.feature new file mode 100644 index 00000000..33619365 --- /dev/null +++ b/tests/features/file_storage.feature @@ -0,0 +1,56 @@ +Feature: Journals iteracting with the file system in a way that users can see + + Scenario: Adding entries to a Folder journal should generate date files + Given we use the config "empty_folder.yaml" + When we run "jrnl 23 July 2013: Testing folder journal." + Then we should see the message "Entry added" + When the journal directory is listed + Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" + + Scenario: Adding multiple entries to a Folder journal should generate multiple date files + Given we use the config "empty_folder.yaml" + When we run "jrnl 23 July 2013: Testing folder journal." + And we run "jrnl 3/7/2014: Second entry of journal." + Then we should see the message "Entry added" + When the journal directory is listed + Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" + Then the output should contain "2014/03/07.txt" or "2014\03\07.txt" + + Scenario: If the journal and its parent directory don't exist, they should be created + Given we use the config "missing_directory.yaml" + Then the journal should not exist + When we run "jrnl This is a new entry in my journal" + Then the journal should exist + When we run "jrnl -n 1" + Then the output should contain "This is a new entry in my journal" + And the journal should have 1 entry + + Scenario: If the journal file doesn't exist, then it should be created + Given we use the config "missing_journal.yaml" + Then the journal should not exist + When we run "jrnl This is a new entry in my journal" + Then the journal should exist + When we run "jrnl -n 1" + Then the output should contain "This is a new entry in my journal" + And the journal should have 1 entry + + Scenario: Creating journal with relative path should update to absolute path + Given we use the config "missingconfig" + When we run "jrnl hello world" and enter + """ + test.txt + n + """ + And we change directory to "features" + And we run "jrnl -n 1" + Then the output should contain "hello world" + + Scenario: the temporary filename suffix should default to ".jrnl" + Given we use the config "editor.yaml" + When we run "jrnl --edit" + Then the temporary filename suffix should be ".jrnl" + + Scenario: the temporary filename suffix should be "-{template_filename}" + Given we use the config "editor_markdown_extension.yaml" + When we run "jrnl --edit" + Then the temporary filename suffix should be "-extension.md" diff --git a/tests/features/format.feature b/tests/features/format.feature new file mode 100644 index 00000000..4981f685 --- /dev/null +++ b/tests/features/format.feature @@ -0,0 +1,579 @@ +Feature: Custom formats + + Scenario Outline: JSON format + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --format json" + Then we should get no error + And the output should be parsable as json + And "entries" in the json output should have 3 elements + And "tags" in the json output should contain "@ipsum" + And "tags" in the json output should contain "@tagone" + And "tags" in the json output should contain "@tagthree" + And "tags" in the json output should contain "@tagtwo" + And entry 1 should have an array "tags" with 3 elements + And entry 2 should have an array "tags" with 1 elements + And entry 3 should have an array "tags" with 2 elements + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario: Exporting dayone to json + Given we use the config "dayone.yaml" + When we run "jrnl --export json" + Then we should get no error + And the output should be parsable as json + And the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" + + Scenario Outline: Printing a journal that has multiline entries with tags + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -n 1 @ipsum" + Then we should get no error + And the output should be + """ + 2020-08-29 11:11 Entry the first. + | Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada + | quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus + | pellentesque + | augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu + | consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In + | commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget + | venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + | + | Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo + | ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse + | potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget + | molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus + | hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis + | feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum + | urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget + | velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac + | porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per + | conubia nostra, per inceptos himenaeos. + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Exporting using filters should only export parts of the journal + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -until 'August 2020' --format json" + Then the output should be parsable as json + Then we should get no error + And the output should be parsable as json + And "entries" in the json output should have 2 elements + And "tags" in the json output should contain "@ipsum" + And "tags" in the json output should contain "@tagone" + And "tags" in the json output should contain "@tagtwo" + And entry 1 should have an array "tags" with 3 elements + And entry 2 should have an array "tags" with 1 elements + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Exporting using custom templates + Given we use the config ".yaml" + And we load template "sample.template" + And we use the password "test" if prompted + When we run "jrnl -1 --format sample" + Then the output should be + """ + The third entry finally after weeks without writing. + ---------------------------------------------------- + + I'm so excited about emojis. 💯 🎶 💩 + + Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. + Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla + eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis + dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. + Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis + vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. + Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at + ante eget fringilla. @tagthree and also @tagone + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Increasing Headings on Markdown export + Given we use the config ".yaml" + And we use the password "test" if prompted + When we open the editor and append + """ + [2020-10-14 13:23] Heading Test + + H1-1 + = + + H1-2 + === + + H1-3 + ============================ + + H2-1 + - + + H2-2 + --- + + H2-3 + ---------------------------------- + + Horizontal Rules (ignore) + + --- + + === + + # ATX H1 + + ## ATX H2 + + ### ATX H3 + + #### ATX H4 + + ##### ATX H5 + + ###### ATX H6 + + Stuff + + More stuff + more stuff again + """ + Then we flush the output + When we run "jrnl -1 --export markdown" + Then the output should be + """ + # 2020 + + ## October + + ### 2020-10-14 13:23 Heading Test + + #### H1-1 + + #### H1-2 + + #### H1-3 + + ##### H2-1 + + ##### H2-2 + + ##### H2-3 + + Horizontal Rules (ignore) + + --- + + === + + #### ATX H1 + + ##### ATX H2 + + ###### ATX H3 + + ####### ATX H4 + + ######## ATX H5 + + ######### ATX H6 + + Stuff + + More stuff + more stuff again + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + # | basic_dayone | @todo + + Scenario Outline: Add a blank line to Markdown export if there isn't one already + # https://github.com/jrnl-org/jrnl/issues/768 + # https://github.com/jrnl-org/jrnl/issues/881 + Given we use the config ".yaml" + And we use the password "test" if prompted + When we open the editor and append + """ + [2020-10-29 11:11] First entry. + [2020-10-29 11:11] Second entry. + [2020-10-29 11:13] Third entry. + """ + Then we flush the output + When we run "jrnl -3 --format markdown" + Then the output should be + """ + # 2020 + + ## October + + ### 2020-10-29 11:11 First entry. + + + ### 2020-10-29 11:11 Second entry. + + + ### 2020-10-29 11:13 Third entry. + + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + # | basic_dayone | @todo + + @skip + Scenario Outline: Exporting to XML + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --export xml" + Then the output should be a valid XML string + And "entries" node in the xml output should have 3 elements + And "tags" in the xml output should contain ["@ipsum", "@tagone", "@tagtwo", "@tagthree"] + And there should be 10 "tag" elements + + Examples: configs + | config | + # | basic_onefile | @todo + # | basic_encrypted | @todo + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario: Exporting to XML + Given we use the config "tags.yaml" + And we use the password "test" if prompted + When we run "jrnl --export xml" + Then the output should be a valid XML string + And "entries" node in the xml output should have 2 elements + And "tags" in the xml output should contain ["@idea", "@journal", "@dan"] + And there should be 7 "tag" elements + + Scenario Outline: Exporting tags + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --export tags" + Then the output should be + """ + @tagtwo : 2 + @tagone : 2 + @tagthree : 1 + @ipsum : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + @todo + Scenario Outline: Exporting fancy + # Needs better emoji support + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --export fancy" + Then the output should be + """ + ┎──────────────────────────────────────────────────────────────╮2020-08-29 11:11 + ┃ Entry the first. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada │ + ┃ quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus │ + ┃ pellentesque │ + ┃ augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu │ + ┃ consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In │ + ┃ commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget │ + ┃ venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. │ + ┃ │ + ┃ Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo │ + ┃ ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. │ + ┃ Suspendisse │ + ┃ potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas │ + ┃ eget │ + ┃ molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed │ + ┃ lectus │ + ┃ hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis │ + ┃ feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, │ + ┃ vestibulum │ + ┃ urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod │ + ┃ enim. │ + ┃ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget │ + ┃ velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac │ + ┃ porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per │ + ┃ conubia nostra, per inceptos himenaeos. │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + ┎──────────────────────────────────────────────────────────────╮2020-08-31 14:32 + ┃ A second entry in what I hope to be a long series. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis │ + ┃ leo │ + ┃ vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit │ + ┃ amet, │ + ┃ consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl │ + ┃ lorem, │ + ┃ vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum │ + ┃ lectus, │ + ┃ eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium │ + ┃ id │ + ┃ lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, │ + ┃ egestas at efficitur et, ultrices vel est. Sed commodo et nibh non │ + ┃ elementum. │ + ┃ Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. │ + ┃ │ + ┃ Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel │ + ┃ vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum │ + ┃ et │ + ┃ malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis │ + ┃ sem, │ + ┃ non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel │ + ┃ ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a │ + ┃ commodo │ + ┃ eros. │ + ┃ │ + ┃ Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non │ + ┃ tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. │ + ┃ Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum │ + ┃ quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum │ + ┃ interdum. Integer id justo dui. Integer eu tellus in turpis bibendum │ + ┃ blandit. │ + ┃ Quisque auctor lacinia consectetur. │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + ┎──────────────────────────────────────────────────────────────╮2020-09-24 09:14 + ┃ The third entry finally after weeks without writing. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ I'm so excited about emojis. 💯 🎶 💩 │ + ┃ │ + ┃ Donec semper pellentesque iaculis. Nullam cursus et justo sit amet │ + ┃ venenatis. │ + ┃ Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. │ + ┃ Nulla │ + ┃ eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis │ + ┃ dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh │ + ┃ malesuada. │ + ┃ Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis │ + ┃ vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan │ + ┃ justo. │ + ┃ Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at │ + ┃ ante eget fringilla. @tagthree and also @tagone │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + @skip_win + Scenario Outline: Export to yaml + Given we use the config ".yaml" + And we use the password "test" if prompted + And we create a cache directory + When we run "jrnl --export yaml -o {cache_dir}" + Then the cache should contain the files + """ + 2020-08-29_entry-the-first.md + 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md + 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md + """ + And the content of file "2020-08-29_entry-the-first.md" in the cache should be + """ + --- + title: Entry the first. + date: 2020-08-29 11:11 + starred: False + tags: tagone, ipsum, tagtwo + body: | + Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada + quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque + augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu + consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In + commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget + venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + + Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo + ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse + potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget + molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus + hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis + feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum + urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget + velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac + porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per + conubia nostra, per inceptos himenaeos. + ... + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + # | basic_dayone | + + @skip_win # @todo YAML exporter does not correctly export emoji on Windows + Scenario Outline: Add a blank line to YAML export if there isn't one already + # https://github.com/jrnl-org/jrnl/issues/768 + # https://github.com/jrnl-org/jrnl/issues/881 + Given we use the config ".yaml" + And we use the password "test" if prompted + And we create a cache directory + When we run "jrnl --export yaml -o {cache_dir}" + Then the cache should contain the files + """ + 2020-08-29_entry-the-first.md + 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md + 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md + """ + And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in the cache should be + """ + --- + title: The third entry finally after weeks without writing. + date: 2020-09-24 09:14 + starred: False + tags: tagone, tagthree + body: | + I'm so excited about emojis. 💯 🎶 💩 + + Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. + Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla + eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis + dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. + Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis + vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. + Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at + ante eget fringilla. @tagthree and also @tagone + ... + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + # | basic_dayone | @todo + + Scenario: Empty DayOne entry bodies should not error + # https://github.com/jrnl-org/jrnl/issues/780 + Given we use the config "bug780.yaml" + When we run "jrnl --short" + Then we should get no error + + Scenario Outline: --short displays the short version of entries (only the title) + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -on 2020-08-31 --short" + Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: -s displays the short version of entries (only the title) + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -on 2020-08-31 -s" + Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario: Markdown Support from config file + Given we use the config "format_md.yaml" + When we run "jrnl -n 1" + Then the output should be + """ + # 2013 + + ## June + + ### 2013-06-10 15:40 Life is good. + + But I'm better. + """ + + Scenario: Text Formatter from config file + Given we use the config "format_text.yaml" + When we run "jrnl -n 1" + Then the output should be + """ + [2013-06-10 15:40] Life is good. + But I'm better. + """ + + Scenario Outline: Exporting entries with Cyrillic characters to directory should not fail + Given we use the config ".yaml" + And we use the password "test" if prompted + And we create a cache directory + When we run "jrnl 2020-11-21: Первая" + When we run "jrnl --format md --file {cache_dir} -on 2020-11-21" + Then the cache should contain the files + """ + 2020-11-21_первая.md + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Export date counts + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 2020-08-31 01:01: Hi." + And we run "jrnl --format dates" + Then the output should be + """ + 2020-08-29, 1 + 2020-08-31, 2 + 2020-09-24, 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | diff --git a/tests/features/import.feature b/tests/features/import.feature new file mode 100644 index 00000000..63b042fc --- /dev/null +++ b/tests/features/import.feature @@ -0,0 +1,93 @@ +Feature: Importing data + + Scenario Outline: --import allows new entry from stdin + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --import" and pipe "[2020-07-05 15:00] Observe and import." + Then we flush the output + When we run "jrnl -c import" + Then the output should contain "Observe and import" + + Examples: Configs + | config | + | basic_onefile | + | basic_encrypted | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: --import allows new large entry from stdin + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --import" and pipe + """ + [2020-07-05 15:00] Observe and import. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada quis + est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque augue + et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu consequat. + Aenean ante ex, elementum ut interdum et, mattis eget lacus. In commodo nulla nec + tellus placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at + dolor dui end of entry. + """ + Then we flush the output + When we run "jrnl -on 2020-07-05" + Then the output should contain "2020-07-05 15:00 Observe and import." + And the output should contain "Lorem ipsum" + And the output should contain "end of entry." + + Examples: Configs + | config | + | basic_onefile | + | basic_encrypted | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario Outline: --import allows multiple new entries from stdin + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl --import" and pipe + """ + [2020-07-05 15:00] Observe and import. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + + [2020-07-05 15:01] Twice as nice. + Sed dignissim sed nisl eu consequat. + """ + Then we flush the output + When we run "jrnl -on 2020-07-05" + Then the output should contain "2020-07-05 15:00 Observe and import." + And the output should contain "Lorem ipsum" + And the output should contain "2020-07-05 15:01 Twice as nice." + And the output should contain "Sed dignissim" + + Examples: Configs + | config | + | basic_onefile | + | basic_encrypted | + # | basic_folder | @todo + # | basic_dayone | @todo + + Scenario: --import allows import new entries from file + Given we use the config "simple.yaml" + Then the journal should contain "My first entry." + And the journal should contain "Life is good." + But the journal should not contain "I have an @idea" + And the journal should not contain "I met with" + When we run "jrnl --import --file features/journals/tags.journal" + Then the journal should contain "My first entry." + And the journal should contain "Life is good." + And the journal should contain "PROFIT!" + + Scenario: --import prioritizes --file over pipe data if both are given + Given we use the config "simple.yaml" + Then the journal should contain "My first entry." + And the journal should contain "Life is good." + But the journal should not contain "I have an @idea" + And the journal should not contain "I met with" + When we run "jrnl --import --file features/journals/tags.journal" and pipe + """ + [2020-07-05 15:00] I should not exist! + """ + Then the journal should contain "My first entry." + And the journal should contain "PROFIT!" + But the journal should not contain "I should not exist!" + diff --git a/tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry b/tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry new file mode 100644 index 00000000..9721dd55 --- /dev/null +++ b/tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry @@ -0,0 +1,53 @@ + + + + + Creation Date + 2020-08-29T18:11:00Z + Starred + + Entry Text + Entry the first. +Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu +consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In +commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget +venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + +Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo +ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse +potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget +molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus +hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis +feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum +urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget +velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac +porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. + Time Zone + America/Los_Angeles + UUID + D04D335AFED711EABA18FAFFC2100C3D + Tags + + ipsum + tagone + tagtwo + + Creator + + Device Agent + + Generation Date + 2020-09-25T02:35:45Z + Host Name + iris.lan + OS Agent + Darwin/19.3.0 + Software Agent + jrnl/v2.4.5 + + + diff --git a/tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry b/tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry new file mode 100644 index 00000000..8c2f3c52 --- /dev/null +++ b/tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry @@ -0,0 +1,55 @@ + + + + + Creation Date + 2020-08-31T21:32:00Z + Starred + + Entry Text + A second entry in what I hope to be a long series. +Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo +vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, +vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, +eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id +lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, +egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. +Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. + +Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel +vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et +malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, +non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel +ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo +eros. + +Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non +tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. +Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum +quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum +interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. +Quisque auctor lacinia consectetur. + Time Zone + America/Los_Angeles + UUID + FC8A86CAFED711EA8892FAFFC2100C3D + Tags + + tagtwo + + Creator + + Device Agent + + Generation Date + 2020-09-25T02:36:59Z + Host Name + iris.lan + OS Agent + Darwin/19.3.0 + Software Agent + jrnl/v2.4.5 + + + diff --git a/tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry b/tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry new file mode 100644 index 00000000..d998c36b --- /dev/null +++ b/tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry @@ -0,0 +1,44 @@ + + + + + Creation Date + 2020-09-24T16:14:00Z + Starred + + Entry Text + The third entry finally after weeks without writing. +I'm so excited about emojis. 💯 🎶 💩 + +Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. +Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla +eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis +dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. +Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis +vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. +Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at +ante eget fringilla. @tagthree and also @tagone + Time Zone + America/Los_Angeles + UUID + FD8ABC8EFED711EABC35FAFFC2100C3D + Tags + + tagthree + tagone + + Creator + + Device Agent + + Generation Date + 2020-09-25T02:37:01Z + Host Name + iris.lan + OS Agent + Darwin/19.3.0 + Software Agent + jrnl/v2.4.5 + + + diff --git a/tests/features/journals/basic_encrypted.journal b/tests/features/journals/basic_encrypted.journal new file mode 100644 index 00000000..ffc122df --- /dev/null +++ b/tests/features/journals/basic_encrypted.journal @@ -0,0 +1 @@ +gAAAAABfb4gQBMqqGn_W8v_s7qCi14bX7inuCOKbsBqIUf7_ch14vTUp7lrysPFvhBp5vGijTwDIbk4LKoIISj8NwM31I8L0zEbMx9y6iyF_zseGGNxBvNN0wzAXa67bs-ohiQhhebcdIc_52sltxL2ELh8JAKUaXRwyapgnMgJ7z6deJppLK-B7RE7BiT0eKjWTDMd2x6cZDswvHs9opDp5yjuKWV5m7x6ggCKYgHT3savT9Tg7V0Fq6K3LGWaE59lCrqlAB0u6dnrDX3qcF4SKyckaniXzRShZGebdkUKDcLFun2V2syZwYQN772xjznIsJ16iXicox2uYKg8CnTefsyCwaOZyBvySGEy3CrlBiuIRIcxCtjKbYJ2B-Aq7LZitnBR7Ny_6_Wm8HsBf3N-cFCp4GShiCKrxuXKcOZ7vszG5EKb78JS85bb0mswU5CSdgp6UAHjIZqfJq00qQsViBCbXq3oklCPZXdQkOf5U0KpG2MVUiD-Zcn5Qj3gnUhSEr-5wKU9tWrE63MGPyE6KjZlArZX2W2LeGnW2CEYw9eREGon06AzLJ4mj3BgtjVWLIdGcCwORXvHRjUqazWgbEmXNVTbtp_cKnkW-rFzRBrUoVme9v-1Y3sH0VvHBq7QIj915VzBklzWs1qzIyTPZG5Db9LvdQ7SiV8slf1Jo7l-ayUUdVj6igvKZcgfB4RUHolJoMps5p4lZ5sPqv59KtSa8DCpuoRczIj71OCpuRVARZgy1m5sUD9xSMxOBdy46u1Jnry6iMtzXWI3mEZe5m7UhmW_L4Zcv4bbk8XjkBeHjPdgm2B69jkLmCBFecD5ztoGesCGt_pNo_sWSKqLHV1-coKFB2Nn__a4utU9NJNdeNRkr8_ahU6tn3jmaFjfQ7cKfrXG_NCcYBRX9fja8EQIeBEp_3TCoXQqhuV_bGsNPA2qL63Pt6YiRaUf1g9FNBqJRlKCSOYNixSXQZN_rTePzx0SQ0aIQhADWls62WX-LG5-byJcB6W2P_cH21hDOXkoNEIyLnCz9HQ6Yd6Fbv7298ps3F6jiUDdWES23zv8sDgBuKUN94qSN34j6MDYGFnGI9zsJ-Y-I2frdlLfWPx3pUL7afcKh1nRgXdjctsTSxU2BDrsu03eBz2IoZjoOR0U51IrNMOD1NNT3kctXxHLuOHSEkwAzS3doncQbdRLi5Gc1dQuOUa4sC-p8gVjUKXO-oi_49kp9Km2Ay9wFg0epBbXx2QMzyMsN2dXeSbHF-BDXD6sULaq5syC0fOHqaMLycTCMk2wLfNyXgEt05WvAiDn-LDsRdylMRW2hXp5HWq3Poaul-7VNg6UEMlwVfgJ-7hNreuO6IRtwmx6YdqMscw0ms6mU_MQZU_dTIPg3JU4KL0YyMqPBPSGNCx3gMp41O05Ubir45FoJSnT5Dkj4v3N0S87Ys3HuFLverASsGt9bkcSzd2uMKCJjkspemPPi9VhrY4IOO03DWSWbHmxYzFc1SJ-24WM8Ch404QKpe1qy5LNzFgLvDwQhSIHjluezHXqrD-DVh1lWNNY3WmHI2ubOZfaorvLKqzBPZ6AhpIa60rKjm0OZIQOmJwWXwkdnzut6m8PtoiLzRN897YMgeztf1nmDwp0xE-EhknVZ3WV3TeqgZJ5ykfHQ5BU8x0Db57-UtKSuesKbqPPdBe91OdsPpkGlyl6psHj1_gPm4nLvzXQePwiPaEemR_gYCWGPvl9l1ANJufgCV9qQTmZGof3fb9mjv-9lS-9l_m8KirPPRpSBToNeDtk50ceYUsOlDGzIyusppG9pOcIGyiln1IO5aZ8d4_1E83qjcHTSaKGizICZU7a-pt5STBPMesy3JgBm23A2jO4m68ayBRMcLnw_RirHvvBaj0C6UR2tac45F0Ob3PpXcvFuK0g54ziIAhzGqwF9I-LZ6asXQWMW4y4EBOak8JJBorkfztzfkMaIgGu-4ZoRKOkVfdr4uzcghk3r6KUxD4-nv1ioX69-G5RwhMHppYk7z8RXS1cq5FkvzXbfEQ-Uv6M-sx32DcUy9dH-ZYhc7UWm75JJfiNXLaXT_bsc6VqQ7KPkg2-RA7CywUFCW9S0S-XdO03VdwqlUVo7fp1SKywEfhZv_9bhDCdMJBwZmigv2KP9Iz7fF6LrpLwZkzHuQGFPcyTHFpsVIFrFyJjNYCXpET9y0Q5Vt4fnea5fy-9ZiCt3S8aS0YOFJ35_kM5i3ss8eFPL0v7fIQS3ZilzdGB3bWL0J7kppHN_ekHu-wVk3UZxauoFh7hXLjPcipua-FYUIklLjcK6DG1bYP7_q6OnkC8Jl650FNezeWPomHEv7l_DO3y0tjI6SGdWvL3ZJns7Xp3ew8KsCREAUO7ffqumD03uF9N-9uWbDDjM7rk0vcg0ggfOs9Ni725mxqYpu4R285XCOVWHDvw7iU6eAvE6ry8TDXQBbNgGjTuTYFYYli7GuOqMxFIe1op2s7sRnoJE8O0J76S6APhjhjcnZRSuONWkVG_5o83uFMPSF8DtqLwuRA5E8AGfIwAUcj324sw-DA0ixBGUqomb-osUIisv3x0b044xn-FvD-8R3PZDnPbPsao8XYNxfQWStrNcZSrX2Ua-WAcv9qbQ73_57RKW4pao4ajOu7K5800D231WGiIa6aJzDnFUlzXEzYxFQyx7qegkm_9rrEp_v8TC9mfAcjWX5DMrCkxUskx9YKDfpFYq4NuxO_414gReKzd-lmorfigvttgS10N1XD74SwFluXJv-bqTbI5-SuYAhDGMv1dqrn38i3rOMQqqnQomvaUJRprqxUsKz14sSE1Y-cNqq1FXzZ6vIJq-K3YTfFWPRLeqi6gHzqS_R2YBXXUduKuYgmakiVdP3bWc-Ca8WKh5sVi6P51MO-cS7i9AZWOaOz7F8PsB4JZxAJjSOr3NBmv3EEve9auTFCudRjfC6668I_NMHaTP5CCV4cuhuAxUuKUGgd6WFjDcvoYPyn_lu3bQiqD9MEag4CaJYI9PlraRv5mbqptwxv3pca7usd0GmXN_2No_nwxB4gVb48LsBBkH35njCa5iv2EKXUSOf0k3swaTSEahqbyI4EDzPXtU5uBO39iQzNpgfV_sUpnGdysjqueUVcdWGI_s5CnrNJ-_yDAY06AoXfLrjP8_3NXB2058xZ2rfmTNJNCULz9634dICJReXNnmplxIg3i6GbzFvjfNtqjrWr_iqBShyIwuOUJRbXzdJNggx2BDNG-PEWDXl89SaudFICkDvyZKEcATIss6ZXfULIMfCrqmWmFwgXfNEd9TuvjqoxFlLSaY4UfDMiYa_arUMblFfoo5nV07GANhUoQd-6HRe7LjYeX5VRodOx6ZmZjIAUq-DYr-hatJJFR2tjT_qZht2MJeYT3GZ3o54m8zBBt0JTN7HVpKaOaM3A2hEM_Ah0QZ-DkLDxtCzMuv987GDiLT2-Riya97a47yHIJhZFzFpflW2FcuC8RFWXlfUKTQfZkFmxh3MUekUuS4yu4Z121xojVswk_4P7-FqLaSnGT2epI69I_cvalRx3wjds9-5TFYqf4GridlFBRx6Fv2fpNB9Zvp9k7NQ9oYcPuXGLoXH5kmWBagPhEGKHA_pjFUZmCuwUIoeP4nP8lhFrX8OGezsbSBG773CRJzEdfcgAc5G-p6M_24WZLZHDrsVBAvgrNt6R9eQbEviWU28t_417QCp-or9qqt4OTKv1dp_4MlZh8YBg2-dtpvzSc1l5e4kQFJu7oWlpbgsjB6pl1oRRKp1maedX-gOAf559zC4l85gfEpPln9Cnl6xvERQzfO0Ey4q91SdsgK7i7FBrKKmi2wGiemFvnaQsrjZ_IFujLo8-2c8g9zTiyH1knyoVOAAnQxqGpsz6z6PNfSxr3_G8tOlNFTV-yqN_LdVHMgXtXjn3U9koGsfMulyUcBDdR3d_0Yn6iEjBt77tbxKi2ry-0gQrB1fdGsgKjyE_tMrW8D_lQz0IXsVOzd2ixsFVXMFzD6OOD8JldV0FbA-VDAS-Tp_ezIZVp6lRq54XBgvsjzDyOmOgDbSOQN6SQmvxPnIsml1wgmtm80z-9gHBqmimHBtLKB6L7CtLmmPICMS2pX3eWOmakxscxqs8AVjijJdz_NYNfcdBeDj_fhm6dqD6iwk3EBZZfsrmMGdXtAMqf1r9ng9tsz-FriXwQiJ3IM3loBsk5DKr9CcaJtKSPuwDDlRynD2vwcD-XyF6YTQdSJa9fEcq-qXya2Scj4mqQ4RDemJgErdradRfwJfII3fWHh18XxmYVqi9Bwn3YRgwEadyo0-HjbNq6vJXi12igmP99ciRAfMVQLjfUfTwoOHj44Y2Ru_hPjJcvB6FIn6KLrrCSrZnrshFdFn4L36z1CrS8fbtdvrG3kdZQxsUJnMqttuwKRpLnDWTWkIwj_GRBFrzCFgbwGp1XYhemxggyKVuhZPfyyTIM9rhlPth6eGyrpYfap24Av_mGPRBLnzcjtpGbACGdKQL034kVmI7yENGvmY40KSrWsVG_BE9bSJhx0EptFsT2IxnxbuFD4hGb4fFag9V0BDiKpUoOZqIVqVO8cAp-5w4twvWZKkrhu16JNlLoXWMoFANrw-tp5LKSin1CUeRa4LWVI1GR8tRkIad_GnCHRv9JEMswlNy9wi2sDNsSxWT7WNasUW5-glgK9pR7d2pXGGOWfHj1U6CKIqmAiO3iw8igzhvyx_dAxMxPo \ No newline at end of file diff --git a/tests/features/journals/basic_folder/2020/08/29.txt b/tests/features/journals/basic_folder/2020/08/29.txt new file mode 100644 index 00000000..c8af54ca --- /dev/null +++ b/tests/features/journals/basic_folder/2020/08/29.txt @@ -0,0 +1,19 @@ +[2020-08-29 11:11:00 AM] Entry the first. +Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu +consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In +commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget +venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + +Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo +ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse +potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget +molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus +hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis +feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum +urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget +velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac +porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. diff --git a/tests/features/journals/basic_folder/2020/08/31.txt b/tests/features/journals/basic_folder/2020/08/31.txt new file mode 100644 index 00000000..826e7cdb --- /dev/null +++ b/tests/features/journals/basic_folder/2020/08/31.txt @@ -0,0 +1,23 @@ +[2020-08-31 02:32:00 PM] A second entry in what I hope to be a long series. * +Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo +vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, +vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, +eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id +lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, +egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. +Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. + +Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel +vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et +malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, +non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel +ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo +eros. + +Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non +tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. +Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum +quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum +interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. +Quisque auctor lacinia consectetur. diff --git a/tests/features/journals/basic_folder/2020/09/24.txt b/tests/features/journals/basic_folder/2020/09/24.txt new file mode 100644 index 00000000..2bd885ce --- /dev/null +++ b/tests/features/journals/basic_folder/2020/09/24.txt @@ -0,0 +1,11 @@ +[2020-09-24 09:14:00 AM] The third entry finally after weeks without writing. +I'm so excited about emojis. 💯 🎶 💩 + +Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. +Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla +eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis +dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. +Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis +vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. +Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at +ante eget fringilla. @tagthree and also @tagone diff --git a/tests/features/journals/basic_onefile.journal b/tests/features/journals/basic_onefile.journal new file mode 100644 index 00000000..0d988049 --- /dev/null +++ b/tests/features/journals/basic_onefile.journal @@ -0,0 +1,58 @@ +[2020-08-29 11:11] Entry the first. + +Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu +consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In +commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget +venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + +Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo +ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse +potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget +molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus +hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis +feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum +urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget +velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac +porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. + +[2020-08-31 14:32] A second entry in what I hope to be a long series. * + +Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo +vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, +vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, +eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id +lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, +egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. +Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. + +Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel +vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et +malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, +non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel +ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo +eros. + +Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non +tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. +Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum +quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum +interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. +Quisque auctor lacinia consectetur. + +[2020-09-24 09:14] The third entry finally after weeks without writing. + +I'm so excited about emojis. 💯 🎶 💩 + +Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. +Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla +eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis +dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. +Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis +vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. +Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at +ante eget fringilla. @tagthree and also @tagone diff --git a/tests/features/journals/brackets.journal b/tests/features/journals/brackets.journal new file mode 100644 index 00000000..4649ea3e --- /dev/null +++ b/tests/features/journals/brackets.journal @@ -0,0 +1,2 @@ +[2019-07-08 05:42] Entry subject +[1] line starting with 1 diff --git a/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry b/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry new file mode 100644 index 00000000..066821bb --- /dev/null +++ b/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry @@ -0,0 +1,56 @@ + + + + + Creation Date + 2013-10-27T02:27:27Z + Creator + + Device Agent + iPhone/iPhone3,1 + Generation Date + 2013-10-27T07:02:27Z + Host Name + omrt104001 + OS Agent + iOS/7.0.3 + Software Agent + Day One (iOS)/1.11.4 + + Entry Text + Some text. + Location + + Administrative Area + Östergötlands län + Country + Sverige + Latitude + 58.383400000000000 + Locality + City + Longitude + 15.577170000000000 + Place Name + Street + + Starred + + Time Zone + Europe/Stockholm + UUID + B40EE704E15846DE8D45C44118A4D511 + Weather + + Celsius + 12 + Description + Clear + Fahrenheit + 54 + IconName + sunnyn.png + + + diff --git a/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry b/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry new file mode 100644 index 00000000..ea3efec5 --- /dev/null +++ b/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry @@ -0,0 +1,52 @@ + + Creation Date + 2013-10-27T02:27:27Z + Creator + + Device Agent + iPhone/iPhone3,1 + Generation Date + 2013-10-27T07:02:27Z + Host Name + omrt104001 + OS Agent + iOS/7.0.3 + Software Agent + Day One (iOS)/1.11.4 + + Entry Text + This is not a valid plist. + Location + + Administrative Area + Östergötlands län + Country + Sverige + Latitude + 58.383400000000000 + Locality + City + Longitude + 15.577170000000000 + Place Name + Street + + Starred + + Time Zone + Europe/Stockholm + UUID + B40EE704E15846DE8D45C44118A4D511 + Weather + + Celsius + 12 + Description + Clear + Fahrenheit + 54 + IconName + sunnyn.png + + + diff --git a/tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry b/tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry new file mode 100644 index 00000000..426f1ea8 --- /dev/null +++ b/tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry @@ -0,0 +1,33 @@ + + + + + Activity + Stationary + Creation Date + 2019-12-30T21:28:54Z + Entry Text + + Starred + + UUID + 48A25033B34047C591160A4480197D8B + Creator + + Device Agent + PC + Generation Date + 2019-12-30T21:28:54Z + Host Name + LE-TREPORT + OS Agent + Microsoft Windows/10 Home + Software Agent + Journaley/2.1 + + Tags + + i_have_no_body + + + diff --git a/tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry b/tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry new file mode 100644 index 00000000..1ac26242 --- /dev/null +++ b/tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry @@ -0,0 +1,34 @@ + + + + + Creation Date + 2013-05-17T18:39:20Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:39:20Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This entry has tags! + Starred + + Tags + + work + PLaY + + Time Zone + America/Los_Angeles + UUID + 044F3747A38546168B572C2E3F217FA2 + + diff --git a/tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry b/tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry new file mode 100644 index 00000000..927de884 --- /dev/null +++ b/tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry @@ -0,0 +1,46 @@ + + + + + Creation Date + 2013-06-17T18:38:29Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:38:29Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This entry has a location. + Location + + Administrative Area + California + Country + Germany + Latitude + 52.4979764 + Locality + Berlin + Longitude + 13.2404758 + Place Name + Abandoned Spy Tower + + Starred + + Tags + + Time Zone + Europe/Berlin + UUID + 0BDDD6CDA43C4A9AA2681517CC35AD9D + + diff --git a/tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry b/tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry new file mode 100644 index 00000000..16260763 --- /dev/null +++ b/tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry @@ -0,0 +1,31 @@ + + + + + Creation Date + 2013-07-17T18:38:08Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:38:08Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This entry is starred! + Starred + + Tags + + Time Zone + America/Los_Angeles + UUID + 422BC895507944A291E6FC44FC6B8BFC + + diff --git a/tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry b/tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry new file mode 100644 index 00000000..9ebaf538 --- /dev/null +++ b/tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry @@ -0,0 +1,29 @@ + + + + + Creation Date + 2013-01-17T18:37:50Z + Creator + + Device Agent + Macintosh/MacBookAir5,2 + Generation Date + 2013-08-17T18:37:50Z + Host Name + Egeria + OS Agent + Mac OS X/10.8.4 + Software Agent + Day One (Mac)/1.8 + + Entry Text + This is a DayOne entry without Timezone. + Starred + + Tags + + UUID + 4BB1F46946AD439996C9B59DE7C4DDC1 + + diff --git a/tests/features/journals/dayone_empty.dayone/entries/empty.txt b/tests/features/journals/dayone_empty.dayone/entries/empty.txt new file mode 100644 index 00000000..c86b8f66 --- /dev/null +++ b/tests/features/journals/dayone_empty.dayone/entries/empty.txt @@ -0,0 +1 @@ +This file exists to preserve the directory structure, but should be ignored by jrnl. diff --git a/tests/features/journals/deletion.journal b/tests/features/journals/deletion.journal new file mode 100644 index 00000000..c0fa689d --- /dev/null +++ b/tests/features/journals/deletion.journal @@ -0,0 +1,5 @@ +[2019-10-29 11:11] First entry. + +[2019-10-29 11:11] Second entry. + +[2019-10-29 11:13] Third entry. \ No newline at end of file diff --git a/tests/features/journals/deletion_filters.journal b/tests/features/journals/deletion_filters.journal new file mode 100644 index 00000000..9a3747db --- /dev/null +++ b/tests/features/journals/deletion_filters.journal @@ -0,0 +1,14 @@ +[2019-10-01 08:00] It's just another day in October. +Not much to write about. + +[2020-01-01 08:00] Happy New Year! +So this is the New Year. @holidays + +[2020-03-01 08:00] It's just another day in March. +A stick, a stone, it's the end of the road. + +[2020-05-01 09:00] Happy May Day! +@holidays @springtime Several holidays fall on this date. + +[2020-05-02 12:10] Writing tests. * +@springtime They will help prevent bugs. diff --git a/tests/features/journals/empty_folder/empty b/tests/features/journals/empty_folder/empty new file mode 100644 index 00000000..175b82b5 --- /dev/null +++ b/tests/features/journals/empty_folder/empty @@ -0,0 +1 @@ +Nothing to see here diff --git a/tests/features/journals/encrypted.journal b/tests/features/journals/encrypted.journal new file mode 100644 index 00000000..d2a5fcbe --- /dev/null +++ b/tests/features/journals/encrypted.journal @@ -0,0 +1 @@ +gAAAAABVIHB7tnwKExG7aC5ZbAbBL9SG2oY2GENeoOJ22i1PZigOvCYvrQN3kpsu0KGr7ay5K-_46R5YFlqJvtQ8anPH2FSITsaZy-l5Lz_5quw3rmzhLwAR1tc0icgtR4MEpXEdsuQ7cyb12Xq-JLDrnATs0id5Vow9Ri_tE7Xe4BXgXaySn3aRPwWKoninVxVPVvETY3MXHSUEXV9OZ-pH5kYBLGYbLA== diff --git a/tests/features/journals/encrypted_jrnl-1-9-5.journal b/tests/features/journals/encrypted_jrnl-1-9-5.journal new file mode 100644 index 0000000000000000000000000000000000000000..339b47baf9671f4550efeb9b6a0cfcd5032255d6 GIT binary patch literal 128 zcmV-`0Du3(bJIGVsY(mXmoW-2hF&*L`0NbJTYlTUr8*^Qm97}8E^3^1bZ$P^M literal 0 HcmV?d00001 diff --git a/tests/features/journals/little_endian_dates.journal b/tests/features/journals/little_endian_dates.journal new file mode 100644 index 00000000..d7492969 --- /dev/null +++ b/tests/features/journals/little_endian_dates.journal @@ -0,0 +1,5 @@ +[09.06.2013 15:39] My first entry. +Everything is alright + +[10.07.2013 15:40] Life is good. +But I'm better. diff --git a/tests/features/journals/markdown-headings-335.journal b/tests/features/journals/markdown-headings-335.journal new file mode 100644 index 00000000..30f592ef --- /dev/null +++ b/tests/features/journals/markdown-headings-335.journal @@ -0,0 +1,42 @@ +[2015-04-14 13:23] Heading Test + +H1-1 += + +H1-2 +=== + +H1-3 +============================ + +H2-1 +- + +H2-2 +--- + +H2-3 +---------------------------------- + +Horizontal Rules (ignore) + +--- + +=== + +# ATX H1 + +## ATX H2 + +### ATX H3 + +#### ATX H4 + +##### ATX H5 + +###### ATX H6 + +Stuff + +More stuff +more stuff again diff --git a/tests/features/journals/mostlyreadabledates.journal b/tests/features/journals/mostlyreadabledates.journal new file mode 100644 index 00000000..bd211bf5 --- /dev/null +++ b/tests/features/journals/mostlyreadabledates.journal @@ -0,0 +1,8 @@ +[2019-07-18 14:23] Entry subject +Time machines are possible. I know, because I've built one in my garage. + +[2019-07-19 14:23] Entry subject +I'm going to activate the machine. Nobody knows what comes next after this. Or before this? + +[2019-07 14:23] Entry subject +I've crossed so many timelines. Is there any going back? diff --git a/tests/features/journals/multiline-tags.journal b/tests/features/journals/multiline-tags.journal new file mode 100644 index 00000000..1fb8706f --- /dev/null +++ b/tests/features/journals/multiline-tags.journal @@ -0,0 +1,7 @@ +[2013-06-09 15:39] Multiple @line entry with @tags. +Tag with @punctuation. afterwards +@TagOnLineAloneWithOutPunctuation +@TagOnLineAloneWithPunctuation. +Text before @tag. And After. +@hi. Hello +hi Hello \ No newline at end of file diff --git a/tests/features/journals/multiline.journal b/tests/features/journals/multiline.journal new file mode 100644 index 00000000..294ed141 --- /dev/null +++ b/tests/features/journals/multiline.journal @@ -0,0 +1,5 @@ +[2013-06-09 15:39] Multiple line entry. +This is the first line. +This line doesn't have any ending punctuation + +There is a blank line above this. diff --git a/tests/features/journals/simple.journal b/tests/features/journals/simple.journal new file mode 100644 index 00000000..8336068e --- /dev/null +++ b/tests/features/journals/simple.journal @@ -0,0 +1,5 @@ +[2013-06-09 15:39] My first entry. +Everything is alright + +[2013-06-10 15:40] Life is good. +But I'm better. diff --git a/tests/features/journals/simple_jrnl-1-9-5.journal b/tests/features/journals/simple_jrnl-1-9-5.journal new file mode 100644 index 00000000..7bb6c5ac --- /dev/null +++ b/tests/features/journals/simple_jrnl-1-9-5.journal @@ -0,0 +1,13 @@ +2010-06-10 15:00 A life without chocolate is like a bad analogy. + +2013-06-10 15:40 He said "[this] is the best time to be alive". +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. + +[2019-08-03 12:55] Some chat log or something + +Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, +elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus +placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor +dui. diff --git a/tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal b/tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal new file mode 100644 index 00000000..328b23f4 --- /dev/null +++ b/tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal @@ -0,0 +1,13 @@ +10.06.2010 15:00 A life without chocolate is like a bad analogy. + +10.06.2013 15:40 He said "[this] is the best time to be alive". +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada +quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque +augue et venenatis facilisis. + +[03.08.2019 12:55] Some chat log or something + +Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, +elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus +placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor +dui. diff --git a/tests/features/journals/tags-216.journal b/tests/features/journals/tags-216.journal new file mode 100644 index 00000000..08b6d630 --- /dev/null +++ b/tests/features/journals/tags-216.journal @@ -0,0 +1,2 @@ +[2013-06-10 15:40] I programmed for @OS/2. +Almost makes me want to go back to @C++, though. (Still better than @C#). diff --git a/tests/features/journals/tags-237.journal b/tests/features/journals/tags-237.journal new file mode 100644 index 00000000..be050652 --- /dev/null +++ b/tests/features/journals/tags-237.journal @@ -0,0 +1,3 @@ +[2014-07-22 11:11] This entry has an email. +@Newline tag should show as a tag. +Kyla's @email is kyla@clevelandunderdog.org and Guinness's is guinness@fortheloveofpits.org. diff --git a/tests/features/journals/tags.journal b/tests/features/journals/tags.journal new file mode 100644 index 00000000..a28f3159 --- /dev/null +++ b/tests/features/journals/tags.journal @@ -0,0 +1,8 @@ +[2013-04-09 15:39] I have an @idea: +(1) write a command line @journal software +(2) ??? +(3) PROFIT! + +[2013-06-10 15:40] I met with @dan. +As alway's he shared his latest @idea on how to rule the world with me. +inst diff --git a/tests/features/journals/unreadabledates.journal b/tests/features/journals/unreadabledates.journal new file mode 100644 index 00000000..53ef1d60 --- /dev/null +++ b/tests/features/journals/unreadabledates.journal @@ -0,0 +1,5 @@ +[ashasd7zdskhz7asdkjasd] Entry subject +I've lost track of time. + +[sadfhakjsdf88sdf7sdff] Entry subject +Time has no meaning. diff --git a/tests/features/journals/work.journal b/tests/features/journals/work.journal new file mode 100644 index 00000000..e69de29b diff --git a/tests/features/multiple_journals.feature b/tests/features/multiple_journals.feature new file mode 100644 index 00000000..222be100 --- /dev/null +++ b/tests/features/multiple_journals.feature @@ -0,0 +1,65 @@ +Feature: Multiple journals + + Scenario: Loading a config with two journals + Given we use the config "multiple.yaml" + Then journal "default" should have 2 entries + And journal "work" should have 0 entries + + Scenario: Write to default config by default + Given we use the config "multiple.yaml" + When we run "jrnl this goes to default" + Then journal "default" should have 3 entries + And journal "work" should have 0 entries + + Scenario: Write to specified journal + Given we use the config "multiple.yaml" + When we run "jrnl work a long day in the office" + Then journal "default" should have 2 entries + And journal "work" should have 1 entry + + Scenario: Tell user which journal was used + Given we use the config "multiple.yaml" + When we run "jrnl work a long day in the office" + Then we should see the message "Entry added to work journal" + + Scenario: Write to specified journal with a timestamp + Given we use the config "multiple.yaml" + When we run "jrnl work 23 july 2012: a long day in the office" + Then journal "default" should have 2 entries + And journal "work" should have 1 entry + And journal "work" should contain "2012-07-23" + + Scenario: Write to specified journal without a timestamp but with colon + Given we use the config "multiple.yaml" + When we run "jrnl work : a long day in the office" + Then journal "default" should have 2 entries + And journal "work" should have 1 entry + And journal "work" should contain "a long day in the office" + + Scenario: Write to specified journal without a timestamp but with colon + Given we use the config "multiple.yaml" + When we run "jrnl work: a long day in the office" + Then journal "default" should have 2 entries + And journal "work" should have 1 entry + And journal "work" should contain "a long day in the office" + + Scenario: Create new journals as required + Given we use the config "multiple.yaml" + Then journal "ideas" should not exist + When we run "jrnl ideas 23 july 2012: sell my junk on ebay and make lots of money" + Then journal "ideas" should have 1 entry + + Scenario: Don't crash if no default journal is specified + Given we use the config "bug343.yaml" + When we run "jrnl a long day in the office" + Then we should see the message "No default journal configured" + + Scenario: Don't crash if no file exists for a configured encrypted journal + Given we use the config "multiple.yaml" + When we run "jrnl new_encrypted Adding first entry" and enter + """ + these three eyes + these three eyes + n + """ + Then we should see the message "Encrypted journal 'new_encrypted' created" diff --git a/tests/features/password.feature b/tests/features/password.feature new file mode 100644 index 00000000..332ba86e --- /dev/null +++ b/tests/features/password.feature @@ -0,0 +1,116 @@ +Feature: Using the installed keyring + + Scenario: Storing a password in keyring + Given we use the config "multiple.yaml" + And we have a keyring + When we run "jrnl simple --encrypt" and enter + """ + sabertooth + sabertooth + y + """ + Then the config for journal "simple" should have "encrypt" set to "bool:True" + When we run "jrnl simple -n 1" + Then the output should contain "2013-06-10 15:40 Life is good" + + Scenario: Encrypt journal with no keyring backend and do not store in keyring + Given we use the config "simple.yaml" + And we do not have a keyring + When we run "jrnl test entry" + And we run "jrnl --encrypt" and enter + """ + password + password + n + """ + Then we should get no error + And we should not see the message "Failed to retrieve keyring" + + Scenario: Encrypt journal with no keyring backend and do store in keyring + Given we use the config "simple.yaml" + And we do not have a keyring + When we run "jrnl test entry" + And we run "jrnl --encrypt" and enter + """ + password + password + y + """ + Then we should get no error + And we should not see the message "Failed to retrieve keyring" + # @todo add step to check contents of keyring + + @todo + Scenario: Open an encrypted journal with wrong password in keyring + # This should ask the user for the password after the keyring fails + + @todo + Scenario: Decrypt journal with password in keyring + + @todo + Scenario: Decrypt journal without a keyring + + Scenario: Encrypt journal when keyring exists but fails + Given we use the config "simple.yaml" + And we have a failed keyring + When we run "jrnl --encrypt" and enter + """ + this password will not be saved in keyring + this password will not be saved in keyring + y + """ + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And the config for journal "default" should have "encrypt" set to "bool:True" + + Scenario: Decrypt journal when keyring exists but fails + Given we use the config "encrypted.yaml" + And we have a failed keyring + When we run "jrnl --decrypt" and enter "bad doggie no biscuit" + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And we should see the message "Journal decrypted" + And the config for journal "default" should have "encrypt" set to "bool:False" + And the journal should have 2 entries + + Scenario: Open encrypted journal when keyring exists but fails + # This should ask the user for the password after the keyring fails + Given we use the config "encrypted.yaml" + And we have a failed keyring + When we run "jrnl -n 1" and enter "bad doggie no biscuit" + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And the output should contain "2013-06-10 15:40 Life is good" + + Scenario: Mistyping your password + Given we use the config "simple.yaml" + When we run "jrnl --encrypt" and enter + """ + swordfish + sordfish + """ + Then we should be prompted for a password + And we should see the message "Passwords did not match" + And the config for journal "default" should not have "encrypt" set + And the journal should have 2 entries + + Scenario: Mistyping your password, then getting it right + Given we use the config "simple.yaml" + When we run "jrnl --encrypt" and enter + """ + swordfish + sordfish + swordfish + swordfish + n + """ + Then we should be prompted for a password + And we should see the message "Passwords did not match" + And we should see the message "Journal encrypted" + And the config for journal "default" should have "encrypt" set to "bool:True" + When we run "jrnl -n 1" and enter "swordfish" + Then we should be prompted for a password + And the output should contain "2013-06-10 15:40 Life is good" diff --git a/tests/features/search.feature b/tests/features/search.feature new file mode 100644 index 00000000..22351b7e --- /dev/null +++ b/tests/features/search.feature @@ -0,0 +1,318 @@ +Feature: Searching in a journal + + Scenario Outline: Displaying entries using -on today should display entries created today + Given we use the config ".yaml" + When we run "jrnl today: Adding an entry right now." + Then we should see the message "Entry added" + When we run "jrnl -on today" + Then the output should contain "Adding an entry right now." + But the output should not contain "Everything is alright" + And the output should not contain "Life is good" + + Examples: configs + | config | + | simple | + | empty_folder | + | dayone | + + Scenario Outline: Displaying entries using -from day should display correct entries + Given we use the config ".yaml" + When we run "jrnl yesterday: This thing happened yesterday" + Then we should see the message "Entry added" + When we run "jrnl today at 11:59pm: Adding an entry right now." + Then we should see the message "Entry added" + When we run "jrnl tomorrow: A future entry." + Then we should see the message "Entry added" + When we run "jrnl -from today" + Then the output should contain "Adding an entry right now." + And the output should contain "A future entry." + And the output should not contain "This thing happened yesterday" + + Examples: configs + | config | + | simple | + | empty_folder | + | dayone | + + Scenario Outline: Displaying entries using -from and -to day should display correct entries + Given we use the config ".yaml" + When we run "jrnl yesterday: This thing happened yesterday" + Then we should see the message "Entry added" + When we run "jrnl today at 11:59pm: Adding an entry right now." + Then we should see the message "Entry added" + When we run "jrnl tomorrow: A future entry." + Then we should see the message "Entry added" + When we run "jrnl -from yesterday -to today" + Then the output should contain "This thing happened yesterday" + And the output should contain "Adding an entry right now." + And the output should not contain "A future entry." + + Examples: configs + | config | + | simple | + | empty_folder | + | dayone | + + Scenario Outline: Searching for a string + Given we use the config ".yaml" + When we run "jrnl -contains first --short" + Then we should get no error + And the output should be + """ + 2020-08-29 11:11 Entry the first. + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching for a string within tag results + Given we use the config ".yaml" + When we run "jrnl @tagone -contains maybe" + Then we should get no error + And the output should contain "maybe" + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching for a string within AND tag results + Given we use the config ".yaml" + When we run "jrnl -and @tagone @tagtwo -contains maybe" + Then we should get no error + And the output should contain "maybe" + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching for a string within NOT tag results + Given we use the config ".yaml" + When we run "jrnl -not @tagone -contains lonesome" + Then we should get no error + And the output should contain "lonesome" + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching for dates + Given we use the config ".yaml" + When we run "jrnl -on 2020-08-31 --short" + Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." + Then we flush the output + When we run "jrnl -on 'august 31 2020' --short" + Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario: Out of order entries to a Folder journal should be listed in date order + Given we use the config "empty_folder.yaml" + When we run "jrnl 3/7/2014 4:37pm: Second entry of journal." + Then we should see the message "Entry added" + When we run "jrnl 23 July 2013: Testing folder journal." + Then we should see the message "Entry added" + When we run "jrnl -2" + Then the output should be + """ + 2013-07-23 09:00 Testing folder journal. + + 2014-03-07 16:37 Second entry of journal. + """ + + Scenario Outline: Searching for all tags should show counts of each tag + Given we use the config ".yaml" + When we run "jrnl --tags" + Then we should get no error + And the output should be + """ + @tagtwo : 2 + @tagone : 2 + @tagthree : 1 + @ipsum : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Filtering journals should also filter tags + Given we use the config ".yaml" + When we run "jrnl -from 'september 2020' --tags" + Then we should get no error + And the output should be + """ + @tagthree : 1 + @tagone : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Excluding a tag should filter out all entries with that tag + Given we use the config ".yaml" + When we run "jrnl --tags -not @tagtwo" + Then the output should be + """ + @tagthree : 1 + @tagone : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Excluding multiple tags should filter out all entries with those tags + Given we use the config ".yaml" + When we run "jrnl --tags -not @tagone -not @tagthree" + Then the output should be + """ + @tagtwo : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case. + # https://github.com/jrnl-org/jrnl/issues/354 + Given we use the config "dayone.yaml" + When we run "jrnl @plAy" + Then the output should contain "2013-05-17 11:39 This entry has tags!" + + Scenario: Loading a sample journal + Given we use the config "simple.yaml" + When we run "jrnl -2" + Then we should get no error + And the output should be + """ + 2013-06-09 15:39 My first entry. + | Everything is alright + + 2013-06-10 15:40 Life is good. + | But I'm better. + """ + + Scenario Outline: Searching by month + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -month 9 --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + And we flush the output + When we run "jrnl -month Sept --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + And we flush the output + When we run "jrnl -month September --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching by day + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -day 31 --short" + Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching by year + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 2019-01-01 01:01: I like this year." + And we run "jrnl -year 2019 --short" + Then the output should be "2019-01-01 01:01 I like this year." + And we flush the output + When we run "jrnl -year 19 --short" + Then the output should be "2019-01-01 01:01 I like this year." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Combining month, day, and year search terms + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl -month 08 -day 29 --short" + Then the output should be "2020-08-29 11:11 Entry the first." + And we flush the output + When we run "jrnl -day 29 -year 2020 --short" + Then the output should be "2020-08-29 11:11 Entry the first." + And we flush the output + When we run "jrnl -month 09 -year 2020 --short" + Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." + And we flush the output + When we run "jrnl -month 08 -day 29 -year 2020 --short" + Then the output should be "2020-08-29 11:11 Entry the first." + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Searching today in history + Given we use the config ".yaml" + And we use the password "test" if prompted + And we set current date and time to "2020-08-31 14:32" + When we run "jrnl 2019-08-31 01:01: Hi, from last year." + And we run "jrnl -today-in-history --short" + Then the output should be + """ + 2019-08-31 01:01 Hi, from last year. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + """ + + Examples: configs + | config | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario: Loading a DayOne Journal + Given we use the config "dayone.yaml" + When we run "jrnl -from 'feb 2013'" + Then we should get no error + And the output should be + """ + 2013-05-17 11:39 This entry has tags! + + 2013-06-17 20:38 This entry has a location. + + 2013-07-17 11:38 This entry is starred! + """ diff --git a/tests/features/star.feature b/tests/features/star.feature new file mode 100644 index 00000000..f0188056 --- /dev/null +++ b/tests/features/star.feature @@ -0,0 +1,35 @@ +Feature: Starring entries + + Scenario Outline: Starring an entry will mark it in the journal file + Given we use the config ".yaml" + When we run "jrnl 20 july 2013 *: Best day of my life!" + Then we should see the message "Entry added" + When we run "jrnl -on 2013-07-20 -starred" + Then the output should contain "2013-07-20 09:00 Best day of my life!" + + Examples: configs + | config_file | + | simple | + | empty_folder | + | dayone | + + Scenario Outline: Filtering by starred entries will show only starred entries + Given we use the config ".yaml" + When we run "jrnl -starred" + Then the output should be empty + When we run "jrnl 20 july 2013 *: Best day of my life!" + When we run "jrnl -starred" + Then the output should be "2013-07-20 09:00 Best day of my life!" + + Examples: configs + | config_file | + | simple | + | empty_folder | + | dayone_empty | + + Scenario: Starring an entry will mark it in an encrypted journal + Given we use the config "encrypted.yaml" + When we run "jrnl 20 july 2013 *: Best day of my life!" and enter "bad doggie no biscuit" + Then we should see the message "Entry added" + When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit" + Then the output should contain "2013-07-20 09:00 Best day of my life!" diff --git a/tests/features/tag.feature b/tests/features/tag.feature new file mode 100644 index 00000000..b7b687b5 --- /dev/null +++ b/tests/features/tag.feature @@ -0,0 +1,53 @@ +Feature: Tagging +# See search.feature for tag-related searches +# And format.feature for tag-related output + + Scenario Outline: Tags should allow certain special characters such as /, +, # + Given we use the config ".yaml" + When we run "jrnl 2020-09-26: This is an entry about @os/2 and @c++ and @c#" + When we run "jrnl --tags -on 2020-09-26" + Then we should get no error + And the output should be + """ + @os/2 : 1 + @c++ : 1 + @c# : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Emails addresses should not be parsed as tags + Given we use the config ".yaml" + When we run "jrnl 2020-09-26: The email address test@example.com does not seem to work for me" + When we run "jrnl 2020-09-26: The email address test@example.org also does not work for me" + When we run "jrnl 2020-09-26: I tried test@example.org and test@example.edu too" + Then we flush the output + When we run "jrnl --tags -on 2020-09-26" + Then we should get no error + And the output should be "[No tags found in journal.]" + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | + + Scenario Outline: Entry can start and end with tags + Given we use the config ".yaml" + When we run "jrnl 2020-09-26: @foo came over, we went to a @bar" + When we run "jrnl --tags -on 2020-09-26" + Then the output should be + """ + @foo : 1 + @bar : 1 + """ + + Examples: configs + | config | + | basic_onefile | + | basic_folder | + | basic_dayone | diff --git a/tests/features/templates/extension.md b/tests/features/templates/extension.md new file mode 100644 index 00000000..e69de29b diff --git a/tests/features/upgrade.feature b/tests/features/upgrade.feature new file mode 100644 index 00000000..fda47363 --- /dev/null +++ b/tests/features/upgrade.feature @@ -0,0 +1,71 @@ +Feature: Upgrading Journals from 1.x.x to 2.x.x + + Scenario: Upgrade and parse journals with square brackets + Given we use the config "upgrade_from_195.json" + When we run "jrnl -9" and enter "Y" + Then the journal should have 2 entries + And the output should contain + """ + 2010-06-10 15:00 A life without chocolate is like a bad analogy. + """ + And the output should contain + """ + 2013-06-10 15:40 He said "[this] is the best time to be alive". + """ + + Scenario: Upgrading a journal encrypted with jrnl 1.x + Given we use the config "encrypted_old.json" + When we run "jrnl -n 1" and enter + """ + Y + bad doggie no biscuit + bad doggie no biscuit + """ + Then we should be prompted for a password + And the output should contain "2013-06-10 15:40 Life is good" + + Scenario: Upgrading a config without colors to colors + Given we use the config "no_colors.yaml" + When we run "jrnl -n 1" + Then the config should have "colors" set to + """ + { + 'date':'none', + 'title':'none', + 'body':'none', + 'tags':'none' + } + """ + + Scenario: Upgrade and parse journals with little endian date format + Given we use the config "upgrade_from_195_little_endian_dates.json" + When we run "jrnl -9" and enter "Y" + Then the journal should have 2 entries + And the output should contain + """ + 10.06.2010 15:00 A life without chocolate is like a bad analogy. + """ + And the output should contain + """ + 10.06.2013 15:40 He said "[this] is the best time to be alive". + """ + + Scenario: Upgrade with missing journal + Given we use the config "upgrade_from_195_with_missing_journal.json" + When we run "jrnl -ls" and enter + """" + Y + """ + Then the output should contain "Error: features/journals/missing.journal does not exist." + And we should get no error + + Scenario: Upgrade with missing encrypted journal + Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json" + When we run "jrnl -ls" and enter + """ + Y + bad doggie no biscuit + """ + Then the output should contain "Error: features/journals/missing.journal does not exist." + And the error output should contain "We're all done" + And we should get no error diff --git a/tests/features/write.feature b/tests/features/write.feature new file mode 100644 index 00000000..eb22e480 --- /dev/null +++ b/tests/features/write.feature @@ -0,0 +1,216 @@ +Feature: Writing new entries. + + Scenario Outline: Multiline entry with punctuation should keep title punctuation + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl This is. the title\\n This is the second line" + And we run "jrnl -n 1" + Then the output should contain "This is. the title" + + Examples: configs + | config_file | + | simple | + | empty_folder | + | dayone | + | encrypted | + + Scenario Outline: Single line entry with period should be split at period + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl This is. the title" + And we run "jrnl -1" + Then the output should contain "| the title" + + Examples: configs + | config_file | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: CJK entry should be split at fullwidth period without following space. + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 七転び。八起き" + And we run "jrnl -1" + Then the output should contain "| 八起き" + + Examples: configs + | config_file | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + + Scenario Outline: Writing an entry from command line should store the entry + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should contain "2013-07-23 09:00 A cold and stormy day." + + Examples: configs + | config_file | + | simple | + | empty_folder | + | dayone | + | encrypted | + + Scenario Outline: Writing a partial entry from command line with edit flag should go to the editor + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl this is a partial --edit" + Then we should see the message "Entry added" + Then the editor should have been called + And the editor file content should be + """ + this is a partial + """ + When we run "jrnl -n 1" + Then the output should contain "this is a partial" + + Examples: configs + | config_file | + | basic_onefile | + | basic_encrypted | + | basic_dayone | + | basic_folder | + + Scenario Outline: Writing an empty entry from the editor should yield "Nothing saved to file" message + Given we use the config ".yaml" + And we use the password "test" if prompted + When we open the editor and enter nothing + Then the error output should contain "[Nothing saved to file]" + + Examples: configs + | config_file | + | editor | + | editor_empty_folder | + | dayone | + | basic_encrypted | + | basic_onefile | + + @skip + Scenario Outline: Writing an empty entry from the command line with no editor should yield nothing + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl" and enter nothing + Then the output should be empty + And the error output should contain "Writing Entry; on a blank line" + And the editor should not have been called + + Examples: configs + | config_file | + | simple | + | empty_folder | + | encrypted | + # | dayone | @todo + + Scenario Outline: Writing an entry does not print the entire journal + # https://github.com/jrnl-org/jrnl/issues/87 + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should not contain "Life is good" + + Examples: configs + | config_file | + | editor | + | editor_empty_folder | + | dayone | + | encrypted | + + Scenario Outline: Embedded period stays in title + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic." + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should be + """ + 2014-04-24 09:00 Created a new website - empty.com. + | Hope to get a lot of traffic. + """ + + Examples: configs + | config_file | + | simple | + | empty_folder | + | dayone | + | encrypted | + + Scenario Outline: Write and read emoji support + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should contain "🌞" + And the output should contain "🐘" + + Examples: configs + | config_file | + | simple | + | empty_folder | + | dayone | + | encrypted | + + Scenario Outline: Writing an entry at the prompt (no editor) should store the entry + Given we use the config ".yaml" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl" and enter "25 jul 2013: I saw Elvis. He's alive." + Then we should get no error + When we run "jrnl -on '2013-07-25'" + Then the output should contain "2013-07-25 09:00 I saw Elvis." + And the output should contain "| He's alive." + + Examples: configs + | config_file | + | simple | + | empty_folder | + | encrypted | + + @todo + Scenario: Writing an entry at the prompt (no editor) in DayOne journal + # Need to test DayOne w/out an editor + + Scenario: Writing into Dayone + Given we use the config "dayone.yaml" + When we run "jrnl 01 may 1979: Being born hurts." + And we run "jrnl -until 1980" + Then the output should be "1979-05-01 09:00 Being born hurts." + + Scenario: Writing into Dayone adds extended metadata + Given we use the config "dayone.yaml" + When we run "jrnl 01 may 1979: Being born hurts." + And we run "jrnl --export json" + Then "entries" in the json output should have 5 elements + And the json output should contain entries.0.creator.software_agent + And the json output should contain entries.0.creator.os_agent + And the json output should contain entries.0.creator.host_name + And the json output should contain entries.0.creator.generation_date + And the json output should contain entries.0.creator.device_agent + And "entries.0.creator.software_agent" in the json output should contain "jrnl" + + # fails when system time is UTC (as on Travis-CI) + @skip + Scenario: Title with an embedded period on DayOne journal + Given we use the config "dayone.yaml" + When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch."" + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should be + """ + 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. + | I'm feeling sore because I forgot to stretch. + """ + + Scenario: Opening an folder that's not a DayOne folder should treat as folder journal + Given we use the config "empty_folder.yaml" + When we run "jrnl 23 july 2013: Testing folder journal." + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should be "2013-07-23 09:00 Testing folder journal." diff --git a/tests/step_defs/__init__.py b/tests/step_defs/__init__.py new file mode 100644 index 00000000..46468510 --- /dev/null +++ b/tests/step_defs/__init__.py @@ -0,0 +1,3 @@ +import sys + +sys.path.append("..") diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py new file mode 100644 index 00000000..cf6a2d5e --- /dev/null +++ b/tests/step_defs/conftest.py @@ -0,0 +1,111 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import shutil +import os +import re + +import pytest +from pytest_bdd import given +from pytest_bdd import then +from pytest_bdd import when +from pytest_bdd.parsers import parse +from unittest.mock import patch + +from jrnl import __version__ +from jrnl.os_compat import split_args +from jrnl.cli import cli + +WORKING_DIR = '' +TEMP_DIR = '' + +# ----- FIXTURES ----- # +@pytest.fixture +def cli_run(): + return dict(status=0, stdout=None, stderr=None) + + +def get_working_dirs(request): + CWD = request.config.rootpath + return os.path.join(CWD, 'tests', '.current_test'), CWD + + +# ----- HOOKS ----- # +def pytest_bdd_before_scenario(request, feature, scenario): + """Before each scenario, backup all config and journal test data.""" + global TEMP_DIR + global WORKING_DIR + TEMP_DIR, WORKING_DIR = get_working_dirs(request) + + if not os.path.exists(TEMP_DIR): + os.mkdir(TEMP_DIR) + + +def pytest_bdd_after_scenario(request, feature, scenario): + """After each scenario, restore all test data and remove working_dirs.""" + TEMP_DIR, WORKING_DIR = get_working_dirs(request) + + if os.path.exists(TEMP_DIR): + shutil.rmtree(TEMP_DIR) + + +# ----- STEPS ----- # +@given(parse('we use the config "{config_file}"'), target_fixture="config_path") +def set_config(config_file): + # Copy the config file over + config_source = os.path.join(WORKING_DIR, 'features', 'data', 'configs', config_file) + config_dest = os.path.join(TEMP_DIR, config_file) + shutil.copy2(config_source, config_dest) + + # @todo make this only copy some journals over + # Copy all of the journals over + journal_source = os.path.join(WORKING_DIR, 'features', 'data', 'journals') + journal_dest = os.path.join(TEMP_DIR, 'features', 'journals') + shutil.copytree(journal_source, journal_dest, dirs_exist_ok=True) + + # @todo get rid of this by using default config values + # merge in version number + if config_file.endswith("yaml") and os.path.exists(config_dest): + # Add jrnl version to file for 2.x journals + with open(config_dest, "a") as cf: + cf.write("version: {}".format(__version__)) + + return config_dest + + +@when(parse('we run "{command}"')) +def run(command, config_path, cli_run, capsys): + args = split_args(command) + status = 0 + + # fmt: off + # see: https://github.com/psf/black/issues/664 + with \ + patch("sys.argv", args), \ + patch("jrnl.config.get_config_path", side_effect=lambda: config_path), \ + patch("jrnl.install.get_config_path", side_effect=lambda: config_path) \ + : + try: + cli(args[1:]) + except SystemExit as e: + status = e.code + # fmt: on + + cli_run['status'] = status + captured = capsys.readouterr() + cli_run['stdout'] = captured.out + cli_run['stderr'] = captured.err + + +@then("we should get no error") +def no_error(cli_run): + assert cli_run['status'] == 0, cli_run['status'] + + +@then(parse('the output should match "{regex}"')) +def matches_std_output(regex, cli_run): + out = cli_run['stdout'] + matches = re.findall(regex, out) + assert ( + matches + ), f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py new file mode 100644 index 00000000..d670f9c9 --- /dev/null +++ b/tests/step_defs/test_features.py @@ -0,0 +1,3 @@ +from pytest_bdd import scenarios + +scenarios("../features/core.feature") From 530190df7adff163c48ad7fd33d14d6ad1d877cc Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Feb 2021 17:43:42 -0800 Subject: [PATCH 0391/1132] Implement handling of temp and working dirs Pytest-bdd uses fixtures to handle most things. This makes a fixture that will create a temp directory for the tests to run in. Co-authored-by: Micah Jerome Ellison --- tests/step_defs/conftest.py | 66 ++++++++++++++----------------------- 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index cf6a2d5e..93482ce9 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -4,8 +4,9 @@ import shutil import os import re +import tempfile -import pytest +from pytest import fixture from pytest_bdd import given from pytest_bdd import then from pytest_bdd import when @@ -16,52 +17,35 @@ from jrnl import __version__ from jrnl.os_compat import split_args from jrnl.cli import cli -WORKING_DIR = '' -TEMP_DIR = '' - # ----- FIXTURES ----- # -@pytest.fixture +@fixture def cli_run(): - return dict(status=0, stdout=None, stderr=None) + return {"status": 0, "stdout": None, "stderr": None} +@fixture +def temp_dir(): + return tempfile.TemporaryDirectory() -def get_working_dirs(request): - CWD = request.config.rootpath - return os.path.join(CWD, 'tests', '.current_test'), CWD - - -# ----- HOOKS ----- # -def pytest_bdd_before_scenario(request, feature, scenario): - """Before each scenario, backup all config and journal test data.""" - global TEMP_DIR - global WORKING_DIR - TEMP_DIR, WORKING_DIR = get_working_dirs(request) - - if not os.path.exists(TEMP_DIR): - os.mkdir(TEMP_DIR) - - -def pytest_bdd_after_scenario(request, feature, scenario): - """After each scenario, restore all test data and remove working_dirs.""" - TEMP_DIR, WORKING_DIR = get_working_dirs(request) - - if os.path.exists(TEMP_DIR): - shutil.rmtree(TEMP_DIR) +@fixture +def working_dir(request): + return os.path.join(request.config.rootpath, "tests") # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") -def set_config(config_file): +def set_config(config_file, temp_dir, working_dir): # Copy the config file over - config_source = os.path.join(WORKING_DIR, 'features', 'data', 'configs', config_file) - config_dest = os.path.join(TEMP_DIR, config_file) + config_source = os.path.join( + working_dir, "features", "data", "configs", config_file + ) + config_dest = os.path.join(temp_dir.name, config_file) shutil.copy2(config_source, config_dest) # @todo make this only copy some journals over # Copy all of the journals over - journal_source = os.path.join(WORKING_DIR, 'features', 'data', 'journals') - journal_dest = os.path.join(TEMP_DIR, 'features', 'journals') - shutil.copytree(journal_source, journal_dest, dirs_exist_ok=True) + journal_source = os.path.join(working_dir, "features", "data", "journals") + journal_dest = os.path.join(temp_dir.name, "features", "journals") + shutil.copytree(journal_source, journal_dest) # @todo get rid of this by using default config values # merge in version number @@ -91,21 +75,19 @@ def run(command, config_path, cli_run, capsys): status = e.code # fmt: on - cli_run['status'] = status + cli_run["status"] = status captured = capsys.readouterr() - cli_run['stdout'] = captured.out - cli_run['stderr'] = captured.err + cli_run["stdout"] = captured.out + cli_run["stderr"] = captured.err @then("we should get no error") def no_error(cli_run): - assert cli_run['status'] == 0, cli_run['status'] + assert cli_run["status"] == 0, cli_run["status"] @then(parse('the output should match "{regex}"')) def matches_std_output(regex, cli_run): - out = cli_run['stdout'] + out = cli_run["stdout"] matches = re.findall(regex, out) - assert ( - matches - ), f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" + assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" From 0b50ae1be064e32ca07470fe1b9020627a52dea7 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Feb 2021 17:53:32 -0800 Subject: [PATCH 0392/1132] Rename features directory to data This is more inline with pytest standards Co-authored-by: Micah Jerome Ellison --- .../configs/basic_dayone.yaml | 0 .../configs/basic_encrypted.yaml | 0 .../configs/basic_folder.yaml | 0 .../configs/basic_onefile.yaml | 0 .../{features => data}/configs/brackets.yaml | 0 tests/{features => data}/configs/bug153.yaml | 0 tests/{features => data}/configs/bug343.yaml | 0 tests/{features => data}/configs/bug780.yaml | 0 tests/{features => data}/configs/dayone.yaml | 0 .../configs/dayone_empty.yaml | 0 .../{features => data}/configs/deletion.yaml | 0 .../configs/deletion_filters.yaml | 0 .../configs/editor-args.yaml | 0 tests/{features => data}/configs/editor.yaml | 0 .../configs/editor_empty_folder.yaml | 0 .../configs/editor_encrypted.yaml | 0 .../configs/empty_folder.yaml | 0 .../{features => data}/configs/encrypted.yaml | 0 .../configs/encrypted_old.json | 0 .../configs/encrypted_old.yaml | 0 .../{features => data}/configs/format_md.yaml | 0 .../configs/format_text.yaml | 0 .../configs/invalid_color.yaml | 0 .../configs/little_endian_dates.yaml | 0 .../configs/markdown-headings-335.yaml | 0 .../configs/missing_directory.yaml | 0 .../configs/missing_journal.yaml | 0 .../configs/mostlyreadabledates.yaml | 0 .../configs/multiline-tags.yaml | 0 .../{features => data}/configs/multiline.yaml | 0 .../{features => data}/configs/multiple.yaml | 0 .../{features => data}/configs/no_colors.yaml | 0 tests/{features => }/data/configs/simple.yaml | 0 .../{features => data}/configs/tags-216.yaml | 0 .../{features => data}/configs/tags-237.yaml | 0 tests/{features => data}/configs/tags.yaml | 0 .../configs/unreadabledates.yaml | 0 .../configs/upgrade_from_195.json | 0 .../upgrade_from_195_little_endian_dates.json | 0 ...om_195_with_missing_encrypted_journal.json | 0 ...upgrade_from_195_with_missing_journal.json | 0 .../D04D335AFED711EABA18FAFFC2100C3D.doentry | 0 .../FC8A86CAFED711EA8892FAFFC2100C3D.doentry | 0 .../FD8ABC8EFED711EABC35FAFFC2100C3D.doentry | 0 .../data/journals/basic_encrypted.journal | 0 .../data/journals/basic_folder/2020/08/29.txt | 0 .../data/journals/basic_folder/2020/08/31.txt | 0 .../data/journals/basic_folder/2020/09/24.txt | 0 .../data/journals/basic_onefile.journal | 0 .../data/journals/brackets.journal | 0 .../B40EE704E15846DE8D45C44118A4D511.doentry | 0 .../B40EE704E15846DE8D45C44118A4D512.doentry | 0 .../48A25033B34047C591160A4480197D8B.doentry | 0 .../044F3747A38546168B572C2E3F217FA2.doentry | 0 .../0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry | 0 .../422BC895507944A291E6FC44FC6B8BFC.doentry | 0 .../4BB1F46946AD439996C9B59DE7C4DDC1.doentry | 0 .../dayone_empty.dayone/entries/empty.txt | 0 .../data/journals/deletion.journal | 0 .../data/journals/deletion_filters.journal | 0 .../data/journals/empty_folder/empty | 0 .../data/journals/encrypted.journal | 0 .../journals/encrypted_jrnl-1-9-5.journal | Bin .../data/journals/little_endian_dates.journal | 0 .../journals/markdown-headings-335.journal | 0 .../data/journals/mostlyreadabledates.journal | 0 .../data/journals/multiline-tags.journal | 0 .../data/journals/multiline.journal | 0 .../data/journals/simple.journal | 0 .../data/journals/simple_jrnl-1-9-5.journal | 0 ...ple_jrnl-1-9-5_little_endian_dates.journal | 0 .../data/journals/tags-216.journal | 0 .../data/journals/tags-237.journal | 0 .../{features => }/data/journals/tags.journal | 0 .../data/journals/unreadabledates.journal | 0 .../{features => }/data/journals/work.journal | 0 .../data/templates/sample.template | 0 .../configs/editor_markdown_extension.yaml | 18 ------ tests/features/configs/simple.yaml | 18 ------ tests/features/core.feature | 1 + tests/features/data/configs/basic_dayone.yaml | 17 ----- .../data/configs/basic_encrypted.yaml | 17 ----- tests/features/data/configs/basic_folder.yaml | 17 ----- .../features/data/configs/basic_onefile.yaml | 17 ----- tests/features/data/configs/brackets.yaml | 12 ---- tests/features/data/configs/bug153.yaml | 17 ----- tests/features/data/configs/bug343.yaml | 13 ---- tests/features/data/configs/bug780.yaml | 12 ---- tests/features/data/configs/dayone.yaml | 12 ---- tests/features/data/configs/dayone_empty.yaml | 17 ----- tests/features/data/configs/deletion.yaml | 12 ---- .../data/configs/deletion_filters.yaml | 12 ---- tests/features/data/configs/editor-args.yaml | 12 ---- tests/features/data/configs/editor.yaml | 12 ---- .../data/configs/editor_empty_folder.yaml | 12 ---- .../data/configs/editor_encrypted.yaml | 17 ----- tests/features/data/configs/empty_folder.yaml | 12 ---- tests/features/data/configs/encrypted.yaml | 12 ---- .../features/data/configs/encrypted_old.json | 13 ---- .../features/data/configs/encrypted_old.yaml | 11 ---- tests/features/data/configs/format_md.yaml | 19 ------ tests/features/data/configs/format_text.yaml | 19 ------ .../features/data/configs/invalid_color.yaml | 17 ----- .../data/configs/little_endian_dates.yaml | 12 ---- .../data/configs/markdown-headings-335.yaml | 17 ----- .../data/configs/missing_directory.yaml | 17 ----- .../data/configs/missing_journal.yaml | 17 ----- .../data/configs/mostlyreadabledates.yaml | 12 ---- .../features/data/configs/multiline-tags.yaml | 17 ----- tests/features/data/configs/multiline.yaml | 17 ----- tests/features/data/configs/multiple.yaml | 18 ------ tests/features/data/configs/no_colors.yaml | 12 ---- tests/features/data/configs/tags-216.yaml | 17 ----- tests/features/data/configs/tags-237.yaml | 17 ----- tests/features/data/configs/tags.yaml | 17 ----- .../data/configs/unreadabledates.yaml | 17 ----- .../data/configs/upgrade_from_195.json | 11 ---- .../upgrade_from_195_little_endian_dates.json | 11 ---- ...om_195_with_missing_encrypted_journal.json | 11 ---- ...upgrade_from_195_with_missing_journal.json | 11 ---- tests/features/environment.py | 0 .../D04D335AFED711EABA18FAFFC2100C3D.doentry | 53 ---------------- .../FC8A86CAFED711EA8892FAFFC2100C3D.doentry | 55 ----------------- .../FD8ABC8EFED711EABC35FAFFC2100C3D.doentry | 44 ------------- .../features/journals/basic_encrypted.journal | 1 - .../journals/basic_folder/2020/08/29.txt | 19 ------ .../journals/basic_folder/2020/08/31.txt | 23 ------- .../journals/basic_folder/2020/09/24.txt | 11 ---- tests/features/journals/basic_onefile.journal | 58 ------------------ tests/features/journals/brackets.journal | 2 - .../B40EE704E15846DE8D45C44118A4D511.doentry | 56 ----------------- .../B40EE704E15846DE8D45C44118A4D512.doentry | 52 ---------------- .../48A25033B34047C591160A4480197D8B.doentry | 33 ---------- .../044F3747A38546168B572C2E3F217FA2.doentry | 34 ---------- .../0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry | 46 -------------- .../422BC895507944A291E6FC44FC6B8BFC.doentry | 31 ---------- .../4BB1F46946AD439996C9B59DE7C4DDC1.doentry | 29 --------- .../dayone_empty.dayone/entries/empty.txt | 1 - tests/features/journals/deletion.journal | 5 -- .../journals/deletion_filters.journal | 14 ----- tests/features/journals/empty_folder/empty | 1 - tests/features/journals/encrypted.journal | 1 - .../journals/encrypted_jrnl-1-9-5.journal | Bin 128 -> 0 bytes .../journals/little_endian_dates.journal | 5 -- .../journals/markdown-headings-335.journal | 42 ------------- .../journals/mostlyreadabledates.journal | 8 --- .../features/journals/multiline-tags.journal | 7 --- tests/features/journals/multiline.journal | 5 -- tests/features/journals/simple.journal | 5 -- .../journals/simple_jrnl-1-9-5.journal | 13 ---- ...ple_jrnl-1-9-5_little_endian_dates.journal | 13 ---- tests/features/journals/tags-216.journal | 2 - tests/features/journals/tags-237.journal | 3 - tests/features/journals/tags.journal | 8 --- .../features/journals/unreadabledates.journal | 5 -- tests/features/journals/work.journal | 0 tests/features/templates/extension.md | 0 tests/step_defs/conftest.py | 6 +- 158 files changed, 4 insertions(+), 1306 deletions(-) rename tests/{features => data}/configs/basic_dayone.yaml (100%) rename tests/{features => data}/configs/basic_encrypted.yaml (100%) rename tests/{features => data}/configs/basic_folder.yaml (100%) rename tests/{features => data}/configs/basic_onefile.yaml (100%) rename tests/{features => data}/configs/brackets.yaml (100%) rename tests/{features => data}/configs/bug153.yaml (100%) rename tests/{features => data}/configs/bug343.yaml (100%) rename tests/{features => data}/configs/bug780.yaml (100%) rename tests/{features => data}/configs/dayone.yaml (100%) rename tests/{features => data}/configs/dayone_empty.yaml (100%) rename tests/{features => data}/configs/deletion.yaml (100%) rename tests/{features => data}/configs/deletion_filters.yaml (100%) rename tests/{features => data}/configs/editor-args.yaml (100%) rename tests/{features => data}/configs/editor.yaml (100%) rename tests/{features => data}/configs/editor_empty_folder.yaml (100%) rename tests/{features => data}/configs/editor_encrypted.yaml (100%) rename tests/{features => data}/configs/empty_folder.yaml (100%) rename tests/{features => data}/configs/encrypted.yaml (100%) rename tests/{features => data}/configs/encrypted_old.json (100%) rename tests/{features => data}/configs/encrypted_old.yaml (100%) rename tests/{features => data}/configs/format_md.yaml (100%) rename tests/{features => data}/configs/format_text.yaml (100%) rename tests/{features => data}/configs/invalid_color.yaml (100%) rename tests/{features => data}/configs/little_endian_dates.yaml (100%) rename tests/{features => data}/configs/markdown-headings-335.yaml (100%) rename tests/{features => data}/configs/missing_directory.yaml (100%) rename tests/{features => data}/configs/missing_journal.yaml (100%) rename tests/{features => data}/configs/mostlyreadabledates.yaml (100%) rename tests/{features => data}/configs/multiline-tags.yaml (100%) rename tests/{features => data}/configs/multiline.yaml (100%) rename tests/{features => data}/configs/multiple.yaml (100%) rename tests/{features => data}/configs/no_colors.yaml (100%) rename tests/{features => }/data/configs/simple.yaml (100%) rename tests/{features => data}/configs/tags-216.yaml (100%) rename tests/{features => data}/configs/tags-237.yaml (100%) rename tests/{features => data}/configs/tags.yaml (100%) rename tests/{features => data}/configs/unreadabledates.yaml (100%) rename tests/{features => data}/configs/upgrade_from_195.json (100%) rename tests/{features => data}/configs/upgrade_from_195_little_endian_dates.json (100%) rename tests/{features => data}/configs/upgrade_from_195_with_missing_encrypted_journal.json (100%) rename tests/{features => data}/configs/upgrade_from_195_with_missing_journal.json (100%) rename tests/{features => }/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry (100%) rename tests/{features => }/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry (100%) rename tests/{features => }/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry (100%) rename tests/{features => }/data/journals/basic_encrypted.journal (100%) rename tests/{features => }/data/journals/basic_folder/2020/08/29.txt (100%) rename tests/{features => }/data/journals/basic_folder/2020/08/31.txt (100%) rename tests/{features => }/data/journals/basic_folder/2020/09/24.txt (100%) rename tests/{features => }/data/journals/basic_onefile.journal (100%) rename tests/{features => }/data/journals/brackets.journal (100%) rename tests/{features => }/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry (100%) rename tests/{features => }/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry (100%) rename tests/{features => }/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry (100%) rename tests/{features => }/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry (100%) rename tests/{features => }/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry (100%) rename tests/{features => }/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry (100%) rename tests/{features => }/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry (100%) rename tests/{features => }/data/journals/dayone_empty.dayone/entries/empty.txt (100%) rename tests/{features => }/data/journals/deletion.journal (100%) rename tests/{features => }/data/journals/deletion_filters.journal (100%) rename tests/{features => }/data/journals/empty_folder/empty (100%) rename tests/{features => }/data/journals/encrypted.journal (100%) rename tests/{features => }/data/journals/encrypted_jrnl-1-9-5.journal (100%) rename tests/{features => }/data/journals/little_endian_dates.journal (100%) rename tests/{features => }/data/journals/markdown-headings-335.journal (100%) rename tests/{features => }/data/journals/mostlyreadabledates.journal (100%) rename tests/{features => }/data/journals/multiline-tags.journal (100%) rename tests/{features => }/data/journals/multiline.journal (100%) rename tests/{features => }/data/journals/simple.journal (100%) rename tests/{features => }/data/journals/simple_jrnl-1-9-5.journal (100%) rename tests/{features => }/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal (100%) rename tests/{features => }/data/journals/tags-216.journal (100%) rename tests/{features => }/data/journals/tags-237.journal (100%) rename tests/{features => }/data/journals/tags.journal (100%) rename tests/{features => }/data/journals/unreadabledates.journal (100%) rename tests/{features => }/data/journals/work.journal (100%) rename tests/{features => }/data/templates/sample.template (100%) delete mode 100644 tests/features/configs/editor_markdown_extension.yaml delete mode 100644 tests/features/configs/simple.yaml delete mode 100644 tests/features/data/configs/basic_dayone.yaml delete mode 100644 tests/features/data/configs/basic_encrypted.yaml delete mode 100644 tests/features/data/configs/basic_folder.yaml delete mode 100644 tests/features/data/configs/basic_onefile.yaml delete mode 100644 tests/features/data/configs/brackets.yaml delete mode 100644 tests/features/data/configs/bug153.yaml delete mode 100644 tests/features/data/configs/bug343.yaml delete mode 100644 tests/features/data/configs/bug780.yaml delete mode 100644 tests/features/data/configs/dayone.yaml delete mode 100644 tests/features/data/configs/dayone_empty.yaml delete mode 100644 tests/features/data/configs/deletion.yaml delete mode 100644 tests/features/data/configs/deletion_filters.yaml delete mode 100644 tests/features/data/configs/editor-args.yaml delete mode 100644 tests/features/data/configs/editor.yaml delete mode 100644 tests/features/data/configs/editor_empty_folder.yaml delete mode 100644 tests/features/data/configs/editor_encrypted.yaml delete mode 100644 tests/features/data/configs/empty_folder.yaml delete mode 100644 tests/features/data/configs/encrypted.yaml delete mode 100644 tests/features/data/configs/encrypted_old.json delete mode 100644 tests/features/data/configs/encrypted_old.yaml delete mode 100644 tests/features/data/configs/format_md.yaml delete mode 100644 tests/features/data/configs/format_text.yaml delete mode 100644 tests/features/data/configs/invalid_color.yaml delete mode 100644 tests/features/data/configs/little_endian_dates.yaml delete mode 100644 tests/features/data/configs/markdown-headings-335.yaml delete mode 100644 tests/features/data/configs/missing_directory.yaml delete mode 100644 tests/features/data/configs/missing_journal.yaml delete mode 100644 tests/features/data/configs/mostlyreadabledates.yaml delete mode 100644 tests/features/data/configs/multiline-tags.yaml delete mode 100644 tests/features/data/configs/multiline.yaml delete mode 100644 tests/features/data/configs/multiple.yaml delete mode 100644 tests/features/data/configs/no_colors.yaml delete mode 100644 tests/features/data/configs/tags-216.yaml delete mode 100644 tests/features/data/configs/tags-237.yaml delete mode 100644 tests/features/data/configs/tags.yaml delete mode 100644 tests/features/data/configs/unreadabledates.yaml delete mode 100644 tests/features/data/configs/upgrade_from_195.json delete mode 100644 tests/features/data/configs/upgrade_from_195_little_endian_dates.json delete mode 100644 tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json delete mode 100644 tests/features/data/configs/upgrade_from_195_with_missing_journal.json delete mode 100644 tests/features/environment.py delete mode 100644 tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry delete mode 100644 tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry delete mode 100644 tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry delete mode 100644 tests/features/journals/basic_encrypted.journal delete mode 100644 tests/features/journals/basic_folder/2020/08/29.txt delete mode 100644 tests/features/journals/basic_folder/2020/08/31.txt delete mode 100644 tests/features/journals/basic_folder/2020/09/24.txt delete mode 100644 tests/features/journals/basic_onefile.journal delete mode 100644 tests/features/journals/brackets.journal delete mode 100644 tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry delete mode 100644 tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry delete mode 100644 tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry delete mode 100644 tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry delete mode 100644 tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry delete mode 100644 tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry delete mode 100644 tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry delete mode 100644 tests/features/journals/dayone_empty.dayone/entries/empty.txt delete mode 100644 tests/features/journals/deletion.journal delete mode 100644 tests/features/journals/deletion_filters.journal delete mode 100644 tests/features/journals/empty_folder/empty delete mode 100644 tests/features/journals/encrypted.journal delete mode 100644 tests/features/journals/encrypted_jrnl-1-9-5.journal delete mode 100644 tests/features/journals/little_endian_dates.journal delete mode 100644 tests/features/journals/markdown-headings-335.journal delete mode 100644 tests/features/journals/mostlyreadabledates.journal delete mode 100644 tests/features/journals/multiline-tags.journal delete mode 100644 tests/features/journals/multiline.journal delete mode 100644 tests/features/journals/simple.journal delete mode 100644 tests/features/journals/simple_jrnl-1-9-5.journal delete mode 100644 tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal delete mode 100644 tests/features/journals/tags-216.journal delete mode 100644 tests/features/journals/tags-237.journal delete mode 100644 tests/features/journals/tags.journal delete mode 100644 tests/features/journals/unreadabledates.journal delete mode 100644 tests/features/journals/work.journal delete mode 100644 tests/features/templates/extension.md diff --git a/tests/features/configs/basic_dayone.yaml b/tests/data/configs/basic_dayone.yaml similarity index 100% rename from tests/features/configs/basic_dayone.yaml rename to tests/data/configs/basic_dayone.yaml diff --git a/tests/features/configs/basic_encrypted.yaml b/tests/data/configs/basic_encrypted.yaml similarity index 100% rename from tests/features/configs/basic_encrypted.yaml rename to tests/data/configs/basic_encrypted.yaml diff --git a/tests/features/configs/basic_folder.yaml b/tests/data/configs/basic_folder.yaml similarity index 100% rename from tests/features/configs/basic_folder.yaml rename to tests/data/configs/basic_folder.yaml diff --git a/tests/features/configs/basic_onefile.yaml b/tests/data/configs/basic_onefile.yaml similarity index 100% rename from tests/features/configs/basic_onefile.yaml rename to tests/data/configs/basic_onefile.yaml diff --git a/tests/features/configs/brackets.yaml b/tests/data/configs/brackets.yaml similarity index 100% rename from tests/features/configs/brackets.yaml rename to tests/data/configs/brackets.yaml diff --git a/tests/features/configs/bug153.yaml b/tests/data/configs/bug153.yaml similarity index 100% rename from tests/features/configs/bug153.yaml rename to tests/data/configs/bug153.yaml diff --git a/tests/features/configs/bug343.yaml b/tests/data/configs/bug343.yaml similarity index 100% rename from tests/features/configs/bug343.yaml rename to tests/data/configs/bug343.yaml diff --git a/tests/features/configs/bug780.yaml b/tests/data/configs/bug780.yaml similarity index 100% rename from tests/features/configs/bug780.yaml rename to tests/data/configs/bug780.yaml diff --git a/tests/features/configs/dayone.yaml b/tests/data/configs/dayone.yaml similarity index 100% rename from tests/features/configs/dayone.yaml rename to tests/data/configs/dayone.yaml diff --git a/tests/features/configs/dayone_empty.yaml b/tests/data/configs/dayone_empty.yaml similarity index 100% rename from tests/features/configs/dayone_empty.yaml rename to tests/data/configs/dayone_empty.yaml diff --git a/tests/features/configs/deletion.yaml b/tests/data/configs/deletion.yaml similarity index 100% rename from tests/features/configs/deletion.yaml rename to tests/data/configs/deletion.yaml diff --git a/tests/features/configs/deletion_filters.yaml b/tests/data/configs/deletion_filters.yaml similarity index 100% rename from tests/features/configs/deletion_filters.yaml rename to tests/data/configs/deletion_filters.yaml diff --git a/tests/features/configs/editor-args.yaml b/tests/data/configs/editor-args.yaml similarity index 100% rename from tests/features/configs/editor-args.yaml rename to tests/data/configs/editor-args.yaml diff --git a/tests/features/configs/editor.yaml b/tests/data/configs/editor.yaml similarity index 100% rename from tests/features/configs/editor.yaml rename to tests/data/configs/editor.yaml diff --git a/tests/features/configs/editor_empty_folder.yaml b/tests/data/configs/editor_empty_folder.yaml similarity index 100% rename from tests/features/configs/editor_empty_folder.yaml rename to tests/data/configs/editor_empty_folder.yaml diff --git a/tests/features/configs/editor_encrypted.yaml b/tests/data/configs/editor_encrypted.yaml similarity index 100% rename from tests/features/configs/editor_encrypted.yaml rename to tests/data/configs/editor_encrypted.yaml diff --git a/tests/features/configs/empty_folder.yaml b/tests/data/configs/empty_folder.yaml similarity index 100% rename from tests/features/configs/empty_folder.yaml rename to tests/data/configs/empty_folder.yaml diff --git a/tests/features/configs/encrypted.yaml b/tests/data/configs/encrypted.yaml similarity index 100% rename from tests/features/configs/encrypted.yaml rename to tests/data/configs/encrypted.yaml diff --git a/tests/features/configs/encrypted_old.json b/tests/data/configs/encrypted_old.json similarity index 100% rename from tests/features/configs/encrypted_old.json rename to tests/data/configs/encrypted_old.json diff --git a/tests/features/configs/encrypted_old.yaml b/tests/data/configs/encrypted_old.yaml similarity index 100% rename from tests/features/configs/encrypted_old.yaml rename to tests/data/configs/encrypted_old.yaml diff --git a/tests/features/configs/format_md.yaml b/tests/data/configs/format_md.yaml similarity index 100% rename from tests/features/configs/format_md.yaml rename to tests/data/configs/format_md.yaml diff --git a/tests/features/configs/format_text.yaml b/tests/data/configs/format_text.yaml similarity index 100% rename from tests/features/configs/format_text.yaml rename to tests/data/configs/format_text.yaml diff --git a/tests/features/configs/invalid_color.yaml b/tests/data/configs/invalid_color.yaml similarity index 100% rename from tests/features/configs/invalid_color.yaml rename to tests/data/configs/invalid_color.yaml diff --git a/tests/features/configs/little_endian_dates.yaml b/tests/data/configs/little_endian_dates.yaml similarity index 100% rename from tests/features/configs/little_endian_dates.yaml rename to tests/data/configs/little_endian_dates.yaml diff --git a/tests/features/configs/markdown-headings-335.yaml b/tests/data/configs/markdown-headings-335.yaml similarity index 100% rename from tests/features/configs/markdown-headings-335.yaml rename to tests/data/configs/markdown-headings-335.yaml diff --git a/tests/features/configs/missing_directory.yaml b/tests/data/configs/missing_directory.yaml similarity index 100% rename from tests/features/configs/missing_directory.yaml rename to tests/data/configs/missing_directory.yaml diff --git a/tests/features/configs/missing_journal.yaml b/tests/data/configs/missing_journal.yaml similarity index 100% rename from tests/features/configs/missing_journal.yaml rename to tests/data/configs/missing_journal.yaml diff --git a/tests/features/configs/mostlyreadabledates.yaml b/tests/data/configs/mostlyreadabledates.yaml similarity index 100% rename from tests/features/configs/mostlyreadabledates.yaml rename to tests/data/configs/mostlyreadabledates.yaml diff --git a/tests/features/configs/multiline-tags.yaml b/tests/data/configs/multiline-tags.yaml similarity index 100% rename from tests/features/configs/multiline-tags.yaml rename to tests/data/configs/multiline-tags.yaml diff --git a/tests/features/configs/multiline.yaml b/tests/data/configs/multiline.yaml similarity index 100% rename from tests/features/configs/multiline.yaml rename to tests/data/configs/multiline.yaml diff --git a/tests/features/configs/multiple.yaml b/tests/data/configs/multiple.yaml similarity index 100% rename from tests/features/configs/multiple.yaml rename to tests/data/configs/multiple.yaml diff --git a/tests/features/configs/no_colors.yaml b/tests/data/configs/no_colors.yaml similarity index 100% rename from tests/features/configs/no_colors.yaml rename to tests/data/configs/no_colors.yaml diff --git a/tests/features/data/configs/simple.yaml b/tests/data/configs/simple.yaml similarity index 100% rename from tests/features/data/configs/simple.yaml rename to tests/data/configs/simple.yaml diff --git a/tests/features/configs/tags-216.yaml b/tests/data/configs/tags-216.yaml similarity index 100% rename from tests/features/configs/tags-216.yaml rename to tests/data/configs/tags-216.yaml diff --git a/tests/features/configs/tags-237.yaml b/tests/data/configs/tags-237.yaml similarity index 100% rename from tests/features/configs/tags-237.yaml rename to tests/data/configs/tags-237.yaml diff --git a/tests/features/configs/tags.yaml b/tests/data/configs/tags.yaml similarity index 100% rename from tests/features/configs/tags.yaml rename to tests/data/configs/tags.yaml diff --git a/tests/features/configs/unreadabledates.yaml b/tests/data/configs/unreadabledates.yaml similarity index 100% rename from tests/features/configs/unreadabledates.yaml rename to tests/data/configs/unreadabledates.yaml diff --git a/tests/features/configs/upgrade_from_195.json b/tests/data/configs/upgrade_from_195.json similarity index 100% rename from tests/features/configs/upgrade_from_195.json rename to tests/data/configs/upgrade_from_195.json diff --git a/tests/features/configs/upgrade_from_195_little_endian_dates.json b/tests/data/configs/upgrade_from_195_little_endian_dates.json similarity index 100% rename from tests/features/configs/upgrade_from_195_little_endian_dates.json rename to tests/data/configs/upgrade_from_195_little_endian_dates.json diff --git a/tests/features/configs/upgrade_from_195_with_missing_encrypted_journal.json b/tests/data/configs/upgrade_from_195_with_missing_encrypted_journal.json similarity index 100% rename from tests/features/configs/upgrade_from_195_with_missing_encrypted_journal.json rename to tests/data/configs/upgrade_from_195_with_missing_encrypted_journal.json diff --git a/tests/features/configs/upgrade_from_195_with_missing_journal.json b/tests/data/configs/upgrade_from_195_with_missing_journal.json similarity index 100% rename from tests/features/configs/upgrade_from_195_with_missing_journal.json rename to tests/data/configs/upgrade_from_195_with_missing_journal.json diff --git a/tests/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry b/tests/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry similarity index 100% rename from tests/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry rename to tests/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry diff --git a/tests/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry b/tests/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry similarity index 100% rename from tests/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry rename to tests/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry diff --git a/tests/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry b/tests/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry similarity index 100% rename from tests/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry rename to tests/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry diff --git a/tests/features/data/journals/basic_encrypted.journal b/tests/data/journals/basic_encrypted.journal similarity index 100% rename from tests/features/data/journals/basic_encrypted.journal rename to tests/data/journals/basic_encrypted.journal diff --git a/tests/features/data/journals/basic_folder/2020/08/29.txt b/tests/data/journals/basic_folder/2020/08/29.txt similarity index 100% rename from tests/features/data/journals/basic_folder/2020/08/29.txt rename to tests/data/journals/basic_folder/2020/08/29.txt diff --git a/tests/features/data/journals/basic_folder/2020/08/31.txt b/tests/data/journals/basic_folder/2020/08/31.txt similarity index 100% rename from tests/features/data/journals/basic_folder/2020/08/31.txt rename to tests/data/journals/basic_folder/2020/08/31.txt diff --git a/tests/features/data/journals/basic_folder/2020/09/24.txt b/tests/data/journals/basic_folder/2020/09/24.txt similarity index 100% rename from tests/features/data/journals/basic_folder/2020/09/24.txt rename to tests/data/journals/basic_folder/2020/09/24.txt diff --git a/tests/features/data/journals/basic_onefile.journal b/tests/data/journals/basic_onefile.journal similarity index 100% rename from tests/features/data/journals/basic_onefile.journal rename to tests/data/journals/basic_onefile.journal diff --git a/tests/features/data/journals/brackets.journal b/tests/data/journals/brackets.journal similarity index 100% rename from tests/features/data/journals/brackets.journal rename to tests/data/journals/brackets.journal diff --git a/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry b/tests/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry similarity index 100% rename from tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry rename to tests/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry diff --git a/tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry b/tests/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry similarity index 100% rename from tests/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry rename to tests/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry diff --git a/tests/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry b/tests/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry similarity index 100% rename from tests/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry rename to tests/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry diff --git a/tests/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry b/tests/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry similarity index 100% rename from tests/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry rename to tests/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry diff --git a/tests/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry b/tests/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry similarity index 100% rename from tests/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry rename to tests/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry diff --git a/tests/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry b/tests/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry similarity index 100% rename from tests/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry rename to tests/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry diff --git a/tests/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry b/tests/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry similarity index 100% rename from tests/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry rename to tests/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry diff --git a/tests/features/data/journals/dayone_empty.dayone/entries/empty.txt b/tests/data/journals/dayone_empty.dayone/entries/empty.txt similarity index 100% rename from tests/features/data/journals/dayone_empty.dayone/entries/empty.txt rename to tests/data/journals/dayone_empty.dayone/entries/empty.txt diff --git a/tests/features/data/journals/deletion.journal b/tests/data/journals/deletion.journal similarity index 100% rename from tests/features/data/journals/deletion.journal rename to tests/data/journals/deletion.journal diff --git a/tests/features/data/journals/deletion_filters.journal b/tests/data/journals/deletion_filters.journal similarity index 100% rename from tests/features/data/journals/deletion_filters.journal rename to tests/data/journals/deletion_filters.journal diff --git a/tests/features/data/journals/empty_folder/empty b/tests/data/journals/empty_folder/empty similarity index 100% rename from tests/features/data/journals/empty_folder/empty rename to tests/data/journals/empty_folder/empty diff --git a/tests/features/data/journals/encrypted.journal b/tests/data/journals/encrypted.journal similarity index 100% rename from tests/features/data/journals/encrypted.journal rename to tests/data/journals/encrypted.journal diff --git a/tests/features/data/journals/encrypted_jrnl-1-9-5.journal b/tests/data/journals/encrypted_jrnl-1-9-5.journal similarity index 100% rename from tests/features/data/journals/encrypted_jrnl-1-9-5.journal rename to tests/data/journals/encrypted_jrnl-1-9-5.journal diff --git a/tests/features/data/journals/little_endian_dates.journal b/tests/data/journals/little_endian_dates.journal similarity index 100% rename from tests/features/data/journals/little_endian_dates.journal rename to tests/data/journals/little_endian_dates.journal diff --git a/tests/features/data/journals/markdown-headings-335.journal b/tests/data/journals/markdown-headings-335.journal similarity index 100% rename from tests/features/data/journals/markdown-headings-335.journal rename to tests/data/journals/markdown-headings-335.journal diff --git a/tests/features/data/journals/mostlyreadabledates.journal b/tests/data/journals/mostlyreadabledates.journal similarity index 100% rename from tests/features/data/journals/mostlyreadabledates.journal rename to tests/data/journals/mostlyreadabledates.journal diff --git a/tests/features/data/journals/multiline-tags.journal b/tests/data/journals/multiline-tags.journal similarity index 100% rename from tests/features/data/journals/multiline-tags.journal rename to tests/data/journals/multiline-tags.journal diff --git a/tests/features/data/journals/multiline.journal b/tests/data/journals/multiline.journal similarity index 100% rename from tests/features/data/journals/multiline.journal rename to tests/data/journals/multiline.journal diff --git a/tests/features/data/journals/simple.journal b/tests/data/journals/simple.journal similarity index 100% rename from tests/features/data/journals/simple.journal rename to tests/data/journals/simple.journal diff --git a/tests/features/data/journals/simple_jrnl-1-9-5.journal b/tests/data/journals/simple_jrnl-1-9-5.journal similarity index 100% rename from tests/features/data/journals/simple_jrnl-1-9-5.journal rename to tests/data/journals/simple_jrnl-1-9-5.journal diff --git a/tests/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal b/tests/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal similarity index 100% rename from tests/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal rename to tests/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal diff --git a/tests/features/data/journals/tags-216.journal b/tests/data/journals/tags-216.journal similarity index 100% rename from tests/features/data/journals/tags-216.journal rename to tests/data/journals/tags-216.journal diff --git a/tests/features/data/journals/tags-237.journal b/tests/data/journals/tags-237.journal similarity index 100% rename from tests/features/data/journals/tags-237.journal rename to tests/data/journals/tags-237.journal diff --git a/tests/features/data/journals/tags.journal b/tests/data/journals/tags.journal similarity index 100% rename from tests/features/data/journals/tags.journal rename to tests/data/journals/tags.journal diff --git a/tests/features/data/journals/unreadabledates.journal b/tests/data/journals/unreadabledates.journal similarity index 100% rename from tests/features/data/journals/unreadabledates.journal rename to tests/data/journals/unreadabledates.journal diff --git a/tests/features/data/journals/work.journal b/tests/data/journals/work.journal similarity index 100% rename from tests/features/data/journals/work.journal rename to tests/data/journals/work.journal diff --git a/tests/features/data/templates/sample.template b/tests/data/templates/sample.template similarity index 100% rename from tests/features/data/templates/sample.template rename to tests/data/templates/sample.template diff --git a/tests/features/configs/editor_markdown_extension.yaml b/tests/features/configs/editor_markdown_extension.yaml deleted file mode 100644 index bf3b8d8e..00000000 --- a/tests/features/configs/editor_markdown_extension.yaml +++ /dev/null @@ -1,18 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -editor: "vim" -journals: - default: features/journals/editor_markdown_extension.journal -linewrap: 80 -tagsymbols: "@" -template: features/templates/extension.md -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/configs/simple.yaml b/tests/features/configs/simple.yaml deleted file mode 100644 index f8739142..00000000 --- a/tests/features/configs/simple.yaml +++ /dev/null @@ -1,18 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none -version: v2.5 \ No newline at end of file diff --git a/tests/features/core.feature b/tests/features/core.feature index 3115fd57..67a73a12 100644 --- a/tests/features/core.feature +++ b/tests/features/core.feature @@ -5,3 +5,4 @@ Feature: Functionality of jrnl outside of actually handling journals When we run "jrnl --version" Then we should get no error Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" + diff --git a/tests/features/data/configs/basic_dayone.yaml b/tests/features/data/configs/basic_dayone.yaml deleted file mode 100644 index 0209f2f7..00000000 --- a/tests/features/data/configs/basic_dayone.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: false -highlight: true -journals: - default: features/journals/basic_dayone.dayone -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/basic_encrypted.yaml b/tests/features/data/configs/basic_encrypted.yaml deleted file mode 100644 index 77f4e48d..00000000 --- a/tests/features/data/configs/basic_encrypted.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: true -highlight: true -journals: - default: features/journals/basic_encrypted.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/basic_folder.yaml b/tests/features/data/configs/basic_folder.yaml deleted file mode 100644 index ba0de638..00000000 --- a/tests/features/data/configs/basic_folder.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: false -highlight: true -journals: - default: features/journals/basic_folder -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/basic_onefile.yaml b/tests/features/data/configs/basic_onefile.yaml deleted file mode 100644 index fb48c6f8..00000000 --- a/tests/features/data/configs/basic_onefile.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: false -highlight: true -journals: - default: features/journals/basic_onefile.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/brackets.yaml b/tests/features/data/configs/brackets.yaml deleted file mode 100644 index e658947c..00000000 --- a/tests/features/data/configs/brackets.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/brackets.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/bug153.yaml b/tests/features/data/configs/bug153.yaml deleted file mode 100644 index ff645ab6..00000000 --- a/tests/features/data/configs/bug153.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -journals: - default: features/journals/bug153.dayone -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/bug343.yaml b/tests/features/data/configs/bug343.yaml deleted file mode 100644 index a4e25d8a..00000000 --- a/tests/features/data/configs/bug343.yaml +++ /dev/null @@ -1,13 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -template: false -encrypt: false -highlight: true -journals: - simple: features/journals/simple.journal - work: features/journals/work.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/bug780.yaml b/tests/features/data/configs/bug780.yaml deleted file mode 100644 index e1d830c2..00000000 --- a/tests/features/data/configs/bug780.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -journals: - default: features/journals/bug780.dayone -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/dayone.yaml b/tests/features/data/configs/dayone.yaml deleted file mode 100644 index 894cb911..00000000 --- a/tests/features/data/configs/dayone.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: noop -template: false -encrypt: false -highlight: true -journals: - default: features/journals/dayone.dayone -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/dayone_empty.yaml b/tests/features/data/configs/dayone_empty.yaml deleted file mode 100644 index 7750d389..00000000 --- a/tests/features/data/configs/dayone_empty.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: noop -template: false -encrypt: false -highlight: true -journals: - default: features/journals/dayone_empty.dayone -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/deletion.yaml b/tests/features/data/configs/deletion.yaml deleted file mode 100644 index d4155260..00000000 --- a/tests/features/data/configs/deletion.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/deletion.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/deletion_filters.yaml b/tests/features/data/configs/deletion_filters.yaml deleted file mode 100644 index 73a88e4d..00000000 --- a/tests/features/data/configs/deletion_filters.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/deletion_filters.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/editor-args.yaml b/tests/features/data/configs/editor-args.yaml deleted file mode 100644 index 12c5bd9c..00000000 --- a/tests/features/data/configs/editor-args.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: vim -f -c 'setf markdown' -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/editor.yaml b/tests/features/data/configs/editor.yaml deleted file mode 100644 index 8a06f916..00000000 --- a/tests/features/data/configs/editor.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "vim" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/editor_empty_folder.yaml b/tests/features/data/configs/editor_empty_folder.yaml deleted file mode 100644 index 1724bbfb..00000000 --- a/tests/features/data/configs/editor_empty_folder.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: 'vim' -template: false -encrypt: false -highlight: true -journals: - default: features/journals/empty_folder -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/editor_encrypted.yaml b/tests/features/data/configs/editor_encrypted.yaml deleted file mode 100644 index 75273c96..00000000 --- a/tests/features/data/configs/editor_encrypted.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - body: green - date: blue - tags: none - title: yellow -default_hour: 9 -default_minute: 0 -editor: "vim" -encrypt: true -template: false -highlight: true -journals: - default: features/journals/encrypted.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/empty_folder.yaml b/tests/features/data/configs/empty_folder.yaml deleted file mode 100644 index 52a21854..00000000 --- a/tests/features/data/configs/empty_folder.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -template: false -encrypt: false -highlight: true -journals: - default: features/journals/empty_folder -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/encrypted.yaml b/tests/features/data/configs/encrypted.yaml deleted file mode 100644 index 4d50b607..00000000 --- a/tests/features/data/configs/encrypted.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: true -template: false -highlight: true -journals: - default: features/journals/encrypted.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/encrypted_old.json b/tests/features/data/configs/encrypted_old.json deleted file mode 100644 index e69d9b79..00000000 --- a/tests/features/data/configs/encrypted_old.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "default_hour": 9, - "default_minute": 0, - "editor": "", - "encrypt": true, - "highlight": true, - "journals": { - "default": "features/journals/encrypted_jrnl-1-9-5.journal" - }, - "linewrap": 80, - "tagsymbols": "@", - "timeformat": "%Y-%m-%d %H:%M" -} diff --git a/tests/features/data/configs/encrypted_old.yaml b/tests/features/data/configs/encrypted_old.yaml deleted file mode 100644 index bc7b1440..00000000 --- a/tests/features/data/configs/encrypted_old.yaml +++ /dev/null @@ -1,11 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: true -highlight: true -journals: - default: features/journals/encrypted_jrnl1-9-5.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/format_md.yaml b/tests/features/data/configs/format_md.yaml deleted file mode 100644 index 0b9f1c3b..00000000 --- a/tests/features/data/configs/format_md.yaml +++ /dev/null @@ -1,19 +0,0 @@ -colors: - body: none - date: none - tags: none - title: none -default_hour: 9 -default_minute: 0 -display_format: markdown -editor: '' -encrypt: false -highlight: true -indent_character: '|' -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -version: v2.4.5 diff --git a/tests/features/data/configs/format_text.yaml b/tests/features/data/configs/format_text.yaml deleted file mode 100644 index c82ff7a7..00000000 --- a/tests/features/data/configs/format_text.yaml +++ /dev/null @@ -1,19 +0,0 @@ -colors: - body: none - date: none - tags: none - title: none -default_hour: 9 -default_minute: 0 -display_format: text -editor: '' -encrypt: false -highlight: true -indent_character: '|' -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -version: v2.4.5 diff --git a/tests/features/data/configs/invalid_color.yaml b/tests/features/data/configs/invalid_color.yaml deleted file mode 100644 index 25c0e58d..00000000 --- a/tests/features/data/configs/invalid_color.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: not-a-color - title: also-not-a-color - body: still-no-color - tags: me-too diff --git a/tests/features/data/configs/little_endian_dates.yaml b/tests/features/data/configs/little_endian_dates.yaml deleted file mode 100644 index 223c820d..00000000 --- a/tests/features/data/configs/little_endian_dates.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/little_endian_dates.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%d.%m.%Y %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/markdown-headings-335.yaml b/tests/features/data/configs/markdown-headings-335.yaml deleted file mode 100644 index 4368f641..00000000 --- a/tests/features/data/configs/markdown-headings-335.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/markdown-headings-335.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/missing_directory.yaml b/tests/features/data/configs/missing_directory.yaml deleted file mode 100644 index d600404c..00000000 --- a/tests/features/data/configs/missing_directory.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/missing_directory/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/missing_journal.yaml b/tests/features/data/configs/missing_journal.yaml deleted file mode 100644 index a1f6f8cf..00000000 --- a/tests/features/data/configs/missing_journal.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/missing.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/mostlyreadabledates.yaml b/tests/features/data/configs/mostlyreadabledates.yaml deleted file mode 100644 index 5e3e1a15..00000000 --- a/tests/features/data/configs/mostlyreadabledates.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/mostlyreadabledates.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/multiline-tags.yaml b/tests/features/data/configs/multiline-tags.yaml deleted file mode 100644 index 033aaa27..00000000 --- a/tests/features/data/configs/multiline-tags.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/multiline-tags.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/multiline.yaml b/tests/features/data/configs/multiline.yaml deleted file mode 100644 index aa35b3f5..00000000 --- a/tests/features/data/configs/multiline.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/multiline.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/multiple.yaml b/tests/features/data/configs/multiple.yaml deleted file mode 100644 index 65f2c256..00000000 --- a/tests/features/data/configs/multiple.yaml +++ /dev/null @@ -1,18 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/simple.journal - ideas: features/journals/nothing.journal - simple: features/journals/simple.journal - work: features/journals/work.journal - new_encrypted: - encrypt: true - journal: features/journals/new_encrypted.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/tests/features/data/configs/no_colors.yaml b/tests/features/data/configs/no_colors.yaml deleted file mode 100644 index 9111b561..00000000 --- a/tests/features/data/configs/no_colors.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/tests/features/data/configs/tags-216.yaml b/tests/features/data/configs/tags-216.yaml deleted file mode 100644 index 81b3865f..00000000 --- a/tests/features/data/configs/tags-216.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/tags-216.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/tags-237.yaml b/tests/features/data/configs/tags-237.yaml deleted file mode 100644 index 5aecd61e..00000000 --- a/tests/features/data/configs/tags-237.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/tags-237.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/tags.yaml b/tests/features/data/configs/tags.yaml deleted file mode 100644 index 4b55952c..00000000 --- a/tests/features/data/configs/tags.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/tags.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/unreadabledates.yaml b/tests/features/data/configs/unreadabledates.yaml deleted file mode 100644 index 99304e5a..00000000 --- a/tests/features/data/configs/unreadabledates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/unreadabledates.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/tests/features/data/configs/upgrade_from_195.json b/tests/features/data/configs/upgrade_from_195.json deleted file mode 100644 index ec380372..00000000 --- a/tests/features/data/configs/upgrade_from_195.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%Y-%m-%d %H:%M", -"linewrap": 80, -"encrypt": false, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal"}, -"tagsymbols": "@" -} diff --git a/tests/features/data/configs/upgrade_from_195_little_endian_dates.json b/tests/features/data/configs/upgrade_from_195_little_endian_dates.json deleted file mode 100644 index 7d3c470c..00000000 --- a/tests/features/data/configs/upgrade_from_195_little_endian_dates.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%d.%m.%Y %H:%M", -"linewrap": 80, -"encrypt": false, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/simple_jrnl-1-9-5_little_endian_dates.journal"}, -"tagsymbols": "@" -} diff --git a/tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json b/tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json deleted file mode 100644 index 5bbfb5b1..00000000 --- a/tests/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%Y-%m-%d %H:%M", -"linewrap": 80, -"encrypt": true, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/encrypted_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, -"tagsymbols": "@" -} diff --git a/tests/features/data/configs/upgrade_from_195_with_missing_journal.json b/tests/features/data/configs/upgrade_from_195_with_missing_journal.json deleted file mode 100644 index 8d456159..00000000 --- a/tests/features/data/configs/upgrade_from_195_with_missing_journal.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%Y-%m-%d %H:%M", -"linewrap": 80, -"encrypt": false, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, -"tagsymbols": "@" -} diff --git a/tests/features/environment.py b/tests/features/environment.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry b/tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry deleted file mode 100644 index 9721dd55..00000000 --- a/tests/features/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Creation Date - 2020-08-29T18:11:00Z - Starred - - Entry Text - Entry the first. -Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu -consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In -commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget -venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - -Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo -ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse -potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget -molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus -hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis -feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum -urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget -velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac -porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. - Time Zone - America/Los_Angeles - UUID - D04D335AFED711EABA18FAFFC2100C3D - Tags - - ipsum - tagone - tagtwo - - Creator - - Device Agent - - Generation Date - 2020-09-25T02:35:45Z - Host Name - iris.lan - OS Agent - Darwin/19.3.0 - Software Agent - jrnl/v2.4.5 - - - diff --git a/tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry b/tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry deleted file mode 100644 index 8c2f3c52..00000000 --- a/tests/features/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry +++ /dev/null @@ -1,55 +0,0 @@ - - - - - Creation Date - 2020-08-31T21:32:00Z - Starred - - Entry Text - A second entry in what I hope to be a long series. -Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo -vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, -vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, -eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id -lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, -egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. -Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. - -Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel -vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et -malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, -non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel -ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo -eros. - -Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non -tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. -Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum -quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum -interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. -Quisque auctor lacinia consectetur. - Time Zone - America/Los_Angeles - UUID - FC8A86CAFED711EA8892FAFFC2100C3D - Tags - - tagtwo - - Creator - - Device Agent - - Generation Date - 2020-09-25T02:36:59Z - Host Name - iris.lan - OS Agent - Darwin/19.3.0 - Software Agent - jrnl/v2.4.5 - - - diff --git a/tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry b/tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry deleted file mode 100644 index d998c36b..00000000 --- a/tests/features/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Creation Date - 2020-09-24T16:14:00Z - Starred - - Entry Text - The third entry finally after weeks without writing. -I'm so excited about emojis. 💯 🎶 💩 - -Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. -Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla -eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis -dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. -Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis -vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. -Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at -ante eget fringilla. @tagthree and also @tagone - Time Zone - America/Los_Angeles - UUID - FD8ABC8EFED711EABC35FAFFC2100C3D - Tags - - tagthree - tagone - - Creator - - Device Agent - - Generation Date - 2020-09-25T02:37:01Z - Host Name - iris.lan - OS Agent - Darwin/19.3.0 - Software Agent - jrnl/v2.4.5 - - - diff --git a/tests/features/journals/basic_encrypted.journal b/tests/features/journals/basic_encrypted.journal deleted file mode 100644 index ffc122df..00000000 --- a/tests/features/journals/basic_encrypted.journal +++ /dev/null @@ -1 +0,0 @@ -gAAAAABfb4gQBMqqGn_W8v_s7qCi14bX7inuCOKbsBqIUf7_ch14vTUp7lrysPFvhBp5vGijTwDIbk4LKoIISj8NwM31I8L0zEbMx9y6iyF_zseGGNxBvNN0wzAXa67bs-ohiQhhebcdIc_52sltxL2ELh8JAKUaXRwyapgnMgJ7z6deJppLK-B7RE7BiT0eKjWTDMd2x6cZDswvHs9opDp5yjuKWV5m7x6ggCKYgHT3savT9Tg7V0Fq6K3LGWaE59lCrqlAB0u6dnrDX3qcF4SKyckaniXzRShZGebdkUKDcLFun2V2syZwYQN772xjznIsJ16iXicox2uYKg8CnTefsyCwaOZyBvySGEy3CrlBiuIRIcxCtjKbYJ2B-Aq7LZitnBR7Ny_6_Wm8HsBf3N-cFCp4GShiCKrxuXKcOZ7vszG5EKb78JS85bb0mswU5CSdgp6UAHjIZqfJq00qQsViBCbXq3oklCPZXdQkOf5U0KpG2MVUiD-Zcn5Qj3gnUhSEr-5wKU9tWrE63MGPyE6KjZlArZX2W2LeGnW2CEYw9eREGon06AzLJ4mj3BgtjVWLIdGcCwORXvHRjUqazWgbEmXNVTbtp_cKnkW-rFzRBrUoVme9v-1Y3sH0VvHBq7QIj915VzBklzWs1qzIyTPZG5Db9LvdQ7SiV8slf1Jo7l-ayUUdVj6igvKZcgfB4RUHolJoMps5p4lZ5sPqv59KtSa8DCpuoRczIj71OCpuRVARZgy1m5sUD9xSMxOBdy46u1Jnry6iMtzXWI3mEZe5m7UhmW_L4Zcv4bbk8XjkBeHjPdgm2B69jkLmCBFecD5ztoGesCGt_pNo_sWSKqLHV1-coKFB2Nn__a4utU9NJNdeNRkr8_ahU6tn3jmaFjfQ7cKfrXG_NCcYBRX9fja8EQIeBEp_3TCoXQqhuV_bGsNPA2qL63Pt6YiRaUf1g9FNBqJRlKCSOYNixSXQZN_rTePzx0SQ0aIQhADWls62WX-LG5-byJcB6W2P_cH21hDOXkoNEIyLnCz9HQ6Yd6Fbv7298ps3F6jiUDdWES23zv8sDgBuKUN94qSN34j6MDYGFnGI9zsJ-Y-I2frdlLfWPx3pUL7afcKh1nRgXdjctsTSxU2BDrsu03eBz2IoZjoOR0U51IrNMOD1NNT3kctXxHLuOHSEkwAzS3doncQbdRLi5Gc1dQuOUa4sC-p8gVjUKXO-oi_49kp9Km2Ay9wFg0epBbXx2QMzyMsN2dXeSbHF-BDXD6sULaq5syC0fOHqaMLycTCMk2wLfNyXgEt05WvAiDn-LDsRdylMRW2hXp5HWq3Poaul-7VNg6UEMlwVfgJ-7hNreuO6IRtwmx6YdqMscw0ms6mU_MQZU_dTIPg3JU4KL0YyMqPBPSGNCx3gMp41O05Ubir45FoJSnT5Dkj4v3N0S87Ys3HuFLverASsGt9bkcSzd2uMKCJjkspemPPi9VhrY4IOO03DWSWbHmxYzFc1SJ-24WM8Ch404QKpe1qy5LNzFgLvDwQhSIHjluezHXqrD-DVh1lWNNY3WmHI2ubOZfaorvLKqzBPZ6AhpIa60rKjm0OZIQOmJwWXwkdnzut6m8PtoiLzRN897YMgeztf1nmDwp0xE-EhknVZ3WV3TeqgZJ5ykfHQ5BU8x0Db57-UtKSuesKbqPPdBe91OdsPpkGlyl6psHj1_gPm4nLvzXQePwiPaEemR_gYCWGPvl9l1ANJufgCV9qQTmZGof3fb9mjv-9lS-9l_m8KirPPRpSBToNeDtk50ceYUsOlDGzIyusppG9pOcIGyiln1IO5aZ8d4_1E83qjcHTSaKGizICZU7a-pt5STBPMesy3JgBm23A2jO4m68ayBRMcLnw_RirHvvBaj0C6UR2tac45F0Ob3PpXcvFuK0g54ziIAhzGqwF9I-LZ6asXQWMW4y4EBOak8JJBorkfztzfkMaIgGu-4ZoRKOkVfdr4uzcghk3r6KUxD4-nv1ioX69-G5RwhMHppYk7z8RXS1cq5FkvzXbfEQ-Uv6M-sx32DcUy9dH-ZYhc7UWm75JJfiNXLaXT_bsc6VqQ7KPkg2-RA7CywUFCW9S0S-XdO03VdwqlUVo7fp1SKywEfhZv_9bhDCdMJBwZmigv2KP9Iz7fF6LrpLwZkzHuQGFPcyTHFpsVIFrFyJjNYCXpET9y0Q5Vt4fnea5fy-9ZiCt3S8aS0YOFJ35_kM5i3ss8eFPL0v7fIQS3ZilzdGB3bWL0J7kppHN_ekHu-wVk3UZxauoFh7hXLjPcipua-FYUIklLjcK6DG1bYP7_q6OnkC8Jl650FNezeWPomHEv7l_DO3y0tjI6SGdWvL3ZJns7Xp3ew8KsCREAUO7ffqumD03uF9N-9uWbDDjM7rk0vcg0ggfOs9Ni725mxqYpu4R285XCOVWHDvw7iU6eAvE6ry8TDXQBbNgGjTuTYFYYli7GuOqMxFIe1op2s7sRnoJE8O0J76S6APhjhjcnZRSuONWkVG_5o83uFMPSF8DtqLwuRA5E8AGfIwAUcj324sw-DA0ixBGUqomb-osUIisv3x0b044xn-FvD-8R3PZDnPbPsao8XYNxfQWStrNcZSrX2Ua-WAcv9qbQ73_57RKW4pao4ajOu7K5800D231WGiIa6aJzDnFUlzXEzYxFQyx7qegkm_9rrEp_v8TC9mfAcjWX5DMrCkxUskx9YKDfpFYq4NuxO_414gReKzd-lmorfigvttgS10N1XD74SwFluXJv-bqTbI5-SuYAhDGMv1dqrn38i3rOMQqqnQomvaUJRprqxUsKz14sSE1Y-cNqq1FXzZ6vIJq-K3YTfFWPRLeqi6gHzqS_R2YBXXUduKuYgmakiVdP3bWc-Ca8WKh5sVi6P51MO-cS7i9AZWOaOz7F8PsB4JZxAJjSOr3NBmv3EEve9auTFCudRjfC6668I_NMHaTP5CCV4cuhuAxUuKUGgd6WFjDcvoYPyn_lu3bQiqD9MEag4CaJYI9PlraRv5mbqptwxv3pca7usd0GmXN_2No_nwxB4gVb48LsBBkH35njCa5iv2EKXUSOf0k3swaTSEahqbyI4EDzPXtU5uBO39iQzNpgfV_sUpnGdysjqueUVcdWGI_s5CnrNJ-_yDAY06AoXfLrjP8_3NXB2058xZ2rfmTNJNCULz9634dICJReXNnmplxIg3i6GbzFvjfNtqjrWr_iqBShyIwuOUJRbXzdJNggx2BDNG-PEWDXl89SaudFICkDvyZKEcATIss6ZXfULIMfCrqmWmFwgXfNEd9TuvjqoxFlLSaY4UfDMiYa_arUMblFfoo5nV07GANhUoQd-6HRe7LjYeX5VRodOx6ZmZjIAUq-DYr-hatJJFR2tjT_qZht2MJeYT3GZ3o54m8zBBt0JTN7HVpKaOaM3A2hEM_Ah0QZ-DkLDxtCzMuv987GDiLT2-Riya97a47yHIJhZFzFpflW2FcuC8RFWXlfUKTQfZkFmxh3MUekUuS4yu4Z121xojVswk_4P7-FqLaSnGT2epI69I_cvalRx3wjds9-5TFYqf4GridlFBRx6Fv2fpNB9Zvp9k7NQ9oYcPuXGLoXH5kmWBagPhEGKHA_pjFUZmCuwUIoeP4nP8lhFrX8OGezsbSBG773CRJzEdfcgAc5G-p6M_24WZLZHDrsVBAvgrNt6R9eQbEviWU28t_417QCp-or9qqt4OTKv1dp_4MlZh8YBg2-dtpvzSc1l5e4kQFJu7oWlpbgsjB6pl1oRRKp1maedX-gOAf559zC4l85gfEpPln9Cnl6xvERQzfO0Ey4q91SdsgK7i7FBrKKmi2wGiemFvnaQsrjZ_IFujLo8-2c8g9zTiyH1knyoVOAAnQxqGpsz6z6PNfSxr3_G8tOlNFTV-yqN_LdVHMgXtXjn3U9koGsfMulyUcBDdR3d_0Yn6iEjBt77tbxKi2ry-0gQrB1fdGsgKjyE_tMrW8D_lQz0IXsVOzd2ixsFVXMFzD6OOD8JldV0FbA-VDAS-Tp_ezIZVp6lRq54XBgvsjzDyOmOgDbSOQN6SQmvxPnIsml1wgmtm80z-9gHBqmimHBtLKB6L7CtLmmPICMS2pX3eWOmakxscxqs8AVjijJdz_NYNfcdBeDj_fhm6dqD6iwk3EBZZfsrmMGdXtAMqf1r9ng9tsz-FriXwQiJ3IM3loBsk5DKr9CcaJtKSPuwDDlRynD2vwcD-XyF6YTQdSJa9fEcq-qXya2Scj4mqQ4RDemJgErdradRfwJfII3fWHh18XxmYVqi9Bwn3YRgwEadyo0-HjbNq6vJXi12igmP99ciRAfMVQLjfUfTwoOHj44Y2Ru_hPjJcvB6FIn6KLrrCSrZnrshFdFn4L36z1CrS8fbtdvrG3kdZQxsUJnMqttuwKRpLnDWTWkIwj_GRBFrzCFgbwGp1XYhemxggyKVuhZPfyyTIM9rhlPth6eGyrpYfap24Av_mGPRBLnzcjtpGbACGdKQL034kVmI7yENGvmY40KSrWsVG_BE9bSJhx0EptFsT2IxnxbuFD4hGb4fFag9V0BDiKpUoOZqIVqVO8cAp-5w4twvWZKkrhu16JNlLoXWMoFANrw-tp5LKSin1CUeRa4LWVI1GR8tRkIad_GnCHRv9JEMswlNy9wi2sDNsSxWT7WNasUW5-glgK9pR7d2pXGGOWfHj1U6CKIqmAiO3iw8igzhvyx_dAxMxPo \ No newline at end of file diff --git a/tests/features/journals/basic_folder/2020/08/29.txt b/tests/features/journals/basic_folder/2020/08/29.txt deleted file mode 100644 index c8af54ca..00000000 --- a/tests/features/journals/basic_folder/2020/08/29.txt +++ /dev/null @@ -1,19 +0,0 @@ -[2020-08-29 11:11:00 AM] Entry the first. -Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu -consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In -commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget -venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - -Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo -ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse -potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget -molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus -hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis -feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum -urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget -velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac -porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. diff --git a/tests/features/journals/basic_folder/2020/08/31.txt b/tests/features/journals/basic_folder/2020/08/31.txt deleted file mode 100644 index 826e7cdb..00000000 --- a/tests/features/journals/basic_folder/2020/08/31.txt +++ /dev/null @@ -1,23 +0,0 @@ -[2020-08-31 02:32:00 PM] A second entry in what I hope to be a long series. * -Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo -vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, -vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, -eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id -lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, -egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. -Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. - -Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel -vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et -malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, -non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel -ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo -eros. - -Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non -tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. -Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum -quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum -interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. -Quisque auctor lacinia consectetur. diff --git a/tests/features/journals/basic_folder/2020/09/24.txt b/tests/features/journals/basic_folder/2020/09/24.txt deleted file mode 100644 index 2bd885ce..00000000 --- a/tests/features/journals/basic_folder/2020/09/24.txt +++ /dev/null @@ -1,11 +0,0 @@ -[2020-09-24 09:14:00 AM] The third entry finally after weeks without writing. -I'm so excited about emojis. 💯 🎶 💩 - -Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. -Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla -eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis -dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. -Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis -vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. -Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at -ante eget fringilla. @tagthree and also @tagone diff --git a/tests/features/journals/basic_onefile.journal b/tests/features/journals/basic_onefile.journal deleted file mode 100644 index 0d988049..00000000 --- a/tests/features/journals/basic_onefile.journal +++ /dev/null @@ -1,58 +0,0 @@ -[2020-08-29 11:11] Entry the first. - -Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu -consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In -commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget -venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - -Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo -ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse -potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget -molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus -hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis -feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum -urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget -velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac -porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. - -[2020-08-31 14:32] A second entry in what I hope to be a long series. * - -Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo -vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, -vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, -eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id -lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, -egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. -Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. - -Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel -vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et -malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, -non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel -ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo -eros. - -Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non -tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. -Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum -quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum -interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. -Quisque auctor lacinia consectetur. - -[2020-09-24 09:14] The third entry finally after weeks without writing. - -I'm so excited about emojis. 💯 🎶 💩 - -Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. -Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla -eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis -dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. -Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis -vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. -Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at -ante eget fringilla. @tagthree and also @tagone diff --git a/tests/features/journals/brackets.journal b/tests/features/journals/brackets.journal deleted file mode 100644 index 4649ea3e..00000000 --- a/tests/features/journals/brackets.journal +++ /dev/null @@ -1,2 +0,0 @@ -[2019-07-08 05:42] Entry subject -[1] line starting with 1 diff --git a/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry b/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry deleted file mode 100644 index 066821bb..00000000 --- a/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Creation Date - 2013-10-27T02:27:27Z - Creator - - Device Agent - iPhone/iPhone3,1 - Generation Date - 2013-10-27T07:02:27Z - Host Name - omrt104001 - OS Agent - iOS/7.0.3 - Software Agent - Day One (iOS)/1.11.4 - - Entry Text - Some text. - Location - - Administrative Area - Östergötlands län - Country - Sverige - Latitude - 58.383400000000000 - Locality - City - Longitude - 15.577170000000000 - Place Name - Street - - Starred - - Time Zone - Europe/Stockholm - UUID - B40EE704E15846DE8D45C44118A4D511 - Weather - - Celsius - 12 - Description - Clear - Fahrenheit - 54 - IconName - sunnyn.png - - - diff --git a/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry b/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry deleted file mode 100644 index ea3efec5..00000000 --- a/tests/features/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry +++ /dev/null @@ -1,52 +0,0 @@ - - Creation Date - 2013-10-27T02:27:27Z - Creator - - Device Agent - iPhone/iPhone3,1 - Generation Date - 2013-10-27T07:02:27Z - Host Name - omrt104001 - OS Agent - iOS/7.0.3 - Software Agent - Day One (iOS)/1.11.4 - - Entry Text - This is not a valid plist. - Location - - Administrative Area - Östergötlands län - Country - Sverige - Latitude - 58.383400000000000 - Locality - City - Longitude - 15.577170000000000 - Place Name - Street - - Starred - - Time Zone - Europe/Stockholm - UUID - B40EE704E15846DE8D45C44118A4D511 - Weather - - Celsius - 12 - Description - Clear - Fahrenheit - 54 - IconName - sunnyn.png - - - diff --git a/tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry b/tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry deleted file mode 100644 index 426f1ea8..00000000 --- a/tests/features/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Activity - Stationary - Creation Date - 2019-12-30T21:28:54Z - Entry Text - - Starred - - UUID - 48A25033B34047C591160A4480197D8B - Creator - - Device Agent - PC - Generation Date - 2019-12-30T21:28:54Z - Host Name - LE-TREPORT - OS Agent - Microsoft Windows/10 Home - Software Agent - Journaley/2.1 - - Tags - - i_have_no_body - - - diff --git a/tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry b/tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry deleted file mode 100644 index 1ac26242..00000000 --- a/tests/features/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Creation Date - 2013-05-17T18:39:20Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:39:20Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This entry has tags! - Starred - - Tags - - work - PLaY - - Time Zone - America/Los_Angeles - UUID - 044F3747A38546168B572C2E3F217FA2 - - diff --git a/tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry b/tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry deleted file mode 100644 index 927de884..00000000 --- a/tests/features/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Creation Date - 2013-06-17T18:38:29Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:38:29Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This entry has a location. - Location - - Administrative Area - California - Country - Germany - Latitude - 52.4979764 - Locality - Berlin - Longitude - 13.2404758 - Place Name - Abandoned Spy Tower - - Starred - - Tags - - Time Zone - Europe/Berlin - UUID - 0BDDD6CDA43C4A9AA2681517CC35AD9D - - diff --git a/tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry b/tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry deleted file mode 100644 index 16260763..00000000 --- a/tests/features/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Creation Date - 2013-07-17T18:38:08Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:38:08Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This entry is starred! - Starred - - Tags - - Time Zone - America/Los_Angeles - UUID - 422BC895507944A291E6FC44FC6B8BFC - - diff --git a/tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry b/tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry deleted file mode 100644 index 9ebaf538..00000000 --- a/tests/features/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Creation Date - 2013-01-17T18:37:50Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:37:50Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This is a DayOne entry without Timezone. - Starred - - Tags - - UUID - 4BB1F46946AD439996C9B59DE7C4DDC1 - - diff --git a/tests/features/journals/dayone_empty.dayone/entries/empty.txt b/tests/features/journals/dayone_empty.dayone/entries/empty.txt deleted file mode 100644 index c86b8f66..00000000 --- a/tests/features/journals/dayone_empty.dayone/entries/empty.txt +++ /dev/null @@ -1 +0,0 @@ -This file exists to preserve the directory structure, but should be ignored by jrnl. diff --git a/tests/features/journals/deletion.journal b/tests/features/journals/deletion.journal deleted file mode 100644 index c0fa689d..00000000 --- a/tests/features/journals/deletion.journal +++ /dev/null @@ -1,5 +0,0 @@ -[2019-10-29 11:11] First entry. - -[2019-10-29 11:11] Second entry. - -[2019-10-29 11:13] Third entry. \ No newline at end of file diff --git a/tests/features/journals/deletion_filters.journal b/tests/features/journals/deletion_filters.journal deleted file mode 100644 index 9a3747db..00000000 --- a/tests/features/journals/deletion_filters.journal +++ /dev/null @@ -1,14 +0,0 @@ -[2019-10-01 08:00] It's just another day in October. -Not much to write about. - -[2020-01-01 08:00] Happy New Year! -So this is the New Year. @holidays - -[2020-03-01 08:00] It's just another day in March. -A stick, a stone, it's the end of the road. - -[2020-05-01 09:00] Happy May Day! -@holidays @springtime Several holidays fall on this date. - -[2020-05-02 12:10] Writing tests. * -@springtime They will help prevent bugs. diff --git a/tests/features/journals/empty_folder/empty b/tests/features/journals/empty_folder/empty deleted file mode 100644 index 175b82b5..00000000 --- a/tests/features/journals/empty_folder/empty +++ /dev/null @@ -1 +0,0 @@ -Nothing to see here diff --git a/tests/features/journals/encrypted.journal b/tests/features/journals/encrypted.journal deleted file mode 100644 index d2a5fcbe..00000000 --- a/tests/features/journals/encrypted.journal +++ /dev/null @@ -1 +0,0 @@ -gAAAAABVIHB7tnwKExG7aC5ZbAbBL9SG2oY2GENeoOJ22i1PZigOvCYvrQN3kpsu0KGr7ay5K-_46R5YFlqJvtQ8anPH2FSITsaZy-l5Lz_5quw3rmzhLwAR1tc0icgtR4MEpXEdsuQ7cyb12Xq-JLDrnATs0id5Vow9Ri_tE7Xe4BXgXaySn3aRPwWKoninVxVPVvETY3MXHSUEXV9OZ-pH5kYBLGYbLA== diff --git a/tests/features/journals/encrypted_jrnl-1-9-5.journal b/tests/features/journals/encrypted_jrnl-1-9-5.journal deleted file mode 100644 index 339b47baf9671f4550efeb9b6a0cfcd5032255d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du3(bJIGVsY(mXmoW-2hF&*L`0NbJTYlTUr8*^Qm97}8E^3^1bZ$P^M diff --git a/tests/features/journals/little_endian_dates.journal b/tests/features/journals/little_endian_dates.journal deleted file mode 100644 index d7492969..00000000 --- a/tests/features/journals/little_endian_dates.journal +++ /dev/null @@ -1,5 +0,0 @@ -[09.06.2013 15:39] My first entry. -Everything is alright - -[10.07.2013 15:40] Life is good. -But I'm better. diff --git a/tests/features/journals/markdown-headings-335.journal b/tests/features/journals/markdown-headings-335.journal deleted file mode 100644 index 30f592ef..00000000 --- a/tests/features/journals/markdown-headings-335.journal +++ /dev/null @@ -1,42 +0,0 @@ -[2015-04-14 13:23] Heading Test - -H1-1 -= - -H1-2 -=== - -H1-3 -============================ - -H2-1 -- - -H2-2 ---- - -H2-3 ----------------------------------- - -Horizontal Rules (ignore) - ---- - -=== - -# ATX H1 - -## ATX H2 - -### ATX H3 - -#### ATX H4 - -##### ATX H5 - -###### ATX H6 - -Stuff - -More stuff -more stuff again diff --git a/tests/features/journals/mostlyreadabledates.journal b/tests/features/journals/mostlyreadabledates.journal deleted file mode 100644 index bd211bf5..00000000 --- a/tests/features/journals/mostlyreadabledates.journal +++ /dev/null @@ -1,8 +0,0 @@ -[2019-07-18 14:23] Entry subject -Time machines are possible. I know, because I've built one in my garage. - -[2019-07-19 14:23] Entry subject -I'm going to activate the machine. Nobody knows what comes next after this. Or before this? - -[2019-07 14:23] Entry subject -I've crossed so many timelines. Is there any going back? diff --git a/tests/features/journals/multiline-tags.journal b/tests/features/journals/multiline-tags.journal deleted file mode 100644 index 1fb8706f..00000000 --- a/tests/features/journals/multiline-tags.journal +++ /dev/null @@ -1,7 +0,0 @@ -[2013-06-09 15:39] Multiple @line entry with @tags. -Tag with @punctuation. afterwards -@TagOnLineAloneWithOutPunctuation -@TagOnLineAloneWithPunctuation. -Text before @tag. And After. -@hi. Hello -hi Hello \ No newline at end of file diff --git a/tests/features/journals/multiline.journal b/tests/features/journals/multiline.journal deleted file mode 100644 index 294ed141..00000000 --- a/tests/features/journals/multiline.journal +++ /dev/null @@ -1,5 +0,0 @@ -[2013-06-09 15:39] Multiple line entry. -This is the first line. -This line doesn't have any ending punctuation - -There is a blank line above this. diff --git a/tests/features/journals/simple.journal b/tests/features/journals/simple.journal deleted file mode 100644 index 8336068e..00000000 --- a/tests/features/journals/simple.journal +++ /dev/null @@ -1,5 +0,0 @@ -[2013-06-09 15:39] My first entry. -Everything is alright - -[2013-06-10 15:40] Life is good. -But I'm better. diff --git a/tests/features/journals/simple_jrnl-1-9-5.journal b/tests/features/journals/simple_jrnl-1-9-5.journal deleted file mode 100644 index 7bb6c5ac..00000000 --- a/tests/features/journals/simple_jrnl-1-9-5.journal +++ /dev/null @@ -1,13 +0,0 @@ -2010-06-10 15:00 A life without chocolate is like a bad analogy. - -2013-06-10 15:40 He said "[this] is the best time to be alive". -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. - -[2019-08-03 12:55] Some chat log or something - -Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, -elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus -placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor -dui. diff --git a/tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal b/tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal deleted file mode 100644 index 328b23f4..00000000 --- a/tests/features/journals/simple_jrnl-1-9-5_little_endian_dates.journal +++ /dev/null @@ -1,13 +0,0 @@ -10.06.2010 15:00 A life without chocolate is like a bad analogy. - -10.06.2013 15:40 He said "[this] is the best time to be alive". -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. - -[03.08.2019 12:55] Some chat log or something - -Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, -elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus -placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor -dui. diff --git a/tests/features/journals/tags-216.journal b/tests/features/journals/tags-216.journal deleted file mode 100644 index 08b6d630..00000000 --- a/tests/features/journals/tags-216.journal +++ /dev/null @@ -1,2 +0,0 @@ -[2013-06-10 15:40] I programmed for @OS/2. -Almost makes me want to go back to @C++, though. (Still better than @C#). diff --git a/tests/features/journals/tags-237.journal b/tests/features/journals/tags-237.journal deleted file mode 100644 index be050652..00000000 --- a/tests/features/journals/tags-237.journal +++ /dev/null @@ -1,3 +0,0 @@ -[2014-07-22 11:11] This entry has an email. -@Newline tag should show as a tag. -Kyla's @email is kyla@clevelandunderdog.org and Guinness's is guinness@fortheloveofpits.org. diff --git a/tests/features/journals/tags.journal b/tests/features/journals/tags.journal deleted file mode 100644 index a28f3159..00000000 --- a/tests/features/journals/tags.journal +++ /dev/null @@ -1,8 +0,0 @@ -[2013-04-09 15:39] I have an @idea: -(1) write a command line @journal software -(2) ??? -(3) PROFIT! - -[2013-06-10 15:40] I met with @dan. -As alway's he shared his latest @idea on how to rule the world with me. -inst diff --git a/tests/features/journals/unreadabledates.journal b/tests/features/journals/unreadabledates.journal deleted file mode 100644 index 53ef1d60..00000000 --- a/tests/features/journals/unreadabledates.journal +++ /dev/null @@ -1,5 +0,0 @@ -[ashasd7zdskhz7asdkjasd] Entry subject -I've lost track of time. - -[sadfhakjsdf88sdf7sdff] Entry subject -Time has no meaning. diff --git a/tests/features/journals/work.journal b/tests/features/journals/work.journal deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/features/templates/extension.md b/tests/features/templates/extension.md deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 93482ce9..fb3b1da1 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -36,15 +36,15 @@ def working_dir(request): def set_config(config_file, temp_dir, working_dir): # Copy the config file over config_source = os.path.join( - working_dir, "features", "data", "configs", config_file + working_dir, "data", "configs", config_file ) config_dest = os.path.join(temp_dir.name, config_file) shutil.copy2(config_source, config_dest) # @todo make this only copy some journals over # Copy all of the journals over - journal_source = os.path.join(working_dir, "features", "data", "journals") - journal_dest = os.path.join(temp_dir.name, "features", "journals") + journal_source = os.path.join(working_dir, "data", "journals") + journal_dest = os.path.join(temp_dir.name, "journals") shutil.copytree(journal_source, journal_dest) # @todo get rid of this by using default config values From 3055cca76795e92e55b5e4044baf1a095fb1a6c5 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Feb 2021 18:38:27 -0800 Subject: [PATCH 0393/1132] Add tests for core feature to pytest-bdd - Implement "the output should contain" step Co-authored-by: Micah Jerome Ellison --- pyproject.toml | 4 ++++ tests/features/core.feature | 10 ++++++++++ tests/step_defs/conftest.py | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b8c4731e..37a2f6b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,10 @@ force_sort_within_sections = true [tool.pytest.ini_options] minversion = "6.0" +markers = [ + "todo", +] + [build-system] requires = ["poetry>=1.1"] diff --git a/tests/features/core.feature b/tests/features/core.feature index 67a73a12..4399341d 100644 --- a/tests/features/core.feature +++ b/tests/features/core.feature @@ -6,3 +6,13 @@ Feature: Functionality of jrnl outside of actually handling journals Then we should get no error Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" + Scenario: Running the diagnostic command + Given we use the config "simple.yaml" + When we run "jrnl --diagnostic" + Then the output should contain "jrnl" + And the output should contain "Python" + And the output should contain "OS" + + @todo + Scenario: Listing available journals + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index fb3b1da1..2e62c561 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -91,3 +91,10 @@ def matches_std_output(regex, cli_run): out = cli_run["stdout"] matches = re.findall(regex, out) assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" + + +@then(parse("the output should contain\n{text}")) +@then(parse('the output should contain "{text}"')) +def check_output_inline(text, cli_run): + assert text and text in cli_run['stdout'] + From 7657bd7221b8f42bff66e1896b867659045b26f5 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Feb 2021 19:10:22 -0800 Subject: [PATCH 0394/1132] Implement version-checking test - Add new step definition Co-authored-by: Micah Jerome Ellison --- tests/step_defs/conftest.py | 12 ++++++++++++ tests/step_defs/test_features.py | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 2e62c561..1ebfe974 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -5,6 +5,7 @@ import shutil import os import re import tempfile +import toml from pytest import fixture from pytest_bdd import given @@ -30,6 +31,11 @@ def temp_dir(): def working_dir(request): return os.path.join(request.config.rootpath, "tests") +@fixture +def toml_version(working_dir): + pyproject = os.path.join(working_dir, "..", "pyproject.toml") + pyproject_contents = toml.load(pyproject) + return pyproject_contents["tool"]["poetry"]["version"] # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @@ -98,3 +104,9 @@ def matches_std_output(regex, cli_run): def check_output_inline(text, cli_run): assert text and text in cli_run['stdout'] + +@then("the output should contain pyproject.toml version") +def check_output_version_inline(cli_run, toml_version): + out = cli_run['stdout'] + assert toml_version in out, toml_version + diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index d670f9c9..b93f2140 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -1,3 +1,19 @@ from pytest_bdd import scenarios +scenarios("../features/build.feature") scenarios("../features/core.feature") +# scenarios("../features/datetime.feature") +# scenarios("../features/delete.feature") +# scenarios("../features/encrypt.feature") +# scenarios("../features/file_storage.feature") +# scenarios("../features/format.feature") +# scenarios("../features/import.feature") +# scenarios("../features/multiple_journals.feature") +# scenarios("../features/password.feature") +# scenarios("../features/search.feature") +# scenarios("../features/star.feature") +# scenarios("../features/tag.feature") +# scenarios("../features/upgrade.feature") +# scenarios("../features/write.feature") + + From c500730ae646d747e49677fbbb38870c1f3d4533 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 12:28:48 -0800 Subject: [PATCH 0395/1132] Implement and add datetime tests - Deletes most of the datetime tests so that they can be re-added as they are implemented in pytest-bdd - Implements steps that check the journal and output for strings - Get rid of deployment tag (we're not using it, anyway) Co-authored-by: Micah Jerome Ellison --- tests/features/build.feature | 1 - tests/features/datetime.feature | 148 +------------------------------ tests/step_defs/conftest.py | 43 ++++++--- tests/step_defs/test_features.py | 4 +- 4 files changed, 36 insertions(+), 160 deletions(-) diff --git a/tests/features/build.feature b/tests/features/build.feature index 4725ea85..e9b47b49 100644 --- a/tests/features/build.feature +++ b/tests/features/build.feature @@ -1,6 +1,5 @@ Feature: Build process - @deployment_tests Scenario: Version numbers should stay in sync Given we use the config "simple.yaml" When we run "jrnl --version" diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 8fe335c9..cbb31ff4 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -5,151 +5,7 @@ Feature: Reading and writing to journal with custom date formats Given we use the config "simple.yaml" When we run "jrnl 2013-11-30 15:42: Project Started." Then we should see the message "Entry added" - And the journal should contain "[2013-11-30 15:42] Project Started." + When we run "jrnl -999" + Then the output should contain "2013-11-30 15:42 Project Started." - Scenario: Dates can be in the future - # https://github.com/jrnl-org/jrnl/issues/185 - Given we use the config "simple.yaml" - When we run "jrnl 26/06/2099: Planet? Earth. Year? 2099." - Then we should see the message "Entry added" - And the journal should contain "[2099-06-26 09:00] Planet?" - Scenario: Loading a sample journal with custom date - Given we use the config "little_endian_dates.yaml" - When we run "jrnl -n 2" - Then we should get no error - And the output should be - """ - 09.06.2013 15:39 My first entry. - | Everything is alright - - 10.07.2013 15:40 Life is good. - | But I'm better. - """ - - Scenario Outline: Writing an entry from command line with custom date - Given we use the config ".yaml" - When we run "jrnl " - Then we should see the message "Entry added" - When we run "jrnl -n 1" - Then the output should contain "" - - Examples: Day-first Dates - | config | input | output | - | little_endian_dates | 2020-09-19: My first entry. | 19.09.2020 09:00 My first entry. | - | little_endian_dates | 2020-08-09: My second entry. | 09.08.2020 09:00 My second entry. | - | little_endian_dates | 2020-02-29: Test. | 29.02.2020 09:00 Test. | - | little_endian_dates | 2019-02-29: Test. | 2019-02-29: Test. | - | little_endian_dates | 2020-08-32: Test. | 2020-08-32: Test. | - | little_endian_dates | 2032-02-01: Test. | 01.02.2032 09:00 Test. | - | little_endian_dates | 2020-01-01: Test. | 01.01.2020 09:00 Test. | - | little_endian_dates | 2020-12-31: Test. | 31.12.2020 09:00 Test. | - - Scenario Outline: Searching for dates with custom date - Given we use the config ".yaml" - When we run "jrnl -on '' --short" - Then the output should be "" - - Examples: Day-first Dates - | config | input | output | - | little_endian_dates | 2013-07-10 | 10.07.2013 15:40 Life is good. | - | little_endian_dates | june 9 2013 | 09.06.2013 15:39 My first entry. | - | little_endian_dates | july 10 2013 | 10.07.2013 15:40 Life is good. | - | little_endian_dates | june 2013 | 09.06.2013 15:39 My first entry. | - | little_endian_dates | july 2013 | 10.07.2013 15:40 Life is good. | - # @todo month alone with no year should work - # | little_endian_dates | june | 09.06.2013 15:39 My first entry. | - # | little_endian_dates | july | 10.07.2013 15:40 Life is good. | - - Scenario: Writing an entry at the prompt with custom date - Given we use the config "little_endian_dates.yaml" - When we run "jrnl" and enter "2013-05-10: I saw Elvis. He's alive." - Then we should get no error - And the journal should contain "[10.05.2013 09:00] I saw Elvis." - And the journal should contain "He's alive." - - Scenario: Viewing today's entries does not print the entire journal - # https://github.com/jrnl-org/jrnl/issues/741 - Given we use the config "simple.yaml" - When we run "jrnl -on today" - Then the output should not contain "Life is good" - And the output should not contain "But I'm better." - - Scenario Outline: Create entry using day of the week as entry date. - Given we use the config "simple.yaml" - When we run "jrnl : This is an entry on a ." - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should contain " at 9am" in the local time - And the output should contain "This is an entry on a ." - - Examples: Days of the week - | day | - | Monday | - | Tuesday | - | Wednesday | - | Thursday | - | Friday | - | Saturday | - | Sunday | - | sunday | - | sUndAy | - - Scenario Outline: Create entry using day of the week abbreviations as entry date. - Given we use the config "simple.yaml" - When we run "jrnl : This is an entry on a ." - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should contain " at 9am" in the local time - - Examples: Days of the week - | day | weekday | - | mon | Monday | - | tue | Tuesday | - | wed | Wednesday | - | thu | Thursday | - | fri | Friday | - | sat | Saturday | - | sun | Sunday | - - Scenario: Journals with unreadable dates should still be loaded - Given we use the config "unreadabledates.yaml" - When we run "jrnl -2" - Then the output should contain "I've lost track of time." - And the output should contain "Time has no meaning." - - Scenario: Journals with readable dates AND unreadable dates should still contain all data. - Given we use the config "mostlyreadabledates.yaml" - When we run "jrnl -3" - Then the output should contain "Time machines are possible." - Then the output should contain "I'm going to activate the machine." - And the output should contain "I've crossed so many timelines. Is there any going back?" - And the journal should have 3 entries - - Scenario: Update near-valid dates after journal is edited - Given we use the config "mostlyreadabledates.yaml" - When we run "jrnl 2222-08-19: I have made it exactly one month into the future." - Then the journal should contain "[2019-07-01 14:23] Entry subject" - - Scenario: Integers in square brackets should not be read as dates - Given we use the config "brackets.yaml" - When we run "jrnl -1" - Then the output should contain "[1] line starting with 1" - - # broken still - @skip - Scenario: Dayone entries without timezone information are interpreted in current timezone - Given we use the config "dayone.yaml" - When we run "jrnl -until 'feb 2013'" - Then we should get no error - And the output should contain "2013-01-17T18:37Z" in the local time - - Scenario: Loading entry with ambiguous time stamp in timezone-aware journal (like Dayone) - #https://github.com/jrnl-org/jrnl/issues/153 - Given we use the config "bug153.yaml" - When we run "jrnl -1" - Then we should get no error - And the output should be - """ - 2013-10-27 03:27 Some text. - """ diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 1ebfe974..a764d090 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -1,49 +1,60 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import shutil import os import re +import shutil import tempfile -import toml +from unittest.mock import patch -from pytest import fixture from pytest_bdd import given from pytest_bdd import then from pytest_bdd import when from pytest_bdd.parsers import parse -from unittest.mock import patch +from pytest import fixture +import toml from jrnl import __version__ -from jrnl.os_compat import split_args from jrnl.cli import cli +from jrnl.os_compat import split_args + # ----- FIXTURES ----- # @fixture def cli_run(): return {"status": 0, "stdout": None, "stderr": None} + @fixture def temp_dir(): return tempfile.TemporaryDirectory() + @fixture def working_dir(request): return os.path.join(request.config.rootpath, "tests") + @fixture def toml_version(working_dir): pyproject = os.path.join(working_dir, "..", "pyproject.toml") pyproject_contents = toml.load(pyproject) return pyproject_contents["tool"]["poetry"]["version"] + +@fixture +def read_journal(journal_name="default"): + configuration = load_config(context.config_path) + with open(configuration["journals"][journal_name]) as journal_file: + journal = journal_file.read() + return journal + + # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") def set_config(config_file, temp_dir, working_dir): # Copy the config file over - config_source = os.path.join( - working_dir, "data", "configs", config_file - ) + config_source = os.path.join(working_dir, "data", "configs", config_file) config_dest = os.path.join(temp_dir.name, config_file) shutil.copy2(config_source, config_dest) @@ -102,11 +113,23 @@ def matches_std_output(regex, cli_run): @then(parse("the output should contain\n{text}")) @then(parse('the output should contain "{text}"')) def check_output_inline(text, cli_run): - assert text and text in cli_run['stdout'] + assert text and text in cli_run["stdout"] @then("the output should contain pyproject.toml version") def check_output_version_inline(cli_run, toml_version): - out = cli_run['stdout'] + out = cli_run["stdout"] assert toml_version in out, toml_version + +@then(parse('we should see the message "{text}"')) +def check_message(text, cli_run): + out = cli_run["stderr"] + assert text in out, [text, out] + + +@then(parse('the journal should contain "{text}"')) +@then(parse('journal "{journal_name}" should contain "{text}"')) +def check_journal_content(context, text, journal_name="default"): + journal = read_journal(context, journal_name) + assert text in journal, journal diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index b93f2140..5426d0c0 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -2,7 +2,7 @@ from pytest_bdd import scenarios scenarios("../features/build.feature") scenarios("../features/core.feature") -# scenarios("../features/datetime.feature") +scenarios("../features/datetime.feature") # scenarios("../features/delete.feature") # scenarios("../features/encrypt.feature") # scenarios("../features/file_storage.feature") @@ -15,5 +15,3 @@ scenarios("../features/core.feature") # scenarios("../features/tag.feature") # scenarios("../features/upgrade.feature") # scenarios("../features/write.feature") - - From 7974f3026160caa9e6d0fe7e5fdb9c7d04e42f95 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 13:18:35 -0800 Subject: [PATCH 0396/1132] Make tests move into temp dir as they run This will prevent any unexpected files from showing up anywhere outside the temp dir Co-authored-by: Micah Jerome Ellison --- tests/features/datetime.feature | 22 ++++++++++++++++++++++ tests/step_defs/conftest.py | 20 +++++++++++++------- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index cbb31ff4..ca82e8c0 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -9,3 +9,25 @@ Feature: Reading and writing to journal with custom date formats Then the output should contain "2013-11-30 15:42 Project Started." + Scenario: Dates can be in the future + # https://github.com/jrnl-org/jrnl/issues/185 + Given we use the config "simple.yaml" + When we run "jrnl 26/06/2099: Planet? Earth. Year? 2099." + Then we should see the message "Entry added" + When we run "jrnl -999" + Then the output should contain "2099-06-26 09:00 Planet?" + + + Scenario: Loading a sample journal with custom date + Given we use the config "little_endian_dates.yaml" + When we run "jrnl -n 2" + Then we should get no error + When we run "jrnl -n 999" + Then the output should be + 09.06.2013 15:39 My first entry. + | Everything is alright + + 10.07.2013 15:40 Life is good. + | But I'm better. + + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index a764d090..0eec48ed 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -53,6 +53,9 @@ def read_journal(journal_name="default"): # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") def set_config(config_file, temp_dir, working_dir): + # Move into temp dir as cwd + os.chdir(temp_dir.name) + # Copy the config file over config_source = os.path.join(working_dir, "data", "configs", config_file) config_dest = os.path.join(temp_dir.name, config_file) @@ -61,7 +64,7 @@ def set_config(config_file, temp_dir, working_dir): # @todo make this only copy some journals over # Copy all of the journals over journal_source = os.path.join(working_dir, "data", "journals") - journal_dest = os.path.join(temp_dir.name, "journals") + journal_dest = os.path.join(temp_dir.name, "features", "journals") shutil.copytree(journal_source, journal_dest) # @todo get rid of this by using default config values @@ -116,6 +119,15 @@ def check_output_inline(text, cli_run): assert text and text in cli_run["stdout"] +@then(parse('the output should be "{expected_out}"')) +@then(parse("the output should be\n{expected_out}")) +def check_output(cli_run, expected_out): + expected_out = expected_out.strip() + actual_out = cli_run["stdout"].strip() + assert expected_out == actual_out, \ + f"Output does not match.\nExpected:\n{expected_out}\n---end---\nActual:\n{actual_out}\n---end---\n" + + @then("the output should contain pyproject.toml version") def check_output_version_inline(cli_run, toml_version): out = cli_run["stdout"] @@ -127,9 +139,3 @@ def check_message(text, cli_run): out = cli_run["stderr"] assert text in out, [text, out] - -@then(parse('the journal should contain "{text}"')) -@then(parse('journal "{journal_name}" should contain "{text}"')) -def check_journal_content(context, text, journal_name="default"): - journal = read_journal(context, journal_name) - assert text in journal, journal From e257194d177c8590accaef0c5f5f508c848028b7 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 14:00:40 -0800 Subject: [PATCH 0397/1132] Add scenario outline test to datetime - Allow config step to support scenario outlines - Add another datetime test - Get rid of read journal step since it doesn't work with other journal types (we should rely on jrnl knowing how to parse each jrnl type for better tests) Co-authored-by: Micah Jerome Ellison --- tests/features/datetime.feature | 17 +++++++++++++++++ tests/step_defs/conftest.py | 31 +++++++++++++------------------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index ca82e8c0..d28092ce 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -31,3 +31,20 @@ Feature: Reading and writing to journal with custom date formats | But I'm better. + Scenario Outline: Writing an entry from command line with custom date + Given we use the config "" + When we run "jrnl " + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should contain "" + + Examples: Day-first Dates + | config_file | command | output | + | little_endian_dates.yaml | 2020-09-19: My first entry. | 19.09.2020 09:00 My first entry. | + | little_endian_dates.yaml | 2020-08-09: My second entry. | 09.08.2020 09:00 My second entry. | + | little_endian_dates.yaml | 2020-02-29: Test. | 29.02.2020 09:00 Test. | + | little_endian_dates.yaml | 2019-02-29: Test. | 2019-02-29: Test. | + | little_endian_dates.yaml | 2020-08-32: Test. | 2020-08-32: Test. | + | little_endian_dates.yaml | 2032-02-01: Test. | 01.02.2032 09:00 Test. | + | little_endian_dates.yaml | 2020-01-01: Test. | 01.01.2020 09:00 Test. | + | little_endian_dates.yaml | 2020-12-31: Test. | 31.12.2020 09:00 Test. | diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 0eec48ed..99825ff8 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -42,16 +42,9 @@ def toml_version(working_dir): return pyproject_contents["tool"]["poetry"]["version"] -@fixture -def read_journal(journal_name="default"): - configuration = load_config(context.config_path) - with open(configuration["journals"][journal_name]) as journal_file: - journal = journal_file.read() - return journal - - # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") +@given('we use the config ""', target_fixture="config_path") def set_config(config_file, temp_dir, working_dir): # Move into temp dir as cwd os.chdir(temp_dir.name) @@ -77,7 +70,8 @@ def set_config(config_file, temp_dir, working_dir): return config_dest -@when(parse('we run "{command}"')) +@when(parse('we run "jrnl {command}"')) +@when('we run "jrnl "') def run(command, config_path, cli_run, capsys): args = split_args(command) status = 0 @@ -85,12 +79,12 @@ def run(command, config_path, cli_run, capsys): # fmt: off # see: https://github.com/psf/black/issues/664 with \ - patch("sys.argv", args), \ + patch("sys.argv", ['jrnl'] + args), \ patch("jrnl.config.get_config_path", side_effect=lambda: config_path), \ patch("jrnl.install.get_config_path", side_effect=lambda: config_path) \ : try: - cli(args[1:]) + cli(args) except SystemExit as e: status = e.code # fmt: on @@ -113,10 +107,11 @@ def matches_std_output(regex, cli_run): assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" -@then(parse("the output should contain\n{text}")) -@then(parse('the output should contain "{text}"')) -def check_output_inline(text, cli_run): - assert text and text in cli_run["stdout"] +@then(parse("the output should contain\n{output}")) +@then(parse('the output should contain "{output}"')) +@then('the output should contain ""') +def check_output_inline(output, cli_run): + assert output and output in cli_run["stdout"] @then(parse('the output should be "{expected_out}"')) @@ -124,8 +119,9 @@ def check_output_inline(text, cli_run): def check_output(cli_run, expected_out): expected_out = expected_out.strip() actual_out = cli_run["stdout"].strip() - assert expected_out == actual_out, \ - f"Output does not match.\nExpected:\n{expected_out}\n---end---\nActual:\n{actual_out}\n---end---\n" + assert ( + expected_out == actual_out + ), f"Output does not match.\nExpected:\n{expected_out}\n---end---\nActual:\n{actual_out}\n---end---\n" @then("the output should contain pyproject.toml version") @@ -138,4 +134,3 @@ def check_output_version_inline(cli_run, toml_version): def check_message(text, cli_run): out = cli_run["stderr"] assert text in out, [text, out] - From 6b096761e070f705ba810acfd41b68b0c4614b65 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 14:15:26 -0800 Subject: [PATCH 0398/1132] Re-enable test for windows on python 3.9 Co-authored-by: Micah Jerome Ellison --- .github/workflows/testing.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index c5015d5f..a90b939a 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -27,9 +27,6 @@ jobs: matrix: python-version: [ 3.7, 3.8, 3.9 ] os: [ ubuntu-latest, macos-latest, windows-latest ] - exclude: # Added for GitHub Actions PR problem 2020-12-19 -- remove later! - - os: windows-latest - python-version: 3.9 steps: - uses: actions/checkout@v2 From be05f96c2671104253a4bf21ec289fd76c31915c Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 15:12:17 -0800 Subject: [PATCH 0399/1132] Implement "the output should be" step - Add another datetime test Co-authored-by: Micah Jerome Ellison --- tests/features/datetime.feature | 19 +++++++++++++++++++ tests/step_defs/conftest.py | 11 +++++++++++ 2 files changed, 30 insertions(+) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index d28092ce..5c66b093 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -48,3 +48,22 @@ Feature: Reading and writing to journal with custom date formats | little_endian_dates.yaml | 2032-02-01: Test. | 01.02.2032 09:00 Test. | | little_endian_dates.yaml | 2020-01-01: Test. | 01.01.2020 09:00 Test. | | little_endian_dates.yaml | 2020-12-31: Test. | 31.12.2020 09:00 Test. | + + + Scenario Outline: Searching for dates with custom date + Given we use the config "" + When we run "jrnl " + Then the output should be "" + + Examples: Day-first Dates + | config_file | command | output | + | little_endian_dates.yaml | -on '2013-07-10' --short | 10.07.2013 15:40 Life is good. | + | little_endian_dates.yaml | -on 'june 9 2013' --short | 09.06.2013 15:39 My first entry. | + | little_endian_dates.yaml | -on 'july 10 2013' --short | 10.07.2013 15:40 Life is good. | + | little_endian_dates.yaml | -on 'june 2013' --short | 09.06.2013 15:39 My first entry. | + | little_endian_dates.yaml | -on 'july 2013' --short | 10.07.2013 15:40 Life is good. | + # @todo month alone with no year should work + # | little_endian_dates.yaml | -on 'june' --short | 09.06.2013 15:39 My first entry. | + # | little_endian_dates.yaml | -on 'july' --short | 10.07.2013 15:40 Life is good. | + + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 99825ff8..c6ad8d6a 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -114,6 +114,17 @@ def check_output_inline(output, cli_run): assert output and output in cli_run["stdout"] +@then(parse("the output should be\n{output}")) +@then(parse('the output should be "{output}"')) +@then('the output should be ""') +def test_check_output_inline(output, cli_run): + actual_out = cli_run["stdout"].strip() + output = output.strip() + assert ( + output and output == actual_out + ), f"Output does not match.\nExpected:\n{output}\n---end---\nActual:\n{actual_out}\n---end---\n" + + @then(parse('the output should be "{expected_out}"')) @then(parse("the output should be\n{expected_out}")) def check_output(cli_run, expected_out): From 74ae5f039b5e9d3c017f60296b253567d6229230 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 15:20:02 -0800 Subject: [PATCH 0400/1132] Rename test functions for clarity Co-authored-by: Micah Jerome Ellison --- tests/step_defs/conftest.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index c6ad8d6a..3c2c0287 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -19,6 +19,11 @@ from jrnl.cli import cli from jrnl.os_compat import split_args +# ----- UTILS ----- # +def failed_msg(msg, expected, actual): + return f"{msg}\nExpected:\n{expected}\n---end---\nActual:\n{actual}\n---end---\n" + + # ----- FIXTURES ----- # @fixture def cli_run(): @@ -45,7 +50,7 @@ def toml_version(working_dir): # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @given('we use the config ""', target_fixture="config_path") -def set_config(config_file, temp_dir, working_dir): +def we_use_the_config(config_file, temp_dir, working_dir): # Move into temp dir as cwd os.chdir(temp_dir.name) @@ -72,7 +77,7 @@ def set_config(config_file, temp_dir, working_dir): @when(parse('we run "jrnl {command}"')) @when('we run "jrnl "') -def run(command, config_path, cli_run, capsys): +def we_run(command, config_path, cli_run, capsys): args = split_args(command) status = 0 @@ -96,12 +101,12 @@ def run(command, config_path, cli_run, capsys): @then("we should get no error") -def no_error(cli_run): +def should_get_no_error(cli_run): assert cli_run["status"] == 0, cli_run["status"] @then(parse('the output should match "{regex}"')) -def matches_std_output(regex, cli_run): +def output_should_match(regex, cli_run): out = cli_run["stdout"] matches = re.findall(regex, out) assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" @@ -110,38 +115,28 @@ def matches_std_output(regex, cli_run): @then(parse("the output should contain\n{output}")) @then(parse('the output should contain "{output}"')) @then('the output should contain ""') -def check_output_inline(output, cli_run): +def output_should_contain(output, cli_run): assert output and output in cli_run["stdout"] @then(parse("the output should be\n{output}")) @then(parse('the output should be "{output}"')) @then('the output should be ""') -def test_check_output_inline(output, cli_run): +def output_should_be(output, cli_run): actual_out = cli_run["stdout"].strip() output = output.strip() assert ( output and output == actual_out - ), f"Output does not match.\nExpected:\n{output}\n---end---\nActual:\n{actual_out}\n---end---\n" - - -@then(parse('the output should be "{expected_out}"')) -@then(parse("the output should be\n{expected_out}")) -def check_output(cli_run, expected_out): - expected_out = expected_out.strip() - actual_out = cli_run["stdout"].strip() - assert ( - expected_out == actual_out - ), f"Output does not match.\nExpected:\n{expected_out}\n---end---\nActual:\n{actual_out}\n---end---\n" + ), failed_msg('Output does not match.', output, actual_out) @then("the output should contain pyproject.toml version") -def check_output_version_inline(cli_run, toml_version): +def output_should_contain_version(cli_run, toml_version): out = cli_run["stdout"] assert toml_version in out, toml_version @then(parse('we should see the message "{text}"')) -def check_message(text, cli_run): +def should_see_the_message(text, cli_run): out = cli_run["stderr"] assert text in out, [text, out] From 72170304efa14509df9f387ba292139dc626a0d1 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Feb 2021 18:41:07 -0800 Subject: [PATCH 0401/1132] Expand "we run" step in pytest-bdd - Add some necessary fixtures - Add datetime test - Implement "the output should not contain" step - Implement "the output should contain the date" step Co-authored-by: Micah Jerome Ellison --- tests/features/datetime.feature | 36 +++++++++++++++++++++++++++++++++ tests/step_defs/conftest.py | 30 ++++++++++++++++++++++++--- 2 files changed, 63 insertions(+), 3 deletions(-) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 5c66b093..0dd02b86 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -67,3 +67,39 @@ Feature: Reading and writing to journal with custom date formats # | little_endian_dates.yaml | -on 'july' --short | 10.07.2013 15:40 Life is good. | + Scenario: Writing an entry at the prompt with custom date + Given we use the config "little_endian_dates.yaml" + When we run "jrnl" and enter "2013-05-10: I saw Elvis. He's alive." + Then we should get no error + When we run "jrnl -999" + Then the output should contain "10.05.2013 09:00 I saw Elvis." + And the output should contain "He's alive." + + + Scenario: Viewing today's entries does not print the entire journal + # see: https://github.com/jrnl-org/jrnl/issues/741 + Given we use the config "simple.yaml" + When we run "jrnl -on today" + Then the output should not contain "Life is good" + And the output should not contain "But I'm better." + + + Scenario Outline: Create entry using day of the week as entry date. + Given we use the config "simple.yaml" + When we run "jrnl " + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should contain "" + Then the output should contain the date "" + + Examples: Days of the week + | command | output | date | + | Monday: entry on a monday | entry on a monday | monday at 9am | + | Tuesday: entry on a tuesday | entry on a tuesday | tuesday at 9am | + | Wednesday: entry on a wednesday | entry on a wednesday | wednesday at 9am | + | Thursday: entry on a thursday | entry on a thursday | thursday at 9am | + | Friday: entry on a friday | entry on a friday | friday at 9am | + | Saturday: entry on a saturday | entry on a saturday | saturday at 9am | + | Sunday: entry on a sunday | entry on a sunday | sunday at 9am | + | sunday: entry on a sunday | entry on a sunday | sunday at 9am | + | sUndAy: entry on a sunday | entry on a sunday | sunday at 9am | diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 3c2c0287..995b5154 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -47,6 +47,16 @@ def toml_version(working_dir): return pyproject_contents["tool"]["poetry"]["version"] +@fixture +def command(): + return '' + + +@fixture +def user_input(): + return '' + + # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @given('we use the config ""', target_fixture="config_path") @@ -77,7 +87,9 @@ def we_use_the_config(config_file, temp_dir, working_dir): @when(parse('we run "jrnl {command}"')) @when('we run "jrnl "') -def we_run(command, config_path, cli_run, capsys): +@when('we run "jrnl"') +@when(parse('we run "jrnl" and enter "{user_input}"')) +def we_run(command, config_path, user_input, cli_run, capsys): args = split_args(command) status = 0 @@ -85,8 +97,8 @@ def we_run(command, config_path, cli_run, capsys): # see: https://github.com/psf/black/issues/664 with \ patch("sys.argv", ['jrnl'] + args), \ - patch("jrnl.config.get_config_path", side_effect=lambda: config_path), \ - patch("jrnl.install.get_config_path", side_effect=lambda: config_path) \ + patch("sys.stdin.read", return_value=user_input) as mock_read, \ + patch("jrnl.install.get_config_path", return_value=config_path) \ : try: cli(args) @@ -119,6 +131,13 @@ def output_should_contain(output, cli_run): assert output and output in cli_run["stdout"] +@then(parse("the output should not contain\n{output}")) +@then(parse('the output should not contain "{output}"')) +@then('the output should not contain ""') +def output_should_contain(output, cli_run): + assert output not in cli_run["stdout"] + + @then(parse("the output should be\n{output}")) @then(parse('the output should be "{output}"')) @then('the output should be ""') @@ -130,6 +149,11 @@ def output_should_be(output, cli_run): ), failed_msg('Output does not match.', output, actual_out) +@then('the output should contain the date ""') +def output_should_contain(output, cli_run): + assert output and output in cli_run["stdout"] + + @then("the output should contain pyproject.toml version") def output_should_contain_version(cli_run, toml_version): out = cli_run["stdout"] From 7d04fb904a8698e872cb175ae0d16e9fcae10615 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 18:23:48 -0800 Subject: [PATCH 0402/1132] Add abbreviated weekday test Co-authored-by: Jonathan Wren --- tests/features/datetime.feature | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 0dd02b86..8191f772 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -103,3 +103,23 @@ Feature: Reading and writing to journal with custom date formats | Sunday: entry on a sunday | entry on a sunday | sunday at 9am | | sunday: entry on a sunday | entry on a sunday | sunday at 9am | | sUndAy: entry on a sunday | entry on a sunday | sunday at 9am | + + Scenario Outline: Create entry using day of the week as entry date. + Given we use the config "simple.yaml" + When we run "jrnl " + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should contain "" + Then the output should contain the date "" + + Examples: Days of the week + | command | output | date | + | Mon: entry on a monday | entry on a monday | monday at 9am | + | Tue: entry on a tuesday | entry on a tuesday | tuesday at 9am | + | Wed: entry on a wednesday | entry on a wednesday | wednesday at 9am | + | Thu: entry on a thursday | entry on a thursday | thursday at 9am | + | Fri: entry on a friday | entry on a friday | friday at 9am | + | Sat: entry on a saturday | entry on a saturday | saturday at 9am | + | Sun: entry on a sunday | entry on a sunday | sunday at 9am | + | sun: entry on a sunday | entry on a sunday | sunday at 9am | + | sUn: entry on a sunday | entry on a sunday | sunday at 9am | From 7e6dd354cf09faf3d641e7dff36f100d558b717c Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 18:26:21 -0800 Subject: [PATCH 0403/1132] Add unreadable date test Co-authored-by: Jonathan Wren --- tests/features/datetime.feature | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 8191f772..0bccfd65 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -123,3 +123,9 @@ Feature: Reading and writing to journal with custom date formats | Sun: entry on a sunday | entry on a sunday | sunday at 9am | | sun: entry on a sunday | entry on a sunday | sunday at 9am | | sUn: entry on a sunday | entry on a sunday | sunday at 9am | + + Scenario: Journals with unreadable dates should still be loaded + Given we use the config "unreadabledates.yaml" + When we run "jrnl -2" + Then the output should contain "I've lost track of time." + And the output should contain "Time has no meaning." From f686e2b9f0d9ad684c41fa2bff295ce0c45f11b3 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 18:40:56 -0800 Subject: [PATCH 0404/1132] Fix local config overwrite when running pytest bdd Co-authored-by: Jonathan Wren --- tests/step_defs/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 995b5154..4933a3eb 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -98,8 +98,9 @@ def we_run(command, config_path, user_input, cli_run, capsys): with \ patch("sys.argv", ['jrnl'] + args), \ patch("sys.stdin.read", return_value=user_input) as mock_read, \ - patch("jrnl.install.get_config_path", return_value=config_path) \ - : + patch("jrnl.install.get_config_path", return_value=config_path), \ + patch("jrnl.config.get_config_path", return_value=config_path) \ + : # @TODO: single point of truth for get_config_path (move from all calls from install to config) try: cli(args) except SystemExit as e: From 0c9b6cf85f5b91dca1913cd50d48cb1acd228c97 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 18:56:10 -0800 Subject: [PATCH 0405/1132] Add unreadable date test Co-authored-by: Jonathan Wren --- tests/data/journals/mostlyreadabledates.journal | 6 +++--- tests/features/datetime.feature | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/data/journals/mostlyreadabledates.journal b/tests/data/journals/mostlyreadabledates.journal index bd211bf5..625ebcf2 100644 --- a/tests/data/journals/mostlyreadabledates.journal +++ b/tests/data/journals/mostlyreadabledates.journal @@ -1,8 +1,8 @@ -[2019-07-18 14:23] Entry subject +[2019-07-18 14:23] The first entry Time machines are possible. I know, because I've built one in my garage. -[2019-07-19 14:23] Entry subject +[2019-07-19 14:23] The second entry I'm going to activate the machine. Nobody knows what comes next after this. Or before this? -[2019-07 14:23] Entry subject +[2019-07 14:23] The third entry I've crossed so many timelines. Is there any going back? diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 0bccfd65..c269c188 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -129,3 +129,11 @@ Feature: Reading and writing to journal with custom date formats When we run "jrnl -2" Then the output should contain "I've lost track of time." And the output should contain "Time has no meaning." + + Scenario: Journals with readable dates AND unreadable dates should still contain all data. + Given we use the config "mostlyreadabledates.yaml" + When we run "jrnl --short" + Then the output should be + 2019-07-01 14:23 The third entry + 2019-07-18 14:23 The first entry + 2019-07-19 14:23 The second entry From a529ee5d066c79cf3c9fccad8fdbe0c2d1dde66f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 19:01:59 -0800 Subject: [PATCH 0406/1132] Add another unreadable/readable date test Co-authored-by: Jonathan Wren --- tests/features/datetime.feature | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index c269c188..d6025a4a 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -137,3 +137,9 @@ Feature: Reading and writing to journal with custom date formats 2019-07-01 14:23 The third entry 2019-07-18 14:23 The first entry 2019-07-19 14:23 The second entry + + Scenario: Update near-valid dates after journal is edited + Given we use the config "mostlyreadabledates.yaml" + When we run "jrnl 2222-08-19: I have made it exactly one month into the future." + When we run "jrnl -2" + Then the output should contain "2019-07-19 14:23 The second entry" From 7ccadebca0c6c489e7717e1fcccbb69f7e2037fe Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 19:03:57 -0800 Subject: [PATCH 0407/1132] Finish migrating datetime.feature to pytest bdd Co-authored-by: Jonathan Wren --- tests/features/datetime.feature | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index d6025a4a..b0f9d2b0 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -143,3 +143,24 @@ Feature: Reading and writing to journal with custom date formats When we run "jrnl 2222-08-19: I have made it exactly one month into the future." When we run "jrnl -2" Then the output should contain "2019-07-19 14:23 The second entry" + + Scenario: Integers in square brackets should not be read as dates + Given we use the config "brackets.yaml" + When we run "jrnl -1" + Then the output should contain "[1] line starting with 1" + + # broken still + @skip + Scenario: Dayone entries without timezone information are interpreted in current timezone + Given we use the config "dayone.yaml" + When we run "jrnl -until 'feb 2013'" + Then we should get no error + And the output should contain "2013-01-17T18:37Z" in the local time + + Scenario: Loading entry with ambiguous time stamp in timezone-aware journal (like Dayone) + #https://github.com/jrnl-org/jrnl/issues/153 + Given we use the config "bug153.yaml" + When we run "jrnl -1" + Then we should get no error + And the output should be + 2013-10-27 03:27 Some text. From 8754837f157c4e02c931a6280756f58c1f32ce43 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 19:54:41 -0800 Subject: [PATCH 0408/1132] Add some functioning delete tests Co-authored-by: Jonathan Wren --- tests/features/delete.feature | 236 ++++--------------------------- tests/step_defs/conftest.py | 17 ++- tests/step_defs/test_features.py | 2 +- 3 files changed, 45 insertions(+), 210 deletions(-) diff --git a/tests/features/delete.feature b/tests/features/delete.feature index 2fc3f8f7..0613c826 100644 --- a/tests/features/delete.feature +++ b/tests/features/delete.feature @@ -1,229 +1,53 @@ Feature: Delete entries from journal Scenario Outline: Delete flag allows deletion of single entry - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -1" Then the output should contain "2020-09-24 09:14 The third entry finally" When we run "jrnl --delete" and enter - """ - N - N - Y - """ - Then we flush the output + N + N + Y When we run "jrnl -99 --short" Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo - + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + Scenario Outline: Backing out of interactive delete does not change journal - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl --delete -n 1" and enter - """ - N - """ - Then we flush the output + N When we run "jrnl -99 --short" Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. Examples: Configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + Scenario Outline: Delete flag with nonsense input deletes nothing (issue #932) - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl --delete asdfasdf" - Then we flush the output When we run "jrnl -99 --short" Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. Examples: Configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Delete flag with tag only deletes tagged entries - Given we use the config ".yaml" - When we run "jrnl --delete @ipsum" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - - Scenario Outline: Delete flag with multiple tags deletes all entries matching any of the tags - Given we use the config ".yaml" - When we run "jrnl --delete @ipsum @tagthree" and enter - """ - Y - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -and deletes boolean AND of tagged entries - Given we use the config ".yaml" - When we run "jrnl --delete -and @tagone @tagtwo" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -not does not delete entries from given tag - Given we use the config ".yaml" - When we run "jrnl --delete @tagone -not @ipsum" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -from search operator only deletes entries since that date - Given we use the config ".yaml" - When we run "jrnl --delete -from 2020-09-01" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -to only deletes entries up to specified date - Given we use the config ".yaml" - When we run "jrnl --delete -to 2020-08-31" and enter - """ - Y - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - - Scenario Outline: Delete flag with -starred only deletes starred entries - Given we use the config ".yaml" - When we run "jrnl --delete -starred" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -contains only entries containing expression - Given we use the config ".yaml" - When we run "jrnl --delete -contains dignissim" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | \ No newline at end of file diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 4933a3eb..2f81cd02 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -46,6 +46,10 @@ def toml_version(working_dir): pyproject_contents = toml.load(pyproject) return pyproject_contents["tool"]["poetry"]["version"] +@fixture +def password(): + return '' + @fixture def command(): @@ -56,7 +60,6 @@ def command(): def user_input(): return '' - # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @given('we use the config ""', target_fixture="config_path") @@ -85,11 +88,17 @@ def we_use_the_config(config_file, temp_dir, working_dir): return config_dest +@given(parse('we use the password "{pw}" if prompted'), target_fixture="password") +def use_password_forever(pw): + return pw + + @when(parse('we run "jrnl {command}"')) @when('we run "jrnl "') @when('we run "jrnl"') @when(parse('we run "jrnl" and enter "{user_input}"')) -def we_run(command, config_path, user_input, cli_run, capsys): +@when(parse('we run "jrnl {command}" and enter\n{user_input}')) +def we_run(command, config_path, user_input, cli_run, capsys, password): args = split_args(command) status = 0 @@ -97,7 +106,9 @@ def we_run(command, config_path, user_input, cli_run, capsys): # see: https://github.com/psf/black/issues/664 with \ patch("sys.argv", ['jrnl'] + args), \ - patch("sys.stdin.read", return_value=user_input) as mock_read, \ + patch("sys.stdin.read", side_effect=user_input.splitlines()) as mock_read, \ + patch("builtins.input", side_effect=user_input.splitlines()) as mock_read, \ + patch("getpass.getpass", side_effect=password.splitlines()) as mock_getpass, \ patch("jrnl.install.get_config_path", return_value=config_path), \ patch("jrnl.config.get_config_path", return_value=config_path) \ : # @TODO: single point of truth for get_config_path (move from all calls from install to config) diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index 5426d0c0..6afd5c84 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -3,7 +3,7 @@ from pytest_bdd import scenarios scenarios("../features/build.feature") scenarios("../features/core.feature") scenarios("../features/datetime.feature") -# scenarios("../features/delete.feature") +scenarios("../features/delete.feature") # scenarios("../features/encrypt.feature") # scenarios("../features/file_storage.feature") # scenarios("../features/format.feature") From 40a1a871cbed2f6afd520aaa464e347a4d2dc37f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 20:10:19 -0800 Subject: [PATCH 0409/1132] Migrate the rest of the delete tests from behave to pytest bdd Co-authored-by: Jonathan Wren --- tests/features/delete.feature | 135 +++++++++++++++++++++++++++++++++- 1 file changed, 132 insertions(+), 3 deletions(-) diff --git a/tests/features/delete.feature b/tests/features/delete.feature index 0613c826..f46ef866 100644 --- a/tests/features/delete.feature +++ b/tests/features/delete.feature @@ -19,7 +19,8 @@ Feature: Delete entries from journal | basic_encrypted.yaml | # | basic_folder.yaml | @todo # | basic_dayone.yaml | @todo - + + Scenario Outline: Backing out of interactive delete does not change journal Given we use the config "" When we run "jrnl --delete -n 1" and enter @@ -36,7 +37,7 @@ Feature: Delete entries from journal | basic_folder.yaml | | basic_dayone.yaml | - + Scenario Outline: Delete flag with nonsense input deletes nothing (issue #932) Given we use the config "" When we run "jrnl --delete asdfasdf" @@ -50,4 +51,132 @@ Feature: Delete entries from journal | config_file | | basic_onefile.yaml | | basic_folder.yaml | - | basic_dayone.yaml | \ No newline at end of file + | basic_dayone.yaml | + + + Scenario Outline: Delete flag with tag only deletes tagged entries + Given we use the config "" + When we run "jrnl --delete @ipsum" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with multiple tags deletes all entries matching any of the tags + Given we use the config "" + When we run "jrnl --delete @ipsum @tagthree" and enter + Y + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with -and deletes boolean AND of tagged entries + Given we use the config "" + When we run "jrnl --delete -and @tagone @tagtwo" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with -not does not delete entries from given tag + Given we use the config "" + When we run "jrnl --delete @tagone -not @ipsum" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with -from search operator only deletes entries since that date + Given we use the config "" + When we run "jrnl --delete -from 2020-09-01" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with -to only deletes entries up to specified date + Given we use the config "" + When we run "jrnl --delete -to 2020-08-31" and enter + Y + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with -starred only deletes starred entries + Given we use the config "" + When we run "jrnl --delete -starred" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + + Scenario Outline: Delete flag with -contains only entries containing expression + Given we use the config "" + When we run "jrnl --delete -contains dignissim" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo From 5ad5bac786e5d0a243c3c6ea0fcc99afd17549d4 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 20:11:26 -0800 Subject: [PATCH 0410/1132] Standardize line breaks in datetime tests Co-authored-by: Jonathan Wren --- tests/features/datetime.feature | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index b0f9d2b0..0a3f5155 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -104,6 +104,7 @@ Feature: Reading and writing to journal with custom date formats | sunday: entry on a sunday | entry on a sunday | sunday at 9am | | sUndAy: entry on a sunday | entry on a sunday | sunday at 9am | + Scenario Outline: Create entry using day of the week as entry date. Given we use the config "simple.yaml" When we run "jrnl " @@ -124,12 +125,14 @@ Feature: Reading and writing to journal with custom date formats | sun: entry on a sunday | entry on a sunday | sunday at 9am | | sUn: entry on a sunday | entry on a sunday | sunday at 9am | + Scenario: Journals with unreadable dates should still be loaded Given we use the config "unreadabledates.yaml" When we run "jrnl -2" Then the output should contain "I've lost track of time." And the output should contain "Time has no meaning." + Scenario: Journals with readable dates AND unreadable dates should still contain all data. Given we use the config "mostlyreadabledates.yaml" When we run "jrnl --short" @@ -138,17 +141,20 @@ Feature: Reading and writing to journal with custom date formats 2019-07-18 14:23 The first entry 2019-07-19 14:23 The second entry + Scenario: Update near-valid dates after journal is edited Given we use the config "mostlyreadabledates.yaml" When we run "jrnl 2222-08-19: I have made it exactly one month into the future." When we run "jrnl -2" Then the output should contain "2019-07-19 14:23 The second entry" + Scenario: Integers in square brackets should not be read as dates Given we use the config "brackets.yaml" When we run "jrnl -1" Then the output should contain "[1] line starting with 1" + # broken still @skip Scenario: Dayone entries without timezone information are interpreted in current timezone @@ -157,6 +163,7 @@ Feature: Reading and writing to journal with custom date formats Then we should get no error And the output should contain "2013-01-17T18:37Z" in the local time + Scenario: Loading entry with ambiguous time stamp in timezone-aware journal (like Dayone) #https://github.com/jrnl-org/jrnl/issues/153 Given we use the config "bug153.yaml" From 921ebdcdd53537741eda33ec945722f823368e20 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 27 Feb 2021 14:10:08 -0800 Subject: [PATCH 0411/1132] Update mocks in "we run" step Co-authored-by: Micah Jerome Ellison --- tests/step_defs/conftest.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 2f81cd02..031b96bd 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -60,6 +60,7 @@ def command(): def user_input(): return '' + # ----- STEPS ----- # @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @given('we use the config ""', target_fixture="config_path") @@ -106,8 +107,8 @@ def we_run(command, config_path, user_input, cli_run, capsys, password): # see: https://github.com/psf/black/issues/664 with \ patch("sys.argv", ['jrnl'] + args), \ - patch("sys.stdin.read", side_effect=user_input.splitlines()) as mock_read, \ - patch("builtins.input", side_effect=user_input.splitlines()) as mock_read, \ + patch("sys.stdin.read", side_effect=user_input.splitlines()) as mock_stdin, \ + patch("builtins.input", side_effect=user_input.splitlines()) as mock_input, \ patch("getpass.getpass", side_effect=password.splitlines()) as mock_getpass, \ patch("jrnl.install.get_config_path", return_value=config_path), \ patch("jrnl.config.get_config_path", return_value=config_path) \ @@ -118,10 +119,16 @@ def we_run(command, config_path, user_input, cli_run, capsys, password): status = e.code # fmt: on - cli_run["status"] = status captured = capsys.readouterr() + + cli_run["status"] = status cli_run["stdout"] = captured.out cli_run["stderr"] = captured.err + cli_run["mocks"] = { + "stdin": mock_stdin, + "input": mock_input, + "getpass": mock_getpass, + } @then("we should get no error") From 1c78a305354c0fb84ea36c8bd72d5443aea3c226 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 2 Mar 2021 19:32:02 -0800 Subject: [PATCH 0412/1132] Fix bug in makefile - Makefile no longer runs on virtual env modules - Update some function names so pyflakes doesn't error Co-authored-by: Micah Jerome Ellison --- Makefile | 2 +- tests/step_defs/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1c8a52a6..8130dade 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ format: ## Format files to match style lint: ## Check style with various tools poetry check - poetry run pyflakes . + poetry run pyflakes jrnl tests poetry run black --check --diff . test: lint ## Run unit tests and behave tests diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 031b96bd..6f86124b 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -153,7 +153,7 @@ def output_should_contain(output, cli_run): @then(parse("the output should not contain\n{output}")) @then(parse('the output should not contain "{output}"')) @then('the output should not contain ""') -def output_should_contain(output, cli_run): +def output_should_not_contain(output, cli_run): assert output not in cli_run["stdout"] @@ -169,7 +169,7 @@ def output_should_be(output, cli_run): @then('the output should contain the date ""') -def output_should_contain(output, cli_run): +def output_should_contain_date(output, cli_run): assert output and output in cli_run["stdout"] From fe018ee2412f629f093d41d03023b91f88f0b4c9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 2 Mar 2021 20:44:26 -0800 Subject: [PATCH 0413/1132] Implement test keyrings and add password tests - Implement TestKeyring - Implement NoKeyring - Implement FailedKeyring - Copy in `read_value_from_string` function from old tests (will probably rewrite this later) - Add fixtures for keyrings - Implement "we have a keyring" step - Implement step to check specific config values for tests Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 110 +----------------------------- tests/step_defs/conftest.py | 113 +++++++++++++++++++++++++++++-- tests/step_defs/test_features.py | 2 +- 3 files changed, 110 insertions(+), 115 deletions(-) diff --git a/tests/features/password.feature b/tests/features/password.feature index 332ba86e..304f51c5 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -4,113 +4,9 @@ Feature: Using the installed keyring Given we use the config "multiple.yaml" And we have a keyring When we run "jrnl simple --encrypt" and enter - """ - sabertooth - sabertooth - y - """ + sabertooth + sabertooth + Y Then the config for journal "simple" should have "encrypt" set to "bool:True" When we run "jrnl simple -n 1" Then the output should contain "2013-06-10 15:40 Life is good" - - Scenario: Encrypt journal with no keyring backend and do not store in keyring - Given we use the config "simple.yaml" - And we do not have a keyring - When we run "jrnl test entry" - And we run "jrnl --encrypt" and enter - """ - password - password - n - """ - Then we should get no error - And we should not see the message "Failed to retrieve keyring" - - Scenario: Encrypt journal with no keyring backend and do store in keyring - Given we use the config "simple.yaml" - And we do not have a keyring - When we run "jrnl test entry" - And we run "jrnl --encrypt" and enter - """ - password - password - y - """ - Then we should get no error - And we should not see the message "Failed to retrieve keyring" - # @todo add step to check contents of keyring - - @todo - Scenario: Open an encrypted journal with wrong password in keyring - # This should ask the user for the password after the keyring fails - - @todo - Scenario: Decrypt journal with password in keyring - - @todo - Scenario: Decrypt journal without a keyring - - Scenario: Encrypt journal when keyring exists but fails - Given we use the config "simple.yaml" - And we have a failed keyring - When we run "jrnl --encrypt" and enter - """ - this password will not be saved in keyring - this password will not be saved in keyring - y - """ - Then we should see the message "Failed to retrieve keyring" - And we should get no error - And we should be prompted for a password - And the config for journal "default" should have "encrypt" set to "bool:True" - - Scenario: Decrypt journal when keyring exists but fails - Given we use the config "encrypted.yaml" - And we have a failed keyring - When we run "jrnl --decrypt" and enter "bad doggie no biscuit" - Then we should see the message "Failed to retrieve keyring" - And we should get no error - And we should be prompted for a password - And we should see the message "Journal decrypted" - And the config for journal "default" should have "encrypt" set to "bool:False" - And the journal should have 2 entries - - Scenario: Open encrypted journal when keyring exists but fails - # This should ask the user for the password after the keyring fails - Given we use the config "encrypted.yaml" - And we have a failed keyring - When we run "jrnl -n 1" and enter "bad doggie no biscuit" - Then we should see the message "Failed to retrieve keyring" - And we should get no error - And we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" - - Scenario: Mistyping your password - Given we use the config "simple.yaml" - When we run "jrnl --encrypt" and enter - """ - swordfish - sordfish - """ - Then we should be prompted for a password - And we should see the message "Passwords did not match" - And the config for journal "default" should not have "encrypt" set - And the journal should have 2 entries - - Scenario: Mistyping your password, then getting it right - Given we use the config "simple.yaml" - When we run "jrnl --encrypt" and enter - """ - swordfish - sordfish - swordfish - swordfish - n - """ - Then we should be prompted for a password - And we should see the message "Passwords did not match" - And we should see the message "Journal encrypted" - And the config for journal "default" should have "encrypt" set to "bool:True" - When we run "jrnl -n 1" and enter "swordfish" - Then we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 6f86124b..2544c470 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -1,7 +1,12 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import ast import os +from collections import defaultdict +from keyring import backend +from keyring import set_keyring +from keyring import errors import re import shutil import tempfile @@ -16,14 +21,75 @@ import toml from jrnl import __version__ from jrnl.cli import cli +from jrnl.config import load_config from jrnl.os_compat import split_args +class TestKeyring(backend.KeyringBackend): + """A test keyring that just stores its values in a hash""" + + priority = 1 + keys = defaultdict(dict) + + def set_password(self, servicename, username, password): + self.keys[servicename][username] = password + + def get_password(self, servicename, username): + return self.keys[servicename].get(username) + + def delete_password(self, servicename, username): + self.keys[servicename][username] = None + + +class NoKeyring(backend.KeyringBackend): + """A keyring that simulated an environment with no keyring backend.""" + + priority = 2 + keys = defaultdict(dict) + + def set_password(self, servicename, username, password): + raise errors.NoKeyringError + + def get_password(self, servicename, username): + raise errors.NoKeyringError + + def delete_password(self, servicename, username): + raise errors.NoKeyringError + + +class FailedKeyring(backend.KeyringBackend): + """ + A keyring that cannot be retrieved. + """ + + priority = 2 + + def set_password(self, servicename, username, password): + raise errors.KeyringError + + def get_password(self, servicename, username): + raise errors.KeyringError + + def delete_password(self, servicename, username): + raise errors.KeyringError + + # ----- UTILS ----- # def failed_msg(msg, expected, actual): return f"{msg}\nExpected:\n{expected}\n---end---\nActual:\n{actual}\n---end---\n" +def read_value_from_string(string): + if string[0] == "{": + # Handle value being a dictionary + return ast.literal_eval(string) + + # Takes strings like "bool:true" or "int:32" and coerces them into proper type + t, value = string.split(":") + value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t](value) + return value + + # ----- FIXTURES ----- # @fixture def cli_run(): @@ -46,22 +112,38 @@ def toml_version(working_dir): pyproject_contents = toml.load(pyproject) return pyproject_contents["tool"]["poetry"]["version"] + @fixture def password(): - return '' + return "" @fixture def command(): - return '' + return "" @fixture def user_input(): - return '' + return "" + + +@fixture +def keyring(): + set_keyring(NoKeyring()) + + +@fixture +def config_data(config_path): + return load_config(config_path) # ----- STEPS ----- # +@given("we have a keyring", target_fixture="keyring") +def we_have_keyring(): + set_keyring(FailedKeyring()) + + @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @given('we use the config ""', target_fixture="config_path") def we_use_the_config(config_file, temp_dir, working_dir): @@ -99,10 +181,13 @@ def use_password_forever(pw): @when('we run "jrnl"') @when(parse('we run "jrnl" and enter "{user_input}"')) @when(parse('we run "jrnl {command}" and enter\n{user_input}')) -def we_run(command, config_path, user_input, cli_run, capsys, password): +def we_run(command, config_path, user_input, cli_run, capsys, password, keyring): args = split_args(command) status = 0 + if not password and user_input: + password = user_input + # fmt: off # see: https://github.com/psf/black/issues/664 with \ @@ -163,9 +248,9 @@ def output_should_not_contain(output, cli_run): def output_should_be(output, cli_run): actual_out = cli_run["stdout"].strip() output = output.strip() - assert ( - output and output == actual_out - ), failed_msg('Output does not match.', output, actual_out) + assert output and output == actual_out, failed_msg( + "Output does not match.", output, actual_out + ) @then('the output should contain the date ""') @@ -183,3 +268,17 @@ def output_should_contain_version(cli_run, toml_version): def should_see_the_message(text, cli_run): out = cli_run["stderr"] assert text in out, [text, out] + + +@then(parse('the config should have "{key}" set to')) +@then(parse('the config should have "{key}" set to "{value}"')) +@then(parse('the config for journal "{journal}" should have "{key}" set to "{value}"')) +def config_var(config_data, key, value="", journal=None): + value = read_value_from_string(value) + + configuration = config_data + if journal: + configuration = configuration["journals"][journal] + + assert key in configuration + assert configuration[key] == value diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index 6afd5c84..0860059b 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -9,7 +9,7 @@ scenarios("../features/delete.feature") # scenarios("../features/format.feature") # scenarios("../features/import.feature") # scenarios("../features/multiple_journals.feature") -# scenarios("../features/password.feature") +scenarios("../features/password.feature") # scenarios("../features/search.feature") # scenarios("../features/star.feature") # scenarios("../features/tag.feature") From d0f92113f4adb1d66d4f69bac7232c4f153d1b97 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 2 Mar 2021 20:56:55 -0800 Subject: [PATCH 0414/1132] Add no keyring encryption test to pytest-bdd Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/features/password.feature b/tests/features/password.feature index 304f51c5..cccb94ab 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -10,3 +10,15 @@ Feature: Using the installed keyring Then the config for journal "simple" should have "encrypt" set to "bool:True" When we run "jrnl simple -n 1" Then the output should contain "2013-06-10 15:40 Life is good" + + + Scenario: Encrypt journal with no keyring backend and do not store in keyring + Given we use the config "simple.yaml" + When we run "jrnl test entry" + And we run "jrnl --encrypt" and enter + password + password + n + Then we should get no error + And the output should not contain "Failed to retrieve keyring" + From 6b27126c37a460fffdf375c887db181231d1f91d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 2 Mar 2021 21:09:33 -0800 Subject: [PATCH 0415/1132] Implement password prompt steps in pytest-bdd - Scaffold some tests that will be added later - Add fixtures for journal name and keyring type - Add "we should be prompted for a password" step - Add "we should not be prompted for a password" step Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 38 +++++++++++++++++++++++++++++++++ tests/step_defs/conftest.py | 38 +++++++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 7 deletions(-) diff --git a/tests/features/password.feature b/tests/features/password.feature index cccb94ab..c8d885f6 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -22,3 +22,41 @@ Feature: Using the installed keyring Then we should get no error And the output should not contain "Failed to retrieve keyring" + + Scenario: Encrypt journal with no keyring backend and do store in keyring + Given we use the config "simple.yaml" + When we run "jrnl test entry" + And we run "jrnl --encrypt" and enter + password + password + y + Then we should get no error + And the output should not contain "Failed to retrieve keyring" + # @todo add step to check contents of keyring + + + @todo + Scenario: Open an encrypted journal with wrong password in keyring + # This should ask the user for the password after the keyring fails + + + @todo + Scenario: Decrypt journal with password in keyring + + + @todo + Scenario: Decrypt journal without a keyring + + + Scenario: Encrypt journal when keyring exists but fails + Given we use the config "simple.yaml" + And we have a failed keyring + When we run "jrnl --encrypt" and enter + this password will not be saved in keyring + this password will not be saved in keyring + y + Then we should see the message "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And the config for journal "default" should have "encrypt" set to "bool:True" + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 2544c470..e8309b69 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -133,15 +133,28 @@ def keyring(): set_keyring(NoKeyring()) +@fixture +def keyring_type(): + return "default" + + @fixture def config_data(config_path): return load_config(config_path) +@fixture +def journal_name(): + return None + # ----- STEPS ----- # @given("we have a keyring", target_fixture="keyring") -def we_have_keyring(): - set_keyring(FailedKeyring()) +@given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") +def we_have_type_of_keyring(keyring_type): + if keyring_type == "failed": + set_keyring(FailedKeyring()) + else: + set_keyring(TestKeyring()) @given(parse('we use the config "{config_file}"'), target_fixture="config_path") @@ -270,15 +283,26 @@ def should_see_the_message(text, cli_run): assert text in out, [text, out] -@then(parse('the config should have "{key}" set to')) +@then(parse('the config should have "{key}" set to\n{value}')) @then(parse('the config should have "{key}" set to "{value}"')) -@then(parse('the config for journal "{journal}" should have "{key}" set to "{value}"')) -def config_var(config_data, key, value="", journal=None): +@then(parse('the config for journal "{journal_name}" should have "{key}" set to "{value}"')) +def config_var(config_data, key, value, journal_name): value = read_value_from_string(value) configuration = config_data - if journal: - configuration = configuration["journals"][journal] + if journal_name: + configuration = configuration["journals"][journal_name] assert key in configuration assert configuration[key] == value + + +@then("we should be prompted for a password") +def password_was_called(cli_run): + assert cli_run["mocks"]["getpass"].called + + +@then("we should not be prompted for a password") +def password_was_not_called(cli_run): + assert not cli_run["mocks"]["getpass"].called + From 10b604ef8923c05fefaaaf0e641558dcf9b3db8a Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 6 Mar 2021 12:03:05 -0800 Subject: [PATCH 0416/1132] Add more password tests to pytest-bdd - Fix some input handling in steps (especially for passwords) - Fix some formatting issues Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 17 +++++++++++++++++ tests/step_defs/conftest.py | 34 ++++++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/tests/features/password.feature b/tests/features/password.feature index c8d885f6..a5cbb0e1 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -60,3 +60,20 @@ Feature: Using the installed keyring And we should be prompted for a password And the config for journal "default" should have "encrypt" set to "bool:True" + + Scenario: Decrypt journal when keyring exists but fails + Given we use the config "encrypted.yaml" + And we have a failed keyring + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl --decrypt" + Then the error output should contain "Failed to retrieve keyring" + And we should get no error + And we should be prompted for a password + And we should see the message "Journal decrypted" + And the config for journal "default" should have "encrypt" set to "bool:False" + When we run "jrnl --short" + Then we should not be prompted for a password + And the output should be + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index e8309b69..c1046ef3 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -147,6 +147,12 @@ def config_data(config_path): def journal_name(): return None + +@fixture +def output_to_error(): + return False + + # ----- STEPS ----- # @given("we have a keyring", target_fixture="keyring") @given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") @@ -198,6 +204,12 @@ def we_run(command, config_path, user_input, cli_run, capsys, password, keyring) args = split_args(command) status = 0 + if user_input: + user_input = user_input.splitlines() + + if password: + password = password.splitlines() + if not password and user_input: password = user_input @@ -205,9 +217,9 @@ def we_run(command, config_path, user_input, cli_run, capsys, password, keyring) # see: https://github.com/psf/black/issues/664 with \ patch("sys.argv", ['jrnl'] + args), \ - patch("sys.stdin.read", side_effect=user_input.splitlines()) as mock_stdin, \ - patch("builtins.input", side_effect=user_input.splitlines()) as mock_input, \ - patch("getpass.getpass", side_effect=password.splitlines()) as mock_getpass, \ + patch("sys.stdin.read", side_effect=user_input) as mock_stdin, \ + patch("builtins.input", side_effect=user_input) as mock_input, \ + patch("getpass.getpass", side_effect=password) as mock_getpass, \ patch("jrnl.install.get_config_path", return_value=config_path), \ patch("jrnl.config.get_config_path", return_value=config_path) \ : # @TODO: single point of truth for get_config_path (move from all calls from install to config) @@ -244,8 +256,13 @@ def output_should_match(regex, cli_run): @then(parse("the output should contain\n{output}")) @then(parse('the output should contain "{output}"')) @then('the output should contain ""') -def output_should_contain(output, cli_run): - assert output and output in cli_run["stdout"] +@then(parse("the {output_to_error} output should contain\n{output}")) +@then(parse('the {output_to_error} output should contain "{output}"')) +def output_should_contain(output, output_to_error, cli_run): + assert output and ( + (output_to_error and output in cli_run["stderr"]) + or (not output_to_error and output in cli_run["stdout"]) + ) @then(parse("the output should not contain\n{output}")) @@ -285,7 +302,11 @@ def should_see_the_message(text, cli_run): @then(parse('the config should have "{key}" set to\n{value}')) @then(parse('the config should have "{key}" set to "{value}"')) -@then(parse('the config for journal "{journal_name}" should have "{key}" set to "{value}"')) +@then( + parse( + 'the config for journal "{journal_name}" should have "{key}" set to "{value}"' + ) +) def config_var(config_data, key, value, journal_name): value = read_value_from_string(value) @@ -305,4 +326,3 @@ def password_was_called(cli_run): @then("we should not be prompted for a password") def password_was_not_called(cli_run): assert not cli_run["mocks"]["getpass"].called - From c76ee8cd4fe2ce73533f11a8657c4501d034a663 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 6 Mar 2021 13:35:42 -0800 Subject: [PATCH 0417/1132] Add more password tests to pytest-bdd Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 12 ++++++++++++ tests/step_defs/conftest.py | 26 +++++++++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/tests/features/password.feature b/tests/features/password.feature index a5cbb0e1..23287b7c 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -77,3 +77,15 @@ Feature: Using the installed keyring 2013-06-09 15:39 My first entry. 2013-06-10 15:40 Life is good. + + Scenario: Open encrypted journal when keyring exists but fails + # This should ask the user for the password after the keyring fails + Given we use the config "encrypted.yaml" + And we have a failed keyring + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl -n 1" + Then we should get no error + And we should be prompted for a password + And the output should contain "Failed to retrieve keyring" + And the output should contain "2013-06-10 15:40 Life is good" + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index c1046ef3..e15f265f 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -149,8 +149,8 @@ def journal_name(): @fixture -def output_to_error(): - return False +def which_output_stream(): + return None # ----- STEPS ----- # @@ -256,13 +256,21 @@ def output_should_match(regex, cli_run): @then(parse("the output should contain\n{output}")) @then(parse('the output should contain "{output}"')) @then('the output should contain ""') -@then(parse("the {output_to_error} output should contain\n{output}")) -@then(parse('the {output_to_error} output should contain "{output}"')) -def output_should_contain(output, output_to_error, cli_run): - assert output and ( - (output_to_error and output in cli_run["stderr"]) - or (not output_to_error and output in cli_run["stdout"]) - ) +@then(parse("the {which_output_stream} output should contain\n{output}")) +@then(parse('the {which_output_stream} output should contain "{output}"')) +def output_should_contain(output, which_output_stream, cli_run): + assert output + if which_output_stream is None: + assert (output in cli_run["stdout"]) or (output in cli_run["stderr"]) + + elif which_output_stream == "standard": + assert output in cli_run["stdout"] + + elif which_output_stream == "error": + assert output in cli_run["stderr"] + + else: + assert output in cli_run[which_output_stream] @then(parse("the output should not contain\n{output}")) From e720430aa498634dd6c13d58434504a8b9f81eb4 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 20 Mar 2021 15:52:23 -0700 Subject: [PATCH 0418/1132] Implement "should" and "should not" handling - Handling should and should not like this should reduce the amount of fixtures we need for the test suite - Add more password tests Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 14 +++++++++++ tests/step_defs/conftest.py | 42 +++++++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/tests/features/password.feature b/tests/features/password.feature index 23287b7c..6cd2d2b6 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -89,3 +89,17 @@ Feature: Using the installed keyring And the output should contain "Failed to retrieve keyring" And the output should contain "2013-06-10 15:40 Life is good" + + Scenario: Mistyping your password + Given we use the config "simple.yaml" + When we run "jrnl --encrypt" and enter + swordfish + sordfish + Then we should be prompted for a password + And we should see the message "Passwords did not match" + And the config for journal "default" should not have "encrypt" set + When we run "jrnl --short" + Then the output should be + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index e15f265f..47aa7882 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -118,11 +118,21 @@ def password(): return "" +@fixture +def str_value(): + return "" + + @fixture def command(): return "" +@fixture +def should_not(): + return False + + @fixture def user_input(): return "" @@ -225,6 +235,9 @@ def we_run(command, config_path, user_input, cli_run, capsys, password, keyring) : # @TODO: single point of truth for get_config_path (move from all calls from install to config) try: cli(args) + except StopIteration: + # This happens when input is expected, but don't have any input left + pass except SystemExit as e: status = e.code # fmt: on @@ -308,22 +321,37 @@ def should_see_the_message(text, cli_run): assert text in out, [text, out] -@then(parse('the config should have "{key}" set to\n{value}')) -@then(parse('the config should have "{key}" set to "{value}"')) +@then(parse('the config should have "{key}" set to\n{str_value}')) +@then(parse('the config should have "{key}" set to "{str_value}"')) @then( parse( - 'the config for journal "{journal_name}" should have "{key}" set to "{value}"' + 'the config for journal "{journal_name}" should have "{key}" set to "{str_value}"' ) ) -def config_var(config_data, key, value, journal_name): - value = read_value_from_string(value) +@then(parse('the config should {should_not} have "{key}" set')) +@then(parse('the config should {should_not} have "{key}" set')) +@then( + parse( + 'the config for journal "{journal_name}" should {should_not} have "{key}" set' + ) +) +def config_var(config_data, key, str_value, journal_name, should_not): + str_value = read_value_from_string(str_value) if len(str_value) else str_value configuration = config_data if journal_name: configuration = configuration["journals"][journal_name] - assert key in configuration - assert configuration[key] == value + # is the config a string? + # @todo this should probably be a function + if type(configuration) is str: + configuration = {"journal": configuration} + + if should_not: + assert key not in configuration + else: + assert key in configuration + assert configuration[key] == str_value @then("we should be prompted for a password") From 3d3bd917009cde7d29e558e8108a72114269d55d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Apr 2021 14:06:53 -0700 Subject: [PATCH 0419/1132] Expand "we run" step to handling input better - Use regex parser in pytest-bdd to support "we run" steps that also have user input ("and enter") Co-authored-by: Micah Jerome Ellison --- tests/features/password.feature | 17 +++++++++++++++++ tests/step_defs/conftest.py | 6 ++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/features/password.feature b/tests/features/password.feature index 6cd2d2b6..d3116fed 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -103,3 +103,20 @@ Feature: Using the installed keyring 2013-06-09 15:39 My first entry. 2013-06-10 15:40 Life is good. + + Scenario: Mistyping your password, then getting it right + Given we use the config "simple.yaml" + When we run "jrnl --encrypt" and enter + swordfish + sordfish + swordfish + swordfish + n + Then we should be prompted for a password + And we should see the message "Passwords did not match" + And we should see the message "Journal encrypted" + And the config for journal "default" should have "encrypt" set to "bool:True" + When we run "jrnl -1" and enter "swordfish" + Then we should be prompted for a password + And the output should contain "2013-06-10 15:40 Life is good" + diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 47aa7882..dd08502f 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -16,6 +16,7 @@ from pytest_bdd import given from pytest_bdd import then from pytest_bdd import when from pytest_bdd.parsers import parse +from pytest_bdd import parsers from pytest import fixture import toml @@ -205,11 +206,12 @@ def use_password_forever(pw): return pw +@when(parse('we run "jrnl {command}" and enter\n{user_input}')) +@when(parsers.re('we run "jrnl (?P[^"]+)" and enter "(?P[^"]+)"')) @when(parse('we run "jrnl {command}"')) +@when(parse('we run "jrnl" and enter "{user_input}"')) @when('we run "jrnl "') @when('we run "jrnl"') -@when(parse('we run "jrnl" and enter "{user_input}"')) -@when(parse('we run "jrnl {command}" and enter\n{user_input}')) def we_run(command, config_path, user_input, cli_run, capsys, password, keyring): args = split_args(command) status = 0 From e2bb8cf0deb9f3e5fdfb482006bd45c280031c4c Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Apr 2021 14:15:43 -0700 Subject: [PATCH 0420/1132] Add encryption test to pytest-bdd - Clean up some formatting Co-authored-by: Micah Jerome Ellison --- tests/features/encrypt.feature | 21 ++++++++++++++------- tests/step_defs/test_features.py | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/features/encrypt.feature b/tests/features/encrypt.feature index f2d0a62f..b9b9ff5a 100644 --- a/tests/features/encrypt.feature +++ b/tests/features/encrypt.feature @@ -5,7 +5,11 @@ Feature: Encrypting and decrypting journals When we run "jrnl --decrypt" and enter "bad doggie no biscuit" Then the config for journal "default" should have "encrypt" set to "bool:False" And we should see the message "Journal decrypted" - And the journal should have 2 entries + When we run "jrnl -99 --short" + Then the output should be + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. + @todo Scenario: Trying to decrypt an already unencrypted journal @@ -13,20 +17,23 @@ Feature: Encrypting and decrypting journals Given we use the config "simple.yaml" When we run "jrnl --decrypt" Then the config for journal "default" should have "encrypt" set to "bool:False" - And the journal should have 2 entries + When we run "jrnl -99 --short" + Then the output should be + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. + @todo Scenario: Trying to encrypt an already encrypted journal # This should warn the user that the journal is already encrypted + Scenario: Encrypting a journal Given we use the config "simple.yaml" When we run "jrnl --encrypt" and enter - """ - swordfish - swordfish - n - """ + swordfish + swordfish + n Then we should see the message "Journal encrypted" And the config for journal "default" should have "encrypt" set to "bool:True" When we run "jrnl -n 1" and enter "swordfish" diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index 0860059b..d04928be 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -4,7 +4,7 @@ scenarios("../features/build.feature") scenarios("../features/core.feature") scenarios("../features/datetime.feature") scenarios("../features/delete.feature") -# scenarios("../features/encrypt.feature") +scenarios("../features/encrypt.feature") # scenarios("../features/file_storage.feature") # scenarios("../features/format.feature") # scenarios("../features/import.feature") From b8c7a7c7e560d7720bb4fcfb3583b080622fbf51 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Apr 2021 15:51:19 -0700 Subject: [PATCH 0421/1132] Add format tests to pytest-bdd - Implement cache dir fixture and step - Implement various steps to check the cache directory (files contained, etc) Co-authored-by: Micah Jerome Ellison --- tests/features/format.feature | 892 +++++++++++++++---------------- tests/step_defs/conftest.py | 123 ++++- tests/step_defs/test_features.py | 2 +- 3 files changed, 557 insertions(+), 460 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 4981f685..2ac5cdf2 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -1,7 +1,7 @@ Feature: Custom formats Scenario Outline: JSON format - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl --format json" Then we should get no error @@ -16,11 +16,11 @@ Feature: Custom formats And entry 3 should have an array "tags" with 2 elements Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario: Exporting dayone to json Given we use the config "dayone.yaml" @@ -30,43 +30,41 @@ Feature: Custom formats And the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" Scenario Outline: Printing a journal that has multiline entries with tags - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -n 1 @ipsum" Then we should get no error And the output should be - """ - 2020-08-29 11:11 Entry the first. - | Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada - | quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus - | pellentesque - | augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu - | consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In - | commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget - | venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - | - | Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo - | ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse - | potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget - | molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus - | hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis - | feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum - | urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget - | velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac - | porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per - | conubia nostra, per inceptos himenaeos. - """ + 2020-08-29 11:11 Entry the first. + | Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada + | quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus + | pellentesque + | augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu + | consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In + | commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget + | venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + | + | Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo + | ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse + | potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget + | molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus + | hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis + | feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum + | urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget + | velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac + | porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per + | conubia nostra, per inceptos himenaeos. Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Exporting using filters should only export parts of the journal - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -until 'August 2020' --format json" Then the output should be parsable as json @@ -80,392 +78,21 @@ Feature: Custom formats And entry 2 should have an array "tags" with 1 elements Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Exporting using custom templates - Given we use the config ".yaml" + Given we use the config "" And we load template "sample.template" And we use the password "test" if prompted When we run "jrnl -1 --format sample" Then the output should be - """ - The third entry finally after weeks without writing. - ---------------------------------------------------- + The third entry finally after weeks without writing. + ---------------------------------------------------- - I'm so excited about emojis. 💯 🎶 💩 - - Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. - Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla - eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis - dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. - Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis - vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. - Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at - ante eget fringilla. @tagthree and also @tagone - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Increasing Headings on Markdown export - Given we use the config ".yaml" - And we use the password "test" if prompted - When we open the editor and append - """ - [2020-10-14 13:23] Heading Test - - H1-1 - = - - H1-2 - === - - H1-3 - ============================ - - H2-1 - - - - H2-2 - --- - - H2-3 - ---------------------------------- - - Horizontal Rules (ignore) - - --- - - === - - # ATX H1 - - ## ATX H2 - - ### ATX H3 - - #### ATX H4 - - ##### ATX H5 - - ###### ATX H6 - - Stuff - - More stuff - more stuff again - """ - Then we flush the output - When we run "jrnl -1 --export markdown" - Then the output should be - """ - # 2020 - - ## October - - ### 2020-10-14 13:23 Heading Test - - #### H1-1 - - #### H1-2 - - #### H1-3 - - ##### H2-1 - - ##### H2-2 - - ##### H2-3 - - Horizontal Rules (ignore) - - --- - - === - - #### ATX H1 - - ##### ATX H2 - - ###### ATX H3 - - ####### ATX H4 - - ######## ATX H5 - - ######### ATX H6 - - Stuff - - More stuff - more stuff again - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | @todo - - Scenario Outline: Add a blank line to Markdown export if there isn't one already - # https://github.com/jrnl-org/jrnl/issues/768 - # https://github.com/jrnl-org/jrnl/issues/881 - Given we use the config ".yaml" - And we use the password "test" if prompted - When we open the editor and append - """ - [2020-10-29 11:11] First entry. - [2020-10-29 11:11] Second entry. - [2020-10-29 11:13] Third entry. - """ - Then we flush the output - When we run "jrnl -3 --format markdown" - Then the output should be - """ - # 2020 - - ## October - - ### 2020-10-29 11:11 First entry. - - - ### 2020-10-29 11:11 Second entry. - - - ### 2020-10-29 11:13 Third entry. - - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | @todo - - @skip - Scenario Outline: Exporting to XML - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --export xml" - Then the output should be a valid XML string - And "entries" node in the xml output should have 3 elements - And "tags" in the xml output should contain ["@ipsum", "@tagone", "@tagtwo", "@tagthree"] - And there should be 10 "tag" elements - - Examples: configs - | config | - # | basic_onefile | @todo - # | basic_encrypted | @todo - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario: Exporting to XML - Given we use the config "tags.yaml" - And we use the password "test" if prompted - When we run "jrnl --export xml" - Then the output should be a valid XML string - And "entries" node in the xml output should have 2 elements - And "tags" in the xml output should contain ["@idea", "@journal", "@dan"] - And there should be 7 "tag" elements - - Scenario Outline: Exporting tags - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --export tags" - Then the output should be - """ - @tagtwo : 2 - @tagone : 2 - @tagthree : 1 - @ipsum : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - @todo - Scenario Outline: Exporting fancy - # Needs better emoji support - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --export fancy" - Then the output should be - """ - ┎──────────────────────────────────────────────────────────────╮2020-08-29 11:11 - ┃ Entry the first. ╘═══════════════╕ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada │ - ┃ quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus │ - ┃ pellentesque │ - ┃ augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu │ - ┃ consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In │ - ┃ commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget │ - ┃ venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. │ - ┃ │ - ┃ Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo │ - ┃ ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. │ - ┃ Suspendisse │ - ┃ potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas │ - ┃ eget │ - ┃ molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed │ - ┃ lectus │ - ┃ hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis │ - ┃ feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, │ - ┃ vestibulum │ - ┃ urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod │ - ┃ enim. │ - ┃ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget │ - ┃ velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac │ - ┃ porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per │ - ┃ conubia nostra, per inceptos himenaeos. │ - ┖──────────────────────────────────────────────────────────────────────────────┘ - ┎──────────────────────────────────────────────────────────────╮2020-08-31 14:32 - ┃ A second entry in what I hope to be a long series. ╘═══════════════╕ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis │ - ┃ leo │ - ┃ vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit │ - ┃ amet, │ - ┃ consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl │ - ┃ lorem, │ - ┃ vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum │ - ┃ lectus, │ - ┃ eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium │ - ┃ id │ - ┃ lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, │ - ┃ egestas at efficitur et, ultrices vel est. Sed commodo et nibh non │ - ┃ elementum. │ - ┃ Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. │ - ┃ │ - ┃ Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel │ - ┃ vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum │ - ┃ et │ - ┃ malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis │ - ┃ sem, │ - ┃ non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel │ - ┃ ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a │ - ┃ commodo │ - ┃ eros. │ - ┃ │ - ┃ Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non │ - ┃ tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. │ - ┃ Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum │ - ┃ quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum │ - ┃ interdum. Integer id justo dui. Integer eu tellus in turpis bibendum │ - ┃ blandit. │ - ┃ Quisque auctor lacinia consectetur. │ - ┖──────────────────────────────────────────────────────────────────────────────┘ - ┎──────────────────────────────────────────────────────────────╮2020-09-24 09:14 - ┃ The third entry finally after weeks without writing. ╘═══════════════╕ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ I'm so excited about emojis. 💯 🎶 💩 │ - ┃ │ - ┃ Donec semper pellentesque iaculis. Nullam cursus et justo sit amet │ - ┃ venenatis. │ - ┃ Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. │ - ┃ Nulla │ - ┃ eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis │ - ┃ dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh │ - ┃ malesuada. │ - ┃ Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis │ - ┃ vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan │ - ┃ justo. │ - ┃ Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at │ - ┃ ante eget fringilla. @tagthree and also @tagone │ - ┖──────────────────────────────────────────────────────────────────────────────┘ - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - @skip_win - Scenario Outline: Export to yaml - Given we use the config ".yaml" - And we use the password "test" if prompted - And we create a cache directory - When we run "jrnl --export yaml -o {cache_dir}" - Then the cache should contain the files - """ - 2020-08-29_entry-the-first.md - 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md - 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md - """ - And the content of file "2020-08-29_entry-the-first.md" in the cache should be - """ - --- - title: Entry the first. - date: 2020-08-29 11:11 - starred: False - tags: tagone, ipsum, tagtwo - body: | - Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada - quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque - augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu - consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In - commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget - venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - - Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo - ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse - potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget - molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus - hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis - feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum - urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget - velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac - porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per - conubia nostra, per inceptos himenaeos. - ... - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | - - @skip_win # @todo YAML exporter does not correctly export emoji on Windows - Scenario Outline: Add a blank line to YAML export if there isn't one already - # https://github.com/jrnl-org/jrnl/issues/768 - # https://github.com/jrnl-org/jrnl/issues/881 - Given we use the config ".yaml" - And we use the password "test" if prompted - And we create a cache directory - When we run "jrnl --export yaml -o {cache_dir}" - Then the cache should contain the files - """ - 2020-08-29_entry-the-first.md - 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md - 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md - """ - And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in the cache should be - """ - --- - title: The third entry finally after weeks without writing. - date: 2020-09-24 09:14 - starred: False - tags: tagone, tagthree - body: | I'm so excited about emojis. 💯 🎶 💩 Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. @@ -475,16 +102,373 @@ Feature: Custom formats Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at - ante eget fringilla. @tagthree and also @tagone - ... - """ + ante eget fringilla. @tagthree and also @tagone Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | @todo + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + Scenario Outline: Increasing Headings on Markdown export + Given we use the config "" + And we use the password "test" if prompted + When we open the editor and append + [2020-10-14 13:23] Heading Test + + H1-1 + = + + H1-2 + === + + H1-3 + ============================ + + H2-1 + - + + H2-2 + --- + + H2-3 + ---------------------------------- + + Horizontal Rules (ignore) + + --- + + === + + # ATX H1 + + ## ATX H2 + + ### ATX H3 + + #### ATX H4 + + ##### ATX H5 + + ###### ATX H6 + + Stuff + + More stuff + more stuff again + Then we flush the output + When we run "jrnl -1 --export markdown" + Then the output should be + # 2020 + + ## October + + ### 2020-10-14 13:23 Heading Test + + #### H1-1 + + #### H1-2 + + #### H1-3 + + ##### H2-1 + + ##### H2-2 + + ##### H2-3 + + Horizontal Rules (ignore) + + --- + + === + + #### ATX H1 + + ##### ATX H2 + + ###### ATX H3 + + ####### ATX H4 + + ######## ATX H5 + + ######### ATX H6 + + Stuff + + More stuff + more stuff again + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + Scenario Outline: Add a blank line to Markdown export if there isn't one already + # https://github.com/jrnl-org/jrnl/issues/768 + # https://github.com/jrnl-org/jrnl/issues/881 + Given we use the config "" + And we use the password "test" if prompted + When we open the editor and append + [2020-10-29 11:11] First entry. + [2020-10-29 11:11] Second entry. + [2020-10-29 11:13] Third entry. + Then we flush the output + When we run "jrnl -3 --format markdown" + Then the output should be + # 2020 + + ## October + + ### 2020-10-29 11:11 First entry. + + + ### 2020-10-29 11:11 Second entry. + + + ### 2020-10-29 11:13 Third entry. + + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + @skip + Scenario Outline: Exporting to XML + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --export xml" + Then the output should be a valid XML string + And "entries" node in the xml output should have 3 elements + And "tags" in the xml output should contain + @ipsum + @tagone + @tagtwo + @tagthree + And there should be 10 "tag" elements + + Examples: configs + | config_file | + # | basic_onefile.yaml | @todo + # | basic_encrypted.yaml | @todo + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo + + Scenario: Exporting to XML + Given we use the config "tags.yaml" + And we use the password "test" if prompted + When we run "jrnl --export xml" + Then the output should be a valid XML string + And "entries" node in the xml output should have 2 elements + And "tags" in the xml output should contain + @idea + @journal + @dan + And there should be 7 "tag" elements + + Scenario Outline: Exporting tags + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --export tags" + Then the output should be + @tagtwo : 2 + @tagone : 2 + @tagthree : 1 + @ipsum : 1 + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + @todo + Scenario Outline: Exporting fancy + # Needs better emoji support + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --export fancy" + Then the output should be + ┎──────────────────────────────────────────────────────────────╮2020-08-29 11:11 + ┃ Entry the first. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada │ + ┃ quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus │ + ┃ pellentesque │ + ┃ augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu │ + ┃ consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In │ + ┃ commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget │ + ┃ venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. │ + ┃ │ + ┃ Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo │ + ┃ ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. │ + ┃ Suspendisse │ + ┃ potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas │ + ┃ eget │ + ┃ molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed │ + ┃ lectus │ + ┃ hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis │ + ┃ feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, │ + ┃ vestibulum │ + ┃ urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod │ + ┃ enim. │ + ┃ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget │ + ┃ velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac │ + ┃ porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per │ + ┃ conubia nostra, per inceptos himenaeos. │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + ┎──────────────────────────────────────────────────────────────╮2020-08-31 14:32 + ┃ A second entry in what I hope to be a long series. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis │ + ┃ leo │ + ┃ vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit │ + ┃ amet, │ + ┃ consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl │ + ┃ lorem, │ + ┃ vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum │ + ┃ lectus, │ + ┃ eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium │ + ┃ id │ + ┃ lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, │ + ┃ egestas at efficitur et, ultrices vel est. Sed commodo et nibh non │ + ┃ elementum. │ + ┃ Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. │ + ┃ │ + ┃ Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel │ + ┃ vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum │ + ┃ et │ + ┃ malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis │ + ┃ sem, │ + ┃ non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel │ + ┃ ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a │ + ┃ commodo │ + ┃ eros. │ + ┃ │ + ┃ Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non │ + ┃ tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. │ + ┃ Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum │ + ┃ quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum │ + ┃ interdum. Integer id justo dui. Integer eu tellus in turpis bibendum │ + ┃ blandit. │ + ┃ Quisque auctor lacinia consectetur. │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + ┎──────────────────────────────────────────────────────────────╮2020-09-24 09:14 + ┃ The third entry finally after weeks without writing. ╘═══════════════╕ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ I'm so excited about emojis. 💯 🎶 💩 │ + ┃ │ + ┃ Donec semper pellentesque iaculis. Nullam cursus et justo sit amet │ + ┃ venenatis. │ + ┃ Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. │ + ┃ Nulla │ + ┃ eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis │ + ┃ dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh │ + ┃ malesuada. │ + ┃ Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis │ + ┃ vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan │ + ┃ justo. │ + ┃ Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at │ + ┃ ante eget fringilla. @tagthree and also @tagone │ + ┖──────────────────────────────────────────────────────────────────────────────┘ + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + @skip_win + Scenario Outline: Export to yaml + Given we use the config "" + And we use the password "test" if prompted + And we create a cache directory + When we run "jrnl --format yaml --file {cache_dir}" + Then the cache directory should contain the files + 2020-08-29_entry-the-first.md + 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md + 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md + + And the content of file "2020-08-29_entry-the-first.md" in the cache should be + --- + title: Entry the first. + date: 2020-08-29 11:11 + starred: False + tags: tagone, ipsum, tagtwo + body: | + Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada + quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque + augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu + consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In + commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget + venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. + + Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo + ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse + potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget + molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus + hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis + feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum + urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget + velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac + porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per + conubia nostra, per inceptos himenaeos. + ... + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | + + @skip_win # @todo YAML exporter does not correctly export emoji on Windows + Scenario Outline: Add a blank line to YAML export if there isn't one already + # https://github.com/jrnl-org/jrnl/issues/768 + # https://github.com/jrnl-org/jrnl/issues/881 + Given we use the config "" + And we use the password "test" if prompted + And we create a cache directory + When we run "jrnl --export yaml -o {cache_dir}" + Then the cache should contain the files + 2020-08-29_entry-the-first.md + 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md + 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md + And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in the cache should be + --- + title: The third entry finally after weeks without writing. + date: 2020-09-24 09:14 + starred: False + tags: tagone, tagthree + body: | + I'm so excited about emojis. 💯 🎶 💩 + + Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. + Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla + eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis + dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. + Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis + vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. + Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at + ante eget fringilla. @tagthree and also @tagone + ... + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo Scenario: Empty DayOne entry bodies should not error # https://github.com/jrnl-org/jrnl/issues/780 @@ -493,36 +477,35 @@ Feature: Custom formats Then we should get no error Scenario Outline: --short displays the short version of entries (only the title) - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -on 2020-08-31 --short" Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: -s displays the short version of entries (only the title) - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -on 2020-08-31 -s" Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario: Markdown Support from config file Given we use the config "format_md.yaml" When we run "jrnl -n 1" Then the output should be - """ # 2013 ## June @@ -530,50 +513,43 @@ Feature: Custom formats ### 2013-06-10 15:40 Life is good. But I'm better. - """ Scenario: Text Formatter from config file Given we use the config "format_text.yaml" When we run "jrnl -n 1" Then the output should be - """ [2013-06-10 15:40] Life is good. But I'm better. - """ Scenario Outline: Exporting entries with Cyrillic characters to directory should not fail - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted And we create a cache directory When we run "jrnl 2020-11-21: Первая" When we run "jrnl --format md --file {cache_dir} -on 2020-11-21" Then the cache should contain the files - """ - 2020-11-21_первая.md - """ + 2020-11-21_первая.md Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Export date counts - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl 2020-08-31 01:01: Hi." And we run "jrnl --format dates" Then the output should be - """ - 2020-08-29, 1 - 2020-08-31, 2 - 2020-09-24, 1 - """ + 2020-08-29, 1 + 2020-08-31, 2 + 2020-09-24, 1 Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index dd08502f..e0c60a5e 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -7,10 +7,13 @@ from collections import defaultdict from keyring import backend from keyring import set_keyring from keyring import errors +import random +import string import re import shutil import tempfile from unittest.mock import patch +from xml.etree import ElementTree from pytest_bdd import given from pytest_bdd import then @@ -119,6 +122,11 @@ def password(): return "" +@fixture +def cache_dir(): + return {"exists": False, "path": ""} + + @fixture def str_value(): return "" @@ -212,7 +220,12 @@ def use_password_forever(pw): @when(parse('we run "jrnl" and enter "{user_input}"')) @when('we run "jrnl "') @when('we run "jrnl"') -def we_run(command, config_path, user_input, cli_run, capsys, password, keyring): +def we_run( + command, config_path, user_input, cli_run, capsys, password, keyring, cache_dir +): + if cache_dir["exists"]: + command = command.format(cache_dir=cache_dir["path"]) + args = split_args(command) status = 0 @@ -364,3 +377,111 @@ def password_was_called(cli_run): @then("we should not be prompted for a password") def password_was_not_called(cli_run): assert not cli_run["mocks"]["getpass"].called + + +@then(parse("the cache directory should contain the files\n{file_list}")) +def assert_dir_contains_files(file_list, cache_dir): + actual_files = os.listdir(cache_dir["path"]) + expected_files = file_list.split("\n") + + # sort to deal with inconsistent default file ordering on different OS's + actual_files.sort() + expected_files.sort() + + assert actual_files == expected_files, [actual_files, expected_files] + + +@given("we create a cache directory", target_fixture="cache_dir") +def create_cache_dir(temp_dir): + random_str = "".join(random.choices(string.ascii_uppercase + string.digits, k=20)) + + dir_path = os.path.join(temp_dir.name, "cache_" + random_str) + os.mkdir(dir_path) + return {"exists": True, "path": dir_path} + + +@then(parse('the content of file "{file_path}" in the cache should be\n{file_content}')) +def content_of_file_should_be(file_path, file_content, cache_dir): + assert cache_dir["exists"] + expected_content = file_content.strip().splitlines() + + with open(os.path.join(cache_dir["path"], file_path), "r") as f: + actual_content = f.read().strip().splitlines() + + for actual_line, expected_line in zip(actual_content, expected_content): + if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): + assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content + ) + else: + assert actual_line.strip() == expected_line.strip(), [ + [actual_line.strip(), expected_line.strip()], + [actual_content, expected_content], + ] + + +def assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content +): + actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) + expected_tags = set( + tag.strip() for tag in expected_line[len("tags: ") :].split(",") + ) + assert actual_tags == expected_tags, [ + [actual_tags, expected_tags], + [expected_content, actual_content], + ] + + +@then(parse("the cache should contain the files\n{file_list}")) +def cache_dir_contains_files(file_list, cache_dir): + assert cache_dir["exists"] + + actual_files = os.listdir(cache_dir["path"]) + expected_files = file_list.split("\n") + + # sort to deal with inconsistent default file ordering on different OS's + actual_files.sort() + expected_files.sort() + + assert actual_files == expected_files, [actual_files, expected_files] + + +@then("the output should be a valid XML string") +def assert_valid_xml_string(cli_run): + output = cli_run["stdout"] + xml_tree = ElementTree.fromstring(output) + assert xml_tree, output + + +@then(parse('"{item}" node in the xml output should have {number:d} elements')) +def assert_xml_output_entries_count(item, number, cli_run): + output = cli_run["stdout"] + xml_tree = ElementTree.fromstring(output) + + xml_tags = (node.tag for node in xml_tree) + assert item in xml_tags, str(list(xml_tags)) + + actual_entry_count = len(xml_tree.find(item)) + assert actual_entry_count == number, actual_entry_count + + +@then(parse('"tags" in the xml output should contain\n{expected_tags}')) +def assert_xml_output_tags(expected_tags, cli_run): + output = cli_run["stdout"] + expected_tags = expected_tags.split("\n") + + xml_tree = ElementTree.fromstring(output) + + xml_tags = (node.tag for node in xml_tree) + assert "tags" in xml_tags, str(list(xml_tags)) + + actual_tags = set(t.attrib["name"] for t in xml_tree.find("tags")) + assert actual_tags == set(expected_tags), [actual_tags, set(expected_tags)] + + +@then(parse('there should be {number:d} "{item}" elements')) +def count_elements(number, item, cli_run): + output = cli_run["stdout"] + xml_tree = ElementTree.fromstring(output) + assert len(xml_tree.findall(".//" + item)) == number diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index d04928be..145f8ed6 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -6,7 +6,7 @@ scenarios("../features/datetime.feature") scenarios("../features/delete.feature") scenarios("../features/encrypt.feature") # scenarios("../features/file_storage.feature") -# scenarios("../features/format.feature") +scenarios("../features/format.feature") # scenarios("../features/import.feature") # scenarios("../features/multiple_journals.feature") scenarios("../features/password.feature") From 3b044e3044e572f50a3f97a043e10f4911d07987 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 10 Apr 2021 12:19:49 -0700 Subject: [PATCH 0422/1132] Ignore IO errors on Windows Co-authored-by: Jonathan Wren --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 37a2f6b3..cb905a23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,12 @@ markers = [ "todo", ] +filterwarnings = [ + "ignore::DeprecationWarning", + "ignore:Flag style will be deprecated in.*", + "ignore:[WinError 32].*", + "ignore:[WinError 5].*" +] [build-system] requires = ["poetry>=1.1"] From ef6ed93ecdc8cbbaedf8937f0a2b0a34c755fe86 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 10 Apr 2021 12:43:51 -0700 Subject: [PATCH 0423/1132] Add JSON parsing test and combine it with XML parsing test Co-authored-by: Jonathan Wren --- tests/features/format.feature | 8 ++++---- tests/step_defs/conftest.py | 18 +++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 2ac5cdf2..8d3b0765 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -5,7 +5,7 @@ Feature: Custom formats And we use the password "test" if prompted When we run "jrnl --format json" Then we should get no error - And the output should be parsable as json + And the output should be valid JSON And "entries" in the json output should have 3 elements And "tags" in the json output should contain "@ipsum" And "tags" in the json output should contain "@tagone" @@ -26,7 +26,7 @@ Feature: Custom formats Given we use the config "dayone.yaml" When we run "jrnl --export json" Then we should get no error - And the output should be parsable as json + And the output should be valid JSON And the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" Scenario Outline: Printing a journal that has multiline entries with tags @@ -67,9 +67,9 @@ Feature: Custom formats Given we use the config "" And we use the password "test" if prompted When we run "jrnl -until 'August 2020' --format json" - Then the output should be parsable as json + Then the output should be valid JSON Then we should get no error - And the output should be parsable as json + And the output should be valid JSON And "entries" in the json output should have 2 elements And "tags" in the json output should contain "@ipsum" And "tags" in the json output should contain "@tagone" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index e0c60a5e..b9eeec20 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -2,6 +2,7 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html import ast +import json import os from collections import defaultdict from keyring import backend @@ -446,13 +447,16 @@ def cache_dir_contains_files(file_list, cache_dir): assert actual_files == expected_files, [actual_files, expected_files] - -@then("the output should be a valid XML string") -def assert_valid_xml_string(cli_run): - output = cli_run["stdout"] - xml_tree = ElementTree.fromstring(output) - assert xml_tree, output - +@then(parse("the output should be valid {language_name}")) +def assert_output_is_valid_language(cli_run, language_name): + language_name = language_name.upper() + if language_name == "XML": + xml_tree = ElementTree.fromstring(cli_run["stdout"]) + assert xml_tree, "Invalid XML" + elif language_name == "JSON": + assert json.loads(cli_run["stdout"]), "Invalid JSON" + else: + assert False, f"Language name {language_name} not recognized" @then(parse('"{item}" node in the xml output should have {number:d} elements')) def assert_xml_output_entries_count(item, number, cli_run): From 3cc3e387c5d90165390e921fddb5970324bef2ae Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 10 Apr 2021 14:26:23 -0700 Subject: [PATCH 0424/1132] Combine JSON and XML parsing tests Co-authored-by: Jonathan Wren --- tests/features/format.feature | 7 ++-- tests/step_defs/conftest.py | 66 +++++++++++++++++++++++++++-------- 2 files changed, 55 insertions(+), 18 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 8d3b0765..a06d4c95 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -265,9 +265,10 @@ Feature: Custom formats Given we use the config "tags.yaml" And we use the password "test" if prompted When we run "jrnl --export xml" - Then the output should be a valid XML string - And "entries" node in the xml output should have 2 elements - And "tags" in the xml output should contain + Then the output should be valid XML + Given we parse the output as XML + Then "entries" node in the parsed output should have 2 elements + And "tags" in the parsed output should be @idea @journal @dan diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index b9eeec20..1cc14f5a 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -173,6 +173,11 @@ def which_output_stream(): return None +@fixture +def parsed_output(): + return {"lang": None, "obj": None} + + # ----- STEPS ----- # @given("we have a keyring", target_fixture="keyring") @given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") @@ -447,6 +452,7 @@ def cache_dir_contains_files(file_list, cache_dir): assert actual_files == expected_files, [actual_files, expected_files] + @then(parse("the output should be valid {language_name}")) def assert_output_is_valid_language(cli_run, language_name): language_name = language_name.upper() @@ -458,30 +464,60 @@ def assert_output_is_valid_language(cli_run, language_name): else: assert False, f"Language name {language_name} not recognized" -@then(parse('"{item}" node in the xml output should have {number:d} elements')) -def assert_xml_output_entries_count(item, number, cli_run): + +@given(parse("we parse the output as {language_name}"), target_fixture="parsed_output") +def parse_output_as_language(cli_run, language_name): + language_name = language_name.upper() output = cli_run["stdout"] - xml_tree = ElementTree.fromstring(output) - xml_tags = (node.tag for node in xml_tree) - assert item in xml_tags, str(list(xml_tags)) + if language_name == "XML": + parsed_output = ElementTree.fromstring(output) + elif language_name == "JSON": + parsed_output = json.loads(output) + else: + assert False, f"Language name {language_name} not recognized" - actual_entry_count = len(xml_tree.find(item)) - assert actual_entry_count == number, actual_entry_count + return {"lang": language_name, "obj": parsed_output} -@then(parse('"tags" in the xml output should contain\n{expected_tags}')) -def assert_xml_output_tags(expected_tags, cli_run): - output = cli_run["stdout"] +@then(parse('"{node_name}" node in the parsed output should have {number:d} elements')) +def assert_parsed_output_item_count(node_name, number, parsed_output): + lang = parsed_output["lang"] + obj = parsed_output["obj"] + + if lang == "XML": + xml_node_names = (node.tag for node in obj) + assert node_name in xml_node_names, str(list(xml_node_names)) + + actual_entry_count = len(obj.find(node_name)) + assert actual_entry_count == number, actual_entry_count + + elif lang == "JSON": + assert node_name in obj, [node_name, obj] + assert len(obj[node_name]) == number, len(obj[node_name]) + + else: + assert False, f"Language name {lang} not recognized" + + +@then(parse('"tags" in the parsed output should be\n{expected_tags}')) +def assert_xml_output_tags(expected_tags, cli_run, parsed_output): + lang = parsed_output["lang"] + obj = parsed_output["obj"] expected_tags = expected_tags.split("\n") - xml_tree = ElementTree.fromstring(output) + if lang == "XML": + xml_node_names = (node.tag for node in obj) + assert "tags" in xml_node_names, str(list(xml_node_names)) - xml_tags = (node.tag for node in xml_tree) - assert "tags" in xml_tags, str(list(xml_tags)) + actual_tags = set(t.attrib["name"] for t in obj.find("tags")) + assert actual_tags == set(expected_tags), [actual_tags, set(expected_tags)] - actual_tags = set(t.attrib["name"] for t in xml_tree.find("tags")) - assert actual_tags == set(expected_tags), [actual_tags, set(expected_tags)] + elif lang == "JSON": + assert False, "JSON not implemented in this step" + + else: + assert False, f"Language name {lang} not recognized" @then(parse('there should be {number:d} "{item}" elements')) From 48c9d9fa166ed0a48adf719f5d447bdc5073b1df Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 10 Apr 2021 14:58:10 -0700 Subject: [PATCH 0425/1132] Implement tag tests in JSON Co-authored-by: Jonathan Wren --- tests/features/format.feature | 12 +++++++----- tests/step_defs/conftest.py | 26 ++++++++++++++++++-------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index a06d4c95..811e0d5e 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -6,11 +6,13 @@ Feature: Custom formats When we run "jrnl --format json" Then we should get no error And the output should be valid JSON - And "entries" in the json output should have 3 elements - And "tags" in the json output should contain "@ipsum" - And "tags" in the json output should contain "@tagone" - And "tags" in the json output should contain "@tagthree" - And "tags" in the json output should contain "@tagtwo" + Given we parse the output as JSON + Then "entries" node in the parsed output should have 3 elements + And "tags" in the parsed output should be + @ipsum + @tagone + @tagtwo + @tagthree And entry 1 should have an array "tags" with 3 elements And entry 2 should have an array "tags" with 1 elements And entry 3 should have an array "tags" with 2 elements diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 1cc14f5a..c7732656 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -499,23 +499,33 @@ def assert_parsed_output_item_count(node_name, number, parsed_output): else: assert False, f"Language name {lang} not recognized" - -@then(parse('"tags" in the parsed output should be\n{expected_tags}')) -def assert_xml_output_tags(expected_tags, cli_run, parsed_output): +@then(parse('"{field_name}" in the parsed output should be\n{expected_keys}')) +def assert_xml_output_tags(field_name, expected_keys, cli_run, parsed_output): lang = parsed_output["lang"] obj = parsed_output["obj"] - expected_tags = expected_tags.split("\n") + expected_keys = expected_keys.split("\n") if lang == "XML": xml_node_names = (node.tag for node in obj) - assert "tags" in xml_node_names, str(list(xml_node_names)) + assert field_name in xml_node_names, str(list(xml_node_names)) - actual_tags = set(t.attrib["name"] for t in obj.find("tags")) - assert actual_tags == set(expected_tags), [actual_tags, set(expected_tags)] + if field_name == "tags": + actual_tags = set(t.attrib["name"] for t in obj.find("tags")) + assert set(actual_tags) == set(expected_keys), [actual_tags, set(expected_keys)] + else: + assert False, "This test only works for tags in XML" elif lang == "JSON": - assert False, "JSON not implemented in this step" + my_obj = obj + for node in field_name.split("."): + try: + my_obj = my_obj[int(node)] + except ValueError: + assert field_name in my_obj + my_obj = my_obj[node] + + assert set(expected_keys) == set(my_obj) else: assert False, f"Language name {lang} not recognized" From 430182a0a55f0fd5ac6d8a800a71b46346737569 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 10 Apr 2021 15:26:26 -0700 Subject: [PATCH 0426/1132] Implement JSON tests and remove "node" nomenclature from tests Co-authored-by: Jonathan Wren --- tests/features/format.feature | 18 ++++++++++-------- tests/step_defs/conftest.py | 29 ++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 811e0d5e..9c38216f 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -7,15 +7,15 @@ Feature: Custom formats Then we should get no error And the output should be valid JSON Given we parse the output as JSON - Then "entries" node in the parsed output should have 3 elements + Then "entries" in the parsed output should have 3 elements And "tags" in the parsed output should be @ipsum @tagone @tagtwo @tagthree - And entry 1 should have an array "tags" with 3 elements - And entry 2 should have an array "tags" with 1 elements - And entry 3 should have an array "tags" with 2 elements + And "entries.0.tags" in the parsed output should have 3 elements + And "entries.1.tags" in the parsed output should have 1 elements + And "entries.2.tags" in the parsed output should have 2 elements Examples: configs | config_file | @@ -24,12 +24,14 @@ Feature: Custom formats | basic_folder.yaml | | basic_dayone.yaml | - Scenario: Exporting dayone to json + Scenario: Exporting dayone to json should include UUID Given we use the config "dayone.yaml" When we run "jrnl --export json" Then we should get no error And the output should be valid JSON - And the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" + Given we parse the output as JSON + Then "entries.0.uuid" in the parsed output should be + 4BB1F46946AD439996C9B59DE7C4DDC1 Scenario Outline: Printing a journal that has multiline entries with tags Given we use the config "" @@ -248,7 +250,7 @@ Feature: Custom formats And we use the password "test" if prompted When we run "jrnl --export xml" Then the output should be a valid XML string - And "entries" node in the xml output should have 3 elements + And "entries" in the xml output should have 3 elements And "tags" in the xml output should contain @ipsum @tagone @@ -269,7 +271,7 @@ Feature: Custom formats When we run "jrnl --export xml" Then the output should be valid XML Given we parse the output as XML - Then "entries" node in the parsed output should have 2 elements + Then "entries" in the parsed output should have 2 elements And "tags" in the parsed output should be @idea @journal diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index c7732656..7a651093 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -480,7 +480,7 @@ def parse_output_as_language(cli_run, language_name): return {"lang": language_name, "obj": parsed_output} -@then(parse('"{node_name}" node in the parsed output should have {number:d} elements')) +@then(parse('"{node_name}" in the parsed output should have {number:d} elements')) def assert_parsed_output_item_count(node_name, number, parsed_output): lang = parsed_output["lang"] obj = parsed_output["obj"] @@ -493,14 +493,23 @@ def assert_parsed_output_item_count(node_name, number, parsed_output): assert actual_entry_count == number, actual_entry_count elif lang == "JSON": - assert node_name in obj, [node_name, obj] - assert len(obj[node_name]) == number, len(obj[node_name]) + my_obj = obj + + for node in node_name.split("."): + try: + my_obj = my_obj[int(node)] + except ValueError: + assert node in my_obj + my_obj = my_obj[node] + + assert len(my_obj) == number, len(my_obj) else: assert False, f"Language name {lang} not recognized" + @then(parse('"{field_name}" in the parsed output should be\n{expected_keys}')) -def assert_xml_output_tags(field_name, expected_keys, cli_run, parsed_output): +def assert_output_field_content(field_name, expected_keys, cli_run, parsed_output): lang = parsed_output["lang"] obj = parsed_output["obj"] expected_keys = expected_keys.split("\n") @@ -511,7 +520,10 @@ def assert_xml_output_tags(field_name, expected_keys, cli_run, parsed_output): if field_name == "tags": actual_tags = set(t.attrib["name"] for t in obj.find("tags")) - assert set(actual_tags) == set(expected_keys), [actual_tags, set(expected_keys)] + assert set(actual_tags) == set(expected_keys), [ + actual_tags, + set(expected_keys), + ] else: assert False, "This test only works for tags in XML" @@ -522,10 +534,13 @@ def assert_xml_output_tags(field_name, expected_keys, cli_run, parsed_output): try: my_obj = my_obj[int(node)] except ValueError: - assert field_name in my_obj + assert node in my_obj, [my_obj.keys(), node] my_obj = my_obj[node] - assert set(expected_keys) == set(my_obj) + if type(my_obj) is str: + my_obj = [my_obj] + + assert set(expected_keys) == set(my_obj), [set(my_obj), set(expected_keys)] else: assert False, f"Language name {lang} not recognized" From 11e0e84dcf5f6f56afbb24a99f7654faa5ff8d33 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 19 Apr 2021 20:06:44 -0700 Subject: [PATCH 0427/1132] Fix test failing from lack of whitespace Co-authored-by: Jonathan Wren --- tests/features/format.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 9c38216f..d8454ce0 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -47,7 +47,7 @@ Feature: Custom formats | consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In | commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget | venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - | + | | Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo | ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse | potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget From 849ed16d67f163a14f210348d0808f8519e10842 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 19 Apr 2021 20:12:14 -0700 Subject: [PATCH 0428/1132] Install pytest-icdiff and run poetry lock Co-authored-by: Jonathan Wren --- poetry.lock | 41 ++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index e999d3af..34184977 100644 --- a/poetry.lock +++ b/poetry.lock @@ -174,6 +174,14 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "icdiff" +version = "1.9.1" +description = "improved colored diff" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "importlib-metadata" version = "4.5.0" @@ -382,6 +390,14 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] +[[package]] +name = "pprintpp" +version = "0.4.0" +description = "A drop-in replacement for pprint that's actually pretty" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "py" version = "1.10.0" @@ -453,6 +469,19 @@ py = "*" pytest = ">=4.3" six = ">=1.9.0" +[[package]] +name = "pytest-icdiff" +version = "0.5" +description = "use icdiff for better error messages in pytest assertions" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +icdiff = "*" +pprintpp = "*" +pytest = "*" + [[package]] name = "python-dateutil" version = "2.8.1" @@ -629,7 +658,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "4bb72b50e012bd9b58e47835e1fd5d767ce68ac869505f77bb6ad9d564dbf139" +content-hash = "a0d3f3e30dbe80528547b49ae7bb39c6c1a911e2552d8b10d409daf81cdb28d1" [metadata.files] ansiwrap = [ @@ -730,6 +759,9 @@ ghp-import = [ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] +icdiff = [ + {file = "icdiff-1.9.1.tar.gz", hash = "sha256:66972dd03318da55280991db375d3ef6b66d948c67af96c1ebdb21587e86655e"}, +] importlib-metadata = [ {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"}, {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"}, @@ -828,6 +860,10 @@ pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] +pprintpp = [ + {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, + {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, +] py = [ {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, @@ -852,6 +888,9 @@ pytest-bdd = [ {file = "pytest-bdd-4.0.2.tar.gz", hash = "sha256:982489f2f036c7561affe4eeb5b392a37e1ace2a9f260cad747b1c8119e63cfd"}, {file = "pytest_bdd-4.0.2-py2.py3-none-any.whl", hash = "sha256:74ea5a147ea558c99ae83d838e6acbe5c9e6843884a958f8231615d96838733d"}, ] +pytest-icdiff = [ + {file = "pytest-icdiff-0.5.tar.gz", hash = "sha256:3a14097f4385665cb04330e6ae09a3dd430375f717e94482af6944470ad5f100"}, +] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, diff --git a/pyproject.toml b/pyproject.toml index cb905a23..eac62079 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ toml = ">=0.10" pyflakes = ">=2.2.0" pytest = ">=6.2" pytest-bdd = "^4.0.1" +pytest-icdiff = "^0.5" yq = ">=2.11" [tool.poetry.scripts] From a6a4417eff33a66c18b5545550b2a30851de5c9e Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 19 Apr 2021 20:12:43 -0700 Subject: [PATCH 0429/1132] Fix annoying poetry-generated Windows line endings Co-authored-by: Jonathan Wren --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index d47e847c..540af298 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ *.journal text eol=lf *.feature text eol=lf +poetry.lock text eol=lf +pyrpoject.toml text eol=lf From 148d3fdb18f8378bf447052268635a5367de7ec0 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 19 Apr 2021 20:16:37 -0700 Subject: [PATCH 0430/1132] Update test w/ new steps Co-authored-by: Jonathan Wren --- tests/features/format.feature | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index d8454ce0..330c3a06 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -74,12 +74,14 @@ Feature: Custom formats Then the output should be valid JSON Then we should get no error And the output should be valid JSON - And "entries" in the json output should have 2 elements - And "tags" in the json output should contain "@ipsum" - And "tags" in the json output should contain "@tagone" - And "tags" in the json output should contain "@tagtwo" - And entry 1 should have an array "tags" with 3 elements - And entry 2 should have an array "tags" with 1 elements + Given we parse the output as JSON + Then "entries" in the parsed output should have 2 elements + And "tags" in the parsed output should be + @ipsum + @tagone + @tagtwo + And "entries.0.tags" in the parsed output should have 3 elements + And "entries.1.tags" in the parsed output should have 1 elements Examples: configs | config_file | From 36dc01bf306f18a5379f4c508172825a342d7c31 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 19 Apr 2021 20:50:33 -0700 Subject: [PATCH 0431/1132] Fixing custom template test and skipping some broken tests Co-authored-by: Jonathan Wren --- tests/features/format.feature | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 330c3a06..ef126a5b 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -92,7 +92,6 @@ Feature: Custom formats Scenario Outline: Exporting using custom templates Given we use the config "" - And we load template "sample.template" And we use the password "test" if prompted When we run "jrnl -1 --format sample" Then the output should be @@ -117,6 +116,7 @@ Feature: Custom formats | basic_folder.yaml | | basic_dayone.yaml | + @skip # .TODO return after editor steps implemented Scenario Outline: Increasing Headings on Markdown export Given we use the config "" And we use the password "test" if prompted @@ -214,6 +214,7 @@ Feature: Custom formats | basic_folder.yaml | # | basic_dayone.yaml | @todo + @skip # .TODO return after editor steps implemented Scenario Outline: Add a blank line to Markdown export if there isn't one already # https://github.com/jrnl-org/jrnl/issues/768 # https://github.com/jrnl-org/jrnl/issues/881 @@ -431,7 +432,7 @@ Feature: Custom formats porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. ... - + Examples: configs | config_file | | basic_onefile.yaml | From ce64d7973bf7a7e09b3d61593fe392f763b6cbca Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 19 Apr 2021 21:12:37 -0700 Subject: [PATCH 0432/1132] Implement @skip_win and @skip_editor Co-authored-by: Jonathan Wren --- tests/features/format.feature | 4 ++-- tests/step_defs/conftest.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index ef126a5b..648b4dd0 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -116,7 +116,7 @@ Feature: Custom formats | basic_folder.yaml | | basic_dayone.yaml | - @skip # .TODO return after editor steps implemented + @skip_editor # .TODO return after editor steps implemented Scenario Outline: Increasing Headings on Markdown export Given we use the config "" And we use the password "test" if prompted @@ -214,7 +214,7 @@ Feature: Custom formats | basic_folder.yaml | # | basic_dayone.yaml | @todo - @skip # .TODO return after editor steps implemented + @skip_editor # .TODO return after editor steps implemented Scenario Outline: Add a blank line to Markdown export if there isn't one already # https://github.com/jrnl-org/jrnl/issues/768 # https://github.com/jrnl-org/jrnl/issues/881 diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 7a651093..7e10883e 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -22,12 +22,14 @@ from pytest_bdd import when from pytest_bdd.parsers import parse from pytest_bdd import parsers from pytest import fixture +from pytest import mark import toml from jrnl import __version__ from jrnl.cli import cli from jrnl.config import load_config from jrnl.os_compat import split_args +from jrnl.os_compat import on_windows class TestKeyring(backend.KeyringBackend): @@ -79,6 +81,22 @@ class FailedKeyring(backend.KeyringBackend): raise errors.KeyringError +# ----- MARKERS ----- # +def pytest_bdd_apply_tag(tag, function): + if tag == "skip_win": + marker = mark.skipif(on_windows, reason="Skip test on Windows") + elif tag == "skip_editor": + marker = mark.skip( + reason="Skipping editor-related test. We should come back to this!" + ) + else: + # Fall back to pytest-bdd's default behavior + return None + + marker(function) + return True + + # ----- UTILS ----- # def failed_msg(msg, expected, actual): return f"{msg}\nExpected:\n{expected}\n---end---\nActual:\n{actual}\n---end---\n" From 3ddfb4d5949eb687605b1b27246a69ba8a7e2ba8 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 24 Apr 2021 14:47:52 -0700 Subject: [PATCH 0433/1132] Implement editor-related steps in pytest-bdd - Implement mock editor fixture - Add fixture to keep track of editor state - Implement various steps to check editor state Co-authored-by: Micah Jerome Ellison --- jrnl/editor.py | 2 +- poetry.lock | 287 ++++++++++++++++++++++++++++--- pyproject.toml | 9 +- tests/features/write.feature | 175 ++++++++++--------- tests/step_defs/conftest.py | 119 ++++++++++++- tests/step_defs/test_features.py | 16 +- 6 files changed, 475 insertions(+), 133 deletions(-) diff --git a/jrnl/editor.py b/jrnl/editor.py index 086d84db..7c7413e8 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -26,7 +26,7 @@ def get_text_from_editor(config, template=""): try: subprocess.call(split_args(config["editor"]) + [tmpfile]) - except Exception as e: + except FileNotFoundError as e: error_msg = f""" {ERROR_COLOR}{str(e)}{RESET_COLOR} diff --git a/poetry.lock b/poetry.lock index 34184977..65670545 100644 --- a/poetry.lock +++ b/poetry.lock @@ -17,6 +17,14 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "appnope" +version = "0.1.2" +description = "Disable App Nap on macOS >= 10.9" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "argcomplete" version = "1.12.3" @@ -61,6 +69,14 @@ docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] +[[package]] +name = "backcall" +version = "0.2.0" +description = "Specifications for callback functions passed in to an API" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "behave" version = "1.2.6" @@ -152,6 +168,14 @@ sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +[[package]] +name = "decorator" +version = "5.0.9" +description = "Decorators for Humans" +category = "dev" +optional = false +python-versions = ">=3.5" + [[package]] name = "ghp-import" version = "2.0.1" @@ -174,14 +198,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "icdiff" -version = "1.9.1" -description = "improved colored diff" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "importlib-metadata" version = "4.5.0" @@ -206,6 +222,74 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "ipdb" +version = "0.13.9" +description = "IPython-enabled pdb" +category = "dev" +optional = false +python-versions = ">=2.7" + +[package.dependencies] +decorator = {version = "*", markers = "python_version > \"3.6\""} +ipython = {version = ">=7.17.0", markers = "python_version > \"3.6\""} +toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} + +[[package]] +name = "ipython" +version = "7.24.1" +description = "IPython: Productive Interactive Computing" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +appnope = {version = "*", markers = "sys_platform == \"darwin\""} +backcall = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +decorator = "*" +jedi = ">=0.16" +matplotlib-inline = "*" +pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} +pickleshare = "*" +prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" +pygments = "*" +traitlets = ">=4.2" + +[package.extras] +all = ["Sphinx (>=1.3)", "ipykernel", "ipyparallel", "ipywidgets", "nbconvert", "nbformat", "nose (>=0.10.1)", "notebook", "numpy (>=1.17)", "pygments", "qtconsole", "requests", "testpath"] +doc = ["Sphinx (>=1.3)"] +kernel = ["ipykernel"] +nbconvert = ["nbconvert"] +nbformat = ["nbformat"] +notebook = ["notebook", "ipywidgets"] +parallel = ["ipyparallel"] +qtconsole = ["qtconsole"] +test = ["nose (>=0.10.1)", "requests", "testpath", "pygments", "nbformat", "ipykernel", "numpy (>=1.17)"] + +[[package]] +name = "ipython-genutils" +version = "0.2.0" +description = "Vestigial utilities from IPython" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "jedi" +version = "0.18.0" +description = "An autocompletion tool for Python that can be used for text editors." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +parso = ">=0.8.0,<0.9.0" + +[package.extras] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<6.0.0)"] + [[package]] name = "jeepney" version = "0.6.0" @@ -286,6 +370,17 @@ category = "dev" optional = false python-versions = ">=3.6" +[[package]] +name = "matplotlib-inline" +version = "0.1.2" +description = "Inline Matplotlib backend for Jupyter" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +traitlets = "*" + [[package]] name = "mergedeep" version = "1.3.4" @@ -368,6 +463,18 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "parso" +version = "0.8.2" +description = "A Python Parser" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["docopt", "pytest (<6.0.0)"] + [[package]] name = "pathspec" version = "0.8.1" @@ -376,6 +483,25 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pickleshare" +version = "0.7.5" +description = "Tiny 'shelve'-like database with concurrency support" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "pluggy" version = "0.13.1" @@ -391,9 +517,20 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} dev = ["pre-commit", "tox"] [[package]] -name = "pprintpp" -version = "0.4.0" -description = "A drop-in replacement for pprint that's actually pretty" +name = "prompt-toolkit" +version = "3.0.19" +description = "Library for building powerful interactive command lines in Python" +category = "dev" +optional = false +python-versions = ">=3.6.1" + +[package.dependencies] +wcwidth = "*" + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" category = "dev" optional = false python-versions = "*" @@ -422,6 +559,14 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +[[package]] +name = "pygments" +version = "2.9.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "dev" +optional = false +python-versions = ">=3.5" + [[package]] name = "pyparsing" version = "2.4.7" @@ -470,17 +615,16 @@ pytest = ">=4.3" six = ">=1.9.0" [[package]] -name = "pytest-icdiff" -version = "0.5" -description = "use icdiff for better error messages in pytest assertions" +name = "pytest-clarity" +version = "0.3.0a0" +description = "A plugin providing an alternative, colourful diff output for failing assertions." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] -icdiff = "*" -pprintpp = "*" -pytest = "*" +pytest = ">=3.5.0" +termcolor = "1.1.0" [[package]] name = "python-dateutil" @@ -564,6 +708,14 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "termcolor" +version = "1.1.0" +description = "ANSII Color formatting for output in terminal." +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "textwrap3" version = "0.9.2" @@ -580,6 +732,20 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "traitlets" +version = "5.0.5" +description = "Traitlets Python configuration system" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +ipython-genutils = "*" + +[package.extras] +test = ["pytest"] + [[package]] name = "typed-ast" version = "1.4.3" @@ -618,6 +784,14 @@ python-versions = ">=3.6" [package.extras] watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] +[[package]] +name = "wcwidth" +version = "0.2.5" +description = "Measures the displayed width of unicode strings in a terminal" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "xmltodict" version = "0.12.0" @@ -658,7 +832,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "a0d3f3e30dbe80528547b49ae7bb39c6c1a911e2552d8b10d409daf81cdb28d1" +content-hash = "d9a47064f2050860c955a0871b2bd8899c2f24aaf6482f6a742316fd1fd95ba3" [metadata.files] ansiwrap = [ @@ -669,6 +843,10 @@ appdirs = [ {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] +appnope = [ + {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, + {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, +] argcomplete = [ {file = "argcomplete-1.12.3-py2.py3-none-any.whl", hash = "sha256:291f0beca7fd49ce285d2f10e4c1c77e9460cf823eef2de54df0c0fec88b0d81"}, {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, @@ -684,6 +862,10 @@ attrs = [ {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, ] +backcall = [ + {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, + {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, +] behave = [ {file = "behave-1.2.6-py2.py3-none-any.whl", hash = "sha256:ebda1a6c9e5bfe95c5f9f0a2794e01c7098b3dde86c10a95d8621c5907ff6f1c"}, {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, @@ -753,15 +935,16 @@ cryptography = [ {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] +decorator = [ + {file = "decorator-5.0.9-py3-none-any.whl", hash = "sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323"}, + {file = "decorator-5.0.9.tar.gz", hash = "sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5"}, +] ghp-import = [ {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, ] glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] -icdiff = [ - {file = "icdiff-1.9.1.tar.gz", hash = "sha256:66972dd03318da55280991db375d3ef6b66d948c67af96c1ebdb21587e86655e"}, -] importlib-metadata = [ {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"}, {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"}, @@ -770,6 +953,21 @@ iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] +ipdb = [ + {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, +] +ipython = [ + {file = "ipython-7.24.1-py3-none-any.whl", hash = "sha256:d513e93327cf8657d6467c81f1f894adc125334ffe0e4ddd1abbb1c78d828703"}, + {file = "ipython-7.24.1.tar.gz", hash = "sha256:9bc24a99f5d19721fb8a2d1408908e9c0520a17fff2233ffe82620847f17f1b6"}, +] +ipython-genutils = [ + {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, + {file = "ipython_genutils-0.2.0.tar.gz", hash = "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"}, +] +jedi = [ + {file = "jedi-0.18.0-py2.py3-none-any.whl", hash = "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93"}, + {file = "jedi-0.18.0.tar.gz", hash = "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707"}, +] jeepney = [ {file = "jeepney-0.6.0-py3-none-any.whl", hash = "sha256:aec56c0eb1691a841795111e184e13cad504f7703b9a64f63020816afa79a8ae"}, {file = "jeepney-0.6.0.tar.gz", hash = "sha256:7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657"}, @@ -825,6 +1023,10 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, ] +matplotlib-inline = [ + {file = "matplotlib-inline-0.1.2.tar.gz", hash = "sha256:f41d5ff73c9f5385775d5c0bc13b424535c8402fe70ea8210f93e11f3683993e"}, + {file = "matplotlib_inline-0.1.2-py3-none-any.whl", hash = "sha256:5cf1176f554abb4fa98cb362aa2b55c500147e4bdbb07e3fda359143e1da0811"}, +] mergedeep = [ {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, @@ -852,17 +1054,33 @@ parsedatetime = [ {file = "parsedatetime-2.6-py3-none-any.whl", hash = "sha256:cb96edd7016872f58479e35879294258c71437195760746faffedb692aef000b"}, {file = "parsedatetime-2.6.tar.gz", hash = "sha256:4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455"}, ] +parso = [ + {file = "parso-0.8.2-py2.py3-none-any.whl", hash = "sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22"}, + {file = "parso-0.8.2.tar.gz", hash = "sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398"}, +] pathspec = [ {file = "pathspec-0.8.1-py2.py3-none-any.whl", hash = "sha256:aa0cb481c4041bf52ffa7b0d8fa6cd3e88a2ca4879c533c9153882ee2556790d"}, {file = "pathspec-0.8.1.tar.gz", hash = "sha256:86379d6b86d75816baba717e64b1a3a3469deb93bb76d613c9ce79edc5cb68fd"}, ] +pexpect = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] +pickleshare = [ + {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, + {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, +] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] -pprintpp = [ - {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, - {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, +prompt-toolkit = [ + {file = "prompt_toolkit-3.0.19-py3-none-any.whl", hash = "sha256:7089d8d2938043508aa9420ec18ce0922885304cddae87fb96eebca942299f88"}, + {file = "prompt_toolkit-3.0.19.tar.gz", hash = "sha256:08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f"}, +] +ptyprocess = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] py = [ {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, @@ -876,6 +1094,10 @@ pyflakes = [ {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, ] +pygments = [ + {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"}, + {file = "Pygments-2.9.0.tar.gz", hash = "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"}, +] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, @@ -888,8 +1110,8 @@ pytest-bdd = [ {file = "pytest-bdd-4.0.2.tar.gz", hash = "sha256:982489f2f036c7561affe4eeb5b392a37e1ace2a9f260cad747b1c8119e63cfd"}, {file = "pytest_bdd-4.0.2-py2.py3-none-any.whl", hash = "sha256:74ea5a147ea558c99ae83d838e6acbe5c9e6843884a958f8231615d96838733d"}, ] -pytest-icdiff = [ - {file = "pytest-icdiff-0.5.tar.gz", hash = "sha256:3a14097f4385665cb04330e6ae09a3dd430375f717e94482af6944470ad5f100"}, +pytest-clarity = [ + {file = "pytest-clarity-0.3.0a0.tar.gz", hash = "sha256:5cc99e3d9b7969dfe17e5f6072d45a917c59d363b679686d3c958a1ded2e4dcf"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, @@ -985,6 +1207,9 @@ six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +termcolor = [ + {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, +] textwrap3 = [ {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, {file = "textwrap3-0.9.2.zip", hash = "sha256:5008eeebdb236f6303dcd68f18b856d355f6197511d952ba74bc75e40e0c3414"}, @@ -993,6 +1218,10 @@ toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +traitlets = [ + {file = "traitlets-5.0.5-py3-none-any.whl", hash = "sha256:69ff3f9d5351f31a7ad80443c2674b7099df13cc41fc5fa6e2f6d3b0330b0426"}, + {file = "traitlets-5.0.5.tar.gz", hash = "sha256:178f4ce988f69189f7e523337a3e11d91c786ded9360174a3d9ca83e79bc5396"}, +] typed-ast = [ {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, @@ -1053,6 +1282,10 @@ watchdog = [ {file = "watchdog-2.1.2-py3-none-win_ia64.whl", hash = "sha256:104266a778906ae0e971368d368a65c4cd032a490a9fca5ba0b78c6c7ae11720"}, {file = "watchdog-2.1.2.tar.gz", hash = "sha256:0237db4d9024859bea27d0efb59fe75eef290833fd988b8ead7a879b0308c2db"}, ] +wcwidth = [ + {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, + {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, +] xmltodict = [ {file = "xmltodict-0.12.0-py2.py3-none-any.whl", hash = "sha256:8bbcb45cc982f48b2ca8fe7e7827c5d792f217ecf1792626f808bf41c3b86051"}, {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, diff --git a/pyproject.toml b/pyproject.toml index eac62079..2719b954 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,9 @@ toml = ">=0.10" pyflakes = ">=2.2.0" pytest = ">=6.2" pytest-bdd = "^4.0.1" -pytest-icdiff = "^0.5" yq = ">=2.11" +ipdb = ">=0.13" +pytest-clarity = "^0.3.0-alpha.0" [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' @@ -66,9 +67,15 @@ force_sort_within_sections = true [tool.pytest.ini_options] minversion = "6.0" +required_plugins = [ + "pytest-bdd" +] markers = [ "todo", ] +addopts = [ + "--pdbcls=IPython.terminal.debugger:Pdb" +] filterwarnings = [ "ignore::DeprecationWarning", diff --git a/tests/features/write.feature b/tests/features/write.feature index eb22e480..aec325d5 100644 --- a/tests/features/write.feature +++ b/tests/features/write.feature @@ -1,49 +1,49 @@ Feature: Writing new entries. Scenario Outline: Multiline entry with punctuation should keep title punctuation - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl This is. the title\\n This is the second line" And we run "jrnl -n 1" Then the output should contain "This is. the title" Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | + | encrypted.yaml | Scenario Outline: Single line entry with period should be split at period - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl This is. the title" And we run "jrnl -1" Then the output should contain "| the title" Examples: configs - | config_file | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: CJK entry should be split at fullwidth period without following space. - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl 七転び。八起き" And we run "jrnl -1" Then the output should contain "| 八起き" Examples: configs - | config_file | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Writing an entry from command line should store the entry - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." Then we should see the message "Entry added" @@ -51,49 +51,47 @@ Feature: Writing new entries. Then the output should contain "2013-07-23 09:00 A cold and stormy day." Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | + | encrypted.yaml | Scenario Outline: Writing a partial entry from command line with edit flag should go to the editor - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl this is a partial --edit" Then we should see the message "Entry added" Then the editor should have been called And the editor file content should be - """ - this is a partial - """ - When we run "jrnl -n 1" - Then the output should contain "this is a partial" + this is a partial Examples: configs - | config_file | - | basic_onefile | - | basic_encrypted | - | basic_dayone | - | basic_folder | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_dayone.yaml | + | basic_folder.yaml | Scenario Outline: Writing an empty entry from the editor should yield "Nothing saved to file" message - Given we use the config ".yaml" + Given we use the config "" + And we write nothing to the editor if opened And we use the password "test" if prompted - When we open the editor and enter nothing + When we run "jrnl --edit" Then the error output should contain "[Nothing saved to file]" + And the editor should have been called Examples: configs - | config_file | - | editor | - | editor_empty_folder | - | dayone | - | basic_encrypted | - | basic_onefile | + | config_file | + | editor.yaml | + | editor_empty_folder.yaml | + | dayone.yaml | + | basic_encrypted.yaml | + | basic_onefile.yaml | @skip Scenario Outline: Writing an empty entry from the command line with no editor should yield nothing - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl" and enter nothing Then the output should be empty @@ -101,15 +99,15 @@ Feature: Writing new entries. And the editor should not have been called Examples: configs - | config_file | - | simple | - | empty_folder | - | encrypted | - # | dayone | @todo + | config_file | + | config_simple.yaml | + | empty_folder.yaml | + | encrypted.yaml | + # | dayone | @todo Scenario Outline: Writing an entry does not print the entire journal # https://github.com/jrnl-org/jrnl/issues/87 - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." Then we should see the message "Entry added" @@ -117,33 +115,31 @@ Feature: Writing new entries. Then the output should not contain "Life is good" Examples: configs - | config_file | - | editor | - | editor_empty_folder | - | dayone | - | encrypted | + | config_file | + | editor.yaml | + | editor_empty_folder.yaml | + | dayone.yaml | + | encrypted.yaml | Scenario Outline: Embedded period stays in title - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic." Then we should see the message "Entry added" When we run "jrnl -1" Then the output should be - """ - 2014-04-24 09:00 Created a new website - empty.com. - | Hope to get a lot of traffic. - """ + 2014-04-24 09:00 Created a new website - empty.com. + | Hope to get a lot of traffic. Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | + | encrypted.yaml | Scenario Outline: Write and read emoji support - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" Then we should see the message "Entry added" @@ -152,14 +148,14 @@ Feature: Writing new entries. And the output should contain "🐘" Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | + | encrypted.yaml | Scenario Outline: Writing an entry at the prompt (no editor) should store the entry - Given we use the config ".yaml" + Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl" and enter "25 jul 2013: I saw Elvis. He's alive." Then we should get no error @@ -168,10 +164,10 @@ Feature: Writing new entries. And the output should contain "| He's alive." Examples: configs - | config_file | - | simple | - | empty_folder | - | encrypted | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | encrypted.yaml | @todo Scenario: Writing an entry at the prompt (no editor) in DayOne journal @@ -187,26 +183,29 @@ Feature: Writing new entries. Given we use the config "dayone.yaml" When we run "jrnl 01 may 1979: Being born hurts." And we run "jrnl --export json" - Then "entries" in the json output should have 5 elements - And the json output should contain entries.0.creator.software_agent - And the json output should contain entries.0.creator.os_agent - And the json output should contain entries.0.creator.host_name - And the json output should contain entries.0.creator.generation_date - And the json output should contain entries.0.creator.device_agent - And "entries.0.creator.software_agent" in the json output should contain "jrnl" + Then we should get no error + And the output should be valid JSON + Given we parse the output as JSON + Then "entries" in the parsed output should have 5 elements + And "entries.0.creator" in the parsed output should be + software_agent + os_agent + host_name + generation_date + device_agent + And "entries.0.creator.software_agent" in the parsed output should contain + jrnl # fails when system time is UTC (as on Travis-CI) - @skip + # @skip Scenario: Title with an embedded period on DayOne journal Given we use the config "dayone.yaml" When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch."" Then we should see the message "Entry added" When we run "jrnl -1" Then the output should be - """ - 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. - | I'm feeling sore because I forgot to stretch. - """ + 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. + | I'm feeling sore because I forgot to stretch. Scenario: Opening an folder that's not a DayOne folder should treat as folder journal Given we use the config "empty_folder.yaml" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 7e10883e..4c1d42d4 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -8,6 +8,7 @@ from collections import defaultdict from keyring import backend from keyring import set_keyring from keyring import errors +from pathlib import Path import random import string import re @@ -191,12 +192,88 @@ def which_output_stream(): return None +@fixture +def editor_input(): + return None + + +@fixture +def num_args(): + return None + + @fixture def parsed_output(): return {"lang": None, "obj": None} +@fixture +def editor_state(): + return { + "command": "", + "intent": {"method": "r", "input": None}, + "tmpfile": {"name": None, "content": None}, + } + + +@fixture +def editor(editor_state): + def _mock_editor(editor_command): + tmpfile = editor_command[-1] + + editor_state["command"] = editor_command + editor_state["tmpfile"]["name"] = tmpfile + + Path(tmpfile).touch() + with open(tmpfile, editor_state["intent"]["method"]) as f: + # Touch the file so jrnl knows it was edited + if editor_state["intent"]["input"] != None: + f.write(editor_state["intent"]["input"]) + + file_content = f.read() + editor_state["tmpfile"]["content"] = file_content + + return _mock_editor + + # ----- STEPS ----- # +@given(parse("we {editor_method} to the editor if opened\n{editor_input}")) +@given(parse("we {editor_method} nothing to the editor if opened")) +def we_enter_editor(editor_method, editor_input, editor_state): + file_method = editor_state["intent"]["method"] + if editor_method == "write": + file_method = "w+" + elif editor_method == "append": + file_method = "a+" + else: + assert False, f"Method '{editor_method}' not supported" + + editor_state["intent"] = {"method": file_method, "input": editor_input} + + +@then(parse("the editor should have been called")) +@then(parse("the editor should have been called with {num_args} arguments")) +def count_editor_args(num_args, cli_run, editor_state): + assert cli_run["mocks"]["editor"].called + + if isinstance(num_args, int): + assert len(editor_state["command"]) == int(num_args) + + +@then(parse('the editor file content should {comparison} "{str_value}"')) +@then(parse("the editor file content should {comparison} empty")) +@then(parse("the editor file content should {comparison}\n{str_value}")) +def contains_editor_file(comparison, str_value, editor_state): + content = editor_state["tmpfile"]["content"] + # content = f'\n"""\n{content}\n"""\n' + if comparison == "be": + assert content == str_value + elif comparison == "contain": + assert str_value in content + else: + assert False, f"Comparison '{comparison}' not supported" + + @given("we have a keyring", target_fixture="keyring") @given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") def we_have_type_of_keyring(keyring_type): @@ -245,7 +322,15 @@ def use_password_forever(pw): @when('we run "jrnl "') @when('we run "jrnl"') def we_run( - command, config_path, user_input, cli_run, capsys, password, keyring, cache_dir + command, + config_path, + user_input, + cli_run, + capsys, + password, + keyring, + cache_dir, + editor, ): if cache_dir["exists"]: command = command.format(cache_dir=cache_dir["path"]) @@ -270,7 +355,8 @@ def we_run( patch("builtins.input", side_effect=user_input) as mock_input, \ patch("getpass.getpass", side_effect=password) as mock_getpass, \ patch("jrnl.install.get_config_path", return_value=config_path), \ - patch("jrnl.config.get_config_path", return_value=config_path) \ + patch("jrnl.config.get_config_path", return_value=config_path), \ + patch("subprocess.call", side_effect=editor) as mock_editor \ : # @TODO: single point of truth for get_config_path (move from all calls from install to config) try: cli(args) @@ -290,6 +376,7 @@ def we_run( "stdin": mock_stdin, "input": mock_input, "getpass": mock_getpass, + "editor": mock_editor, } @@ -526,11 +613,15 @@ def assert_parsed_output_item_count(node_name, number, parsed_output): assert False, f"Language name {lang} not recognized" -@then(parse('"{field_name}" in the parsed output should be\n{expected_keys}')) -def assert_output_field_content(field_name, expected_keys, cli_run, parsed_output): +@then(parse('"{field_name}" in the parsed output should {comparison}\n{expected_keys}')) +def assert_output_field_content( + field_name, comparison, expected_keys, cli_run, parsed_output +): lang = parsed_output["lang"] obj = parsed_output["obj"] expected_keys = expected_keys.split("\n") + if len(expected_keys) == 1: + expected_keys = expected_keys[0] if lang == "XML": xml_node_names = (node.tag for node in obj) @@ -555,10 +646,22 @@ def assert_output_field_content(field_name, expected_keys, cli_run, parsed_outpu assert node in my_obj, [my_obj.keys(), node] my_obj = my_obj[node] - if type(my_obj) is str: - my_obj = [my_obj] - - assert set(expected_keys) == set(my_obj), [set(my_obj), set(expected_keys)] + if comparison == "be": + if type(my_obj) is str: + assert expected_keys == my_obj, [my_obj, expected_keys] + else: + assert set(expected_keys) == set(my_obj), [ + set(my_obj), + set(expected_keys), + ] + elif comparison == "contain": + if type(my_obj) is str: + assert expected_keys in my_obj, [my_obj, expected_keys] + else: + assert all(elem in my_obj for elem in expected_keys), [ + my_obj, + expected_keys, + ] else: assert False, f"Language name {lang} not recognized" diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py index 145f8ed6..4c8d5ef9 100644 --- a/tests/step_defs/test_features.py +++ b/tests/step_defs/test_features.py @@ -5,13 +5,13 @@ scenarios("../features/core.feature") scenarios("../features/datetime.feature") scenarios("../features/delete.feature") scenarios("../features/encrypt.feature") -# scenarios("../features/file_storage.feature") +scenarios("../features/file_storage.feature") scenarios("../features/format.feature") -# scenarios("../features/import.feature") -# scenarios("../features/multiple_journals.feature") +scenarios("../features/import.feature") +scenarios("../features/multiple_journals.feature") scenarios("../features/password.feature") -# scenarios("../features/search.feature") -# scenarios("../features/star.feature") -# scenarios("../features/tag.feature") -# scenarios("../features/upgrade.feature") -# scenarios("../features/write.feature") +scenarios("../features/search.feature") +scenarios("../features/star.feature") +scenarios("../features/tag.feature") +scenarios("../features/upgrade.feature") +scenarios("../features/write.feature") From d15e6839556bc19774743f749dba5b4ad56f6acf Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 24 Apr 2021 15:06:54 -0700 Subject: [PATCH 0434/1132] Update search features to use new steps Co-authored-by: Jonathan Wren --- tests/features/search.feature | 247 +++++++++++++++------------------- 1 file changed, 111 insertions(+), 136 deletions(-) diff --git a/tests/features/search.feature b/tests/features/search.feature index 22351b7e..0bd0fb79 100644 --- a/tests/features/search.feature +++ b/tests/features/search.feature @@ -1,7 +1,7 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -on today should display entries created today - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl today: Adding an entry right now." Then we should see the message "Entry added" When we run "jrnl -on today" @@ -10,13 +10,13 @@ Feature: Searching in a journal And the output should not contain "Life is good" Examples: configs - | config | - | simple | - | empty_folder | - | dayone | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | Scenario Outline: Displaying entries using -from day should display correct entries - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl yesterday: This thing happened yesterday" Then we should see the message "Entry added" When we run "jrnl today at 11:59pm: Adding an entry right now." @@ -29,13 +29,13 @@ Feature: Searching in a journal And the output should not contain "This thing happened yesterday" Examples: configs - | config | - | simple | - | empty_folder | - | dayone | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | Scenario Outline: Displaying entries using -from and -to day should display correct entries - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl yesterday: This thing happened yesterday" Then we should see the message "Entry added" When we run "jrnl today at 11:59pm: Adding an entry right now." @@ -48,75 +48,72 @@ Feature: Searching in a journal And the output should not contain "A future entry." Examples: configs - | config | - | simple | - | empty_folder | - | dayone | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | Scenario Outline: Searching for a string - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl -contains first --short" Then we should get no error And the output should be - """ - 2020-08-29 11:11 Entry the first. - """ + 2020-08-29 11:11 Entry the first. Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching for a string within tag results - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl @tagone -contains maybe" Then we should get no error And the output should contain "maybe" Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching for a string within AND tag results - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl -and @tagone @tagtwo -contains maybe" Then we should get no error And the output should contain "maybe" Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching for a string within NOT tag results - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl -not @tagone -contains lonesome" Then we should get no error And the output should contain "lonesome" Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching for dates - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl -on 2020-08-31 --short" Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." - Then we flush the output When we run "jrnl -on 'august 31 2020' --short" Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario: Out of order entries to a Folder journal should be listed in date order Given we use the config "empty_folder.yaml" @@ -126,74 +123,64 @@ Feature: Searching in a journal Then we should see the message "Entry added" When we run "jrnl -2" Then the output should be - """ - 2013-07-23 09:00 Testing folder journal. + 2013-07-23 09:00 Testing folder journal. - 2014-03-07 16:37 Second entry of journal. - """ + 2014-03-07 16:37 Second entry of journal. Scenario Outline: Searching for all tags should show counts of each tag - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl --tags" Then we should get no error And the output should be - """ - @tagtwo : 2 - @tagone : 2 - @tagthree : 1 - @ipsum : 1 - """ + @tagtwo : 2 + @tagone : 2 + @tagthree : 1 + @ipsum : 1 Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Filtering journals should also filter tags - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl -from 'september 2020' --tags" Then we should get no error And the output should be - """ - @tagthree : 1 - @tagone : 1 - """ + @tagthree : 1 + @tagone : 1 Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Excluding a tag should filter out all entries with that tag - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl --tags -not @tagtwo" Then the output should be - """ - @tagthree : 1 - @tagone : 1 - """ + @tagthree : 1 + @tagone : 1 Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Excluding multiple tags should filter out all entries with those tags - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl --tags -not @tagone -not @tagthree" Then the output should be - """ - @tagtwo : 1 - """ + @tagtwo : 1 Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case. # https://github.com/jrnl-org/jrnl/issues/354 @@ -206,113 +193,101 @@ Feature: Searching in a journal When we run "jrnl -2" Then we should get no error And the output should be - """ - 2013-06-09 15:39 My first entry. - | Everything is alright + 2013-06-09 15:39 My first entry. + | Everything is alright - 2013-06-10 15:40 Life is good. - | But I'm better. - """ + 2013-06-10 15:40 Life is good. + | But I'm better. Scenario Outline: Searching by month - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -month 9 --short" Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - And we flush the output When we run "jrnl -month Sept --short" Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - And we flush the output When we run "jrnl -month September --short" Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching by day - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -day 31 --short" Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching by year - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl 2019-01-01 01:01: I like this year." And we run "jrnl -year 2019 --short" Then the output should be "2019-01-01 01:01 I like this year." - And we flush the output When we run "jrnl -year 19 --short" Then the output should be "2019-01-01 01:01 I like this year." Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Combining month, day, and year search terms - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl -month 08 -day 29 --short" Then the output should be "2020-08-29 11:11 Entry the first." - And we flush the output When we run "jrnl -day 29 -year 2020 --short" Then the output should be "2020-08-29 11:11 Entry the first." - And we flush the output When we run "jrnl -month 09 -year 2020 --short" Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - And we flush the output When we run "jrnl -month 08 -day 29 -year 2020 --short" Then the output should be "2020-08-29 11:11 Entry the first." Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Searching today in history - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted And we set current date and time to "2020-08-31 14:32" When we run "jrnl 2019-08-31 01:01: Hi, from last year." And we run "jrnl -today-in-history --short" Then the output should be - """ - 2019-08-31 01:01 Hi, from last year. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ + 2019-08-31 01:01 Hi, from last year. + 2020-08-31 14:32 A second entry in what I hope to be a long series. Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario: Loading a DayOne Journal Given we use the config "dayone.yaml" When we run "jrnl -from 'feb 2013'" Then we should get no error And the output should be - """ - 2013-05-17 11:39 This entry has tags! + 2013-05-17 11:39 This entry has tags! - 2013-06-17 20:38 This entry has a location. + 2013-06-17 20:38 This entry has a location. - 2013-07-17 11:38 This entry is starred! - """ + 2013-07-17 11:38 This entry is starred! From 8faa3ae32d876163eb3380fb9907ec8564f9f031 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 24 Apr 2021 15:06:10 -0700 Subject: [PATCH 0435/1132] Update tests to use new steps Co-authored-by: Micah Jerome Ellison --- tests/features/file_storage.feature | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/tests/features/file_storage.feature b/tests/features/file_storage.feature index 33619365..24407fa1 100644 --- a/tests/features/file_storage.feature +++ b/tests/features/file_storage.feature @@ -4,43 +4,38 @@ Feature: Journals iteracting with the file system in a way that users can see Given we use the config "empty_folder.yaml" When we run "jrnl 23 July 2013: Testing folder journal." Then we should see the message "Entry added" - When the journal directory is listed - Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" + And the journal directory should contain + 2013/07/23.txt Scenario: Adding multiple entries to a Folder journal should generate multiple date files Given we use the config "empty_folder.yaml" When we run "jrnl 23 July 2013: Testing folder journal." And we run "jrnl 3/7/2014: Second entry of journal." Then we should see the message "Entry added" - When the journal directory is listed - Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" - Then the output should contain "2014/03/07.txt" or "2014\03\07.txt" + And the journal directory should contain + 2013/07/23.txt Scenario: If the journal and its parent directory don't exist, they should be created Given we use the config "missing_directory.yaml" Then the journal should not exist When we run "jrnl This is a new entry in my journal" Then the journal should exist - When we run "jrnl -n 1" + When we run "jrnl -99 --short" Then the output should contain "This is a new entry in my journal" - And the journal should have 1 entry Scenario: If the journal file doesn't exist, then it should be created Given we use the config "missing_journal.yaml" Then the journal should not exist When we run "jrnl This is a new entry in my journal" Then the journal should exist - When we run "jrnl -n 1" + When we run "jrnl -99 --short" Then the output should contain "This is a new entry in my journal" - And the journal should have 1 entry Scenario: Creating journal with relative path should update to absolute path Given we use the config "missingconfig" When we run "jrnl hello world" and enter - """ - test.txt - n - """ + test.txt + n And we change directory to "features" And we run "jrnl -n 1" Then the output should contain "hello world" @@ -48,6 +43,7 @@ Feature: Journals iteracting with the file system in a way that users can see Scenario: the temporary filename suffix should default to ".jrnl" Given we use the config "editor.yaml" When we run "jrnl --edit" + Then the editor should have been called Then the temporary filename suffix should be ".jrnl" Scenario: the temporary filename suffix should be "-{template_filename}" From 3d29b6b6a1cf6e35278339d0ef8f39667208da5f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 24 Apr 2021 15:18:11 -0700 Subject: [PATCH 0436/1132] Fix star and tag feature language and add output should be empty test Co-authored-by: Jonathan Wren --- tests/features/star.feature | 20 ++++++++--------- tests/features/tag.feature | 45 +++++++++++++++++-------------------- tests/step_defs/conftest.py | 15 +++++++------ 3 files changed, 38 insertions(+), 42 deletions(-) diff --git a/tests/features/star.feature b/tests/features/star.feature index f0188056..7b1b42f1 100644 --- a/tests/features/star.feature +++ b/tests/features/star.feature @@ -1,20 +1,20 @@ Feature: Starring entries Scenario Outline: Starring an entry will mark it in the journal file - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl 20 july 2013 *: Best day of my life!" Then we should see the message "Entry added" When we run "jrnl -on 2013-07-20 -starred" Then the output should contain "2013-07-20 09:00 Best day of my life!" Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone.yaml | Scenario Outline: Filtering by starred entries will show only starred entries - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl -starred" Then the output should be empty When we run "jrnl 20 july 2013 *: Best day of my life!" @@ -22,10 +22,10 @@ Feature: Starring entries Then the output should be "2013-07-20 09:00 Best day of my life!" Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone_empty | + | config_file | + | simple.yaml | + | empty_folder.yaml | + | dayone_empty.yaml | Scenario: Starring an entry will mark it in an encrypted journal Given we use the config "encrypted.yaml" diff --git a/tests/features/tag.feature b/tests/features/tag.feature index b7b687b5..a62b5ac8 100644 --- a/tests/features/tag.feature +++ b/tests/features/tag.feature @@ -3,51 +3,46 @@ Feature: Tagging # And format.feature for tag-related output Scenario Outline: Tags should allow certain special characters such as /, +, # - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl 2020-09-26: This is an entry about @os/2 and @c++ and @c#" When we run "jrnl --tags -on 2020-09-26" Then we should get no error And the output should be - """ - @os/2 : 1 - @c++ : 1 - @c# : 1 - """ + @os/2 : 1 + @c++ : 1 + @c# : 1 Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Emails addresses should not be parsed as tags - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl 2020-09-26: The email address test@example.com does not seem to work for me" When we run "jrnl 2020-09-26: The email address test@example.org also does not work for me" When we run "jrnl 2020-09-26: I tried test@example.org and test@example.edu too" - Then we flush the output When we run "jrnl --tags -on 2020-09-26" Then we should get no error And the output should be "[No tags found in journal.]" Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Entry can start and end with tags - Given we use the config ".yaml" + Given we use the config "" When we run "jrnl 2020-09-26: @foo came over, we went to a @bar" When we run "jrnl --tags -on 2020-09-26" Then the output should be - """ - @foo : 1 - @bar : 1 - """ + @foo : 1 + @bar : 1 Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 4c1d42d4..ea561ba0 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -419,14 +419,15 @@ def output_should_not_contain(output, cli_run): assert output not in cli_run["stdout"] -@then(parse("the output should be\n{output}")) -@then(parse('the output should be "{output}"')) -@then('the output should be ""') -def output_should_be(output, cli_run): +@then(parse("the output should be\n{str_value}")) +@then(parse('the output should be "{str_value}"')) +@then('the output should be ""') +@then("the output should be empty") +def output_should_be(str_value, cli_run): actual_out = cli_run["stdout"].strip() - output = output.strip() - assert output and output == actual_out, failed_msg( - "Output does not match.", output, actual_out + expected = str_value.strip() + assert expected == actual_out, failed_msg( + "Output does not match.", expected, actual_out ) From e0980cf39624bec5e379df6296146e5655fabd1e Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 24 Apr 2021 15:26:13 -0700 Subject: [PATCH 0437/1132] Update tests to use more scenario outlines Co-authored-by: Micah Jerome Ellison --- tests/features/import.feature | 100 +++++++++++------------ tests/features/multiple_journals.feature | 66 +++++++++------ 2 files changed, 91 insertions(+), 75 deletions(-) diff --git a/tests/features/import.feature b/tests/features/import.feature index 63b042fc..ef2e62d0 100644 --- a/tests/features/import.feature +++ b/tests/features/import.feature @@ -1,7 +1,7 @@ Feature: Importing data Scenario Outline: --import allows new entry from stdin - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl --import" and pipe "[2020-07-05 15:00] Observe and import." Then we flush the output @@ -9,50 +9,44 @@ Feature: Importing data Then the output should contain "Observe and import" Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo Scenario Outline: --import allows new large entry from stdin - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl --import" and pipe - """ - [2020-07-05 15:00] Observe and import. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada quis - est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque augue - et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu consequat. - Aenean ante ex, elementum ut interdum et, mattis eget lacus. In commodo nulla nec - tellus placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at - dolor dui end of entry. - """ - Then we flush the output + [2020-07-05 15:00] Observe and import. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada quis + est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque augue + et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu consequat. + Aenean ante ex, elementum ut interdum et, mattis eget lacus. In commodo nulla nec + tellus placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at + dolor dui end of entry. When we run "jrnl -on 2020-07-05" Then the output should contain "2020-07-05 15:00 Observe and import." And the output should contain "Lorem ipsum" And the output should contain "end of entry." Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo + | config | + | basic_onefile.yaml | + | basic_encrypted.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo Scenario Outline: --import allows multiple new entries from stdin - Given we use the config ".yaml" + Given we use the config "" And we use the password "test" if prompted When we run "jrnl --import" and pipe - """ - [2020-07-05 15:00] Observe and import. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. + [2020-07-05 15:00] Observe and import. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. - [2020-07-05 15:01] Twice as nice. - Sed dignissim sed nisl eu consequat. - """ - Then we flush the output + [2020-07-05 15:01] Twice as nice. + Sed dignissim sed nisl eu consequat. When we run "jrnl -on 2020-07-05" Then the output should contain "2020-07-05 15:00 Observe and import." And the output should contain "Lorem ipsum" @@ -60,34 +54,36 @@ Feature: Importing data And the output should contain "Sed dignissim" Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo + | config | + | basic_onefile.yaml | + | basic_encrypted.yaml | + # | basic_folder.yaml | @todo + # | basic_dayone.yaml | @todo Scenario: --import allows import new entries from file Given we use the config "simple.yaml" - Then the journal should contain "My first entry." - And the journal should contain "Life is good." - But the journal should not contain "I have an @idea" - And the journal should not contain "I met with" + When we run "jrnl -99" + Then the output should contain "My first entry." + And the output should contain "Life is good." + But the output should not contain "I have an @idea" + And the output should not contain "I met with" When we run "jrnl --import --file features/journals/tags.journal" - Then the journal should contain "My first entry." - And the journal should contain "Life is good." - And the journal should contain "PROFIT!" + And we run "jrnl -99" + Then the output should contain "My first entry." + And the output should contain "Life is good." + And the output should contain "PROFIT!" Scenario: --import prioritizes --file over pipe data if both are given Given we use the config "simple.yaml" - Then the journal should contain "My first entry." - And the journal should contain "Life is good." - But the journal should not contain "I have an @idea" - And the journal should not contain "I met with" + When we run "jrnl -99" + Then the output should contain "My first entry." + And the output should contain "Life is good." + But the output should not contain "I have an @idea" + And the output should not contain "I met with" When we run "jrnl --import --file features/journals/tags.journal" and pipe - """ - [2020-07-05 15:00] I should not exist! - """ - Then the journal should contain "My first entry." - And the journal should contain "PROFIT!" - But the journal should not contain "I should not exist!" + [2020-07-05 15:00] I should not exist! + And we run "jrnl -99" + Then the output should contain "My first entry." + And the output should contain "PROFIT!" + But the output should not contain "I should not exist!" diff --git a/tests/features/multiple_journals.feature b/tests/features/multiple_journals.feature index 222be100..4be3ab1c 100644 --- a/tests/features/multiple_journals.feature +++ b/tests/features/multiple_journals.feature @@ -2,20 +2,32 @@ Feature: Multiple journals Scenario: Loading a config with two journals Given we use the config "multiple.yaml" - Then journal "default" should have 2 entries - And journal "work" should have 0 entries + When we run "jrnl -99 --short" + Then the output should be + @todo something + When we run "jrnl work -99 --short" + Then the output should be + @todo something Scenario: Write to default config by default Given we use the config "multiple.yaml" When we run "jrnl this goes to default" - Then journal "default" should have 3 entries - And journal "work" should have 0 entries + When we run "jrnl -99 --short" + Then the output should be + @todo something + When we run "jrnl work -99 --short" + Then the output should be + @todo something Scenario: Write to specified journal Given we use the config "multiple.yaml" When we run "jrnl work a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry + When we run "jrnl -99 --short" + Then the output should be + @todo something + When we run "jrnl work -99 --short" + Then the output should be + @todo something Scenario: Tell user which journal was used Given we use the config "multiple.yaml" @@ -25,41 +37,49 @@ Feature: Multiple journals Scenario: Write to specified journal with a timestamp Given we use the config "multiple.yaml" When we run "jrnl work 23 july 2012: a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - And journal "work" should contain "2012-07-23" + When we run "jrnl -99 --short" + Then the output should be + @todo something + When we run "jrnl work -99 --short" + Then the output should be + @todo something Scenario: Write to specified journal without a timestamp but with colon Given we use the config "multiple.yaml" When we run "jrnl work : a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - And journal "work" should contain "a long day in the office" + Then the output should be + @todo something + When we run "jrnl work -99 --short" + Then the output should be + @todo something Scenario: Write to specified journal without a timestamp but with colon Given we use the config "multiple.yaml" When we run "jrnl work: a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - And journal "work" should contain "a long day in the office" + When we run "jrnl -99 --short" + Then the output should be + @todo something + When we run "jrnl work -99 --short" + Then the output should be + @todo something Scenario: Create new journals as required Given we use the config "multiple.yaml" Then journal "ideas" should not exist When we run "jrnl ideas 23 july 2012: sell my junk on ebay and make lots of money" - Then journal "ideas" should have 1 entry + When we run "jrnl ideas -99 --short" + Then the output should be + @todo something Scenario: Don't crash if no default journal is specified Given we use the config "bug343.yaml" When we run "jrnl a long day in the office" - Then we should see the message "No default journal configured" + Then the output should contain "No default journal configured" Scenario: Don't crash if no file exists for a configured encrypted journal Given we use the config "multiple.yaml" When we run "jrnl new_encrypted Adding first entry" and enter - """ - these three eyes - these three eyes - n - """ - Then we should see the message "Encrypted journal 'new_encrypted' created" + these three eyes + these three eyes + n + Then the output should contain "Encrypted journal 'new_encrypted' created" From e19fab0615fafa26a0262145ed0febaffe3db1c0 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 24 Apr 2021 15:44:19 -0700 Subject: [PATCH 0438/1132] Add new config file (for use in pytest-bdd) Co-authored-by: Micah Jerome Ellison --- .../configs/editor_markdown_extension.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/data/configs/editor_markdown_extension.yaml diff --git a/tests/data/configs/editor_markdown_extension.yaml b/tests/data/configs/editor_markdown_extension.yaml new file mode 100644 index 00000000..bf3b8d8e --- /dev/null +++ b/tests/data/configs/editor_markdown_extension.yaml @@ -0,0 +1,18 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +editor: "vim" +journals: + default: features/journals/editor_markdown_extension.journal +linewrap: 80 +tagsymbols: "@" +template: features/templates/extension.md +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none From cda07bf8d925653845f930708cc122a0e26b07c8 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 24 Apr 2021 15:44:29 -0700 Subject: [PATCH 0439/1132] Make steps use new config file Co-authored-by: Micah Jerome Ellison --- tests/features/import.feature | 4 +-- tests/features/upgrade.feature | 62 ++++++++++++---------------------- 2 files changed, 24 insertions(+), 42 deletions(-) diff --git a/tests/features/import.feature b/tests/features/import.feature index ef2e62d0..9de8e216 100644 --- a/tests/features/import.feature +++ b/tests/features/import.feature @@ -32,7 +32,7 @@ Feature: Importing data And the output should contain "end of entry." Examples: Configs - | config | + | config_file | | basic_onefile.yaml | | basic_encrypted.yaml | # | basic_folder.yaml | @todo @@ -54,7 +54,7 @@ Feature: Importing data And the output should contain "Sed dignissim" Examples: Configs - | config | + | config_file | | basic_onefile.yaml | | basic_encrypted.yaml | # | basic_folder.yaml | @todo diff --git a/tests/features/upgrade.feature b/tests/features/upgrade.feature index fda47363..115eb8ff 100644 --- a/tests/features/upgrade.feature +++ b/tests/features/upgrade.feature @@ -3,24 +3,20 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Scenario: Upgrade and parse journals with square brackets Given we use the config "upgrade_from_195.json" When we run "jrnl -9" and enter "Y" - Then the journal should have 2 entries + When we run "jrnl -99 --short" + Then the output should be + @todo something And the output should contain - """ - 2010-06-10 15:00 A life without chocolate is like a bad analogy. - """ + 2010-06-10 15:00 A life without chocolate is like a bad analogy. And the output should contain - """ - 2013-06-10 15:40 He said "[this] is the best time to be alive". - """ + 2013-06-10 15:40 He said "[this] is the best time to be alive". Scenario: Upgrading a journal encrypted with jrnl 1.x Given we use the config "encrypted_old.json" When we run "jrnl -n 1" and enter - """ - Y - bad doggie no biscuit - bad doggie no biscuit - """ + Y + bad doggie no biscuit + bad doggie no biscuit Then we should be prompted for a password And the output should contain "2013-06-10 15:40 Life is good" @@ -28,44 +24,30 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Given we use the config "no_colors.yaml" When we run "jrnl -n 1" Then the config should have "colors" set to - """ - { - 'date':'none', - 'title':'none', - 'body':'none', - 'tags':'none' - } - """ + date: none + title: none + body: none + tags: none Scenario: Upgrade and parse journals with little endian date format Given we use the config "upgrade_from_195_little_endian_dates.json" When we run "jrnl -9" and enter "Y" - Then the journal should have 2 entries - And the output should contain - """ - 10.06.2010 15:00 A life without chocolate is like a bad analogy. - """ - And the output should contain - """ - 10.06.2013 15:40 He said "[this] is the best time to be alive". - """ + Then the output should be + 10.06.2010 15:00 A life without chocolate is like a bad analogy. + 10.06.2013 15:40 He said "[this] is the best time to be alive". Scenario: Upgrade with missing journal Given we use the config "upgrade_from_195_with_missing_journal.json" - When we run "jrnl -ls" and enter - """" - Y - """ - Then the output should contain "Error: features/journals/missing.journal does not exist." + When we run "jrnl --list" and enter + Y + Then the error output should contain "Error: features/journals/missing.journal does not exist." And we should get no error Scenario: Upgrade with missing encrypted journal Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json" - When we run "jrnl -ls" and enter - """ - Y - bad doggie no biscuit - """ - Then the output should contain "Error: features/journals/missing.journal does not exist." + When we run "jrnl --list" and enter + Y + bad doggie no biscuit + Then the error output should contain "Error: features/journals/missing.journal does not exist." And the error output should contain "We're all done" And we should get no error From 4aabb73847a4bb7a6e56ef7b324c22b15eac3e80 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 1 May 2021 15:57:16 -0700 Subject: [PATCH 0440/1132] Implement datetime handling in pytest-bdd - This was awful and convoluted Co-authored-by: Micah Jerome Ellison --- Makefile | 13 +++- jrnl/DayOneJournal.py | 4 +- jrnl/Entry.py | 4 +- jrnl/Journal.py | 10 +-- jrnl/time.py | 22 +++--- tests/features/datetime.feature | 59 +++++++-------- tests/step_defs/conftest.py | 108 ++++++++++++++++++---------- tests/{ => unit}/test_color.py | 0 tests/{ => unit}/test_display.py | 0 tests/{ => unit}/test_exception.py | 0 tests/{ => unit}/test_export.py | 0 tests/{ => unit}/test_install.py | 0 tests/{ => unit}/test_os_compat.py | 0 tests/{ => unit}/test_override.py | 0 tests/{ => unit}/test_parse_args.py | 0 tests/{ => unit}/test_time.py | 0 16 files changed, 133 insertions(+), 87 deletions(-) rename tests/{ => unit}/test_color.py (100%) rename tests/{ => unit}/test_display.py (100%) rename tests/{ => unit}/test_exception.py (100%) rename tests/{ => unit}/test_export.py (100%) rename tests/{ => unit}/test_install.py (100%) rename tests/{ => unit}/test_os_compat.py (100%) rename tests/{ => unit}/test_override.py (100%) rename tests/{ => unit}/test_parse_args.py (100%) rename tests/{ => unit}/test_time.py (100%) diff --git a/Makefile b/Makefile index 8130dade..454702c6 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,16 @@ lint: ## Check style with various tools poetry run pyflakes jrnl tests poetry run black --check --diff . -test: lint ## Run unit tests and behave tests - poetry run pytest - poetry run behave --no-skipped --format progress2 +unit: # unit tests + poetry run pytest tests/unit + +e2e: # end-to-end tests + poetry run pytest tests/step_defs --gherkin-terminal-reporter --tb=native --diff-type=unified + +e2e-debug: # end-to-end tests + poetry run pytest tests/step_defs --gherkin-terminal-reporter --tb=native --diff-type=unified -x -vv + +test: lint unit e2e ## Run unit tests and behave tests build: poetry build diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 61a60ca0..00271875 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -1,4 +1,4 @@ -from datetime import datetime +import datetime import fnmatch import os from pathlib import Path @@ -116,7 +116,7 @@ class DayOne(Journal.Journal): """Writes only the entries that have been modified into plist files.""" for entry in self.entries: if entry.modified: - utc_time = datetime.utcfromtimestamp( + utc_time = datetime.datetime.utcfromtimestamp( time.mktime(entry.date.timetuple()) ) diff --git a/jrnl/Entry.py b/jrnl/Entry.py index e227794f..56347770 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -2,7 +2,7 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html -from datetime import datetime +import datetime import re import ansiwrap @@ -14,7 +14,7 @@ from .color import highlight_tags_with_background_color class Entry: def __init__(self, journal, date=None, text="", starred=False): self.journal = journal # Reference to journal mainly to access its config - self.date = date or datetime.now() + self.date = date or datetime.datetime.now() self.text = text self._title = None self._body = None diff --git a/jrnl/Journal.py b/jrnl/Journal.py index b889c0d3..181d85c4 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -2,7 +2,7 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html -from datetime import datetime +import datetime import logging import os import re @@ -134,7 +134,9 @@ class Journal: for match in date_blob_re.finditer(journal_txt): date_blob = match.groups()[0] try: - new_date = datetime.strptime(date_blob, self.config["timeformat"]) + new_date = datetime.datetime.strptime( + date_blob, self.config["timeformat"] + ) except ValueError: # Passing in a date that had brackets around it new_date = time.parse(date_blob, bracketed=True) @@ -347,7 +349,7 @@ class LegacyJournal(Journal): """Parses a journal that's stored in a string and returns a list of entries""" # Entries start with a line that looks like 'date title' - let's figure out how # long the date will be by constructing one - date_length = len(datetime.today().strftime(self.config["timeformat"])) + date_length = len(datetime.datetime.today().strftime(self.config["timeformat"])) # Initialise our current entry entries = [] @@ -357,7 +359,7 @@ class LegacyJournal(Journal): line = line.rstrip() try: # try to parse line as date => new entry begins - new_date = datetime.strptime( + new_date = datetime.datetime.strptime( line[:date_length], self.config["timeformat"] ) diff --git a/jrnl/time.py b/jrnl/time.py index b9ea8e84..f4e7319d 100644 --- a/jrnl/time.py +++ b/jrnl/time.py @@ -1,11 +1,11 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from datetime import datetime +import datetime FAKE_YEAR = 9999 -DEFAULT_FUTURE = datetime(FAKE_YEAR, 12, 31, 23, 59, 59) -DEFAULT_PAST = datetime(FAKE_YEAR, 1, 1, 0, 0) +DEFAULT_FUTURE = datetime.datetime(FAKE_YEAR, 12, 31, 23, 59, 59) +DEFAULT_PAST = datetime.datetime(FAKE_YEAR, 1, 1, 0, 0) def __get_pdt_calendar(): @@ -27,7 +27,7 @@ def parse( """Parses a string containing a fuzzy date and returns a datetime.datetime object""" if not date_str: return None - elif isinstance(date_str, datetime): + elif isinstance(date_str, datetime.datetime): return date_str # Don't try to parse anything with 6 or less characters and was parsed from the existing journal. @@ -44,7 +44,9 @@ def parse( date = dateparse(date_str, default=default_date) if date.year == FAKE_YEAR: - date = datetime(datetime.now().year, date.timetuple()[1:6]) + date = datetime.datetime( + datetime.datetime.now().year, date.timetuple()[1:6] + ) else: year_present = True flag = 1 if date.hour == date.minute == 0 else 2 @@ -52,7 +54,7 @@ def parse( except Exception as e: if e.args[0] == "day is out of range for month": y, m, d, H, M, S = default_date.timetuple()[:6] - default_date = datetime(y, m, d - 1, H, M, S) + default_date = datetime.datetime(y, m, d - 1, H, M, S) else: calendar = __get_pdt_calendar() date, flag = calendar.parse(date_str) @@ -60,26 +62,26 @@ def parse( if not flag: # Oops, unparsable. try: # Try and parse this as a single year year = int(date_str) - return datetime(year, 1, 1) + return datetime.datetime(year, 1, 1) except ValueError: return None except TypeError: return None if flag == 1: # Date found, but no time. Use the default time. - date = datetime( + date = datetime.datetime( *date[:3], hour=23 if inclusive else default_hour or 0, minute=59 if inclusive else default_minute or 0, second=59 if inclusive else 0 ) else: - date = datetime(*date[:6]) + date = datetime.datetime(*date[:6]) # Ugly heuristic: if the date is more than 4 weeks in the future, we got the year wrong. # Rather then this, we would like to see parsedatetime patched so we can tell it to prefer # past dates - dt = datetime.now() - date + dt = datetime.datetime.now() - date if dt.days < -28 and not year_present: date = date.replace(date.year - 1) return date diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 0a3f5155..0da3027f 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -36,10 +36,10 @@ Feature: Reading and writing to journal with custom date formats When we run "jrnl " Then we should see the message "Entry added" When we run "jrnl -n 1" - Then the output should contain "" + Then the output should contain "" Examples: Day-first Dates - | config_file | command | output | + | config_file | command | expected_output | | little_endian_dates.yaml | 2020-09-19: My first entry. | 19.09.2020 09:00 My first entry. | | little_endian_dates.yaml | 2020-08-09: My second entry. | 09.08.2020 09:00 My second entry. | | little_endian_dates.yaml | 2020-02-29: Test. | 29.02.2020 09:00 Test. | @@ -53,10 +53,10 @@ Feature: Reading and writing to journal with custom date formats Scenario Outline: Searching for dates with custom date Given we use the config "" When we run "jrnl " - Then the output should be "" + Then the output should be "" Examples: Day-first Dates - | config_file | command | output | + | config_file | command | expected_output | | little_endian_dates.yaml | -on '2013-07-10' --short | 10.07.2013 15:40 Life is good. | | little_endian_dates.yaml | -on 'june 9 2013' --short | 09.06.2013 15:39 My first entry. | | little_endian_dates.yaml | -on 'july 10 2013' --short | 10.07.2013 15:40 Life is good. | @@ -83,47 +83,48 @@ Feature: Reading and writing to journal with custom date formats Then the output should not contain "Life is good" And the output should not contain "But I'm better." - - Scenario Outline: Create entry using day of the week as entry date. + Scenario Outline: Create entry using day of the week as entry date one. Given we use the config "simple.yaml" + And now is "2019-03-12 01:30:32 PM" When we run "jrnl " Then we should see the message "Entry added" When we run "jrnl -1" - Then the output should contain "" + Then the output should contain "" Then the output should contain the date "" Examples: Days of the week - | command | output | date | - | Monday: entry on a monday | entry on a monday | monday at 9am | - | Tuesday: entry on a tuesday | entry on a tuesday | tuesday at 9am | - | Wednesday: entry on a wednesday | entry on a wednesday | wednesday at 9am | - | Thursday: entry on a thursday | entry on a thursday | thursday at 9am | - | Friday: entry on a friday | entry on a friday | friday at 9am | - | Saturday: entry on a saturday | entry on a saturday | saturday at 9am | - | Sunday: entry on a sunday | entry on a sunday | sunday at 9am | - | sunday: entry on a sunday | entry on a sunday | sunday at 9am | - | sUndAy: entry on a sunday | entry on a sunday | sunday at 9am | + | command | expected_output | date | + | Monday: entry on a monday | entry on a monday | 2019-03-11 09:00 | + | Tuesday: entry on a tuesday | entry on a tuesday | 2019-03-05 09:00 | + | Wednesday: entry on a wednesday | entry on a wednesday | 2019-03-06 09:00 | + | Thursday: entry on a thursday | entry on a thursday | 2019-03-07 09:00 | + | Friday: entry on a friday | entry on a friday | 2019-03-08 09:00 | + | Saturday: entry on a saturday | entry on a saturday | 2019-03-09 09:00 | + | Sunday: entry on a sunday | entry on a sunday | 2019-03-10 09:00 | + | sunday: entry on a sunday | entry on a sunday | 2019-03-10 09:00 | + | sUndAy: entry on a sunday | entry on a sunday | 2019-03-10 09:00 | - Scenario Outline: Create entry using day of the week as entry date. + Scenario Outline: Create entry using day of the week as entry date two. Given we use the config "simple.yaml" + And now is "2019-03-12 01:30:32 PM" When we run "jrnl " Then we should see the message "Entry added" When we run "jrnl -1" - Then the output should contain "" + Then the output should contain "" Then the output should contain the date "" Examples: Days of the week - | command | output | date | - | Mon: entry on a monday | entry on a monday | monday at 9am | - | Tue: entry on a tuesday | entry on a tuesday | tuesday at 9am | - | Wed: entry on a wednesday | entry on a wednesday | wednesday at 9am | - | Thu: entry on a thursday | entry on a thursday | thursday at 9am | - | Fri: entry on a friday | entry on a friday | friday at 9am | - | Sat: entry on a saturday | entry on a saturday | saturday at 9am | - | Sun: entry on a sunday | entry on a sunday | sunday at 9am | - | sun: entry on a sunday | entry on a sunday | sunday at 9am | - | sUn: entry on a sunday | entry on a sunday | sunday at 9am | + | command | expected_output | date | + | Mon: entry on a monday | entry on a monday | 2019-03-11 09:00 | + | Tue: entry on a tuesday | entry on a tuesday | 2019-03-05 09:00 | + | Wed: entry on a wednesday | entry on a wednesday | 2019-03-06 09:00 | + | Thu: entry on a thursday | entry on a thursday | 2019-03-07 09:00 | + | Fri: entry on a friday | entry on a friday | 2019-03-08 09:00 | + | Sat: entry on a saturday | entry on a saturday | 2019-03-09 09:00 | + | Sun: entry on a sunday | entry on a sunday | 2019-03-10 09:00 | + | sun: entry on a sunday | entry on a sunday | 2019-03-10 09:00 | + | sUn: entry on a sunday | entry on a sunday | 2019-03-10 09:00 | Scenario: Journals with unreadable dates should still be loaded diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index ea561ba0..e49b8217 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -4,6 +4,7 @@ import ast import json import os +from datetime import datetime from collections import defaultdict from keyring import backend from keyring import set_keyring @@ -15,6 +16,7 @@ import re import shutil import tempfile from unittest.mock import patch +from unittest.mock import MagicMock from xml.etree import ElementTree from pytest_bdd import given @@ -31,6 +33,7 @@ from jrnl.cli import cli from jrnl.config import load_config from jrnl.os_compat import split_args from jrnl.os_compat import on_windows +from jrnl.time import __get_pdt_calendar class TestKeyring(backend.KeyringBackend): @@ -99,10 +102,6 @@ def pytest_bdd_apply_tag(tag, function): # ----- UTILS ----- # -def failed_msg(msg, expected, actual): - return f"{msg}\nExpected:\n{expected}\n---end---\nActual:\n{actual}\n---end---\n" - - def read_value_from_string(string): if string[0] == "{": # Handle value being a dictionary @@ -142,6 +141,11 @@ def password(): return "" +@fixture +def now_date(): + return {"datetime": datetime, "calendar_parse": __get_pdt_calendar()} + + @fixture def cache_dir(): return {"exists": False, "path": ""} @@ -251,6 +255,29 @@ def we_enter_editor(editor_method, editor_input, editor_state): editor_state["intent"] = {"method": file_method, "input": editor_input} +@given(parse('now is ""'), target_fixture="now_date") +@given(parse('now is "{date_str}"'), target_fixture="now_date") +def now_is_str(date_str): + class DatetimeMagicMock(MagicMock): + # needed because jrnl does some reflection on datetime + def __instancecheck__(self, subclass): + return isinstance(subclass, datetime) + + my_date = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") + + # jrnl uses two different classes to parse dates, so both must be mocked + datetime_mock = DatetimeMagicMock(wraps=datetime) + datetime_mock.now.return_value = my_date + + pdt = __get_pdt_calendar() + calendar_mock = MagicMock(wraps=pdt) + calendar_mock.parse.side_effect = lambda date_str_input: pdt.parse( + date_str_input, my_date + ) + + return {"datetime": datetime_mock, "calendar_parse": calendar_mock} + + @then(parse("the editor should have been called")) @then(parse("the editor should have been called with {num_args} arguments")) def count_editor_args(num_args, cli_run, editor_state): @@ -328,9 +355,9 @@ def we_run( cli_run, capsys, password, - keyring, cache_dir, editor, + now_date, ): if cache_dir["exists"]: command = command.format(cache_dir=cache_dir["path"]) @@ -354,6 +381,8 @@ def we_run( patch("sys.stdin.read", side_effect=user_input) as mock_stdin, \ patch("builtins.input", side_effect=user_input) as mock_input, \ patch("getpass.getpass", side_effect=password) as mock_getpass, \ + patch("datetime.datetime", new=now_date["datetime"]), \ + patch("jrnl.time.__get_pdt_calendar", return_value=now_date["calendar_parse"]), \ patch("jrnl.install.get_config_path", return_value=config_path), \ patch("jrnl.config.get_config_path", return_value=config_path), \ patch("subprocess.call", side_effect=editor) as mock_editor \ @@ -392,48 +421,53 @@ def output_should_match(regex, cli_run): assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" -@then(parse("the output should contain\n{output}")) -@then(parse('the output should contain "{output}"')) -@then('the output should contain ""') -@then(parse("the {which_output_stream} output should contain\n{output}")) -@then(parse('the {which_output_stream} output should contain "{output}"')) -def output_should_contain(output, which_output_stream, cli_run): - assert output +@then(parse("the output should contain\n{expected_output}")) +@then(parse('the output should contain "{expected_output}"')) +@then('the output should contain ""') +@then(parse("the {which_output_stream} output should contain\n{expected_output}")) +@then(parse('the {which_output_stream} output should contain "{expected_output}"')) +def output_should_contain(expected_output, which_output_stream, cli_run): + assert expected_output if which_output_stream is None: - assert (output in cli_run["stdout"]) or (output in cli_run["stderr"]) + assert (expected_output in cli_run["stdout"]) or ( + expected_output in cli_run["stderr"] + ) elif which_output_stream == "standard": - assert output in cli_run["stdout"] + assert expected_output in cli_run["stdout"] elif which_output_stream == "error": - assert output in cli_run["stderr"] + assert expected_output in cli_run["stderr"] else: - assert output in cli_run[which_output_stream] + assert expected_output in cli_run[which_output_stream] -@then(parse("the output should not contain\n{output}")) -@then(parse('the output should not contain "{output}"')) -@then('the output should not contain ""') -def output_should_not_contain(output, cli_run): - assert output not in cli_run["stdout"] +@then(parse("the output should not contain\n{expected_output}")) +@then(parse('the output should not contain "{expected_output}"')) +@then('the output should not contain ""') +def output_should_not_contain(expected_output, cli_run): + assert expected_output not in cli_run["stdout"] + + +@then(parse("the output should be\n{expected_output}")) +@then(parse('the output should be "{expected_output}"')) +@then('the output should be ""') +def output_should_be(expected_output, cli_run): + actual = cli_run["stdout"].strip() + expected = expected_output.strip() + assert expected == actual -@then(parse("the output should be\n{str_value}")) -@then(parse('the output should be "{str_value}"')) -@then('the output should be ""') @then("the output should be empty") -def output_should_be(str_value, cli_run): - actual_out = cli_run["stdout"].strip() - expected = str_value.strip() - assert expected == actual_out, failed_msg( - "Output does not match.", expected, actual_out - ) +def output_should_be_empty(cli_run): + actual = cli_run["stdout"].strip() + assert actual == "" @then('the output should contain the date ""') -def output_should_contain_date(output, cli_run): - assert output and output in cli_run["stdout"] +def output_should_contain_date(date, cli_run): + assert date and date in cli_run["stdout"] @then("the output should contain pyproject.toml version") @@ -574,12 +608,12 @@ def assert_output_is_valid_language(cli_run, language_name): @given(parse("we parse the output as {language_name}"), target_fixture="parsed_output") def parse_output_as_language(cli_run, language_name): language_name = language_name.upper() - output = cli_run["stdout"] + actual_output = cli_run["stdout"] if language_name == "XML": - parsed_output = ElementTree.fromstring(output) + parsed_output = ElementTree.fromstring(actual_output) elif language_name == "JSON": - parsed_output = json.loads(output) + parsed_output = json.loads(actual_output) else: assert False, f"Language name {language_name} not recognized" @@ -669,6 +703,6 @@ def assert_output_field_content( @then(parse('there should be {number:d} "{item}" elements')) def count_elements(number, item, cli_run): - output = cli_run["stdout"] - xml_tree = ElementTree.fromstring(output) + actual_output = cli_run["stdout"] + xml_tree = ElementTree.fromstring(actual_output) assert len(xml_tree.findall(".//" + item)) == number diff --git a/tests/test_color.py b/tests/unit/test_color.py similarity index 100% rename from tests/test_color.py rename to tests/unit/test_color.py diff --git a/tests/test_display.py b/tests/unit/test_display.py similarity index 100% rename from tests/test_display.py rename to tests/unit/test_display.py diff --git a/tests/test_exception.py b/tests/unit/test_exception.py similarity index 100% rename from tests/test_exception.py rename to tests/unit/test_exception.py diff --git a/tests/test_export.py b/tests/unit/test_export.py similarity index 100% rename from tests/test_export.py rename to tests/unit/test_export.py diff --git a/tests/test_install.py b/tests/unit/test_install.py similarity index 100% rename from tests/test_install.py rename to tests/unit/test_install.py diff --git a/tests/test_os_compat.py b/tests/unit/test_os_compat.py similarity index 100% rename from tests/test_os_compat.py rename to tests/unit/test_os_compat.py diff --git a/tests/test_override.py b/tests/unit/test_override.py similarity index 100% rename from tests/test_override.py rename to tests/unit/test_override.py diff --git a/tests/test_parse_args.py b/tests/unit/test_parse_args.py similarity index 100% rename from tests/test_parse_args.py rename to tests/unit/test_parse_args.py diff --git a/tests/test_time.py b/tests/unit/test_time.py similarity index 100% rename from tests/test_time.py rename to tests/unit/test_time.py From ef25c50e16087ec4ea0fff2e16b837385743fcd6 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 15 May 2021 14:50:49 -0700 Subject: [PATCH 0441/1132] Implement step for directory journals Co-authored-by: Jonathan Wren --- tests/step_defs/conftest.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index e49b8217..3d3b6246 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -31,6 +31,7 @@ import toml from jrnl import __version__ from jrnl.cli import cli from jrnl.config import load_config +from jrnl.config import scope_config from jrnl.os_compat import split_args from jrnl.os_compat import on_windows from jrnl.time import __get_pdt_calendar @@ -112,6 +113,13 @@ def read_value_from_string(string): value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t](value) return value +def assert_directory_contains_files(file_list, directory_path): + assert os.path.isdir(directory_path), "Directory path is not a directory" + + for file in file_list.split("\n"): + fullpath = directory_path + '/' + file + assert os.path.isfile(fullpath) + # ----- FIXTURES ----- # @fixture @@ -358,6 +366,7 @@ def we_run( cache_dir, editor, now_date, + keyring ): if cache_dir["exists"]: command = command.format(cache_dir=cache_dir["path"]) @@ -527,15 +536,17 @@ def password_was_not_called(cli_run): @then(parse("the cache directory should contain the files\n{file_list}")) def assert_dir_contains_files(file_list, cache_dir): - actual_files = os.listdir(cache_dir["path"]) - expected_files = file_list.split("\n") + assert_directory_contains_files(file_list, cache_dir["path"]) - # sort to deal with inconsistent default file ordering on different OS's - actual_files.sort() - expected_files.sort() +@then(parse("the journal directory should contain\n{file_list}")) +def journal_directory_should_contain(config_data, file_list, journal_name): + if not journal_name: + journal_name = "default" - assert actual_files == expected_files, [actual_files, expected_files] + scoped_config = scope_config(config_data, journal_name) + journal_path = scoped_config["journal"] + assert_directory_contains_files(file_list, journal_path) @given("we create a cache directory", target_fixture="cache_dir") def create_cache_dir(temp_dir): @@ -706,3 +717,4 @@ def count_elements(number, item, cli_run): actual_output = cli_run["stdout"] xml_tree = ElementTree.fromstring(actual_output) assert len(xml_tree.findall(".//" + item)) == number + From 7647755e964ac06e93ae5d48e78876be7df59ecd Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 15 May 2021 15:31:23 -0700 Subject: [PATCH 0442/1132] Implement journal existence check Co-authored-by: Jonathan Wren --- tests/step_defs/conftest.py | 45 ++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 3d3b6246..b64d9965 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -113,12 +113,17 @@ def read_value_from_string(string): value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t](value) return value -def assert_directory_contains_files(file_list, directory_path): - assert os.path.isdir(directory_path), "Directory path is not a directory" + +def does_directory_contain_files(file_list, directory_path): + if not os.path.isdir(directory_path): + return False for file in file_list.split("\n"): - fullpath = directory_path + '/' + file - assert os.path.isfile(fullpath) + fullpath = directory_path + "/" + file + if not os.path.isfile(fullpath): + return False + + return True # ----- FIXTURES ----- # @@ -366,7 +371,7 @@ def we_run( cache_dir, editor, now_date, - keyring + keyring, ): if cache_dir["exists"]: command = command.format(cache_dir=cache_dir["path"]) @@ -536,17 +541,32 @@ def password_was_not_called(cli_run): @then(parse("the cache directory should contain the files\n{file_list}")) def assert_dir_contains_files(file_list, cache_dir): - assert_directory_contains_files(file_list, cache_dir["path"]) + assert does_directory_contain_files(file_list, cache_dir["path"]) + @then(parse("the journal directory should contain\n{file_list}")) -def journal_directory_should_contain(config_data, file_list, journal_name): - if not journal_name: - journal_name = "default" +def journal_directory_should_contain(config_data, file_list): + scoped_config = scope_config(config_data, "default") - scoped_config = scope_config(config_data, journal_name) - journal_path = scoped_config["journal"] + assert does_directory_contain_files(file_list, scoped_config["journal"]) + + +@then(parse("the journal {should_or_should_not} exist")) +def journal_should_not_exist(config_data, should_or_should_not): + scoped_config = scope_config(config_data, "default") + expected_path = scoped_config["journal"] + + contains_files = does_directory_contain_files(expected_path, ".") + + if should_or_should_not == "should": + assert contains_files + elif should_or_should_not == "should not": + assert not contains_files + else: + raise Exception( + "should_or_should_not valid values are 'should' or 'should not'" + ) - assert_directory_contains_files(file_list, journal_path) @given("we create a cache directory", target_fixture="cache_dir") def create_cache_dir(temp_dir): @@ -717,4 +737,3 @@ def count_elements(number, item, cli_run): actual_output = cli_run["stdout"] xml_tree = ElementTree.fromstring(actual_output) assert len(xml_tree.findall(".//" + item)) == number - From 5d4d68fe327159340a81b2c2fffc95c449a7e8db Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 15 May 2021 16:41:43 -0700 Subject: [PATCH 0443/1132] Implement directory changing and relative directory test Co-authored-by: Jonathan Wren --- tests/features/file_storage.feature | 4 ++-- tests/step_defs/conftest.py | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/features/file_storage.feature b/tests/features/file_storage.feature index 24407fa1..dc6fd535 100644 --- a/tests/features/file_storage.feature +++ b/tests/features/file_storage.feature @@ -32,11 +32,11 @@ Feature: Journals iteracting with the file system in a way that users can see Then the output should contain "This is a new entry in my journal" Scenario: Creating journal with relative path should update to absolute path - Given we use the config "missingconfig" When we run "jrnl hello world" and enter test.txt n - And we change directory to "features" + Then the output should contain "Journal 'default' created" + When we change directory to "subfolder" And we run "jrnl -n 1" Then the output should contain "hello world" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index b64d9965..2c58c382 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -141,6 +141,10 @@ def temp_dir(): def working_dir(request): return os.path.join(request.config.rootpath, "tests") +@fixture +def config_path(temp_dir): + os.chdir(temp_dir.name) + return temp_dir.name + "/jrnl.yaml" @fixture def toml_version(working_dir): @@ -197,7 +201,7 @@ def keyring_type(): @fixture def config_data(config_path): return load_config(config_path) - + @fixture def journal_name(): @@ -551,6 +555,14 @@ def journal_directory_should_contain(config_data, file_list): assert does_directory_contain_files(file_list, scoped_config["journal"]) +@when(parse('we change directory to "{directory_name}"')) +def when_we_change_directory(directory_name): + if not os.path.isdir(directory_name): + os.mkdir(directory_name) + + os.chdir(directory_name) + + @then(parse("the journal {should_or_should_not} exist")) def journal_should_not_exist(config_data, should_or_should_not): scoped_config = scope_config(config_data, "default") From 512fb63e1f9a84ba6322c0e2888ac95e28f2563b Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 15 May 2021 16:51:40 -0700 Subject: [PATCH 0444/1132] Implement test to check editor temporary filename Co-authored-by: Jonathan Wren --- tests/features/file_storage.feature | 4 ++-- tests/step_defs/conftest.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/features/file_storage.feature b/tests/features/file_storage.feature index dc6fd535..f81f2710 100644 --- a/tests/features/file_storage.feature +++ b/tests/features/file_storage.feature @@ -44,9 +44,9 @@ Feature: Journals iteracting with the file system in a way that users can see Given we use the config "editor.yaml" When we run "jrnl --edit" Then the editor should have been called - Then the temporary filename suffix should be ".jrnl" + Then the editor filename should end with ".jrnl" Scenario: the temporary filename suffix should be "-{template_filename}" Given we use the config "editor_markdown_extension.yaml" When we run "jrnl --edit" - Then the temporary filename suffix should be "-extension.md" + Then the editor filename should end with "-extension.md" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 2c58c382..57a0de03 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -141,11 +141,13 @@ def temp_dir(): def working_dir(request): return os.path.join(request.config.rootpath, "tests") + @fixture def config_path(temp_dir): os.chdir(temp_dir.name) return temp_dir.name + "/jrnl.yaml" + @fixture def toml_version(working_dir): pyproject = os.path.join(working_dir, "..", "pyproject.toml") @@ -201,7 +203,7 @@ def keyring_type(): @fixture def config_data(config_path): return load_config(config_path) - + @fixture def journal_name(): @@ -304,6 +306,13 @@ def count_editor_args(num_args, cli_run, editor_state): assert len(editor_state["command"]) == int(num_args) +@then(parse('the editor filename should end with "{suffix}"')) +def editor_filename_suffix(suffix, editor_state): + editor_filename = editor_state["tmpfile"]["name"] + + assert editor_state["tmpfile"]["name"].endswith(suffix), (editor_filename, suffix) + + @then(parse('the editor file content should {comparison} "{str_value}"')) @then(parse("the editor file content should {comparison} empty")) @then(parse("the editor file content should {comparison}\n{str_value}")) From 44b1762b7d947ab93ec123e48e50b4392ec04ece Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 22 May 2021 12:32:59 -0700 Subject: [PATCH 0445/1132] Implement stream redirection in pytest-bdd - Take out old steps from format and input tests Co-authored-by: Micah Jerome Ellison --- tests/features/format.feature | 2 -- tests/features/import.feature | 3 +-- tests/step_defs/conftest.py | 17 +++++++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tests/features/format.feature b/tests/features/format.feature index 648b4dd0..b9e2e384 100644 --- a/tests/features/format.feature +++ b/tests/features/format.feature @@ -163,7 +163,6 @@ Feature: Custom formats More stuff more stuff again - Then we flush the output When we run "jrnl -1 --export markdown" Then the output should be # 2020 @@ -224,7 +223,6 @@ Feature: Custom formats [2020-10-29 11:11] First entry. [2020-10-29 11:11] Second entry. [2020-10-29 11:13] Third entry. - Then we flush the output When we run "jrnl -3 --format markdown" Then the output should be # 2020 diff --git a/tests/features/import.feature b/tests/features/import.feature index 9de8e216..d75d6017 100644 --- a/tests/features/import.feature +++ b/tests/features/import.feature @@ -4,8 +4,7 @@ Feature: Importing data Given we use the config "" And we use the password "test" if prompted When we run "jrnl --import" and pipe "[2020-07-05 15:00] Observe and import." - Then we flush the output - When we run "jrnl -c import" + When we run "jrnl -9 --short" Then the output should contain "Observe and import" Examples: Configs diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 57a0de03..9e482737 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -160,6 +160,10 @@ def password(): return "" +@fixture +def input_method(): + return "" + @fixture def now_date(): return {"datetime": datetime, "calendar_parse": __get_pdt_calendar()} @@ -368,10 +372,10 @@ def use_password_forever(pw): return pw -@when(parse('we run "jrnl {command}" and enter\n{user_input}')) -@when(parsers.re('we run "jrnl (?P[^"]+)" and enter "(?P[^"]+)"')) +@when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) +@when(parsers.re('we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"')) +@when(parse('we run "jrnl" and {input_method} "{user_input}"')) @when(parse('we run "jrnl {command}"')) -@when(parse('we run "jrnl" and enter "{user_input}"')) @when('we run "jrnl "') @when('we run "jrnl"') def we_run( @@ -385,7 +389,11 @@ def we_run( editor, now_date, keyring, + input_method, ): + assert input_method in ['', 'enter', 'pipe'] + is_tty = input_method != 'pipe' + if cache_dir["exists"]: command = command.format(cache_dir=cache_dir["path"]) @@ -393,7 +401,7 @@ def we_run( status = 0 if user_input: - user_input = user_input.splitlines() + user_input = user_input.splitlines() if is_tty else [user_input] if password: password = password.splitlines() @@ -406,6 +414,7 @@ def we_run( with \ patch("sys.argv", ['jrnl'] + args), \ patch("sys.stdin.read", side_effect=user_input) as mock_stdin, \ + patch("sys.stdin.isatty", return_value=is_tty), \ patch("builtins.input", side_effect=user_input) as mock_input, \ patch("getpass.getpass", side_effect=password) as mock_getpass, \ patch("datetime.datetime", new=now_date["datetime"]), \ From b7b7bad2fbc49bd74674140484683dfb1350e42b Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 22 May 2021 14:15:43 -0700 Subject: [PATCH 0446/1132] Clarify and cleanup tests - Run formatter - Take out old tags - Use new steps on tests Co-authored-by: Micah Jerome Ellison --- tests/data/configs/multiple.yaml | 2 +- tests/features/encrypt.feature | 2 +- tests/features/multiple_journals.feature | 43 +++++++++++++----------- tests/features/search.feature | 2 +- tests/step_defs/conftest.py | 20 +++++++++-- 5 files changed, 44 insertions(+), 25 deletions(-) diff --git a/tests/data/configs/multiple.yaml b/tests/data/configs/multiple.yaml index 65f2c256..1501b383 100644 --- a/tests/data/configs/multiple.yaml +++ b/tests/data/configs/multiple.yaml @@ -6,7 +6,7 @@ highlight: true template: false journals: default: features/journals/simple.journal - ideas: features/journals/nothing.journal + ideas: features/journals/does-not-exist.journal simple: features/journals/simple.journal work: features/journals/work.journal new_encrypted: diff --git a/tests/features/encrypt.feature b/tests/features/encrypt.feature index b9b9ff5a..daa9f109 100644 --- a/tests/features/encrypt.feature +++ b/tests/features/encrypt.feature @@ -3,8 +3,8 @@ Feature: Encrypting and decrypting journals Scenario: Decrypting a journal Given we use the config "encrypted.yaml" When we run "jrnl --decrypt" and enter "bad doggie no biscuit" + Then we should see the message "Journal decrypted" Then the config for journal "default" should have "encrypt" set to "bool:False" - And we should see the message "Journal decrypted" When we run "jrnl -99 --short" Then the output should be 2013-06-09 15:39 My first entry. diff --git a/tests/features/multiple_journals.feature b/tests/features/multiple_journals.feature index 4be3ab1c..cd531ee2 100644 --- a/tests/features/multiple_journals.feature +++ b/tests/features/multiple_journals.feature @@ -4,30 +4,32 @@ Feature: Multiple journals Given we use the config "multiple.yaml" When we run "jrnl -99 --short" Then the output should be - @todo something + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. When we run "jrnl work -99 --short" - Then the output should be - @todo something + Then the output should be empty Scenario: Write to default config by default Given we use the config "multiple.yaml" When we run "jrnl this goes to default" When we run "jrnl -99 --short" - Then the output should be - @todo something + Then the output should contain + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. + Then the output should contain + this goes to default When we run "jrnl work -99 --short" - Then the output should be - @todo something + Then the output should be empty Scenario: Write to specified journal Given we use the config "multiple.yaml" When we run "jrnl work a long day in the office" When we run "jrnl -99 --short" Then the output should be - @todo something + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. When we run "jrnl work -99 --short" - Then the output should be - @todo something + Then the output should contain "a long day in the office" Scenario: Tell user which journal was used Given we use the config "multiple.yaml" @@ -39,29 +41,32 @@ Feature: Multiple journals When we run "jrnl work 23 july 2012: a long day in the office" When we run "jrnl -99 --short" Then the output should be - @todo something + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. When we run "jrnl work -99 --short" Then the output should be - @todo something + 2012-07-23 09:00 a long day in the office Scenario: Write to specified journal without a timestamp but with colon Given we use the config "multiple.yaml" When we run "jrnl work : a long day in the office" Then the output should be - @todo something + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. When we run "jrnl work -99 --short" - Then the output should be - @todo something + Then the output should be contain + a long day in the office Scenario: Write to specified journal without a timestamp but with colon Given we use the config "multiple.yaml" When we run "jrnl work: a long day in the office" When we run "jrnl -99 --short" Then the output should be - @todo something + 2013-06-09 15:39 My first entry. + 2013-06-10 15:40 Life is good. When we run "jrnl work -99 --short" - Then the output should be - @todo something + Then the output should contain + a long day in the office Scenario: Create new journals as required Given we use the config "multiple.yaml" @@ -69,7 +74,7 @@ Feature: Multiple journals When we run "jrnl ideas 23 july 2012: sell my junk on ebay and make lots of money" When we run "jrnl ideas -99 --short" Then the output should be - @todo something + 2012-07-23 09:00 sell my junk on ebay and make lots of money Scenario: Don't crash if no default journal is specified Given we use the config "bug343.yaml" diff --git a/tests/features/search.feature b/tests/features/search.feature index 0bd0fb79..8d951aaf 100644 --- a/tests/features/search.feature +++ b/tests/features/search.feature @@ -267,7 +267,7 @@ Feature: Searching in a journal Scenario Outline: Searching today in history Given we use the config "" And we use the password "test" if prompted - And we set current date and time to "2020-08-31 14:32" + And now is "2020-08-31 02:32:00 PM" When we run "jrnl 2019-08-31 01:01: Hi, from last year." And we run "jrnl -today-in-history --short" Then the output should be diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 9e482737..c6d36f89 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -164,6 +164,7 @@ def password(): def input_method(): return "" + @fixture def now_date(): return {"datetime": datetime, "calendar_parse": __get_pdt_calendar()} @@ -373,7 +374,11 @@ def use_password_forever(pw): @when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) -@when(parsers.re('we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"')) +@when( + parsers.re( + 'we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"' + ) +) @when(parse('we run "jrnl" and {input_method} "{user_input}"')) @when(parse('we run "jrnl {command}"')) @when('we run "jrnl "') @@ -391,8 +396,8 @@ def we_run( keyring, input_method, ): - assert input_method in ['', 'enter', 'pipe'] - is_tty = input_method != 'pipe' + assert input_method in ["", "enter", "pipe"] + is_tty = input_method != "pipe" if cache_dir["exists"]: command = command.format(cache_dir=cache_dir["path"]) @@ -573,6 +578,15 @@ def journal_directory_should_contain(config_data, file_list): assert does_directory_contain_files(file_list, scoped_config["journal"]) +@then(parse('journal "{journal_name}" should not exist')) +def journal_directory_should_contain(config_data, journal_name): + scoped_config = scope_config(config_data, journal_name) + + assert not does_directory_contain_files( + scoped_config["journal"], "." + ), f'Journal "{journal_name}" does exist' + + @when(parse('we change directory to "{directory_name}"')) def when_we_change_directory(directory_name): if not os.path.isdir(directory_name): From 5572833652bef5473ee53910d57739839be0c223 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 22 May 2021 17:11:14 -0700 Subject: [PATCH 0447/1132] Rewrite config checking steps in pytest-bdd - Take out old type coersion (it was causing needles complexity) - Take out `read_value_from_string` function - Use taml parser to parse yaml instead of using custom function - Update tests to use new implementation Co-authored-by: Micah Jerome Ellison --- tests/features/encrypt.feature | 6 +-- tests/features/password.feature | 10 ++-- tests/features/upgrade.feature | 14 +++--- tests/step_defs/conftest.py | 81 ++++++++++++++++----------------- 4 files changed, 56 insertions(+), 55 deletions(-) diff --git a/tests/features/encrypt.feature b/tests/features/encrypt.feature index daa9f109..31d53520 100644 --- a/tests/features/encrypt.feature +++ b/tests/features/encrypt.feature @@ -4,7 +4,7 @@ Feature: Encrypting and decrypting journals Given we use the config "encrypted.yaml" When we run "jrnl --decrypt" and enter "bad doggie no biscuit" Then we should see the message "Journal decrypted" - Then the config for journal "default" should have "encrypt" set to "bool:False" + And the config for journal "default" should contain "encrypt: false" When we run "jrnl -99 --short" Then the output should be 2013-06-09 15:39 My first entry. @@ -16,7 +16,7 @@ Feature: Encrypting and decrypting journals # This should warn the user that the journal is already encrypted Given we use the config "simple.yaml" When we run "jrnl --decrypt" - Then the config for journal "default" should have "encrypt" set to "bool:False" + Then the config for journal "default" should contain "encrypt: false" When we run "jrnl -99 --short" Then the output should be 2013-06-09 15:39 My first entry. @@ -35,7 +35,7 @@ Feature: Encrypting and decrypting journals swordfish n Then we should see the message "Journal encrypted" - And the config for journal "default" should have "encrypt" set to "bool:True" + And the config for journal "default" should contain "encrypt: true" When we run "jrnl -n 1" and enter "swordfish" Then we should be prompted for a password And the output should contain "2013-06-10 15:40 Life is good" diff --git a/tests/features/password.feature b/tests/features/password.feature index d3116fed..ed8aea5f 100644 --- a/tests/features/password.feature +++ b/tests/features/password.feature @@ -7,7 +7,7 @@ Feature: Using the installed keyring sabertooth sabertooth Y - Then the config for journal "simple" should have "encrypt" set to "bool:True" + Then the config for journal "simple" should contain "encrypt: true" When we run "jrnl simple -n 1" Then the output should contain "2013-06-10 15:40 Life is good" @@ -58,7 +58,7 @@ Feature: Using the installed keyring Then we should see the message "Failed to retrieve keyring" And we should get no error And we should be prompted for a password - And the config for journal "default" should have "encrypt" set to "bool:True" + And the config for journal "default" should contain "encrypt: true" Scenario: Decrypt journal when keyring exists but fails @@ -70,7 +70,7 @@ Feature: Using the installed keyring And we should get no error And we should be prompted for a password And we should see the message "Journal decrypted" - And the config for journal "default" should have "encrypt" set to "bool:False" + And the config for journal "default" should contain "encrypt: false" When we run "jrnl --short" Then we should not be prompted for a password And the output should be @@ -97,7 +97,7 @@ Feature: Using the installed keyring sordfish Then we should be prompted for a password And we should see the message "Passwords did not match" - And the config for journal "default" should not have "encrypt" set + And the config for journal "default" should not contain "encrypt: true" When we run "jrnl --short" Then the output should be 2013-06-09 15:39 My first entry. @@ -115,7 +115,7 @@ Feature: Using the installed keyring Then we should be prompted for a password And we should see the message "Passwords did not match" And we should see the message "Journal encrypted" - And the config for journal "default" should have "encrypt" set to "bool:True" + And the config for journal "default" should contain "encrypt: true" When we run "jrnl -1" and enter "swordfish" Then we should be prompted for a password And the output should contain "2013-06-10 15:40 Life is good" diff --git a/tests/features/upgrade.feature b/tests/features/upgrade.feature index 115eb8ff..bb050fa1 100644 --- a/tests/features/upgrade.feature +++ b/tests/features/upgrade.feature @@ -5,7 +5,8 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x When we run "jrnl -9" and enter "Y" When we run "jrnl -99 --short" Then the output should be - @todo something + 2010-06-10 15:00 A life without chocolate is like a bad analogy. + 2013-06-10 15:40 He said "[this] is the best time to be alive".Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada And the output should contain 2010-06-10 15:00 A life without chocolate is like a bad analogy. And the output should contain @@ -23,11 +24,12 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Scenario: Upgrading a config without colors to colors Given we use the config "no_colors.yaml" When we run "jrnl -n 1" - Then the config should have "colors" set to - date: none - title: none - body: none - tags: none + Then the config should contain + colors: + date: none + title: none + body: none + tags: none Scenario: Upgrade and parse journals with little endian date format Given we use the config "upgrade_from_195_little_endian_dates.json" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index c6d36f89..4f934d31 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -15,6 +15,7 @@ import string import re import shutil import tempfile +import yaml from unittest.mock import patch from unittest.mock import MagicMock from xml.etree import ElementTree @@ -103,17 +104,6 @@ def pytest_bdd_apply_tag(tag, function): # ----- UTILS ----- # -def read_value_from_string(string): - if string[0] == "{": - # Handle value being a dictionary - return ast.literal_eval(string) - - # Takes strings like "bool:true" or "int:32" and coerces them into proper type - t, value = string.split(":") - value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[t](value) - return value - - def does_directory_contain_files(file_list, directory_path): if not os.path.isdir(directory_path): return False @@ -523,37 +513,46 @@ def should_see_the_message(text, cli_run): assert text in out, [text, out] -@then(parse('the config should have "{key}" set to\n{str_value}')) -@then(parse('the config should have "{key}" set to "{str_value}"')) -@then( - parse( - 'the config for journal "{journal_name}" should have "{key}" set to "{str_value}"' - ) -) -@then(parse('the config should {should_not} have "{key}" set')) -@then(parse('the config should {should_not} have "{key}" set')) -@then( - parse( - 'the config for journal "{journal_name}" should {should_not} have "{key}" set' - ) -) -def config_var(config_data, key, str_value, journal_name, should_not): - str_value = read_value_from_string(str_value) if len(str_value) else str_value - - configuration = config_data - if journal_name: - configuration = configuration["journals"][journal_name] - - # is the config a string? - # @todo this should probably be a function - if type(configuration) is str: - configuration = {"journal": configuration} - - if should_not: - assert key not in configuration +def parse_should_or_should_not(should_or_should_not): + if should_or_should_not == "should": + return True + elif should_or_should_not == "should not": + return False else: - assert key in configuration - assert configuration[key] == str_value + raise Exception( + "should_or_should_not valid values are 'should' or 'should not'" + ) + + +@then( + parse( + 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' + ) +) +@then( + parse( + 'the config for journal "{journal_name}" {should_or_should_not} contain\n{some_yaml}' + ) +) +@then(parse('the config {should_or_should_not} contain "{some_yaml}"')) +@then(parse("the config {should_or_should_not} contain\n{some_yaml}")) +def config_var(config_data, journal_name, should_or_should_not, some_yaml): + we_should = parse_should_or_should_not(should_or_should_not) + + actual = config_data + if journal_name: + actual = actual["journals"][journal_name] + + expected = yaml.load(some_yaml, Loader=yaml.FullLoader) + + actual_slice = actual + if type(actual) is dict: + actual_slice = {key: actual.get(key, None) for key in expected.keys()} + + if we_should: + assert expected == actual_slice + else: + assert expected != actual_slice @then("we should be prompted for a password") From 0c8efd5331b0f9d73bb7cee7b44ddc18d76846cb Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 22 May 2021 17:25:40 -0700 Subject: [PATCH 0448/1132] Cleanup last few tests - Misc linting issues - Whitespace cleanup - Entire test suite is now passing - Add misc todo items in comments Co-authored-by: Micah Jerome Ellison --- tests/features/upgrade.feature | 13 ++++++------- tests/step_defs/conftest.py | 8 +++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/features/upgrade.feature b/tests/features/upgrade.feature index bb050fa1..e5714a82 100644 --- a/tests/features/upgrade.feature +++ b/tests/features/upgrade.feature @@ -33,16 +33,15 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Scenario: Upgrade and parse journals with little endian date format Given we use the config "upgrade_from_195_little_endian_dates.json" - When we run "jrnl -9" and enter "Y" - Then the output should be + When we run "jrnl -9 --short" and enter "Y" + Then the output should contain 10.06.2010 15:00 A life without chocolate is like a bad analogy. 10.06.2013 15:40 He said "[this] is the best time to be alive". Scenario: Upgrade with missing journal Given we use the config "upgrade_from_195_with_missing_journal.json" - When we run "jrnl --list" and enter - Y - Then the error output should contain "Error: features/journals/missing.journal does not exist." + When we run "jrnl --list" and enter "Y" + Then the output should contain "Error: features/journals/missing.journal does not exist." And we should get no error Scenario: Upgrade with missing encrypted journal @@ -50,6 +49,6 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x When we run "jrnl --list" and enter Y bad doggie no biscuit - Then the error output should contain "Error: features/journals/missing.journal does not exist." - And the error output should contain "We're all done" + Then the output should contain "Error: features/journals/missing.journal does not exist." + And the output should contain "We're all done" And we should get no error diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 4f934d31..12eb948c 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -1,7 +1,6 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import ast import json import os from datetime import datetime @@ -406,6 +405,7 @@ def we_run( # fmt: off # see: https://github.com/psf/black/issues/664 + # @todo https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack with \ patch("sys.argv", ['jrnl'] + args), \ patch("sys.stdin.read", side_effect=user_input) as mock_stdin, \ @@ -578,7 +578,7 @@ def journal_directory_should_contain(config_data, file_list): @then(parse('journal "{journal_name}" should not exist')) -def journal_directory_should_contain(config_data, journal_name): +def journal_directory_should_not_exist(config_data, journal_name): scoped_config = scope_config(config_data, journal_name) assert not does_directory_contain_files( @@ -723,9 +723,7 @@ def assert_parsed_output_item_count(node_name, number, parsed_output): @then(parse('"{field_name}" in the parsed output should {comparison}\n{expected_keys}')) -def assert_output_field_content( - field_name, comparison, expected_keys, cli_run, parsed_output -): +def assert_output_field_content(field_name, comparison, expected_keys, parsed_output): lang = parsed_output["lang"] obj = parsed_output["obj"] expected_keys = expected_keys.split("\n") From fd349fb0fcdfd356a02065bcc733172b10f9d32c Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 5 Jun 2021 15:54:28 -0700 Subject: [PATCH 0449/1132] Implement ExitStack to handle mocks in pytest-bdd - Fix failing DayOne test - Make format and clean up extraneous comment Co-authored-by: Jonathan Wren --- tests/features/write.feature | 6 +-- tests/step_defs/conftest.py | 83 +++++++++++++++++++++++------------- 2 files changed, 56 insertions(+), 33 deletions(-) diff --git a/tests/features/write.feature b/tests/features/write.feature index aec325d5..1cb822b5 100644 --- a/tests/features/write.feature +++ b/tests/features/write.feature @@ -196,16 +196,14 @@ Feature: Writing new entries. And "entries.0.creator.software_agent" in the parsed output should contain jrnl - # fails when system time is UTC (as on Travis-CI) - # @skip Scenario: Title with an embedded period on DayOne journal Given we use the config "dayone.yaml" - When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch."" + When we run "jrnl 04-24-2014: Ran 6.2 miles today in 1:02:03. I am feeling sore because I forgot to stretch." Then we should see the message "Entry added" When we run "jrnl -1" Then the output should be 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. - | I'm feeling sore because I forgot to stretch. + | I am feeling sore because I forgot to stretch. Scenario: Opening an folder that's not a DayOne folder should treat as folder journal Given we use the config "empty_folder.yaml" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 12eb948c..45fd73eb 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -5,6 +5,7 @@ import json import os from datetime import datetime from collections import defaultdict +from contextlib import ExitStack from keyring import backend from keyring import set_keyring from keyring import errors @@ -121,6 +122,11 @@ def cli_run(): return {"status": 0, "stdout": None, "stderr": None} +@fixture +def mocks(): + return dict() + + @fixture def temp_dir(): return tempfile.TemporaryDirectory() @@ -154,11 +160,6 @@ def input_method(): return "" -@fixture -def now_date(): - return {"datetime": datetime, "calendar_parse": __get_pdt_calendar()} - - @fixture def cache_dir(): return {"exists": False, "path": ""} @@ -268,27 +269,37 @@ def we_enter_editor(editor_method, editor_input, editor_state): editor_state["intent"] = {"method": file_method, "input": editor_input} -@given(parse('now is ""'), target_fixture="now_date") -@given(parse('now is "{date_str}"'), target_fixture="now_date") -def now_is_str(date_str): +@given(parse('now is ""')) +@given(parse('now is "{date_str}"')) +def now_is_str(date_str, mocks): class DatetimeMagicMock(MagicMock): # needed because jrnl does some reflection on datetime def __instancecheck__(self, subclass): return isinstance(subclass, datetime) - my_date = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") + def mocked_now(tz=None): + now = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") + + if tz: + time_zone = datetime.utcnow().astimezone().tzinfo + now = now.replace(tzinfo=time_zone) + + return now # jrnl uses two different classes to parse dates, so both must be mocked datetime_mock = DatetimeMagicMock(wraps=datetime) - datetime_mock.now.return_value = my_date + datetime_mock.now.side_effect = mocked_now pdt = __get_pdt_calendar() calendar_mock = MagicMock(wraps=pdt) calendar_mock.parse.side_effect = lambda date_str_input: pdt.parse( - date_str_input, my_date + date_str_input, mocked_now() ) - return {"datetime": datetime_mock, "calendar_parse": calendar_mock} + mocks["datetime"] = patch("datetime.datetime", new=datetime_mock) + mocks["calendar_parse"] = patch( + "jrnl.time.__get_pdt_calendar", return_value=calendar_mock + ) @then(parse("the editor should have been called")) @@ -381,9 +392,9 @@ def we_run( password, cache_dir, editor, - now_date, keyring, input_method, + mocks, ): assert input_method in ["", "enter", "pipe"] is_tty = input_method != "pipe" @@ -403,21 +414,36 @@ def we_run( if not password and user_input: password = user_input - # fmt: off - # see: https://github.com/psf/black/issues/664 - # @todo https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack - with \ - patch("sys.argv", ['jrnl'] + args), \ - patch("sys.stdin.read", side_effect=user_input) as mock_stdin, \ - patch("sys.stdin.isatty", return_value=is_tty), \ - patch("builtins.input", side_effect=user_input) as mock_input, \ - patch("getpass.getpass", side_effect=password) as mock_getpass, \ - patch("datetime.datetime", new=now_date["datetime"]), \ - patch("jrnl.time.__get_pdt_calendar", return_value=now_date["calendar_parse"]), \ - patch("jrnl.install.get_config_path", return_value=config_path), \ - patch("jrnl.config.get_config_path", return_value=config_path), \ - patch("subprocess.call", side_effect=editor) as mock_editor \ - : # @TODO: single point of truth for get_config_path (move from all calls from install to config) + with ExitStack() as stack: + + stack.enter_context(patch("sys.argv", ["jrnl"] + args)) + + mock_stdin = stack.enter_context( + patch("sys.stdin.read", side_effect=user_input) + ) + stack.enter_context(patch("sys.stdin.isatty", return_value=is_tty)) + mock_input = stack.enter_context( + patch("builtins.input", side_effect=user_input) + ) + mock_getpass = stack.enter_context( + patch("getpass.getpass", side_effect=password) + ) + + if "datetime" in mocks: + stack.enter_context(mocks["datetime"]) + stack.enter_context(mocks["calendar_parse"]) + + # stack.enter_context(patch("datetime.datetime", new=mocks["datetime"])) + # stack.enter_context(patch("jrnl.time.__get_pdt_calendar", return_value=mocks["calendar_parse"])) + + stack.enter_context( + patch("jrnl.install.get_config_path", return_value=config_path) + ) + stack.enter_context( + patch("jrnl.config.get_config_path", return_value=config_path) + ) + mock_editor = stack.enter_context(patch("subprocess.call", side_effect=editor)) + try: cli(args) except StopIteration: @@ -425,7 +451,6 @@ def we_run( pass except SystemExit as e: status = e.code - # fmt: on captured = capsys.readouterr() From 54e5e96ad28de4555659352ca8742194269feb4b Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 5 Jun 2021 16:35:09 -0700 Subject: [PATCH 0450/1132] Force GitHub Actions to preserve line endings Co-authored-by: Jonathan Wren --- .github/workflows/testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index a90b939a..47710ca2 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -29,6 +29,7 @@ jobs: os: [ ubuntu-latest, macos-latest, windows-latest ] steps: + - run: git config --global core.autocrlf false - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From c5a7d7027ced56c2175326ad7b7d8d5ab4086302 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Jun 2021 16:39:30 -0700 Subject: [PATCH 0451/1132] Move pytest-bdd code into separate files Now that all the tests are passing, this breaks them up into a few different files to make everything more organized. Note: Pyflakes is complaining about some unused import statements. --- tests/step_defs/conftest.py | 794 +-------------------------------- tests/step_defs/fixtures.py | 202 +++++++++ tests/step_defs/given_steps.py | 133 ++++++ tests/step_defs/helpers.py | 41 ++ tests/step_defs/then_steps.py | 331 ++++++++++++++ tests/step_defs/when_steps.py | 113 +++++ 6 files changed, 827 insertions(+), 787 deletions(-) create mode 100644 tests/step_defs/fixtures.py create mode 100644 tests/step_defs/given_steps.py create mode 100644 tests/step_defs/helpers.py create mode 100644 tests/step_defs/then_steps.py create mode 100644 tests/step_defs/when_steps.py diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 45fd73eb..d73fcec4 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -1,96 +1,18 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import json -import os -from datetime import datetime -from collections import defaultdict -from contextlib import ExitStack -from keyring import backend -from keyring import set_keyring -from keyring import errors -from pathlib import Path -import random -import string -import re -import shutil -import tempfile -import yaml -from unittest.mock import patch -from unittest.mock import MagicMock -from xml.etree import ElementTree - -from pytest_bdd import given -from pytest_bdd import then -from pytest_bdd import when -from pytest_bdd.parsers import parse -from pytest_bdd import parsers -from pytest import fixture -from pytest import mark -import toml - -from jrnl import __version__ -from jrnl.cli import cli -from jrnl.config import load_config -from jrnl.config import scope_config -from jrnl.os_compat import split_args from jrnl.os_compat import on_windows -from jrnl.time import __get_pdt_calendar +from pytest import mark + +from .fixtures import * +from .given_steps import * +from .when_steps import * +from .then_steps import * -class TestKeyring(backend.KeyringBackend): - """A test keyring that just stores its values in a hash""" - - priority = 1 - keys = defaultdict(dict) - - def set_password(self, servicename, username, password): - self.keys[servicename][username] = password - - def get_password(self, servicename, username): - return self.keys[servicename].get(username) - - def delete_password(self, servicename, username): - self.keys[servicename][username] = None - - -class NoKeyring(backend.KeyringBackend): - """A keyring that simulated an environment with no keyring backend.""" - - priority = 2 - keys = defaultdict(dict) - - def set_password(self, servicename, username, password): - raise errors.NoKeyringError - - def get_password(self, servicename, username): - raise errors.NoKeyringError - - def delete_password(self, servicename, username): - raise errors.NoKeyringError - - -class FailedKeyring(backend.KeyringBackend): - """ - A keyring that cannot be retrieved. - """ - - priority = 2 - - def set_password(self, servicename, username, password): - raise errors.KeyringError - - def get_password(self, servicename, username): - raise errors.KeyringError - - def delete_password(self, servicename, username): - raise errors.KeyringError - - -# ----- MARKERS ----- # def pytest_bdd_apply_tag(tag, function): if tag == "skip_win": - marker = mark.skipif(on_windows, reason="Skip test on Windows") + marker = mark.skipif(on_windows(), reason="Skip test on Windows") elif tag == "skip_editor": marker = mark.skip( reason="Skipping editor-related test. We should come back to this!" @@ -101,705 +23,3 @@ def pytest_bdd_apply_tag(tag, function): marker(function) return True - - -# ----- UTILS ----- # -def does_directory_contain_files(file_list, directory_path): - if not os.path.isdir(directory_path): - return False - - for file in file_list.split("\n"): - fullpath = directory_path + "/" + file - if not os.path.isfile(fullpath): - return False - - return True - - -# ----- FIXTURES ----- # -@fixture -def cli_run(): - return {"status": 0, "stdout": None, "stderr": None} - - -@fixture -def mocks(): - return dict() - - -@fixture -def temp_dir(): - return tempfile.TemporaryDirectory() - - -@fixture -def working_dir(request): - return os.path.join(request.config.rootpath, "tests") - - -@fixture -def config_path(temp_dir): - os.chdir(temp_dir.name) - return temp_dir.name + "/jrnl.yaml" - - -@fixture -def toml_version(working_dir): - pyproject = os.path.join(working_dir, "..", "pyproject.toml") - pyproject_contents = toml.load(pyproject) - return pyproject_contents["tool"]["poetry"]["version"] - - -@fixture -def password(): - return "" - - -@fixture -def input_method(): - return "" - - -@fixture -def cache_dir(): - return {"exists": False, "path": ""} - - -@fixture -def str_value(): - return "" - - -@fixture -def command(): - return "" - - -@fixture -def should_not(): - return False - - -@fixture -def user_input(): - return "" - - -@fixture -def keyring(): - set_keyring(NoKeyring()) - - -@fixture -def keyring_type(): - return "default" - - -@fixture -def config_data(config_path): - return load_config(config_path) - - -@fixture -def journal_name(): - return None - - -@fixture -def which_output_stream(): - return None - - -@fixture -def editor_input(): - return None - - -@fixture -def num_args(): - return None - - -@fixture -def parsed_output(): - return {"lang": None, "obj": None} - - -@fixture -def editor_state(): - return { - "command": "", - "intent": {"method": "r", "input": None}, - "tmpfile": {"name": None, "content": None}, - } - - -@fixture -def editor(editor_state): - def _mock_editor(editor_command): - tmpfile = editor_command[-1] - - editor_state["command"] = editor_command - editor_state["tmpfile"]["name"] = tmpfile - - Path(tmpfile).touch() - with open(tmpfile, editor_state["intent"]["method"]) as f: - # Touch the file so jrnl knows it was edited - if editor_state["intent"]["input"] != None: - f.write(editor_state["intent"]["input"]) - - file_content = f.read() - editor_state["tmpfile"]["content"] = file_content - - return _mock_editor - - -# ----- STEPS ----- # -@given(parse("we {editor_method} to the editor if opened\n{editor_input}")) -@given(parse("we {editor_method} nothing to the editor if opened")) -def we_enter_editor(editor_method, editor_input, editor_state): - file_method = editor_state["intent"]["method"] - if editor_method == "write": - file_method = "w+" - elif editor_method == "append": - file_method = "a+" - else: - assert False, f"Method '{editor_method}' not supported" - - editor_state["intent"] = {"method": file_method, "input": editor_input} - - -@given(parse('now is ""')) -@given(parse('now is "{date_str}"')) -def now_is_str(date_str, mocks): - class DatetimeMagicMock(MagicMock): - # needed because jrnl does some reflection on datetime - def __instancecheck__(self, subclass): - return isinstance(subclass, datetime) - - def mocked_now(tz=None): - now = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") - - if tz: - time_zone = datetime.utcnow().astimezone().tzinfo - now = now.replace(tzinfo=time_zone) - - return now - - # jrnl uses two different classes to parse dates, so both must be mocked - datetime_mock = DatetimeMagicMock(wraps=datetime) - datetime_mock.now.side_effect = mocked_now - - pdt = __get_pdt_calendar() - calendar_mock = MagicMock(wraps=pdt) - calendar_mock.parse.side_effect = lambda date_str_input: pdt.parse( - date_str_input, mocked_now() - ) - - mocks["datetime"] = patch("datetime.datetime", new=datetime_mock) - mocks["calendar_parse"] = patch( - "jrnl.time.__get_pdt_calendar", return_value=calendar_mock - ) - - -@then(parse("the editor should have been called")) -@then(parse("the editor should have been called with {num_args} arguments")) -def count_editor_args(num_args, cli_run, editor_state): - assert cli_run["mocks"]["editor"].called - - if isinstance(num_args, int): - assert len(editor_state["command"]) == int(num_args) - - -@then(parse('the editor filename should end with "{suffix}"')) -def editor_filename_suffix(suffix, editor_state): - editor_filename = editor_state["tmpfile"]["name"] - - assert editor_state["tmpfile"]["name"].endswith(suffix), (editor_filename, suffix) - - -@then(parse('the editor file content should {comparison} "{str_value}"')) -@then(parse("the editor file content should {comparison} empty")) -@then(parse("the editor file content should {comparison}\n{str_value}")) -def contains_editor_file(comparison, str_value, editor_state): - content = editor_state["tmpfile"]["content"] - # content = f'\n"""\n{content}\n"""\n' - if comparison == "be": - assert content == str_value - elif comparison == "contain": - assert str_value in content - else: - assert False, f"Comparison '{comparison}' not supported" - - -@given("we have a keyring", target_fixture="keyring") -@given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") -def we_have_type_of_keyring(keyring_type): - if keyring_type == "failed": - set_keyring(FailedKeyring()) - else: - set_keyring(TestKeyring()) - - -@given(parse('we use the config "{config_file}"'), target_fixture="config_path") -@given('we use the config ""', target_fixture="config_path") -def we_use_the_config(config_file, temp_dir, working_dir): - # Move into temp dir as cwd - os.chdir(temp_dir.name) - - # Copy the config file over - config_source = os.path.join(working_dir, "data", "configs", config_file) - config_dest = os.path.join(temp_dir.name, config_file) - shutil.copy2(config_source, config_dest) - - # @todo make this only copy some journals over - # Copy all of the journals over - journal_source = os.path.join(working_dir, "data", "journals") - journal_dest = os.path.join(temp_dir.name, "features", "journals") - shutil.copytree(journal_source, journal_dest) - - # @todo get rid of this by using default config values - # merge in version number - if config_file.endswith("yaml") and os.path.exists(config_dest): - # Add jrnl version to file for 2.x journals - with open(config_dest, "a") as cf: - cf.write("version: {}".format(__version__)) - - return config_dest - - -@given(parse('we use the password "{pw}" if prompted'), target_fixture="password") -def use_password_forever(pw): - return pw - - -@when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) -@when( - parsers.re( - 'we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"' - ) -) -@when(parse('we run "jrnl" and {input_method} "{user_input}"')) -@when(parse('we run "jrnl {command}"')) -@when('we run "jrnl "') -@when('we run "jrnl"') -def we_run( - command, - config_path, - user_input, - cli_run, - capsys, - password, - cache_dir, - editor, - keyring, - input_method, - mocks, -): - assert input_method in ["", "enter", "pipe"] - is_tty = input_method != "pipe" - - if cache_dir["exists"]: - command = command.format(cache_dir=cache_dir["path"]) - - args = split_args(command) - status = 0 - - if user_input: - user_input = user_input.splitlines() if is_tty else [user_input] - - if password: - password = password.splitlines() - - if not password and user_input: - password = user_input - - with ExitStack() as stack: - - stack.enter_context(patch("sys.argv", ["jrnl"] + args)) - - mock_stdin = stack.enter_context( - patch("sys.stdin.read", side_effect=user_input) - ) - stack.enter_context(patch("sys.stdin.isatty", return_value=is_tty)) - mock_input = stack.enter_context( - patch("builtins.input", side_effect=user_input) - ) - mock_getpass = stack.enter_context( - patch("getpass.getpass", side_effect=password) - ) - - if "datetime" in mocks: - stack.enter_context(mocks["datetime"]) - stack.enter_context(mocks["calendar_parse"]) - - # stack.enter_context(patch("datetime.datetime", new=mocks["datetime"])) - # stack.enter_context(patch("jrnl.time.__get_pdt_calendar", return_value=mocks["calendar_parse"])) - - stack.enter_context( - patch("jrnl.install.get_config_path", return_value=config_path) - ) - stack.enter_context( - patch("jrnl.config.get_config_path", return_value=config_path) - ) - mock_editor = stack.enter_context(patch("subprocess.call", side_effect=editor)) - - try: - cli(args) - except StopIteration: - # This happens when input is expected, but don't have any input left - pass - except SystemExit as e: - status = e.code - - captured = capsys.readouterr() - - cli_run["status"] = status - cli_run["stdout"] = captured.out - cli_run["stderr"] = captured.err - cli_run["mocks"] = { - "stdin": mock_stdin, - "input": mock_input, - "getpass": mock_getpass, - "editor": mock_editor, - } - - -@then("we should get no error") -def should_get_no_error(cli_run): - assert cli_run["status"] == 0, cli_run["status"] - - -@then(parse('the output should match "{regex}"')) -def output_should_match(regex, cli_run): - out = cli_run["stdout"] - matches = re.findall(regex, out) - assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" - - -@then(parse("the output should contain\n{expected_output}")) -@then(parse('the output should contain "{expected_output}"')) -@then('the output should contain ""') -@then(parse("the {which_output_stream} output should contain\n{expected_output}")) -@then(parse('the {which_output_stream} output should contain "{expected_output}"')) -def output_should_contain(expected_output, which_output_stream, cli_run): - assert expected_output - if which_output_stream is None: - assert (expected_output in cli_run["stdout"]) or ( - expected_output in cli_run["stderr"] - ) - - elif which_output_stream == "standard": - assert expected_output in cli_run["stdout"] - - elif which_output_stream == "error": - assert expected_output in cli_run["stderr"] - - else: - assert expected_output in cli_run[which_output_stream] - - -@then(parse("the output should not contain\n{expected_output}")) -@then(parse('the output should not contain "{expected_output}"')) -@then('the output should not contain ""') -def output_should_not_contain(expected_output, cli_run): - assert expected_output not in cli_run["stdout"] - - -@then(parse("the output should be\n{expected_output}")) -@then(parse('the output should be "{expected_output}"')) -@then('the output should be ""') -def output_should_be(expected_output, cli_run): - actual = cli_run["stdout"].strip() - expected = expected_output.strip() - assert expected == actual - - -@then("the output should be empty") -def output_should_be_empty(cli_run): - actual = cli_run["stdout"].strip() - assert actual == "" - - -@then('the output should contain the date ""') -def output_should_contain_date(date, cli_run): - assert date and date in cli_run["stdout"] - - -@then("the output should contain pyproject.toml version") -def output_should_contain_version(cli_run, toml_version): - out = cli_run["stdout"] - assert toml_version in out, toml_version - - -@then(parse('we should see the message "{text}"')) -def should_see_the_message(text, cli_run): - out = cli_run["stderr"] - assert text in out, [text, out] - - -def parse_should_or_should_not(should_or_should_not): - if should_or_should_not == "should": - return True - elif should_or_should_not == "should not": - return False - else: - raise Exception( - "should_or_should_not valid values are 'should' or 'should not'" - ) - - -@then( - parse( - 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' - ) -) -@then( - parse( - 'the config for journal "{journal_name}" {should_or_should_not} contain\n{some_yaml}' - ) -) -@then(parse('the config {should_or_should_not} contain "{some_yaml}"')) -@then(parse("the config {should_or_should_not} contain\n{some_yaml}")) -def config_var(config_data, journal_name, should_or_should_not, some_yaml): - we_should = parse_should_or_should_not(should_or_should_not) - - actual = config_data - if journal_name: - actual = actual["journals"][journal_name] - - expected = yaml.load(some_yaml, Loader=yaml.FullLoader) - - actual_slice = actual - if type(actual) is dict: - actual_slice = {key: actual.get(key, None) for key in expected.keys()} - - if we_should: - assert expected == actual_slice - else: - assert expected != actual_slice - - -@then("we should be prompted for a password") -def password_was_called(cli_run): - assert cli_run["mocks"]["getpass"].called - - -@then("we should not be prompted for a password") -def password_was_not_called(cli_run): - assert not cli_run["mocks"]["getpass"].called - - -@then(parse("the cache directory should contain the files\n{file_list}")) -def assert_dir_contains_files(file_list, cache_dir): - assert does_directory_contain_files(file_list, cache_dir["path"]) - - -@then(parse("the journal directory should contain\n{file_list}")) -def journal_directory_should_contain(config_data, file_list): - scoped_config = scope_config(config_data, "default") - - assert does_directory_contain_files(file_list, scoped_config["journal"]) - - -@then(parse('journal "{journal_name}" should not exist')) -def journal_directory_should_not_exist(config_data, journal_name): - scoped_config = scope_config(config_data, journal_name) - - assert not does_directory_contain_files( - scoped_config["journal"], "." - ), f'Journal "{journal_name}" does exist' - - -@when(parse('we change directory to "{directory_name}"')) -def when_we_change_directory(directory_name): - if not os.path.isdir(directory_name): - os.mkdir(directory_name) - - os.chdir(directory_name) - - -@then(parse("the journal {should_or_should_not} exist")) -def journal_should_not_exist(config_data, should_or_should_not): - scoped_config = scope_config(config_data, "default") - expected_path = scoped_config["journal"] - - contains_files = does_directory_contain_files(expected_path, ".") - - if should_or_should_not == "should": - assert contains_files - elif should_or_should_not == "should not": - assert not contains_files - else: - raise Exception( - "should_or_should_not valid values are 'should' or 'should not'" - ) - - -@given("we create a cache directory", target_fixture="cache_dir") -def create_cache_dir(temp_dir): - random_str = "".join(random.choices(string.ascii_uppercase + string.digits, k=20)) - - dir_path = os.path.join(temp_dir.name, "cache_" + random_str) - os.mkdir(dir_path) - return {"exists": True, "path": dir_path} - - -@then(parse('the content of file "{file_path}" in the cache should be\n{file_content}')) -def content_of_file_should_be(file_path, file_content, cache_dir): - assert cache_dir["exists"] - expected_content = file_content.strip().splitlines() - - with open(os.path.join(cache_dir["path"], file_path), "r") as f: - actual_content = f.read().strip().splitlines() - - for actual_line, expected_line in zip(actual_content, expected_content): - if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): - assert_equal_tags_ignoring_order( - actual_line, expected_line, actual_content, expected_content - ) - else: - assert actual_line.strip() == expected_line.strip(), [ - [actual_line.strip(), expected_line.strip()], - [actual_content, expected_content], - ] - - -def assert_equal_tags_ignoring_order( - actual_line, expected_line, actual_content, expected_content -): - actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) - expected_tags = set( - tag.strip() for tag in expected_line[len("tags: ") :].split(",") - ) - assert actual_tags == expected_tags, [ - [actual_tags, expected_tags], - [expected_content, actual_content], - ] - - -@then(parse("the cache should contain the files\n{file_list}")) -def cache_dir_contains_files(file_list, cache_dir): - assert cache_dir["exists"] - - actual_files = os.listdir(cache_dir["path"]) - expected_files = file_list.split("\n") - - # sort to deal with inconsistent default file ordering on different OS's - actual_files.sort() - expected_files.sort() - - assert actual_files == expected_files, [actual_files, expected_files] - - -@then(parse("the output should be valid {language_name}")) -def assert_output_is_valid_language(cli_run, language_name): - language_name = language_name.upper() - if language_name == "XML": - xml_tree = ElementTree.fromstring(cli_run["stdout"]) - assert xml_tree, "Invalid XML" - elif language_name == "JSON": - assert json.loads(cli_run["stdout"]), "Invalid JSON" - else: - assert False, f"Language name {language_name} not recognized" - - -@given(parse("we parse the output as {language_name}"), target_fixture="parsed_output") -def parse_output_as_language(cli_run, language_name): - language_name = language_name.upper() - actual_output = cli_run["stdout"] - - if language_name == "XML": - parsed_output = ElementTree.fromstring(actual_output) - elif language_name == "JSON": - parsed_output = json.loads(actual_output) - else: - assert False, f"Language name {language_name} not recognized" - - return {"lang": language_name, "obj": parsed_output} - - -@then(parse('"{node_name}" in the parsed output should have {number:d} elements')) -def assert_parsed_output_item_count(node_name, number, parsed_output): - lang = parsed_output["lang"] - obj = parsed_output["obj"] - - if lang == "XML": - xml_node_names = (node.tag for node in obj) - assert node_name in xml_node_names, str(list(xml_node_names)) - - actual_entry_count = len(obj.find(node_name)) - assert actual_entry_count == number, actual_entry_count - - elif lang == "JSON": - my_obj = obj - - for node in node_name.split("."): - try: - my_obj = my_obj[int(node)] - except ValueError: - assert node in my_obj - my_obj = my_obj[node] - - assert len(my_obj) == number, len(my_obj) - - else: - assert False, f"Language name {lang} not recognized" - - -@then(parse('"{field_name}" in the parsed output should {comparison}\n{expected_keys}')) -def assert_output_field_content(field_name, comparison, expected_keys, parsed_output): - lang = parsed_output["lang"] - obj = parsed_output["obj"] - expected_keys = expected_keys.split("\n") - if len(expected_keys) == 1: - expected_keys = expected_keys[0] - - if lang == "XML": - xml_node_names = (node.tag for node in obj) - assert field_name in xml_node_names, str(list(xml_node_names)) - - if field_name == "tags": - actual_tags = set(t.attrib["name"] for t in obj.find("tags")) - assert set(actual_tags) == set(expected_keys), [ - actual_tags, - set(expected_keys), - ] - else: - assert False, "This test only works for tags in XML" - - elif lang == "JSON": - my_obj = obj - - for node in field_name.split("."): - try: - my_obj = my_obj[int(node)] - except ValueError: - assert node in my_obj, [my_obj.keys(), node] - my_obj = my_obj[node] - - if comparison == "be": - if type(my_obj) is str: - assert expected_keys == my_obj, [my_obj, expected_keys] - else: - assert set(expected_keys) == set(my_obj), [ - set(my_obj), - set(expected_keys), - ] - elif comparison == "contain": - if type(my_obj) is str: - assert expected_keys in my_obj, [my_obj, expected_keys] - else: - assert all(elem in my_obj for elem in expected_keys), [ - my_obj, - expected_keys, - ] - else: - assert False, f"Language name {lang} not recognized" - - -@then(parse('there should be {number:d} "{item}" elements')) -def count_elements(number, item, cli_run): - actual_output = cli_run["stdout"] - xml_tree = ElementTree.fromstring(actual_output) - assert len(xml_tree.findall(".//" + item)) == number diff --git a/tests/step_defs/fixtures.py b/tests/step_defs/fixtures.py new file mode 100644 index 00000000..a8e243ae --- /dev/null +++ b/tests/step_defs/fixtures.py @@ -0,0 +1,202 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import os +from collections import defaultdict +from keyring import backend +from keyring import set_keyring +from keyring import errors +from pathlib import Path +import tempfile + +from pytest import fixture +import toml + +from jrnl.config import load_config + + +# --- Keyring --- # +@fixture +def keyring(): + set_keyring(NoKeyring()) + + +@fixture +def keyring_type(): + return "default" + + +class TestKeyring(backend.KeyringBackend): + """A test keyring that just stores its values in a hash""" + + priority = 1 + keys = defaultdict(dict) + + def set_password(self, servicename, username, password): + self.keys[servicename][username] = password + + def get_password(self, servicename, username): + return self.keys[servicename].get(username) + + def delete_password(self, servicename, username): + self.keys[servicename][username] = None + + +class NoKeyring(backend.KeyringBackend): + """A keyring that simulated an environment with no keyring backend.""" + + priority = 2 + keys = defaultdict(dict) + + def set_password(self, servicename, username, password): + raise errors.NoKeyringError + + def get_password(self, servicename, username): + raise errors.NoKeyringError + + def delete_password(self, servicename, username): + raise errors.NoKeyringError + + +class FailedKeyring(backend.KeyringBackend): + """ A keyring that cannot be retrieved. """ + + priority = 2 + + def set_password(self, servicename, username, password): + raise errors.KeyringError + + def get_password(self, servicename, username): + raise errors.KeyringError + + def delete_password(self, servicename, username): + raise errors.KeyringError + + +# ----- Misc ----- # +@fixture +def cli_run(): + return {"status": 0, "stdout": None, "stderr": None} + + +@fixture +def mocks(): + return dict() + + +@fixture +def temp_dir(): + return tempfile.TemporaryDirectory() + + +@fixture +def working_dir(request): + return os.path.join(request.config.rootpath, "tests") + + +@fixture +def config_path(temp_dir): + os.chdir(temp_dir.name) + return temp_dir.name + "/jrnl.yaml" + + +@fixture +def toml_version(working_dir): + pyproject = os.path.join(working_dir, "..", "pyproject.toml") + pyproject_contents = toml.load(pyproject) + return pyproject_contents["tool"]["poetry"]["version"] + + +@fixture +def password(): + return "" + + +@fixture +def input_method(): + return "" + + +@fixture +def cache_dir(): + return {"exists": False, "path": ""} + + +@fixture +def str_value(): + return "" + + +@fixture +def command(): + return "" + + +@fixture +def should_not(): + return False + + +@fixture +def user_input(): + return "" + + +@fixture +def config_data(config_path): + return load_config(config_path) + + +@fixture +def journal_name(): + return None + + +@fixture +def which_output_stream(): + return None + + +@fixture +def editor_input(): + return None + + +@fixture +def num_args(): + return None + + +@fixture +def parsed_output(): + return {"lang": None, "obj": None} + + +@fixture +def editor_state(): + return { + "command": "", + "intent": {"method": "r", "input": None}, + "tmpfile": {"name": None, "content": None}, + } + + +@fixture +def editor(editor_state): + def _mock_editor(editor_command): + tmpfile = editor_command[-1] + + editor_state["command"] = editor_command + editor_state["tmpfile"]["name"] = tmpfile + + Path(tmpfile).touch() + with open(tmpfile, editor_state["intent"]["method"]) as f: + # Touch the file so jrnl knows it was edited + if editor_state["intent"]["input"] != None: + f.write(editor_state["intent"]["input"]) + + file_content = f.read() + editor_state["tmpfile"]["content"] = file_content + + return _mock_editor + diff --git a/tests/step_defs/given_steps.py b/tests/step_defs/given_steps.py new file mode 100644 index 00000000..8db8fa1c --- /dev/null +++ b/tests/step_defs/given_steps.py @@ -0,0 +1,133 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import json +import os +from datetime import datetime +from keyring import set_keyring +import random +import string +import shutil +from unittest.mock import patch +from unittest.mock import MagicMock +from xml.etree import ElementTree + +from jrnl import __version__ +from jrnl.time import __get_pdt_calendar + +from pytest_bdd import given +from pytest_bdd.parsers import parse +from .fixtures import FailedKeyring +from .fixtures import TestKeyring + + +@given(parse("we {editor_method} to the editor if opened\n{editor_input}")) +@given(parse("we {editor_method} nothing to the editor if opened")) +def we_enter_editor(editor_method, editor_input, editor_state): + file_method = editor_state["intent"]["method"] + if editor_method == "write": + file_method = "w+" + elif editor_method == "append": + file_method = "a+" + else: + assert False, f"Method '{editor_method}' not supported" + + editor_state["intent"] = {"method": file_method, "input": editor_input} + + +@given(parse('now is ""')) +@given(parse('now is "{date_str}"')) +def now_is_str(date_str, mocks): + class DatetimeMagicMock(MagicMock): + # needed because jrnl does some reflection on datetime + def __instancecheck__(self, subclass): + return isinstance(subclass, datetime) + + def mocked_now(tz=None): + now = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") + + if tz: + time_zone = datetime.utcnow().astimezone().tzinfo + now = now.replace(tzinfo=time_zone) + + return now + + # jrnl uses two different classes to parse dates, so both must be mocked + datetime_mock = DatetimeMagicMock(wraps=datetime) + datetime_mock.now.side_effect = mocked_now + + pdt = __get_pdt_calendar() + calendar_mock = MagicMock(wraps=pdt) + calendar_mock.parse.side_effect = lambda date_str_input: pdt.parse( + date_str_input, mocked_now() + ) + + mocks["datetime"] = patch("datetime.datetime", new=datetime_mock) + mocks["calendar_parse"] = patch( + "jrnl.time.__get_pdt_calendar", return_value=calendar_mock + ) + + +@given("we have a keyring", target_fixture="keyring") +@given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") +def we_have_type_of_keyring(keyring_type): + if keyring_type == "failed": + set_keyring(FailedKeyring()) + else: + set_keyring(TestKeyring()) + + +@given(parse('we use the config "{config_file}"'), target_fixture="config_path") +@given('we use the config ""', target_fixture="config_path") +def we_use_the_config(config_file, temp_dir, working_dir): + # Move into temp dir as cwd + os.chdir(temp_dir.name) + + # Copy the config file over + config_source = os.path.join(working_dir, "data", "configs", config_file) + config_dest = os.path.join(temp_dir.name, config_file) + shutil.copy2(config_source, config_dest) + + # @todo make this only copy some journals over + # Copy all of the journals over + journal_source = os.path.join(working_dir, "data", "journals") + journal_dest = os.path.join(temp_dir.name, "features", "journals") + shutil.copytree(journal_source, journal_dest) + + # @todo get rid of this by using default config values + # merge in version number + if config_file.endswith("yaml") and os.path.exists(config_dest): + # Add jrnl version to file for 2.x journals + with open(config_dest, "a") as cf: + cf.write("version: {}".format(__version__)) + + return config_dest + + +@given(parse('we use the password "{pw}" if prompted'), target_fixture="password") +def use_password_forever(pw): + return pw + + +@given("we create a cache directory", target_fixture="cache_dir") +def create_cache_dir(temp_dir): + random_str = "".join(random.choices(string.ascii_uppercase + string.digits, k=20)) + + dir_path = os.path.join(temp_dir.name, "cache_" + random_str) + os.mkdir(dir_path) + return {"exists": True, "path": dir_path} + + +@given(parse("we parse the output as {language_name}"), target_fixture="parsed_output") +def parse_output_as_language(cli_run, language_name): + language_name = language_name.upper() + actual_output = cli_run["stdout"] + + if language_name == "XML": + parsed_output = ElementTree.fromstring(actual_output) + elif language_name == "JSON": + parsed_output = json.loads(actual_output) + else: + assert False, f"Language name {language_name} not recognized" + + return {"lang": language_name, "obj": parsed_output} diff --git a/tests/step_defs/helpers.py b/tests/step_defs/helpers.py new file mode 100644 index 00000000..e2ea91c9 --- /dev/null +++ b/tests/step_defs/helpers.py @@ -0,0 +1,41 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import os + + + +def does_directory_contain_files(file_list, directory_path): + if not os.path.isdir(directory_path): + return False + + for file in file_list.split("\n"): + fullpath = directory_path + "/" + file + if not os.path.isfile(fullpath): + return False + + return True + + +def parse_should_or_should_not(should_or_should_not): + if should_or_should_not == "should": + return True + elif should_or_should_not == "should not": + return False + else: + raise Exception( + "should_or_should_not valid values are 'should' or 'should not'" + ) + + +def assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content +): + actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) + expected_tags = set( + tag.strip() for tag in expected_line[len("tags: ") :].split(",") + ) + assert actual_tags == expected_tags, [ + [actual_tags, expected_tags], + [expected_content, actual_content], + ] diff --git a/tests/step_defs/then_steps.py b/tests/step_defs/then_steps.py new file mode 100644 index 00000000..4bcf1c56 --- /dev/null +++ b/tests/step_defs/then_steps.py @@ -0,0 +1,331 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import json +import os +import re +import yaml +from xml.etree import ElementTree + +from pytest_bdd import then +from pytest_bdd.parsers import parse + +from jrnl.config import scope_config + +from .helpers import parse_should_or_should_not +from .helpers import does_directory_contain_files +from .helpers import assert_equal_tags_ignoring_order + + +@then("we should get no error") +def should_get_no_error(cli_run): + assert cli_run["status"] == 0, cli_run["status"] + + +@then(parse('the output should match "{regex}"')) +def output_should_match(regex, cli_run): + out = cli_run["stdout"] + matches = re.findall(regex, out) + assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" + + +@then(parse("the output should contain\n{expected_output}")) +@then(parse('the output should contain "{expected_output}"')) +@then('the output should contain ""') +@then(parse("the {which_output_stream} output should contain\n{expected_output}")) +@then(parse('the {which_output_stream} output should contain "{expected_output}"')) +def output_should_contain(expected_output, which_output_stream, cli_run): + assert expected_output + if which_output_stream is None: + assert (expected_output in cli_run["stdout"]) or ( + expected_output in cli_run["stderr"] + ) + + elif which_output_stream == "standard": + assert expected_output in cli_run["stdout"] + + elif which_output_stream == "error": + assert expected_output in cli_run["stderr"] + + else: + assert expected_output in cli_run[which_output_stream] + + +@then(parse("the output should not contain\n{expected_output}")) +@then(parse('the output should not contain "{expected_output}"')) +@then('the output should not contain ""') +def output_should_not_contain(expected_output, cli_run): + assert expected_output not in cli_run["stdout"] + + +@then(parse("the output should be\n{expected_output}")) +@then(parse('the output should be "{expected_output}"')) +@then('the output should be ""') +def output_should_be(expected_output, cli_run): + actual = cli_run["stdout"].strip() + expected = expected_output.strip() + assert expected == actual + + +@then("the output should be empty") +def output_should_be_empty(cli_run): + actual = cli_run["stdout"].strip() + assert actual == "" + + +@then('the output should contain the date ""') +def output_should_contain_date(date, cli_run): + assert date and date in cli_run["stdout"] + + +@then("the output should contain pyproject.toml version") +def output_should_contain_version(cli_run, toml_version): + out = cli_run["stdout"] + assert toml_version in out, toml_version + + +@then(parse('we should see the message "{text}"')) +def should_see_the_message(text, cli_run): + out = cli_run["stderr"] + assert text in out, [text, out] + + +@then( + parse( + 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' + ) +) +@then( + parse( + 'the config for journal "{journal_name}" {should_or_should_not} contain\n{some_yaml}' + ) +) +@then(parse('the config {should_or_should_not} contain "{some_yaml}"')) +@then(parse("the config {should_or_should_not} contain\n{some_yaml}")) +def config_var(config_data, journal_name, should_or_should_not, some_yaml): + we_should = parse_should_or_should_not(should_or_should_not) + + actual = config_data + if journal_name: + actual = actual["journals"][journal_name] + + expected = yaml.load(some_yaml, Loader=yaml.FullLoader) + + actual_slice = actual + if type(actual) is dict: + actual_slice = {key: actual.get(key, None) for key in expected.keys()} + + if we_should: + assert expected == actual_slice + else: + assert expected != actual_slice + + +@then("we should be prompted for a password") +def password_was_called(cli_run): + assert cli_run["mocks"]["getpass"].called + + +@then("we should not be prompted for a password") +def password_was_not_called(cli_run): + assert not cli_run["mocks"]["getpass"].called + + +@then(parse("the cache directory should contain the files\n{file_list}")) +def assert_dir_contains_files(file_list, cache_dir): + assert does_directory_contain_files(file_list, cache_dir["path"]) + + +@then(parse("the journal directory should contain\n{file_list}")) +def journal_directory_should_contain(config_data, file_list): + scoped_config = scope_config(config_data, "default") + + assert does_directory_contain_files(file_list, scoped_config["journal"]) + + +@then(parse('journal "{journal_name}" should not exist')) +def journal_directory_should_not_exist(config_data, journal_name): + scoped_config = scope_config(config_data, journal_name) + + assert not does_directory_contain_files( + scoped_config["journal"], "." + ), f'Journal "{journal_name}" does exist' + + +@then(parse("the journal {should_or_should_not} exist")) +def journal_should_not_exist(config_data, should_or_should_not): + scoped_config = scope_config(config_data, "default") + expected_path = scoped_config["journal"] + + contains_files = does_directory_contain_files(expected_path, ".") + + if should_or_should_not == "should": + assert contains_files + elif should_or_should_not == "should not": + assert not contains_files + else: + raise Exception( + "should_or_should_not valid values are 'should' or 'should not'" + ) + + +@then(parse('the content of file "{file_path}" in the cache should be\n{file_content}')) +def content_of_file_should_be(file_path, file_content, cache_dir): + assert cache_dir["exists"] + expected_content = file_content.strip().splitlines() + + with open(os.path.join(cache_dir["path"], file_path), "r") as f: + actual_content = f.read().strip().splitlines() + + for actual_line, expected_line in zip(actual_content, expected_content): + if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): + assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content + ) + else: + assert actual_line.strip() == expected_line.strip(), [ + [actual_line.strip(), expected_line.strip()], + [actual_content, expected_content], + ] + + +@then(parse("the cache should contain the files\n{file_list}")) +def cache_dir_contains_files(file_list, cache_dir): + assert cache_dir["exists"] + + actual_files = os.listdir(cache_dir["path"]) + expected_files = file_list.split("\n") + + # sort to deal with inconsistent default file ordering on different OS's + actual_files.sort() + expected_files.sort() + + assert actual_files == expected_files, [actual_files, expected_files] + + +@then(parse("the output should be valid {language_name}")) +def assert_output_is_valid_language(cli_run, language_name): + language_name = language_name.upper() + if language_name == "XML": + xml_tree = ElementTree.fromstring(cli_run["stdout"]) + assert xml_tree, "Invalid XML" + elif language_name == "JSON": + assert json.loads(cli_run["stdout"]), "Invalid JSON" + else: + assert False, f"Language name {language_name} not recognized" + + +@then(parse('"{node_name}" in the parsed output should have {number:d} elements')) +def assert_parsed_output_item_count(node_name, number, parsed_output): + lang = parsed_output["lang"] + obj = parsed_output["obj"] + + if lang == "XML": + xml_node_names = (node.tag for node in obj) + assert node_name in xml_node_names, str(list(xml_node_names)) + + actual_entry_count = len(obj.find(node_name)) + assert actual_entry_count == number, actual_entry_count + + elif lang == "JSON": + my_obj = obj + + for node in node_name.split("."): + try: + my_obj = my_obj[int(node)] + except ValueError: + assert node in my_obj + my_obj = my_obj[node] + + assert len(my_obj) == number, len(my_obj) + + else: + assert False, f"Language name {lang} not recognized" + + +@then(parse('"{field_name}" in the parsed output should {comparison}\n{expected_keys}')) +def assert_output_field_content(field_name, comparison, expected_keys, parsed_output): + lang = parsed_output["lang"] + obj = parsed_output["obj"] + expected_keys = expected_keys.split("\n") + if len(expected_keys) == 1: + expected_keys = expected_keys[0] + + if lang == "XML": + xml_node_names = (node.tag for node in obj) + assert field_name in xml_node_names, str(list(xml_node_names)) + + if field_name == "tags": + actual_tags = set(t.attrib["name"] for t in obj.find("tags")) + assert set(actual_tags) == set(expected_keys), [ + actual_tags, + set(expected_keys), + ] + else: + assert False, "This test only works for tags in XML" + + elif lang == "JSON": + my_obj = obj + + for node in field_name.split("."): + try: + my_obj = my_obj[int(node)] + except ValueError: + assert node in my_obj, [my_obj.keys(), node] + my_obj = my_obj[node] + + if comparison == "be": + if type(my_obj) is str: + assert expected_keys == my_obj, [my_obj, expected_keys] + else: + assert set(expected_keys) == set(my_obj), [ + set(my_obj), + set(expected_keys), + ] + elif comparison == "contain": + if type(my_obj) is str: + assert expected_keys in my_obj, [my_obj, expected_keys] + else: + assert all(elem in my_obj for elem in expected_keys), [ + my_obj, + expected_keys, + ] + else: + assert False, f"Language name {lang} not recognized" + + +@then(parse('there should be {number:d} "{item}" elements')) +def count_elements(number, item, cli_run): + actual_output = cli_run["stdout"] + xml_tree = ElementTree.fromstring(actual_output) + assert len(xml_tree.findall(".//" + item)) == number + + +@then(parse("the editor should have been called")) +@then(parse("the editor should have been called with {num_args} arguments")) +def count_editor_args(num_args, cli_run, editor_state): + assert cli_run["mocks"]["editor"].called + + if isinstance(num_args, int): + assert len(editor_state["command"]) == int(num_args) + + +@then(parse('the editor filename should end with "{suffix}"')) +def editor_filename_suffix(suffix, editor_state): + editor_filename = editor_state["tmpfile"]["name"] + + assert editor_state["tmpfile"]["name"].endswith(suffix), (editor_filename, suffix) + + +@then(parse('the editor file content should {comparison} "{str_value}"')) +@then(parse("the editor file content should {comparison} empty")) +@then(parse("the editor file content should {comparison}\n{str_value}")) +def contains_editor_file(comparison, str_value, editor_state): + content = editor_state["tmpfile"]["content"] + # content = f'\n"""\n{content}\n"""\n' + if comparison == "be": + assert content == str_value + elif comparison == "contain": + assert str_value in content + else: + assert False, f"Comparison '{comparison}' not supported" diff --git a/tests/step_defs/when_steps.py b/tests/step_defs/when_steps.py new file mode 100644 index 00000000..a80d7525 --- /dev/null +++ b/tests/step_defs/when_steps.py @@ -0,0 +1,113 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import os +from contextlib import ExitStack +from unittest.mock import patch + +from pytest_bdd import when +from pytest_bdd.parsers import parse +from pytest_bdd import parsers + +from jrnl.cli import cli +from jrnl.os_compat import split_args + + +@when(parse('we change directory to "{directory_name}"')) +def when_we_change_directory(directory_name): + if not os.path.isdir(directory_name): + os.mkdir(directory_name) + + os.chdir(directory_name) + + +@when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) +@when( + parsers.re( + 'we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"' + ) +) +@when(parse('we run "jrnl" and {input_method} "{user_input}"')) +@when(parse('we run "jrnl {command}"')) +@when('we run "jrnl "') +@when('we run "jrnl"') +def we_run( + command, + config_path, + user_input, + cli_run, + capsys, + password, + cache_dir, + editor, + keyring, + input_method, + mocks, +): + assert input_method in ["", "enter", "pipe"] + is_tty = input_method != "pipe" + + if cache_dir["exists"]: + command = command.format(cache_dir=cache_dir["path"]) + + args = split_args(command) + status = 0 + + if user_input: + user_input = user_input.splitlines() if is_tty else [user_input] + + if password: + password = password.splitlines() + + if not password and user_input: + password = user_input + + with ExitStack() as stack: + + stack.enter_context(patch("sys.argv", ["jrnl"] + args)) + + mock_stdin = stack.enter_context( + patch("sys.stdin.read", side_effect=user_input) + ) + stack.enter_context(patch("sys.stdin.isatty", return_value=is_tty)) + mock_input = stack.enter_context( + patch("builtins.input", side_effect=user_input) + ) + mock_getpass = stack.enter_context( + patch("getpass.getpass", side_effect=password) + ) + + if "datetime" in mocks: + stack.enter_context(mocks["datetime"]) + stack.enter_context(mocks["calendar_parse"]) + + # stack.enter_context(patch("datetime.datetime", new=mocks["datetime"])) + # stack.enter_context(patch("jrnl.time.__get_pdt_calendar", return_value=mocks["calendar_parse"])) + + stack.enter_context( + patch("jrnl.install.get_config_path", return_value=config_path) + ) + stack.enter_context( + patch("jrnl.config.get_config_path", return_value=config_path) + ) + mock_editor = stack.enter_context(patch("subprocess.call", side_effect=editor)) + + try: + cli(args) + except StopIteration: + # This happens when input is expected, but don't have any input left + pass + except SystemExit as e: + status = e.code + + captured = capsys.readouterr() + + cli_run["status"] = status + cli_run["stdout"] = captured.out + cli_run["stderr"] = captured.err + cli_run["mocks"] = { + "stdin": mock_stdin, + "input": mock_input, + "getpass": mock_getpass, + "editor": mock_editor, + } From cdad0d62896ff3be496ed4a76e970b9b00334554 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Thu, 24 Jun 2021 09:38:00 -0700 Subject: [PATCH 0452/1132] Replace pyflakes with flake8 for linting --- Makefile | 2 +- jrnl/DayOneJournal.py | 14 ++--- jrnl/Journal.py | 5 +- jrnl/exception.py | 27 ++++---- poetry.lock | 110 ++++++++++++++++++++++++++------- pyproject.toml | 6 +- tests/step_defs/conftest.py | 14 +++-- tests/step_defs/fixtures.py | 13 ++-- tests/step_defs/given_steps.py | 13 ++-- tests/step_defs/helpers.py | 1 - tests/step_defs/then_steps.py | 6 +- tests/step_defs/when_steps.py | 4 +- tests/unit/test_color.py | 3 +- tests/unit/test_display.py | 6 +- tests/unit/test_export.py | 4 +- tests/unit/test_install.py | 5 +- tests/unit/test_os_compat.py | 3 +- tests/unit/test_override.py | 14 ++--- tests/unit/test_parse_args.py | 4 +- 19 files changed, 164 insertions(+), 90 deletions(-) diff --git a/Makefile b/Makefile index 454702c6..a04a9c86 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ format: ## Format files to match style lint: ## Check style with various tools poetry check - poetry run pyflakes jrnl tests + poetry run pflake8 jrnl tests poetry run black --check --diff . unit: # unit tests diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 00271875..01b934e5 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -78,35 +78,35 @@ class DayOne(Journal.Journal): entry.creator_device_agent = dict_entry["Creator"][ "Device Agent" ] - except: + except: # noqa: E722 pass try: entry.creator_generation_date = dict_entry["Creator"][ "Generation Date" ] - except: + except: # noqa: E722 entry.creator_generation_date = date try: entry.creator_host_name = dict_entry["Creator"]["Host Name"] - except: + except: # noqa: E722 pass try: entry.creator_os_agent = dict_entry["Creator"]["OS Agent"] - except: + except: # noqa: E722 pass try: entry.creator_software_agent = dict_entry["Creator"][ "Software Agent" ] - except: + except: # noqa: E722 pass try: entry.location = dict_entry["Location"] - except: + except: # noqa: E722 pass try: entry.weather = dict_entry["Weather"] - except: + except: # noqa: E722 pass self.entries.append(entry) self.sort() diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 181d85c4..6d3c6886 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -220,7 +220,10 @@ class Journal: # If strict mode is on, all tags have to be present in entry tagged = self.search_tags.issubset if strict else self.search_tags.intersection - excluded = lambda tags: len([tag for tag in tags if tag in excluded_tags]) > 0 + + def excluded(tags): + return 0 < len([tag for tag in tags if tag in excluded_tags]) + if contains: contains_lower = contains.casefold() diff --git a/jrnl/exception.py b/jrnl/exception.py index cb6672d7..07bf9023 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -22,25 +22,24 @@ class JrnlError(Exception): def _get_error_message(self, **kwargs): error_messages = { - "ConfigDirectoryIsFile": textwrap.dedent( - """ + "ConfigDirectoryIsFile": """ The path to your jrnl configuration directory is a file, not a directory: {config_directory_path} Removing this file will allow jrnl to save its configuration. - """ - ), - "LineWrapTooSmallForDateFormat": textwrap.dedent( - """ - The provided linewrap value of {config_linewrap} is too small by {columns} columns - to display the timestamps in the configured time format for journal {journal}. + """, + "LineWrapTooSmallForDateFormat": """ + The provided linewrap value of {config_linewrap} is too small by + {columns} columns to display the timestamps in the configured time + format for journal {journal}. - You can avoid this error by specifying a linewrap value that is larger by at least {columns} in the configuration file or by using --config-override at the command line - """ - ), + You can avoid this error by specifying a linewrap value that is larger + by at least {columns} in the configuration file or by using + --config-override at the command line + """, } - return error_messages[self.error_type].format(**kwargs) - - pass + msg = error_messages[self.error_type].format(**kwargs) + msg = textwrap.dedent(msg) + return msg diff --git a/poetry.lock b/poetry.lock index 65670545..50b41e3c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -41,7 +41,7 @@ test = ["coverage", "flake8", "pexpect", "wheel"] [[package]] name = "asteval" -version = "0.9.23" +version = "0.9.25" description = "Safe, minimalistic evaluator of python expression using ast module" category = "main" optional = false @@ -176,6 +176,20 @@ category = "dev" optional = false python-versions = ">=3.5" +[[package]] +name = "flake8" +version = "3.9.2" +description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +mccabe = ">=0.6.0,<0.7.0" +pycodestyle = ">=2.7.0,<2.8.0" +pyflakes = ">=2.3.0,<2.4.0" + [[package]] name = "ghp-import" version = "2.0.1" @@ -237,7 +251,7 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "7.24.1" +version = "7.25.0" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -381,6 +395,14 @@ python-versions = ">=3.5" [package.dependencies] traitlets = "*" +[[package]] +name = "mccabe" +version = "0.6.1" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "mergedeep" version = "1.3.4" @@ -543,6 +565,14 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +[[package]] +name = "pycodestyle" +version = "2.7.0" +description = "Python style guide checker" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + [[package]] name = "pycparser" version = "2.20" @@ -575,6 +605,18 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "pyproject-flake8" +version = "0.0.1a2" +description = "pyproject-flake8 (`pflake8`), a monkey patching wrapper to connect flake8 with pyproject.toml configuration" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +flake8 = "*" +toml = "*" + [[package]] name = "pytest" version = "6.2.4" @@ -775,7 +817,7 @@ pytz = "*" [[package]] name = "watchdog" -version = "2.1.2" +version = "2.1.3" description = "Filesystem events monitoring" category = "dev" optional = false @@ -832,7 +874,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.10" -content-hash = "d9a47064f2050860c955a0871b2bd8899c2f24aaf6482f6a742316fd1fd95ba3" +content-hash = "5be8c38e248b64ff4f2eacf253411b57c91352523c40674f1dec6d8c304996c2" [metadata.files] ansiwrap = [ @@ -852,7 +894,7 @@ argcomplete = [ {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, ] asteval = [ - {file = "asteval-0.9.23.tar.gz", hash = "sha256:f5096a924b1d2f147e70327245d95fc8f534dbe94277b6828ce2a8c049d3a438"}, + {file = "asteval-0.9.25.tar.gz", hash = "sha256:bea22b7d8fa16bcba95ebc72052ae5d8ca97114c9959bb47f8b8eebf30e4342f"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -939,6 +981,10 @@ decorator = [ {file = "decorator-5.0.9-py3-none-any.whl", hash = "sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323"}, {file = "decorator-5.0.9.tar.gz", hash = "sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5"}, ] +flake8 = [ + {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, + {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, +] ghp-import = [ {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, ] @@ -957,8 +1003,8 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-7.24.1-py3-none-any.whl", hash = "sha256:d513e93327cf8657d6467c81f1f894adc125334ffe0e4ddd1abbb1c78d828703"}, - {file = "ipython-7.24.1.tar.gz", hash = "sha256:9bc24a99f5d19721fb8a2d1408908e9c0520a17fff2233ffe82620847f17f1b6"}, + {file = "ipython-7.25.0-py3-none-any.whl", hash = "sha256:aa21412f2b04ad1a652e30564fff6b4de04726ce875eab222c8430edc6db383a"}, + {file = "ipython-7.25.0.tar.gz", hash = "sha256:54bbd1fe3882457aaf28ae060a5ccdef97f212a741754e420028d4ec5c2291dc"}, ] ipython-genutils = [ {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, @@ -1027,6 +1073,10 @@ matplotlib-inline = [ {file = "matplotlib-inline-0.1.2.tar.gz", hash = "sha256:f41d5ff73c9f5385775d5c0bc13b424535c8402fe70ea8210f93e11f3683993e"}, {file = "matplotlib_inline-0.1.2-py3-none-any.whl", hash = "sha256:5cf1176f554abb4fa98cb362aa2b55c500147e4bdbb07e3fda359143e1da0811"}, ] +mccabe = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] mergedeep = [ {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, @@ -1086,6 +1136,10 @@ py = [ {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, ] +pycodestyle = [ + {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, + {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, +] pycparser = [ {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, @@ -1102,6 +1156,10 @@ pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] +pyproject-flake8 = [ + {file = "pyproject-flake8-0.0.1a2.tar.gz", hash = "sha256:bdeca37f78ecd34bd64a49d3657d53d099f5445831071a31c46e1fe20cd61461"}, + {file = "pyproject_flake8-0.0.1a2-py2.py3-none-any.whl", hash = "sha256:e61ed1dc088e9f9f8a7170967ac4ec135acfef3a59ab9738c7b58cc11f294a7e"}, +] pytest = [ {file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"}, {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, @@ -1264,23 +1322,27 @@ tzlocal = [ {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] watchdog = [ - {file = "watchdog-2.1.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:581e3548159fe7d2a9f377a1fbcb41bdcee46849cca8ab803c7ac2e5e04ec77c"}, - {file = "watchdog-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:edcd9ef3fd460bb8a98eb1fcf99941e9fd9f275f45f1a82cb1359ec92975d647"}, - {file = "watchdog-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d34ce2261f118ecd57eedeef95fc2a495fc4a40b3ed7b3bf0bd7a8ccc1ab4f8f"}, - {file = "watchdog-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:668391e6c32742d76e5be5db6bf95c455fa4b3d11e76a77c13b39bccb3a47a72"}, - {file = "watchdog-2.1.2-pp36-pypy36_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6ef9fe57162c4c361692620e1d9167574ba1975ee468b24051ca11c9bba6438e"}, - {file = "watchdog-2.1.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:58ebb1095ee493008a7789d47dd62e4999505d82be89fc884d473086fccc6ebd"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:91387ee2421f30b75f7ff632c9d48f76648e56bf346a7c805c0a34187a93aab4"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_armv7l.whl", hash = "sha256:a6471517315a8541a943c00b45f1d252e36898a3ae963d2d52509b89a50cb2b9"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_i686.whl", hash = "sha256:a42e6d652f820b2b94cd03156c62559a2ea68d476476dfcd77d931e7f1012d4a"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_ppc64.whl", hash = "sha256:3d6405681471ebe0beb3aa083998c4870e48b57f8afdb45ea1b5957cc5cf1014"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:598d772beeaf9c98d0df946fbabf0c8365dd95ea46a250c224c725fe0c4730bc"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_s390x.whl", hash = "sha256:4b219d46d89cfa49af1d73175487c14a318a74cb8c5442603fd13c6a5b418c86"}, - {file = "watchdog-2.1.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:188145185c08c73c56f1478ccf1f0f0f85101191439679b35b6b100886ce0b39"}, - {file = "watchdog-2.1.2-py3-none-win32.whl", hash = "sha256:255a32d44bbbe62e52874ff755e2eefe271b150e0ec240ad7718a62a7a7a73c4"}, - {file = "watchdog-2.1.2-py3-none-win_amd64.whl", hash = "sha256:1a62a4671796dc93d1a7262286217d9e75823c63d4c42782912d39a506d30046"}, - {file = "watchdog-2.1.2-py3-none-win_ia64.whl", hash = "sha256:104266a778906ae0e971368d368a65c4cd032a490a9fca5ba0b78c6c7ae11720"}, - {file = "watchdog-2.1.2.tar.gz", hash = "sha256:0237db4d9024859bea27d0efb59fe75eef290833fd988b8ead7a879b0308c2db"}, + {file = "watchdog-2.1.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9628f3f85375a17614a2ab5eac7665f7f7be8b6b0a2a228e6f6a2e91dd4bfe26"}, + {file = "watchdog-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:acc4e2d5be6f140f02ee8590e51c002829e2c33ee199036fcd61311d558d89f4"}, + {file = "watchdog-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:85b851237cf3533fabbc034ffcd84d0fa52014b3121454e5f8b86974b531560c"}, + {file = "watchdog-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a12539ecf2478a94e4ba4d13476bb2c7a2e0a2080af2bb37df84d88b1b01358a"}, + {file = "watchdog-2.1.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6fe9c8533e955c6589cfea6f3f0a1a95fb16867a211125236c82e1815932b5d7"}, + {file = "watchdog-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d9456f0433845e7153b102fffeb767bde2406b76042f2216838af3b21707894e"}, + {file = "watchdog-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fd8c595d5a93abd441ee7c5bb3ff0d7170e79031520d113d6f401d0cf49d7c8f"}, + {file = "watchdog-2.1.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0bcfe904c7d404eb6905f7106c54873503b442e8e918cc226e1828f498bdc0ca"}, + {file = "watchdog-2.1.3-pp36-pypy36_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bf84bd94cbaad8f6b9cbaeef43080920f4cb0e61ad90af7106b3de402f5fe127"}, + {file = "watchdog-2.1.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b8ddb2c9f92e0c686ea77341dcb58216fa5ff7d5f992c7278ee8a392a06e86bb"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8805a5f468862daf1e4f4447b0ccf3acaff626eaa57fbb46d7960d1cf09f2e6d"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_armv7l.whl", hash = "sha256:3e305ea2757f81d8ebd8559d1a944ed83e3ab1bdf68bcf16ec851b97c08dc035"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_i686.whl", hash = "sha256:431a3ea70b20962e6dee65f0eeecd768cd3085ea613ccb9b53c8969de9f6ebd2"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_ppc64.whl", hash = "sha256:e4929ac2aaa2e4f1a30a36751160be391911da463a8799460340901517298b13"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:201cadf0b8c11922f54ec97482f95b2aafca429c4c3a4bb869a14f3c20c32686"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_s390x.whl", hash = "sha256:3a7d242a7963174684206093846537220ee37ba9986b824a326a8bb4ef329a33"}, + {file = "watchdog-2.1.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:54e057727dd18bd01a3060dbf5104eb5a495ca26316487e0f32a394fd5fe725a"}, + {file = "watchdog-2.1.3-py3-none-win32.whl", hash = "sha256:b5fc5c127bad6983eecf1ad117ab3418949f18af9c8758bd10158be3647298a9"}, + {file = "watchdog-2.1.3-py3-none-win_amd64.whl", hash = "sha256:44acad6f642996a2b50bb9ce4fb3730dde08f23e79e20cd3d8e2a2076b730381"}, + {file = "watchdog-2.1.3-py3-none-win_ia64.whl", hash = "sha256:0bcdf7b99b56a3ae069866c33d247c9994ffde91b620eaf0306b27e099bd1ae0"}, + {file = "watchdog-2.1.3.tar.gz", hash = "sha256:e5236a8e8602ab6db4b873664c2d356c365ab3cac96fbdec4970ad616415dd45"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, diff --git a/pyproject.toml b/pyproject.toml index 2719b954..36bc3d13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,12 +48,12 @@ behave = "^1.2" mkdocs = "^1.0" black = {version = "^21.5b2",allow-prereleases = true} toml = ">=0.10" -pyflakes = ">=2.2.0" pytest = ">=6.2" pytest-bdd = "^4.0.1" yq = ">=2.11" ipdb = ">=0.13" pytest-clarity = "^0.3.0-alpha.0" +pyproject-flake8 = "^0.0.1-alpha.2" [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' @@ -84,6 +84,10 @@ filterwarnings = [ "ignore:[WinError 5].*" ] +[tool.flake8] +# ignore formatting warnings and errors because we use Black to autoformat +extend-ignore = "E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W3,W5" + [build-system] requires = ["poetry>=1.1"] build-backend = "poetry.masonry.api" diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index d73fcec4..a3021972 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -1,13 +1,17 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from jrnl.os_compat import on_windows from pytest import mark -from .fixtures import * -from .given_steps import * -from .when_steps import * -from .then_steps import * +from jrnl.os_compat import on_windows + + +pytest_plugins = [ + "tests.step_defs.fixtures", + "tests.step_defs.given_steps", + "tests.step_defs.when_steps", + "tests.step_defs.then_steps", +] def pytest_bdd_apply_tag(tag, function): diff --git a/tests/step_defs/fixtures.py b/tests/step_defs/fixtures.py index a8e243ae..a93a7e43 100644 --- a/tests/step_defs/fixtures.py +++ b/tests/step_defs/fixtures.py @@ -1,14 +1,14 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import os from collections import defaultdict -from keyring import backend -from keyring import set_keyring -from keyring import errors +import os from pathlib import Path import tempfile +from keyring import backend +from keyring import errors +from keyring import set_keyring from pytest import fixture import toml @@ -59,7 +59,7 @@ class NoKeyring(backend.KeyringBackend): class FailedKeyring(backend.KeyringBackend): - """ A keyring that cannot be retrieved. """ + """A keyring that cannot be retrieved.""" priority = 2 @@ -192,11 +192,10 @@ def editor(editor_state): Path(tmpfile).touch() with open(tmpfile, editor_state["intent"]["method"]) as f: # Touch the file so jrnl knows it was edited - if editor_state["intent"]["input"] != None: + if editor_state["intent"]["input"] is not None: f.write(editor_state["intent"]["input"]) file_content = f.read() editor_state["tmpfile"]["content"] = file_content return _mock_editor - diff --git a/tests/step_defs/given_steps.py b/tests/step_defs/given_steps.py index 8db8fa1c..649d44c5 100644 --- a/tests/step_defs/given_steps.py +++ b/tests/step_defs/given_steps.py @@ -1,22 +1,23 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +from datetime import datetime import json import os -from datetime import datetime -from keyring import set_keyring import random -import string import shutil -from unittest.mock import patch +import string from unittest.mock import MagicMock +from unittest.mock import patch from xml.etree import ElementTree +from keyring import set_keyring +from pytest_bdd import given +from pytest_bdd.parsers import parse + from jrnl import __version__ from jrnl.time import __get_pdt_calendar -from pytest_bdd import given -from pytest_bdd.parsers import parse from .fixtures import FailedKeyring from .fixtures import TestKeyring diff --git a/tests/step_defs/helpers.py b/tests/step_defs/helpers.py index e2ea91c9..7d089597 100644 --- a/tests/step_defs/helpers.py +++ b/tests/step_defs/helpers.py @@ -4,7 +4,6 @@ import os - def does_directory_contain_files(file_list, directory_path): if not os.path.isdir(directory_path): return False diff --git a/tests/step_defs/then_steps.py b/tests/step_defs/then_steps.py index 4bcf1c56..b56c203f 100644 --- a/tests/step_defs/then_steps.py +++ b/tests/step_defs/then_steps.py @@ -4,17 +4,17 @@ import json import os import re -import yaml from xml.etree import ElementTree from pytest_bdd import then from pytest_bdd.parsers import parse +import yaml from jrnl.config import scope_config -from .helpers import parse_should_or_should_not -from .helpers import does_directory_contain_files from .helpers import assert_equal_tags_ignoring_order +from .helpers import does_directory_contain_files +from .helpers import parse_should_or_should_not @then("we should get no error") diff --git a/tests/step_defs/when_steps.py b/tests/step_defs/when_steps.py index a80d7525..2e72173b 100644 --- a/tests/step_defs/when_steps.py +++ b/tests/step_defs/when_steps.py @@ -1,13 +1,13 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import os from contextlib import ExitStack +import os from unittest.mock import patch +from pytest_bdd import parsers from pytest_bdd import when from pytest_bdd.parsers import parse -from pytest_bdd import parsers from jrnl.cli import cli from jrnl.os_compat import split_args diff --git a/tests/unit/test_color.py b/tests/unit/test_color.py index 14dc7938..527b8e89 100644 --- a/tests/unit/test_color.py +++ b/tests/unit/test_color.py @@ -1,7 +1,8 @@ +from colorama import Fore +from colorama import Style import pytest from jrnl.color import colorize -from colorama import Fore, Style @pytest.fixture() diff --git a/tests/unit/test_display.py b/tests/unit/test_display.py index 72a9c451..921d1631 100644 --- a/tests/unit/test_display.py +++ b/tests/unit/test_display.py @@ -1,7 +1,9 @@ import argparse -import jrnl -import pytest from unittest import mock + +import pytest + +import jrnl from jrnl.jrnl import _display_search_results diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index 0f494f79..8bc1b410 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -1,8 +1,8 @@ +import pytest + from jrnl.exception import JrnlError from jrnl.plugins.fancy_exporter import check_provided_linewrap_viability -import pytest - @pytest.fixture() def datestr(): diff --git a/tests/unit/test_install.py b/tests/unit/test_install.py index 31ec150c..bc36b927 100644 --- a/tests/unit/test_install.py +++ b/tests/unit/test_install.py @@ -1,6 +1,7 @@ -from unittest import mock -import pytest import sys +from unittest import mock + +import pytest @pytest.mark.filterwarnings( diff --git a/tests/unit/test_os_compat.py b/tests/unit/test_os_compat.py index f7c058f1..02d54716 100644 --- a/tests/unit/test_os_compat.py +++ b/tests/unit/test_os_compat.py @@ -1,8 +1,9 @@ from unittest import mock + import pytest -from jrnl.os_compat import on_windows from jrnl.os_compat import on_posix +from jrnl.os_compat import on_windows from jrnl.os_compat import split_args diff --git a/tests/unit/test_override.py b/tests/unit/test_override.py index 32ec0595..d22709f4 100644 --- a/tests/unit/test_override.py +++ b/tests/unit/test_override.py @@ -1,12 +1,10 @@ import pytest -from jrnl.override import ( - apply_overrides, - _recursively_apply, - _get_config_node, - _get_key_and_value_from_pair, - _convert_dots_to_list, -) +from jrnl.override import _convert_dots_to_list +from jrnl.override import _get_config_node +from jrnl.override import _get_key_and_value_from_pair +from jrnl.override import _recursively_apply +from jrnl.override import apply_overrides @pytest.fixture() @@ -56,7 +54,7 @@ def test_recursively_apply(): def test_get_config_node(minimal_config): assert len(minimal_config.keys()) == 4 assert _get_config_node(minimal_config, "editor") == "vim" - assert _get_config_node(minimal_config, "display_format") == None + assert _get_config_node(minimal_config, "display_format") is None def test_get_kv_from_pair(): diff --git a/tests/unit/test_parse_args.py b/tests/unit/test_parse_args.py index 4b140fc1..0725d33d 100644 --- a/tests/unit/test_parse_args.py +++ b/tests/unit/test_parse_args.py @@ -283,10 +283,10 @@ class TestDeserialization: assert cfg["linewrap"] == 23 cfg = make_yaml_valid_dict(["encrypt", "false"]) - assert cfg["encrypt"] == False + assert cfg["encrypt"] is False cfg = make_yaml_valid_dict(["editor", "vi -c startinsert"]) assert cfg["editor"] == "vi -c startinsert" cfg = make_yaml_valid_dict(["highlight", "true"]) - assert cfg["highlight"] == True + assert cfg["highlight"] is True From f99411f2f96620ae9683482c769f3d4f39083c8d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Jul 2021 14:52:27 -0700 Subject: [PATCH 0453/1132] move some files around because pytest is being weird --- Makefile | 10 +- poetry.lock | 114 +++--- tests/{ => bdd}/features/build.feature | 0 tests/{ => bdd}/features/core.feature | 0 tests/{ => bdd}/features/datetime.feature | 0 tests/{ => bdd}/features/delete.feature | 0 tests/{ => bdd}/features/encrypt.feature | 0 tests/{ => bdd}/features/file_storage.feature | 0 tests/{ => bdd}/features/format.feature | 0 tests/{ => bdd}/features/import.feature | 0 .../features/multiple_journals.feature | 0 tests/{ => bdd}/features/password.feature | 0 tests/{ => bdd}/features/search.feature | 0 tests/{ => bdd}/features/star.feature | 0 tests/{ => bdd}/features/tag.feature | 0 tests/{ => bdd}/features/upgrade.feature | 0 tests/{ => bdd}/features/write.feature | 0 tests/bdd/test_features.py | 17 + tests/{step_defs => }/conftest.py | 8 +- tests/step_defs/__init__.py | 3 - tests/step_defs/fixtures.py | 201 ----------- tests/step_defs/given_steps.py | 134 ------- tests/step_defs/helpers.py | 40 --- tests/step_defs/test_features.py | 17 - tests/step_defs/then_steps.py | 331 ------------------ tests/step_defs/when_steps.py | 113 ------ 26 files changed, 81 insertions(+), 907 deletions(-) rename tests/{ => bdd}/features/build.feature (100%) rename tests/{ => bdd}/features/core.feature (100%) rename tests/{ => bdd}/features/datetime.feature (100%) rename tests/{ => bdd}/features/delete.feature (100%) rename tests/{ => bdd}/features/encrypt.feature (100%) rename tests/{ => bdd}/features/file_storage.feature (100%) rename tests/{ => bdd}/features/format.feature (100%) rename tests/{ => bdd}/features/import.feature (100%) rename tests/{ => bdd}/features/multiple_journals.feature (100%) rename tests/{ => bdd}/features/password.feature (100%) rename tests/{ => bdd}/features/search.feature (100%) rename tests/{ => bdd}/features/star.feature (100%) rename tests/{ => bdd}/features/tag.feature (100%) rename tests/{ => bdd}/features/upgrade.feature (100%) rename tests/{ => bdd}/features/write.feature (100%) create mode 100644 tests/bdd/test_features.py rename tests/{step_defs => }/conftest.py (81%) delete mode 100644 tests/step_defs/__init__.py delete mode 100644 tests/step_defs/fixtures.py delete mode 100644 tests/step_defs/given_steps.py delete mode 100644 tests/step_defs/helpers.py delete mode 100644 tests/step_defs/test_features.py delete mode 100644 tests/step_defs/then_steps.py delete mode 100644 tests/step_defs/when_steps.py diff --git a/Makefile b/Makefile index a04a9c86..a4494ee3 100644 --- a/Makefile +++ b/Makefile @@ -24,13 +24,13 @@ lint: ## Check style with various tools unit: # unit tests poetry run pytest tests/unit -e2e: # end-to-end tests - poetry run pytest tests/step_defs --gherkin-terminal-reporter --tb=native --diff-type=unified +bdd: # bdd tests + poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native --diff-type=unified -e2e-debug: # end-to-end tests - poetry run pytest tests/step_defs --gherkin-terminal-reporter --tb=native --diff-type=unified -x -vv +bdd-debug: # bdd tests + poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native --diff-type=unified -x -vv -test: lint unit e2e ## Run unit tests and behave tests +test: lint unit bdd ## Run unit tests and behave tests build: poetry build diff --git a/poetry.lock b/poetry.lock index 50b41e3c..2d1a8ea2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -214,7 +214,7 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.5.0" +version = "4.6.0" description = "Read metadata from Python packages" category = "main" optional = false @@ -226,7 +226,8 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +perf = ["ipython"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -444,11 +445,11 @@ python-versions = "*" [[package]] name = "packaging" -version = "20.9" +version = "21.0" description = "Core utilities for Python packages" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2" @@ -641,11 +642,11 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-bdd" -version = "4.0.2" +version = "4.1.0" description = "BDD for pytest" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [package.dependencies] glob2 = "*" @@ -654,7 +655,6 @@ parse = "*" parse-type = "*" py = "*" pytest = ">=4.3" -six = ">=1.9.0" [[package]] name = "pytest-clarity" @@ -724,7 +724,7 @@ pyyaml = "*" [[package]] name = "regex" -version = "2021.4.4" +version = "2021.7.1" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -861,7 +861,7 @@ test = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" -version = "3.4.1" +version = "3.5.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false @@ -869,7 +869,7 @@ python-versions = ">=3.6" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" @@ -992,8 +992,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"}, - {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"}, + {file = "importlib_metadata-4.6.0-py3-none-any.whl", hash = "sha256:c6513572926a96458f8c8f725bf0e00108fba0c9583ade9bd15b869c9d726e33"}, + {file = "importlib_metadata-4.6.0.tar.gz", hash = "sha256:4a5611fea3768d3d967c447ab4e93f567d95db92225b43b7b238dbfb855d70bb"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1090,8 +1090,8 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] packaging = [ - {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, - {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, + {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, + {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, ] parse = [ {file = "parse-1.19.0.tar.gz", hash = "sha256:9ff82852bcb65d139813e2a5197627a94966245c897796760a3a2a8eb66f020b"}, @@ -1165,8 +1165,8 @@ pytest = [ {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, ] pytest-bdd = [ - {file = "pytest-bdd-4.0.2.tar.gz", hash = "sha256:982489f2f036c7561affe4eeb5b392a37e1ace2a9f260cad747b1c8119e63cfd"}, - {file = "pytest_bdd-4.0.2-py2.py3-none-any.whl", hash = "sha256:74ea5a147ea558c99ae83d838e6acbe5c9e6843884a958f8231615d96838733d"}, + {file = "pytest-bdd-4.1.0.tar.gz", hash = "sha256:304cd2b09923b838d0c2f08331d1f4236a14ef3594efa94e3bdae0f384d3fa5d"}, + {file = "pytest_bdd-4.1.0-py3-none-any.whl", hash = "sha256:7c5221680cec9a97630e1fae6132f4a97c2f86a90914206ee06a55ae1a409fe5"}, ] pytest-clarity = [ {file = "pytest-clarity-0.3.0a0.tar.gz", hash = "sha256:5cc99e3d9b7969dfe17e5f6072d45a917c59d363b679686d3c958a1ded2e4dcf"}, @@ -1215,47 +1215,43 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2021.4.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:619d71c59a78b84d7f18891fe914446d07edd48dc8328c8e149cbe0929b4e000"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:47bf5bf60cf04d72bf6055ae5927a0bd9016096bf3d742fa50d9bf9f45aa0711"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:281d2fd05555079448537fe108d79eb031b403dac622621c78944c235f3fcf11"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:bd28bc2e3a772acbb07787c6308e00d9626ff89e3bfcdebe87fa5afbfdedf968"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:7c2a1af393fcc09e898beba5dd59196edaa3116191cc7257f9224beaed3e1aa0"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c38c71df845e2aabb7fb0b920d11a1b5ac8526005e533a8920aea97efb8ec6a4"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:96fcd1888ab4d03adfc9303a7b3c0bd78c5412b2bfbe76db5b56d9eae004907a"}, - {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:ade17eb5d643b7fead300a1641e9f45401c98eee23763e9ed66a43f92f20b4a7"}, - {file = "regex-2021.4.4-cp36-cp36m-win32.whl", hash = "sha256:e8e5b509d5c2ff12f8418006d5a90e9436766133b564db0abaec92fd27fcee29"}, - {file = "regex-2021.4.4-cp36-cp36m-win_amd64.whl", hash = "sha256:11d773d75fa650cd36f68d7ca936e3c7afaae41b863b8c387a22aaa78d3c5c79"}, - {file = "regex-2021.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d3029c340cfbb3ac0a71798100ccc13b97dddf373a4ae56b6a72cf70dfd53bc8"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:18c071c3eb09c30a264879f0d310d37fe5d3a3111662438889ae2eb6fc570c31"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:4c557a7b470908b1712fe27fb1ef20772b78079808c87d20a90d051660b1d69a"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:01afaf2ec48e196ba91b37451aa353cb7eda77efe518e481707e0515025f0cd5"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:3a9cd17e6e5c7eb328517969e0cb0c3d31fd329298dd0c04af99ebf42e904f82"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:90f11ff637fe8798933fb29f5ae1148c978cccb0452005bf4c69e13db951e765"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:919859aa909429fb5aa9cf8807f6045592c85ef56fdd30a9a3747e513db2536e"}, - {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:339456e7d8c06dd36a22e451d58ef72cef293112b559010db3d054d5560ef439"}, - {file = "regex-2021.4.4-cp37-cp37m-win32.whl", hash = "sha256:67bdb9702427ceddc6ef3dc382455e90f785af4c13d495f9626861763ee13f9d"}, - {file = "regex-2021.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:32e65442138b7b76dd8173ffa2cf67356b7bc1768851dded39a7a13bf9223da3"}, - {file = "regex-2021.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1e1c20e29358165242928c2de1482fb2cf4ea54a6a6dea2bd7a0e0d8ee321500"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:314d66636c494ed9c148a42731b3834496cc9a2c4251b1661e40936814542b14"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6d1b01031dedf2503631d0903cb563743f397ccaf6607a5e3b19a3d76fc10480"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:741a9647fcf2e45f3a1cf0e24f5e17febf3efe8d4ba1281dcc3aa0459ef424dc"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:4c46e22a0933dd783467cf32b3516299fb98cfebd895817d685130cc50cd1093"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:e512d8ef5ad7b898cdb2d8ee1cb09a8339e4f8be706d27eaa180c2f177248a10"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:980d7be47c84979d9136328d882f67ec5e50008681d94ecc8afa8a65ed1f4a6f"}, - {file = "regex-2021.4.4-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:ce15b6d103daff8e9fee13cf7f0add05245a05d866e73926c358e871221eae87"}, - {file = "regex-2021.4.4-cp38-cp38-win32.whl", hash = "sha256:a91aa8619b23b79bcbeb37abe286f2f408d2f2d6f29a17237afda55bb54e7aac"}, - {file = "regex-2021.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:c0502c0fadef0d23b128605d69b58edb2c681c25d44574fc673b0e52dce71ee2"}, - {file = "regex-2021.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:598585c9f0af8374c28edd609eb291b5726d7cbce16be6a8b95aa074d252ee17"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:ee54ff27bf0afaf4c3b3a62bcd016c12c3fdb4ec4f413391a90bd38bc3624605"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7d9884d86dd4dd489e981d94a65cd30d6f07203d90e98f6f657f05170f6324c9"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:bf5824bfac591ddb2c1f0a5f4ab72da28994548c708d2191e3b87dd207eb3ad7"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:563085e55b0d4fb8f746f6a335893bda5c2cef43b2f0258fe1020ab1dd874df8"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9c3db21af35e3b3c05764461b262d6f05bbca08a71a7849fd79d47ba7bc33ed"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:3916d08be28a1149fb97f7728fca1f7c15d309a9f9682d89d79db75d5e52091c"}, - {file = "regex-2021.4.4-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:fd45ff9293d9274c5008a2054ecef86a9bfe819a67c7be1afb65e69b405b3042"}, - {file = "regex-2021.4.4-cp39-cp39-win32.whl", hash = "sha256:fa4537fb4a98fe8fde99626e4681cc644bdcf2a795038533f9f711513a862ae6"}, - {file = "regex-2021.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:97f29f57d5b84e73fbaf99ab3e26134e6687348e95ef6b48cfd2c06807005a07"}, - {file = "regex-2021.4.4.tar.gz", hash = "sha256:52ba3d3f9b942c49d7e4bc105bb28551c44065f139a65062ab7912bef10c9afb"}, + {file = "regex-2021.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:494d0172774dc0beeea984b94c95389143db029575f7ca908edd74469321ea99"}, + {file = "regex-2021.7.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:8cf6728f89b071bd3ab37cb8a0e306f4de897553a0ed07442015ee65fbf53d62"}, + {file = "regex-2021.7.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1806370b2bef4d4193eebe8ee59a9fd7547836a34917b7badbe6561a8594d9cb"}, + {file = "regex-2021.7.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d0cf2651a8804f6325747c7e55e3be0f90ee2848e25d6b817aa2728d263f9abb"}, + {file = "regex-2021.7.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:268fe9dd1deb4a30c8593cabd63f7a241dfdc5bd9dd0233906c718db22cdd49a"}, + {file = "regex-2021.7.1-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:7743798dfb573d006f1143d745bf17efad39775a5190b347da5d83079646be56"}, + {file = "regex-2021.7.1-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:0e46c1191b2eb293a6912269ed08b4512e7e241bbf591f97e527492e04c77e93"}, + {file = "regex-2021.7.1-cp36-cp36m-win32.whl", hash = "sha256:b1dbeef938281f240347d50f28ae53c4b046a23389cd1fc4acec5ea0eae646a1"}, + {file = "regex-2021.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6c72ebb72e64e9bd195cb35a9b9bbfb955fd953b295255b8ae3e4ad4a146b615"}, + {file = "regex-2021.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf819c5b77ff44accc9a24e31f1f7ceaaf6c960816913ed3ef8443b9d20d81b6"}, + {file = "regex-2021.7.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:e80d2851109e56420b71f9702ad1646e2f0364528adbf6af85527bc61e49f394"}, + {file = "regex-2021.7.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:a1b6a3f600d6aff97e3f28c34192c9ed93fee293bd96ef327b64adb51a74b2f6"}, + {file = "regex-2021.7.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:ed77b97896312bc2deafe137ca2626e8b63808f5bedb944f73665c68093688a7"}, + {file = "regex-2021.7.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a548bb51c4476332ce4139df8e637386730f79a92652a907d12c696b6252b64d"}, + {file = "regex-2021.7.1-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:210c359e6ee5b83f7d8c529ba3c75ba405481d50f35a420609b0db827e2e3bb5"}, + {file = "regex-2021.7.1-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:1d386402ae7f3c9b107ae5863f7ecccb0167762c82a687ae6526b040feaa5ac6"}, + {file = "regex-2021.7.1-cp37-cp37m-win32.whl", hash = "sha256:5049d00dbb78f9d166d1c704e93934d42cce0570842bb1a61695123d6b01de09"}, + {file = "regex-2021.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:361be4d311ac995a8c7ad577025a3ae3a538531b1f2cf32efd8b7e5d33a13e5a"}, + {file = "regex-2021.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f32f47fb22c988c0b35756024b61d156e5c4011cb8004aa53d93b03323c45657"}, + {file = "regex-2021.7.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:b024ee43ee6b310fad5acaee23e6485b21468718cb792a9d1693eecacc3f0b7e"}, + {file = "regex-2021.7.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b092754c06852e8a8b022004aff56c24b06310189186805800d09313c37ce1f8"}, + {file = "regex-2021.7.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:a8a5826d8a1b64e2ff9af488cc179e1a4d0f144d11ce486a9f34ea38ccedf4ef"}, + {file = "regex-2021.7.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:444723ebaeb7fa8125f29c01a31101a3854ac3de293e317944022ae5effa53a4"}, + {file = "regex-2021.7.1-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:fdad3122b69cdabdb3da4c2a4107875913ac78dab0117fc73f988ad589c66b66"}, + {file = "regex-2021.7.1-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:4b1999ef60c45357598935c12508abf56edbbb9c380df6f336de38a6c3a294ae"}, + {file = "regex-2021.7.1-cp38-cp38-win32.whl", hash = "sha256:e07e92935040c67f49571779d115ecb3e727016d42fb36ee0d8757db4ca12ee0"}, + {file = "regex-2021.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:6b8b629f93246e507287ee07e26744beaffb4c56ed520576deac8b615bd76012"}, + {file = "regex-2021.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:56bef6b414949e2c9acf96cb5d78de8b529c7b99752619494e78dc76f99fd005"}, + {file = "regex-2021.7.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:78a2a885345a2d60b5e68099e877757d5ed12e46ba1e87507175f14f80892af3"}, + {file = "regex-2021.7.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3f7a92e60930f8fca2623d9e326c173b7cf2c8b7e4fdcf984b75a1d2fb08114d"}, + {file = "regex-2021.7.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4fc86b729ab88fe8ac3ec92287df253c64aa71560d76da5acd8a2e245839c629"}, + {file = "regex-2021.7.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:59845101de68fd5d3a1145df9ea022e85ecd1b49300ea68307ad4302320f6f61"}, + {file = "regex-2021.7.1-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:ce269e903b00d1ab4746793e9c50a57eec5d5388681abef074d7b9a65748fca5"}, + {file = "regex-2021.7.1-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:c11f2fca544b5e30a0e813023196a63b1cb9869106ef9a26e9dae28bce3e4e26"}, + {file = "regex-2021.7.1-cp39-cp39-win32.whl", hash = "sha256:1ccbd41dbee3a31e18938096510b7d4ee53aa9fce2ee3dcc8ec82ae264f6acfd"}, + {file = "regex-2021.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:18040755606b0c21281493ec309214bd61e41a170509e5014f41d6a5a586e161"}, + {file = "regex-2021.7.1.tar.gz", hash = "sha256:849802379a660206277675aa5a5c327f5c910c690649535863ddf329b0ba8c87"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, @@ -1357,6 +1353,6 @@ yq = [ {file = "yq-2.12.2.tar.gz", hash = "sha256:2f156d0724b61487ac8752ed4eaa702a5737b804d5afa46fa55866951cd106d2"}, ] zipp = [ - {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, - {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, + {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, + {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, ] diff --git a/tests/features/build.feature b/tests/bdd/features/build.feature similarity index 100% rename from tests/features/build.feature rename to tests/bdd/features/build.feature diff --git a/tests/features/core.feature b/tests/bdd/features/core.feature similarity index 100% rename from tests/features/core.feature rename to tests/bdd/features/core.feature diff --git a/tests/features/datetime.feature b/tests/bdd/features/datetime.feature similarity index 100% rename from tests/features/datetime.feature rename to tests/bdd/features/datetime.feature diff --git a/tests/features/delete.feature b/tests/bdd/features/delete.feature similarity index 100% rename from tests/features/delete.feature rename to tests/bdd/features/delete.feature diff --git a/tests/features/encrypt.feature b/tests/bdd/features/encrypt.feature similarity index 100% rename from tests/features/encrypt.feature rename to tests/bdd/features/encrypt.feature diff --git a/tests/features/file_storage.feature b/tests/bdd/features/file_storage.feature similarity index 100% rename from tests/features/file_storage.feature rename to tests/bdd/features/file_storage.feature diff --git a/tests/features/format.feature b/tests/bdd/features/format.feature similarity index 100% rename from tests/features/format.feature rename to tests/bdd/features/format.feature diff --git a/tests/features/import.feature b/tests/bdd/features/import.feature similarity index 100% rename from tests/features/import.feature rename to tests/bdd/features/import.feature diff --git a/tests/features/multiple_journals.feature b/tests/bdd/features/multiple_journals.feature similarity index 100% rename from tests/features/multiple_journals.feature rename to tests/bdd/features/multiple_journals.feature diff --git a/tests/features/password.feature b/tests/bdd/features/password.feature similarity index 100% rename from tests/features/password.feature rename to tests/bdd/features/password.feature diff --git a/tests/features/search.feature b/tests/bdd/features/search.feature similarity index 100% rename from tests/features/search.feature rename to tests/bdd/features/search.feature diff --git a/tests/features/star.feature b/tests/bdd/features/star.feature similarity index 100% rename from tests/features/star.feature rename to tests/bdd/features/star.feature diff --git a/tests/features/tag.feature b/tests/bdd/features/tag.feature similarity index 100% rename from tests/features/tag.feature rename to tests/bdd/features/tag.feature diff --git a/tests/features/upgrade.feature b/tests/bdd/features/upgrade.feature similarity index 100% rename from tests/features/upgrade.feature rename to tests/bdd/features/upgrade.feature diff --git a/tests/features/write.feature b/tests/bdd/features/write.feature similarity index 100% rename from tests/features/write.feature rename to tests/bdd/features/write.feature diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py new file mode 100644 index 00000000..b824df39 --- /dev/null +++ b/tests/bdd/test_features.py @@ -0,0 +1,17 @@ +from pytest_bdd import scenarios + +scenarios("features/build.feature") +scenarios("features/core.feature") +scenarios("features/datetime.feature") +scenarios("features/delete.feature") +scenarios("features/encrypt.feature") +scenarios("features/file_storage.feature") +scenarios("features/format.feature") +scenarios("features/import.feature") +scenarios("features/multiple_journals.feature") +scenarios("features/password.feature") +scenarios("features/search.feature") +scenarios("features/star.feature") +scenarios("features/tag.feature") +scenarios("features/upgrade.feature") +scenarios("features/write.feature") diff --git a/tests/step_defs/conftest.py b/tests/conftest.py similarity index 81% rename from tests/step_defs/conftest.py rename to tests/conftest.py index a3021972..277e2602 100644 --- a/tests/step_defs/conftest.py +++ b/tests/conftest.py @@ -7,10 +7,10 @@ from jrnl.os_compat import on_windows pytest_plugins = [ - "tests.step_defs.fixtures", - "tests.step_defs.given_steps", - "tests.step_defs.when_steps", - "tests.step_defs.then_steps", + "tests.lib.fixtures", + "tests.lib.given_steps", + "tests.lib.when_steps", + "tests.lib.then_steps", ] diff --git a/tests/step_defs/__init__.py b/tests/step_defs/__init__.py deleted file mode 100644 index 46468510..00000000 --- a/tests/step_defs/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -import sys - -sys.path.append("..") diff --git a/tests/step_defs/fixtures.py b/tests/step_defs/fixtures.py deleted file mode 100644 index a93a7e43..00000000 --- a/tests/step_defs/fixtures.py +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -from collections import defaultdict -import os -from pathlib import Path -import tempfile - -from keyring import backend -from keyring import errors -from keyring import set_keyring -from pytest import fixture -import toml - -from jrnl.config import load_config - - -# --- Keyring --- # -@fixture -def keyring(): - set_keyring(NoKeyring()) - - -@fixture -def keyring_type(): - return "default" - - -class TestKeyring(backend.KeyringBackend): - """A test keyring that just stores its values in a hash""" - - priority = 1 - keys = defaultdict(dict) - - def set_password(self, servicename, username, password): - self.keys[servicename][username] = password - - def get_password(self, servicename, username): - return self.keys[servicename].get(username) - - def delete_password(self, servicename, username): - self.keys[servicename][username] = None - - -class NoKeyring(backend.KeyringBackend): - """A keyring that simulated an environment with no keyring backend.""" - - priority = 2 - keys = defaultdict(dict) - - def set_password(self, servicename, username, password): - raise errors.NoKeyringError - - def get_password(self, servicename, username): - raise errors.NoKeyringError - - def delete_password(self, servicename, username): - raise errors.NoKeyringError - - -class FailedKeyring(backend.KeyringBackend): - """A keyring that cannot be retrieved.""" - - priority = 2 - - def set_password(self, servicename, username, password): - raise errors.KeyringError - - def get_password(self, servicename, username): - raise errors.KeyringError - - def delete_password(self, servicename, username): - raise errors.KeyringError - - -# ----- Misc ----- # -@fixture -def cli_run(): - return {"status": 0, "stdout": None, "stderr": None} - - -@fixture -def mocks(): - return dict() - - -@fixture -def temp_dir(): - return tempfile.TemporaryDirectory() - - -@fixture -def working_dir(request): - return os.path.join(request.config.rootpath, "tests") - - -@fixture -def config_path(temp_dir): - os.chdir(temp_dir.name) - return temp_dir.name + "/jrnl.yaml" - - -@fixture -def toml_version(working_dir): - pyproject = os.path.join(working_dir, "..", "pyproject.toml") - pyproject_contents = toml.load(pyproject) - return pyproject_contents["tool"]["poetry"]["version"] - - -@fixture -def password(): - return "" - - -@fixture -def input_method(): - return "" - - -@fixture -def cache_dir(): - return {"exists": False, "path": ""} - - -@fixture -def str_value(): - return "" - - -@fixture -def command(): - return "" - - -@fixture -def should_not(): - return False - - -@fixture -def user_input(): - return "" - - -@fixture -def config_data(config_path): - return load_config(config_path) - - -@fixture -def journal_name(): - return None - - -@fixture -def which_output_stream(): - return None - - -@fixture -def editor_input(): - return None - - -@fixture -def num_args(): - return None - - -@fixture -def parsed_output(): - return {"lang": None, "obj": None} - - -@fixture -def editor_state(): - return { - "command": "", - "intent": {"method": "r", "input": None}, - "tmpfile": {"name": None, "content": None}, - } - - -@fixture -def editor(editor_state): - def _mock_editor(editor_command): - tmpfile = editor_command[-1] - - editor_state["command"] = editor_command - editor_state["tmpfile"]["name"] = tmpfile - - Path(tmpfile).touch() - with open(tmpfile, editor_state["intent"]["method"]) as f: - # Touch the file so jrnl knows it was edited - if editor_state["intent"]["input"] is not None: - f.write(editor_state["intent"]["input"]) - - file_content = f.read() - editor_state["tmpfile"]["content"] = file_content - - return _mock_editor diff --git a/tests/step_defs/given_steps.py b/tests/step_defs/given_steps.py deleted file mode 100644 index 649d44c5..00000000 --- a/tests/step_defs/given_steps.py +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -from datetime import datetime -import json -import os -import random -import shutil -import string -from unittest.mock import MagicMock -from unittest.mock import patch -from xml.etree import ElementTree - -from keyring import set_keyring -from pytest_bdd import given -from pytest_bdd.parsers import parse - -from jrnl import __version__ -from jrnl.time import __get_pdt_calendar - -from .fixtures import FailedKeyring -from .fixtures import TestKeyring - - -@given(parse("we {editor_method} to the editor if opened\n{editor_input}")) -@given(parse("we {editor_method} nothing to the editor if opened")) -def we_enter_editor(editor_method, editor_input, editor_state): - file_method = editor_state["intent"]["method"] - if editor_method == "write": - file_method = "w+" - elif editor_method == "append": - file_method = "a+" - else: - assert False, f"Method '{editor_method}' not supported" - - editor_state["intent"] = {"method": file_method, "input": editor_input} - - -@given(parse('now is ""')) -@given(parse('now is "{date_str}"')) -def now_is_str(date_str, mocks): - class DatetimeMagicMock(MagicMock): - # needed because jrnl does some reflection on datetime - def __instancecheck__(self, subclass): - return isinstance(subclass, datetime) - - def mocked_now(tz=None): - now = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") - - if tz: - time_zone = datetime.utcnow().astimezone().tzinfo - now = now.replace(tzinfo=time_zone) - - return now - - # jrnl uses two different classes to parse dates, so both must be mocked - datetime_mock = DatetimeMagicMock(wraps=datetime) - datetime_mock.now.side_effect = mocked_now - - pdt = __get_pdt_calendar() - calendar_mock = MagicMock(wraps=pdt) - calendar_mock.parse.side_effect = lambda date_str_input: pdt.parse( - date_str_input, mocked_now() - ) - - mocks["datetime"] = patch("datetime.datetime", new=datetime_mock) - mocks["calendar_parse"] = patch( - "jrnl.time.__get_pdt_calendar", return_value=calendar_mock - ) - - -@given("we have a keyring", target_fixture="keyring") -@given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") -def we_have_type_of_keyring(keyring_type): - if keyring_type == "failed": - set_keyring(FailedKeyring()) - else: - set_keyring(TestKeyring()) - - -@given(parse('we use the config "{config_file}"'), target_fixture="config_path") -@given('we use the config ""', target_fixture="config_path") -def we_use_the_config(config_file, temp_dir, working_dir): - # Move into temp dir as cwd - os.chdir(temp_dir.name) - - # Copy the config file over - config_source = os.path.join(working_dir, "data", "configs", config_file) - config_dest = os.path.join(temp_dir.name, config_file) - shutil.copy2(config_source, config_dest) - - # @todo make this only copy some journals over - # Copy all of the journals over - journal_source = os.path.join(working_dir, "data", "journals") - journal_dest = os.path.join(temp_dir.name, "features", "journals") - shutil.copytree(journal_source, journal_dest) - - # @todo get rid of this by using default config values - # merge in version number - if config_file.endswith("yaml") and os.path.exists(config_dest): - # Add jrnl version to file for 2.x journals - with open(config_dest, "a") as cf: - cf.write("version: {}".format(__version__)) - - return config_dest - - -@given(parse('we use the password "{pw}" if prompted'), target_fixture="password") -def use_password_forever(pw): - return pw - - -@given("we create a cache directory", target_fixture="cache_dir") -def create_cache_dir(temp_dir): - random_str = "".join(random.choices(string.ascii_uppercase + string.digits, k=20)) - - dir_path = os.path.join(temp_dir.name, "cache_" + random_str) - os.mkdir(dir_path) - return {"exists": True, "path": dir_path} - - -@given(parse("we parse the output as {language_name}"), target_fixture="parsed_output") -def parse_output_as_language(cli_run, language_name): - language_name = language_name.upper() - actual_output = cli_run["stdout"] - - if language_name == "XML": - parsed_output = ElementTree.fromstring(actual_output) - elif language_name == "JSON": - parsed_output = json.loads(actual_output) - else: - assert False, f"Language name {language_name} not recognized" - - return {"lang": language_name, "obj": parsed_output} diff --git a/tests/step_defs/helpers.py b/tests/step_defs/helpers.py deleted file mode 100644 index 7d089597..00000000 --- a/tests/step_defs/helpers.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -import os - - -def does_directory_contain_files(file_list, directory_path): - if not os.path.isdir(directory_path): - return False - - for file in file_list.split("\n"): - fullpath = directory_path + "/" + file - if not os.path.isfile(fullpath): - return False - - return True - - -def parse_should_or_should_not(should_or_should_not): - if should_or_should_not == "should": - return True - elif should_or_should_not == "should not": - return False - else: - raise Exception( - "should_or_should_not valid values are 'should' or 'should not'" - ) - - -def assert_equal_tags_ignoring_order( - actual_line, expected_line, actual_content, expected_content -): - actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) - expected_tags = set( - tag.strip() for tag in expected_line[len("tags: ") :].split(",") - ) - assert actual_tags == expected_tags, [ - [actual_tags, expected_tags], - [expected_content, actual_content], - ] diff --git a/tests/step_defs/test_features.py b/tests/step_defs/test_features.py deleted file mode 100644 index 4c8d5ef9..00000000 --- a/tests/step_defs/test_features.py +++ /dev/null @@ -1,17 +0,0 @@ -from pytest_bdd import scenarios - -scenarios("../features/build.feature") -scenarios("../features/core.feature") -scenarios("../features/datetime.feature") -scenarios("../features/delete.feature") -scenarios("../features/encrypt.feature") -scenarios("../features/file_storage.feature") -scenarios("../features/format.feature") -scenarios("../features/import.feature") -scenarios("../features/multiple_journals.feature") -scenarios("../features/password.feature") -scenarios("../features/search.feature") -scenarios("../features/star.feature") -scenarios("../features/tag.feature") -scenarios("../features/upgrade.feature") -scenarios("../features/write.feature") diff --git a/tests/step_defs/then_steps.py b/tests/step_defs/then_steps.py deleted file mode 100644 index b56c203f..00000000 --- a/tests/step_defs/then_steps.py +++ /dev/null @@ -1,331 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -import json -import os -import re -from xml.etree import ElementTree - -from pytest_bdd import then -from pytest_bdd.parsers import parse -import yaml - -from jrnl.config import scope_config - -from .helpers import assert_equal_tags_ignoring_order -from .helpers import does_directory_contain_files -from .helpers import parse_should_or_should_not - - -@then("we should get no error") -def should_get_no_error(cli_run): - assert cli_run["status"] == 0, cli_run["status"] - - -@then(parse('the output should match "{regex}"')) -def output_should_match(regex, cli_run): - out = cli_run["stdout"] - matches = re.findall(regex, out) - assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" - - -@then(parse("the output should contain\n{expected_output}")) -@then(parse('the output should contain "{expected_output}"')) -@then('the output should contain ""') -@then(parse("the {which_output_stream} output should contain\n{expected_output}")) -@then(parse('the {which_output_stream} output should contain "{expected_output}"')) -def output_should_contain(expected_output, which_output_stream, cli_run): - assert expected_output - if which_output_stream is None: - assert (expected_output in cli_run["stdout"]) or ( - expected_output in cli_run["stderr"] - ) - - elif which_output_stream == "standard": - assert expected_output in cli_run["stdout"] - - elif which_output_stream == "error": - assert expected_output in cli_run["stderr"] - - else: - assert expected_output in cli_run[which_output_stream] - - -@then(parse("the output should not contain\n{expected_output}")) -@then(parse('the output should not contain "{expected_output}"')) -@then('the output should not contain ""') -def output_should_not_contain(expected_output, cli_run): - assert expected_output not in cli_run["stdout"] - - -@then(parse("the output should be\n{expected_output}")) -@then(parse('the output should be "{expected_output}"')) -@then('the output should be ""') -def output_should_be(expected_output, cli_run): - actual = cli_run["stdout"].strip() - expected = expected_output.strip() - assert expected == actual - - -@then("the output should be empty") -def output_should_be_empty(cli_run): - actual = cli_run["stdout"].strip() - assert actual == "" - - -@then('the output should contain the date ""') -def output_should_contain_date(date, cli_run): - assert date and date in cli_run["stdout"] - - -@then("the output should contain pyproject.toml version") -def output_should_contain_version(cli_run, toml_version): - out = cli_run["stdout"] - assert toml_version in out, toml_version - - -@then(parse('we should see the message "{text}"')) -def should_see_the_message(text, cli_run): - out = cli_run["stderr"] - assert text in out, [text, out] - - -@then( - parse( - 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' - ) -) -@then( - parse( - 'the config for journal "{journal_name}" {should_or_should_not} contain\n{some_yaml}' - ) -) -@then(parse('the config {should_or_should_not} contain "{some_yaml}"')) -@then(parse("the config {should_or_should_not} contain\n{some_yaml}")) -def config_var(config_data, journal_name, should_or_should_not, some_yaml): - we_should = parse_should_or_should_not(should_or_should_not) - - actual = config_data - if journal_name: - actual = actual["journals"][journal_name] - - expected = yaml.load(some_yaml, Loader=yaml.FullLoader) - - actual_slice = actual - if type(actual) is dict: - actual_slice = {key: actual.get(key, None) for key in expected.keys()} - - if we_should: - assert expected == actual_slice - else: - assert expected != actual_slice - - -@then("we should be prompted for a password") -def password_was_called(cli_run): - assert cli_run["mocks"]["getpass"].called - - -@then("we should not be prompted for a password") -def password_was_not_called(cli_run): - assert not cli_run["mocks"]["getpass"].called - - -@then(parse("the cache directory should contain the files\n{file_list}")) -def assert_dir_contains_files(file_list, cache_dir): - assert does_directory_contain_files(file_list, cache_dir["path"]) - - -@then(parse("the journal directory should contain\n{file_list}")) -def journal_directory_should_contain(config_data, file_list): - scoped_config = scope_config(config_data, "default") - - assert does_directory_contain_files(file_list, scoped_config["journal"]) - - -@then(parse('journal "{journal_name}" should not exist')) -def journal_directory_should_not_exist(config_data, journal_name): - scoped_config = scope_config(config_data, journal_name) - - assert not does_directory_contain_files( - scoped_config["journal"], "." - ), f'Journal "{journal_name}" does exist' - - -@then(parse("the journal {should_or_should_not} exist")) -def journal_should_not_exist(config_data, should_or_should_not): - scoped_config = scope_config(config_data, "default") - expected_path = scoped_config["journal"] - - contains_files = does_directory_contain_files(expected_path, ".") - - if should_or_should_not == "should": - assert contains_files - elif should_or_should_not == "should not": - assert not contains_files - else: - raise Exception( - "should_or_should_not valid values are 'should' or 'should not'" - ) - - -@then(parse('the content of file "{file_path}" in the cache should be\n{file_content}')) -def content_of_file_should_be(file_path, file_content, cache_dir): - assert cache_dir["exists"] - expected_content = file_content.strip().splitlines() - - with open(os.path.join(cache_dir["path"], file_path), "r") as f: - actual_content = f.read().strip().splitlines() - - for actual_line, expected_line in zip(actual_content, expected_content): - if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): - assert_equal_tags_ignoring_order( - actual_line, expected_line, actual_content, expected_content - ) - else: - assert actual_line.strip() == expected_line.strip(), [ - [actual_line.strip(), expected_line.strip()], - [actual_content, expected_content], - ] - - -@then(parse("the cache should contain the files\n{file_list}")) -def cache_dir_contains_files(file_list, cache_dir): - assert cache_dir["exists"] - - actual_files = os.listdir(cache_dir["path"]) - expected_files = file_list.split("\n") - - # sort to deal with inconsistent default file ordering on different OS's - actual_files.sort() - expected_files.sort() - - assert actual_files == expected_files, [actual_files, expected_files] - - -@then(parse("the output should be valid {language_name}")) -def assert_output_is_valid_language(cli_run, language_name): - language_name = language_name.upper() - if language_name == "XML": - xml_tree = ElementTree.fromstring(cli_run["stdout"]) - assert xml_tree, "Invalid XML" - elif language_name == "JSON": - assert json.loads(cli_run["stdout"]), "Invalid JSON" - else: - assert False, f"Language name {language_name} not recognized" - - -@then(parse('"{node_name}" in the parsed output should have {number:d} elements')) -def assert_parsed_output_item_count(node_name, number, parsed_output): - lang = parsed_output["lang"] - obj = parsed_output["obj"] - - if lang == "XML": - xml_node_names = (node.tag for node in obj) - assert node_name in xml_node_names, str(list(xml_node_names)) - - actual_entry_count = len(obj.find(node_name)) - assert actual_entry_count == number, actual_entry_count - - elif lang == "JSON": - my_obj = obj - - for node in node_name.split("."): - try: - my_obj = my_obj[int(node)] - except ValueError: - assert node in my_obj - my_obj = my_obj[node] - - assert len(my_obj) == number, len(my_obj) - - else: - assert False, f"Language name {lang} not recognized" - - -@then(parse('"{field_name}" in the parsed output should {comparison}\n{expected_keys}')) -def assert_output_field_content(field_name, comparison, expected_keys, parsed_output): - lang = parsed_output["lang"] - obj = parsed_output["obj"] - expected_keys = expected_keys.split("\n") - if len(expected_keys) == 1: - expected_keys = expected_keys[0] - - if lang == "XML": - xml_node_names = (node.tag for node in obj) - assert field_name in xml_node_names, str(list(xml_node_names)) - - if field_name == "tags": - actual_tags = set(t.attrib["name"] for t in obj.find("tags")) - assert set(actual_tags) == set(expected_keys), [ - actual_tags, - set(expected_keys), - ] - else: - assert False, "This test only works for tags in XML" - - elif lang == "JSON": - my_obj = obj - - for node in field_name.split("."): - try: - my_obj = my_obj[int(node)] - except ValueError: - assert node in my_obj, [my_obj.keys(), node] - my_obj = my_obj[node] - - if comparison == "be": - if type(my_obj) is str: - assert expected_keys == my_obj, [my_obj, expected_keys] - else: - assert set(expected_keys) == set(my_obj), [ - set(my_obj), - set(expected_keys), - ] - elif comparison == "contain": - if type(my_obj) is str: - assert expected_keys in my_obj, [my_obj, expected_keys] - else: - assert all(elem in my_obj for elem in expected_keys), [ - my_obj, - expected_keys, - ] - else: - assert False, f"Language name {lang} not recognized" - - -@then(parse('there should be {number:d} "{item}" elements')) -def count_elements(number, item, cli_run): - actual_output = cli_run["stdout"] - xml_tree = ElementTree.fromstring(actual_output) - assert len(xml_tree.findall(".//" + item)) == number - - -@then(parse("the editor should have been called")) -@then(parse("the editor should have been called with {num_args} arguments")) -def count_editor_args(num_args, cli_run, editor_state): - assert cli_run["mocks"]["editor"].called - - if isinstance(num_args, int): - assert len(editor_state["command"]) == int(num_args) - - -@then(parse('the editor filename should end with "{suffix}"')) -def editor_filename_suffix(suffix, editor_state): - editor_filename = editor_state["tmpfile"]["name"] - - assert editor_state["tmpfile"]["name"].endswith(suffix), (editor_filename, suffix) - - -@then(parse('the editor file content should {comparison} "{str_value}"')) -@then(parse("the editor file content should {comparison} empty")) -@then(parse("the editor file content should {comparison}\n{str_value}")) -def contains_editor_file(comparison, str_value, editor_state): - content = editor_state["tmpfile"]["content"] - # content = f'\n"""\n{content}\n"""\n' - if comparison == "be": - assert content == str_value - elif comparison == "contain": - assert str_value in content - else: - assert False, f"Comparison '{comparison}' not supported" diff --git a/tests/step_defs/when_steps.py b/tests/step_defs/when_steps.py deleted file mode 100644 index 2e72173b..00000000 --- a/tests/step_defs/when_steps.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -from contextlib import ExitStack -import os -from unittest.mock import patch - -from pytest_bdd import parsers -from pytest_bdd import when -from pytest_bdd.parsers import parse - -from jrnl.cli import cli -from jrnl.os_compat import split_args - - -@when(parse('we change directory to "{directory_name}"')) -def when_we_change_directory(directory_name): - if not os.path.isdir(directory_name): - os.mkdir(directory_name) - - os.chdir(directory_name) - - -@when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) -@when( - parsers.re( - 'we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"' - ) -) -@when(parse('we run "jrnl" and {input_method} "{user_input}"')) -@when(parse('we run "jrnl {command}"')) -@when('we run "jrnl "') -@when('we run "jrnl"') -def we_run( - command, - config_path, - user_input, - cli_run, - capsys, - password, - cache_dir, - editor, - keyring, - input_method, - mocks, -): - assert input_method in ["", "enter", "pipe"] - is_tty = input_method != "pipe" - - if cache_dir["exists"]: - command = command.format(cache_dir=cache_dir["path"]) - - args = split_args(command) - status = 0 - - if user_input: - user_input = user_input.splitlines() if is_tty else [user_input] - - if password: - password = password.splitlines() - - if not password and user_input: - password = user_input - - with ExitStack() as stack: - - stack.enter_context(patch("sys.argv", ["jrnl"] + args)) - - mock_stdin = stack.enter_context( - patch("sys.stdin.read", side_effect=user_input) - ) - stack.enter_context(patch("sys.stdin.isatty", return_value=is_tty)) - mock_input = stack.enter_context( - patch("builtins.input", side_effect=user_input) - ) - mock_getpass = stack.enter_context( - patch("getpass.getpass", side_effect=password) - ) - - if "datetime" in mocks: - stack.enter_context(mocks["datetime"]) - stack.enter_context(mocks["calendar_parse"]) - - # stack.enter_context(patch("datetime.datetime", new=mocks["datetime"])) - # stack.enter_context(patch("jrnl.time.__get_pdt_calendar", return_value=mocks["calendar_parse"])) - - stack.enter_context( - patch("jrnl.install.get_config_path", return_value=config_path) - ) - stack.enter_context( - patch("jrnl.config.get_config_path", return_value=config_path) - ) - mock_editor = stack.enter_context(patch("subprocess.call", side_effect=editor)) - - try: - cli(args) - except StopIteration: - # This happens when input is expected, but don't have any input left - pass - except SystemExit as e: - status = e.code - - captured = capsys.readouterr() - - cli_run["status"] = status - cli_run["stdout"] = captured.out - cli_run["stderr"] = captured.err - cli_run["mocks"] = { - "stdin": mock_stdin, - "input": mock_input, - "getpass": mock_getpass, - "editor": mock_editor, - } From d95dab9f0c7fa64c08e29118d84c6b0397a47550 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Jul 2021 15:04:39 -0700 Subject: [PATCH 0454/1132] add actual lib directory even though it's in gitignore for some reason --- tests/lib/fixtures.py | 201 ++++++++++++++++++++++++ tests/lib/given_steps.py | 134 ++++++++++++++++ tests/lib/helpers.py | 40 +++++ tests/lib/then_steps.py | 331 +++++++++++++++++++++++++++++++++++++++ tests/lib/when_steps.py | 113 +++++++++++++ 5 files changed, 819 insertions(+) create mode 100644 tests/lib/fixtures.py create mode 100644 tests/lib/given_steps.py create mode 100644 tests/lib/helpers.py create mode 100644 tests/lib/then_steps.py create mode 100644 tests/lib/when_steps.py diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py new file mode 100644 index 00000000..a93a7e43 --- /dev/null +++ b/tests/lib/fixtures.py @@ -0,0 +1,201 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +from collections import defaultdict +import os +from pathlib import Path +import tempfile + +from keyring import backend +from keyring import errors +from keyring import set_keyring +from pytest import fixture +import toml + +from jrnl.config import load_config + + +# --- Keyring --- # +@fixture +def keyring(): + set_keyring(NoKeyring()) + + +@fixture +def keyring_type(): + return "default" + + +class TestKeyring(backend.KeyringBackend): + """A test keyring that just stores its values in a hash""" + + priority = 1 + keys = defaultdict(dict) + + def set_password(self, servicename, username, password): + self.keys[servicename][username] = password + + def get_password(self, servicename, username): + return self.keys[servicename].get(username) + + def delete_password(self, servicename, username): + self.keys[servicename][username] = None + + +class NoKeyring(backend.KeyringBackend): + """A keyring that simulated an environment with no keyring backend.""" + + priority = 2 + keys = defaultdict(dict) + + def set_password(self, servicename, username, password): + raise errors.NoKeyringError + + def get_password(self, servicename, username): + raise errors.NoKeyringError + + def delete_password(self, servicename, username): + raise errors.NoKeyringError + + +class FailedKeyring(backend.KeyringBackend): + """A keyring that cannot be retrieved.""" + + priority = 2 + + def set_password(self, servicename, username, password): + raise errors.KeyringError + + def get_password(self, servicename, username): + raise errors.KeyringError + + def delete_password(self, servicename, username): + raise errors.KeyringError + + +# ----- Misc ----- # +@fixture +def cli_run(): + return {"status": 0, "stdout": None, "stderr": None} + + +@fixture +def mocks(): + return dict() + + +@fixture +def temp_dir(): + return tempfile.TemporaryDirectory() + + +@fixture +def working_dir(request): + return os.path.join(request.config.rootpath, "tests") + + +@fixture +def config_path(temp_dir): + os.chdir(temp_dir.name) + return temp_dir.name + "/jrnl.yaml" + + +@fixture +def toml_version(working_dir): + pyproject = os.path.join(working_dir, "..", "pyproject.toml") + pyproject_contents = toml.load(pyproject) + return pyproject_contents["tool"]["poetry"]["version"] + + +@fixture +def password(): + return "" + + +@fixture +def input_method(): + return "" + + +@fixture +def cache_dir(): + return {"exists": False, "path": ""} + + +@fixture +def str_value(): + return "" + + +@fixture +def command(): + return "" + + +@fixture +def should_not(): + return False + + +@fixture +def user_input(): + return "" + + +@fixture +def config_data(config_path): + return load_config(config_path) + + +@fixture +def journal_name(): + return None + + +@fixture +def which_output_stream(): + return None + + +@fixture +def editor_input(): + return None + + +@fixture +def num_args(): + return None + + +@fixture +def parsed_output(): + return {"lang": None, "obj": None} + + +@fixture +def editor_state(): + return { + "command": "", + "intent": {"method": "r", "input": None}, + "tmpfile": {"name": None, "content": None}, + } + + +@fixture +def editor(editor_state): + def _mock_editor(editor_command): + tmpfile = editor_command[-1] + + editor_state["command"] = editor_command + editor_state["tmpfile"]["name"] = tmpfile + + Path(tmpfile).touch() + with open(tmpfile, editor_state["intent"]["method"]) as f: + # Touch the file so jrnl knows it was edited + if editor_state["intent"]["input"] is not None: + f.write(editor_state["intent"]["input"]) + + file_content = f.read() + editor_state["tmpfile"]["content"] = file_content + + return _mock_editor diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py new file mode 100644 index 00000000..649d44c5 --- /dev/null +++ b/tests/lib/given_steps.py @@ -0,0 +1,134 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +from datetime import datetime +import json +import os +import random +import shutil +import string +from unittest.mock import MagicMock +from unittest.mock import patch +from xml.etree import ElementTree + +from keyring import set_keyring +from pytest_bdd import given +from pytest_bdd.parsers import parse + +from jrnl import __version__ +from jrnl.time import __get_pdt_calendar + +from .fixtures import FailedKeyring +from .fixtures import TestKeyring + + +@given(parse("we {editor_method} to the editor if opened\n{editor_input}")) +@given(parse("we {editor_method} nothing to the editor if opened")) +def we_enter_editor(editor_method, editor_input, editor_state): + file_method = editor_state["intent"]["method"] + if editor_method == "write": + file_method = "w+" + elif editor_method == "append": + file_method = "a+" + else: + assert False, f"Method '{editor_method}' not supported" + + editor_state["intent"] = {"method": file_method, "input": editor_input} + + +@given(parse('now is ""')) +@given(parse('now is "{date_str}"')) +def now_is_str(date_str, mocks): + class DatetimeMagicMock(MagicMock): + # needed because jrnl does some reflection on datetime + def __instancecheck__(self, subclass): + return isinstance(subclass, datetime) + + def mocked_now(tz=None): + now = datetime.strptime(date_str, "%Y-%m-%d %I:%M:%S %p") + + if tz: + time_zone = datetime.utcnow().astimezone().tzinfo + now = now.replace(tzinfo=time_zone) + + return now + + # jrnl uses two different classes to parse dates, so both must be mocked + datetime_mock = DatetimeMagicMock(wraps=datetime) + datetime_mock.now.side_effect = mocked_now + + pdt = __get_pdt_calendar() + calendar_mock = MagicMock(wraps=pdt) + calendar_mock.parse.side_effect = lambda date_str_input: pdt.parse( + date_str_input, mocked_now() + ) + + mocks["datetime"] = patch("datetime.datetime", new=datetime_mock) + mocks["calendar_parse"] = patch( + "jrnl.time.__get_pdt_calendar", return_value=calendar_mock + ) + + +@given("we have a keyring", target_fixture="keyring") +@given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") +def we_have_type_of_keyring(keyring_type): + if keyring_type == "failed": + set_keyring(FailedKeyring()) + else: + set_keyring(TestKeyring()) + + +@given(parse('we use the config "{config_file}"'), target_fixture="config_path") +@given('we use the config ""', target_fixture="config_path") +def we_use_the_config(config_file, temp_dir, working_dir): + # Move into temp dir as cwd + os.chdir(temp_dir.name) + + # Copy the config file over + config_source = os.path.join(working_dir, "data", "configs", config_file) + config_dest = os.path.join(temp_dir.name, config_file) + shutil.copy2(config_source, config_dest) + + # @todo make this only copy some journals over + # Copy all of the journals over + journal_source = os.path.join(working_dir, "data", "journals") + journal_dest = os.path.join(temp_dir.name, "features", "journals") + shutil.copytree(journal_source, journal_dest) + + # @todo get rid of this by using default config values + # merge in version number + if config_file.endswith("yaml") and os.path.exists(config_dest): + # Add jrnl version to file for 2.x journals + with open(config_dest, "a") as cf: + cf.write("version: {}".format(__version__)) + + return config_dest + + +@given(parse('we use the password "{pw}" if prompted'), target_fixture="password") +def use_password_forever(pw): + return pw + + +@given("we create a cache directory", target_fixture="cache_dir") +def create_cache_dir(temp_dir): + random_str = "".join(random.choices(string.ascii_uppercase + string.digits, k=20)) + + dir_path = os.path.join(temp_dir.name, "cache_" + random_str) + os.mkdir(dir_path) + return {"exists": True, "path": dir_path} + + +@given(parse("we parse the output as {language_name}"), target_fixture="parsed_output") +def parse_output_as_language(cli_run, language_name): + language_name = language_name.upper() + actual_output = cli_run["stdout"] + + if language_name == "XML": + parsed_output = ElementTree.fromstring(actual_output) + elif language_name == "JSON": + parsed_output = json.loads(actual_output) + else: + assert False, f"Language name {language_name} not recognized" + + return {"lang": language_name, "obj": parsed_output} diff --git a/tests/lib/helpers.py b/tests/lib/helpers.py new file mode 100644 index 00000000..7d089597 --- /dev/null +++ b/tests/lib/helpers.py @@ -0,0 +1,40 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import os + + +def does_directory_contain_files(file_list, directory_path): + if not os.path.isdir(directory_path): + return False + + for file in file_list.split("\n"): + fullpath = directory_path + "/" + file + if not os.path.isfile(fullpath): + return False + + return True + + +def parse_should_or_should_not(should_or_should_not): + if should_or_should_not == "should": + return True + elif should_or_should_not == "should not": + return False + else: + raise Exception( + "should_or_should_not valid values are 'should' or 'should not'" + ) + + +def assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content +): + actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) + expected_tags = set( + tag.strip() for tag in expected_line[len("tags: ") :].split(",") + ) + assert actual_tags == expected_tags, [ + [actual_tags, expected_tags], + [expected_content, actual_content], + ] diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py new file mode 100644 index 00000000..b56c203f --- /dev/null +++ b/tests/lib/then_steps.py @@ -0,0 +1,331 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import json +import os +import re +from xml.etree import ElementTree + +from pytest_bdd import then +from pytest_bdd.parsers import parse +import yaml + +from jrnl.config import scope_config + +from .helpers import assert_equal_tags_ignoring_order +from .helpers import does_directory_contain_files +from .helpers import parse_should_or_should_not + + +@then("we should get no error") +def should_get_no_error(cli_run): + assert cli_run["status"] == 0, cli_run["status"] + + +@then(parse('the output should match "{regex}"')) +def output_should_match(regex, cli_run): + out = cli_run["stdout"] + matches = re.findall(regex, out) + assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" + + +@then(parse("the output should contain\n{expected_output}")) +@then(parse('the output should contain "{expected_output}"')) +@then('the output should contain ""') +@then(parse("the {which_output_stream} output should contain\n{expected_output}")) +@then(parse('the {which_output_stream} output should contain "{expected_output}"')) +def output_should_contain(expected_output, which_output_stream, cli_run): + assert expected_output + if which_output_stream is None: + assert (expected_output in cli_run["stdout"]) or ( + expected_output in cli_run["stderr"] + ) + + elif which_output_stream == "standard": + assert expected_output in cli_run["stdout"] + + elif which_output_stream == "error": + assert expected_output in cli_run["stderr"] + + else: + assert expected_output in cli_run[which_output_stream] + + +@then(parse("the output should not contain\n{expected_output}")) +@then(parse('the output should not contain "{expected_output}"')) +@then('the output should not contain ""') +def output_should_not_contain(expected_output, cli_run): + assert expected_output not in cli_run["stdout"] + + +@then(parse("the output should be\n{expected_output}")) +@then(parse('the output should be "{expected_output}"')) +@then('the output should be ""') +def output_should_be(expected_output, cli_run): + actual = cli_run["stdout"].strip() + expected = expected_output.strip() + assert expected == actual + + +@then("the output should be empty") +def output_should_be_empty(cli_run): + actual = cli_run["stdout"].strip() + assert actual == "" + + +@then('the output should contain the date ""') +def output_should_contain_date(date, cli_run): + assert date and date in cli_run["stdout"] + + +@then("the output should contain pyproject.toml version") +def output_should_contain_version(cli_run, toml_version): + out = cli_run["stdout"] + assert toml_version in out, toml_version + + +@then(parse('we should see the message "{text}"')) +def should_see_the_message(text, cli_run): + out = cli_run["stderr"] + assert text in out, [text, out] + + +@then( + parse( + 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' + ) +) +@then( + parse( + 'the config for journal "{journal_name}" {should_or_should_not} contain\n{some_yaml}' + ) +) +@then(parse('the config {should_or_should_not} contain "{some_yaml}"')) +@then(parse("the config {should_or_should_not} contain\n{some_yaml}")) +def config_var(config_data, journal_name, should_or_should_not, some_yaml): + we_should = parse_should_or_should_not(should_or_should_not) + + actual = config_data + if journal_name: + actual = actual["journals"][journal_name] + + expected = yaml.load(some_yaml, Loader=yaml.FullLoader) + + actual_slice = actual + if type(actual) is dict: + actual_slice = {key: actual.get(key, None) for key in expected.keys()} + + if we_should: + assert expected == actual_slice + else: + assert expected != actual_slice + + +@then("we should be prompted for a password") +def password_was_called(cli_run): + assert cli_run["mocks"]["getpass"].called + + +@then("we should not be prompted for a password") +def password_was_not_called(cli_run): + assert not cli_run["mocks"]["getpass"].called + + +@then(parse("the cache directory should contain the files\n{file_list}")) +def assert_dir_contains_files(file_list, cache_dir): + assert does_directory_contain_files(file_list, cache_dir["path"]) + + +@then(parse("the journal directory should contain\n{file_list}")) +def journal_directory_should_contain(config_data, file_list): + scoped_config = scope_config(config_data, "default") + + assert does_directory_contain_files(file_list, scoped_config["journal"]) + + +@then(parse('journal "{journal_name}" should not exist')) +def journal_directory_should_not_exist(config_data, journal_name): + scoped_config = scope_config(config_data, journal_name) + + assert not does_directory_contain_files( + scoped_config["journal"], "." + ), f'Journal "{journal_name}" does exist' + + +@then(parse("the journal {should_or_should_not} exist")) +def journal_should_not_exist(config_data, should_or_should_not): + scoped_config = scope_config(config_data, "default") + expected_path = scoped_config["journal"] + + contains_files = does_directory_contain_files(expected_path, ".") + + if should_or_should_not == "should": + assert contains_files + elif should_or_should_not == "should not": + assert not contains_files + else: + raise Exception( + "should_or_should_not valid values are 'should' or 'should not'" + ) + + +@then(parse('the content of file "{file_path}" in the cache should be\n{file_content}')) +def content_of_file_should_be(file_path, file_content, cache_dir): + assert cache_dir["exists"] + expected_content = file_content.strip().splitlines() + + with open(os.path.join(cache_dir["path"], file_path), "r") as f: + actual_content = f.read().strip().splitlines() + + for actual_line, expected_line in zip(actual_content, expected_content): + if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): + assert_equal_tags_ignoring_order( + actual_line, expected_line, actual_content, expected_content + ) + else: + assert actual_line.strip() == expected_line.strip(), [ + [actual_line.strip(), expected_line.strip()], + [actual_content, expected_content], + ] + + +@then(parse("the cache should contain the files\n{file_list}")) +def cache_dir_contains_files(file_list, cache_dir): + assert cache_dir["exists"] + + actual_files = os.listdir(cache_dir["path"]) + expected_files = file_list.split("\n") + + # sort to deal with inconsistent default file ordering on different OS's + actual_files.sort() + expected_files.sort() + + assert actual_files == expected_files, [actual_files, expected_files] + + +@then(parse("the output should be valid {language_name}")) +def assert_output_is_valid_language(cli_run, language_name): + language_name = language_name.upper() + if language_name == "XML": + xml_tree = ElementTree.fromstring(cli_run["stdout"]) + assert xml_tree, "Invalid XML" + elif language_name == "JSON": + assert json.loads(cli_run["stdout"]), "Invalid JSON" + else: + assert False, f"Language name {language_name} not recognized" + + +@then(parse('"{node_name}" in the parsed output should have {number:d} elements')) +def assert_parsed_output_item_count(node_name, number, parsed_output): + lang = parsed_output["lang"] + obj = parsed_output["obj"] + + if lang == "XML": + xml_node_names = (node.tag for node in obj) + assert node_name in xml_node_names, str(list(xml_node_names)) + + actual_entry_count = len(obj.find(node_name)) + assert actual_entry_count == number, actual_entry_count + + elif lang == "JSON": + my_obj = obj + + for node in node_name.split("."): + try: + my_obj = my_obj[int(node)] + except ValueError: + assert node in my_obj + my_obj = my_obj[node] + + assert len(my_obj) == number, len(my_obj) + + else: + assert False, f"Language name {lang} not recognized" + + +@then(parse('"{field_name}" in the parsed output should {comparison}\n{expected_keys}')) +def assert_output_field_content(field_name, comparison, expected_keys, parsed_output): + lang = parsed_output["lang"] + obj = parsed_output["obj"] + expected_keys = expected_keys.split("\n") + if len(expected_keys) == 1: + expected_keys = expected_keys[0] + + if lang == "XML": + xml_node_names = (node.tag for node in obj) + assert field_name in xml_node_names, str(list(xml_node_names)) + + if field_name == "tags": + actual_tags = set(t.attrib["name"] for t in obj.find("tags")) + assert set(actual_tags) == set(expected_keys), [ + actual_tags, + set(expected_keys), + ] + else: + assert False, "This test only works for tags in XML" + + elif lang == "JSON": + my_obj = obj + + for node in field_name.split("."): + try: + my_obj = my_obj[int(node)] + except ValueError: + assert node in my_obj, [my_obj.keys(), node] + my_obj = my_obj[node] + + if comparison == "be": + if type(my_obj) is str: + assert expected_keys == my_obj, [my_obj, expected_keys] + else: + assert set(expected_keys) == set(my_obj), [ + set(my_obj), + set(expected_keys), + ] + elif comparison == "contain": + if type(my_obj) is str: + assert expected_keys in my_obj, [my_obj, expected_keys] + else: + assert all(elem in my_obj for elem in expected_keys), [ + my_obj, + expected_keys, + ] + else: + assert False, f"Language name {lang} not recognized" + + +@then(parse('there should be {number:d} "{item}" elements')) +def count_elements(number, item, cli_run): + actual_output = cli_run["stdout"] + xml_tree = ElementTree.fromstring(actual_output) + assert len(xml_tree.findall(".//" + item)) == number + + +@then(parse("the editor should have been called")) +@then(parse("the editor should have been called with {num_args} arguments")) +def count_editor_args(num_args, cli_run, editor_state): + assert cli_run["mocks"]["editor"].called + + if isinstance(num_args, int): + assert len(editor_state["command"]) == int(num_args) + + +@then(parse('the editor filename should end with "{suffix}"')) +def editor_filename_suffix(suffix, editor_state): + editor_filename = editor_state["tmpfile"]["name"] + + assert editor_state["tmpfile"]["name"].endswith(suffix), (editor_filename, suffix) + + +@then(parse('the editor file content should {comparison} "{str_value}"')) +@then(parse("the editor file content should {comparison} empty")) +@then(parse("the editor file content should {comparison}\n{str_value}")) +def contains_editor_file(comparison, str_value, editor_state): + content = editor_state["tmpfile"]["content"] + # content = f'\n"""\n{content}\n"""\n' + if comparison == "be": + assert content == str_value + elif comparison == "contain": + assert str_value in content + else: + assert False, f"Comparison '{comparison}' not supported" diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py new file mode 100644 index 00000000..2e72173b --- /dev/null +++ b/tests/lib/when_steps.py @@ -0,0 +1,113 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +from contextlib import ExitStack +import os +from unittest.mock import patch + +from pytest_bdd import parsers +from pytest_bdd import when +from pytest_bdd.parsers import parse + +from jrnl.cli import cli +from jrnl.os_compat import split_args + + +@when(parse('we change directory to "{directory_name}"')) +def when_we_change_directory(directory_name): + if not os.path.isdir(directory_name): + os.mkdir(directory_name) + + os.chdir(directory_name) + + +@when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) +@when( + parsers.re( + 'we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"' + ) +) +@when(parse('we run "jrnl" and {input_method} "{user_input}"')) +@when(parse('we run "jrnl {command}"')) +@when('we run "jrnl "') +@when('we run "jrnl"') +def we_run( + command, + config_path, + user_input, + cli_run, + capsys, + password, + cache_dir, + editor, + keyring, + input_method, + mocks, +): + assert input_method in ["", "enter", "pipe"] + is_tty = input_method != "pipe" + + if cache_dir["exists"]: + command = command.format(cache_dir=cache_dir["path"]) + + args = split_args(command) + status = 0 + + if user_input: + user_input = user_input.splitlines() if is_tty else [user_input] + + if password: + password = password.splitlines() + + if not password and user_input: + password = user_input + + with ExitStack() as stack: + + stack.enter_context(patch("sys.argv", ["jrnl"] + args)) + + mock_stdin = stack.enter_context( + patch("sys.stdin.read", side_effect=user_input) + ) + stack.enter_context(patch("sys.stdin.isatty", return_value=is_tty)) + mock_input = stack.enter_context( + patch("builtins.input", side_effect=user_input) + ) + mock_getpass = stack.enter_context( + patch("getpass.getpass", side_effect=password) + ) + + if "datetime" in mocks: + stack.enter_context(mocks["datetime"]) + stack.enter_context(mocks["calendar_parse"]) + + # stack.enter_context(patch("datetime.datetime", new=mocks["datetime"])) + # stack.enter_context(patch("jrnl.time.__get_pdt_calendar", return_value=mocks["calendar_parse"])) + + stack.enter_context( + patch("jrnl.install.get_config_path", return_value=config_path) + ) + stack.enter_context( + patch("jrnl.config.get_config_path", return_value=config_path) + ) + mock_editor = stack.enter_context(patch("subprocess.call", side_effect=editor)) + + try: + cli(args) + except StopIteration: + # This happens when input is expected, but don't have any input left + pass + except SystemExit as e: + status = e.code + + captured = capsys.readouterr() + + cli_run["status"] = status + cli_run["stdout"] = captured.out + cli_run["stderr"] = captured.err + cli_run["mocks"] = { + "stdin": mock_stdin, + "input": mock_input, + "getpass": mock_getpass, + "editor": mock_editor, + } From 495956d907486ce86106696e0ecf1fe314644dc4 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Jul 2021 15:21:41 -0700 Subject: [PATCH 0455/1132] remove init file that is no longer neded --- __init__.py | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 __init__.py diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 46468510..00000000 --- a/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -import sys - -sys.path.append("..") From 26484130c3214e34b15b42a494deb4532b585fa1 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Jul 2021 15:21:50 -0700 Subject: [PATCH 0456/1132] remove old comment --- tests/lib/when_steps.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 2e72173b..642249e9 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -81,9 +81,6 @@ def we_run( stack.enter_context(mocks["datetime"]) stack.enter_context(mocks["calendar_parse"]) - # stack.enter_context(patch("datetime.datetime", new=mocks["datetime"])) - # stack.enter_context(patch("jrnl.time.__get_pdt_calendar", return_value=mocks["calendar_parse"])) - stack.enter_context( patch("jrnl.install.get_config_path", return_value=config_path) ) From 9e3153453eabf0659ce47985e922cf97cc1584a1 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 3 Jul 2021 15:50:36 -0700 Subject: [PATCH 0457/1132] Change all instances of FullLoader to SafeLoader (#1285) --- features/steps/core.py | 8 ++++---- jrnl/config.py | 4 ++-- jrnl/plugins/template.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/features/steps/core.py b/features/steps/core.py index ac5d8950..2ad5bcc4 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -17,7 +17,7 @@ import keyring import toml import yaml -from yaml.loader import FullLoader +from yaml.loader import SafeLoader import jrnl.time @@ -409,7 +409,7 @@ def run(context, command, text=""): if "config_path" in context and context.config_path is not None: with open(context.config_path) as f: - context.jrnl_config = yaml.load(f, Loader=yaml.FullLoader) + context.jrnl_config = yaml.load(f, Loader=yaml.SafeLoader) else: context.jrnl_config = None @@ -418,7 +418,7 @@ def run(context, command, text=""): command = command.format(cache_dir=cache_dir) if "config_path" in context and context.config_path is not None: with open(context.config_path, "r") as f: - cfg = yaml.load(f, Loader=FullLoader) + cfg = yaml.load(f, Loader=SafeLoader) context.jrnl_config = cfg args = split_args(command) @@ -675,7 +675,7 @@ def check_journal_entries(context, number, journal_name="default"): @when("the journal directory is listed") def list_journal_directory(context, journal="default"): with open(context.config_path) as config_file: - configuration = yaml.load(config_file, Loader=yaml.FullLoader) + configuration = yaml.load(config_file, Loader=yaml.SafeLoader) journal_path = configuration["journals"][journal] for root, dirnames, f in os.walk(journal_path): for file in f: diff --git a/jrnl/config.py b/jrnl/config.py index da2df2cc..32695204 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -41,7 +41,7 @@ def make_yaml_valid_dict(input: list) -> dict: # yaml compatible strings are of the form Key:Value yamlstr = YAML_SEPARATOR.join(input) - runtime_modifications = yaml.load(yamlstr, Loader=yaml.FullLoader) + runtime_modifications = yaml.load(yamlstr, Loader=yaml.SafeLoader) return runtime_modifications @@ -140,7 +140,7 @@ def verify_config_colors(config): def load_config(config_path): """Tries to load a config file from YAML.""" with open(config_path) as f: - return yaml.load(f, Loader=yaml.FullLoader) + return yaml.load(f, Loader=yaml.SafeLoader) def is_config_json(config_path): diff --git a/jrnl/plugins/template.py b/jrnl/plugins/template.py index 147cd7af..cb852471 100644 --- a/jrnl/plugins/template.py +++ b/jrnl/plugins/template.py @@ -26,7 +26,7 @@ class Template: def from_file(cls, filename): with open(filename) as f: front_matter, body = f.read().strip("-\n").split("---", 2) - front_matter = yaml.load(front_matter, Loader=yaml.FullLoader) + front_matter = yaml.load(front_matter, Loader=yaml.SafeLoader) template = cls(body) template.__dict__.update(front_matter) return template From 56df419bea3750fa7156dec80a6850a6f906944c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Jul 2021 22:52:14 +0000 Subject: [PATCH 0458/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f71a70..e7700ab4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,10 @@ **Build:** +- Move test suite entirely to Pytest \(replace Behave\) [\#1192](https://github.com/jrnl-org/jrnl/issues/1192) - Remove useless shebangs and executable permissions [\#1283](https://github.com/jrnl-org/jrnl/pull/1283) ([musicinmybrain](https://github.com/musicinmybrain)) - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) +- Move test suite to Pytest \(replace Behave\) [\#1193](https://github.com/jrnl-org/jrnl/pull/1193) ([wren](https://github.com/wren)) **Packaging:** From 2723e1cfb55d2af965b8b0bded4b24ebcbffe6f1 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 10 Jul 2021 12:13:15 -0700 Subject: [PATCH 0459/1132] Add Python 3.10 support (#1271) * Add Python 3.10 support * Change Python 3.10 to 3.10-dev in CI * Run poetry update * Turn off fail-fast to troubleshoot Co-authored-by: Jonathan Wren * Add continue-on-error for 3.10 Co-authored-by: Jonathan Wren * use prerelease poetry for prerelease python * fix syntax error * rename steps to make more sense * remove dev dependency that breaks with python 3.10 * update tests * Change test dependencies for minimal breakage on python 3.10 - loosen the test dep requirements (so we get warned about these problems sooner) - add new extras group to provide minimal deps required for testing (we don't need to run static analysis again on every version) * change how we check if deps are installed so test don't run wild * add setuptools due to poetry bug, clean up other steps * update lock file * test * Revert "test" This reverts commit 31e538300ef7f2ab3ff84da7fe03f156e4714e06. Co-authored-by: Jonathan Wren --- .github/workflows/testing.yaml | 41 +++++- poetry.lock | 260 +++++++++++++++++---------------- pyproject.toml | 27 +++- 3 files changed, 188 insertions(+), 140 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 47710ca2..396fc854 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -23,9 +23,11 @@ jobs: if: > ! contains(github.event.head_commit.message, '[ci skip]') runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.python-version == '3.10-dev' }} strategy: + fail-fast: false matrix: - python-version: [ 3.7, 3.8, 3.9 ] + python-version: [ 3.7, 3.8, 3.9, 3.10-dev ] os: [ ubuntu-latest, macos-latest, windows-latest ] steps: @@ -44,27 +46,50 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-v2 - name: Install dependencies + if: ${{ matrix.python-version != '3.10-dev' }} run: | + echo '::group::poetry' pip install poetry poetry config --local virtualenvs.in-project true + echo '::endgroup::' + + echo '::group::Other dependencies' poetry install --remove-untracked + echo '::endgroup::' + + echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV + + + - name: Install dependencies (Prerelease) + if: ${{ matrix.python-version == '3.10-dev' }} + run: | + echo '::group::poetry' + pip install poetry==1.2.0a1 + poetry config --local virtualenvs.in-project true + echo '::endgroup::' + + echo '::group::Other dependencies' + poetry install --remove-untracked --no-dev --extras testing + echo '::endgroup::' + + echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV - name: Code formatting (Black) - if: success() || failure() + if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }} run: | poetry run black --version poetry run black --check --diff . - - name: Code Style (PyFlakes) - if: success() || failure() + - name: Code Style (flake8) + if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }} run: | - poetry run pyflakes --version - poetry run pyflakes jrnl features tests + poetry run pflake8 --version + poetry run pflake8 jrnl features tests - name: Test with pytest - if: success() || failure() + if: ${{ env.DEPS_INSTALLED == 'true' }} run: poetry run pytest --junitxml=reports/pytest/results.xml - name: Test with behave - if: success() || failure() + if: ${{ env.DEPS_INSTALLED == 'true' }} run: poetry run behave --no-skipped --format progress2 --junit --junit-directory reports/behave diff --git a/poetry.lock b/poetry.lock index 2d1a8ea2..172a2533 100644 --- a/poetry.lock +++ b/poetry.lock @@ -25,20 +25,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "argcomplete" -version = "1.12.3" -description = "Bash tab completion for argparse" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -importlib-metadata = {version = ">=0.23,<5", markers = "python_version == \"3.7\""} - -[package.extras] -test = ["coverage", "flake8", "pexpect", "wheel"] - [[package]] name = "asteval" version = "0.9.25" @@ -51,7 +37,7 @@ python-versions = ">=3.6" name = "atomicwrites" version = "1.4.0" description = "Atomic file writes." -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -59,7 +45,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "attrs" version = "21.2.0" description = "Classes Without Boilerplate" -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -81,7 +67,7 @@ python-versions = "*" name = "behave" version = "1.2.6" description = "behave is behaviour-driven development, Python style" -category = "dev" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -149,6 +135,17 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "dev" +optional = false +python-versions = "*" + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + [[package]] name = "cryptography" version = "3.4.7" @@ -208,13 +205,13 @@ dev = ["twine", "markdown", "flake8"] name = "glob2" version = "0.7" description = "Version of the glob module that can capture patterns and supports recursive wildcards" -category = "dev" +category = "main" optional = false python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.6.0" +version = "4.6.1" description = "Read metadata from Python packages" category = "main" optional = false @@ -233,7 +230,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -248,6 +245,7 @@ python-versions = ">=2.7" [package.dependencies] decorator = {version = "*", markers = "python_version > \"3.6\""} ipython = {version = ">=7.17.0", markers = "python_version > \"3.6\""} +setuptools = "*" toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] @@ -269,6 +267,7 @@ pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" pygments = "*" +setuptools = ">=18.5" traitlets = ">=4.2" [package.extras] @@ -352,7 +351,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes name = "mako" version = "1.1.4" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -381,7 +380,7 @@ testing = ["coverage", "pyyaml"] name = "markupsafe" version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -447,7 +446,7 @@ python-versions = "*" name = "packaging" version = "21.0" description = "Core utilities for Python packages" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -458,7 +457,7 @@ pyparsing = ">=2.0.2" name = "parse" version = "1.19.0" description = "parse() is the opposite of format()" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -466,7 +465,7 @@ python-versions = "*" name = "parse-type" version = "0.5.2" description = "Simplifies to build parse types based on the parse module" -category = "dev" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*" @@ -529,7 +528,7 @@ python-versions = "*" name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -539,6 +538,14 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] +[[package]] +name = "pprintpp" +version = "0.4.0" +description = "A drop-in replacement for pprint that's actually pretty" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "prompt-toolkit" version = "3.0.19" @@ -562,7 +569,7 @@ python-versions = "*" name = "py" version = "1.10.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -602,7 +609,7 @@ python-versions = ">=3.5" name = "pyparsing" version = "2.4.7" description = "Python parsing module" -category = "dev" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -622,7 +629,7 @@ toml = "*" name = "pytest" version = "6.2.4" description = "pytest: simple powerful testing with Python" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -644,7 +651,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm name = "pytest-bdd" version = "4.1.0" description = "BDD for pytest" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -658,15 +665,16 @@ pytest = ">=4.3" [[package]] name = "pytest-clarity" -version = "0.3.0a0" +version = "1.0.1" description = "A plugin providing an alternative, colourful diff output for failing assertions." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] +pprintpp = ">=0.4.0" pytest = ">=3.5.0" -termcolor = "1.1.0" +rich = ">=8.0.0" [[package]] name = "python-dateutil" @@ -724,12 +732,29 @@ pyyaml = "*" [[package]] name = "regex" -version = "2021.7.1" +version = "2021.7.6" description = "Alternative regular expression module, to replace re." category = "dev" optional = false python-versions = "*" +[[package]] +name = "rich" +version = "10.5.0" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +category = "dev" +optional = false +python-versions = ">=3.6,<4.0" + +[package.dependencies] +colorama = ">=0.4.0,<0.5.0" +commonmark = ">=0.9.0,<0.10.0" +pygments = ">=2.6.0,<3.0.0" +typing-extensions = {version = ">=3.7.4,<4.0.0", markers = "python_version < \"3.8\""} + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] + [[package]] name = "secretstorage" version = "3.3.1" @@ -742,6 +767,18 @@ python-versions = ">=3.6" cryptography = ">=2.0" jeepney = ">=0.6" +[[package]] +name = "setuptools" +version = "57.1.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "pygments-github-lexers (==0.0.5)", "sphinx-inline-tabs", "sphinxcontrib-towncrier"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "mock", "flake8-2020", "virtualenv (>=13.0.0)", "pytest-virtualenv (>=1.2.7)", "wheel", "paver", "pip (>=19.1)", "jaraco.envs", "pytest-xdist", "sphinx", "jaraco.path (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] + [[package]] name = "six" version = "1.16.0" @@ -750,14 +787,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -[[package]] -name = "termcolor" -version = "1.1.0" -description = "ANSII Color formatting for output in terminal." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "textwrap3" version = "0.9.2" @@ -770,7 +799,7 @@ python-versions = "*" name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -834,31 +863,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "xmltodict" -version = "0.12.0" -description = "Makes working with XML feel like you are working with JSON" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "yq" -version = "2.12.2" -description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -argcomplete = ">=1.8.1" -PyYAML = ">=3.11" -toml = ">=0.10.0" -xmltodict = ">=0.11.0" - -[package.extras] -test = ["coverage", "flake8", "wheel"] - [[package]] name = "zipp" version = "3.5.0" @@ -871,10 +875,13 @@ python-versions = ">=3.6" docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +[extras] +testing = ["behave", "pytest", "pytest-bdd", "toml"] + [metadata] lock-version = "1.1" -python-versions = ">=3.7.0, <3.10" -content-hash = "5be8c38e248b64ff4f2eacf253411b57c91352523c40674f1dec6d8c304996c2" +python-versions = ">=3.7.0, <3.11" +content-hash = "8549770f6a13b58f3baf9b434b326fc6bfc69eaccd604efcce110744fabdac64" [metadata.files] ansiwrap = [ @@ -889,10 +896,6 @@ appnope = [ {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, ] -argcomplete = [ - {file = "argcomplete-1.12.3-py2.py3-none-any.whl", hash = "sha256:291f0beca7fd49ce285d2f10e4c1c77e9460cf823eef2de54df0c0fec88b0d81"}, - {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, -] asteval = [ {file = "asteval-0.9.25.tar.gz", hash = "sha256:bea22b7d8fa16bcba95ebc72052ae5d8ca97114c9959bb47f8b8eebf30e4342f"}, ] @@ -963,6 +966,10 @@ colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] +commonmark = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] cryptography = [ {file = "cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1"}, {file = "cryptography-3.4.7-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250"}, @@ -992,8 +999,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.6.0-py3-none-any.whl", hash = "sha256:c6513572926a96458f8c8f725bf0e00108fba0c9583ade9bd15b869c9d726e33"}, - {file = "importlib_metadata-4.6.0.tar.gz", hash = "sha256:4a5611fea3768d3d967c447ab4e93f567d95db92225b43b7b238dbfb855d70bb"}, + {file = "importlib_metadata-4.6.1-py3-none-any.whl", hash = "sha256:9f55f560e116f8643ecf2922d9cd3e1c7e8d52e683178fecd9d08f6aa357e11e"}, + {file = "importlib_metadata-4.6.1.tar.gz", hash = "sha256:079ada16b7fc30dfbb5d13399a5113110dab1aa7c2bc62f66af75f0b717c8cac"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1124,6 +1131,10 @@ pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] +pprintpp = [ + {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, + {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, +] prompt-toolkit = [ {file = "prompt_toolkit-3.0.19-py3-none-any.whl", hash = "sha256:7089d8d2938043508aa9420ec18ce0922885304cddae87fb96eebca942299f88"}, {file = "prompt_toolkit-3.0.19.tar.gz", hash = "sha256:08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f"}, @@ -1169,7 +1180,7 @@ pytest-bdd = [ {file = "pytest_bdd-4.1.0-py3-none-any.whl", hash = "sha256:7c5221680cec9a97630e1fae6132f4a97c2f86a90914206ee06a55ae1a409fe5"}, ] pytest-clarity = [ - {file = "pytest-clarity-0.3.0a0.tar.gz", hash = "sha256:5cc99e3d9b7969dfe17e5f6072d45a917c59d363b679686d3c958a1ded2e4dcf"}, + {file = "pytest-clarity-1.0.1.tar.gz", hash = "sha256:505fe345fad4fe11c6a4187fe683f2c7c52c077caa1e135f3e483fe112db7772"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, @@ -1215,55 +1226,64 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2021.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:494d0172774dc0beeea984b94c95389143db029575f7ca908edd74469321ea99"}, - {file = "regex-2021.7.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:8cf6728f89b071bd3ab37cb8a0e306f4de897553a0ed07442015ee65fbf53d62"}, - {file = "regex-2021.7.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1806370b2bef4d4193eebe8ee59a9fd7547836a34917b7badbe6561a8594d9cb"}, - {file = "regex-2021.7.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d0cf2651a8804f6325747c7e55e3be0f90ee2848e25d6b817aa2728d263f9abb"}, - {file = "regex-2021.7.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:268fe9dd1deb4a30c8593cabd63f7a241dfdc5bd9dd0233906c718db22cdd49a"}, - {file = "regex-2021.7.1-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:7743798dfb573d006f1143d745bf17efad39775a5190b347da5d83079646be56"}, - {file = "regex-2021.7.1-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:0e46c1191b2eb293a6912269ed08b4512e7e241bbf591f97e527492e04c77e93"}, - {file = "regex-2021.7.1-cp36-cp36m-win32.whl", hash = "sha256:b1dbeef938281f240347d50f28ae53c4b046a23389cd1fc4acec5ea0eae646a1"}, - {file = "regex-2021.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6c72ebb72e64e9bd195cb35a9b9bbfb955fd953b295255b8ae3e4ad4a146b615"}, - {file = "regex-2021.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf819c5b77ff44accc9a24e31f1f7ceaaf6c960816913ed3ef8443b9d20d81b6"}, - {file = "regex-2021.7.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:e80d2851109e56420b71f9702ad1646e2f0364528adbf6af85527bc61e49f394"}, - {file = "regex-2021.7.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:a1b6a3f600d6aff97e3f28c34192c9ed93fee293bd96ef327b64adb51a74b2f6"}, - {file = "regex-2021.7.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:ed77b97896312bc2deafe137ca2626e8b63808f5bedb944f73665c68093688a7"}, - {file = "regex-2021.7.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a548bb51c4476332ce4139df8e637386730f79a92652a907d12c696b6252b64d"}, - {file = "regex-2021.7.1-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:210c359e6ee5b83f7d8c529ba3c75ba405481d50f35a420609b0db827e2e3bb5"}, - {file = "regex-2021.7.1-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:1d386402ae7f3c9b107ae5863f7ecccb0167762c82a687ae6526b040feaa5ac6"}, - {file = "regex-2021.7.1-cp37-cp37m-win32.whl", hash = "sha256:5049d00dbb78f9d166d1c704e93934d42cce0570842bb1a61695123d6b01de09"}, - {file = "regex-2021.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:361be4d311ac995a8c7ad577025a3ae3a538531b1f2cf32efd8b7e5d33a13e5a"}, - {file = "regex-2021.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f32f47fb22c988c0b35756024b61d156e5c4011cb8004aa53d93b03323c45657"}, - {file = "regex-2021.7.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:b024ee43ee6b310fad5acaee23e6485b21468718cb792a9d1693eecacc3f0b7e"}, - {file = "regex-2021.7.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b092754c06852e8a8b022004aff56c24b06310189186805800d09313c37ce1f8"}, - {file = "regex-2021.7.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:a8a5826d8a1b64e2ff9af488cc179e1a4d0f144d11ce486a9f34ea38ccedf4ef"}, - {file = "regex-2021.7.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:444723ebaeb7fa8125f29c01a31101a3854ac3de293e317944022ae5effa53a4"}, - {file = "regex-2021.7.1-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:fdad3122b69cdabdb3da4c2a4107875913ac78dab0117fc73f988ad589c66b66"}, - {file = "regex-2021.7.1-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:4b1999ef60c45357598935c12508abf56edbbb9c380df6f336de38a6c3a294ae"}, - {file = "regex-2021.7.1-cp38-cp38-win32.whl", hash = "sha256:e07e92935040c67f49571779d115ecb3e727016d42fb36ee0d8757db4ca12ee0"}, - {file = "regex-2021.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:6b8b629f93246e507287ee07e26744beaffb4c56ed520576deac8b615bd76012"}, - {file = "regex-2021.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:56bef6b414949e2c9acf96cb5d78de8b529c7b99752619494e78dc76f99fd005"}, - {file = "regex-2021.7.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:78a2a885345a2d60b5e68099e877757d5ed12e46ba1e87507175f14f80892af3"}, - {file = "regex-2021.7.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3f7a92e60930f8fca2623d9e326c173b7cf2c8b7e4fdcf984b75a1d2fb08114d"}, - {file = "regex-2021.7.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4fc86b729ab88fe8ac3ec92287df253c64aa71560d76da5acd8a2e245839c629"}, - {file = "regex-2021.7.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:59845101de68fd5d3a1145df9ea022e85ecd1b49300ea68307ad4302320f6f61"}, - {file = "regex-2021.7.1-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:ce269e903b00d1ab4746793e9c50a57eec5d5388681abef074d7b9a65748fca5"}, - {file = "regex-2021.7.1-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:c11f2fca544b5e30a0e813023196a63b1cb9869106ef9a26e9dae28bce3e4e26"}, - {file = "regex-2021.7.1-cp39-cp39-win32.whl", hash = "sha256:1ccbd41dbee3a31e18938096510b7d4ee53aa9fce2ee3dcc8ec82ae264f6acfd"}, - {file = "regex-2021.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:18040755606b0c21281493ec309214bd61e41a170509e5014f41d6a5a586e161"}, - {file = "regex-2021.7.1.tar.gz", hash = "sha256:849802379a660206277675aa5a5c327f5c910c690649535863ddf329b0ba8c87"}, + {file = "regex-2021.7.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e6a1e5ca97d411a461041d057348e578dc344ecd2add3555aedba3b408c9f874"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:6afe6a627888c9a6cfbb603d1d017ce204cebd589d66e0703309b8048c3b0854"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:ccb3d2190476d00414aab36cca453e4596e8f70a206e2aa8db3d495a109153d2"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:ed693137a9187052fc46eedfafdcb74e09917166362af4cc4fddc3b31560e93d"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:99d8ab206a5270c1002bfcf25c51bf329ca951e5a169f3b43214fdda1f0b5f0d"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:b85ac458354165405c8a84725de7bbd07b00d9f72c31a60ffbf96bb38d3e25fa"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:3f5716923d3d0bfb27048242a6e0f14eecdb2e2a7fac47eda1d055288595f222"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5983c19d0beb6af88cb4d47afb92d96751fb3fa1784d8785b1cdf14c6519407"}, + {file = "regex-2021.7.6-cp36-cp36m-win32.whl", hash = "sha256:c92831dac113a6e0ab28bc98f33781383fe294df1a2c3dfd1e850114da35fd5b"}, + {file = "regex-2021.7.6-cp36-cp36m-win_amd64.whl", hash = "sha256:791aa1b300e5b6e5d597c37c346fb4d66422178566bbb426dd87eaae475053fb"}, + {file = "regex-2021.7.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:59506c6e8bd9306cd8a41511e32d16d5d1194110b8cfe5a11d102d8b63cf945d"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:564a4c8a29435d1f2256ba247a0315325ea63335508ad8ed938a4f14c4116a5d"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:59c00bb8dd8775473cbfb967925ad2c3ecc8886b3b2d0c90a8e2707e06c743f0"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:9a854b916806c7e3b40e6616ac9e85d3cdb7649d9e6590653deb5b341a736cec"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:db2b7df831c3187a37f3bb80ec095f249fa276dbe09abd3d35297fc250385694"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:173bc44ff95bc1e96398c38f3629d86fa72e539c79900283afa895694229fe6a"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:15dddb19823f5147e7517bb12635b3c82e6f2a3a6b696cc3e321522e8b9308ad"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ddeabc7652024803666ea09f32dd1ed40a0579b6fbb2a213eba590683025895"}, + {file = "regex-2021.7.6-cp37-cp37m-win32.whl", hash = "sha256:f080248b3e029d052bf74a897b9d74cfb7643537fbde97fe8225a6467fb559b5"}, + {file = "regex-2021.7.6-cp37-cp37m-win_amd64.whl", hash = "sha256:d8bbce0c96462dbceaa7ac4a7dfbbee92745b801b24bce10a98d2f2b1ea9432f"}, + {file = "regex-2021.7.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edd1a68f79b89b0c57339bce297ad5d5ffcc6ae7e1afdb10f1947706ed066c9c"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:422dec1e7cbb2efbbe50e3f1de36b82906def93ed48da12d1714cabcd993d7f0"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cbe23b323988a04c3e5b0c387fe3f8f363bf06c0680daf775875d979e376bd26"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:0eb2c6e0fcec5e0f1d3bcc1133556563222a2ffd2211945d7b1480c1b1a42a6f"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:1c78780bf46d620ff4fff40728f98b8afd8b8e35c3efd638c7df67be2d5cddbf"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:bc84fb254a875a9f66616ed4538542fb7965db6356f3df571d783f7c8d256edd"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:598c0a79b4b851b922f504f9f39a863d83ebdfff787261a5ed061c21e67dd761"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875c355360d0f8d3d827e462b29ea7682bf52327d500a4f837e934e9e4656068"}, + {file = "regex-2021.7.6-cp38-cp38-win32.whl", hash = "sha256:e586f448df2bbc37dfadccdb7ccd125c62b4348cb90c10840d695592aa1b29e0"}, + {file = "regex-2021.7.6-cp38-cp38-win_amd64.whl", hash = "sha256:2fe5e71e11a54e3355fa272137d521a40aace5d937d08b494bed4529964c19c4"}, + {file = "regex-2021.7.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6110bab7eab6566492618540c70edd4d2a18f40ca1d51d704f1d81c52d245026"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:4f64fc59fd5b10557f6cd0937e1597af022ad9b27d454e182485f1db3008f417"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:89e5528803566af4df368df2d6f503c84fbfb8249e6631c7b025fe23e6bd0cde"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2366fe0479ca0e9afa534174faa2beae87847d208d457d200183f28c74eaea59"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:f9392a4555f3e4cb45310a65b403d86b589adc773898c25a39184b1ba4db8985"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:2bceeb491b38225b1fee4517107b8491ba54fba77cf22a12e996d96a3c55613d"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:f98dc35ab9a749276f1a4a38ab3e0e2ba1662ce710f6530f5b0a6656f1c32b58"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:319eb2a8d0888fa6f1d9177705f341bc9455a2c8aca130016e52c7fe8d6c37a3"}, + {file = "regex-2021.7.6-cp39-cp39-win32.whl", hash = "sha256:eaf58b9e30e0e546cdc3ac06cf9165a1ca5b3de8221e9df679416ca667972035"}, + {file = "regex-2021.7.6-cp39-cp39-win_amd64.whl", hash = "sha256:4c9c3155fe74269f61e27617529b7f09552fbb12e44b1189cebbdb24294e6e1c"}, + {file = "regex-2021.7.6.tar.gz", hash = "sha256:8394e266005f2d8c6f0bc6780001f7afa3ef81a7a2111fa35058ded6fce79e4d"}, +] +rich = [ + {file = "rich-10.5.0-py3-none-any.whl", hash = "sha256:d36d4dddbb6cb87cdcb2c02f8ffd7836e1b136e3ba45d4b5a4da057f3b5e7798"}, + {file = "rich-10.5.0.tar.gz", hash = "sha256:f8a16484b3d70708bdafd04f659f9ca0e2c0129b33a343c10c734838d361777f"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, ] +setuptools = [ + {file = "setuptools-57.1.0-py3-none-any.whl", hash = "sha256:ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3"}, + {file = "setuptools-57.1.0.tar.gz", hash = "sha256:cfca9c97e7eebbc8abe18d5e5e962a08dcad55bb63afddd82d681de4d22a597b"}, +] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] -termcolor = [ - {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, -] textwrap3 = [ {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, {file = "textwrap3-0.9.2.zip", hash = "sha256:5008eeebdb236f6303dcd68f18b856d355f6197511d952ba74bc75e40e0c3414"}, @@ -1344,14 +1364,6 @@ wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] -xmltodict = [ - {file = "xmltodict-0.12.0-py2.py3-none-any.whl", hash = "sha256:8bbcb45cc982f48b2ca8fe7e7827c5d792f217ecf1792626f808bf41c3b86051"}, - {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, -] -yq = [ - {file = "yq-2.12.2-py2.py3-none-any.whl", hash = "sha256:9fdf4487a6dbf985ca1d357ec93f926d982813e8e896e8892bae95162b6defe3"}, - {file = "yq-2.12.2.tar.gz", hash = "sha256:2f156d0724b61487ac8752ed4eaa702a5737b804d5afa46fa55866951cd106d2"}, -] zipp = [ {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, diff --git a/pyproject.toml b/pyproject.toml index 36bc3d13..3f5c5644 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ "Funding" = "https://opencollective.com/jrnl" [tool.poetry.dependencies] -python = ">=3.7.0, <3.10" +python = ">=3.7.0, <3.11" ansiwrap = "^0.8.4" asteval = "^0.9" @@ -43,17 +43,28 @@ pyyaml = ">=5.1" pytz = ">=2020" # https://pythonhosted.org/pytz/#issues-limitations tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt +# Minimal deps required for testing +# I don't like repeating deps here, but +# there's no other way to do this yet until poetry v1.2 releases +# see: https://github.com/python-poetry/poetry/issues/1644 +behave = { version = "^1.2" , optional = true } +pytest = { version = ">=6.2" , optional = true } +pytest-bdd = { version = ">=4.0.1" , optional = true } +toml = { version = ">=0.10" , optional = true } + [tool.poetry.dev-dependencies] behave = "^1.2" -mkdocs = "^1.0" -black = {version = "^21.5b2",allow-prereleases = true} +mkdocs = ">=1.0" +black = { version = ">=21.5b2", allow-prereleases = true } toml = ">=0.10" pytest = ">=6.2" -pytest-bdd = "^4.0.1" -yq = ">=2.11" -ipdb = ">=0.13" -pytest-clarity = "^0.3.0-alpha.0" -pyproject-flake8 = "^0.0.1-alpha.2" +pytest-bdd = ">=4.0.1" +ipdb = "*" +pytest-clarity = "*" +pyproject-flake8 = "*" + +[tool.poetry.extras] +testing = [ "behave", "pytest", "pytest-bdd", "toml" ] [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' From 9bd395007fa38cbf82e2a6d6b41734cbcda40eeb Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 10 Jul 2021 19:14:56 +0000 Subject: [PATCH 0460/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7700ab4..f157f10c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,15 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...HEAD) +**Implemented enhancements:** + +- Python 3.10 support [\#1270](https://github.com/jrnl-org/jrnl/issues/1270) + **Build:** - Move test suite entirely to Pytest \(replace Behave\) [\#1192](https://github.com/jrnl-org/jrnl/issues/1192) - Remove useless shebangs and executable permissions [\#1283](https://github.com/jrnl-org/jrnl/pull/1283) ([musicinmybrain](https://github.com/musicinmybrain)) +- Add Python 3.10 support [\#1271](https://github.com/jrnl-org/jrnl/pull/1271) ([micahellison](https://github.com/micahellison)) - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) - Move test suite to Pytest \(replace Behave\) [\#1193](https://github.com/jrnl-org/jrnl/pull/1193) ([wren](https://github.com/wren)) From e771c9da8198b8979186c8ccd353b26802bb6a2a Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 10 Jul 2021 13:53:00 -0700 Subject: [PATCH 0461/1132] Update lock file from poetry stable version (#1298) --- poetry.lock | 104 +++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 59 deletions(-) diff --git a/poetry.lock b/poetry.lock index 172a2533..54f35f7a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -106,7 +106,7 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cffi" -version = "1.14.5" +version = "1.14.6" description = "Foreign Function Interface for Python calling C code." category = "main" optional = false @@ -245,7 +245,6 @@ python-versions = ">=2.7" [package.dependencies] decorator = {version = "*", markers = "python_version > \"3.6\""} ipython = {version = ">=7.17.0", markers = "python_version > \"3.6\""} -setuptools = "*" toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] @@ -267,7 +266,6 @@ pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" pygments = "*" -setuptools = ">=18.5" traitlets = ">=4.2" [package.extras] @@ -306,7 +304,7 @@ testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<6.0.0)"] [[package]] name = "jeepney" -version = "0.6.0" +version = "0.7.0" description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false @@ -314,6 +312,7 @@ python-versions = ">=3.6" [package.extras] test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio"] +trio = ["trio", "async-generator"] [[package]] name = "jinja2" @@ -767,18 +766,6 @@ python-versions = ">=3.6" cryptography = ">=2.0" jeepney = ">=0.6" -[[package]] -name = "setuptools" -version = "57.1.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "pygments-github-lexers (==0.0.5)", "sphinx-inline-tabs", "sphinxcontrib-towncrier"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "mock", "flake8-2020", "virtualenv (>=13.0.0)", "pytest-virtualenv (>=1.2.7)", "wheel", "paver", "pip (>=19.1)", "jaraco.envs", "pytest-xdist", "sphinx", "jaraco.path (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] - [[package]] name = "six" version = "1.16.0" @@ -920,43 +907,46 @@ black = [ {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, ] cffi = [ - {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, - {file = "cffi-1.14.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1"}, - {file = "cffi-1.14.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99cd03ae7988a93dd00bcd9d0b75e1f6c426063d6f03d2f90b89e29b25b82dfa"}, - {file = "cffi-1.14.5-cp27-cp27m-win32.whl", hash = "sha256:65fa59693c62cf06e45ddbb822165394a288edce9e276647f0046e1ec26920f3"}, - {file = "cffi-1.14.5-cp27-cp27m-win_amd64.whl", hash = "sha256:51182f8927c5af975fece87b1b369f722c570fe169f9880764b1ee3bca8347b5"}, - {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:43e0b9d9e2c9e5d152946b9c5fe062c151614b262fda2e7b201204de0b99e482"}, - {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbde590d4faaa07c72bf979734738f328d239913ba3e043b1e98fe9a39f8b2b6"}, - {file = "cffi-1.14.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:5de7970188bb46b7bf9858eb6890aad302577a5f6f75091fd7cdd3ef13ef3045"}, - {file = "cffi-1.14.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a465da611f6fa124963b91bf432d960a555563efe4ed1cc403ba5077b15370aa"}, - {file = "cffi-1.14.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:d42b11d692e11b6634f7613ad8df5d6d5f8875f5d48939520d351007b3c13406"}, - {file = "cffi-1.14.5-cp35-cp35m-win32.whl", hash = "sha256:72d8d3ef52c208ee1c7b2e341f7d71c6fd3157138abf1a95166e6165dd5d4369"}, - {file = "cffi-1.14.5-cp35-cp35m-win_amd64.whl", hash = "sha256:29314480e958fd8aab22e4a58b355b629c59bf5f2ac2492b61e3dc06d8c7a315"}, - {file = "cffi-1.14.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:3d3dd4c9e559eb172ecf00a2a7517e97d1e96de2a5e610bd9b68cea3925b4892"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, - {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, - {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, - {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, - {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, - {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, - {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, - {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, - {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, - {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, - {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, - {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, - {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, + {file = "cffi-1.14.6-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c"}, + {file = "cffi-1.14.6-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99"}, + {file = "cffi-1.14.6-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819"}, + {file = "cffi-1.14.6-cp27-cp27m-win32.whl", hash = "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20"}, + {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, + {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, + {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, + {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb"}, + {file = "cffi-1.14.6-cp36-cp36m-win32.whl", hash = "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a"}, + {file = "cffi-1.14.6-cp36-cp36m-win_amd64.whl", hash = "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e"}, + {file = "cffi-1.14.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762"}, + {file = "cffi-1.14.6-cp37-cp37m-win32.whl", hash = "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771"}, + {file = "cffi-1.14.6-cp37-cp37m-win_amd64.whl", hash = "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a"}, + {file = "cffi-1.14.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc"}, + {file = "cffi-1.14.6-cp38-cp38-win32.whl", hash = "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548"}, + {file = "cffi-1.14.6-cp38-cp38-win_amd64.whl", hash = "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156"}, + {file = "cffi-1.14.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87"}, + {file = "cffi-1.14.6-cp39-cp39-win32.whl", hash = "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728"}, + {file = "cffi-1.14.6-cp39-cp39-win_amd64.whl", hash = "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2"}, + {file = "cffi-1.14.6.tar.gz", hash = "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd"}, ] click = [ {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, @@ -1022,8 +1012,8 @@ jedi = [ {file = "jedi-0.18.0.tar.gz", hash = "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707"}, ] jeepney = [ - {file = "jeepney-0.6.0-py3-none-any.whl", hash = "sha256:aec56c0eb1691a841795111e184e13cad504f7703b9a64f63020816afa79a8ae"}, - {file = "jeepney-0.6.0.tar.gz", hash = "sha256:7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657"}, + {file = "jeepney-0.7.0-py3-none-any.whl", hash = "sha256:71335e7a4e93817982f473f3507bffc2eff7a544119ab9b73e089c8ba1409ba3"}, + {file = "jeepney-0.7.0.tar.gz", hash = "sha256:1237cd64c8f7ac3aa4b3f332c4d0fb4a8216f39eaa662ec904302d4d77de5a54"}, ] jinja2 = [ {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, @@ -1276,10 +1266,6 @@ secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, ] -setuptools = [ - {file = "setuptools-57.1.0-py3-none-any.whl", hash = "sha256:ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3"}, - {file = "setuptools-57.1.0.tar.gz", hash = "sha256:cfca9c97e7eebbc8abe18d5e5e962a08dcad55bb63afddd82d681de4d22a597b"}, -] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, From 7b72b24ee254d3043c410fbd31779c0d10400630 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 17 Jul 2021 12:01:59 -0700 Subject: [PATCH 0462/1132] Add first draft of security.md (#1299) --- SECURITY.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..c239b957 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security + +If you've discovered a potential security issue in jrnl, please contact the maintainers at [jrnl-sh@googlegroups.com](mailto:jrnl-sh@googlegroups.com). + +You can also feel free to [open an issue](https://github.com/jrnl-org/jrnl/issues/new/choose) (but please don't disclose the vulnerability) in case the email goes to spam. + +You can find [known privacy and security issues in our documentation](https://jrnl.sh/en/stable/privacy-and-security/). From b896c85bf0e2fe3d8131bca55456e8393f53361e Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 17 Jul 2021 19:03:29 +0000 Subject: [PATCH 0463/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f157f10c..8a14e274 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) - Move test suite to Pytest \(replace Behave\) [\#1193](https://github.com/jrnl-org/jrnl/pull/1193) ([wren](https://github.com/wren)) +**Documentation:** + +- Create security.md [\#1284](https://github.com/jrnl-org/jrnl/issues/1284) + **Packaging:** - Bump black from 21.5b1 to 21.5b2 [\#1254](https://github.com/jrnl-org/jrnl/pull/1254) ([dependabot[bot]](https://github.com/apps/dependabot)) From 52c0a0ebf31166b7ed80a753ddceebbeb99392e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Jul 2021 12:13:19 -0700 Subject: [PATCH 0464/1132] Bump python-dateutil from 2.8.1 to 2.8.2 (#1302) Bumps [python-dateutil](https://github.com/dateutil/dateutil) from 2.8.1 to 2.8.2. - [Release notes](https://github.com/dateutil/dateutil/releases) - [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS) - [Commits](https://github.com/dateutil/dateutil/compare/2.8.1...2.8.2) --- updated-dependencies: - dependency-name: python-dateutil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 54f35f7a..04fe06c3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -677,7 +677,7 @@ rich = ">=8.0.0" [[package]] name = "python-dateutil" -version = "2.8.1" +version = "2.8.2" description = "Extensions to the standard Python datetime module" category = "main" optional = false @@ -914,6 +914,11 @@ cffi = [ {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, + {file = "cffi-1.14.6-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534"}, + {file = "cffi-1.14.6-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a"}, + {file = "cffi-1.14.6-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5"}, + {file = "cffi-1.14.6-cp35-cp35m-win32.whl", hash = "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca"}, + {file = "cffi-1.14.6-cp35-cp35m-win_amd64.whl", hash = "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218"}, {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, @@ -1024,6 +1029,7 @@ keyring = [ {file = "keyring-23.0.1.tar.gz", hash = "sha256:045703609dd3fccfcdb27da201684278823b72af515aedec1a8515719a038cb8"}, ] mako = [ + {file = "Mako-1.1.4-py2.py3-none-any.whl", hash = "sha256:aea166356da44b9b830c8023cd9b557fa856bd8b4035d6de771ca027dfc5cc6e"}, {file = "Mako-1.1.4.tar.gz", hash = "sha256:17831f0b7087c313c0ffae2bcbbd3c1d5ba9eeac9c38f2eb7b50e8c99fe9d5ab"}, ] markdown = [ @@ -1173,8 +1179,8 @@ pytest-clarity = [ {file = "pytest-clarity-1.0.1.tar.gz", hash = "sha256:505fe345fad4fe11c6a4187fe683f2c7c52c077caa1e135f3e483fe112db7772"}, ] python-dateutil = [ - {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, - {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, @@ -1195,18 +1201,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, From 3e95a46bd219cdbcddb5c4451400bc9dc72afe87 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 17 Jul 2021 19:15:00 +0000 Subject: [PATCH 0465/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a14e274..0bbdb22b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ **Packaging:** +- Bump python-dateutil from 2.8.1 to 2.8.2 [\#1302](https://github.com/jrnl-org/jrnl/pull/1302) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.5b1 to 21.5b2 [\#1254](https://github.com/jrnl-org/jrnl/pull/1254) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.5b0 to 21.5b1 [\#1244](https://github.com/jrnl-org/jrnl/pull/1244) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 20.8b1 to 21.5b0 [\#1241](https://github.com/jrnl-org/jrnl/pull/1241) ([dependabot[bot]](https://github.com/apps/dependabot)) From 31f782e333baf0fc39b19e45aa2708349325d2d6 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 17 Jul 2021 13:22:01 -0700 Subject: [PATCH 0466/1132] Add documentation about saved passwords in Windows (#1301) * Add note about saved passwords * Add missing yq dep back in to allow xq to run in mkdocs CI pipeline --- docs/privacy-and-security.md | 12 ++++++ poetry.lock | 79 ++++++++++++++++++++++++++++++++---- pyproject.toml | 1 + 3 files changed, 84 insertions(+), 8 deletions(-) diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index 39f4863c..c2996d25 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -86,6 +86,18 @@ you have a journal, where that journal file is, and when you last edited it. With a sufficient power imbalance, someone may be able to force you to unencrypt it through non-technical means. +## Saved Passwords + +When creating an encrypted journal, you'll be prompted as to whether or not you +want to "store the password in your keychain." This keychain is accessed using +the [Python keyring library](https://pypi.org/project/keyring/), which has different +behavior depending on your operating system. + +In Windows, the keychain is the Windows Credential Manager (WCM), which can't be locked +and can be accessed by any other application running under your username. If this is +a concern for you, you may not want to store your password. + + ## Notice any other risks? Please let the maintainers know by [filing an issue on GitHub](https://github.com/jrnl-org/jrnl/issues). diff --git a/poetry.lock b/poetry.lock index 04fe06c3..94b251d3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -25,6 +25,20 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "argcomplete" +version = "1.12.3" +description = "Bash tab completion for argparse" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +importlib-metadata = {version = ">=0.23,<5", markers = "python_version == \"3.7\""} + +[package.extras] +test = ["coverage", "flake8", "pexpect", "wheel"] + [[package]] name = "asteval" version = "0.9.25" @@ -82,7 +96,7 @@ docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] [[package]] name = "black" -version = "21.6b0" +version = "21.7b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -94,7 +108,7 @@ click = ">=7.1.2" mypy-extensions = ">=0.4.3" pathspec = ">=0.8.1,<1" regex = ">=2020.1.8" -toml = ">=0.10.1" +tomli = ">=0.2.6,<2.0.0" typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} @@ -739,7 +753,7 @@ python-versions = "*" [[package]] name = "rich" -version = "10.5.0" +version = "10.6.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false @@ -790,6 +804,14 @@ category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "tomli" +version = "1.0.4" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.6" + [[package]] name = "traitlets" version = "5.0.5" @@ -850,6 +872,31 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "xmltodict" +version = "0.12.0" +description = "Makes working with XML feel like you are working with JSON" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "yq" +version = "2.12.2" +description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +argcomplete = ">=1.8.1" +PyYAML = ">=3.11" +toml = ">=0.10.0" +xmltodict = ">=0.11.0" + +[package.extras] +test = ["coverage", "flake8", "wheel"] + [[package]] name = "zipp" version = "3.5.0" @@ -868,7 +915,7 @@ testing = ["behave", "pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.11" -content-hash = "8549770f6a13b58f3baf9b434b326fc6bfc69eaccd604efcce110744fabdac64" +content-hash = "c4f943f3dbd96f5aab8ad0ef2f3d3f6a7096dc75ea7d3e449949695d340208fb" [metadata.files] ansiwrap = [ @@ -883,6 +930,10 @@ appnope = [ {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, ] +argcomplete = [ + {file = "argcomplete-1.12.3-py2.py3-none-any.whl", hash = "sha256:291f0beca7fd49ce285d2f10e4c1c77e9460cf823eef2de54df0c0fec88b0d81"}, + {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, +] asteval = [ {file = "asteval-0.9.25.tar.gz", hash = "sha256:bea22b7d8fa16bcba95ebc72052ae5d8ca97114c9959bb47f8b8eebf30e4342f"}, ] @@ -903,8 +954,8 @@ behave = [ {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, ] black = [ - {file = "black-21.6b0-py3-none-any.whl", hash = "sha256:dfb8c5a069012b2ab1e972e7b908f5fb42b6bbabcba0a788b86dc05067c7d9c7"}, - {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, + {file = "black-21.7b0-py3-none-any.whl", hash = "sha256:1c7aa6ada8ee864db745b22790a32f94b2795c253a75d6d9b5e439ff10d23116"}, + {file = "black-21.7b0.tar.gz", hash = "sha256:c8373c6491de9362e39271630b65b964607bc5c79c83783547d76c839b3aa219"}, ] cffi = [ {file = "cffi-1.14.6-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c"}, @@ -1273,8 +1324,8 @@ regex = [ {file = "regex-2021.7.6.tar.gz", hash = "sha256:8394e266005f2d8c6f0bc6780001f7afa3ef81a7a2111fa35058ded6fce79e4d"}, ] rich = [ - {file = "rich-10.5.0-py3-none-any.whl", hash = "sha256:d36d4dddbb6cb87cdcb2c02f8ffd7836e1b136e3ba45d4b5a4da057f3b5e7798"}, - {file = "rich-10.5.0.tar.gz", hash = "sha256:f8a16484b3d70708bdafd04f659f9ca0e2c0129b33a343c10c734838d361777f"}, + {file = "rich-10.6.0-py3-none-any.whl", hash = "sha256:d3f72827cd5df13b2ef7f1a97f81ec65548d4fdeb92cef653234f227580bbb2a"}, + {file = "rich-10.6.0.tar.gz", hash = "sha256:128261b3e2419a4ef9c97066ccc2abbfb49fa7c5e89c3fe4056d00aa5e9c1e65"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, @@ -1292,6 +1343,10 @@ toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +tomli = [ + {file = "tomli-1.0.4-py3-none-any.whl", hash = "sha256:0713b16ff91df8638a6a694e295c8159ab35ba93e3424a626dd5226d386057be"}, + {file = "tomli-1.0.4.tar.gz", hash = "sha256:be670d0d8d7570fd0ea0113bd7bb1ba3ac6706b4de062cc4c952769355c9c268"}, +] traitlets = [ {file = "traitlets-5.0.5-py3-none-any.whl", hash = "sha256:69ff3f9d5351f31a7ad80443c2674b7099df13cc41fc5fa6e2f6d3b0330b0426"}, {file = "traitlets-5.0.5.tar.gz", hash = "sha256:178f4ce988f69189f7e523337a3e11d91c786ded9360174a3d9ca83e79bc5396"}, @@ -1364,6 +1419,14 @@ wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] +xmltodict = [ + {file = "xmltodict-0.12.0-py2.py3-none-any.whl", hash = "sha256:8bbcb45cc982f48b2ca8fe7e7827c5d792f217ecf1792626f808bf41c3b86051"}, + {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, +] +yq = [ + {file = "yq-2.12.2-py2.py3-none-any.whl", hash = "sha256:9fdf4487a6dbf985ca1d357ec93f926d982813e8e896e8892bae95162b6defe3"}, + {file = "yq-2.12.2.tar.gz", hash = "sha256:2f156d0724b61487ac8752ed4eaa702a5737b804d5afa46fa55866951cd106d2"}, +] zipp = [ {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, diff --git a/pyproject.toml b/pyproject.toml index 3f5c5644..5c6d5cbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ pytest-bdd = ">=4.0.1" ipdb = "*" pytest-clarity = "*" pyproject-flake8 = "*" +yq = "*" [tool.poetry.extras] testing = [ "behave", "pytest", "pytest-bdd", "toml" ] From cef3a98b4e3c924613aa6f1eb17df9de0e3be926 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 17 Jul 2021 20:23:48 +0000 Subject: [PATCH 0467/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bbdb22b..b43053e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ **Documentation:** - Create security.md [\#1284](https://github.com/jrnl-org/jrnl/issues/1284) +- Document keyring security concerns on Windows, Mac [\#1142](https://github.com/jrnl-org/jrnl/issues/1142) +- Add documentation about saved passwords in Windows [\#1301](https://github.com/jrnl-org/jrnl/pull/1301) ([micahellison](https://github.com/micahellison)) **Packaging:** From f158d7f266d33c739eb1bed27d6761f258246b54 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 17 Jul 2021 22:16:08 +0000 Subject: [PATCH 0468/1132] Increment version to v2.8.2-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 51977ba3..62fb4b77 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.1" +__version__ = "v2.8.2-beta" diff --git a/pyproject.toml b/pyproject.toml index 5c6d5cbd..45c2b58c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.1" +version = "v2.8.2-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", @@ -47,10 +47,10 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE # I don't like repeating deps here, but # there's no other way to do this yet until poetry v1.2 releases # see: https://github.com/python-poetry/poetry/issues/1644 -behave = { version = "^1.2" , optional = true } -pytest = { version = ">=6.2" , optional = true } -pytest-bdd = { version = ">=4.0.1" , optional = true } -toml = { version = ">=0.10" , optional = true } +behave = { version = "^1.2", optional = true } +pytest = { version = ">=6.2", optional = true } +pytest-bdd = { version = ">=4.0.1", optional = true } +toml = { version = ">=0.10", optional = true } [tool.poetry.dev-dependencies] behave = "^1.2" From 1ba1b756c9cb626737929c0d75ee415485265e93 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 17 Jul 2021 22:17:56 +0000 Subject: [PATCH 0469/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b43053e2..2d78dcdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8.2-beta](https://pypi.org/project/jrnl/v2.8.2-beta/) (2021-07-17) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...v2.8.2-beta) **Implemented enhancements:** @@ -11,8 +11,11 @@ **Build:** - Move test suite entirely to Pytest \(replace Behave\) [\#1192](https://github.com/jrnl-org/jrnl/issues/1192) +- Fix lock file from stable Poetry version [\#1298](https://github.com/jrnl-org/jrnl/pull/1298) ([wren](https://github.com/wren)) +- Change all YAML FullLoader calls to SafeLoader [\#1285](https://github.com/jrnl-org/jrnl/pull/1285) ([micahellison](https://github.com/micahellison)) - Remove useless shebangs and executable permissions [\#1283](https://github.com/jrnl-org/jrnl/pull/1283) ([musicinmybrain](https://github.com/musicinmybrain)) - Add Python 3.10 support [\#1271](https://github.com/jrnl-org/jrnl/pull/1271) ([micahellison](https://github.com/micahellison)) +- Ensure that line endings in all py files are Linux style instead of Windows [\#1250](https://github.com/jrnl-org/jrnl/pull/1250) ([micahellison](https://github.com/micahellison)) - Remove `--version` from brew release workflow [\#1233](https://github.com/jrnl-org/jrnl/pull/1233) ([wren](https://github.com/wren)) - Move test suite to Pytest \(replace Behave\) [\#1193](https://github.com/jrnl-org/jrnl/pull/1193) ([wren](https://github.com/wren)) @@ -21,6 +24,7 @@ - Create security.md [\#1284](https://github.com/jrnl-org/jrnl/issues/1284) - Document keyring security concerns on Windows, Mac [\#1142](https://github.com/jrnl-org/jrnl/issues/1142) - Add documentation about saved passwords in Windows [\#1301](https://github.com/jrnl-org/jrnl/pull/1301) ([micahellison](https://github.com/micahellison)) +- Add security.md [\#1299](https://github.com/jrnl-org/jrnl/pull/1299) ([micahellison](https://github.com/micahellison)) **Packaging:** From c9c6e7efc17f7f706f5b2318aeb8ba09629149ea Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 31 Jul 2021 11:43:19 -0700 Subject: [PATCH 0470/1132] Fix typo in --help (#1309) --- jrnl/args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/args.py b/jrnl/args.py index c8bd7743..972fe802 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -331,7 +331,7 @@ def parse_args(args=[]): Examples: \n \t - Use a different editor for this jrnl entry, call: \n - \t jrnl --config-override editor: "nano" \n + \t jrnl --config-override editor "nano" \n \t - Override color selections\n \t jrnl --config-override colors.body blue --config-override colors.title green """, From 642155292a1eb2cf3dd2ef8f4b83b97565290a12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 11:45:19 -0700 Subject: [PATCH 0471/1132] Bump mkdocs from 1.2.1 to 1.2.2 (#1307) Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/mkdocs/mkdocs/releases) - [Commits](https://github.com/mkdocs/mkdocs/compare/1.2.1...1.2.2) --- updated-dependencies: - dependency-name: mkdocs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 94b251d3..d7157ffe 100644 --- a/poetry.lock +++ b/poetry.lock @@ -426,7 +426,7 @@ python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.2.1" +version = "1.2.2" description = "Project documentation with Markdown." category = "dev" optional = false @@ -1136,8 +1136,8 @@ mergedeep = [ {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.2.1-py3-none-any.whl", hash = "sha256:11141126e5896dd9d279b3e4814eb488e409a0990fb638856255020406a8e2e7"}, - {file = "mkdocs-1.2.1.tar.gz", hash = "sha256:6e0ea175366e3a50d334597b0bc042b8cebd512398cdd3f6f34842d0ef524905"}, + {file = "mkdocs-1.2.2-py3-none-any.whl", hash = "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff"}, + {file = "mkdocs-1.2.2.tar.gz", hash = "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, From c49853d724fa1254d491b73aef90a8fd05c890bd Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 31 Jul 2021 18:47:00 +0000 Subject: [PATCH 0472/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d78dcdb..120dd3f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.2-beta...HEAD) + +**Packaging:** + +- Bump mkdocs from 1.2.1 to 1.2.2 [\#1307](https://github.com/jrnl-org/jrnl/pull/1307) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8.2-beta](https://pypi.org/project/jrnl/v2.8.2-beta/) (2021-07-17) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...v2.8.2-beta) From eaaa7bb0e10df4ffd2a189a723e0c687305cb47a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 31 Jul 2021 19:10:05 +0000 Subject: [PATCH 0473/1132] Increment version to v2.8.2 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 62fb4b77..04987f5e 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.2-beta" +__version__ = "v2.8.2" diff --git a/pyproject.toml b/pyproject.toml index 45c2b58c..feaf897d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.2-beta" +version = "v2.8.2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From b23c831da5b20122791279614b10e5a365dd18d9 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 31 Jul 2021 19:11:33 +0000 Subject: [PATCH 0474/1132] Update changelog [ci skip] --- CHANGELOG.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 120dd3f2..ef50d24e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,12 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8.2](https://pypi.org/project/jrnl/v2.8.2/) (2021-07-31) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.2-beta...HEAD) - -**Packaging:** - -- Bump mkdocs from 1.2.1 to 1.2.2 [\#1307](https://github.com/jrnl-org/jrnl/pull/1307) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.8.2-beta](https://pypi.org/project/jrnl/v2.8.2-beta/) (2021-07-17) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.1...v2.8.2-beta) - -**Implemented enhancements:** - -- Python 3.10 support [\#1270](https://github.com/jrnl-org/jrnl/issues/1270) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.2-beta...v2.8.2) **Build:** -- Move test suite entirely to Pytest \(replace Behave\) [\#1192](https://github.com/jrnl-org/jrnl/issues/1192) +- Add CI tests for latest dev Python build [\#1273](https://github.com/jrnl-org/jrnl/issues/1273) - Fix lock file from stable Poetry version [\#1298](https://github.com/jrnl-org/jrnl/pull/1298) ([wren](https://github.com/wren)) - Change all YAML FullLoader calls to SafeLoader [\#1285](https://github.com/jrnl-org/jrnl/pull/1285) ([micahellison](https://github.com/micahellison)) - Remove useless shebangs and executable permissions [\#1283](https://github.com/jrnl-org/jrnl/pull/1283) ([musicinmybrain](https://github.com/musicinmybrain)) @@ -29,13 +17,12 @@ **Documentation:** -- Create security.md [\#1284](https://github.com/jrnl-org/jrnl/issues/1284) -- Document keyring security concerns on Windows, Mac [\#1142](https://github.com/jrnl-org/jrnl/issues/1142) - Add documentation about saved passwords in Windows [\#1301](https://github.com/jrnl-org/jrnl/pull/1301) ([micahellison](https://github.com/micahellison)) - Add security.md [\#1299](https://github.com/jrnl-org/jrnl/pull/1299) ([micahellison](https://github.com/micahellison)) **Packaging:** +- Bump mkdocs from 1.2.1 to 1.2.2 [\#1307](https://github.com/jrnl-org/jrnl/pull/1307) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump python-dateutil from 2.8.1 to 2.8.2 [\#1302](https://github.com/jrnl-org/jrnl/pull/1302) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.5b1 to 21.5b2 [\#1254](https://github.com/jrnl-org/jrnl/pull/1254) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.5b0 to 21.5b1 [\#1244](https://github.com/jrnl-org/jrnl/pull/1244) ([dependabot[bot]](https://github.com/apps/dependabot)) From 8a64b77e63612bddcdbd50969cfb5eee630ddbc8 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Mon, 16 Aug 2021 19:46:01 -0700 Subject: [PATCH 0475/1132] Update build to poetry alpha 2 for python 3.10 (#1320) * udpate build to poetry alpha 2 for python 3.10 * update testing workflow to run when workflow itself is changed --- .github/workflows/testing.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 396fc854..d2ec4039 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -9,6 +9,7 @@ on: - 'tests/**' - 'poetry.lock' - 'pyproject.toml' + - '.github/workflows/testing.yaml' pull_request: branches: [ develop ] paths: @@ -17,6 +18,7 @@ on: - 'tests/**' - 'poetry.lock' - 'pyproject.toml' + - '.github/workflows/testing.yaml' jobs: test: @@ -64,7 +66,7 @@ jobs: if: ${{ matrix.python-version == '3.10-dev' }} run: | echo '::group::poetry' - pip install poetry==1.2.0a1 + pip install poetry==1.2.0a2 poetry config --local virtualenvs.in-project true echo '::endgroup::' From 5ec7dec9f01ca3504f5d99c9a2f9108540ca466b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Tue, 17 Aug 2021 02:47:47 +0000 Subject: [PATCH 0476/1132] Update changelog [ci skip] --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef50d24e..5b798f2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.2...HEAD) + +**Implemented enhancements:** + +- Output after composition can be more useful and user friendly [\#1253](https://github.com/jrnl-org/jrnl/issues/1253) + +**Build:** + +- Python 3.10 build action is failing on poetry dependency installation [\#1321](https://github.com/jrnl-org/jrnl/issues/1321) + ## [v2.8.2](https://pypi.org/project/jrnl/v2.8.2/) (2021-07-31) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.2-beta...v2.8.2) From 3b93e92960729e5a062605b08ba9f775bb67e578 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Mon, 16 Aug 2021 20:13:44 -0700 Subject: [PATCH 0477/1132] take out arg for old plugin from makefile (#1322) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a4494ee3..b2e27f32 100644 --- a/Makefile +++ b/Makefile @@ -25,10 +25,10 @@ unit: # unit tests poetry run pytest tests/unit bdd: # bdd tests - poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native --diff-type=unified + poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native bdd-debug: # bdd tests - poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native --diff-type=unified -x -vv + poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native -x -vv test: lint unit bdd ## Run unit tests and behave tests From 32b5a2b5d0c313225e1407d85b78460eee6b8e7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 20:22:39 -0700 Subject: [PATCH 0478/1132] Bump keyring from 23.0.1 to 23.1.0 (#1318) Bumps [keyring](https://github.com/jaraco/keyring) from 23.0.1 to 23.1.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.0.1...v23.1.0) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index d7157ffe..f2b0dcb5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -344,7 +344,7 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.0.1" +version = "23.1.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -1026,8 +1026,10 @@ cryptography = [ {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b01fd6f2737816cb1e08ed4807ae194404790eac7ad030b34f2ce72b332f5586"}, {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:bf40af59ca2465b24e54f671b2de2c59257ddc4f7e5706dbd6930e26823668d3"}, {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] decorator = [ @@ -1076,8 +1078,8 @@ jinja2 = [ {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, ] keyring = [ - {file = "keyring-23.0.1-py3-none-any.whl", hash = "sha256:8f607d7d1cc502c43a932a275a56fe47db50271904513a379d39df1af277ac48"}, - {file = "keyring-23.0.1.tar.gz", hash = "sha256:045703609dd3fccfcdb27da201684278823b72af515aedec1a8515719a038cb8"}, + {file = "keyring-23.1.0-py3-none-any.whl", hash = "sha256:b32397fd7e7063f8dd74a26db910c9862fc2109285fa16e3b5208bcb42a3e579"}, + {file = "keyring-23.1.0.tar.gz", hash = "sha256:b7e0156667f5dcc73c1f63a518005cd18a4eb23fe77321194fefcc03748b21a4"}, ] mako = [ {file = "Mako-1.1.4-py2.py3-none-any.whl", hash = "sha256:aea166356da44b9b830c8023cd9b557fa856bd8b4035d6de771ca027dfc5cc6e"}, @@ -1088,12 +1090,22 @@ markdown = [ {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1102,14 +1114,21 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1119,6 +1138,9 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -1289,6 +1311,10 @@ regex = [ {file = "regex-2021.7.6-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:b85ac458354165405c8a84725de7bbd07b00d9f72c31a60ffbf96bb38d3e25fa"}, {file = "regex-2021.7.6-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:3f5716923d3d0bfb27048242a6e0f14eecdb2e2a7fac47eda1d055288595f222"}, {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5983c19d0beb6af88cb4d47afb92d96751fb3fa1784d8785b1cdf14c6519407"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf1d2d183abc7faa101ebe0b8d04fd19cb9138820abc8589083035c9440b8ca6"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1947e7de155063e1c495c50590229fb98720d4c383af5031bbcb413db33fa1be"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:17d8a3f99b18d87ac54a449b836d485cc8c195bb6f5e4379c84c8519045facc9"}, + {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d30895ec80cc80358392841add9dde81ea1d54a4949049269115e6b0555d0498"}, {file = "regex-2021.7.6-cp36-cp36m-win32.whl", hash = "sha256:c92831dac113a6e0ab28bc98f33781383fe294df1a2c3dfd1e850114da35fd5b"}, {file = "regex-2021.7.6-cp36-cp36m-win_amd64.whl", hash = "sha256:791aa1b300e5b6e5d597c37c346fb4d66422178566bbb426dd87eaae475053fb"}, {file = "regex-2021.7.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:59506c6e8bd9306cd8a41511e32d16d5d1194110b8cfe5a11d102d8b63cf945d"}, @@ -1299,6 +1325,10 @@ regex = [ {file = "regex-2021.7.6-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:173bc44ff95bc1e96398c38f3629d86fa72e539c79900283afa895694229fe6a"}, {file = "regex-2021.7.6-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:15dddb19823f5147e7517bb12635b3c82e6f2a3a6b696cc3e321522e8b9308ad"}, {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ddeabc7652024803666ea09f32dd1ed40a0579b6fbb2a213eba590683025895"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8244c681018423a0d1784bc6b9af33bdf55f2ab8acb1f3cd9dd83d90e0813253"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8a4c742089faf0e51469c6a1ad7e3d3d21afae54a16a6cead85209dfe0a1ce65"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:914e626dc8e75fe4fc9b7214763f141d9f40165d00dfe680b104fa1b24063bbf"}, + {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fabb19c82ecf39832a3f5060dfea9a7ab270ef156039a1143a29a83a09a62de"}, {file = "regex-2021.7.6-cp37-cp37m-win32.whl", hash = "sha256:f080248b3e029d052bf74a897b9d74cfb7643537fbde97fe8225a6467fb559b5"}, {file = "regex-2021.7.6-cp37-cp37m-win_amd64.whl", hash = "sha256:d8bbce0c96462dbceaa7ac4a7dfbbee92745b801b24bce10a98d2f2b1ea9432f"}, {file = "regex-2021.7.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edd1a68f79b89b0c57339bce297ad5d5ffcc6ae7e1afdb10f1947706ed066c9c"}, @@ -1309,6 +1339,10 @@ regex = [ {file = "regex-2021.7.6-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:bc84fb254a875a9f66616ed4538542fb7965db6356f3df571d783f7c8d256edd"}, {file = "regex-2021.7.6-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:598c0a79b4b851b922f504f9f39a863d83ebdfff787261a5ed061c21e67dd761"}, {file = "regex-2021.7.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875c355360d0f8d3d827e462b29ea7682bf52327d500a4f837e934e9e4656068"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfc0957c4a4b91eff5ad036088769e600a25774256cd0e1154378591ce573f08"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:efb4af05fa4d2fc29766bf516f1f5098d6b5c3ed846fde980c18bf8646ad3979"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7423aca7cc30a6228ccdcf2ea76f12923d652c5c7c6dc1959a0b004e308f39fb"}, + {file = "regex-2021.7.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb9834c1e77493efd7343b8e38950dee9797d2d6f2d5fd91c008dfaef64684b9"}, {file = "regex-2021.7.6-cp38-cp38-win32.whl", hash = "sha256:e586f448df2bbc37dfadccdb7ccd125c62b4348cb90c10840d695592aa1b29e0"}, {file = "regex-2021.7.6-cp38-cp38-win_amd64.whl", hash = "sha256:2fe5e71e11a54e3355fa272137d521a40aace5d937d08b494bed4529964c19c4"}, {file = "regex-2021.7.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6110bab7eab6566492618540c70edd4d2a18f40ca1d51d704f1d81c52d245026"}, @@ -1319,6 +1353,10 @@ regex = [ {file = "regex-2021.7.6-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:2bceeb491b38225b1fee4517107b8491ba54fba77cf22a12e996d96a3c55613d"}, {file = "regex-2021.7.6-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:f98dc35ab9a749276f1a4a38ab3e0e2ba1662ce710f6530f5b0a6656f1c32b58"}, {file = "regex-2021.7.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:319eb2a8d0888fa6f1d9177705f341bc9455a2c8aca130016e52c7fe8d6c37a3"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:598ee917dbe961dcf827217bf2466bb86e4ee5a8559705af57cbabb3489dd37e"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:56fc7045a1999a8d9dd1896715bc5c802dfec5b9b60e883d2cbdecb42adedea4"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8363ac90ea63c3dd0872dfdb695f38aff3334bfa5712cffb238bd3ffef300e3"}, + {file = "regex-2021.7.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:716a6db91b3641f566531ffcc03ceec00b2447f0db9942b3c6ea5d2827ad6be3"}, {file = "regex-2021.7.6-cp39-cp39-win32.whl", hash = "sha256:eaf58b9e30e0e546cdc3ac06cf9165a1ca5b3de8221e9df679416ca667972035"}, {file = "regex-2021.7.6-cp39-cp39-win_amd64.whl", hash = "sha256:4c9c3155fe74269f61e27617529b7f09552fbb12e44b1189cebbdb24294e6e1c"}, {file = "regex-2021.7.6.tar.gz", hash = "sha256:8394e266005f2d8c6f0bc6780001f7afa3ef81a7a2111fa35058ded6fce79e4d"}, From 1c63d9473699cda1fab3f3e39e9e929b1747596b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Tue, 17 Aug 2021 03:24:18 +0000 Subject: [PATCH 0479/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b798f2d..98a8c5bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Python 3.10 build action is failing on poetry dependency installation [\#1321](https://github.com/jrnl-org/jrnl/issues/1321) +**Packaging:** + +- Bump keyring from 23.0.1 to 23.1.0 [\#1318](https://github.com/jrnl-org/jrnl/pull/1318) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8.2](https://pypi.org/project/jrnl/v2.8.2/) (2021-07-31) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.2-beta...v2.8.2) From a0a3ef669e11c50c81b9dbf2b3064de6e8b818b3 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 21 Aug 2021 12:08:44 -0700 Subject: [PATCH 0480/1132] Set bash as default shell (#1324) --- .github/workflows/testing.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index d2ec4039..2976399f 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -20,6 +20,10 @@ on: - 'pyproject.toml' - '.github/workflows/testing.yaml' +defaults: + run: + shell: bash # needed to prevent Windows from using PowerShell + jobs: test: if: > From 9de723d01450ba6a1c5b1ad24145e003fa78822a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 Aug 2021 19:10:25 +0000 Subject: [PATCH 0481/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98a8c5bb..29898eca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ **Build:** +- Windows CI behaving unreliable due to mismatch between Powershell & bash retrieving environment variables [\#1323](https://github.com/jrnl-org/jrnl/issues/1323) - Python 3.10 build action is failing on poetry dependency installation [\#1321](https://github.com/jrnl-org/jrnl/issues/1321) +- Set bash as default shell [\#1324](https://github.com/jrnl-org/jrnl/pull/1324) ([micahellison](https://github.com/micahellison)) **Packaging:** From 3e5a55b1e9841d86de059eaa67800976e780fb4e Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 21 Aug 2021 13:46:29 -0700 Subject: [PATCH 0482/1132] Display error when trying to encrypt folder/DayOne journal types (#1315) * Raise exception when trying to commit folder-based journal (including DayOne) * Add test to ensure this doesn't mess with encrypting normal journals * Consolidate and standardized tests --- jrnl/DayOneJournal.py | 1 + jrnl/FolderJournal.py | 1 + jrnl/commands.py | 8 ++++++++ jrnl/exception.py | 7 +++++++ tests/bdd/features/encrypt.feature | 19 +++++++++++++++++-- 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 01b934e5..1e484365 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -32,6 +32,7 @@ class DayOne(Journal.Journal): def __init__(self, **kwargs): self.entries = [] self._deleted_entries = [] + self.can_be_encrypted = False super().__init__(**kwargs) def open(self): diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index 954a9436..0c67a141 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -25,6 +25,7 @@ class Folder(Journal.Journal): def __init__(self, **kwargs): self.entries = [] self._diff_entry_dates = [] + self.can_be_encrypted = False super(Folder, self).__init__(**kwargs) def open(self): diff --git a/jrnl/commands.py b/jrnl/commands.py index 07ca0767..d765242a 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -13,6 +13,7 @@ avoid any possible overhead for these standalone commands. """ import platform import sys +from .exception import JrnlError def preconfig_diagnostic(_): @@ -68,6 +69,13 @@ def postconfig_encrypt(args, config, original_config, **kwargs): # Open the journal journal = open_journal(args.journal_name, config) + if hasattr(journal, "can_be_encrypted") and not journal.can_be_encrypted: + raise JrnlError( + "CannotEncryptJournalType", + journal_name=args.journal_name, + journal_type=journal.__class__.__name__, + ) + journal.config["encrypt"] = True new_journal = EncryptedJournal.from_journal(journal) diff --git a/jrnl/exception.py b/jrnl/exception.py index 07bf9023..0bafbdeb 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -38,6 +38,13 @@ class JrnlError(Exception): by at least {columns} in the configuration file or by using --config-override at the command line """, + "CannotEncryptJournalType": """ + The journal {journal_name} can't be encrypted because it is a + {journal_type} journal. + + To encrypt it, create a new journal referencing a file, export + this journal to the new journal, then encrypt the new journal. + """, } msg = error_messages[self.error_type].format(**kwargs) diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index 31d53520..02bff32f 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -28,15 +28,30 @@ Feature: Encrypting and decrypting journals # This should warn the user that the journal is already encrypted - Scenario: Encrypting a journal + Scenario Outline: Encrypting a journal Given we use the config "simple.yaml" When we run "jrnl --encrypt" and enter swordfish swordfish n - Then we should see the message "Journal encrypted" + Then we should get no error + And we should see the message "Journal encrypted" And the config for journal "default" should contain "encrypt: true" When we run "jrnl -n 1" and enter "swordfish" Then we should be prompted for a password And the output should contain "2013-06-10 15:40 Life is good" + Examples: configs + | config_file | + | basic_onefile.yaml | + + + Scenario Outline: Attempt to encrypt a folder or DayOne journal should result in an error + Given we use the config "" + When we run "jrnl --encrypt" + Then the error output should contain "can't be encrypted" + + Examples: configs + | config_file | + | basic_folder.yaml | + | basic_dayone.yaml | From bacbf8109bc4b968fbd9010953fe7592d33d259a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 Aug 2021 20:48:08 +0000 Subject: [PATCH 0483/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29898eca..8ece5f28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Output after composition can be more useful and user friendly [\#1253](https://github.com/jrnl-org/jrnl/issues/1253) +**Fixed bugs:** + +- Uncaught exception when encrypting folder journal [\#1243](https://github.com/jrnl-org/jrnl/issues/1243) + **Build:** - Windows CI behaving unreliable due to mismatch between Powershell & bash retrieving environment variables [\#1323](https://github.com/jrnl-org/jrnl/issues/1323) From 08350b884b86201e4cc1889987019199acaa1e40 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 21 Aug 2021 14:00:31 -0700 Subject: [PATCH 0484/1132] take out redundant lines from PR template (#1327) --- .github/PULL_REQUEST_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1d3f0f07..695290e8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,11 +14,9 @@ Here are some key points to include in your description: - [ ] I have read the [contributing doc](https://github.com/jrnl-org/jrnl/blob/develop/CONTRIBUTING.md). - [ ] I have included a link to the relevant issue number. -- [ ] I have tested this code locally. - [ ] I have checked to ensure there aren't other open [pull requests](../pulls) for the same issue. - [ ] I have written new tests for these changes, as needed. -- [ ] All tests pass. +# Journal Types +`jrnl` can store your journal in a few different ways: + + - a single text file (encrypted or otherwise) + - a folder structure organized by date containing unencrypted text files + - the DayOne Classic format + +There is no need to specify what type of journal you'd like to use. Instead, +`jrnl` will automatically detect the journal type based on whether you're +referencing a file or a folder in your [config file](advanced.md), +and if it's a folder, whether or not DayOne Classic content exists in it. + +## Single File +The single file format is the most flexible, as it can be [encrypted](encryption.md). +To use it, enter any path that is a file or does not already exist. You can +use any extension. `jrnl` will automatically create the file when you save +your first entry. + +## Folder +The folder journal format organizes your entries into subfolders for the year +and month and `.txt` files for each day. If there are multiple entries in a day, +they all appear in the same `.txt` file. + +The directory tree structure is in this format: `YYYY/MM/DD.txt`. For instance, if +you have an entry on May 5th, 2021 in a folder journal at `~/folderjournal`, it will +be located in: `~/folderjournal/2021/05/05.txt` + +!!! note +When creating a new folder journal, you will need to create the folder before running +`jrnl`. Otherwise, when you run `jrnl` for the first time, it will assume that you +are creating a single file journal instead, and it will create a file at that path. + +!!! note +Folder journals can't be encrypted. + +## Day One Classic +`jrnl` supports the original data format used by DayOne. It's similar to the folder +journal format, except it's identified by either of these characteristics: + +* the folder has a `.dayone` extension +* the folder has a subfolder named `entries` + +This is not to be confused with the DayOne 2.0 format, [which is very different](https://help.dayoneapp.com/en/articles/1187337-day-one-classic-is-retired). + +!!! note +DayOne Classic journals can't be encrypted. + +## Changing your journal type +You can't simply modify a journal's configuration to change its type. Instead, +define a new journal as the type you'd like, and use +[piping](https://en.wikipedia.org/wiki/Redirection_(computing)#Piping) +to export your old journal as `txt` to an import command on your new journal. + +For instance, if you have a `projects` journal you would like to import into +a `new` journal, you would run the following after setting up the configuration +for your `new` journal: +``` +jrnl projects --format txt | jrnl new --import +``` diff --git a/mkdocs.yml b/mkdocs.yml index 65a515da..348f0a83 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -21,6 +21,7 @@ nav: - Quickstart: installation.md - Basic Usage: usage.md - Encryption: encryption.md + - Journal Types: journal-types.md - Privacy and Security: privacy-and-security.md - Formats: formats.md - Advanced Usage: advanced.md From 9f16cc42f5a833da0035b08c0bbe1fedc3ca1271 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 18 Sep 2021 23:28:00 +0000 Subject: [PATCH 0508/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7c50316..9dca20c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ **Documentation:** +- Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326) - Fix readme splash and add changelog link to readme [\#1339](https://github.com/jrnl-org/jrnl/pull/1339) ([micahellison](https://github.com/micahellison)) +- Document journal types [\#1331](https://github.com/jrnl-org/jrnl/pull/1331) ([micahellison](https://github.com/micahellison)) **Packaging:** From 4c0fb344d1d5f7aac5095eddf619e35649b12fa1 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 25 Sep 2021 11:11:28 -0700 Subject: [PATCH 0509/1132] Add CACHE_STRING secret to bust GitHub Actions python cache (#1344) * Add CACHE_STRING secret to allow maintainers to bust cache without a commit * Quick change Co-authored-by: Jonathan Wren --- .github/workflows/testing.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 2976399f..c6cf4c73 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -45,11 +45,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: poetry cache + - name: poetry cache # Change CACHE_STRING secret to bust the cache. Useful with minor Python version changes. uses: actions/cache@v2 with: path: .venv - key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-v2 + key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-${{ secrets.CACHE_STRING }} - name: Install dependencies if: ${{ matrix.python-version != '3.10-dev' }} From 60c9ed124dd1f894731518c641f4e744d159e0cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Oct 2021 12:23:17 -0700 Subject: [PATCH 0510/1132] Bump cryptography from 3.4.8 to 35.0.0 (#1345) Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.8 to 35.0.0. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.4.8...35.0.0) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 57 +++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/poetry.lock b/poetry.lock index d55ab429..cc5e4e26 100644 --- a/poetry.lock +++ b/poetry.lock @@ -158,7 +158,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "3.4.8" +version = "35.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -171,9 +171,9 @@ cffi = ">=1.12" docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] -sdist = ["setuptools-rust (>=0.11.4)"] +sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["pytest (>=6.2.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "decorator" @@ -209,7 +209,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["twine", "markdown", "flake8"] +dev = ["twine", "markdown", "flake8", "wheel"] [[package]] name = "glob2" @@ -842,14 +842,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "typing-extensions" -version = "3.10.0.0" -description = "Backported and Experimental Type Hints for Python 3.5+" -category = "main" -optional = false -python-versions = "*" - [[package]] name = "typing-extensions" version = "3.10.0.2" @@ -1029,23 +1021,26 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-3.4.8-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a00cf305f07b26c351d8d4e1af84ad7501eca8a342dedf24a7acb0e7b7406e14"}, - {file = "cryptography-3.4.8-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:f44d141b8c4ea5eb4dbc9b3ad992d45580c1d22bf5e24363f2fbf50c2d7ae8a7"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0a7dcbcd3f1913f664aca35d47c1331fce738d44ec34b7be8b9d332151b0b01e"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34dae04a0dce5730d8eb7894eab617d8a70d0c97da76b905de9efb7128ad7085"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1eb7bb0df6f6f583dd8e054689def236255161ebbcf62b226454ab9ec663746b"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:9965c46c674ba8cc572bc09a03f4c649292ee73e1b683adb1ce81e82e9a6a0fb"}, - {file = "cryptography-3.4.8-cp36-abi3-win32.whl", hash = "sha256:21ca464b3a4b8d8e86ba0ee5045e103a1fcfac3b39319727bc0fc58c09c6aff7"}, - {file = "cryptography-3.4.8-cp36-abi3-win_amd64.whl", hash = "sha256:3520667fda779eb788ea00080124875be18f2d8f0848ec00733c0ec3bb8219fc"}, - {file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d2a6e5ef66503da51d2110edf6c403dc6b494cc0082f85db12f54e9c5d4c3ec5"}, - {file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a305600e7a6b7b855cd798e00278161b681ad6e9b7eca94c721d5f588ab212af"}, - {file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:3fa3a7ccf96e826affdf1a0a9432be74dc73423125c8f96a909e3835a5ef194a"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:d9ec0e67a14f9d1d48dd87a2531009a9b251c02ea42851c060b25c782516ff06"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5b0fbfae7ff7febdb74b574055c7466da334a5371f253732d7e2e7525d570498"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94fff993ee9bc1b2440d3b7243d488c6a3d9724cc2b09cdb297f6a886d040ef7"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8695456444f277af73a4877db9fc979849cd3ee74c198d04fc0776ebc3db52b9"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:cd65b60cfe004790c795cc35f272e41a3df4631e2fb6b35aa7ac6ef2859d554e"}, - {file = "cryptography-3.4.8.tar.gz", hash = "sha256:94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c"}, + {file = "cryptography-35.0.0-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:d57e0cdc1b44b6cdf8af1d01807db06886f10177469312fbde8f44ccbb284bc9"}, + {file = "cryptography-35.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:ced40344e811d6abba00295ced98c01aecf0c2de39481792d87af4fa58b7b4d6"}, + {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:54b2605e5475944e2213258e0ab8696f4f357a31371e538ef21e8d61c843c28d"}, + {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:7b7ceeff114c31f285528ba8b390d3e9cfa2da17b56f11d366769a807f17cbaa"}, + {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d69645f535f4b2c722cfb07a8eab916265545b3475fdb34e0be2f4ee8b0b15e"}, + {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a2d0e0acc20ede0f06ef7aa58546eee96d2592c00f450c9acb89c5879b61992"}, + {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:07bb7fbfb5de0980590ddfc7f13081520def06dc9ed214000ad4372fb4e3c7f6"}, + {file = "cryptography-35.0.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7eba2cebca600a7806b893cb1d541a6e910afa87e97acf2021a22b32da1df52d"}, + {file = "cryptography-35.0.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:18d90f4711bf63e2fb21e8c8e51ed8189438e6b35a6d996201ebd98a26abbbe6"}, + {file = "cryptography-35.0.0-cp36-abi3-win32.whl", hash = "sha256:c10c797ac89c746e488d2ee92bd4abd593615694ee17b2500578b63cad6b93a8"}, + {file = "cryptography-35.0.0-cp36-abi3-win_amd64.whl", hash = "sha256:7075b304cd567694dc692ffc9747f3e9cb393cc4aa4fb7b9f3abd6f5c4e43588"}, + {file = "cryptography-35.0.0-pp36-pypy36_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a688ebcd08250eab5bb5bca318cc05a8c66de5e4171a65ca51db6bd753ff8953"}, + {file = "cryptography-35.0.0-pp36-pypy36_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d99915d6ab265c22873f1b4d6ea5ef462ef797b4140be4c9d8b179915e0985c6"}, + {file = "cryptography-35.0.0-pp36-pypy36_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:928185a6d1ccdb816e883f56ebe92e975a262d31cc536429041921f8cb5a62fd"}, + {file = "cryptography-35.0.0-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:ebeddd119f526bcf323a89f853afb12e225902a24d29b55fe18dd6fcb2838a76"}, + {file = "cryptography-35.0.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:22a38e96118a4ce3b97509443feace1d1011d0571fae81fc3ad35f25ba3ea999"}, + {file = "cryptography-35.0.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb80e8a1f91e4b7ef8b33041591e6d89b2b8e122d787e87eeb2b08da71bb16ad"}, + {file = "cryptography-35.0.0-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:abb5a361d2585bb95012a19ed9b2c8f412c5d723a9836418fab7aaa0243e67d2"}, + {file = "cryptography-35.0.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:1ed82abf16df40a60942a8c211251ae72858b25b7421ce2497c2eb7a1cee817c"}, + {file = "cryptography-35.0.0.tar.gz", hash = "sha256:9933f28f70d0517686bd7de36166dda42094eac49415459d9bdf5e7df3e0086d"}, ] decorator = [ {file = "decorator-5.0.9-py3-none-any.whl", hash = "sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323"}, @@ -1057,6 +1052,7 @@ flake8 = [ ] ghp-import = [ {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, + {file = "ghp_import-2.0.1-py3-none-any.whl", hash = "sha256:8241a8e9f8dd3c1fafe9696e6e081b57a208ef907e9939c44e7415e407ab40ea"}, ] glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, @@ -1441,9 +1437,6 @@ typed-ast = [ {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ] typing-extensions = [ - {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, - {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, - {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"}, {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, {file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"}, {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, From 593245f3fda2d4ae38ef4e7714013edaa32eb120 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 2 Oct 2021 19:24:53 +0000 Subject: [PATCH 0511/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dca20c8..df5e5d90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ **Packaging:** +- Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.8b0 to 21.9b0 [\#1343](https://github.com/jrnl-org/jrnl/pull/1343) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.1.0 to 23.2.1 [\#1342](https://github.com/jrnl-org/jrnl/pull/1342) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.4 to 6.2.5 [\#1334](https://github.com/jrnl-org/jrnl/pull/1334) ([dependabot[bot]](https://github.com/apps/dependabot)) From 7d8823da6df9f89bebd232babb2ef157f86c35cb Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 2 Oct 2021 13:31:21 -0700 Subject: [PATCH 0512/1132] Move remaining tests from behave to pytest (#1346) * add newer tests to pytest (from behave) * remove 'lib' from gitignore (since we're using it) * fix capitalization in some steps * add 'the editor should not have been called' step * comment out config override step in pytest-bdd since it's not implemented yet * remove test that didn't really test anything * implement some missing steps in pytest-bdd * change comment to match other tests --- .gitignore | 1 - tests/bdd/features/format.feature | 44 ++++++++++++++ tests/bdd/features/override.feature | 91 +++++++++++++++++++++++++++++ tests/bdd/test_features.py | 1 + tests/lib/then_steps.py | 35 +++++++++-- 5 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 tests/bdd/features/override.feature diff --git a/.gitignore b/.gitignore index 374deb4b..41d2df7b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ var sdist develop-eggs .installed.cfg -lib lib64 .python-version diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index b9e2e384..36a89747 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -1,5 +1,33 @@ Feature: Custom formats + Scenario Outline: Short printing via --format flag + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --format short -3" + Then we should get no error + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + + Scenario Outline: Pretty Printing aka the Default + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --format pretty -3" + Then we should get no error + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + Scenario Outline: JSON format Given we use the config "" And we use the password "test" if prompted @@ -296,6 +324,22 @@ Feature: Custom formats | basic_folder.yaml | | basic_dayone.yaml | + + Scenario Outline: Export fancy with small linewrap + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --config-override linewrap 35 --format fancy -3" + Then we should get no error + And the output should be 35 columns wide + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + @todo Scenario Outline: Exporting fancy # Needs better emoji support diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature new file mode 100644 index 00000000..3d9fb27f --- /dev/null +++ b/tests/bdd/features/override.feature @@ -0,0 +1,91 @@ +Feature: Implementing Runtime Overrides for Select Configuration Keys + + Scenario: Override configured editor with built-in input === editor:'' + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override editor ''" + Then the stdin prompt should have been called + And the editor should not have been called + + + # @todo implement this step in pytest (doesn't currently support overrides) + @skip + Scenario: Postconfig commands with overrides + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl --decrypt --config-override highlight false --config-override editor nano" + Then the config should contain "highlight: false" + Then the editor should not have been called + + + Scenario: Override configured linewrap with a value of 23 + Given we use the config "simple.yaml" + And we use the password "test" if prompted + When we run "jrnl -2 --config-override linewrap 23 --format fancy" + Then the output should be + ┎─────╮2013-06-09 15:39 + ┃ My ╘═══════════════╕ + ┃ fir st ent ry. │ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ Everything is │ + ┃ alright │ + ┖─────────────────────┘ + ┎─────╮2013-06-10 15:40 + ┃ Lif ╘═══════════════╕ + ┃ e is goo d. │ + ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ + ┃ But I'm better. │ + ┖─────────────────────┘ + + + # @todo implement this step in pytest (doesn't currently support overrides) + @skip + Scenario: Override color selections with runtime overrides + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl -1 --config-override colors.body blue" + Then the config should have "colors.body" set to "blue" + + + # @todo implement this step in pytest (doesn't currently support overrides) + @skip + Scenario: Apply multiple config overrides + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl -1 --config-override colors.body green --config-override editor 'nano'" + Then the config should have "colors.body" set to "green" + And the config should have "editor" set to "nano" + + + Scenario: Override default journal + Given we use the config "basic_dayone.yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override journals.default features/journals/simple.journal 20 Mar 2000: The rain in Spain comes from clouds" + Then we should get no error + And we should see the message "Entry added" + When we run "jrnl -3 --config-override journals.default features/journals/simple.journal" + Then the output should be + 2000-03-20 09:00 The rain in Spain comes from clouds + + 2013-06-09 15:39 My first entry. + | Everything is alright + + 2013-06-10 15:40 Life is good. + | But I'm better. + + + Scenario: Make an entry into an overridden journal + Given we use the config "basic_dayone.yaml" + And we use the password "test" if prompted + When we run "jrnl --config-override journals.temp features/journals/simple.journal temp Sep 06 1969: @say Ni" + Then we should get no error + And we should see the message "Entry added" + When we run "jrnl --config-override journals.temp features/journals/simple.journal temp -3" + Then the output should be + 1969-09-06 09:00 @say Ni + + 2013-06-09 15:39 My first entry. + | Everything is alright + + 2013-06-10 15:40 Life is good. + | But I'm better. diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py index b824df39..1509e92d 100644 --- a/tests/bdd/test_features.py +++ b/tests/bdd/test_features.py @@ -9,6 +9,7 @@ scenarios("features/file_storage.feature") scenarios("features/format.feature") scenarios("features/import.feature") scenarios("features/multiple_journals.feature") +scenarios("features/override.feature") scenarios("features/password.feature") scenarios("features/search.feature") scenarios("features/star.feature") diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index b56c203f..2dadf82e 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -84,6 +84,14 @@ def output_should_contain_version(cli_run, toml_version): assert toml_version in out, toml_version +@then(parse("the output should be {width:d} columns wide")) +def output_should_be_columns_wide(cli_run, width): + out = cli_run["stdout"] + out_lines = out.splitlines() + for line in out_lines: + assert len(line) <= width + + @then(parse('we should see the message "{text}"')) def should_see_the_message(text, cli_run): out = cli_run["stderr"] @@ -301,15 +309,34 @@ def count_elements(number, item, cli_run): assert len(xml_tree.findall(".//" + item)) == number -@then(parse("the editor should have been called")) -@then(parse("the editor should have been called with {num_args} arguments")) -def count_editor_args(num_args, cli_run, editor_state): - assert cli_run["mocks"]["editor"].called +@then(parse("the editor {should_or_should_not} have been called")) +@then( + parse( + "the editor {should_or_should_not} have been called with {num_args} arguments" + ) +) +def count_editor_args(num_args, cli_run, editor_state, should_or_should_not): + we_should = parse_should_or_should_not(should_or_should_not) + + if we_should: + assert cli_run["mocks"]["editor"].called + else: + assert not cli_run["mocks"]["editor"].called if isinstance(num_args, int): assert len(editor_state["command"]) == int(num_args) +@then(parse("the stdin prompt {should_or_should_not} have been called")) +def stdin_prompt_called(cli_run, should_or_should_not): + we_should = parse_should_or_should_not(should_or_should_not) + + if we_should: + assert cli_run["mocks"]["stdin"].called + else: + assert not cli_run["mocks"]["stdin"].called + + @then(parse('the editor filename should end with "{suffix}"')) def editor_filename_suffix(suffix, editor_state): editor_filename = editor_state["tmpfile"]["name"] From 1196b05ff63a155858d8018cc06c6300c874f236 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Oct 2021 11:43:43 -0700 Subject: [PATCH 0513/1132] Bump pytz from 2021.1 to 2021.3 (#1348) Bumps [pytz](https://github.com/stub42/pytz) from 2021.1 to 2021.3. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2021.1...release_2021.3) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index cc5e4e26..e718ea5a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -710,7 +710,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2021.1" +version = "2021.3" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -1271,8 +1271,8 @@ python-dateutil = [ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ - {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, - {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, + {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, + {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, From a98f3f78afc1e51fff92c3c25d3b033e4bd1f8b6 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Oct 2021 18:45:22 +0000 Subject: [PATCH 0514/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index df5e5d90..c47711d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ **Packaging:** +- Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.8b0 to 21.9b0 [\#1343](https://github.com/jrnl-org/jrnl/pull/1343) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.1.0 to 23.2.1 [\#1342](https://github.com/jrnl-org/jrnl/pull/1342) ([dependabot[bot]](https://github.com/apps/dependabot)) From 44edb9bdee0f0bcd7f8000039c3eeeb3850e9718 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 9 Oct 2021 12:10:08 -0700 Subject: [PATCH 0515/1132] Add more steps to `pytest`, fully remove `behave` (#1347) * update yaml loader to new method * Add config overrides steps to pytest This requires some patching around the config object, which now happens in every test. Co-authored-by: Micah Jerome Ellison * udpate docs for new tests * remove behave from deps * remove feature dir from flake8 checks * udpate lock file * disable pip version check (it keeps spamming the pipeline) Co-authored-by: Micah Jerome Ellison --- .github/workflows/testing.yaml | 10 +- CONTRIBUTING.md | 4 +- Makefile | 2 +- features/build.feature | 8 - features/core.feature | 21 - features/data/configs/basic_dayone.yaml | 17 - features/data/configs/basic_encrypted.yaml | 17 - features/data/configs/basic_folder.yaml | 17 - features/data/configs/basic_onefile.yaml | 17 - features/data/configs/brackets.yaml | 12 - features/data/configs/bug153.yaml | 17 - features/data/configs/bug343.yaml | 13 - features/data/configs/bug780.yaml | 12 - features/data/configs/dayone.yaml | 12 - features/data/configs/dayone_empty.yaml | 17 - features/data/configs/deletion.yaml | 12 - features/data/configs/deletion_filters.yaml | 12 - features/data/configs/editor-args.yaml | 12 - features/data/configs/editor.yaml | 12 - .../data/configs/editor_empty_folder.yaml | 12 - features/data/configs/editor_encrypted.yaml | 17 - .../configs/editor_markdown_extension.yaml | 18 - features/data/configs/empty_folder.yaml | 12 - features/data/configs/encrypted.yaml | 12 - features/data/configs/encrypted_old.json | 13 - features/data/configs/encrypted_old.yaml | 11 - features/data/configs/format_md.yaml | 19 - features/data/configs/format_text.yaml | 19 - features/data/configs/invalid_color.yaml | 17 - .../data/configs/little_endian_dates.yaml | 12 - .../data/configs/markdown-headings-335.yaml | 17 - features/data/configs/missing_directory.yaml | 17 - features/data/configs/missing_journal.yaml | 17 - .../data/configs/mostlyreadabledates.yaml | 12 - features/data/configs/multiline-tags.yaml | 17 - features/data/configs/multiline.yaml | 17 - features/data/configs/multiple.yaml | 18 - features/data/configs/no_colors.yaml | 12 - features/data/configs/simple.yaml | 17 - features/data/configs/tags-216.yaml | 17 - features/data/configs/tags-237.yaml | 17 - features/data/configs/tags.yaml | 17 - features/data/configs/unreadabledates.yaml | 17 - features/data/configs/upgrade_from_195.json | 11 - .../upgrade_from_195_little_endian_dates.json | 11 - ...om_195_with_missing_encrypted_journal.json | 11 - ...upgrade_from_195_with_missing_journal.json | 11 - .../D04D335AFED711EABA18FAFFC2100C3D.doentry | 53 -- .../FC8A86CAFED711EA8892FAFFC2100C3D.doentry | 55 -- .../FD8ABC8EFED711EABC35FAFFC2100C3D.doentry | 44 -- .../data/journals/basic_encrypted.journal | 1 - .../data/journals/basic_folder/2020/08/29.txt | 19 - .../data/journals/basic_folder/2020/08/31.txt | 23 - .../data/journals/basic_folder/2020/09/24.txt | 11 - features/data/journals/basic_onefile.journal | 58 -- features/data/journals/brackets.journal | 2 - .../B40EE704E15846DE8D45C44118A4D511.doentry | 56 -- .../B40EE704E15846DE8D45C44118A4D512.doentry | 52 -- .../48A25033B34047C591160A4480197D8B.doentry | 33 - .../044F3747A38546168B572C2E3F217FA2.doentry | 34 - .../0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry | 46 -- .../422BC895507944A291E6FC44FC6B8BFC.doentry | 31 - .../4BB1F46946AD439996C9B59DE7C4DDC1.doentry | 29 - .../dayone_empty.dayone/entries/empty.txt | 1 - features/data/journals/deletion.journal | 5 - .../data/journals/deletion_filters.journal | 14 - features/data/journals/empty_folder/empty | 1 - features/data/journals/encrypted.journal | 1 - .../journals/encrypted_jrnl-1-9-5.journal | Bin 128 -> 0 bytes .../data/journals/little_endian_dates.journal | 5 - .../journals/markdown-headings-335.journal | 42 -- .../data/journals/mostlyreadabledates.journal | 8 - features/data/journals/multiline-tags.journal | 7 - features/data/journals/multiline.journal | 5 - features/data/journals/simple.journal | 5 - .../data/journals/simple_jrnl-1-9-5.journal | 13 - ...ple_jrnl-1-9-5_little_endian_dates.journal | 13 - features/data/journals/tags-216.journal | 2 - features/data/journals/tags-237.journal | 3 - features/data/journals/tags.journal | 8 - .../data/journals/unreadabledates.journal | 5 - features/data/journals/work.journal | 0 features/data/templates/extension.md | 0 features/data/templates/sample.template | 19 - features/datetime.feature | 155 ---- features/delete.feature | 229 ------ features/encrypt.feature | 35 - features/environment.py | 86 --- features/file_storage.feature | 56 -- features/format.feature | 621 ---------------- features/import.feature | 93 --- features/multiple_journals.feature | 65 -- features/overrides.feature | 98 --- features/password.feature | 116 --- features/search.feature | 318 -------- features/star.feature | 35 - features/steps/core.py | 687 ------------------ features/steps/export_steps.py | 200 ----- features/steps/override.py | 77 -- features/tag.feature | 53 -- features/upgrade.feature | 71 -- features/write.feature | 216 ------ jrnl/jrnl.py | 4 +- jrnl/override.py | 7 +- poetry.lock | 318 +++----- pyproject.toml | 4 +- tests/bdd/features/override.feature | 19 +- tests/lib/fixtures.py | 7 +- tests/lib/helpers.py | 11 + tests/lib/then_steps.py | 54 +- tests/lib/when_steps.py | 13 + tests/unit/test_override.py | 64 +- 112 files changed, 264 insertions(+), 4814 deletions(-) delete mode 100644 features/build.feature delete mode 100644 features/core.feature delete mode 100644 features/data/configs/basic_dayone.yaml delete mode 100644 features/data/configs/basic_encrypted.yaml delete mode 100644 features/data/configs/basic_folder.yaml delete mode 100644 features/data/configs/basic_onefile.yaml delete mode 100644 features/data/configs/brackets.yaml delete mode 100644 features/data/configs/bug153.yaml delete mode 100644 features/data/configs/bug343.yaml delete mode 100644 features/data/configs/bug780.yaml delete mode 100644 features/data/configs/dayone.yaml delete mode 100644 features/data/configs/dayone_empty.yaml delete mode 100644 features/data/configs/deletion.yaml delete mode 100644 features/data/configs/deletion_filters.yaml delete mode 100644 features/data/configs/editor-args.yaml delete mode 100644 features/data/configs/editor.yaml delete mode 100644 features/data/configs/editor_empty_folder.yaml delete mode 100644 features/data/configs/editor_encrypted.yaml delete mode 100644 features/data/configs/editor_markdown_extension.yaml delete mode 100644 features/data/configs/empty_folder.yaml delete mode 100644 features/data/configs/encrypted.yaml delete mode 100644 features/data/configs/encrypted_old.json delete mode 100644 features/data/configs/encrypted_old.yaml delete mode 100644 features/data/configs/format_md.yaml delete mode 100644 features/data/configs/format_text.yaml delete mode 100644 features/data/configs/invalid_color.yaml delete mode 100644 features/data/configs/little_endian_dates.yaml delete mode 100644 features/data/configs/markdown-headings-335.yaml delete mode 100644 features/data/configs/missing_directory.yaml delete mode 100644 features/data/configs/missing_journal.yaml delete mode 100644 features/data/configs/mostlyreadabledates.yaml delete mode 100644 features/data/configs/multiline-tags.yaml delete mode 100644 features/data/configs/multiline.yaml delete mode 100644 features/data/configs/multiple.yaml delete mode 100644 features/data/configs/no_colors.yaml delete mode 100644 features/data/configs/simple.yaml delete mode 100644 features/data/configs/tags-216.yaml delete mode 100644 features/data/configs/tags-237.yaml delete mode 100644 features/data/configs/tags.yaml delete mode 100644 features/data/configs/unreadabledates.yaml delete mode 100644 features/data/configs/upgrade_from_195.json delete mode 100644 features/data/configs/upgrade_from_195_little_endian_dates.json delete mode 100644 features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json delete mode 100644 features/data/configs/upgrade_from_195_with_missing_journal.json delete mode 100644 features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry delete mode 100644 features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry delete mode 100644 features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry delete mode 100644 features/data/journals/basic_encrypted.journal delete mode 100644 features/data/journals/basic_folder/2020/08/29.txt delete mode 100644 features/data/journals/basic_folder/2020/08/31.txt delete mode 100644 features/data/journals/basic_folder/2020/09/24.txt delete mode 100644 features/data/journals/basic_onefile.journal delete mode 100644 features/data/journals/brackets.journal delete mode 100644 features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry delete mode 100644 features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry delete mode 100644 features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry delete mode 100644 features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry delete mode 100644 features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry delete mode 100644 features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry delete mode 100644 features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry delete mode 100644 features/data/journals/dayone_empty.dayone/entries/empty.txt delete mode 100644 features/data/journals/deletion.journal delete mode 100644 features/data/journals/deletion_filters.journal delete mode 100644 features/data/journals/empty_folder/empty delete mode 100644 features/data/journals/encrypted.journal delete mode 100644 features/data/journals/encrypted_jrnl-1-9-5.journal delete mode 100644 features/data/journals/little_endian_dates.journal delete mode 100644 features/data/journals/markdown-headings-335.journal delete mode 100644 features/data/journals/mostlyreadabledates.journal delete mode 100644 features/data/journals/multiline-tags.journal delete mode 100644 features/data/journals/multiline.journal delete mode 100644 features/data/journals/simple.journal delete mode 100644 features/data/journals/simple_jrnl-1-9-5.journal delete mode 100644 features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal delete mode 100644 features/data/journals/tags-216.journal delete mode 100644 features/data/journals/tags-237.journal delete mode 100644 features/data/journals/tags.journal delete mode 100644 features/data/journals/unreadabledates.journal delete mode 100644 features/data/journals/work.journal delete mode 100644 features/data/templates/extension.md delete mode 100644 features/data/templates/sample.template delete mode 100644 features/datetime.feature delete mode 100644 features/delete.feature delete mode 100644 features/encrypt.feature delete mode 100644 features/environment.py delete mode 100644 features/file_storage.feature delete mode 100644 features/format.feature delete mode 100644 features/import.feature delete mode 100644 features/multiple_journals.feature delete mode 100644 features/overrides.feature delete mode 100644 features/password.feature delete mode 100644 features/search.feature delete mode 100644 features/star.feature delete mode 100644 features/steps/core.py delete mode 100644 features/steps/export_steps.py delete mode 100644 features/steps/override.py delete mode 100644 features/tag.feature delete mode 100644 features/upgrade.feature delete mode 100644 features/write.feature diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index c6cf4c73..ba999fbe 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -55,7 +55,7 @@ jobs: if: ${{ matrix.python-version != '3.10-dev' }} run: | echo '::group::poetry' - pip install poetry + pip --disable-pip-version-check install poetry poetry config --local virtualenvs.in-project true echo '::endgroup::' @@ -70,7 +70,7 @@ jobs: if: ${{ matrix.python-version == '3.10-dev' }} run: | echo '::group::poetry' - pip install poetry==1.2.0a2 + pip --disable-pip-version-check install poetry==1.2.0a2 poetry config --local virtualenvs.in-project true echo '::endgroup::' @@ -90,12 +90,8 @@ jobs: if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }} run: | poetry run pflake8 --version - poetry run pflake8 jrnl features tests + poetry run pflake8 jrnl tests - name: Test with pytest if: ${{ env.DEPS_INSTALLED == 'true' }} run: poetry run pytest --junitxml=reports/pytest/results.xml - - - name: Test with behave - if: ${{ env.DEPS_INSTALLED == 'true' }} - run: poetry run behave --no-skipped --format progress2 --junit --junit-directory reports/behave diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f5e691a..cf9c4f36 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,9 +96,9 @@ A typical development workflow includes: When resolving bugs or adding new functionality, please add tests to prevent that functionality from breaking in the future. If you notice any functionality that isn't covered in the tests, feel free to submit a test-only pull request as well. -For integration testing, jrnl uses [behave](https://behave.readthedocs.io/) tests, which are all in the `features` folder. +For testing, jrnl uses [pytest](https://docs.pytest.org) for unit tests, and [pytest-bdd](https://pytest-bdd.readthedocs.io/) for integration testing. All tests are in the `tests` folder. -Many tests can be created by only editing `feature` files with the same format as other tests. For more complicated functionality, you may need to implement steps in `features/steps` which are then executed by your tests in the `feature` files. +Many tests can be created by only editing `*.feature` files with the same format as other tests. For more complicated functionality, you may need to implement steps in `tests/lib/` which are then executed by your tests in the `feature` files. Starting in 2020, jrnl is also using [pytest](https://docs.pytest.org/) for unit tests. These tests are in the `tests` folder. diff --git a/Makefile b/Makefile index b2e27f32..a9833c3e 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ bdd: # bdd tests bdd-debug: # bdd tests poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native -x -vv -test: lint unit bdd ## Run unit tests and behave tests +test: lint unit bdd build: poetry build diff --git a/features/build.feature b/features/build.feature deleted file mode 100644 index 4725ea85..00000000 --- a/features/build.feature +++ /dev/null @@ -1,8 +0,0 @@ -Feature: Build process - - @deployment_tests - Scenario: Version numbers should stay in sync - Given we use the config "simple.yaml" - When we run "jrnl --version" - Then we should get no error - And the output should contain pyproject.toml version diff --git a/features/core.feature b/features/core.feature deleted file mode 100644 index 26640c00..00000000 --- a/features/core.feature +++ /dev/null @@ -1,21 +0,0 @@ -Feature: Functionality of jrnl outside of actually handling journals - - Scenario: Displaying the version number - Given we use the config "simple.yaml" - When we run "jrnl --version" - Then we should get no error - Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" - - Scenario: Displaying the version number - Given we use the config "simple.yaml" - When we run "jrnl -v" - Then we should get no error - Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" - - Scenario: Running the diagnostic command - When we run "jrnl --diagnostic" - Then the output should contain "jrnl" - And the output should contain "Python" - - @todo - Scenario: Listing available journals diff --git a/features/data/configs/basic_dayone.yaml b/features/data/configs/basic_dayone.yaml deleted file mode 100644 index 0209f2f7..00000000 --- a/features/data/configs/basic_dayone.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: false -highlight: true -journals: - default: features/journals/basic_dayone.dayone -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/basic_encrypted.yaml b/features/data/configs/basic_encrypted.yaml deleted file mode 100644 index 77f4e48d..00000000 --- a/features/data/configs/basic_encrypted.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: true -highlight: true -journals: - default: features/journals/basic_encrypted.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/basic_folder.yaml b/features/data/configs/basic_folder.yaml deleted file mode 100644 index ba0de638..00000000 --- a/features/data/configs/basic_folder.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: false -highlight: true -journals: - default: features/journals/basic_folder -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/basic_onefile.yaml b/features/data/configs/basic_onefile.yaml deleted file mode 100644 index fb48c6f8..00000000 --- a/features/data/configs/basic_onefile.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - date: none - title: none - body: none - tags: none -default_hour: 9 -default_minute: 0 -editor: noop -encrypt: false -highlight: true -journals: - default: features/journals/basic_onefile.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/brackets.yaml b/features/data/configs/brackets.yaml deleted file mode 100644 index e658947c..00000000 --- a/features/data/configs/brackets.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/brackets.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/bug153.yaml b/features/data/configs/bug153.yaml deleted file mode 100644 index ff645ab6..00000000 --- a/features/data/configs/bug153.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -journals: - default: features/journals/bug153.dayone -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/bug343.yaml b/features/data/configs/bug343.yaml deleted file mode 100644 index a4e25d8a..00000000 --- a/features/data/configs/bug343.yaml +++ /dev/null @@ -1,13 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -template: false -encrypt: false -highlight: true -journals: - simple: features/journals/simple.journal - work: features/journals/work.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/bug780.yaml b/features/data/configs/bug780.yaml deleted file mode 100644 index e1d830c2..00000000 --- a/features/data/configs/bug780.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -journals: - default: features/journals/bug780.dayone -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/dayone.yaml b/features/data/configs/dayone.yaml deleted file mode 100644 index 894cb911..00000000 --- a/features/data/configs/dayone.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: noop -template: false -encrypt: false -highlight: true -journals: - default: features/journals/dayone.dayone -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/dayone_empty.yaml b/features/data/configs/dayone_empty.yaml deleted file mode 100644 index 7750d389..00000000 --- a/features/data/configs/dayone_empty.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: noop -template: false -encrypt: false -highlight: true -journals: - default: features/journals/dayone_empty.dayone -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/deletion.yaml b/features/data/configs/deletion.yaml deleted file mode 100644 index d4155260..00000000 --- a/features/data/configs/deletion.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/deletion.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/deletion_filters.yaml b/features/data/configs/deletion_filters.yaml deleted file mode 100644 index 73a88e4d..00000000 --- a/features/data/configs/deletion_filters.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/deletion_filters.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/editor-args.yaml b/features/data/configs/editor-args.yaml deleted file mode 100644 index 12c5bd9c..00000000 --- a/features/data/configs/editor-args.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: vim -f -c 'setf markdown' -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/editor.yaml b/features/data/configs/editor.yaml deleted file mode 100644 index 8a06f916..00000000 --- a/features/data/configs/editor.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "vim" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/editor_empty_folder.yaml b/features/data/configs/editor_empty_folder.yaml deleted file mode 100644 index 1724bbfb..00000000 --- a/features/data/configs/editor_empty_folder.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: 'vim' -template: false -encrypt: false -highlight: true -journals: - default: features/journals/empty_folder -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/editor_encrypted.yaml b/features/data/configs/editor_encrypted.yaml deleted file mode 100644 index 75273c96..00000000 --- a/features/data/configs/editor_encrypted.yaml +++ /dev/null @@ -1,17 +0,0 @@ -colors: - body: green - date: blue - tags: none - title: yellow -default_hour: 9 -default_minute: 0 -editor: "vim" -encrypt: true -template: false -highlight: true -journals: - default: features/journals/encrypted.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/editor_markdown_extension.yaml b/features/data/configs/editor_markdown_extension.yaml deleted file mode 100644 index bf3b8d8e..00000000 --- a/features/data/configs/editor_markdown_extension.yaml +++ /dev/null @@ -1,18 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -editor: "vim" -journals: - default: features/journals/editor_markdown_extension.journal -linewrap: 80 -tagsymbols: "@" -template: features/templates/extension.md -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/empty_folder.yaml b/features/data/configs/empty_folder.yaml deleted file mode 100644 index 52a21854..00000000 --- a/features/data/configs/empty_folder.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -template: false -encrypt: false -highlight: true -journals: - default: features/journals/empty_folder -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/encrypted.yaml b/features/data/configs/encrypted.yaml deleted file mode 100644 index 4d50b607..00000000 --- a/features/data/configs/encrypted.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: true -template: false -highlight: true -journals: - default: features/journals/encrypted.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/encrypted_old.json b/features/data/configs/encrypted_old.json deleted file mode 100644 index e69d9b79..00000000 --- a/features/data/configs/encrypted_old.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "default_hour": 9, - "default_minute": 0, - "editor": "", - "encrypt": true, - "highlight": true, - "journals": { - "default": "features/journals/encrypted_jrnl-1-9-5.journal" - }, - "linewrap": 80, - "tagsymbols": "@", - "timeformat": "%Y-%m-%d %H:%M" -} diff --git a/features/data/configs/encrypted_old.yaml b/features/data/configs/encrypted_old.yaml deleted file mode 100644 index bc7b1440..00000000 --- a/features/data/configs/encrypted_old.yaml +++ /dev/null @@ -1,11 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: true -highlight: true -journals: - default: features/journals/encrypted_jrnl1-9-5.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/format_md.yaml b/features/data/configs/format_md.yaml deleted file mode 100644 index 0b9f1c3b..00000000 --- a/features/data/configs/format_md.yaml +++ /dev/null @@ -1,19 +0,0 @@ -colors: - body: none - date: none - tags: none - title: none -default_hour: 9 -default_minute: 0 -display_format: markdown -editor: '' -encrypt: false -highlight: true -indent_character: '|' -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -version: v2.4.5 diff --git a/features/data/configs/format_text.yaml b/features/data/configs/format_text.yaml deleted file mode 100644 index c82ff7a7..00000000 --- a/features/data/configs/format_text.yaml +++ /dev/null @@ -1,19 +0,0 @@ -colors: - body: none - date: none - tags: none - title: none -default_hour: 9 -default_minute: 0 -display_format: text -editor: '' -encrypt: false -highlight: true -indent_character: '|' -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: '@' -template: false -timeformat: '%Y-%m-%d %H:%M' -version: v2.4.5 diff --git a/features/data/configs/invalid_color.yaml b/features/data/configs/invalid_color.yaml deleted file mode 100644 index 25c0e58d..00000000 --- a/features/data/configs/invalid_color.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: not-a-color - title: also-not-a-color - body: still-no-color - tags: me-too diff --git a/features/data/configs/little_endian_dates.yaml b/features/data/configs/little_endian_dates.yaml deleted file mode 100644 index 223c820d..00000000 --- a/features/data/configs/little_endian_dates.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/little_endian_dates.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%d.%m.%Y %H:%M" -indent_character: "|" diff --git a/features/data/configs/markdown-headings-335.yaml b/features/data/configs/markdown-headings-335.yaml deleted file mode 100644 index 4368f641..00000000 --- a/features/data/configs/markdown-headings-335.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/markdown-headings-335.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/missing_directory.yaml b/features/data/configs/missing_directory.yaml deleted file mode 100644 index d600404c..00000000 --- a/features/data/configs/missing_directory.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/missing_directory/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/missing_journal.yaml b/features/data/configs/missing_journal.yaml deleted file mode 100644 index a1f6f8cf..00000000 --- a/features/data/configs/missing_journal.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/missing.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/mostlyreadabledates.yaml b/features/data/configs/mostlyreadabledates.yaml deleted file mode 100644 index 5e3e1a15..00000000 --- a/features/data/configs/mostlyreadabledates.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/mostlyreadabledates.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/multiline-tags.yaml b/features/data/configs/multiline-tags.yaml deleted file mode 100644 index 033aaa27..00000000 --- a/features/data/configs/multiline-tags.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/multiline-tags.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/multiline.yaml b/features/data/configs/multiline.yaml deleted file mode 100644 index aa35b3f5..00000000 --- a/features/data/configs/multiline.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/multiline.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/multiple.yaml b/features/data/configs/multiple.yaml deleted file mode 100644 index 65f2c256..00000000 --- a/features/data/configs/multiple.yaml +++ /dev/null @@ -1,18 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/simple.journal - ideas: features/journals/nothing.journal - simple: features/journals/simple.journal - work: features/journals/work.journal - new_encrypted: - encrypt: true - journal: features/journals/new_encrypted.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/data/configs/no_colors.yaml b/features/data/configs/no_colors.yaml deleted file mode 100644 index 9111b561..00000000 --- a/features/data/configs/no_colors.yaml +++ /dev/null @@ -1,12 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" diff --git a/features/data/configs/simple.yaml b/features/data/configs/simple.yaml deleted file mode 100644 index 020bab18..00000000 --- a/features/data/configs/simple.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/simple.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/tags-216.yaml b/features/data/configs/tags-216.yaml deleted file mode 100644 index 81b3865f..00000000 --- a/features/data/configs/tags-216.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/tags-216.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/tags-237.yaml b/features/data/configs/tags-237.yaml deleted file mode 100644 index 5aecd61e..00000000 --- a/features/data/configs/tags-237.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/tags-237.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/tags.yaml b/features/data/configs/tags.yaml deleted file mode 100644 index 4b55952c..00000000 --- a/features/data/configs/tags.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - default: features/journals/tags.journal -linewrap: 80 -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/unreadabledates.yaml b/features/data/configs/unreadabledates.yaml deleted file mode 100644 index 99304e5a..00000000 --- a/features/data/configs/unreadabledates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: "" -encrypt: false -highlight: true -journals: - default: features/journals/unreadabledates.journal -linewrap: 80 -tagsymbols: "@" -template: false -timeformat: "%Y-%m-%d %H:%M" -indent_character: "|" -colors: - date: none - title: none - body: none - tags: none diff --git a/features/data/configs/upgrade_from_195.json b/features/data/configs/upgrade_from_195.json deleted file mode 100644 index ec380372..00000000 --- a/features/data/configs/upgrade_from_195.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%Y-%m-%d %H:%M", -"linewrap": 80, -"encrypt": false, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal"}, -"tagsymbols": "@" -} diff --git a/features/data/configs/upgrade_from_195_little_endian_dates.json b/features/data/configs/upgrade_from_195_little_endian_dates.json deleted file mode 100644 index 7d3c470c..00000000 --- a/features/data/configs/upgrade_from_195_little_endian_dates.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%d.%m.%Y %H:%M", -"linewrap": 80, -"encrypt": false, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/simple_jrnl-1-9-5_little_endian_dates.journal"}, -"tagsymbols": "@" -} diff --git a/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json b/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json deleted file mode 100644 index 5bbfb5b1..00000000 --- a/features/data/configs/upgrade_from_195_with_missing_encrypted_journal.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%Y-%m-%d %H:%M", -"linewrap": 80, -"encrypt": true, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/encrypted_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, -"tagsymbols": "@" -} diff --git a/features/data/configs/upgrade_from_195_with_missing_journal.json b/features/data/configs/upgrade_from_195_with_missing_journal.json deleted file mode 100644 index 8d456159..00000000 --- a/features/data/configs/upgrade_from_195_with_missing_journal.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -"default_hour": 9, -"timeformat": "%Y-%m-%d %H:%M", -"linewrap": 80, -"encrypt": false, -"editor": "", -"default_minute": 0, -"highlight": true, -"journals": {"default": "features/journals/simple_jrnl-1-9-5.journal", "missing": "features/journals/missing.journal"}, -"tagsymbols": "@" -} diff --git a/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry b/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry deleted file mode 100644 index 9721dd55..00000000 --- a/features/data/journals/basic_dayone.dayone/entries/D04D335AFED711EABA18FAFFC2100C3D.doentry +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Creation Date - 2020-08-29T18:11:00Z - Starred - - Entry Text - Entry the first. -Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu -consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In -commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget -venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - -Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo -ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse -potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget -molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus -hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis -feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum -urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget -velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac -porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. - Time Zone - America/Los_Angeles - UUID - D04D335AFED711EABA18FAFFC2100C3D - Tags - - ipsum - tagone - tagtwo - - Creator - - Device Agent - - Generation Date - 2020-09-25T02:35:45Z - Host Name - iris.lan - OS Agent - Darwin/19.3.0 - Software Agent - jrnl/v2.4.5 - - - diff --git a/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry b/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry deleted file mode 100644 index 8c2f3c52..00000000 --- a/features/data/journals/basic_dayone.dayone/entries/FC8A86CAFED711EA8892FAFFC2100C3D.doentry +++ /dev/null @@ -1,55 +0,0 @@ - - - - - Creation Date - 2020-08-31T21:32:00Z - Starred - - Entry Text - A second entry in what I hope to be a long series. -Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo -vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, -vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, -eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id -lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, -egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. -Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. - -Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel -vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et -malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, -non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel -ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo -eros. - -Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non -tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. -Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum -quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum -interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. -Quisque auctor lacinia consectetur. - Time Zone - America/Los_Angeles - UUID - FC8A86CAFED711EA8892FAFFC2100C3D - Tags - - tagtwo - - Creator - - Device Agent - - Generation Date - 2020-09-25T02:36:59Z - Host Name - iris.lan - OS Agent - Darwin/19.3.0 - Software Agent - jrnl/v2.4.5 - - - diff --git a/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry b/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry deleted file mode 100644 index d998c36b..00000000 --- a/features/data/journals/basic_dayone.dayone/entries/FD8ABC8EFED711EABC35FAFFC2100C3D.doentry +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Creation Date - 2020-09-24T16:14:00Z - Starred - - Entry Text - The third entry finally after weeks without writing. -I'm so excited about emojis. 💯 🎶 💩 - -Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. -Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla -eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis -dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. -Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis -vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. -Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at -ante eget fringilla. @tagthree and also @tagone - Time Zone - America/Los_Angeles - UUID - FD8ABC8EFED711EABC35FAFFC2100C3D - Tags - - tagthree - tagone - - Creator - - Device Agent - - Generation Date - 2020-09-25T02:37:01Z - Host Name - iris.lan - OS Agent - Darwin/19.3.0 - Software Agent - jrnl/v2.4.5 - - - diff --git a/features/data/journals/basic_encrypted.journal b/features/data/journals/basic_encrypted.journal deleted file mode 100644 index ffc122df..00000000 --- a/features/data/journals/basic_encrypted.journal +++ /dev/null @@ -1 +0,0 @@ -gAAAAABfb4gQBMqqGn_W8v_s7qCi14bX7inuCOKbsBqIUf7_ch14vTUp7lrysPFvhBp5vGijTwDIbk4LKoIISj8NwM31I8L0zEbMx9y6iyF_zseGGNxBvNN0wzAXa67bs-ohiQhhebcdIc_52sltxL2ELh8JAKUaXRwyapgnMgJ7z6deJppLK-B7RE7BiT0eKjWTDMd2x6cZDswvHs9opDp5yjuKWV5m7x6ggCKYgHT3savT9Tg7V0Fq6K3LGWaE59lCrqlAB0u6dnrDX3qcF4SKyckaniXzRShZGebdkUKDcLFun2V2syZwYQN772xjznIsJ16iXicox2uYKg8CnTefsyCwaOZyBvySGEy3CrlBiuIRIcxCtjKbYJ2B-Aq7LZitnBR7Ny_6_Wm8HsBf3N-cFCp4GShiCKrxuXKcOZ7vszG5EKb78JS85bb0mswU5CSdgp6UAHjIZqfJq00qQsViBCbXq3oklCPZXdQkOf5U0KpG2MVUiD-Zcn5Qj3gnUhSEr-5wKU9tWrE63MGPyE6KjZlArZX2W2LeGnW2CEYw9eREGon06AzLJ4mj3BgtjVWLIdGcCwORXvHRjUqazWgbEmXNVTbtp_cKnkW-rFzRBrUoVme9v-1Y3sH0VvHBq7QIj915VzBklzWs1qzIyTPZG5Db9LvdQ7SiV8slf1Jo7l-ayUUdVj6igvKZcgfB4RUHolJoMps5p4lZ5sPqv59KtSa8DCpuoRczIj71OCpuRVARZgy1m5sUD9xSMxOBdy46u1Jnry6iMtzXWI3mEZe5m7UhmW_L4Zcv4bbk8XjkBeHjPdgm2B69jkLmCBFecD5ztoGesCGt_pNo_sWSKqLHV1-coKFB2Nn__a4utU9NJNdeNRkr8_ahU6tn3jmaFjfQ7cKfrXG_NCcYBRX9fja8EQIeBEp_3TCoXQqhuV_bGsNPA2qL63Pt6YiRaUf1g9FNBqJRlKCSOYNixSXQZN_rTePzx0SQ0aIQhADWls62WX-LG5-byJcB6W2P_cH21hDOXkoNEIyLnCz9HQ6Yd6Fbv7298ps3F6jiUDdWES23zv8sDgBuKUN94qSN34j6MDYGFnGI9zsJ-Y-I2frdlLfWPx3pUL7afcKh1nRgXdjctsTSxU2BDrsu03eBz2IoZjoOR0U51IrNMOD1NNT3kctXxHLuOHSEkwAzS3doncQbdRLi5Gc1dQuOUa4sC-p8gVjUKXO-oi_49kp9Km2Ay9wFg0epBbXx2QMzyMsN2dXeSbHF-BDXD6sULaq5syC0fOHqaMLycTCMk2wLfNyXgEt05WvAiDn-LDsRdylMRW2hXp5HWq3Poaul-7VNg6UEMlwVfgJ-7hNreuO6IRtwmx6YdqMscw0ms6mU_MQZU_dTIPg3JU4KL0YyMqPBPSGNCx3gMp41O05Ubir45FoJSnT5Dkj4v3N0S87Ys3HuFLverASsGt9bkcSzd2uMKCJjkspemPPi9VhrY4IOO03DWSWbHmxYzFc1SJ-24WM8Ch404QKpe1qy5LNzFgLvDwQhSIHjluezHXqrD-DVh1lWNNY3WmHI2ubOZfaorvLKqzBPZ6AhpIa60rKjm0OZIQOmJwWXwkdnzut6m8PtoiLzRN897YMgeztf1nmDwp0xE-EhknVZ3WV3TeqgZJ5ykfHQ5BU8x0Db57-UtKSuesKbqPPdBe91OdsPpkGlyl6psHj1_gPm4nLvzXQePwiPaEemR_gYCWGPvl9l1ANJufgCV9qQTmZGof3fb9mjv-9lS-9l_m8KirPPRpSBToNeDtk50ceYUsOlDGzIyusppG9pOcIGyiln1IO5aZ8d4_1E83qjcHTSaKGizICZU7a-pt5STBPMesy3JgBm23A2jO4m68ayBRMcLnw_RirHvvBaj0C6UR2tac45F0Ob3PpXcvFuK0g54ziIAhzGqwF9I-LZ6asXQWMW4y4EBOak8JJBorkfztzfkMaIgGu-4ZoRKOkVfdr4uzcghk3r6KUxD4-nv1ioX69-G5RwhMHppYk7z8RXS1cq5FkvzXbfEQ-Uv6M-sx32DcUy9dH-ZYhc7UWm75JJfiNXLaXT_bsc6VqQ7KPkg2-RA7CywUFCW9S0S-XdO03VdwqlUVo7fp1SKywEfhZv_9bhDCdMJBwZmigv2KP9Iz7fF6LrpLwZkzHuQGFPcyTHFpsVIFrFyJjNYCXpET9y0Q5Vt4fnea5fy-9ZiCt3S8aS0YOFJ35_kM5i3ss8eFPL0v7fIQS3ZilzdGB3bWL0J7kppHN_ekHu-wVk3UZxauoFh7hXLjPcipua-FYUIklLjcK6DG1bYP7_q6OnkC8Jl650FNezeWPomHEv7l_DO3y0tjI6SGdWvL3ZJns7Xp3ew8KsCREAUO7ffqumD03uF9N-9uWbDDjM7rk0vcg0ggfOs9Ni725mxqYpu4R285XCOVWHDvw7iU6eAvE6ry8TDXQBbNgGjTuTYFYYli7GuOqMxFIe1op2s7sRnoJE8O0J76S6APhjhjcnZRSuONWkVG_5o83uFMPSF8DtqLwuRA5E8AGfIwAUcj324sw-DA0ixBGUqomb-osUIisv3x0b044xn-FvD-8R3PZDnPbPsao8XYNxfQWStrNcZSrX2Ua-WAcv9qbQ73_57RKW4pao4ajOu7K5800D231WGiIa6aJzDnFUlzXEzYxFQyx7qegkm_9rrEp_v8TC9mfAcjWX5DMrCkxUskx9YKDfpFYq4NuxO_414gReKzd-lmorfigvttgS10N1XD74SwFluXJv-bqTbI5-SuYAhDGMv1dqrn38i3rOMQqqnQomvaUJRprqxUsKz14sSE1Y-cNqq1FXzZ6vIJq-K3YTfFWPRLeqi6gHzqS_R2YBXXUduKuYgmakiVdP3bWc-Ca8WKh5sVi6P51MO-cS7i9AZWOaOz7F8PsB4JZxAJjSOr3NBmv3EEve9auTFCudRjfC6668I_NMHaTP5CCV4cuhuAxUuKUGgd6WFjDcvoYPyn_lu3bQiqD9MEag4CaJYI9PlraRv5mbqptwxv3pca7usd0GmXN_2No_nwxB4gVb48LsBBkH35njCa5iv2EKXUSOf0k3swaTSEahqbyI4EDzPXtU5uBO39iQzNpgfV_sUpnGdysjqueUVcdWGI_s5CnrNJ-_yDAY06AoXfLrjP8_3NXB2058xZ2rfmTNJNCULz9634dICJReXNnmplxIg3i6GbzFvjfNtqjrWr_iqBShyIwuOUJRbXzdJNggx2BDNG-PEWDXl89SaudFICkDvyZKEcATIss6ZXfULIMfCrqmWmFwgXfNEd9TuvjqoxFlLSaY4UfDMiYa_arUMblFfoo5nV07GANhUoQd-6HRe7LjYeX5VRodOx6ZmZjIAUq-DYr-hatJJFR2tjT_qZht2MJeYT3GZ3o54m8zBBt0JTN7HVpKaOaM3A2hEM_Ah0QZ-DkLDxtCzMuv987GDiLT2-Riya97a47yHIJhZFzFpflW2FcuC8RFWXlfUKTQfZkFmxh3MUekUuS4yu4Z121xojVswk_4P7-FqLaSnGT2epI69I_cvalRx3wjds9-5TFYqf4GridlFBRx6Fv2fpNB9Zvp9k7NQ9oYcPuXGLoXH5kmWBagPhEGKHA_pjFUZmCuwUIoeP4nP8lhFrX8OGezsbSBG773CRJzEdfcgAc5G-p6M_24WZLZHDrsVBAvgrNt6R9eQbEviWU28t_417QCp-or9qqt4OTKv1dp_4MlZh8YBg2-dtpvzSc1l5e4kQFJu7oWlpbgsjB6pl1oRRKp1maedX-gOAf559zC4l85gfEpPln9Cnl6xvERQzfO0Ey4q91SdsgK7i7FBrKKmi2wGiemFvnaQsrjZ_IFujLo8-2c8g9zTiyH1knyoVOAAnQxqGpsz6z6PNfSxr3_G8tOlNFTV-yqN_LdVHMgXtXjn3U9koGsfMulyUcBDdR3d_0Yn6iEjBt77tbxKi2ry-0gQrB1fdGsgKjyE_tMrW8D_lQz0IXsVOzd2ixsFVXMFzD6OOD8JldV0FbA-VDAS-Tp_ezIZVp6lRq54XBgvsjzDyOmOgDbSOQN6SQmvxPnIsml1wgmtm80z-9gHBqmimHBtLKB6L7CtLmmPICMS2pX3eWOmakxscxqs8AVjijJdz_NYNfcdBeDj_fhm6dqD6iwk3EBZZfsrmMGdXtAMqf1r9ng9tsz-FriXwQiJ3IM3loBsk5DKr9CcaJtKSPuwDDlRynD2vwcD-XyF6YTQdSJa9fEcq-qXya2Scj4mqQ4RDemJgErdradRfwJfII3fWHh18XxmYVqi9Bwn3YRgwEadyo0-HjbNq6vJXi12igmP99ciRAfMVQLjfUfTwoOHj44Y2Ru_hPjJcvB6FIn6KLrrCSrZnrshFdFn4L36z1CrS8fbtdvrG3kdZQxsUJnMqttuwKRpLnDWTWkIwj_GRBFrzCFgbwGp1XYhemxggyKVuhZPfyyTIM9rhlPth6eGyrpYfap24Av_mGPRBLnzcjtpGbACGdKQL034kVmI7yENGvmY40KSrWsVG_BE9bSJhx0EptFsT2IxnxbuFD4hGb4fFag9V0BDiKpUoOZqIVqVO8cAp-5w4twvWZKkrhu16JNlLoXWMoFANrw-tp5LKSin1CUeRa4LWVI1GR8tRkIad_GnCHRv9JEMswlNy9wi2sDNsSxWT7WNasUW5-glgK9pR7d2pXGGOWfHj1U6CKIqmAiO3iw8igzhvyx_dAxMxPo \ No newline at end of file diff --git a/features/data/journals/basic_folder/2020/08/29.txt b/features/data/journals/basic_folder/2020/08/29.txt deleted file mode 100644 index c8af54ca..00000000 --- a/features/data/journals/basic_folder/2020/08/29.txt +++ /dev/null @@ -1,19 +0,0 @@ -[2020-08-29 11:11:00 AM] Entry the first. -Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu -consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In -commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget -venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - -Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo -ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse -potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget -molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus -hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis -feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum -urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget -velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac -porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. diff --git a/features/data/journals/basic_folder/2020/08/31.txt b/features/data/journals/basic_folder/2020/08/31.txt deleted file mode 100644 index 826e7cdb..00000000 --- a/features/data/journals/basic_folder/2020/08/31.txt +++ /dev/null @@ -1,23 +0,0 @@ -[2020-08-31 02:32:00 PM] A second entry in what I hope to be a long series. * -Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo -vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, -vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, -eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id -lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, -egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. -Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. - -Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel -vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et -malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, -non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel -ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo -eros. - -Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non -tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. -Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum -quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum -interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. -Quisque auctor lacinia consectetur. diff --git a/features/data/journals/basic_folder/2020/09/24.txt b/features/data/journals/basic_folder/2020/09/24.txt deleted file mode 100644 index 2bd885ce..00000000 --- a/features/data/journals/basic_folder/2020/09/24.txt +++ /dev/null @@ -1,11 +0,0 @@ -[2020-09-24 09:14:00 AM] The third entry finally after weeks without writing. -I'm so excited about emojis. 💯 🎶 💩 - -Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. -Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla -eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis -dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. -Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis -vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. -Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at -ante eget fringilla. @tagthree and also @tagone diff --git a/features/data/journals/basic_onefile.journal b/features/data/journals/basic_onefile.journal deleted file mode 100644 index 0d988049..00000000 --- a/features/data/journals/basic_onefile.journal +++ /dev/null @@ -1,58 +0,0 @@ -[2020-08-29 11:11] Entry the first. - -Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu -consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In -commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget -venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - -Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo -ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse -potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget -molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus -hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis -feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum -urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget -velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac -porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. - -[2020-08-31 14:32] A second entry in what I hope to be a long series. * - -Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis leo -vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl lorem, -vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum lectus, -eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium id -lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, -egestas at efficitur et, ultrices vel est. Sed commodo et nibh non elementum. -Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. - -Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel -vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum et -malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis sem, -non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel -ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a commodo -eros. - -Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non -tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. -Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum -quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum -interdum. Integer id justo dui. Integer eu tellus in turpis bibendum blandit. -Quisque auctor lacinia consectetur. - -[2020-09-24 09:14] The third entry finally after weeks without writing. - -I'm so excited about emojis. 💯 🎶 💩 - -Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. -Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla -eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis -dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. -Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis -vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. -Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at -ante eget fringilla. @tagthree and also @tagone diff --git a/features/data/journals/brackets.journal b/features/data/journals/brackets.journal deleted file mode 100644 index 4649ea3e..00000000 --- a/features/data/journals/brackets.journal +++ /dev/null @@ -1,2 +0,0 @@ -[2019-07-08 05:42] Entry subject -[1] line starting with 1 diff --git a/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry b/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry deleted file mode 100644 index 066821bb..00000000 --- a/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D511.doentry +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Creation Date - 2013-10-27T02:27:27Z - Creator - - Device Agent - iPhone/iPhone3,1 - Generation Date - 2013-10-27T07:02:27Z - Host Name - omrt104001 - OS Agent - iOS/7.0.3 - Software Agent - Day One (iOS)/1.11.4 - - Entry Text - Some text. - Location - - Administrative Area - Östergötlands län - Country - Sverige - Latitude - 58.383400000000000 - Locality - City - Longitude - 15.577170000000000 - Place Name - Street - - Starred - - Time Zone - Europe/Stockholm - UUID - B40EE704E15846DE8D45C44118A4D511 - Weather - - Celsius - 12 - Description - Clear - Fahrenheit - 54 - IconName - sunnyn.png - - - diff --git a/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry b/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry deleted file mode 100644 index ea3efec5..00000000 --- a/features/data/journals/bug153.dayone/entries/B40EE704E15846DE8D45C44118A4D512.doentry +++ /dev/null @@ -1,52 +0,0 @@ - - Creation Date - 2013-10-27T02:27:27Z - Creator - - Device Agent - iPhone/iPhone3,1 - Generation Date - 2013-10-27T07:02:27Z - Host Name - omrt104001 - OS Agent - iOS/7.0.3 - Software Agent - Day One (iOS)/1.11.4 - - Entry Text - This is not a valid plist. - Location - - Administrative Area - Östergötlands län - Country - Sverige - Latitude - 58.383400000000000 - Locality - City - Longitude - 15.577170000000000 - Place Name - Street - - Starred - - Time Zone - Europe/Stockholm - UUID - B40EE704E15846DE8D45C44118A4D511 - Weather - - Celsius - 12 - Description - Clear - Fahrenheit - 54 - IconName - sunnyn.png - - - diff --git a/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry b/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry deleted file mode 100644 index 426f1ea8..00000000 --- a/features/data/journals/bug780.dayone/entries/48A25033B34047C591160A4480197D8B.doentry +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Activity - Stationary - Creation Date - 2019-12-30T21:28:54Z - Entry Text - - Starred - - UUID - 48A25033B34047C591160A4480197D8B - Creator - - Device Agent - PC - Generation Date - 2019-12-30T21:28:54Z - Host Name - LE-TREPORT - OS Agent - Microsoft Windows/10 Home - Software Agent - Journaley/2.1 - - Tags - - i_have_no_body - - - diff --git a/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry b/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry deleted file mode 100644 index 1ac26242..00000000 --- a/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Creation Date - 2013-05-17T18:39:20Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:39:20Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This entry has tags! - Starred - - Tags - - work - PLaY - - Time Zone - America/Los_Angeles - UUID - 044F3747A38546168B572C2E3F217FA2 - - diff --git a/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry b/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry deleted file mode 100644 index 927de884..00000000 --- a/features/data/journals/dayone.dayone/entries/0BDDD6CDA43C4A9AA2681517CC35AD9D.doentry +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Creation Date - 2013-06-17T18:38:29Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:38:29Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This entry has a location. - Location - - Administrative Area - California - Country - Germany - Latitude - 52.4979764 - Locality - Berlin - Longitude - 13.2404758 - Place Name - Abandoned Spy Tower - - Starred - - Tags - - Time Zone - Europe/Berlin - UUID - 0BDDD6CDA43C4A9AA2681517CC35AD9D - - diff --git a/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry b/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry deleted file mode 100644 index 16260763..00000000 --- a/features/data/journals/dayone.dayone/entries/422BC895507944A291E6FC44FC6B8BFC.doentry +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Creation Date - 2013-07-17T18:38:08Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:38:08Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This entry is starred! - Starred - - Tags - - Time Zone - America/Los_Angeles - UUID - 422BC895507944A291E6FC44FC6B8BFC - - diff --git a/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry b/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry deleted file mode 100644 index 9ebaf538..00000000 --- a/features/data/journals/dayone.dayone/entries/4BB1F46946AD439996C9B59DE7C4DDC1.doentry +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Creation Date - 2013-01-17T18:37:50Z - Creator - - Device Agent - Macintosh/MacBookAir5,2 - Generation Date - 2013-08-17T18:37:50Z - Host Name - Egeria - OS Agent - Mac OS X/10.8.4 - Software Agent - Day One (Mac)/1.8 - - Entry Text - This is a DayOne entry without Timezone. - Starred - - Tags - - UUID - 4BB1F46946AD439996C9B59DE7C4DDC1 - - diff --git a/features/data/journals/dayone_empty.dayone/entries/empty.txt b/features/data/journals/dayone_empty.dayone/entries/empty.txt deleted file mode 100644 index c86b8f66..00000000 --- a/features/data/journals/dayone_empty.dayone/entries/empty.txt +++ /dev/null @@ -1 +0,0 @@ -This file exists to preserve the directory structure, but should be ignored by jrnl. diff --git a/features/data/journals/deletion.journal b/features/data/journals/deletion.journal deleted file mode 100644 index c0fa689d..00000000 --- a/features/data/journals/deletion.journal +++ /dev/null @@ -1,5 +0,0 @@ -[2019-10-29 11:11] First entry. - -[2019-10-29 11:11] Second entry. - -[2019-10-29 11:13] Third entry. \ No newline at end of file diff --git a/features/data/journals/deletion_filters.journal b/features/data/journals/deletion_filters.journal deleted file mode 100644 index 9a3747db..00000000 --- a/features/data/journals/deletion_filters.journal +++ /dev/null @@ -1,14 +0,0 @@ -[2019-10-01 08:00] It's just another day in October. -Not much to write about. - -[2020-01-01 08:00] Happy New Year! -So this is the New Year. @holidays - -[2020-03-01 08:00] It's just another day in March. -A stick, a stone, it's the end of the road. - -[2020-05-01 09:00] Happy May Day! -@holidays @springtime Several holidays fall on this date. - -[2020-05-02 12:10] Writing tests. * -@springtime They will help prevent bugs. diff --git a/features/data/journals/empty_folder/empty b/features/data/journals/empty_folder/empty deleted file mode 100644 index 175b82b5..00000000 --- a/features/data/journals/empty_folder/empty +++ /dev/null @@ -1 +0,0 @@ -Nothing to see here diff --git a/features/data/journals/encrypted.journal b/features/data/journals/encrypted.journal deleted file mode 100644 index d2a5fcbe..00000000 --- a/features/data/journals/encrypted.journal +++ /dev/null @@ -1 +0,0 @@ -gAAAAABVIHB7tnwKExG7aC5ZbAbBL9SG2oY2GENeoOJ22i1PZigOvCYvrQN3kpsu0KGr7ay5K-_46R5YFlqJvtQ8anPH2FSITsaZy-l5Lz_5quw3rmzhLwAR1tc0icgtR4MEpXEdsuQ7cyb12Xq-JLDrnATs0id5Vow9Ri_tE7Xe4BXgXaySn3aRPwWKoninVxVPVvETY3MXHSUEXV9OZ-pH5kYBLGYbLA== diff --git a/features/data/journals/encrypted_jrnl-1-9-5.journal b/features/data/journals/encrypted_jrnl-1-9-5.journal deleted file mode 100644 index 339b47baf9671f4550efeb9b6a0cfcd5032255d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du3(bJIGVsY(mXmoW-2hF&*L`0NbJTYlTUr8*^Qm97}8E^3^1bZ$P^M diff --git a/features/data/journals/little_endian_dates.journal b/features/data/journals/little_endian_dates.journal deleted file mode 100644 index d7492969..00000000 --- a/features/data/journals/little_endian_dates.journal +++ /dev/null @@ -1,5 +0,0 @@ -[09.06.2013 15:39] My first entry. -Everything is alright - -[10.07.2013 15:40] Life is good. -But I'm better. diff --git a/features/data/journals/markdown-headings-335.journal b/features/data/journals/markdown-headings-335.journal deleted file mode 100644 index 30f592ef..00000000 --- a/features/data/journals/markdown-headings-335.journal +++ /dev/null @@ -1,42 +0,0 @@ -[2015-04-14 13:23] Heading Test - -H1-1 -= - -H1-2 -=== - -H1-3 -============================ - -H2-1 -- - -H2-2 ---- - -H2-3 ----------------------------------- - -Horizontal Rules (ignore) - ---- - -=== - -# ATX H1 - -## ATX H2 - -### ATX H3 - -#### ATX H4 - -##### ATX H5 - -###### ATX H6 - -Stuff - -More stuff -more stuff again diff --git a/features/data/journals/mostlyreadabledates.journal b/features/data/journals/mostlyreadabledates.journal deleted file mode 100644 index bd211bf5..00000000 --- a/features/data/journals/mostlyreadabledates.journal +++ /dev/null @@ -1,8 +0,0 @@ -[2019-07-18 14:23] Entry subject -Time machines are possible. I know, because I've built one in my garage. - -[2019-07-19 14:23] Entry subject -I'm going to activate the machine. Nobody knows what comes next after this. Or before this? - -[2019-07 14:23] Entry subject -I've crossed so many timelines. Is there any going back? diff --git a/features/data/journals/multiline-tags.journal b/features/data/journals/multiline-tags.journal deleted file mode 100644 index 1fb8706f..00000000 --- a/features/data/journals/multiline-tags.journal +++ /dev/null @@ -1,7 +0,0 @@ -[2013-06-09 15:39] Multiple @line entry with @tags. -Tag with @punctuation. afterwards -@TagOnLineAloneWithOutPunctuation -@TagOnLineAloneWithPunctuation. -Text before @tag. And After. -@hi. Hello -hi Hello \ No newline at end of file diff --git a/features/data/journals/multiline.journal b/features/data/journals/multiline.journal deleted file mode 100644 index 294ed141..00000000 --- a/features/data/journals/multiline.journal +++ /dev/null @@ -1,5 +0,0 @@ -[2013-06-09 15:39] Multiple line entry. -This is the first line. -This line doesn't have any ending punctuation - -There is a blank line above this. diff --git a/features/data/journals/simple.journal b/features/data/journals/simple.journal deleted file mode 100644 index 8336068e..00000000 --- a/features/data/journals/simple.journal +++ /dev/null @@ -1,5 +0,0 @@ -[2013-06-09 15:39] My first entry. -Everything is alright - -[2013-06-10 15:40] Life is good. -But I'm better. diff --git a/features/data/journals/simple_jrnl-1-9-5.journal b/features/data/journals/simple_jrnl-1-9-5.journal deleted file mode 100644 index 7bb6c5ac..00000000 --- a/features/data/journals/simple_jrnl-1-9-5.journal +++ /dev/null @@ -1,13 +0,0 @@ -2010-06-10 15:00 A life without chocolate is like a bad analogy. - -2013-06-10 15:40 He said "[this] is the best time to be alive". -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. - -[2019-08-03 12:55] Some chat log or something - -Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, -elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus -placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor -dui. diff --git a/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal b/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal deleted file mode 100644 index 328b23f4..00000000 --- a/features/data/journals/simple_jrnl-1-9-5_little_endian_dates.journal +++ /dev/null @@ -1,13 +0,0 @@ -10.06.2010 15:00 A life without chocolate is like a bad analogy. - -10.06.2013 15:40 He said "[this] is the best time to be alive". -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada -quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque -augue et venenatis facilisis. - -[03.08.2019 12:55] Some chat log or something - -Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex, -elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus -placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor -dui. diff --git a/features/data/journals/tags-216.journal b/features/data/journals/tags-216.journal deleted file mode 100644 index 08b6d630..00000000 --- a/features/data/journals/tags-216.journal +++ /dev/null @@ -1,2 +0,0 @@ -[2013-06-10 15:40] I programmed for @OS/2. -Almost makes me want to go back to @C++, though. (Still better than @C#). diff --git a/features/data/journals/tags-237.journal b/features/data/journals/tags-237.journal deleted file mode 100644 index be050652..00000000 --- a/features/data/journals/tags-237.journal +++ /dev/null @@ -1,3 +0,0 @@ -[2014-07-22 11:11] This entry has an email. -@Newline tag should show as a tag. -Kyla's @email is kyla@clevelandunderdog.org and Guinness's is guinness@fortheloveofpits.org. diff --git a/features/data/journals/tags.journal b/features/data/journals/tags.journal deleted file mode 100644 index a28f3159..00000000 --- a/features/data/journals/tags.journal +++ /dev/null @@ -1,8 +0,0 @@ -[2013-04-09 15:39] I have an @idea: -(1) write a command line @journal software -(2) ??? -(3) PROFIT! - -[2013-06-10 15:40] I met with @dan. -As alway's he shared his latest @idea on how to rule the world with me. -inst diff --git a/features/data/journals/unreadabledates.journal b/features/data/journals/unreadabledates.journal deleted file mode 100644 index 53ef1d60..00000000 --- a/features/data/journals/unreadabledates.journal +++ /dev/null @@ -1,5 +0,0 @@ -[ashasd7zdskhz7asdkjasd] Entry subject -I've lost track of time. - -[sadfhakjsdf88sdf7sdff] Entry subject -Time has no meaning. diff --git a/features/data/journals/work.journal b/features/data/journals/work.journal deleted file mode 100644 index e69de29b..00000000 diff --git a/features/data/templates/extension.md b/features/data/templates/extension.md deleted file mode 100644 index e69de29b..00000000 diff --git a/features/data/templates/sample.template b/features/data/templates/sample.template deleted file mode 100644 index a356d823..00000000 --- a/features/data/templates/sample.template +++ /dev/null @@ -1,19 +0,0 @@ ---- -extension: txt ---- - -{% block journal %} -{% for entry in entries %} -{% include entry %} -{% endfor %} - -{% endblock %} - -{% block entry %} -{{ entry.title }} -{{ "-" * len(entry.title) }} - -{{ entry.body }} - -{% endblock %} -` diff --git a/features/datetime.feature b/features/datetime.feature deleted file mode 100644 index 8fe335c9..00000000 --- a/features/datetime.feature +++ /dev/null @@ -1,155 +0,0 @@ -Feature: Reading and writing to journal with custom date formats - - Scenario: Dates can include a time - # https://github.com/jrnl-org/jrnl/issues/117 - Given we use the config "simple.yaml" - When we run "jrnl 2013-11-30 15:42: Project Started." - Then we should see the message "Entry added" - And the journal should contain "[2013-11-30 15:42] Project Started." - - Scenario: Dates can be in the future - # https://github.com/jrnl-org/jrnl/issues/185 - Given we use the config "simple.yaml" - When we run "jrnl 26/06/2099: Planet? Earth. Year? 2099." - Then we should see the message "Entry added" - And the journal should contain "[2099-06-26 09:00] Planet?" - - Scenario: Loading a sample journal with custom date - Given we use the config "little_endian_dates.yaml" - When we run "jrnl -n 2" - Then we should get no error - And the output should be - """ - 09.06.2013 15:39 My first entry. - | Everything is alright - - 10.07.2013 15:40 Life is good. - | But I'm better. - """ - - Scenario Outline: Writing an entry from command line with custom date - Given we use the config ".yaml" - When we run "jrnl " - Then we should see the message "Entry added" - When we run "jrnl -n 1" - Then the output should contain "" - - Examples: Day-first Dates - | config | input | output | - | little_endian_dates | 2020-09-19: My first entry. | 19.09.2020 09:00 My first entry. | - | little_endian_dates | 2020-08-09: My second entry. | 09.08.2020 09:00 My second entry. | - | little_endian_dates | 2020-02-29: Test. | 29.02.2020 09:00 Test. | - | little_endian_dates | 2019-02-29: Test. | 2019-02-29: Test. | - | little_endian_dates | 2020-08-32: Test. | 2020-08-32: Test. | - | little_endian_dates | 2032-02-01: Test. | 01.02.2032 09:00 Test. | - | little_endian_dates | 2020-01-01: Test. | 01.01.2020 09:00 Test. | - | little_endian_dates | 2020-12-31: Test. | 31.12.2020 09:00 Test. | - - Scenario Outline: Searching for dates with custom date - Given we use the config ".yaml" - When we run "jrnl -on '' --short" - Then the output should be "" - - Examples: Day-first Dates - | config | input | output | - | little_endian_dates | 2013-07-10 | 10.07.2013 15:40 Life is good. | - | little_endian_dates | june 9 2013 | 09.06.2013 15:39 My first entry. | - | little_endian_dates | july 10 2013 | 10.07.2013 15:40 Life is good. | - | little_endian_dates | june 2013 | 09.06.2013 15:39 My first entry. | - | little_endian_dates | july 2013 | 10.07.2013 15:40 Life is good. | - # @todo month alone with no year should work - # | little_endian_dates | june | 09.06.2013 15:39 My first entry. | - # | little_endian_dates | july | 10.07.2013 15:40 Life is good. | - - Scenario: Writing an entry at the prompt with custom date - Given we use the config "little_endian_dates.yaml" - When we run "jrnl" and enter "2013-05-10: I saw Elvis. He's alive." - Then we should get no error - And the journal should contain "[10.05.2013 09:00] I saw Elvis." - And the journal should contain "He's alive." - - Scenario: Viewing today's entries does not print the entire journal - # https://github.com/jrnl-org/jrnl/issues/741 - Given we use the config "simple.yaml" - When we run "jrnl -on today" - Then the output should not contain "Life is good" - And the output should not contain "But I'm better." - - Scenario Outline: Create entry using day of the week as entry date. - Given we use the config "simple.yaml" - When we run "jrnl : This is an entry on a ." - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should contain " at 9am" in the local time - And the output should contain "This is an entry on a ." - - Examples: Days of the week - | day | - | Monday | - | Tuesday | - | Wednesday | - | Thursday | - | Friday | - | Saturday | - | Sunday | - | sunday | - | sUndAy | - - Scenario Outline: Create entry using day of the week abbreviations as entry date. - Given we use the config "simple.yaml" - When we run "jrnl : This is an entry on a ." - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should contain " at 9am" in the local time - - Examples: Days of the week - | day | weekday | - | mon | Monday | - | tue | Tuesday | - | wed | Wednesday | - | thu | Thursday | - | fri | Friday | - | sat | Saturday | - | sun | Sunday | - - Scenario: Journals with unreadable dates should still be loaded - Given we use the config "unreadabledates.yaml" - When we run "jrnl -2" - Then the output should contain "I've lost track of time." - And the output should contain "Time has no meaning." - - Scenario: Journals with readable dates AND unreadable dates should still contain all data. - Given we use the config "mostlyreadabledates.yaml" - When we run "jrnl -3" - Then the output should contain "Time machines are possible." - Then the output should contain "I'm going to activate the machine." - And the output should contain "I've crossed so many timelines. Is there any going back?" - And the journal should have 3 entries - - Scenario: Update near-valid dates after journal is edited - Given we use the config "mostlyreadabledates.yaml" - When we run "jrnl 2222-08-19: I have made it exactly one month into the future." - Then the journal should contain "[2019-07-01 14:23] Entry subject" - - Scenario: Integers in square brackets should not be read as dates - Given we use the config "brackets.yaml" - When we run "jrnl -1" - Then the output should contain "[1] line starting with 1" - - # broken still - @skip - Scenario: Dayone entries without timezone information are interpreted in current timezone - Given we use the config "dayone.yaml" - When we run "jrnl -until 'feb 2013'" - Then we should get no error - And the output should contain "2013-01-17T18:37Z" in the local time - - Scenario: Loading entry with ambiguous time stamp in timezone-aware journal (like Dayone) - #https://github.com/jrnl-org/jrnl/issues/153 - Given we use the config "bug153.yaml" - When we run "jrnl -1" - Then we should get no error - And the output should be - """ - 2013-10-27 03:27 Some text. - """ diff --git a/features/delete.feature b/features/delete.feature deleted file mode 100644 index 2fc3f8f7..00000000 --- a/features/delete.feature +++ /dev/null @@ -1,229 +0,0 @@ -Feature: Delete entries from journal - Scenario Outline: Delete flag allows deletion of single entry - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -1" - Then the output should contain "2020-09-24 09:14 The third entry finally" - When we run "jrnl --delete" and enter - """ - N - N - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Backing out of interactive delete does not change journal - Given we use the config ".yaml" - When we run "jrnl --delete -n 1" and enter - """ - N - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - - Scenario Outline: Delete flag with nonsense input deletes nothing (issue #932) - Given we use the config ".yaml" - When we run "jrnl --delete asdfasdf" - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Delete flag with tag only deletes tagged entries - Given we use the config ".yaml" - When we run "jrnl --delete @ipsum" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - - Scenario Outline: Delete flag with multiple tags deletes all entries matching any of the tags - Given we use the config ".yaml" - When we run "jrnl --delete @ipsum @tagthree" and enter - """ - Y - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -and deletes boolean AND of tagged entries - Given we use the config ".yaml" - When we run "jrnl --delete -and @tagone @tagtwo" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -not does not delete entries from given tag - Given we use the config ".yaml" - When we run "jrnl --delete @tagone -not @ipsum" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -from search operator only deletes entries since that date - Given we use the config ".yaml" - When we run "jrnl --delete -from 2020-09-01" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -to only deletes entries up to specified date - Given we use the config ".yaml" - When we run "jrnl --delete -to 2020-08-31" and enter - """ - Y - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - - Scenario Outline: Delete flag with -starred only deletes starred entries - Given we use the config ".yaml" - When we run "jrnl --delete -starred" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-29 11:11 Entry the first. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: Delete flag with -contains only entries containing expression - Given we use the config ".yaml" - When we run "jrnl --delete -contains dignissim" and enter - """ - Y - """ - Then we flush the output - When we run "jrnl -99 --short" - Then the output should be - """ - 2020-08-31 14:32 A second entry in what I hope to be a long series. - 2020-09-24 09:14 The third entry finally after weeks without writing. - """ - - Examples: Configs - | config | - | basic_onefile | - # | basic_folder | @todo - # | basic_dayone | @todo - diff --git a/features/encrypt.feature b/features/encrypt.feature deleted file mode 100644 index f2d0a62f..00000000 --- a/features/encrypt.feature +++ /dev/null @@ -1,35 +0,0 @@ -Feature: Encrypting and decrypting journals - - Scenario: Decrypting a journal - Given we use the config "encrypted.yaml" - When we run "jrnl --decrypt" and enter "bad doggie no biscuit" - Then the config for journal "default" should have "encrypt" set to "bool:False" - And we should see the message "Journal decrypted" - And the journal should have 2 entries - - @todo - Scenario: Trying to decrypt an already unencrypted journal - # This should warn the user that the journal is already encrypted - Given we use the config "simple.yaml" - When we run "jrnl --decrypt" - Then the config for journal "default" should have "encrypt" set to "bool:False" - And the journal should have 2 entries - - @todo - Scenario: Trying to encrypt an already encrypted journal - # This should warn the user that the journal is already encrypted - - Scenario: Encrypting a journal - Given we use the config "simple.yaml" - When we run "jrnl --encrypt" and enter - """ - swordfish - swordfish - n - """ - Then we should see the message "Journal encrypted" - And the config for journal "default" should have "encrypt" set to "bool:True" - When we run "jrnl -n 1" and enter "swordfish" - Then we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" - diff --git a/features/environment.py b/features/environment.py deleted file mode 100644 index f4baab34..00000000 --- a/features/environment.py +++ /dev/null @@ -1,86 +0,0 @@ -import os -import shutil - -from jrnl.os_compat import on_windows - -CWD = os.getcwd() - -# @see https://behave.readthedocs.io/en/latest/tutorial.html#debug-on-error-in-case-of-step-failures -BEHAVE_DEBUG_ON_ERROR = False - - -def setup_debug_on_error(userdata): - global BEHAVE_DEBUG_ON_ERROR - BEHAVE_DEBUG_ON_ERROR = userdata.getbool("BEHAVE_DEBUG_ON_ERROR") - - -def before_all(context): - setup_debug_on_error(context.config.userdata) - - -# def after_step(context, step): -# if BEHAVE_DEBUG_ON_ERROR and step.status == "failed": -# -- ENTER DEBUGGER: Zoom in on failure location. -# NOTE: Use IPython debugger, same for pdb (basic python debugger). -# import ipdb -# ipdb.post_mortem(step.exc_traceback) - - -def clean_all_working_dirs(): - if os.path.exists("test.txt"): - os.remove("test.txt") - for folder in ("configs", "journals", "cache"): - working_dir = os.path.join("features", folder) - if os.path.exists(working_dir): - shutil.rmtree(working_dir) - - -def before_feature(context, feature): - # add "skip" tag - # https://stackoverflow.com/a/42721605/4276230 - if "skip" in feature.tags: - feature.skip() - return - - if "skip_win" in feature.tags and on_windows(): - feature.skip("Skipping on Windows") - return - - -def before_scenario(context, scenario): - """Before each scenario, backup all config and journal test data.""" - # Clean up in case something went wrong - clean_all_working_dirs() - for folder in ("configs", "journals"): - original = os.path.join("features", "data", folder) - working_dir = os.path.join("features", folder) - if not os.path.exists(working_dir): - os.mkdir(working_dir) - for filename in os.listdir(original): - source = os.path.join(original, filename) - if os.path.isdir(source): - shutil.copytree(source, os.path.join(working_dir, filename)) - else: - shutil.copy2(source, working_dir) - - # add "skip" tag - # https://stackoverflow.com/a/42721605/4276230 - if "skip" in scenario.effective_tags: - scenario.skip() - return - - if "skip_win" in scenario.effective_tags and on_windows(): - scenario.skip("Skipping on Windows") - return - - -def after_scenario(context, scenario): - """After each scenario, restore all test data and remove working_dirs.""" - if os.getcwd() != CWD: - os.chdir(CWD) - - # only clean up if debugging is off and the scenario passed - if BEHAVE_DEBUG_ON_ERROR and scenario.status != "failed": - clean_all_working_dirs() - else: - clean_all_working_dirs() diff --git a/features/file_storage.feature b/features/file_storage.feature deleted file mode 100644 index 33619365..00000000 --- a/features/file_storage.feature +++ /dev/null @@ -1,56 +0,0 @@ -Feature: Journals iteracting with the file system in a way that users can see - - Scenario: Adding entries to a Folder journal should generate date files - Given we use the config "empty_folder.yaml" - When we run "jrnl 23 July 2013: Testing folder journal." - Then we should see the message "Entry added" - When the journal directory is listed - Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" - - Scenario: Adding multiple entries to a Folder journal should generate multiple date files - Given we use the config "empty_folder.yaml" - When we run "jrnl 23 July 2013: Testing folder journal." - And we run "jrnl 3/7/2014: Second entry of journal." - Then we should see the message "Entry added" - When the journal directory is listed - Then the output should contain "2013/07/23.txt" or "2013\07\23.txt" - Then the output should contain "2014/03/07.txt" or "2014\03\07.txt" - - Scenario: If the journal and its parent directory don't exist, they should be created - Given we use the config "missing_directory.yaml" - Then the journal should not exist - When we run "jrnl This is a new entry in my journal" - Then the journal should exist - When we run "jrnl -n 1" - Then the output should contain "This is a new entry in my journal" - And the journal should have 1 entry - - Scenario: If the journal file doesn't exist, then it should be created - Given we use the config "missing_journal.yaml" - Then the journal should not exist - When we run "jrnl This is a new entry in my journal" - Then the journal should exist - When we run "jrnl -n 1" - Then the output should contain "This is a new entry in my journal" - And the journal should have 1 entry - - Scenario: Creating journal with relative path should update to absolute path - Given we use the config "missingconfig" - When we run "jrnl hello world" and enter - """ - test.txt - n - """ - And we change directory to "features" - And we run "jrnl -n 1" - Then the output should contain "hello world" - - Scenario: the temporary filename suffix should default to ".jrnl" - Given we use the config "editor.yaml" - When we run "jrnl --edit" - Then the temporary filename suffix should be ".jrnl" - - Scenario: the temporary filename suffix should be "-{template_filename}" - Given we use the config "editor_markdown_extension.yaml" - When we run "jrnl --edit" - Then the temporary filename suffix should be "-extension.md" diff --git a/features/format.feature b/features/format.feature deleted file mode 100644 index f935e8c8..00000000 --- a/features/format.feature +++ /dev/null @@ -1,621 +0,0 @@ -Feature: Custom formats - - Scenario Outline: Short printing via --format flag - Given We use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --format short -3" - Then we should get no error - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Pretty Printing aka the Default - Given We use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --format pretty -3" - Then we should get no error - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: JSON format - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --format json" - Then we should get no error - And the output should be parsable as json - And "entries" in the json output should have 3 elements - And "tags" in the json output should contain "@ipsum" - And "tags" in the json output should contain "@tagone" - And "tags" in the json output should contain "@tagthree" - And "tags" in the json output should contain "@tagtwo" - And entry 1 should have an array "tags" with 3 elements - And entry 2 should have an array "tags" with 1 elements - And entry 3 should have an array "tags" with 2 elements - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario: Exporting dayone to json - Given we use the config "dayone.yaml" - When we run "jrnl --export json" - Then we should get no error - And the output should be parsable as json - And the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" - - Scenario Outline: Printing a journal that has multiline entries with tags - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -n 1 @ipsum" - Then we should get no error - And the output should be - """ - 2020-08-29 11:11 Entry the first. - | Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada - | quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus - | pellentesque - | augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu - | consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In - | commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget - | venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - | - | Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo - | ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse - | potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget - | molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus - | hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis - | feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum - | urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget - | velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac - | porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per - | conubia nostra, per inceptos himenaeos. - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Exporting using filters should only export parts of the journal - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -until 'August 2020' --format json" - Then the output should be parsable as json - Then we should get no error - And the output should be parsable as json - And "entries" in the json output should have 2 elements - And "tags" in the json output should contain "@ipsum" - And "tags" in the json output should contain "@tagone" - And "tags" in the json output should contain "@tagtwo" - And entry 1 should have an array "tags" with 3 elements - And entry 2 should have an array "tags" with 1 elements - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Exporting using custom templates - Given we use the config ".yaml" - And we load template "sample.template" - And we use the password "test" if prompted - When we run "jrnl -1 --format sample" - Then the output should be - """ - The third entry finally after weeks without writing. - ---------------------------------------------------- - - I'm so excited about emojis. 💯 🎶 💩 - - Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. - Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla - eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis - dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. - Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis - vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. - Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at - ante eget fringilla. @tagthree and also @tagone - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Increasing Headings on Markdown export - Given we use the config ".yaml" - And we use the password "test" if prompted - When we open the editor and append - """ - [2020-10-14 13:23] Heading Test - - H1-1 - = - - H1-2 - === - - H1-3 - ============================ - - H2-1 - - - - H2-2 - --- - - H2-3 - ---------------------------------- - - Horizontal Rules (ignore) - - --- - - === - - # ATX H1 - - ## ATX H2 - - ### ATX H3 - - #### ATX H4 - - ##### ATX H5 - - ###### ATX H6 - - Stuff - - More stuff - more stuff again - """ - Then we flush the output - When we run "jrnl -1 --export markdown" - Then the output should be - """ - # 2020 - - ## October - - ### 2020-10-14 13:23 Heading Test - - #### H1-1 - - #### H1-2 - - #### H1-3 - - ##### H2-1 - - ##### H2-2 - - ##### H2-3 - - Horizontal Rules (ignore) - - --- - - === - - #### ATX H1 - - ##### ATX H2 - - ###### ATX H3 - - ####### ATX H4 - - ######## ATX H5 - - ######### ATX H6 - - Stuff - - More stuff - more stuff again - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | @todo - - Scenario Outline: Add a blank line to Markdown export if there isn't one already - # https://github.com/jrnl-org/jrnl/issues/768 - # https://github.com/jrnl-org/jrnl/issues/881 - Given we use the config ".yaml" - And we use the password "test" if prompted - When we open the editor and append - """ - [2020-10-29 11:11] First entry. - [2020-10-29 11:11] Second entry. - [2020-10-29 11:13] Third entry. - """ - Then we flush the output - When we run "jrnl -3 --format markdown" - Then the output should be - """ - # 2020 - - ## October - - ### 2020-10-29 11:11 First entry. - - - ### 2020-10-29 11:11 Second entry. - - - ### 2020-10-29 11:13 Third entry. - - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | @todo - - @skip - Scenario Outline: Exporting to XML - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --export xml" - Then the output should be a valid XML string - And "entries" node in the xml output should have 3 elements - And "tags" in the xml output should contain ["@ipsum", "@tagone", "@tagtwo", "@tagthree"] - And there should be 10 "tag" elements - - Examples: configs - | config | - # | basic_onefile | @todo - # | basic_encrypted | @todo - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario: Exporting to XML - Given we use the config "tags.yaml" - And we use the password "test" if prompted - When we run "jrnl --export xml" - Then the output should be a valid XML string - And "entries" node in the xml output should have 2 elements - And "tags" in the xml output should contain ["@idea", "@journal", "@dan"] - And there should be 7 "tag" elements - - Scenario Outline: Exporting tags - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --export tags" - Then the output should be - """ - @tagtwo : 2 - @tagone : 2 - @tagthree : 1 - @ipsum : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - - - Scenario Outline: Export fancy with small linewrap - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --config-override linewrap 35 --format fancy -3" - Then we should get no error - And the output should be 35 columns wide - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - @todo - Scenario Outline: Exporting fancy - # Needs better emoji support - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --export fancy" - Then the output should be - """ - ┎──────────────────────────────────────────────────────────────╮2020-08-29 11:11 - ┃ Entry the first. ╘═══════════════╕ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada │ - ┃ quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus │ - ┃ pellentesque │ - ┃ augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu │ - ┃ consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In │ - ┃ commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget │ - ┃ venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. │ - ┃ │ - ┃ Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo │ - ┃ ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. │ - ┃ Suspendisse │ - ┃ potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas │ - ┃ eget │ - ┃ molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed │ - ┃ lectus │ - ┃ hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis │ - ┃ feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, │ - ┃ vestibulum │ - ┃ urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod │ - ┃ enim. │ - ┃ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget │ - ┃ velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac │ - ┃ porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per │ - ┃ conubia nostra, per inceptos himenaeos. │ - ┖──────────────────────────────────────────────────────────────────────────────┘ - ┎──────────────────────────────────────────────────────────────╮2020-08-31 14:32 - ┃ A second entry in what I hope to be a long series. ╘═══════════════╕ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ Sed sit amet metus et sapien feugiat elementum. Aliquam bibendum lobortis │ - ┃ leo │ - ┃ vitae tempus. Donec eleifend nec mi non volutpat. Lorem ipsum dolor sit │ - ┃ amet, │ - ┃ consectetur adipiscing elit. Praesent ut sodales libero. Maecenas nisl │ - ┃ lorem, │ - ┃ vestibulum in tempus sit amet, fermentum ut arcu. Donec vel vestibulum │ - ┃ lectus, │ - ┃ eget pretium enim. Maecenas diam nunc, imperdiet vitae pharetra sed, pretium │ - ┃ id │ - ┃ lectus. Donec eu metus et turpis tempor tristique ac non ex. In tellus arcu, │ - ┃ egestas at efficitur et, ultrices vel est. Sed commodo et nibh non │ - ┃ elementum. │ - ┃ Mauris tempus vitae neque vel viverra. @tagtwo all by its lonesome. │ - ┃ │ - ┃ Nulla mattis elementum magna, viverra pretium dui fermentum et. Cras vel │ - ┃ vestibulum odio. Quisque sit amet turpis et urna finibus maximus. Interdum │ - ┃ et │ - ┃ malesuada fames ac ante ipsum primis in faucibus. Fusce porttitor iaculis │ - ┃ sem, │ - ┃ non dictum ipsum varius nec. Nulla eu erat at risus gravida blandit non vel │ - ┃ ante. Nam egestas ipsum leo, eu ultricies ipsum tincidunt vel. Morbi a │ - ┃ commodo │ - ┃ eros. │ - ┃ │ - ┃ Nullam dictum, nisl ac varius tempus, ex tortor fermentum nisl, non │ - ┃ tempus dolor neque a lorem. Suspendisse a faucibus ex, vel ornare tortor. │ - ┃ Maecenas tincidunt id felis quis semper. Pellentesque enim libero, fermentum │ - ┃ quis metus id, rhoncus euismod magna. Nulla finibus velit eu purus bibendum │ - ┃ interdum. Integer id justo dui. Integer eu tellus in turpis bibendum │ - ┃ blandit. │ - ┃ Quisque auctor lacinia consectetur. │ - ┖──────────────────────────────────────────────────────────────────────────────┘ - ┎──────────────────────────────────────────────────────────────╮2020-09-24 09:14 - ┃ The third entry finally after weeks without writing. ╘═══════════════╕ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ I'm so excited about emojis. 💯 🎶 💩 │ - ┃ │ - ┃ Donec semper pellentesque iaculis. Nullam cursus et justo sit amet │ - ┃ venenatis. │ - ┃ Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. │ - ┃ Nulla │ - ┃ eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis │ - ┃ dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh │ - ┃ malesuada. │ - ┃ Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis │ - ┃ vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan │ - ┃ justo. │ - ┃ Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at │ - ┃ ante eget fringilla. @tagthree and also @tagone │ - ┖──────────────────────────────────────────────────────────────────────────────┘ - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - @skip_win - Scenario Outline: Export to yaml - Given we use the config ".yaml" - And we use the password "test" if prompted - And we create a cache directory - When we run "jrnl --export yaml -o {cache_dir}" - Then the cache should contain the files - """ - 2020-08-29_entry-the-first.md - 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md - 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md - """ - And the content of file "2020-08-29_entry-the-first.md" in the cache should be - """ - --- - title: Entry the first. - date: 2020-08-29 11:11 - starred: False - tags: tagone, ipsum, tagtwo - body: | - Lorem @ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada - quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque - augue et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu - consequat. Aenean ante ex, elementum ut interdum et, mattis eget lacus. In - commodo nulla nec tellus placerat, sed ultricies metus bibendum. Duis eget - venenatis erat. In at dolor dui. @tagone and maybe also @tagtwo. - - Curabitur accumsan nunc ac neque tristique, eleifend faucibus justo - ullamcorper. Suspendisse at mattis nunc. Nullam eget lacinia urna. Suspendisse - potenti. Ut urna est, venenatis sed ante in, ultrices congue mi. Maecenas eget - molestie metus. Mauris porttitor dui ornare gravida porta. Quisque sed lectus - hendrerit, lacinia ante eget, vulputate ante. Aliquam vitae erat non felis - feugiat sagittis. Phasellus quis arcu fringilla, mattis ligula id, vestibulum - urna. Vivamus facilisis leo a mi tincidunt condimentum. Donec eu euismod enim. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu ligula eget - velit scelerisque fringilla. Phasellus pharetra justo et nulla fringilla, ac - porta sapien accumsan. Class aptent taciti sociosqu ad litora torquent per - conubia nostra, per inceptos himenaeos. - ... - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | - - @skip_win # @todo YAML exporter does not correctly export emoji on Windows - Scenario Outline: Add a blank line to YAML export if there isn't one already - # https://github.com/jrnl-org/jrnl/issues/768 - # https://github.com/jrnl-org/jrnl/issues/881 - Given we use the config ".yaml" - And we use the password "test" if prompted - And we create a cache directory - When we run "jrnl --export yaml -o {cache_dir}" - Then the cache should contain the files - """ - 2020-08-29_entry-the-first.md - 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md - 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md - """ - And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in the cache should be - """ - --- - title: The third entry finally after weeks without writing. - date: 2020-09-24 09:14 - starred: False - tags: tagone, tagthree - body: | - I'm so excited about emojis. 💯 🎶 💩 - - Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. - Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla - eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis - dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. - Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis - vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. - Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at - ante eget fringilla. @tagthree and also @tagone - ... - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - # | basic_dayone | @todo - - Scenario: Empty DayOne entry bodies should not error - # https://github.com/jrnl-org/jrnl/issues/780 - Given we use the config "bug780.yaml" - When we run "jrnl --short" - Then we should get no error - - Scenario Outline: --short displays the short version of entries (only the title) - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -on 2020-08-31 --short" - Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: -s displays the short version of entries (only the title) - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -on 2020-08-31 -s" - Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario: Markdown Support from config file - Given we use the config "format_md.yaml" - When we run "jrnl -n 1" - Then the output should be - """ - # 2013 - - ## June - - ### 2013-06-10 15:40 Life is good. - - But I'm better. - """ - - Scenario: Text Formatter from config file - Given we use the config "format_text.yaml" - When we run "jrnl -n 1" - Then the output should be - """ - [2013-06-10 15:40] Life is good. - But I'm better. - """ - - Scenario Outline: Exporting entries with Cyrillic characters to directory should not fail - Given we use the config ".yaml" - And we use the password "test" if prompted - And we create a cache directory - When we run "jrnl 2020-11-21: Первая" - When we run "jrnl --format md --file {cache_dir} -on 2020-11-21" - Then the cache should contain the files - """ - 2020-11-21_первая.md - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Export date counts - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl 2020-08-31 01:01: Hi." - And we run "jrnl --format dates" - Then the output should be - """ - 2020-08-29, 1 - 2020-08-31, 2 - 2020-09-24, 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | diff --git a/features/import.feature b/features/import.feature deleted file mode 100644 index 63b042fc..00000000 --- a/features/import.feature +++ /dev/null @@ -1,93 +0,0 @@ -Feature: Importing data - - Scenario Outline: --import allows new entry from stdin - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --import" and pipe "[2020-07-05 15:00] Observe and import." - Then we flush the output - When we run "jrnl -c import" - Then the output should contain "Observe and import" - - Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: --import allows new large entry from stdin - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --import" and pipe - """ - [2020-07-05 15:00] Observe and import. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada quis - est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque augue - et venenatis facilisis. Suspendisse potenti. Sed dignissim sed nisl eu consequat. - Aenean ante ex, elementum ut interdum et, mattis eget lacus. In commodo nulla nec - tellus placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at - dolor dui end of entry. - """ - Then we flush the output - When we run "jrnl -on 2020-07-05" - Then the output should contain "2020-07-05 15:00 Observe and import." - And the output should contain "Lorem ipsum" - And the output should contain "end of entry." - - Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario Outline: --import allows multiple new entries from stdin - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl --import" and pipe - """ - [2020-07-05 15:00] Observe and import. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - - [2020-07-05 15:01] Twice as nice. - Sed dignissim sed nisl eu consequat. - """ - Then we flush the output - When we run "jrnl -on 2020-07-05" - Then the output should contain "2020-07-05 15:00 Observe and import." - And the output should contain "Lorem ipsum" - And the output should contain "2020-07-05 15:01 Twice as nice." - And the output should contain "Sed dignissim" - - Examples: Configs - | config | - | basic_onefile | - | basic_encrypted | - # | basic_folder | @todo - # | basic_dayone | @todo - - Scenario: --import allows import new entries from file - Given we use the config "simple.yaml" - Then the journal should contain "My first entry." - And the journal should contain "Life is good." - But the journal should not contain "I have an @idea" - And the journal should not contain "I met with" - When we run "jrnl --import --file features/journals/tags.journal" - Then the journal should contain "My first entry." - And the journal should contain "Life is good." - And the journal should contain "PROFIT!" - - Scenario: --import prioritizes --file over pipe data if both are given - Given we use the config "simple.yaml" - Then the journal should contain "My first entry." - And the journal should contain "Life is good." - But the journal should not contain "I have an @idea" - And the journal should not contain "I met with" - When we run "jrnl --import --file features/journals/tags.journal" and pipe - """ - [2020-07-05 15:00] I should not exist! - """ - Then the journal should contain "My first entry." - And the journal should contain "PROFIT!" - But the journal should not contain "I should not exist!" - diff --git a/features/multiple_journals.feature b/features/multiple_journals.feature deleted file mode 100644 index 222be100..00000000 --- a/features/multiple_journals.feature +++ /dev/null @@ -1,65 +0,0 @@ -Feature: Multiple journals - - Scenario: Loading a config with two journals - Given we use the config "multiple.yaml" - Then journal "default" should have 2 entries - And journal "work" should have 0 entries - - Scenario: Write to default config by default - Given we use the config "multiple.yaml" - When we run "jrnl this goes to default" - Then journal "default" should have 3 entries - And journal "work" should have 0 entries - - Scenario: Write to specified journal - Given we use the config "multiple.yaml" - When we run "jrnl work a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - - Scenario: Tell user which journal was used - Given we use the config "multiple.yaml" - When we run "jrnl work a long day in the office" - Then we should see the message "Entry added to work journal" - - Scenario: Write to specified journal with a timestamp - Given we use the config "multiple.yaml" - When we run "jrnl work 23 july 2012: a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - And journal "work" should contain "2012-07-23" - - Scenario: Write to specified journal without a timestamp but with colon - Given we use the config "multiple.yaml" - When we run "jrnl work : a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - And journal "work" should contain "a long day in the office" - - Scenario: Write to specified journal without a timestamp but with colon - Given we use the config "multiple.yaml" - When we run "jrnl work: a long day in the office" - Then journal "default" should have 2 entries - And journal "work" should have 1 entry - And journal "work" should contain "a long day in the office" - - Scenario: Create new journals as required - Given we use the config "multiple.yaml" - Then journal "ideas" should not exist - When we run "jrnl ideas 23 july 2012: sell my junk on ebay and make lots of money" - Then journal "ideas" should have 1 entry - - Scenario: Don't crash if no default journal is specified - Given we use the config "bug343.yaml" - When we run "jrnl a long day in the office" - Then we should see the message "No default journal configured" - - Scenario: Don't crash if no file exists for a configured encrypted journal - Given we use the config "multiple.yaml" - When we run "jrnl new_encrypted Adding first entry" and enter - """ - these three eyes - these three eyes - n - """ - Then we should see the message "Encrypted journal 'new_encrypted' created" diff --git a/features/overrides.feature b/features/overrides.feature deleted file mode 100644 index e0cdd9f0..00000000 --- a/features/overrides.feature +++ /dev/null @@ -1,98 +0,0 @@ -Feature: Implementing Runtime Overrides for Select Configuration Keys - - Scenario: Override configured editor with built-in input === editor:'' - Given we use the config "basic_encrypted.yaml" - And we use the password "test" if prompted - When we run "jrnl --config-override editor ''" - Then the stdin prompt should have been called - - Scenario: Postconfig commands with overrides - Given We use the config "basic_encrypted.yaml" - And we use the password "test" if prompted - When we run "jrnl --decrypt --config-override highlight false --config-override editor nano" - Then the config should have "highlight" set to "bool:false" - And no editor should have been called - - Scenario: Override configured linewrap with a value of 23 - Given we use the config "simple.yaml" - And we use the password "test" if prompted - When we run "jrnl -2 --config-override linewrap 23 --format fancy" - Then the output should be - - """ - ┎─────╮2013-06-09 15:39 - ┃ My ╘═══════════════╕ - ┃ fir st ent ry. │ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ Everything is │ - ┃ alright │ - ┖─────────────────────┘ - ┎─────╮2013-06-10 15:40 - ┃ Lif ╘═══════════════╕ - ┃ e is goo d. │ - ┠╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ - ┃ But I'm better. │ - ┖─────────────────────┘ - """ - - Scenario: Override color selections with runtime overrides - Given we use the config "basic_encrypted.yaml" - And we use the password "test" if prompted - When we run "jrnl -1 --config-override colors.body blue" - Then the config should have "colors.body" set to "blue" - - Scenario: Apply multiple config overrides - Given we use the config "basic_encrypted.yaml" - And we use the password "test" if prompted - When we run "jrnl -1 --config-override colors.body green --config-override editor 'nano'" - Then the config should have "colors.body" set to "green" - And the config should have "editor" set to "nano" - - - Scenario Outline: Override configured editor - Given we use the config "basic_encrypted.yaml" - And we use the password "test" if prompted - When we run "jrnl --config-override editor ''" - Then the editor should have been called - Examples: Editor Commands - | editor | - | nano | - | vi -c startinsert | - | code -w | - - Scenario: Override default journal - Given we use the config "basic_dayone.yaml" - And we use the password "test" if prompted - When we run "jrnl --debug --config-override journals.default features/journals/simple.journal 20 Mar 2000: The rain in Spain comes from clouds" - Then we should get no error - And we should see the message "Entry added" - When we run "jrnl -3 --debug --config-override journals.default features/journals/simple.journal" - Then the output should be - """ - 2000-03-20 09:00 The rain in Spain comes from clouds - - 2013-06-09 15:39 My first entry. - | Everything is alright - - 2013-06-10 15:40 Life is good. - | But I'm better. - """ - - - Scenario: Make an entry into an overridden journal - Given we use the config "basic_dayone.yaml" - And we use the password "test" if prompted - When we run "jrnl --config-override journals.temp features/journals/simple.journal temp Sep 06 1969: @say Ni" - Then we should get no error - And we should see the message "Entry added" - When we run "jrnl --config-override journals.temp features/journals/simple.journal temp -3" - Then the output should be - """ - 1969-09-06 09:00 @say Ni - - 2013-06-09 15:39 My first entry. - | Everything is alright - - 2013-06-10 15:40 Life is good. - | But I'm better. - """ diff --git a/features/password.feature b/features/password.feature deleted file mode 100644 index 332ba86e..00000000 --- a/features/password.feature +++ /dev/null @@ -1,116 +0,0 @@ -Feature: Using the installed keyring - - Scenario: Storing a password in keyring - Given we use the config "multiple.yaml" - And we have a keyring - When we run "jrnl simple --encrypt" and enter - """ - sabertooth - sabertooth - y - """ - Then the config for journal "simple" should have "encrypt" set to "bool:True" - When we run "jrnl simple -n 1" - Then the output should contain "2013-06-10 15:40 Life is good" - - Scenario: Encrypt journal with no keyring backend and do not store in keyring - Given we use the config "simple.yaml" - And we do not have a keyring - When we run "jrnl test entry" - And we run "jrnl --encrypt" and enter - """ - password - password - n - """ - Then we should get no error - And we should not see the message "Failed to retrieve keyring" - - Scenario: Encrypt journal with no keyring backend and do store in keyring - Given we use the config "simple.yaml" - And we do not have a keyring - When we run "jrnl test entry" - And we run "jrnl --encrypt" and enter - """ - password - password - y - """ - Then we should get no error - And we should not see the message "Failed to retrieve keyring" - # @todo add step to check contents of keyring - - @todo - Scenario: Open an encrypted journal with wrong password in keyring - # This should ask the user for the password after the keyring fails - - @todo - Scenario: Decrypt journal with password in keyring - - @todo - Scenario: Decrypt journal without a keyring - - Scenario: Encrypt journal when keyring exists but fails - Given we use the config "simple.yaml" - And we have a failed keyring - When we run "jrnl --encrypt" and enter - """ - this password will not be saved in keyring - this password will not be saved in keyring - y - """ - Then we should see the message "Failed to retrieve keyring" - And we should get no error - And we should be prompted for a password - And the config for journal "default" should have "encrypt" set to "bool:True" - - Scenario: Decrypt journal when keyring exists but fails - Given we use the config "encrypted.yaml" - And we have a failed keyring - When we run "jrnl --decrypt" and enter "bad doggie no biscuit" - Then we should see the message "Failed to retrieve keyring" - And we should get no error - And we should be prompted for a password - And we should see the message "Journal decrypted" - And the config for journal "default" should have "encrypt" set to "bool:False" - And the journal should have 2 entries - - Scenario: Open encrypted journal when keyring exists but fails - # This should ask the user for the password after the keyring fails - Given we use the config "encrypted.yaml" - And we have a failed keyring - When we run "jrnl -n 1" and enter "bad doggie no biscuit" - Then we should see the message "Failed to retrieve keyring" - And we should get no error - And we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" - - Scenario: Mistyping your password - Given we use the config "simple.yaml" - When we run "jrnl --encrypt" and enter - """ - swordfish - sordfish - """ - Then we should be prompted for a password - And we should see the message "Passwords did not match" - And the config for journal "default" should not have "encrypt" set - And the journal should have 2 entries - - Scenario: Mistyping your password, then getting it right - Given we use the config "simple.yaml" - When we run "jrnl --encrypt" and enter - """ - swordfish - sordfish - swordfish - swordfish - n - """ - Then we should be prompted for a password - And we should see the message "Passwords did not match" - And we should see the message "Journal encrypted" - And the config for journal "default" should have "encrypt" set to "bool:True" - When we run "jrnl -n 1" and enter "swordfish" - Then we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" diff --git a/features/search.feature b/features/search.feature deleted file mode 100644 index 22351b7e..00000000 --- a/features/search.feature +++ /dev/null @@ -1,318 +0,0 @@ -Feature: Searching in a journal - - Scenario Outline: Displaying entries using -on today should display entries created today - Given we use the config ".yaml" - When we run "jrnl today: Adding an entry right now." - Then we should see the message "Entry added" - When we run "jrnl -on today" - Then the output should contain "Adding an entry right now." - But the output should not contain "Everything is alright" - And the output should not contain "Life is good" - - Examples: configs - | config | - | simple | - | empty_folder | - | dayone | - - Scenario Outline: Displaying entries using -from day should display correct entries - Given we use the config ".yaml" - When we run "jrnl yesterday: This thing happened yesterday" - Then we should see the message "Entry added" - When we run "jrnl today at 11:59pm: Adding an entry right now." - Then we should see the message "Entry added" - When we run "jrnl tomorrow: A future entry." - Then we should see the message "Entry added" - When we run "jrnl -from today" - Then the output should contain "Adding an entry right now." - And the output should contain "A future entry." - And the output should not contain "This thing happened yesterday" - - Examples: configs - | config | - | simple | - | empty_folder | - | dayone | - - Scenario Outline: Displaying entries using -from and -to day should display correct entries - Given we use the config ".yaml" - When we run "jrnl yesterday: This thing happened yesterday" - Then we should see the message "Entry added" - When we run "jrnl today at 11:59pm: Adding an entry right now." - Then we should see the message "Entry added" - When we run "jrnl tomorrow: A future entry." - Then we should see the message "Entry added" - When we run "jrnl -from yesterday -to today" - Then the output should contain "This thing happened yesterday" - And the output should contain "Adding an entry right now." - And the output should not contain "A future entry." - - Examples: configs - | config | - | simple | - | empty_folder | - | dayone | - - Scenario Outline: Searching for a string - Given we use the config ".yaml" - When we run "jrnl -contains first --short" - Then we should get no error - And the output should be - """ - 2020-08-29 11:11 Entry the first. - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching for a string within tag results - Given we use the config ".yaml" - When we run "jrnl @tagone -contains maybe" - Then we should get no error - And the output should contain "maybe" - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching for a string within AND tag results - Given we use the config ".yaml" - When we run "jrnl -and @tagone @tagtwo -contains maybe" - Then we should get no error - And the output should contain "maybe" - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching for a string within NOT tag results - Given we use the config ".yaml" - When we run "jrnl -not @tagone -contains lonesome" - Then we should get no error - And the output should contain "lonesome" - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching for dates - Given we use the config ".yaml" - When we run "jrnl -on 2020-08-31 --short" - Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." - Then we flush the output - When we run "jrnl -on 'august 31 2020' --short" - Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario: Out of order entries to a Folder journal should be listed in date order - Given we use the config "empty_folder.yaml" - When we run "jrnl 3/7/2014 4:37pm: Second entry of journal." - Then we should see the message "Entry added" - When we run "jrnl 23 July 2013: Testing folder journal." - Then we should see the message "Entry added" - When we run "jrnl -2" - Then the output should be - """ - 2013-07-23 09:00 Testing folder journal. - - 2014-03-07 16:37 Second entry of journal. - """ - - Scenario Outline: Searching for all tags should show counts of each tag - Given we use the config ".yaml" - When we run "jrnl --tags" - Then we should get no error - And the output should be - """ - @tagtwo : 2 - @tagone : 2 - @tagthree : 1 - @ipsum : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Filtering journals should also filter tags - Given we use the config ".yaml" - When we run "jrnl -from 'september 2020' --tags" - Then we should get no error - And the output should be - """ - @tagthree : 1 - @tagone : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Excluding a tag should filter out all entries with that tag - Given we use the config ".yaml" - When we run "jrnl --tags -not @tagtwo" - Then the output should be - """ - @tagthree : 1 - @tagone : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Excluding multiple tags should filter out all entries with those tags - Given we use the config ".yaml" - When we run "jrnl --tags -not @tagone -not @tagthree" - Then the output should be - """ - @tagtwo : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case. - # https://github.com/jrnl-org/jrnl/issues/354 - Given we use the config "dayone.yaml" - When we run "jrnl @plAy" - Then the output should contain "2013-05-17 11:39 This entry has tags!" - - Scenario: Loading a sample journal - Given we use the config "simple.yaml" - When we run "jrnl -2" - Then we should get no error - And the output should be - """ - 2013-06-09 15:39 My first entry. - | Everything is alright - - 2013-06-10 15:40 Life is good. - | But I'm better. - """ - - Scenario Outline: Searching by month - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -month 9 --short" - Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - And we flush the output - When we run "jrnl -month Sept --short" - Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - And we flush the output - When we run "jrnl -month September --short" - Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching by day - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -day 31 --short" - Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series." - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching by year - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl 2019-01-01 01:01: I like this year." - And we run "jrnl -year 2019 --short" - Then the output should be "2019-01-01 01:01 I like this year." - And we flush the output - When we run "jrnl -year 19 --short" - Then the output should be "2019-01-01 01:01 I like this year." - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Combining month, day, and year search terms - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl -month 08 -day 29 --short" - Then the output should be "2020-08-29 11:11 Entry the first." - And we flush the output - When we run "jrnl -day 29 -year 2020 --short" - Then the output should be "2020-08-29 11:11 Entry the first." - And we flush the output - When we run "jrnl -month 09 -year 2020 --short" - Then the output should be "2020-09-24 09:14 The third entry finally after weeks without writing." - And we flush the output - When we run "jrnl -month 08 -day 29 -year 2020 --short" - Then the output should be "2020-08-29 11:11 Entry the first." - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Searching today in history - Given we use the config ".yaml" - And we use the password "test" if prompted - And we set current date and time to "2020-08-31 14:32" - When we run "jrnl 2019-08-31 01:01: Hi, from last year." - And we run "jrnl -today-in-history --short" - Then the output should be - """ - 2019-08-31 01:01 Hi, from last year. - 2020-08-31 14:32 A second entry in what I hope to be a long series. - """ - - Examples: configs - | config | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario: Loading a DayOne Journal - Given we use the config "dayone.yaml" - When we run "jrnl -from 'feb 2013'" - Then we should get no error - And the output should be - """ - 2013-05-17 11:39 This entry has tags! - - 2013-06-17 20:38 This entry has a location. - - 2013-07-17 11:38 This entry is starred! - """ diff --git a/features/star.feature b/features/star.feature deleted file mode 100644 index f0188056..00000000 --- a/features/star.feature +++ /dev/null @@ -1,35 +0,0 @@ -Feature: Starring entries - - Scenario Outline: Starring an entry will mark it in the journal file - Given we use the config ".yaml" - When we run "jrnl 20 july 2013 *: Best day of my life!" - Then we should see the message "Entry added" - When we run "jrnl -on 2013-07-20 -starred" - Then the output should contain "2013-07-20 09:00 Best day of my life!" - - Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - - Scenario Outline: Filtering by starred entries will show only starred entries - Given we use the config ".yaml" - When we run "jrnl -starred" - Then the output should be empty - When we run "jrnl 20 july 2013 *: Best day of my life!" - When we run "jrnl -starred" - Then the output should be "2013-07-20 09:00 Best day of my life!" - - Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone_empty | - - Scenario: Starring an entry will mark it in an encrypted journal - Given we use the config "encrypted.yaml" - When we run "jrnl 20 july 2013 *: Best day of my life!" and enter "bad doggie no biscuit" - Then we should see the message "Entry added" - When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit" - Then the output should contain "2013-07-20 09:00 Best day of my life!" diff --git a/features/steps/core.py b/features/steps/core.py deleted file mode 100644 index 2ad5bcc4..00000000 --- a/features/steps/core.py +++ /dev/null @@ -1,687 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -import ast -from collections import defaultdict -from jrnl.args import parse_args -import os -from pathlib import Path -import re -import time -from unittest.mock import patch - -from behave import given -from behave import then -from behave import when -import keyring - -import toml -import yaml -from yaml.loader import SafeLoader - - -import jrnl.time -from jrnl import Journal -from jrnl import __version__ -from jrnl import plugins -from jrnl.cli import cli -from jrnl.config import load_config -from jrnl.os_compat import split_args -from jrnl.override import apply_overrides, _recursively_apply - -try: - import parsedatetime.parsedatetime_consts as pdt -except ImportError: - import parsedatetime as pdt - -consts = pdt.Constants(usePyICU=False) -consts.DOWParseStyle = -1 # Prefers past weekdays -CALENDAR = pdt.Calendar(consts) - - -class TestKeyring(keyring.backend.KeyringBackend): - """A test keyring that just stores its values in a hash""" - - priority = 1 - keys = defaultdict(dict) - - def set_password(self, servicename, username, password): - self.keys[servicename][username] = password - - def get_password(self, servicename, username): - return self.keys[servicename].get(username) - - def delete_password(self, servicename, username): - self.keys[servicename][username] = None - - -class NoKeyring(keyring.backend.KeyringBackend): - """A keyring that simulated an environment with no keyring backend.""" - - priority = 2 - keys = defaultdict(dict) - - def set_password(self, servicename, username, password): - raise keyring.errors.NoKeyringError - - def get_password(self, servicename, username): - raise keyring.errors.NoKeyringError - - def delete_password(self, servicename, username): - raise keyring.errors.NoKeyringError - - -class FailedKeyring(keyring.backend.KeyringBackend): - """ - A keyring that cannot be retrieved. - """ - - priority = 2 - - def set_password(self, servicename, username, password): - raise keyring.errors.KeyringError - - def get_password(self, servicename, username): - raise keyring.errors.KeyringError - - def delete_password(self, servicename, username): - raise keyring.errors.KeyringError - - -# set a default keyring -keyring.set_keyring(TestKeyring()) - - -def read_journal(context, journal_name="default"): - configuration = load_config(context.config_path) - with open(configuration["journals"][journal_name]) as journal_file: - journal = journal_file.read() - return journal - - -def open_journal(context, journal_name="default"): - configuration = load_config(context.config_path) - journal_conf = configuration["journals"][journal_name] - - # We can override the default config on a by-journal basis - if type(journal_conf) is dict: - configuration.update(journal_conf) - # But also just give them a string to point to the journal file - else: - configuration["journal"] = journal_conf - - return Journal.open_journal(journal_name, configuration) - - -def read_value_from_string(string): - if string[0] == "{": - # Handle value being a dictionary - return ast.literal_eval(string) - - # Takes strings like "bool:true" or "int:32" and coerces them into proper type - string_parts = string.split(":") - if len(string_parts) > 1: - type = string_parts[0] - value = string_parts[1:][0] # rest of the text - value = {"bool": lambda v: v.lower() == "true", "int": int, "str": str}[type]( - value - ) - else: - value = string_parts[0] - return value - - -@given('we use the config "{config_file}"') -def set_config(context, config_file): - full_path = os.path.join("features/configs", config_file) - - context.config_path = os.path.abspath(full_path) - - if config_file.endswith("yaml") and os.path.exists(full_path): - # Add jrnl version to file for 2.x journals - with open(context.config_path, "a") as cf: - cf.write("version: {}".format(__version__)) - - -@given('we use the password "{password}" if prompted') -def use_password_forever(context, password): - context.password = password - - -@given('we use the password "{password}" {num:d} times if prompted') -def use_password(context, password, num=1): - context.password = iter([password] * num) - - -@given("we have a keyring") -@given("we have a {type} keyring") -def set_keyring(context, type=""): - if type == "failed": - keyring.set_keyring(FailedKeyring()) - else: - keyring.set_keyring(TestKeyring()) - - -@given("we do not have a keyring") -def disable_keyring(context): - keyring.core.set_keyring(NoKeyring()) - - -@given('we set current date and time to "{dt}"') -def set_datetime(context, dt): - context.now = dt - - -@when('we change directory to "{path}"') -def move_up_dir(context, path): - os.chdir(path) - - -@when("we open the editor and {method}") -@when('we open the editor and {method} "{text}"') -@when("we open the editor and {method} nothing") -@when("we open the editor and {method} nothing") -def open_editor_and_enter(context, method, text=""): - text = text or context.text or "" - - if method == "enter": - file_method = "w+" - elif method == "append": - file_method = "a" - else: - file_method = "r+" - - def _mock_editor(command): - context.editor_command = command - tmpfile = command[-1] - with open(tmpfile, file_method) as f: - f.write(text) - - return tmpfile - - if "password" in context: - password = context.password - else: - password = "" - - # fmt: off - # see: https://github.com/psf/black/issues/664 - with \ - patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ - patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ - patch("sys.stdin.isatty", return_value=True), \ - patch("jrnl.time.parse", side_effect=_mock_time_parse(context)), \ - patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ - patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ - : - context.editor = mock_editor - context.getpass = mock_getpass - try: - cli(["--edit"]) - context.exit_status = 0 - except SystemExit as e: - context.exit_status = e.code - - # fmt: on - - -@then("the editor should have been called") -@then("the editor should have been called with {num} arguments") -def count_editor_args(context, num=None): - assert context.editor.called - - if isinstance(num, int): - assert len(context.editor_command) == int(num) - - -@then("the editor should not have been called") -def no_editor_called(context, num=None): - assert "editor" not in context or not context.editor.called - - -@then('one editor argument should be "{arg}"') -def contains_editor_arg(context, arg): - args = context.editor_command - assert ( - arg in args and args.count(arg) == 1 - ), f"\narg not in args exactly 1 time:\n{arg}\n{str(args)}" - - -@then('one editor argument should match "{regex}"') -def matches_editor_arg(context, regex): - args = context.editor_command - matches = list(filter(lambda x: re.search(regex, x), args)) - assert ( - len(matches) == 1 - ), f"\nRegex didn't match exactly 1 time:\n{regex}\n{str(args)}" - - -@then("the editor file content should {method}") -@then("the editor file content should {method} empty") -@then('the editor file content should {method} "{text}"') -def contains_editor_file(context, method, text=""): - text = text or context.text or "" - content = context.editor_file.get("content") - format = f'\n"""\n{content}\n"""\n' - if method == "be": - assert content == text, format - elif method == "contain": - assert text in content, format - else: - assert False, f"Method '{method}' not supported" - - -@then('the temporary filename suffix should be "{suffix}"') -def extension_editor_file(context, suffix): - filename = Path(context.editor_file["name"]).name - delimiter = "-" if "-" in filename else "." - filename_suffix = delimiter + filename.split(delimiter)[-1] - assert filename_suffix == suffix - - -def _mock_getpass(inputs): - def prompt_return(prompt=""): - if type(inputs) == str: - return inputs - try: - return next(inputs) - except StopIteration: - raise KeyboardInterrupt - - return prompt_return - - -def _mock_input(inputs): - def prompt_return(prompt=""): - try: - val = next(inputs) - print(prompt, val) - return val - except StopIteration: - raise KeyboardInterrupt - - return prompt_return - - -def _mock_time_parse(context): - original_parse = jrnl.time.parse - if "now" not in context: - return original_parse - - def wrapper(input, *args, **kwargs): - input = context.now if input == "now" else input - return original_parse(input, *args, **kwargs) - - return wrapper - - -@when('we run "{command}" and enter') -@when('we run "{command}" and enter nothing') -@when('we run "{command}" and enter "{inputs}"') -def run_with_input(context, command, inputs=""): - # create an iterator through all inputs. These inputs will be fed one by one - # to the mocked calls for 'input()', 'util.getpass()' and 'sys.stdin.read()' - if context.text: - text = iter(context.text.split("\n")) - else: - text = iter([inputs]) - - args = split_args(command)[1:] - context.args = args - - def _mock_editor(command): - context.editor_command = command - tmpfile = command[-1] - with open(tmpfile, "r") as editor_file: - file_content = editor_file.read() - context.editor_file = {"name": tmpfile, "content": file_content} - Path(tmpfile).touch() - - if "password" in context: - password = context.password - else: - password = text - - # fmt: off - # see: https://github.com/psf/black/issues/664 - with \ - patch("builtins.input", side_effect=_mock_input(text)) as mock_input, \ - patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ - patch("sys.stdin.read", side_effect=text) as mock_read, \ - patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ - patch("jrnl.time.parse", side_effect=_mock_time_parse(context)), \ - patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ - patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ - : - try: - cli(args or []) - context.exit_status = 0 - except SystemExit as e: - context.exit_status = e.code - - # put mocks into context so they can be checked later in "then" statements - context.editor = mock_editor - context.input = mock_input - context.getpass = mock_getpass - context.read = mock_read - context.iter_text = text - - context.execute_steps(''' - Then all input was used - And at least one input method was called - ''') - - # fmt: on - - -@then("at least one input method was called") -def inputs_were_called(context): - assert ( - context.input.called - or context.getpass.called - or context.read.called - or context.editor.called - ) - - -@then("we should be prompted for a password") -def password_was_called(context): - assert context.getpass.called - - -@then("we should not be prompted for a password") -def password_was_not_called(context): - assert not context.getpass.called - - -@then("all input was used") -def all_input_was_used(context): - # all inputs were used (ignore if empty string) - for temp in context.iter_text: - assert "" == temp, "Not all inputs were consumed" - - -@when('we run "{command}"') -@when('we run "{command}" and pipe') -@when('we run "{command}" and pipe "{text}"') -def run(context, command, text=""): - text = text or context.text or "" - - if "config_path" in context and context.config_path is not None: - with open(context.config_path) as f: - context.jrnl_config = yaml.load(f, Loader=yaml.SafeLoader) - else: - context.jrnl_config = None - - if "cache_dir" in context and context.cache_dir is not None: - cache_dir = os.path.join("features", "cache", context.cache_dir) - command = command.format(cache_dir=cache_dir) - if "config_path" in context and context.config_path is not None: - with open(context.config_path, "r") as f: - cfg = yaml.load(f, Loader=SafeLoader) - context.jrnl_config = cfg - - args = split_args(command) - context.args = args[1:] - - def _mock_editor(command): - context.editor_command = command - tmpfile = command[-1] - with open(tmpfile, "r") as editor_file: - file_content = editor_file.read() - context.editor_file = {"name": tmpfile, "content": file_content} - Path(tmpfile).touch() - - if "password" in context: - password = context.password - else: - password = iter(text) - - try: - # fmt: off - # see: https://github.com/psf/black/issues/664 - with \ - patch("sys.argv", args), \ - patch("getpass.getpass", side_effect=_mock_getpass(password)) as mock_getpass, \ - patch("subprocess.call", side_effect=_mock_editor) as mock_editor, \ - patch("sys.stdin.read", side_effect=lambda: text), \ - patch("jrnl.time.parse", side_effect=_mock_time_parse(context)), \ - patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ - patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ - : - context.editor = mock_editor - context.getpass = mock_getpass - cli(args[1:]) - context.exit_status = 0 - # fmt: on - except SystemExit as e: - context.exit_status = e.code - - -@given('we load template "{filename}"') -def load_template(context, filename): - full_path = os.path.join("features/data/templates", filename) - exporter = plugins.template_exporter.__exporter_from_file(full_path) - plugins.__exporter_types[exporter.names[0]] = exporter - - -@when('we set the keyring password of "{journal}" to "{password}"') -def set_keyring_password(context, journal, password): - keyring.set_password("jrnl", journal, password) - - -@then("we should get an error") -def has_error(context): - assert context.exit_status != 0, context.exit_status - - -@then("we should get no error") -def no_error(context): - assert context.exit_status == 0, context.exit_status - - -@then("we flush the output") -def flush_stdout(context): - context.stdout_capture.truncate(0) - context.stdout_capture.seek(0) - - -@then("we flush the error output") -def flush_stderr(context): - context.stderr_capture.truncate(0) - context.stderr_capture.seek(0) - - -@then("we flush all the output") -def flush_all_output(context): - context.execute_steps( - """ - Then we flush the output - Then we flush the error output - """ - ) - - -@then("the output should be") -@then("the output should be empty") -@then('the output should be "{text}"') -def check_output(context, text=None): - text = (text or context.text or "").strip().splitlines() - out = context.stdout_capture.getvalue().strip().splitlines() - assert len(text) == len(out), "Output has {} lines (expected: {})".format( - len(out), len(text) - ) - for line_text, line_out in zip(text, out): - assert line_text.strip() == line_out.strip(), [ - line_text.strip(), - line_out.strip(), - ] - - -@then('the output should contain "{text}" in the local time') -def check_output_time_inline(context, text): - out = context.stdout_capture.getvalue() - date, flag = CALENDAR.parse(text) - output_date = time.strftime("%Y-%m-%d %H:%M", date) - assert output_date in out, output_date - - -@then("the output should contain pyproject.toml version") -def check_output_version_inline(context): - out = context.stdout_capture.getvalue() - pyproject = (Path(__file__) / ".." / ".." / ".." / "pyproject.toml").resolve() - pyproject_contents = toml.load(pyproject) - pyproject_version = pyproject_contents["tool"]["poetry"]["version"] - assert pyproject_version in out, pyproject_version - - -@then("the output should contain") -@then('the output should contain "{text}"') -@then('the output should contain "{text}" or "{text2}"') -def check_output_inline(context, text=None, text2=None): - text = text or context.text - out = context.stdout_capture.getvalue() - assert (text and text in out) or (text2 and text2 in out) - - -@then("the error output should contain") -@then('the error output should contain "{text}"') -@then('the error output should contain "{text}" or "{text2}"') -def check_error_output_inline(context, text=None, text2=None): - text = text or context.text - out = context.stderr_capture.getvalue() - assert (text and text in out) or (text2 and text2 in out) - - -@then('the output should match "{regex}"') -@then('the output should match "{regex}" {num} times') -def matches_std_output(context, regex, num=1): - out = context.stdout_capture.getvalue() - matches = re.findall(regex, out) - assert ( - matches and len(matches) == num - ), f"\nRegex didn't match exactly {num} time(s):\n{regex}\n{str(out)}\n{str(matches)}" - - -@then('the error output should match "{regex}"') -@then('the error output should match "{regex}" {num} times') -def matches_err_ouput(context, regex, num=1): - out = context.stderr_capture.getvalue() - matches = re.findall(regex, out) - assert ( - matches and len(matches) == num - ), f"\nRegex didn't match exactly {num} time(s):\n{regex}\n{str(out)}\n{str(matches)}" - - -@then('the output should not contain "{text}"') -def check_output_not_inline(context, text): - out = context.stdout_capture.getvalue() - assert text not in out - - -@then('we should see the message "{text}"') -@then('the error output should be "{text}"') -def check_message(context, text): - out = context.stderr_capture.getvalue() - assert text in out, [text, out] - - -@then('we should not see the message "{text}"') -def check_not_message(context, text): - out = context.stderr_capture.getvalue() - assert text not in out, [text, out] - - -@then('the journal should contain "{text}"') -@then('journal "{journal_name}" should contain "{text}"') -def check_journal_content(context, text, journal_name="default"): - journal = read_journal(context, journal_name) - assert text in journal, journal - - -@then('the journal should not contain "{text}"') -@then('journal "{journal_name}" should not contain "{text}"') -def check_not_journal_content(context, text, journal_name="default"): - journal = read_journal(context, journal_name) - assert text not in journal, journal - - -@then("the journal should not exist") -@then('journal "{journal_name}" should not exist') -def journal_doesnt_exist(context, journal_name="default"): - configuration = load_config(context.config_path) - - journal_path = configuration["journals"][journal_name] - assert not os.path.exists(journal_path) - - -@then("the journal should exist") -@then('journal "{journal_name}" should exist') -def journal_exists(context, journal_name="default"): - configuration = load_config(context.config_path) - - journal_path = configuration["journals"][journal_name] - assert os.path.exists(journal_path) - - -@then('the config should have "{key}" set to') -@then('the config should have "{key}" set to "{value}"') -@then('the config for journal "{journal}" should have "{key}" set to "{value}"') -def config_var(context, key, value="", journal=None): - key_as_vec = key.split(".") - - if "args" in context: - parsed = parse_args(context.args) - overrides = parsed.config_override - value = read_value_from_string(value or context.text or "") - configuration = load_config(context.config_path) - - if journal: - configuration = configuration["journals"][journal] - - if overrides: - with patch.object( - jrnl.override, "_recursively_apply", wraps=_recursively_apply - ) as spy_recurse: - configuration = apply_overrides(overrides, configuration) - runtime_cfg = spy_recurse.call_args_list[0][0][0] - else: - runtime_cfg = configuration - # extract the value of the desired key from the configuration after overrides have been applied - for k in key_as_vec: - runtime_cfg = runtime_cfg["%s" % k] - assert runtime_cfg == value - - -@then('the config for journal "{journal}" should not have "{key}" set') -def config_no_var(context, key, value="", journal=None): - configuration = load_config(context.config_path) - - if journal: - configuration = configuration["journals"][journal] - - assert key not in configuration - - -@then("the journal should have {number:d} entries") -@then("the journal should have {number:d} entry") -@then('journal "{journal_name}" should have {number:d} entries') -@then('journal "{journal_name}" should have {number:d} entry') -def check_journal_entries(context, number, journal_name="default"): - journal = open_journal(context, journal_name) - assert len(journal.entries) == number - - -@when("the journal directory is listed") -def list_journal_directory(context, journal="default"): - with open(context.config_path) as config_file: - configuration = yaml.load(config_file, Loader=yaml.SafeLoader) - journal_path = configuration["journals"][journal] - for root, dirnames, f in os.walk(journal_path): - for file in f: - print(os.path.join(root, file)) - - -@then("fail") -def debug_fail(context): - assert False diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py deleted file mode 100644 index 8141dc36..00000000 --- a/features/steps/export_steps.py +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - - -import json -import os -import shutil -import random -import string -from xml.etree import ElementTree -from behave import given -from behave import then - - -@then("the output should be {width:d} columns wide") -def check_output_width(context, width): - out = context.stdout_capture.getvalue() - out_lines = out.splitlines() - for line in out_lines: - assert len(line) <= width - - -@then("the output should be parsable as json") -def check_output_json(context): - out = context.stdout_capture.getvalue() - assert json.loads(out), out - - -@then('"{field}" in the json output should have {number:d} elements') -@then('"{field}" in the json output should have 1 element') -def check_output_field(context, field, number=1): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json, [field, out_json] - assert len(out_json[field]) == number, len(out_json[field]) - - -@then('"{field}" in the json output should not contain "{key}"') -def check_output_field_not_key(context, field, key): - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert field in out_json - assert key not in out_json[field] - - -@then('"{field}" in the json output should contain "{key}"') -def check_output_field_key(context, field, key): - out = context.stdout_capture.getvalue() - struct = json.loads(out) - - for node in field.split("."): - try: - struct = struct[int(node)] - except ValueError: - assert node in struct - struct = struct[node] - - assert key in struct - - -@then("the json output should contain {path}") -@then('the json output should contain {path} = "{value}"') -def check_json_output_path(context, path, value=None): - """E.g. - the json output should contain entries.0.title = "hello" - """ - out = context.stdout_capture.getvalue() - struct = json.loads(out) - - for node in path.split("."): - try: - struct = struct[int(node)] - except ValueError: - struct = struct[node] - - if value is not None: - assert struct == value, struct - else: - assert struct is not None - - -@then( - 'entry {entry_number:d} should have an array "{name}" with {items_number:d} elements' -) -def entry_array_count(context, entry_number, name, items_number): - # note that entry_number is 1-indexed. - out = context.stdout_capture.getvalue() - out_json = json.loads(out) - assert len(out_json["entries"][entry_number - 1][name]) == items_number - - -@then("the output should be a valid XML string") -def assert_valid_xml_string(context): - output = context.stdout_capture.getvalue() - xml_tree = ElementTree.fromstring(output) - assert xml_tree, output - - -@then('"{item}" node in the xml output should have {number:d} elements') -def assert_xml_output_entries_count(context, item, number): - output = context.stdout_capture.getvalue() - xml_tree = ElementTree.fromstring(output) - - xml_tags = (node.tag for node in xml_tree) - assert item in xml_tags, str(list(xml_tags)) - - actual_entry_count = len(xml_tree.find(item)) - assert actual_entry_count == number, actual_entry_count - - -@then('there should be {number:d} "{item}" elements') -def count_elements(context, number, item): - output = context.stdout_capture.getvalue() - xml_tree = ElementTree.fromstring(output) - assert len(xml_tree.findall(".//" + item)) == number - - -@then('"tags" in the xml output should contain {expected_tags_json_list}') -def assert_xml_output_tags(context, expected_tags_json_list): - output = context.stdout_capture.getvalue() - xml_tree = ElementTree.fromstring(output) - - xml_tags = (node.tag for node in xml_tree) - assert "tags" in xml_tags, str(list(xml_tags)) - - expected_tags = json.loads(expected_tags_json_list) - actual_tags = set(t.attrib["name"] for t in xml_tree.find("tags")) - assert actual_tags == set(expected_tags), [actual_tags, set(expected_tags)] - - -@given('we create cache directory "{dir_name}"') -@given("we create a cache directory") -def create_directory(context, dir_name=None): - if not dir_name: - dir_name = "cache_" + "".join( - random.choices(string.ascii_uppercase + string.digits, k=20) - ) - - working_dir = os.path.join("features", "cache", dir_name) - if os.path.exists(working_dir): - shutil.rmtree(working_dir) - os.makedirs(working_dir) - context.cache_dir = dir_name - - -@then('cache "{dir_name}" should contain the files') -@then('cache "{dir_name}" should contain the files {expected_files_json_list}') -@then("the cache should contain the files") -def assert_dir_contains_files(context, dir_name=None, expected_files_json_list=""): - if not dir_name: - dir_name = context.cache_dir - - working_dir = os.path.join("features", "cache", dir_name) - actual_files = os.listdir(working_dir) - - expected_files = context.text or expected_files_json_list - expected_files = expected_files.split("\n") - - # sort to deal with inconsistent default file ordering on different OS's - actual_files.sort() - expected_files.sort() - - assert actual_files == expected_files, [actual_files, expected_files] - - -@then('the content of file "{file_path}" in cache directory "{cache_dir}" should be') -@then('the content of file "{file_path}" in the cache should be') -def assert_exported_yaml_file_content(context, file_path, cache_dir=None): - if not cache_dir: - cache_dir = context.cache_dir - - expected_content = context.text.strip().splitlines() - full_file_path = os.path.join("features", "cache", cache_dir, file_path) - - with open(full_file_path, "r") as f: - actual_content = f.read().strip().splitlines() - - for actual_line, expected_line in zip(actual_content, expected_content): - if actual_line.startswith("tags: ") and expected_line.startswith("tags: "): - assert_equal_tags_ignoring_order( - actual_line, expected_line, actual_content, expected_content - ) - else: - assert actual_line.strip() == expected_line.strip(), [ - [actual_line.strip(), expected_line.strip()], - [actual_content, expected_content], - ] - - -def assert_equal_tags_ignoring_order( - actual_line, expected_line, actual_content, expected_content -): - actual_tags = set(tag.strip() for tag in actual_line[len("tags: ") :].split(",")) - expected_tags = set( - tag.strip() for tag in expected_line[len("tags: ") :].split(",") - ) - assert actual_tags == expected_tags, [ - [actual_tags, expected_tags], - [expected_content, actual_content], - ] diff --git a/features/steps/override.py b/features/steps/override.py deleted file mode 100644 index ff1760ed..00000000 --- a/features/steps/override.py +++ /dev/null @@ -1,77 +0,0 @@ -from jrnl.jrnl import run -from unittest import mock - -# from __future__ import with_statement -from jrnl.args import parse_args -from behave import then - -from features.steps.core import _mock_getpass, _mock_time_parse - - -@then("the editor {editor} should have been called") -@then("No editor should have been called") -def editor_override(context, editor=None): - def _mock_write_in_editor(config): - editor = config["editor"] - journal = "features/journals/journal.jrnl" - context.tmpfile = journal - print("%s has been launched" % editor) - return journal - - if "password" in context: - password = context.password - else: - password = "" - # fmt: off - # see: https://github.com/psf/black/issues/664 - with \ - mock.patch("jrnl.jrnl._write_in_editor", side_effect=_mock_write_in_editor(context.jrnl_config)) as mock_write_in_editor, \ - mock.patch("sys.stdin.isatty", return_value=True), \ - mock.patch('getpass.getpass',side_effect=_mock_getpass(password)), \ - mock.patch("jrnl.time.parse", side_effect = _mock_time_parse(context)), \ - mock.patch("jrnl.config.get_config_path", side_effect=lambda: context.config_path), \ - mock.patch("jrnl.install.get_config_path", side_effect=lambda: context.config_path) \ - : - try : - parsed_args = parse_args(context.args) - run(parsed_args) - context.exit_status = 0 - context.editor = mock_write_in_editor - expected_config = context.jrnl_config - expected_config['editor'] = '%s'%editor - expected_config['journal'] ='features/journals/journal.jrnl' - - if editor is not None: - assert mock_write_in_editor.call_count == 1 - assert mock_write_in_editor.call_args[0][0]['editor']==editor - else: - # Expect that editor is *never* called - mock_write_in_editor.assert_not_called() - except SystemExit as e: - context.exit_status = e.code - # fmt: on - - -@then("the stdin prompt should have been called") -def override_editor_to_use_stdin(context): - - try: - with mock.patch( - "sys.stdin.read", - return_value="Zwei peanuts walk into a bar und one of zem was a-salted", - ) as mock_stdin_read, mock.patch( - "jrnl.install.load_or_install_jrnl", return_value=context.jrnl_config - ), mock.patch( - "jrnl.Journal.open_journal", - spec=False, - return_value="features/journals/journal.jrnl", - ), mock.patch( - "getpass.getpass", side_effect=_mock_getpass("test") - ): - parsed_args = parse_args(context.args) - run(parsed_args) - context.exit_status = 0 - mock_stdin_read.assert_called_once() - - except SystemExit as e: - context.exit_status = e.code diff --git a/features/tag.feature b/features/tag.feature deleted file mode 100644 index b7b687b5..00000000 --- a/features/tag.feature +++ /dev/null @@ -1,53 +0,0 @@ -Feature: Tagging -# See search.feature for tag-related searches -# And format.feature for tag-related output - - Scenario Outline: Tags should allow certain special characters such as /, +, # - Given we use the config ".yaml" - When we run "jrnl 2020-09-26: This is an entry about @os/2 and @c++ and @c#" - When we run "jrnl --tags -on 2020-09-26" - Then we should get no error - And the output should be - """ - @os/2 : 1 - @c++ : 1 - @c# : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Emails addresses should not be parsed as tags - Given we use the config ".yaml" - When we run "jrnl 2020-09-26: The email address test@example.com does not seem to work for me" - When we run "jrnl 2020-09-26: The email address test@example.org also does not work for me" - When we run "jrnl 2020-09-26: I tried test@example.org and test@example.edu too" - Then we flush the output - When we run "jrnl --tags -on 2020-09-26" - Then we should get no error - And the output should be "[No tags found in journal.]" - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | - - Scenario Outline: Entry can start and end with tags - Given we use the config ".yaml" - When we run "jrnl 2020-09-26: @foo came over, we went to a @bar" - When we run "jrnl --tags -on 2020-09-26" - Then the output should be - """ - @foo : 1 - @bar : 1 - """ - - Examples: configs - | config | - | basic_onefile | - | basic_folder | - | basic_dayone | diff --git a/features/upgrade.feature b/features/upgrade.feature deleted file mode 100644 index fda47363..00000000 --- a/features/upgrade.feature +++ /dev/null @@ -1,71 +0,0 @@ -Feature: Upgrading Journals from 1.x.x to 2.x.x - - Scenario: Upgrade and parse journals with square brackets - Given we use the config "upgrade_from_195.json" - When we run "jrnl -9" and enter "Y" - Then the journal should have 2 entries - And the output should contain - """ - 2010-06-10 15:00 A life without chocolate is like a bad analogy. - """ - And the output should contain - """ - 2013-06-10 15:40 He said "[this] is the best time to be alive". - """ - - Scenario: Upgrading a journal encrypted with jrnl 1.x - Given we use the config "encrypted_old.json" - When we run "jrnl -n 1" and enter - """ - Y - bad doggie no biscuit - bad doggie no biscuit - """ - Then we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" - - Scenario: Upgrading a config without colors to colors - Given we use the config "no_colors.yaml" - When we run "jrnl -n 1" - Then the config should have "colors" set to - """ - { - 'date':'none', - 'title':'none', - 'body':'none', - 'tags':'none' - } - """ - - Scenario: Upgrade and parse journals with little endian date format - Given we use the config "upgrade_from_195_little_endian_dates.json" - When we run "jrnl -9" and enter "Y" - Then the journal should have 2 entries - And the output should contain - """ - 10.06.2010 15:00 A life without chocolate is like a bad analogy. - """ - And the output should contain - """ - 10.06.2013 15:40 He said "[this] is the best time to be alive". - """ - - Scenario: Upgrade with missing journal - Given we use the config "upgrade_from_195_with_missing_journal.json" - When we run "jrnl -ls" and enter - """" - Y - """ - Then the output should contain "Error: features/journals/missing.journal does not exist." - And we should get no error - - Scenario: Upgrade with missing encrypted journal - Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json" - When we run "jrnl -ls" and enter - """ - Y - bad doggie no biscuit - """ - Then the output should contain "Error: features/journals/missing.journal does not exist." - And the error output should contain "We're all done" - And we should get no error diff --git a/features/write.feature b/features/write.feature deleted file mode 100644 index eb22e480..00000000 --- a/features/write.feature +++ /dev/null @@ -1,216 +0,0 @@ -Feature: Writing new entries. - - Scenario Outline: Multiline entry with punctuation should keep title punctuation - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl This is. the title\\n This is the second line" - And we run "jrnl -n 1" - Then the output should contain "This is. the title" - - Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | - - Scenario Outline: Single line entry with period should be split at period - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl This is. the title" - And we run "jrnl -1" - Then the output should contain "| the title" - - Examples: configs - | config_file | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: CJK entry should be split at fullwidth period without following space. - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl 七転び。八起き" - And we run "jrnl -1" - Then the output should contain "| 八起き" - - Examples: configs - | config_file | - | basic_onefile | - | basic_encrypted | - | basic_folder | - | basic_dayone | - - Scenario Outline: Writing an entry from command line should store the entry - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." - Then we should see the message "Entry added" - When we run "jrnl -n 1" - Then the output should contain "2013-07-23 09:00 A cold and stormy day." - - Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | - - Scenario Outline: Writing a partial entry from command line with edit flag should go to the editor - Given we use the config ".yaml" - And we use the password "test" if prompted - When we run "jrnl this is a partial --edit" - Then we should see the message "Entry added" - Then the editor should have been called - And the editor file content should be - """ - this is a partial - """ - When we run "jrnl -n 1" - Then the output should contain "this is a partial" - - Examples: configs - | config_file | - | basic_onefile | - | basic_encrypted | - | basic_dayone | - | basic_folder | - - Scenario Outline: Writing an empty entry from the editor should yield "Nothing saved to file" message - Given we use the config ".yaml" - And we use the password "test" if prompted - When we open the editor and enter nothing - Then the error output should contain "[Nothing saved to file]" - - Examples: configs - | config_file | - | editor | - | editor_empty_folder | - | dayone | - | basic_encrypted | - | basic_onefile | - - @skip - Scenario Outline: Writing an empty entry from the command line with no editor should yield nothing - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl" and enter nothing - Then the output should be empty - And the error output should contain "Writing Entry; on a blank line" - And the editor should not have been called - - Examples: configs - | config_file | - | simple | - | empty_folder | - | encrypted | - # | dayone | @todo - - Scenario Outline: Writing an entry does not print the entire journal - # https://github.com/jrnl-org/jrnl/issues/87 - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." - Then we should see the message "Entry added" - When we run "jrnl -n 1" - Then the output should not contain "Life is good" - - Examples: configs - | config_file | - | editor | - | editor_empty_folder | - | dayone | - | encrypted | - - Scenario Outline: Embedded period stays in title - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic." - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should be - """ - 2014-04-24 09:00 Created a new website - empty.com. - | Hope to get a lot of traffic. - """ - - Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | - - Scenario Outline: Write and read emoji support - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" - Then we should see the message "Entry added" - When we run "jrnl -n 1" - Then the output should contain "🌞" - And the output should contain "🐘" - - Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | - - Scenario Outline: Writing an entry at the prompt (no editor) should store the entry - Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl" and enter "25 jul 2013: I saw Elvis. He's alive." - Then we should get no error - When we run "jrnl -on '2013-07-25'" - Then the output should contain "2013-07-25 09:00 I saw Elvis." - And the output should contain "| He's alive." - - Examples: configs - | config_file | - | simple | - | empty_folder | - | encrypted | - - @todo - Scenario: Writing an entry at the prompt (no editor) in DayOne journal - # Need to test DayOne w/out an editor - - Scenario: Writing into Dayone - Given we use the config "dayone.yaml" - When we run "jrnl 01 may 1979: Being born hurts." - And we run "jrnl -until 1980" - Then the output should be "1979-05-01 09:00 Being born hurts." - - Scenario: Writing into Dayone adds extended metadata - Given we use the config "dayone.yaml" - When we run "jrnl 01 may 1979: Being born hurts." - And we run "jrnl --export json" - Then "entries" in the json output should have 5 elements - And the json output should contain entries.0.creator.software_agent - And the json output should contain entries.0.creator.os_agent - And the json output should contain entries.0.creator.host_name - And the json output should contain entries.0.creator.generation_date - And the json output should contain entries.0.creator.device_agent - And "entries.0.creator.software_agent" in the json output should contain "jrnl" - - # fails when system time is UTC (as on Travis-CI) - @skip - Scenario: Title with an embedded period on DayOne journal - Given we use the config "dayone.yaml" - When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch."" - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should be - """ - 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. - | I'm feeling sore because I forgot to stretch. - """ - - Scenario: Opening an folder that's not a DayOne folder should treat as folder journal - Given we use the config "empty_folder.yaml" - When we run "jrnl 23 july 2013: Testing folder journal." - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should be "2013-07-23 09:00 Testing folder journal." diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 2d06115d..bc7e0b88 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -40,9 +40,7 @@ def run(args): original_config = config.copy() # Apply config overrides - overrides = args.config_override - if overrides: - config = apply_overrides(overrides, config) + config = apply_overrides(args, config) args = get_journal_name(args, config) config = scope_config(config, args.journal_name) diff --git a/jrnl/override.py b/jrnl/override.py index 7fd718f0..760b003e 100644 --- a/jrnl/override.py +++ b/jrnl/override.py @@ -1,7 +1,8 @@ from .config import update_config, make_yaml_valid_dict +from argparse import Namespace # import logging -def apply_overrides(overrides: list, base_config: dict) -> dict: +def apply_overrides(args: Namespace, base_config: dict) -> dict: """Unpack CLI provided overrides into the configuration tree. :param overrides: List of configuration key-value pairs collected from the CLI @@ -11,6 +12,10 @@ def apply_overrides(overrides: list, base_config: dict) -> dict: :return: Configuration to be used during runtime with the overrides applied :rtype: dict """ + overrides = vars(args).get("config_override", None) + if not overrides: + return base_config + cfg_with_overrides = base_config.copy() for pairs in overrides: diff --git a/poetry.lock b/poetry.lock index e718ea5a..8c86d892 100644 --- a/poetry.lock +++ b/poetry.lock @@ -69,23 +69,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "behave" -version = "1.2.6" -description = "behave is behaviour-driven development, Python style" -category = "main" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - -[package.dependencies] -parse = ">=1.8.2" -parse-type = ">=0.4.2" -six = ">=1.11" - -[package.extras] -develop = ["coverage", "pytest (>=3.0)", "pytest-cov", "tox", "invoke (>=0.21.0)", "path.py (>=8.1.2)", "pycmd", "pathlib", "modernize (>=0.5)", "pylint"] -docs = ["sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6)"] - [[package]] name = "black" version = "21.9b0" @@ -177,7 +160,7 @@ test = ["pytest (>=6.2.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pr [[package]] name = "decorator" -version = "5.0.9" +version = "5.1.0" description = "Decorators for Humans" category = "dev" optional = false @@ -199,7 +182,7 @@ pyflakes = ">=2.3.0,<2.4.0" [[package]] name = "ghp-import" -version = "2.0.1" +version = "2.0.2" description = "Copy your docs directly to the gh-pages branch." category = "dev" optional = false @@ -221,7 +204,7 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.6.1" +version = "4.8.1" description = "Read metadata from Python packages" category = "main" optional = false @@ -259,7 +242,7 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "7.25.0" +version = "7.28.0" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -289,14 +272,6 @@ parallel = ["ipyparallel"] qtconsole = ["qtconsole"] test = ["nose (>=0.10.1)", "requests", "testpath", "pygments", "nbformat", "ipykernel", "numpy (>=1.17)"] -[[package]] -name = "ipython-genutils" -version = "0.2.0" -description = "Vestigial utilities from IPython" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "jedi" version = "0.18.0" @@ -314,14 +289,14 @@ testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<6.0.0)"] [[package]] name = "jeepney" -version = "0.7.0" +version = "0.7.1" description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false python-versions = ">=3.6" [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio"] +test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio", "async-timeout"] trio = ["trio", "async-generator"] [[package]] @@ -358,7 +333,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [[package]] name = "mako" -version = "1.1.4" +version = "1.1.5" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." category = "main" optional = false @@ -395,7 +370,7 @@ python-versions = ">=3.6" [[package]] name = "matplotlib-inline" -version = "0.1.2" +version = "0.1.3" description = "Inline Matplotlib backend for Jupyter" category = "dev" optional = false @@ -535,7 +510,7 @@ python-versions = "*" [[package]] name = "platformdirs" -version = "2.2.0" +version = "2.4.0" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false @@ -547,17 +522,18 @@ test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock [[package]] name = "pluggy" -version = "0.13.1" +version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "pprintpp" @@ -569,11 +545,11 @@ python-versions = "*" [[package]] name = "prompt-toolkit" -version = "3.0.19" +version = "3.0.20" description = "Library for building powerful interactive command lines in Python" category = "dev" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.6.2" [package.dependencies] wcwidth = "*" @@ -620,7 +596,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.9.0" +version = "2.10.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false @@ -753,7 +729,7 @@ pyyaml = "*" [[package]] name = "regex" -version = "2021.7.6" +version = "2021.9.30" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -761,7 +737,7 @@ python-versions = "*" [[package]] name = "rich" -version = "10.6.0" +version = "10.11.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false @@ -814,7 +790,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomli" -version = "1.0.4" +version = "1.2.1" description = "A lil' TOML parser" category = "dev" optional = false @@ -822,15 +798,12 @@ python-versions = ">=3.6" [[package]] name = "traitlets" -version = "5.0.5" +version = "5.1.0" description = "Traitlets Python configuration system" category = "dev" optional = false python-versions = ">=3.7" -[package.dependencies] -ipython-genutils = "*" - [package.extras] test = ["pytest"] @@ -863,14 +836,14 @@ pytz = "*" [[package]] name = "watchdog" -version = "2.1.3" +version = "2.1.6" description = "Filesystem events monitoring" category = "dev" optional = false python-versions = ">=3.6" [package.extras] -watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] +watchmedo = ["PyYAML (>=3.10)"] [[package]] name = "wcwidth" @@ -907,7 +880,7 @@ test = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" -version = "3.5.0" +version = "3.6.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false @@ -918,12 +891,12 @@ docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [extras] -testing = ["behave", "pytest", "pytest-bdd", "toml"] +testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" python-versions = ">=3.7.0, <3.11" -content-hash = "c4f943f3dbd96f5aab8ad0ef2f3d3f6a7096dc75ea7d3e449949695d340208fb" +content-hash = "fc24941ef7a065e56487518ccab053638f053e49f4e47f1746cd9fbfcef40546" [metadata.files] ansiwrap = [ @@ -953,10 +926,6 @@ backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -behave = [ - {file = "behave-1.2.6-py2.py3-none-any.whl", hash = "sha256:ebda1a6c9e5bfe95c5f9f0a2794e01c7098b3dde86c10a95d8621c5907ff6f1c"}, - {file = "behave-1.2.6.tar.gz", hash = "sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"}, -] black = [ {file = "black-21.9b0-py3-none-any.whl", hash = "sha256:380f1b5da05e5a1429225676655dddb96f5ae8c75bdf91e53d798871b902a115"}, {file = "black-21.9b0.tar.gz", hash = "sha256:7de4cfc7eb6b710de325712d40125689101d21d25283eed7e9998722cf10eb91"}, @@ -969,11 +938,6 @@ cffi = [ {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, - {file = "cffi-1.14.6-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534"}, - {file = "cffi-1.14.6-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a"}, - {file = "cffi-1.14.6-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5"}, - {file = "cffi-1.14.6-cp35-cp35m-win32.whl", hash = "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca"}, - {file = "cffi-1.14.6-cp35-cp35m-win_amd64.whl", hash = "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218"}, {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, @@ -1043,23 +1007,23 @@ cryptography = [ {file = "cryptography-35.0.0.tar.gz", hash = "sha256:9933f28f70d0517686bd7de36166dda42094eac49415459d9bdf5e7df3e0086d"}, ] decorator = [ - {file = "decorator-5.0.9-py3-none-any.whl", hash = "sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323"}, - {file = "decorator-5.0.9.tar.gz", hash = "sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5"}, + {file = "decorator-5.1.0-py3-none-any.whl", hash = "sha256:7b12e7c3c6ab203a29e157335e9122cb03de9ab7264b137594103fd4a683b374"}, + {file = "decorator-5.1.0.tar.gz", hash = "sha256:e59913af105b9860aa2c8d3272d9de5a56a4e608db9a2f167a8480b323d529a7"}, ] flake8 = [ {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, ] ghp-import = [ - {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, - {file = "ghp_import-2.0.1-py3-none-any.whl", hash = "sha256:8241a8e9f8dd3c1fafe9696e6e081b57a208ef907e9939c44e7415e407ab40ea"}, + {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, + {file = "ghp_import-2.0.2-py3-none-any.whl", hash = "sha256:5f8962b30b20652cdffa9c5a9812f7de6bcb56ec475acac579807719bf242c46"}, ] glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.6.1-py3-none-any.whl", hash = "sha256:9f55f560e116f8643ecf2922d9cd3e1c7e8d52e683178fecd9d08f6aa357e11e"}, - {file = "importlib_metadata-4.6.1.tar.gz", hash = "sha256:079ada16b7fc30dfbb5d13399a5113110dab1aa7c2bc62f66af75f0b717c8cac"}, + {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, + {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1069,20 +1033,16 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-7.25.0-py3-none-any.whl", hash = "sha256:aa21412f2b04ad1a652e30564fff6b4de04726ce875eab222c8430edc6db383a"}, - {file = "ipython-7.25.0.tar.gz", hash = "sha256:54bbd1fe3882457aaf28ae060a5ccdef97f212a741754e420028d4ec5c2291dc"}, -] -ipython-genutils = [ - {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, - {file = "ipython_genutils-0.2.0.tar.gz", hash = "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"}, + {file = "ipython-7.28.0-py3-none-any.whl", hash = "sha256:f16148f9163e1e526f1008d7c8d966d9c15600ca20d1a754287cf96d00ba6f1d"}, + {file = "ipython-7.28.0.tar.gz", hash = "sha256:2097be5c814d1b974aea57673176a924c4c8c9583890e7a5f082f547b9975b11"}, ] jedi = [ {file = "jedi-0.18.0-py2.py3-none-any.whl", hash = "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93"}, {file = "jedi-0.18.0.tar.gz", hash = "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707"}, ] jeepney = [ - {file = "jeepney-0.7.0-py3-none-any.whl", hash = "sha256:71335e7a4e93817982f473f3507bffc2eff7a544119ab9b73e089c8ba1409ba3"}, - {file = "jeepney-0.7.0.tar.gz", hash = "sha256:1237cd64c8f7ac3aa4b3f332c4d0fb4a8216f39eaa662ec904302d4d77de5a54"}, + {file = "jeepney-0.7.1-py3-none-any.whl", hash = "sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac"}, + {file = "jeepney-0.7.1.tar.gz", hash = "sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f"}, ] jinja2 = [ {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, @@ -1093,30 +1053,20 @@ keyring = [ {file = "keyring-23.2.1.tar.gz", hash = "sha256:6334aee6073db2fb1f30892697b1730105b5e9a77ce7e61fca6b435225493efe"}, ] mako = [ - {file = "Mako-1.1.4-py2.py3-none-any.whl", hash = "sha256:aea166356da44b9b830c8023cd9b557fa856bd8b4035d6de771ca027dfc5cc6e"}, - {file = "Mako-1.1.4.tar.gz", hash = "sha256:17831f0b7087c313c0ffae2bcbbd3c1d5ba9eeac9c38f2eb7b50e8c99fe9d5ab"}, + {file = "Mako-1.1.5-py2.py3-none-any.whl", hash = "sha256:6804ee66a7f6a6416910463b00d76a7b25194cd27f1918500c5bd7be2a088a23"}, + {file = "Mako-1.1.5.tar.gz", hash = "sha256:169fa52af22a91900d852e937400e79f535496191c63712e3b9fda5a9bed6fc3"}, ] markdown = [ {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1125,21 +1075,14 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1149,16 +1092,13 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, ] matplotlib-inline = [ - {file = "matplotlib-inline-0.1.2.tar.gz", hash = "sha256:f41d5ff73c9f5385775d5c0bc13b424535c8402fe70ea8210f93e11f3683993e"}, - {file = "matplotlib_inline-0.1.2-py3-none-any.whl", hash = "sha256:5cf1176f554abb4fa98cb362aa2b55c500147e4bdbb07e3fda359143e1da0811"}, + {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, + {file = "matplotlib_inline-0.1.3-py3-none-any.whl", hash = "sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c"}, ] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, @@ -1208,20 +1148,20 @@ pickleshare = [ {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, ] platformdirs = [ - {file = "platformdirs-2.2.0-py3-none-any.whl", hash = "sha256:4666d822218db6a262bdfdc9c39d21f23b4cfdb08af331a81e92751daf6c866c"}, - {file = "platformdirs-2.2.0.tar.gz", hash = "sha256:632daad3ab546bd8e6af0537d09805cec458dce201bccfe23012df73332e181e"}, + {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"}, + {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, ] pluggy = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] prompt-toolkit = [ - {file = "prompt_toolkit-3.0.19-py3-none-any.whl", hash = "sha256:7089d8d2938043508aa9420ec18ce0922885304cddae87fb96eebca942299f88"}, - {file = "prompt_toolkit-3.0.19.tar.gz", hash = "sha256:08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f"}, + {file = "prompt_toolkit-3.0.20-py3-none-any.whl", hash = "sha256:6076e46efae19b1e0ca1ec003ed37a933dc94b4d20f486235d436e64771dcd5c"}, + {file = "prompt_toolkit-3.0.20.tar.gz", hash = "sha256:eb71d5a6b72ce6db177af4a7d4d7085b99756bf656d98ffcc4fecd36850eea6c"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -1244,8 +1184,8 @@ pyflakes = [ {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, ] pygments = [ - {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"}, - {file = "Pygments-2.9.0.tar.gz", hash = "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"}, + {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, + {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, @@ -1289,26 +1229,18 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, @@ -1318,67 +1250,51 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2021.7.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e6a1e5ca97d411a461041d057348e578dc344ecd2add3555aedba3b408c9f874"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:6afe6a627888c9a6cfbb603d1d017ce204cebd589d66e0703309b8048c3b0854"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:ccb3d2190476d00414aab36cca453e4596e8f70a206e2aa8db3d495a109153d2"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:ed693137a9187052fc46eedfafdcb74e09917166362af4cc4fddc3b31560e93d"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:99d8ab206a5270c1002bfcf25c51bf329ca951e5a169f3b43214fdda1f0b5f0d"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:b85ac458354165405c8a84725de7bbd07b00d9f72c31a60ffbf96bb38d3e25fa"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:3f5716923d3d0bfb27048242a6e0f14eecdb2e2a7fac47eda1d055288595f222"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5983c19d0beb6af88cb4d47afb92d96751fb3fa1784d8785b1cdf14c6519407"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf1d2d183abc7faa101ebe0b8d04fd19cb9138820abc8589083035c9440b8ca6"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1947e7de155063e1c495c50590229fb98720d4c383af5031bbcb413db33fa1be"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:17d8a3f99b18d87ac54a449b836d485cc8c195bb6f5e4379c84c8519045facc9"}, - {file = "regex-2021.7.6-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d30895ec80cc80358392841add9dde81ea1d54a4949049269115e6b0555d0498"}, - {file = "regex-2021.7.6-cp36-cp36m-win32.whl", hash = "sha256:c92831dac113a6e0ab28bc98f33781383fe294df1a2c3dfd1e850114da35fd5b"}, - {file = "regex-2021.7.6-cp36-cp36m-win_amd64.whl", hash = "sha256:791aa1b300e5b6e5d597c37c346fb4d66422178566bbb426dd87eaae475053fb"}, - {file = "regex-2021.7.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:59506c6e8bd9306cd8a41511e32d16d5d1194110b8cfe5a11d102d8b63cf945d"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:564a4c8a29435d1f2256ba247a0315325ea63335508ad8ed938a4f14c4116a5d"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:59c00bb8dd8775473cbfb967925ad2c3ecc8886b3b2d0c90a8e2707e06c743f0"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:9a854b916806c7e3b40e6616ac9e85d3cdb7649d9e6590653deb5b341a736cec"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:db2b7df831c3187a37f3bb80ec095f249fa276dbe09abd3d35297fc250385694"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:173bc44ff95bc1e96398c38f3629d86fa72e539c79900283afa895694229fe6a"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:15dddb19823f5147e7517bb12635b3c82e6f2a3a6b696cc3e321522e8b9308ad"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ddeabc7652024803666ea09f32dd1ed40a0579b6fbb2a213eba590683025895"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8244c681018423a0d1784bc6b9af33bdf55f2ab8acb1f3cd9dd83d90e0813253"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8a4c742089faf0e51469c6a1ad7e3d3d21afae54a16a6cead85209dfe0a1ce65"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:914e626dc8e75fe4fc9b7214763f141d9f40165d00dfe680b104fa1b24063bbf"}, - {file = "regex-2021.7.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fabb19c82ecf39832a3f5060dfea9a7ab270ef156039a1143a29a83a09a62de"}, - {file = "regex-2021.7.6-cp37-cp37m-win32.whl", hash = "sha256:f080248b3e029d052bf74a897b9d74cfb7643537fbde97fe8225a6467fb559b5"}, - {file = "regex-2021.7.6-cp37-cp37m-win_amd64.whl", hash = "sha256:d8bbce0c96462dbceaa7ac4a7dfbbee92745b801b24bce10a98d2f2b1ea9432f"}, - {file = "regex-2021.7.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edd1a68f79b89b0c57339bce297ad5d5ffcc6ae7e1afdb10f1947706ed066c9c"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:422dec1e7cbb2efbbe50e3f1de36b82906def93ed48da12d1714cabcd993d7f0"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cbe23b323988a04c3e5b0c387fe3f8f363bf06c0680daf775875d979e376bd26"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:0eb2c6e0fcec5e0f1d3bcc1133556563222a2ffd2211945d7b1480c1b1a42a6f"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:1c78780bf46d620ff4fff40728f98b8afd8b8e35c3efd638c7df67be2d5cddbf"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:bc84fb254a875a9f66616ed4538542fb7965db6356f3df571d783f7c8d256edd"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:598c0a79b4b851b922f504f9f39a863d83ebdfff787261a5ed061c21e67dd761"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875c355360d0f8d3d827e462b29ea7682bf52327d500a4f837e934e9e4656068"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfc0957c4a4b91eff5ad036088769e600a25774256cd0e1154378591ce573f08"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:efb4af05fa4d2fc29766bf516f1f5098d6b5c3ed846fde980c18bf8646ad3979"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7423aca7cc30a6228ccdcf2ea76f12923d652c5c7c6dc1959a0b004e308f39fb"}, - {file = "regex-2021.7.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb9834c1e77493efd7343b8e38950dee9797d2d6f2d5fd91c008dfaef64684b9"}, - {file = "regex-2021.7.6-cp38-cp38-win32.whl", hash = "sha256:e586f448df2bbc37dfadccdb7ccd125c62b4348cb90c10840d695592aa1b29e0"}, - {file = "regex-2021.7.6-cp38-cp38-win_amd64.whl", hash = "sha256:2fe5e71e11a54e3355fa272137d521a40aace5d937d08b494bed4529964c19c4"}, - {file = "regex-2021.7.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6110bab7eab6566492618540c70edd4d2a18f40ca1d51d704f1d81c52d245026"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:4f64fc59fd5b10557f6cd0937e1597af022ad9b27d454e182485f1db3008f417"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:89e5528803566af4df368df2d6f503c84fbfb8249e6631c7b025fe23e6bd0cde"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2366fe0479ca0e9afa534174faa2beae87847d208d457d200183f28c74eaea59"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:f9392a4555f3e4cb45310a65b403d86b589adc773898c25a39184b1ba4db8985"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:2bceeb491b38225b1fee4517107b8491ba54fba77cf22a12e996d96a3c55613d"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:f98dc35ab9a749276f1a4a38ab3e0e2ba1662ce710f6530f5b0a6656f1c32b58"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:319eb2a8d0888fa6f1d9177705f341bc9455a2c8aca130016e52c7fe8d6c37a3"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:598ee917dbe961dcf827217bf2466bb86e4ee5a8559705af57cbabb3489dd37e"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:56fc7045a1999a8d9dd1896715bc5c802dfec5b9b60e883d2cbdecb42adedea4"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8363ac90ea63c3dd0872dfdb695f38aff3334bfa5712cffb238bd3ffef300e3"}, - {file = "regex-2021.7.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:716a6db91b3641f566531ffcc03ceec00b2447f0db9942b3c6ea5d2827ad6be3"}, - {file = "regex-2021.7.6-cp39-cp39-win32.whl", hash = "sha256:eaf58b9e30e0e546cdc3ac06cf9165a1ca5b3de8221e9df679416ca667972035"}, - {file = "regex-2021.7.6-cp39-cp39-win_amd64.whl", hash = "sha256:4c9c3155fe74269f61e27617529b7f09552fbb12e44b1189cebbdb24294e6e1c"}, - {file = "regex-2021.7.6.tar.gz", hash = "sha256:8394e266005f2d8c6f0bc6780001f7afa3ef81a7a2111fa35058ded6fce79e4d"}, + {file = "regex-2021.9.30-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:66696c8336a1b5d1182464f3af3427cc760118f26d0b09a2ddc16a976a4d2637"}, + {file = "regex-2021.9.30-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d87459ad3ab40cd8493774f8a454b2e490d8e729e7e402a0625867a983e4e02"}, + {file = "regex-2021.9.30-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78cf6a1e023caf5e9a982f5377414e1aeac55198831b852835732cfd0a0ca5ff"}, + {file = "regex-2021.9.30-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:255791523f80ea8e48e79af7120b4697ef3b74f6886995dcdb08c41f8e516be0"}, + {file = "regex-2021.9.30-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e502f8d4e5ef714bcc2c94d499684890c94239526d61fdf1096547db91ca6aa6"}, + {file = "regex-2021.9.30-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4907fb0f9b9309a5bded72343e675a252c2589a41871874feace9a05a540241e"}, + {file = "regex-2021.9.30-cp310-cp310-win32.whl", hash = "sha256:3be40f720af170a6b20ddd2ad7904c58b13d2b56f6734ee5d09bbdeed2fa4816"}, + {file = "regex-2021.9.30-cp310-cp310-win_amd64.whl", hash = "sha256:c2b180ed30856dfa70cfe927b0fd38e6b68198a03039abdbeb1f2029758d87e7"}, + {file = "regex-2021.9.30-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e6f2d2f93001801296fe3ca86515eb04915472b5380d4d8752f09f25f0b9b0ed"}, + {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4fa7ba9ab2eba7284e0d7d94f61df7af86015b0398e123331362270d71fab0b9"}, + {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28040e89a04b60d579c69095c509a4f6a1a5379cd865258e3a186b7105de72c6"}, + {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f588209d3e4797882cd238195c175290dbc501973b10a581086b5c6bcd095ffb"}, + {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42952d325439ef223e4e9db7ee6d9087b5c68c5c15b1f9de68e990837682fc7b"}, + {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cae4099031d80703954c39680323dabd87a69b21262303160776aa0e55970ca0"}, + {file = "regex-2021.9.30-cp36-cp36m-win32.whl", hash = "sha256:0de8ad66b08c3e673b61981b9e3626f8784d5564f8c3928e2ad408c0eb5ac38c"}, + {file = "regex-2021.9.30-cp36-cp36m-win_amd64.whl", hash = "sha256:b345ecde37c86dd7084c62954468a4a655fd2d24fd9b237949dd07a4d0dd6f4c"}, + {file = "regex-2021.9.30-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6f08187136f11e430638c2c66e1db091105d7c2e9902489f0dbc69b44c222b4"}, + {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b55442650f541d195a535ccec33078c78a9521973fb960923da7515e9ed78fa6"}, + {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87e9c489aa98f50f367fb26cc9c8908d668e9228d327644d7aa568d47e456f47"}, + {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e2cb7d4909ed16ed35729d38af585673f1f0833e73dfdf0c18e5be0061107b99"}, + {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0861e7f6325e821d5c40514c551fd538b292f8cc3960086e73491b9c5d8291d"}, + {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:81fdc90f999b2147fc62e303440c424c47e5573a9b615ed5d43a5b832efcca9e"}, + {file = "regex-2021.9.30-cp37-cp37m-win32.whl", hash = "sha256:8c1ad61fa024195136a6b7b89538030bd00df15f90ac177ca278df9b2386c96f"}, + {file = "regex-2021.9.30-cp37-cp37m-win_amd64.whl", hash = "sha256:e3770781353a4886b68ef10cec31c1f61e8e3a0be5f213c2bb15a86efd999bc4"}, + {file = "regex-2021.9.30-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9c065d95a514a06b92a5026766d72ac91bfabf581adb5b29bc5c91d4b3ee9b83"}, + {file = "regex-2021.9.30-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9925985be05d54b3d25fd6c1ea8e50ff1f7c2744c75bdc4d3b45c790afa2bcb3"}, + {file = "regex-2021.9.30-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470f2c882f2672d8eeda8ab27992aec277c067d280b52541357e1acd7e606dae"}, + {file = "regex-2021.9.30-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ad0517df22a97f1da20d8f1c8cb71a5d1997fa383326b81f9cf22c9dadfbdf34"}, + {file = "regex-2021.9.30-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e30838df7bfd20db6466fd309d9b580d32855f8e2c2e6d74cf9da27dcd9b63"}, + {file = "regex-2021.9.30-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5b34d2335d6aedec7dcadd3f8283b9682fadad8b9b008da8788d2fce76125ebe"}, + {file = "regex-2021.9.30-cp38-cp38-win32.whl", hash = "sha256:e07049cece3462c626d650e8bf42ddbca3abf4aa08155002c28cb6d9a5a281e2"}, + {file = "regex-2021.9.30-cp38-cp38-win_amd64.whl", hash = "sha256:37868075eda024470bd0feab872c692ac4ee29db1e14baec103257bf6cc64346"}, + {file = "regex-2021.9.30-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d331f238a7accfbbe1c4cd1ba610d4c087b206353539331e32a8f05345c74aec"}, + {file = "regex-2021.9.30-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6348a7ab2a502cbdd0b7fd0496d614007489adb7361956b38044d1d588e66e04"}, + {file = "regex-2021.9.30-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce7b1cca6c23f19bee8dc40228d9c314d86d1e51996b86f924aca302fc8f8bf9"}, + {file = "regex-2021.9.30-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1f1125bc5172ab3a049bc6f4b9c0aae95a2a2001a77e6d6e4239fa3653e202b5"}, + {file = "regex-2021.9.30-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:638e98d069b14113e8afba6a54d1ca123f712c0d105e67c1f9211b2a825ef926"}, + {file = "regex-2021.9.30-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9a0b0db6b49da7fa37ca8eddf9f40a8dbc599bad43e64f452284f37b6c34d91c"}, + {file = "regex-2021.9.30-cp39-cp39-win32.whl", hash = "sha256:9910869c472e5a6728680ca357b5846546cbbd2ab3ad5bef986ef0bc438d0aa6"}, + {file = "regex-2021.9.30-cp39-cp39-win_amd64.whl", hash = "sha256:3b71213ec3bad9a5a02e049f2ec86b3d7c3e350129ae0f4e2f99c12b5da919ed"}, + {file = "regex-2021.9.30.tar.gz", hash = "sha256:81e125d9ba54c34579e4539a967e976a3c56150796674aec318b1b2f49251be7"}, ] rich = [ - {file = "rich-10.6.0-py3-none-any.whl", hash = "sha256:d3f72827cd5df13b2ef7f1a97f81ec65548d4fdeb92cef653234f227580bbb2a"}, - {file = "rich-10.6.0.tar.gz", hash = "sha256:128261b3e2419a4ef9c97066ccc2abbfb49fa7c5e89c3fe4056d00aa5e9c1e65"}, + {file = "rich-10.11.0-py3-none-any.whl", hash = "sha256:44bb3f9553d00b3c8938abf89828df870322b9ba43caf3b12bb7758debdc6dec"}, + {file = "rich-10.11.0.tar.gz", hash = "sha256:016fa105f34b69c434e7f908bb5bd7fefa9616efdb218a2917117683a6394ce5"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, @@ -1397,12 +1313,12 @@ toml = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tomli = [ - {file = "tomli-1.0.4-py3-none-any.whl", hash = "sha256:0713b16ff91df8638a6a694e295c8159ab35ba93e3424a626dd5226d386057be"}, - {file = "tomli-1.0.4.tar.gz", hash = "sha256:be670d0d8d7570fd0ea0113bd7bb1ba3ac6706b4de062cc4c952769355c9c268"}, + {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, + {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, ] traitlets = [ - {file = "traitlets-5.0.5-py3-none-any.whl", hash = "sha256:69ff3f9d5351f31a7ad80443c2674b7099df13cc41fc5fa6e2f6d3b0330b0426"}, - {file = "traitlets-5.0.5.tar.gz", hash = "sha256:178f4ce988f69189f7e523337a3e11d91c786ded9360174a3d9ca83e79bc5396"}, + {file = "traitlets-5.1.0-py3-none-any.whl", hash = "sha256:03f172516916220b58c9f19d7f854734136dd9528103d04e9bf139a92c9f54c4"}, + {file = "traitlets-5.1.0.tar.gz", hash = "sha256:bd382d7ea181fbbcce157c133db9a829ce06edffe097bcf3ab945b435452b46d"}, ] typed-ast = [ {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, @@ -1446,27 +1362,29 @@ tzlocal = [ {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] watchdog = [ - {file = "watchdog-2.1.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9628f3f85375a17614a2ab5eac7665f7f7be8b6b0a2a228e6f6a2e91dd4bfe26"}, - {file = "watchdog-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:acc4e2d5be6f140f02ee8590e51c002829e2c33ee199036fcd61311d558d89f4"}, - {file = "watchdog-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:85b851237cf3533fabbc034ffcd84d0fa52014b3121454e5f8b86974b531560c"}, - {file = "watchdog-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a12539ecf2478a94e4ba4d13476bb2c7a2e0a2080af2bb37df84d88b1b01358a"}, - {file = "watchdog-2.1.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6fe9c8533e955c6589cfea6f3f0a1a95fb16867a211125236c82e1815932b5d7"}, - {file = "watchdog-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d9456f0433845e7153b102fffeb767bde2406b76042f2216838af3b21707894e"}, - {file = "watchdog-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fd8c595d5a93abd441ee7c5bb3ff0d7170e79031520d113d6f401d0cf49d7c8f"}, - {file = "watchdog-2.1.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0bcfe904c7d404eb6905f7106c54873503b442e8e918cc226e1828f498bdc0ca"}, - {file = "watchdog-2.1.3-pp36-pypy36_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bf84bd94cbaad8f6b9cbaeef43080920f4cb0e61ad90af7106b3de402f5fe127"}, - {file = "watchdog-2.1.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b8ddb2c9f92e0c686ea77341dcb58216fa5ff7d5f992c7278ee8a392a06e86bb"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8805a5f468862daf1e4f4447b0ccf3acaff626eaa57fbb46d7960d1cf09f2e6d"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_armv7l.whl", hash = "sha256:3e305ea2757f81d8ebd8559d1a944ed83e3ab1bdf68bcf16ec851b97c08dc035"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_i686.whl", hash = "sha256:431a3ea70b20962e6dee65f0eeecd768cd3085ea613ccb9b53c8969de9f6ebd2"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_ppc64.whl", hash = "sha256:e4929ac2aaa2e4f1a30a36751160be391911da463a8799460340901517298b13"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:201cadf0b8c11922f54ec97482f95b2aafca429c4c3a4bb869a14f3c20c32686"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_s390x.whl", hash = "sha256:3a7d242a7963174684206093846537220ee37ba9986b824a326a8bb4ef329a33"}, - {file = "watchdog-2.1.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:54e057727dd18bd01a3060dbf5104eb5a495ca26316487e0f32a394fd5fe725a"}, - {file = "watchdog-2.1.3-py3-none-win32.whl", hash = "sha256:b5fc5c127bad6983eecf1ad117ab3418949f18af9c8758bd10158be3647298a9"}, - {file = "watchdog-2.1.3-py3-none-win_amd64.whl", hash = "sha256:44acad6f642996a2b50bb9ce4fb3730dde08f23e79e20cd3d8e2a2076b730381"}, - {file = "watchdog-2.1.3-py3-none-win_ia64.whl", hash = "sha256:0bcdf7b99b56a3ae069866c33d247c9994ffde91b620eaf0306b27e099bd1ae0"}, - {file = "watchdog-2.1.3.tar.gz", hash = "sha256:e5236a8e8602ab6db4b873664c2d356c365ab3cac96fbdec4970ad616415dd45"}, + {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3"}, + {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:aba5c812f8ee8a3ff3be51887ca2d55fb8e268439ed44110d3846e4229eb0e8b"}, + {file = "watchdog-2.1.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ae38bf8ba6f39d5b83f78661273216e7db5b00f08be7592062cb1fc8b8ba542"}, + {file = "watchdog-2.1.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ad6f1796e37db2223d2a3f302f586f74c72c630b48a9872c1e7ae8e92e0ab669"}, + {file = "watchdog-2.1.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:922a69fa533cb0c793b483becaaa0845f655151e7256ec73630a1b2e9ebcb660"}, + {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b2fcf9402fde2672545b139694284dc3b665fd1be660d73eca6805197ef776a3"}, + {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3386b367e950a11b0568062b70cc026c6f645428a698d33d39e013aaeda4cc04"}, + {file = "watchdog-2.1.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f1c00aa35f504197561060ca4c21d3cc079ba29cf6dd2fe61024c70160c990b"}, + {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b52b88021b9541a60531142b0a451baca08d28b74a723d0c99b13c8c8d48d604"}, + {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8047da932432aa32c515ec1447ea79ce578d0559362ca3605f8e9568f844e3c6"}, + {file = "watchdog-2.1.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e92c2d33858c8f560671b448205a268096e17870dcf60a9bb3ac7bfbafb7f5f9"}, + {file = "watchdog-2.1.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b7d336912853d7b77f9b2c24eeed6a5065d0a0cc0d3b6a5a45ad6d1d05fb8cd8"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_aarch64.whl", hash = "sha256:cca7741c0fcc765568350cb139e92b7f9f3c9a08c4f32591d18ab0a6ac9e71b6"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_armv7l.whl", hash = "sha256:25fb5240b195d17de949588628fdf93032ebf163524ef08933db0ea1f99bd685"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_i686.whl", hash = "sha256:be9be735f827820a06340dff2ddea1fb7234561fa5e6300a62fe7f54d40546a0"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0d19fb2441947b58fbf91336638c2b9f4cc98e05e1045404d7a4cb7cddc7a65"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:3becdb380d8916c873ad512f1701f8a92ce79ec6978ffde92919fd18d41da7fb"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_s390x.whl", hash = "sha256:ae67501c95606072aafa865b6ed47343ac6484472a2f95490ba151f6347acfc2"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e0f30db709c939cabf64a6dc5babb276e6d823fd84464ab916f9b9ba5623ca15"}, + {file = "watchdog-2.1.6-py3-none-win32.whl", hash = "sha256:e02794ac791662a5eafc6ffeaf9bcc149035a0e48eb0a9d40a8feb4622605a3d"}, + {file = "watchdog-2.1.6-py3-none-win_amd64.whl", hash = "sha256:bd9ba4f332cf57b2c1f698be0728c020399ef3040577cde2939f2e045b39c1e5"}, + {file = "watchdog-2.1.6-py3-none-win_ia64.whl", hash = "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923"}, + {file = "watchdog-2.1.6.tar.gz", hash = "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, @@ -1481,6 +1399,6 @@ yq = [ {file = "yq-2.12.2.tar.gz", hash = "sha256:2f156d0724b61487ac8752ed4eaa702a5737b804d5afa46fa55866951cd106d2"}, ] zipp = [ - {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, - {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, + {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, + {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, ] diff --git a/pyproject.toml b/pyproject.toml index b81e051b..098211e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,13 +47,11 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE # I don't like repeating deps here, but # there's no other way to do this yet until poetry v1.2 releases # see: https://github.com/python-poetry/poetry/issues/1644 -behave = { version = "^1.2", optional = true } pytest = { version = ">=6.2", optional = true } pytest-bdd = { version = ">=4.0.1", optional = true } toml = { version = ">=0.10", optional = true } [tool.poetry.dev-dependencies] -behave = "^1.2" mkdocs = ">=1.0" black = { version = ">=21.5b2", allow-prereleases = true } toml = ">=0.10" @@ -65,7 +63,7 @@ pyproject-flake8 = "*" yq = "*" [tool.poetry.extras] -testing = [ "behave", "pytest", "pytest-bdd", "toml" ] +testing = [ "pytest", "pytest-bdd", "toml" ] [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index 3d9fb27f..b29b11f0 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -8,13 +8,11 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys And the editor should not have been called - # @todo implement this step in pytest (doesn't currently support overrides) - @skip Scenario: Postconfig commands with overrides Given we use the config "basic_encrypted.yaml" And we use the password "test" if prompted When we run "jrnl --decrypt --config-override highlight false --config-override editor nano" - Then the config should contain "highlight: false" + Then the config in memory should contain "highlight: false" Then the editor should not have been called @@ -38,23 +36,24 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys ┖─────────────────────┘ - # @todo implement this step in pytest (doesn't currently support overrides) - @skip Scenario: Override color selections with runtime overrides Given we use the config "basic_encrypted.yaml" And we use the password "test" if prompted When we run "jrnl -1 --config-override colors.body blue" - Then the config should have "colors.body" set to "blue" + Then the config in memory should contain "colors.body: blue" - # @todo implement this step in pytest (doesn't currently support overrides) - @skip Scenario: Apply multiple config overrides Given we use the config "basic_encrypted.yaml" And we use the password "test" if prompted When we run "jrnl -1 --config-override colors.body green --config-override editor 'nano'" - Then the config should have "colors.body" set to "green" - And the config should have "editor" set to "nano" + Then the config in memory should contain + editor: nano + colors: + title: none + body: green + tags: none + date: none Scenario: Override default journal diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index a93a7e43..1b4c74dc 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -143,10 +143,15 @@ def user_input(): @fixture -def config_data(config_path): +def config_on_disk(config_path): return load_config(config_path) +@fixture +def config_in_memory(): + return dict() + + @fixture def journal_name(): return None diff --git a/tests/lib/helpers.py b/tests/lib/helpers.py index 7d089597..2e1f454a 100644 --- a/tests/lib/helpers.py +++ b/tests/lib/helpers.py @@ -1,6 +1,7 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import functools import os @@ -38,3 +39,13 @@ def assert_equal_tags_ignoring_order( [actual_tags, expected_tags], [expected_content, actual_content], ] + + +# @see: https://stackoverflow.com/a/65782539/569146 +def get_nested_val(dictionary, path, *default): + try: + return functools.reduce(lambda x, y: x[y], path.split("."), dictionary) + except KeyError: + if default: + return default[0] + raise diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 2dadf82e..627cb323 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -15,6 +15,7 @@ from jrnl.config import scope_config from .helpers import assert_equal_tags_ignoring_order from .helpers import does_directory_contain_files from .helpers import parse_should_or_should_not +from .helpers import get_nested_val @then("we should get no error") @@ -110,17 +111,18 @@ def should_see_the_message(text, cli_run): ) @then(parse('the config {should_or_should_not} contain "{some_yaml}"')) @then(parse("the config {should_or_should_not} contain\n{some_yaml}")) -def config_var(config_data, journal_name, should_or_should_not, some_yaml): +def config_var_on_disk(config_on_disk, journal_name, should_or_should_not, some_yaml): we_should = parse_should_or_should_not(should_or_should_not) - actual = config_data + actual = config_on_disk if journal_name: actual = actual["journals"][journal_name] - expected = yaml.load(some_yaml, Loader=yaml.FullLoader) + expected = yaml.load(some_yaml, Loader=yaml.SafeLoader) actual_slice = actual if type(actual) is dict: + # `expected` objects formatted in yaml only compare one level deep actual_slice = {key: actual.get(key, None) for key in expected.keys()} if we_should: @@ -129,6 +131,40 @@ def config_var(config_data, journal_name, should_or_should_not, some_yaml): assert expected != actual_slice +@then( + parse( + 'the config in memory for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' + ) +) +@then( + parse( + 'the config in memory for journal "{journal_name}" {should_or_should_not} contain\n{some_yaml}' + ) +) +@then(parse('the config in memory {should_or_should_not} contain "{some_yaml}"')) +@then(parse("the config in memory {should_or_should_not} contain\n{some_yaml}")) +def config_var_in_memory( + config_in_memory, journal_name, should_or_should_not, some_yaml +): + we_should = parse_should_or_should_not(should_or_should_not) + + actual = config_in_memory["overrides"] + if journal_name: + actual = actual["journals"][journal_name] + + expected = yaml.load(some_yaml, Loader=yaml.SafeLoader) + + actual_slice = actual + if type(actual) is dict: + # `expected` objects formatted in yaml only compare one level deep + actual_slice = {key: get_nested_val(actual, key) for key in expected.keys()} + + if we_should: + assert expected == actual_slice + else: + assert expected != actual_slice + + @then("we should be prompted for a password") def password_was_called(cli_run): assert cli_run["mocks"]["getpass"].called @@ -145,15 +181,15 @@ def assert_dir_contains_files(file_list, cache_dir): @then(parse("the journal directory should contain\n{file_list}")) -def journal_directory_should_contain(config_data, file_list): - scoped_config = scope_config(config_data, "default") +def journal_directory_should_contain(config_on_disk, file_list): + scoped_config = scope_config(config_on_disk, "default") assert does_directory_contain_files(file_list, scoped_config["journal"]) @then(parse('journal "{journal_name}" should not exist')) -def journal_directory_should_not_exist(config_data, journal_name): - scoped_config = scope_config(config_data, journal_name) +def journal_directory_should_not_exist(config_on_disk, journal_name): + scoped_config = scope_config(config_on_disk, journal_name) assert not does_directory_contain_files( scoped_config["journal"], "." @@ -161,8 +197,8 @@ def journal_directory_should_not_exist(config_data, journal_name): @then(parse("the journal {should_or_should_not} exist")) -def journal_should_not_exist(config_data, should_or_should_not): - scoped_config = scope_config(config_data, "default") +def journal_should_not_exist(config_on_disk, should_or_should_not): + scoped_config = scope_config(config_on_disk, "default") expected_path = scoped_config["journal"] contains_files = does_directory_contain_files(expected_path, ".") diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 642249e9..80d8a7fb 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -34,6 +34,7 @@ def when_we_change_directory(directory_name): def we_run( command, config_path, + config_in_memory, user_input, cli_run, capsys, @@ -63,7 +64,19 @@ def we_run( password = user_input with ExitStack() as stack: + # Always mock + from jrnl.override import apply_overrides + def my_overrides(*args, **kwargs): + result = apply_overrides(*args, **kwargs) + config_in_memory["overrides"] = result + return result + + stack.enter_context( + patch("jrnl.jrnl.apply_overrides", side_effect=my_overrides) + ) + + # Conditionally mock stack.enter_context(patch("sys.argv", ["jrnl"] + args)) mock_stdin = stack.enter_context( diff --git a/tests/unit/test_override.py b/tests/unit/test_override.py index d22709f4..2719e884 100644 --- a/tests/unit/test_override.py +++ b/tests/unit/test_override.py @@ -6,6 +6,8 @@ from jrnl.override import _get_key_and_value_from_pair from jrnl.override import _recursively_apply from jrnl.override import apply_overrides +from argparse import Namespace + @pytest.fixture() def minimal_config(): @@ -18,31 +20,61 @@ def minimal_config(): return cfg +def expected_args(overrides): + default_args = { + "contains": None, + "debug": False, + "delete": False, + "edit": False, + "end_date": None, + "today_in_history": False, + "month": None, + "day": None, + "year": None, + "excluded": [], + "export": False, + "filename": None, + "limit": None, + "on_date": None, + "preconfig_cmd": None, + "postconfig_cmd": None, + "short": False, + "starred": False, + "start_date": None, + "strict": False, + "tags": False, + "text": [], + "config_override": [], + } + return Namespace(**{**default_args, **overrides}) + + def test_apply_override(minimal_config): - overrides = [["editor", "nano"]] - apply_overrides(overrides, minimal_config) + overrides = {"config_override": [["editor", "nano"]]} + apply_overrides(expected_args(overrides), minimal_config) assert minimal_config["editor"] == "nano" def test_override_dot_notation(minimal_config): - overrides = [["colors.body", "blue"]] - - cfg = apply_overrides(overrides=overrides, base_config=minimal_config) - assert cfg["colors"] == {"body": "blue", "date": "green"} + overrides = {"config_override": [["colors.body", "blue"]]} + apply_overrides(expected_args(overrides), minimal_config) + assert minimal_config["colors"] == {"body": "blue", "date": "green"} def test_multiple_overrides(minimal_config): - overrides = [ - ["colors.title", "magenta"], - ["editor", "nano"], - ["journals.burner", "/tmp/journals/burner.jrnl"], - ] # as returned by parse_args, saved in parser.config_override + overrides = { + "config_override": [ + ["colors.title", "magenta"], + ["editor", "nano"], + ["journals.burner", "/tmp/journals/burner.jrnl"], + ] + } - cfg = apply_overrides(overrides, minimal_config) - assert cfg["editor"] == "nano" - assert cfg["colors"]["title"] == "magenta" - assert "burner" in cfg["journals"] - assert cfg["journals"]["burner"] == "/tmp/journals/burner.jrnl" + actual = apply_overrides(expected_args(overrides), minimal_config) + assert actual["editor"] == "nano" + assert actual["colors"]["title"] == "magenta" + assert "burner" in actual["journals"] + assert actual["journals"]["burner"] == "/tmp/journals/burner.jrnl" def test_recursively_apply(): From d347dac19e7e37ad644cd5678ef9a03f7453094d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Oct 2021 19:11:41 +0000 Subject: [PATCH 0516/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c47711d7..385e1622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...HEAD) +**Build:** + +- Add more steps to `pytest`, fully remove `behave` [\#1347](https://github.com/jrnl-org/jrnl/pull/1347) ([wren](https://github.com/wren)) + **Documentation:** - Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326) From ae1ad398067f48760aefe0334499fcc31c07626a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Oct 2021 13:20:14 -0700 Subject: [PATCH 0517/1132] Bump mkdocs from 1.2.2 to 1.2.3 (#1355) Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/mkdocs/mkdocs/releases) - [Commits](https://github.com/mkdocs/mkdocs/compare/1.2.2...1.2.3) --- updated-dependencies: - dependency-name: mkdocs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8c86d892..939ba6c3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -397,7 +397,7 @@ python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.2.2" +version = "1.2.3" description = "Project documentation with Markdown." category = "dev" optional = false @@ -938,6 +938,11 @@ cffi = [ {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, + {file = "cffi-1.14.6-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534"}, + {file = "cffi-1.14.6-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a"}, + {file = "cffi-1.14.6-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5"}, + {file = "cffi-1.14.6-cp35-cp35m-win32.whl", hash = "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca"}, + {file = "cffi-1.14.6-cp35-cp35m-win_amd64.whl", hash = "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218"}, {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, @@ -1061,12 +1066,22 @@ markdown = [ {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1075,14 +1090,21 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1092,6 +1114,9 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -1109,8 +1134,8 @@ mergedeep = [ {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.2.2-py3-none-any.whl", hash = "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff"}, - {file = "mkdocs-1.2.2.tar.gz", hash = "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078"}, + {file = "mkdocs-1.2.3-py3-none-any.whl", hash = "sha256:a1fa8c2d0c1305d7fc2b9d9f607c71778572a8b110fb26642aa00296c9e6d072"}, + {file = "mkdocs-1.2.3.tar.gz", hash = "sha256:89f5a094764381cda656af4298727c9f53dc3e602983087e1fe96ea1df24f4c1"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -1229,18 +1254,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, From 62dc037d80cab45ab5d3677f83503bc0ab63b840 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Oct 2021 20:22:04 +0000 Subject: [PATCH 0518/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 385e1622..a1df5f26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ **Packaging:** +- Bump mkdocs from 1.2.2 to 1.2.3 [\#1355](https://github.com/jrnl-org/jrnl/pull/1355) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.8b0 to 21.9b0 [\#1343](https://github.com/jrnl-org/jrnl/pull/1343) ([dependabot[bot]](https://github.com/apps/dependabot)) From 9f5c2f682998a9bf55bb8cfe0c9ce02ff89df093 Mon Sep 17 00:00:00 2001 From: Fidel H Viegas <290857+viegasfh@users.noreply.github.com> Date: Sat, 16 Oct 2021 21:52:13 +0100 Subject: [PATCH 0519/1132] Add recipe for visualizing Markdown in the CLI (#1354) * Added Recipe for visualizing Markdown in the CLI, fixed some typos and added backticks in all references of jrnl * mdless recipe changes during review -condense language -make it sound less like an endorsement -add link about less -minor grammatical change Co-authored-by: Fidel H Viegas Co-authored-by: Micah Jerome Ellison --- docs/recipes.md | 78 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/docs/recipes.md b/docs/recipes.md index 1a1097d6..4c19611c 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -28,7 +28,7 @@ You can do things like jrnl @fixed -starred -n 10 -to "jan 2013" --short ``` -To get a short summary of the 10 most recent, favourited entries before +To get a short summary of the 10 most recent, favourite entries before January 1, 2013 that are tagged with `@fixed`. ### Statistics @@ -52,8 +52,8 @@ print exactly one line per entry). ### Importing older files -If you want to import a file as an entry to jrnl, you can just do `jrnl < entry.ext`. But what if you want the modification date of the file to -be the date of the entry in jrnl? Try this +If you want to import a file as an entry to `jrnl`, you can just do `jrnl < entry.ext`. But what if you want the modification date of the file to +be the date of the entry in `jrnl`? Try this ```sh echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl @@ -73,11 +73,11 @@ jrnlimport () { ### Using templates !!! note - Templates require an [external editor](./advanced.md) be configured. + Templates require an [external editor](./advanced.md) be configured. -A template is a code snippet that makes it easier to use repeated text +A template is a code snippet that makes it easier to use repeated text each time a new journal entry is started. There are two ways you can utilize -templates in your entries. +templates in your entries. #### 1. Command line arguments @@ -85,17 +85,17 @@ If you had a `template.txt` file with the following contents: ```sh My Personal Journal -Title: +Title: Body: ``` -The `template.txt` file could be used to create a new entry with these -command line arguements: +The `template.txt` file could be used to create a new entry with these +command line arguments: ```sh jrnl < template.txt # Imports template.txt as the most recent entry -jrnl -1 --edit # Opens the most recent entry in the editor +jrnl -1 --edit # Opens the most recent entry in the editor ``` #### 2. Include the template file in `jrnl.yaml` @@ -113,8 +113,8 @@ template: "/path/to/template.txt" Changes can be saved as you continue writing the journal entry and will be logged as a new entry in the journal you specified in the original argument. -!!! tip - To read your journal entry or to verify the entry saved, you can use this +!!! tip + To read your journal entry or to verify the entry saved, you can use this command: `jrnl -n 1` (Check out [Formats](./formats.md) for more options). ```sh @@ -137,9 +137,9 @@ log_question 'What did I achieve today?' log_question 'What did I make progress with?' ``` -Whenever your shell is reloaded, you will be prompted to answer each of the -questions in the example above. Each answer will be logged as a separate -journal entry at the `default_hour` and `default_minute` listed in your +Whenever your shell is reloaded, you will be prompted to answer each of the +questions in the example above. Each answer will be logged as a separate +journal entry at the `default_hour` and `default_minute` listed in your `jrnl.yaml` [config file](../advanced/#configuration-file). ### Display random entry @@ -155,16 +155,16 @@ jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)" ``` -### Launch a terminal for rapid logging -You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately. +### Launch a terminal for rapid logging +You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately. ```bash jrnl now --config-override editor:"" ``` -Bind this to a keyboard shortcut. +Bind this to a keyboard shortcut. -Map `Super+Alt+J` to launch the terminal with jrnl prompt +Map `Super+Alt+J` to launch the terminal with `jrnl` prompt - **xbindkeys** In your `.xbindkeysrc` @@ -180,11 +180,37 @@ Mod4+Mod1+j bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor:"" for_window[title="floating *"] floating enable ``` +### Visualize Formatted Markdown in the CLI + +Out of the box, `jrnl` can output journal entries in Markdown. To visualize it, you can pipe to [mdless](https://github.com/ttscoff/mdless), which is a [less](https://en.wikipedia.org/wiki/Less_(Unix))-like tool that allows you to visualize your Markdown text with formatting and syntax highlighting from the CLI. You can use this in any shell that supports piping. + +The simplest way to visualize your Markdown output with `mdless` is as follows: +```sh +jrnl --export md | mdless +``` + +This will render your Markdown output in the whole screen. + +Fortunately, `mdless` has an option that allows you to adjust the screen width by using the `-w` option as follows: + +```sh +jrnl --export md | mdless -w 70 +``` + +If you want Markdown to be your default display format, you can define this in your config file as follows: + +```yaml +display_format: md +# or +display_format: markdown +``` + +For more information on how `jrnl` outputs your entries in Markdown, please visit the [Formats](./formats.md) section. ## External editors -Configure your preferred external editor by updating the `editor` option -in your `jrnl.yaml` file. (See [advanced usage](./advanced.md) for details). +Configure your preferred external editor by updating the `editor` option +in your `jrnl.yaml` file. (See [advanced usage](./advanced.md) for details). !!! note To save and log any entry edits, save and close the file. @@ -201,7 +227,7 @@ tools for Sublime Text and configure your `jrnl.yaml` like this: editor: "subl -w" ``` -Note the `-w` flag to make sure jrnl waits for Sublime Text to close the +Note the `-w` flag to make sure `jrnl` waits for Sublime Text to close the file before writing into the journal. ### Visual Studio Code @@ -252,20 +278,20 @@ grep -A 1 CFBundleIdentifier /Applications/iA\ Writer.app/Contents/Info.plist ### Notepad++ on Windows To set [Notepad++](http://notepad-plus-plus.org/) as your editor, edit -the jrnl config file (`jrnl.yaml`) like this: +the `jrnl` config file (`jrnl.yaml`) like this: ```yaml editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession" ``` -The double backslashes are needed so jrnl can read the file path -correctly. The `-multiInst -nosession` options will cause jrnl to open +The double backslashes are needed so `jrnl` can read the file path +correctly. The `-multiInst -nosession` options will cause `jrnl` to open its own Notepad++ window. ### emacs -To use `emacs` as your editor, edit the jrnl config file (`jrnl.yaml`) like this: +To use `emacs` as your editor, edit the `jrnl` config file (`jrnl.yaml`) like this: ```yaml editor: emacsclient -a "" -c From b93b7cdfd6b37d18218221eb43998fc50f30052f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Oct 2021 20:53:57 +0000 Subject: [PATCH 0520/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1df5f26..13ad2db2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ **Documentation:** - Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326) +- Added Recipe for visualizing Markdown in the CLI [\#1354](https://github.com/jrnl-org/jrnl/pull/1354) ([viegasfh](https://github.com/viegasfh)) - Fix readme splash and add changelog link to readme [\#1339](https://github.com/jrnl-org/jrnl/pull/1339) ([micahellison](https://github.com/micahellison)) - Document journal types [\#1331](https://github.com/jrnl-org/jrnl/pull/1331) ([micahellison](https://github.com/micahellison)) From 156ddee97c18df502635bc2eae3dcdb64aea8d59 Mon Sep 17 00:00:00 2001 From: Gianluca Mondini Date: Sat, 16 Oct 2021 23:37:43 +0200 Subject: [PATCH 0521/1132] Fix recipe 'Launch a terminal for rapid logging' (#1351) --- docs/recipes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/recipes.md b/docs/recipes.md index 4c19611c..713b38c3 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -159,7 +159,7 @@ jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)" You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately. ```bash -jrnl now --config-override editor:"" +jrnl --config-override editor "" ``` Bind this to a keyboard shortcut. @@ -171,13 +171,13 @@ In your `.xbindkeysrc` ```ini Mod4+Mod1+j - alacritty -t floating-jrnl -e jrnl now --config-override editor:"", + alacritty -t floating-jrnl -e jrnl --config-override editor "", ``` - **I3 WM** Launch a floating terminal with the `jrnl` prompt ```ini -bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor:"" +bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor "" for_window[title="floating *"] floating enable ``` ### Visualize Formatted Markdown in the CLI From 8cc891a77f823b200e38f382336784d83fe4998d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Oct 2021 21:39:13 +0000 Subject: [PATCH 0522/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13ad2db2..0cc8a5e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326) - Added Recipe for visualizing Markdown in the CLI [\#1354](https://github.com/jrnl-org/jrnl/pull/1354) ([viegasfh](https://github.com/viegasfh)) +- Fix recipe 'Launch a terminal for rapid logging' [\#1351](https://github.com/jrnl-org/jrnl/pull/1351) ([zapateo](https://github.com/zapateo)) - Fix readme splash and add changelog link to readme [\#1339](https://github.com/jrnl-org/jrnl/pull/1339) ([micahellison](https://github.com/micahellison)) - Document journal types [\#1331](https://github.com/jrnl-org/jrnl/pull/1331) ([micahellison](https://github.com/micahellison)) From 533d770753a8ff4ea8272d1d6868cd9153806791 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Oct 2021 14:56:01 -0700 Subject: [PATCH 0523/1132] Bump pyyaml from 5.4.1 to 6.0 (#1356) Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.4.1 to 6.0. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/5.4.1...6.0) --- updated-dependencies: - dependency-name: pyyaml dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonathan Wren --- poetry.lock | 330 ++++++++++++++++++++++++++-------------------------- 1 file changed, 162 insertions(+), 168 deletions(-) diff --git a/poetry.lock b/poetry.lock index 939ba6c3..8098c0dd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -99,7 +99,7 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cffi" -version = "1.14.6" +version = "1.15.0" description = "Foreign Function Interface for Python calling C code." category = "main" optional = false @@ -110,7 +110,7 @@ pycparser = "*" [[package]] name = "click" -version = "8.0.1" +version = "8.0.3" description = "Composable command line interface toolkit" category = "dev" optional = false @@ -168,17 +168,17 @@ python-versions = ">=3.5" [[package]] name = "flake8" -version = "3.9.2" +version = "4.0.1" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-metadata = {version = "<4.3", markers = "python_version < \"3.8\""} mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.7.0,<2.8.0" -pyflakes = ">=2.3.0,<2.4.0" +pycodestyle = ">=2.8.0,<2.9.0" +pyflakes = ">=2.4.0,<2.5.0" [[package]] name = "ghp-import" @@ -204,7 +204,7 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.8.1" +version = "4.2.0" description = "Read metadata from Python packages" category = "main" optional = false @@ -216,8 +216,7 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -perf = ["ipython"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -301,7 +300,7 @@ trio = ["trio", "async-generator"] [[package]] name = "jinja2" -version = "3.0.1" +version = "3.0.2" description = "A very fast and expressive template engine." category = "dev" optional = false @@ -572,11 +571,11 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pycodestyle" -version = "2.7.0" +version = "2.8.0" description = "Python style guide checker" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pycparser" @@ -588,7 +587,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pyflakes" -version = "2.3.1" +version = "2.4.0" description = "passive checker of Python programs" category = "dev" optional = false @@ -710,11 +709,11 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.4.1" +version = "6.0" description = "YAML parser and emitter for Python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" [[package]] name = "pyyaml-env-tag" @@ -729,7 +728,7 @@ pyyaml = "*" [[package]] name = "regex" -version = "2021.9.30" +version = "2021.10.8" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -737,11 +736,11 @@ python-versions = "*" [[package]] name = "rich" -version = "10.11.0" +version = "10.12.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.6.2,<4.0.0" [package.dependencies] colorama = ">=0.4.0,<0.5.0" @@ -931,55 +930,60 @@ black = [ {file = "black-21.9b0.tar.gz", hash = "sha256:7de4cfc7eb6b710de325712d40125689101d21d25283eed7e9998722cf10eb91"}, ] cffi = [ - {file = "cffi-1.14.6-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c"}, - {file = "cffi-1.14.6-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99"}, - {file = "cffi-1.14.6-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819"}, - {file = "cffi-1.14.6-cp27-cp27m-win32.whl", hash = "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20"}, - {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, - {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, - {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, - {file = "cffi-1.14.6-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534"}, - {file = "cffi-1.14.6-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a"}, - {file = "cffi-1.14.6-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5"}, - {file = "cffi-1.14.6-cp35-cp35m-win32.whl", hash = "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca"}, - {file = "cffi-1.14.6-cp35-cp35m-win_amd64.whl", hash = "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218"}, - {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb"}, - {file = "cffi-1.14.6-cp36-cp36m-win32.whl", hash = "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a"}, - {file = "cffi-1.14.6-cp36-cp36m-win_amd64.whl", hash = "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e"}, - {file = "cffi-1.14.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762"}, - {file = "cffi-1.14.6-cp37-cp37m-win32.whl", hash = "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771"}, - {file = "cffi-1.14.6-cp37-cp37m-win_amd64.whl", hash = "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a"}, - {file = "cffi-1.14.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc"}, - {file = "cffi-1.14.6-cp38-cp38-win32.whl", hash = "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548"}, - {file = "cffi-1.14.6-cp38-cp38-win_amd64.whl", hash = "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156"}, - {file = "cffi-1.14.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87"}, - {file = "cffi-1.14.6-cp39-cp39-win32.whl", hash = "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728"}, - {file = "cffi-1.14.6-cp39-cp39-win_amd64.whl", hash = "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2"}, - {file = "cffi-1.14.6.tar.gz", hash = "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd"}, + {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, + {file = "cffi-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:23cfe892bd5dd8941608f93348c0737e369e51c100d03718f108bf1add7bd6d0"}, + {file = "cffi-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:41d45de54cd277a7878919867c0f08b0cf817605e4eb94093e7516505d3c8d14"}, + {file = "cffi-1.15.0-cp27-cp27m-win32.whl", hash = "sha256:4a306fa632e8f0928956a41fa8e1d6243c71e7eb59ffbd165fc0b41e316b2474"}, + {file = "cffi-1.15.0-cp27-cp27m-win_amd64.whl", hash = "sha256:e7022a66d9b55e93e1a845d8c9eba2a1bebd4966cd8bfc25d9cd07d515b33fa6"}, + {file = "cffi-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:14cd121ea63ecdae71efa69c15c5543a4b5fbcd0bbe2aad864baca0063cecf27"}, + {file = "cffi-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d4d692a89c5cf08a8557fdeb329b82e7bf609aadfaed6c0d79f5a449a3c7c023"}, + {file = "cffi-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0104fb5ae2391d46a4cb082abdd5c69ea4eab79d8d44eaaf79f1b1fd806ee4c2"}, + {file = "cffi-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:91ec59c33514b7c7559a6acda53bbfe1b283949c34fe7440bcf917f96ac0723e"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f5c7150ad32ba43a07c4479f40241756145a1f03b43480e058cfd862bf5041c7"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:00c878c90cb53ccfaae6b8bc18ad05d2036553e6d9d1d9dbcf323bbe83854ca3"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abb9a20a72ac4e0fdb50dae135ba5e77880518e742077ced47eb1499e29a443c"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a5263e363c27b653a90078143adb3d076c1a748ec9ecc78ea2fb916f9b861962"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f54a64f8b0c8ff0b64d18aa76675262e1700f3995182267998c31ae974fbc382"}, + {file = "cffi-1.15.0-cp310-cp310-win32.whl", hash = "sha256:c21c9e3896c23007803a875460fb786118f0cdd4434359577ea25eb556e34c55"}, + {file = "cffi-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:5e069f72d497312b24fcc02073d70cb989045d1c91cbd53979366077959933e0"}, + {file = "cffi-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:64d4ec9f448dfe041705426000cc13e34e6e5bb13736e9fd62e34a0b0c41566e"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2756c88cbb94231c7a147402476be2c4df2f6078099a6f4a480d239a8817ae39"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b96a311ac60a3f6be21d2572e46ce67f09abcf4d09344c49274eb9e0bf345fc"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75e4024375654472cc27e91cbe9eaa08567f7fbdf822638be2814ce059f58032"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:59888172256cac5629e60e72e86598027aca6bf01fa2465bdb676d37636573e8"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:27c219baf94952ae9d50ec19651a687b826792055353d07648a5695413e0c605"}, + {file = "cffi-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:4958391dbd6249d7ad855b9ca88fae690783a6be9e86df65865058ed81fc860e"}, + {file = "cffi-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:f6f824dc3bce0edab5f427efcfb1d63ee75b6fcb7282900ccaf925be84efb0fc"}, + {file = "cffi-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:06c48159c1abed75c2e721b1715c379fa3200c7784271b3c46df01383b593636"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c2051981a968d7de9dd2d7b87bcb9c939c74a34626a6e2f8181455dd49ed69e4"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fd8a250edc26254fe5b33be00402e6d287f562b6a5b2152dec302fa15bb3e997"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91d77d2a782be4274da750752bb1650a97bfd8f291022b379bb8e01c66b4e96b"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:45db3a33139e9c8f7c09234b5784a5e33d31fd6907800b316decad50af323ff2"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:263cc3d821c4ab2213cbe8cd8b355a7f72a8324577dc865ef98487c1aeee2bc7"}, + {file = "cffi-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:17771976e82e9f94976180f76468546834d22a7cc404b17c22df2a2c81db0c66"}, + {file = "cffi-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:3415c89f9204ee60cd09b235810be700e993e343a408693e80ce7f6a40108029"}, + {file = "cffi-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4238e6dab5d6a8ba812de994bbb0a79bddbdf80994e4ce802b6f6f3142fcc880"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0808014eb713677ec1292301ea4c81ad277b6cdf2fdd90fd540af98c0b101d20"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:57e9ac9ccc3101fac9d6014fba037473e4358ef4e89f8e181f8951a2c0162024"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b6c2ea03845c9f501ed1313e78de148cd3f6cad741a75d43a29b43da27f2e1e"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10dffb601ccfb65262a27233ac273d552ddc4d8ae1bf93b21c94b8511bffe728"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:786902fb9ba7433aae840e0ed609f45c7bcd4e225ebb9c753aa39725bb3e6ad6"}, + {file = "cffi-1.15.0-cp38-cp38-win32.whl", hash = "sha256:da5db4e883f1ce37f55c667e5c0de439df76ac4cb55964655906306918e7363c"}, + {file = "cffi-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:181dee03b1170ff1969489acf1c26533710231c58f95534e3edac87fff06c443"}, + {file = "cffi-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:45e8636704eacc432a206ac7345a5d3d2c62d95a507ec70d62f23cd91770482a"}, + {file = "cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:31fb708d9d7c3f49a60f04cf5b119aeefe5644daba1cd2a0fe389b674fd1de37"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6dc2737a3674b3e344847c8686cf29e500584ccad76204efea14f451d4cc669a"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74fdfdbfdc48d3f47148976f49fab3251e550a8720bebc99bf1483f5bfb5db3e"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffaa5c925128e29efbde7301d8ecaf35c8c60ffbcd6a1ffd3a552177c8e5e796"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f7d084648d77af029acb79a0ff49a0ad7e9d09057a9bf46596dac9514dc07df"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ef1f279350da2c586a69d32fc8733092fd32cc8ac95139a00377841f59a3f8d8"}, + {file = "cffi-1.15.0-cp39-cp39-win32.whl", hash = "sha256:2a23af14f408d53d5e6cd4e3d9a24ff9e05906ad574822a10563efcef137979a"}, + {file = "cffi-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:3773c4d81e6e818df2efbc7dd77325ca0dcb688116050fb2b3011218eda36139"}, + {file = "cffi-1.15.0.tar.gz", hash = "sha256:920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"}, ] click = [ - {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, - {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, + {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, + {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -1016,8 +1020,8 @@ decorator = [ {file = "decorator-5.1.0.tar.gz", hash = "sha256:e59913af105b9860aa2c8d3272d9de5a56a4e608db9a2f167a8480b323d529a7"}, ] flake8 = [ - {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, - {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, + {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, + {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, ] ghp-import = [ {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, @@ -1027,8 +1031,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, - {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, + {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"}, + {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1050,8 +1054,8 @@ jeepney = [ {file = "jeepney-0.7.1.tar.gz", hash = "sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f"}, ] jinja2 = [ - {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, - {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, + {file = "Jinja2-3.0.2-py3-none-any.whl", hash = "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c"}, + {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, ] keyring = [ {file = "keyring-23.2.1-py3-none-any.whl", hash = "sha256:bd2145a237ed70c8ce72978b497619ddfcae640b6dcf494402d5143e37755c6e"}, @@ -1066,22 +1070,12 @@ markdown = [ {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1090,21 +1084,14 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1114,9 +1101,6 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -1197,16 +1181,16 @@ py = [ {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, ] pycodestyle = [ - {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, - {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, + {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, + {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, ] pycparser = [ {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, ] pyflakes = [ - {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, - {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, + {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, + {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, ] pygments = [ {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, @@ -1248,86 +1232,96 @@ pyxdg = [ {file = "pyxdg-0.27.tar.gz", hash = "sha256:80bd93aae5ed82435f20462ea0208fb198d8eec262e831ee06ce9ddb6b91c5a5"}, ] pyyaml = [ - {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, - {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, - {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, - {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, - {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, - {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, - {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, - {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, - {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2021.9.30-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:66696c8336a1b5d1182464f3af3427cc760118f26d0b09a2ddc16a976a4d2637"}, - {file = "regex-2021.9.30-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d87459ad3ab40cd8493774f8a454b2e490d8e729e7e402a0625867a983e4e02"}, - {file = "regex-2021.9.30-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78cf6a1e023caf5e9a982f5377414e1aeac55198831b852835732cfd0a0ca5ff"}, - {file = "regex-2021.9.30-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:255791523f80ea8e48e79af7120b4697ef3b74f6886995dcdb08c41f8e516be0"}, - {file = "regex-2021.9.30-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e502f8d4e5ef714bcc2c94d499684890c94239526d61fdf1096547db91ca6aa6"}, - {file = "regex-2021.9.30-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4907fb0f9b9309a5bded72343e675a252c2589a41871874feace9a05a540241e"}, - {file = "regex-2021.9.30-cp310-cp310-win32.whl", hash = "sha256:3be40f720af170a6b20ddd2ad7904c58b13d2b56f6734ee5d09bbdeed2fa4816"}, - {file = "regex-2021.9.30-cp310-cp310-win_amd64.whl", hash = "sha256:c2b180ed30856dfa70cfe927b0fd38e6b68198a03039abdbeb1f2029758d87e7"}, - {file = "regex-2021.9.30-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e6f2d2f93001801296fe3ca86515eb04915472b5380d4d8752f09f25f0b9b0ed"}, - {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4fa7ba9ab2eba7284e0d7d94f61df7af86015b0398e123331362270d71fab0b9"}, - {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28040e89a04b60d579c69095c509a4f6a1a5379cd865258e3a186b7105de72c6"}, - {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f588209d3e4797882cd238195c175290dbc501973b10a581086b5c6bcd095ffb"}, - {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42952d325439ef223e4e9db7ee6d9087b5c68c5c15b1f9de68e990837682fc7b"}, - {file = "regex-2021.9.30-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cae4099031d80703954c39680323dabd87a69b21262303160776aa0e55970ca0"}, - {file = "regex-2021.9.30-cp36-cp36m-win32.whl", hash = "sha256:0de8ad66b08c3e673b61981b9e3626f8784d5564f8c3928e2ad408c0eb5ac38c"}, - {file = "regex-2021.9.30-cp36-cp36m-win_amd64.whl", hash = "sha256:b345ecde37c86dd7084c62954468a4a655fd2d24fd9b237949dd07a4d0dd6f4c"}, - {file = "regex-2021.9.30-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6f08187136f11e430638c2c66e1db091105d7c2e9902489f0dbc69b44c222b4"}, - {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b55442650f541d195a535ccec33078c78a9521973fb960923da7515e9ed78fa6"}, - {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87e9c489aa98f50f367fb26cc9c8908d668e9228d327644d7aa568d47e456f47"}, - {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e2cb7d4909ed16ed35729d38af585673f1f0833e73dfdf0c18e5be0061107b99"}, - {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0861e7f6325e821d5c40514c551fd538b292f8cc3960086e73491b9c5d8291d"}, - {file = "regex-2021.9.30-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:81fdc90f999b2147fc62e303440c424c47e5573a9b615ed5d43a5b832efcca9e"}, - {file = "regex-2021.9.30-cp37-cp37m-win32.whl", hash = "sha256:8c1ad61fa024195136a6b7b89538030bd00df15f90ac177ca278df9b2386c96f"}, - {file = "regex-2021.9.30-cp37-cp37m-win_amd64.whl", hash = "sha256:e3770781353a4886b68ef10cec31c1f61e8e3a0be5f213c2bb15a86efd999bc4"}, - {file = "regex-2021.9.30-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9c065d95a514a06b92a5026766d72ac91bfabf581adb5b29bc5c91d4b3ee9b83"}, - {file = "regex-2021.9.30-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9925985be05d54b3d25fd6c1ea8e50ff1f7c2744c75bdc4d3b45c790afa2bcb3"}, - {file = "regex-2021.9.30-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470f2c882f2672d8eeda8ab27992aec277c067d280b52541357e1acd7e606dae"}, - {file = "regex-2021.9.30-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ad0517df22a97f1da20d8f1c8cb71a5d1997fa383326b81f9cf22c9dadfbdf34"}, - {file = "regex-2021.9.30-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e30838df7bfd20db6466fd309d9b580d32855f8e2c2e6d74cf9da27dcd9b63"}, - {file = "regex-2021.9.30-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5b34d2335d6aedec7dcadd3f8283b9682fadad8b9b008da8788d2fce76125ebe"}, - {file = "regex-2021.9.30-cp38-cp38-win32.whl", hash = "sha256:e07049cece3462c626d650e8bf42ddbca3abf4aa08155002c28cb6d9a5a281e2"}, - {file = "regex-2021.9.30-cp38-cp38-win_amd64.whl", hash = "sha256:37868075eda024470bd0feab872c692ac4ee29db1e14baec103257bf6cc64346"}, - {file = "regex-2021.9.30-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d331f238a7accfbbe1c4cd1ba610d4c087b206353539331e32a8f05345c74aec"}, - {file = "regex-2021.9.30-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6348a7ab2a502cbdd0b7fd0496d614007489adb7361956b38044d1d588e66e04"}, - {file = "regex-2021.9.30-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce7b1cca6c23f19bee8dc40228d9c314d86d1e51996b86f924aca302fc8f8bf9"}, - {file = "regex-2021.9.30-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1f1125bc5172ab3a049bc6f4b9c0aae95a2a2001a77e6d6e4239fa3653e202b5"}, - {file = "regex-2021.9.30-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:638e98d069b14113e8afba6a54d1ca123f712c0d105e67c1f9211b2a825ef926"}, - {file = "regex-2021.9.30-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9a0b0db6b49da7fa37ca8eddf9f40a8dbc599bad43e64f452284f37b6c34d91c"}, - {file = "regex-2021.9.30-cp39-cp39-win32.whl", hash = "sha256:9910869c472e5a6728680ca357b5846546cbbd2ab3ad5bef986ef0bc438d0aa6"}, - {file = "regex-2021.9.30-cp39-cp39-win_amd64.whl", hash = "sha256:3b71213ec3bad9a5a02e049f2ec86b3d7c3e350129ae0f4e2f99c12b5da919ed"}, - {file = "regex-2021.9.30.tar.gz", hash = "sha256:81e125d9ba54c34579e4539a967e976a3c56150796674aec318b1b2f49251be7"}, + {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:094a905e87a4171508c2a0e10217795f83c636ccc05ddf86e7272c26e14056ae"}, + {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:981c786293a3115bc14c103086ae54e5ee50ca57f4c02ce7cf1b60318d1e8072"}, + {file = "regex-2021.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b0f2f874c6a157c91708ac352470cb3bef8e8814f5325e3c5c7a0533064c6a24"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51feefd58ac38eb91a21921b047da8644155e5678e9066af7bcb30ee0dca7361"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea8de658d7db5987b11097445f2b1f134400e2232cb40e614e5f7b6f5428710e"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1ce02f420a7ec3b2480fe6746d756530f69769292eca363218c2291d0b116a01"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:39079ebf54156be6e6902f5c70c078f453350616cfe7bfd2dd15bdb3eac20ccc"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ff24897f6b2001c38a805d53b6ae72267025878d35ea225aa24675fbff2dba7f"}, + {file = "regex-2021.10.8-cp310-cp310-win32.whl", hash = "sha256:c6569ba7b948c3d61d27f04e2b08ebee24fec9ff8e9ea154d8d1e975b175bfa7"}, + {file = "regex-2021.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:45cb0f7ff782ef51bc79e227a87e4e8f24bc68192f8de4f18aae60b1d60bc152"}, + {file = "regex-2021.10.8-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fab3ab8aedfb443abb36729410403f0fe7f60ad860c19a979d47fb3eb98ef820"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74e55f8d66f1b41d44bc44c891bcf2c7fad252f8f323ee86fba99d71fd1ad5e3"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d52c5e089edbdb6083391faffbe70329b804652a53c2fdca3533e99ab0580d9"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1abbd95cbe9e2467cac65c77b6abd9223df717c7ae91a628502de67c73bf6838"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9b5c215f3870aa9b011c00daeb7be7e1ae4ecd628e9beb6d7e6107e07d81287"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f540f153c4f5617bc4ba6433534f8916d96366a08797cbbe4132c37b70403e92"}, + {file = "regex-2021.10.8-cp36-cp36m-win32.whl", hash = "sha256:1f51926db492440e66c89cd2be042f2396cf91e5b05383acd7372b8cb7da373f"}, + {file = "regex-2021.10.8-cp36-cp36m-win_amd64.whl", hash = "sha256:5f55c4804797ef7381518e683249310f7f9646da271b71cb6b3552416c7894ee"}, + {file = "regex-2021.10.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb2baff66b7d2267e07ef71e17d01283b55b3cc51a81b54cc385e721ae172ba4"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e527ab1c4c7cf2643d93406c04e1d289a9d12966529381ce8163c4d2abe4faf"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c98b013273e9da5790ff6002ab326e3f81072b4616fd95f06c8fa733d2745f"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:55ef044899706c10bc0aa052f2fc2e58551e2510694d6aae13f37c50f3f6ff61"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa0ab3530a279a3b7f50f852f1bab41bc304f098350b03e30a3876b7dd89840e"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a37305eb3199d8f0d8125ec2fb143ba94ff6d6d92554c4b8d4a8435795a6eccd"}, + {file = "regex-2021.10.8-cp37-cp37m-win32.whl", hash = "sha256:2efd47704bbb016136fe34dfb74c805b1ef5c7313aef3ce6dcb5ff844299f432"}, + {file = "regex-2021.10.8-cp37-cp37m-win_amd64.whl", hash = "sha256:924079d5590979c0e961681507eb1773a142553564ccae18d36f1de7324e71ca"}, + {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19b8f6d23b2dc93e8e1e7e288d3010e58fafed323474cf7f27ab9451635136d9"}, + {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b09d3904bf312d11308d9a2867427479d277365b1617e48ad09696fa7dfcdf59"}, + {file = "regex-2021.10.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:951be934dc25d8779d92b530e922de44dda3c82a509cdb5d619f3a0b1491fafa"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f125fce0a0ae4fd5c3388d369d7a7d78f185f904c90dd235f7ecf8fe13fa741"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f199419a81c1016e0560c39773c12f0bd924c37715bffc64b97140d2c314354"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:09e1031e2059abd91177c302da392a7b6859ceda038be9e015b522a182c89e4f"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c070d5895ac6aeb665bd3cd79f673775caf8d33a0b569e98ac434617ecea57d"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:176796cb7f82a7098b0c436d6daac82f57b9101bb17b8e8119c36eecf06a60a3"}, + {file = "regex-2021.10.8-cp38-cp38-win32.whl", hash = "sha256:5e5796d2f36d3c48875514c5cd9e4325a1ca172fc6c78b469faa8ddd3d770593"}, + {file = "regex-2021.10.8-cp38-cp38-win_amd64.whl", hash = "sha256:e4204708fa116dd03436a337e8e84261bc8051d058221ec63535c9403a1582a1"}, + {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6dcf53d35850ce938b4f044a43b33015ebde292840cef3af2c8eb4c860730fff"}, + {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b8b6ee6555b6fbae578f1468b3f685cdfe7940a65675611365a7ea1f8d724991"}, + {file = "regex-2021.10.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e2ec1c106d3f754444abf63b31e5c4f9b5d272272a491fa4320475aba9e8157c"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:973499dac63625a5ef9dfa4c791aa33a502ddb7615d992bdc89cf2cc2285daa3"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88dc3c1acd3f0ecfde5f95c32fcb9beda709dbdf5012acdcf66acbc4794468eb"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4786dae85c1f0624ac77cb3813ed99267c9adb72e59fdc7297e1cf4d6036d493"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe6ce4f3d3c48f9f402da1ceb571548133d3322003ce01b20d960a82251695d2"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e3e2cea8f1993f476a6833ef157f5d9e8c75a59a8d8b0395a9a6887a097243b"}, + {file = "regex-2021.10.8-cp39-cp39-win32.whl", hash = "sha256:82cfb97a36b1a53de32b642482c6c46b6ce80803854445e19bc49993655ebf3b"}, + {file = "regex-2021.10.8-cp39-cp39-win_amd64.whl", hash = "sha256:b04e512eb628ea82ed86eb31c0f7fc6842b46bf2601b66b1356a7008327f7700"}, + {file = "regex-2021.10.8.tar.gz", hash = "sha256:26895d7c9bbda5c52b3635ce5991caa90fbb1ddfac9c9ff1c7ce505e2282fb2a"}, ] rich = [ - {file = "rich-10.11.0-py3-none-any.whl", hash = "sha256:44bb3f9553d00b3c8938abf89828df870322b9ba43caf3b12bb7758debdc6dec"}, - {file = "rich-10.11.0.tar.gz", hash = "sha256:016fa105f34b69c434e7f908bb5bd7fefa9616efdb218a2917117683a6394ce5"}, + {file = "rich-10.12.0-py3-none-any.whl", hash = "sha256:c30d6808d1cd3defd56a7bd2d587d13e53b5f55de6cf587f035bcbb56bc3f37b"}, + {file = "rich-10.12.0.tar.gz", hash = "sha256:83fb3eff778beec3c55201455c17cccde1ccdf66d5b4dade8ef28f56b50c4bd4"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, From b1ba88c138b82aa38dc91aa3e621b38d25e49ed8 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 16 Oct 2021 15:21:49 -0700 Subject: [PATCH 0524/1132] Migrate contributing.md to docs site (#1266) * Initial migration of contributing.md to docs site * Update contributing to include pytest-bdd changes * add top level section support, and h2 support in sidebar * Incorporate latest changes to contributing.md, clean up language and formatting, and check/add links as necessary * Add a link to milestones * Update CONTRIBUTING.md Co-authored-by: Jonathan Wren --- CONTRIBUTING.md | 123 +--------------------------------- docs/contributing.md | 127 ++++++++++++++++++++++++++++++++++++ docs_theme/assets/theme.css | 42 +++++++++--- mkdocs.yml | 19 +++--- 4 files changed, 172 insertions(+), 139 deletions(-) create mode 100644 docs/contributing.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf9c4f36..93b57d7e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,125 +2,4 @@ License: https://www.gnu.org/licenses/gpl-3.0.html --> # Contributing -We welcome contributions to jrnl, whether it's through reporting bugs, improving the documentation, testing releases, engaging in discussion on features and bugs, or writing code. - -## Table of Contents - * [Code of Conduct](#code-of-conduct) - * [Reporting Bugs](#reporting-bugs) - * [Editing Documentation](#editing-documentation) - * [Testing](#testing) - * [Submitting feature requests and ideas](#submitting-feature-requests-and-ideas) - * [Developing](#developing) - -## Code of Conduct - -Before starting, please read the [Code of Conduct](CODE_OF_CONDUCT.md). - -## Reporting Bugs - -Please report bugs by [opening a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describing it as well as possible. Many bugs are specific to a particular operating system and Python version, so please include that information! - -## Editing Documentation - -If you find a typo or a mistake in the docs, please fix it right away and send a pull request. - -To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result if you run `make html` (or `poetry run mkdocs serve` if on Windows) inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). - -The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. - -### Recipes and external editors - -If you'd like to share a jrnl command line trick that you find useful, or advice on how to integrate a particular external editor, you may find it worthwhile to add it to the ["Recipes" section](docs/recipes.md). - -## Testing - -Much of the work of maintaining jrnl involves testing rather than coding. - -The nature of jrnl means we deal with extremely sensitive data, and can't risk data loss. While jrnl does have a comprehensive automated testing suite, user testing is crucial to mitigating this risk. - -### Prereleases - -[Prereleases are deployed through PyPi much like normal releases](https://pypi.org/project/jrnl/#history). You can use [pipx](https://pypi.org/project/pipx/) to fetch them and test them. See the [changelog](CHANGELOG.md) for information on what has changed with each release. - -### Pull requests - -If you are comfortable enough with git, feel free to fetch particular [pull requests](https://github.com/jrnl-org/jrnl/pulls), test them yourself, and report back your findings. Bonus points if you can add a screencast of how the new feature works. - -### Confirm bug reports - -There are always [open bugs among our GitHub issues](https://github.com/jrnl-org/jrnl/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and many are specific to a particular OS, Python version, or jrnl version. A simple comment like "Confirmed on jrnl v2.2, MacOS 10.15, Python 3.8.1" would be extremely helpful in tracking down bugs. - -### Automate tests - -See the develop section below for information on how to contribute new automated tests. - -## Submitting feature requests and ideas - -If you have a feature request or idea for jrnl, please [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describe the goal of the feature, and any relevant use cases. We'll discuss the issue with you, and decide if it's a good fit for the project. - -When discussing new features, please keep in mind our design goals. jrnl strives to do one thing well. To us, that means: - -* be _slim_ -* have a simple interface -* avoid duplicating functionality - -## Developing - -### Getting your environment set up - -You will need to install [poetry](https://poetry.eustace.io/) to develop jrnl. It will take care of all of the project's other dependencies. - -### Understanding the branches - -jrnl uses two primary branches: - - * `develop` - for ongoing development - * `release` - for releases - -In general, pull requests should be made on the `develop` branch. - -### Common development commands - -You can find an inventory of commands in the `makefile`. \*nix users can run the commands by typing `make` followed by the name of the command; however, Windows users will need to type out the commands directly, or install a third-party make tool such as [GNU Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm). - -A typical development workflow includes: - - * Installing dependencies: `poetry install` - * Running tests: `make test` - * Running the source in a virtual environment: - * `poetry shell` - * `jrnl` (with or without arguments as necessary) - * Linting the code to standardize its style: `make lint` - -### Updating automated tests - -When resolving bugs or adding new functionality, please add tests to prevent that functionality from breaking in the future. If you notice any functionality that isn't covered in the tests, feel free to submit a test-only pull request as well. - -For testing, jrnl uses [pytest](https://docs.pytest.org) for unit tests, and [pytest-bdd](https://pytest-bdd.readthedocs.io/) for integration testing. All tests are in the `tests` folder. - -Many tests can be created by only editing `*.feature` files with the same format as other tests. For more complicated functionality, you may need to implement steps in `tests/lib/` which are then executed by your tests in the `feature` files. - -Starting in 2020, jrnl is also using [pytest](https://docs.pytest.org/) for unit tests. These tests are in the `tests` folder. - -### Submitting pull requests - -When you're ready, feel free to submit a pull request (PR). The jrnl maintainers generally review the pull requests every two weeks, but the continuous integration pipeline will run on automated tests on it within a matter of minutes and will report back any issues it has found with your code across a variety of environments. - -The pull request template contains a checklist full of housekeeping items. Please fill them out as necessary when you submit. - -If a pull request contains failing tests, it probably will not be reviewed, and it definitely will not be approved. However, if you need help resolving a failing test, please mention that in your PR. - -### Finding things to work on - -You can search the [jrnl GitHub issues](https://github.com/jrnl-org/jrnl/issues) by [label](https://github.com/jrnl-org/jrnl/labels) for things to work on. Here are some labels worth searching: - -* [critical](https://github.com/jrnl-org/jrnl/labels/critical) -* [help wanted](https://github.com/jrnl-org/jrnl/labels/help%20wanted) -* [bug](https://github.com/jrnl-org/jrnl/labels/bug) -* [enhancement](https://github.com/jrnl-org/jrnl/labels/enhancement) - -### A note for new programmers and programmers new to python - -Although jrnl has grown quite a bit since its inception, the overall complexity (for an end-user program) is fairly low, and we hope you'll find the code easy enough to understand. - -If you have a question, please don't hesitate to ask! Python is known for its welcoming community and openness to novice programmers, so feel free to fork the code and play around with it! If you create something you want to share with us, please create a pull request. We never expect pull requests to be perfect, idiomatic, instantly mergeable code. We can work through it together! +See "[Contributing](docs/contributing.md)" in the `docs` directory. diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 00000000..71c1d337 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,127 @@ + +# Contributing to jrnl + +We welcome contributions to jrnl, whether it's through reporting bugs, improving the documentation, testing releases, engaging in discussion on features and bugs, or writing code. + +## Table of Contents + * [Code of Conduct](#code-of-conduct) + * [Reporting Bugs](#reporting-bugs) + * [Editing Documentation](#editing-documentation) + * [Testing](#testing) + * [Submitting feature requests and ideas](#submitting-feature-requests-and-ideas) + * [Developing jrnl](#developing) + +## Code of Conduct + +Before starting, please read the [Code of Conduct](https://github.com/jrnl-org/jrnl/blob/develop/CODE_OF_CONDUCT.md). + +## Reporting Bugs + +Please report bugs by [opening a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describing it as well as possible. Many bugs are specific to a particular operating system and Python version, so please include that information! + +## Editing Documentation + +If you find a typo or a mistake in the docs, please fix it right away and send a pull request. If you're unsure what to change but still see a problem, you can [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) with the "Documentation change" type. + +To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `make html` (or `poetry run mkdocs serve` if on Windows) inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). + +The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. + +### Recipes and external editors + +If you'd like to share a jrnl command line trick that you find useful, or advice on how to integrate a particular external editor, you may find it worthwhile to add it to the ["Recipes" section](recipes.md). + +## Testing + +Much of the work of maintaining jrnl involves testing rather than coding. + +The nature of jrnl means we deal with extremely sensitive data, and can't risk data loss. While jrnl does have a comprehensive automated testing suite, user testing is crucial to mitigating this risk. + +### Prereleases + +[Prereleases are deployed through PyPi much like normal releases](https://pypi.org/project/jrnl/#history). You can use [pipx](https://pypi.org/project/pipx/) to fetch them and test them. See the [changelog](https://github.com/jrnl-org/jrnl/blob/develop/CHANGELOG.md) for information on what has changed with each release. + +### Pull requests + +If you are comfortable enough with git, feel free to fetch particular [pull requests](https://github.com/jrnl-org/jrnl/pulls), test them yourself, and report back your findings. Bonus points if you can add a screencast of how the new feature works. + +### Confirm bug reports + +There are always [open bugs among our GitHub issues](https://github.com/jrnl-org/jrnl/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and many are specific to a particular OS, Python version, or jrnl version. A simple comment like "Confirmed on jrnl v2.2, MacOS 10.15, Python 3.8.1" would be extremely helpful in tracking down bugs. + +### Automate tests + +See the develop section below for information on how to contribute new automated tests. + +## Submitting feature requests and ideas + +If you have a feature request or idea for jrnl, please [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) and describe the goal of the feature, and any relevant use cases. We'll discuss the issue with you, and decide if it's a good fit for the project. + +When discussing new features, please keep in mind our design goals. jrnl strives to +[do one thing well](https://en.wikipedia.org/wiki/Unix_philosophy). To us, that means: + +* being _nimble_ +* having a simple interface +* avoiding duplicating functionality + +## Developing + +### Getting your environment set up + +You will need to install [poetry](https://python-poetry.org/) to develop jrnl. It will take care of all of the project's other dependencies. + +### Understanding the branches + +jrnl uses two primary branches: + + * `develop` - for ongoing development + * `release` - for releases + +In general, pull requests should be made on the `develop` branch. + +### Common development commands + +You can find an inventory of commands in the `makefile`. \*nix users can run the commands by typing `make` followed by the name of the command; however, Windows users will need to type out the commands directly, or install a third-party make tool such as [GNU Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm). + +A typical development workflow includes: + + * Installing dependencies: `poetry install` + * Running tests: `make test` + * Running the source in a virtual environment: + * `poetry shell` + * `jrnl` (with or without arguments as necessary) + * Linting the code to standardize its style: `make lint` + +### Updating automated tests + +When resolving bugs or adding new functionality, please add tests to prevent that functionality from breaking in the future. If you notice any functionality that isn't covered in the tests, feel free to submit a test-only pull request as well. + +For testing, jrnl uses [pytest](https://docs.pytest.org) for unit tests, and [pytest-bdd](https://pytest-bdd.readthedocs.io/) for integration testing. All tests are in the `tests` folder. + +Many tests can be created by only editing `*.feature` files with the same format as other tests. For more complicated functionality, you may need to implement steps in `tests/lib/` which are then executed by your tests in the `feature` files. + +### Submitting pull requests + +When you're ready, feel free to submit a pull request (PR). The jrnl maintainers generally review the pull requests every two weeks, but the continuous integration pipeline will run on automated tests on it within a matter of minutes and will report back any issues it has found with your code across a variety of environments. + +The pull request template contains a checklist full of housekeeping items. Please fill them out as necessary when you submit. + +If a pull request contains failing tests, it probably will not be reviewed, and it definitely will not be approved. However, if you need help resolving a failing test, please mention that in your PR. + +### Finding things to work on + +You can search the [jrnl GitHub issues](https://github.com/jrnl-org/jrnl/issues) by [label](https://github.com/jrnl-org/jrnl/labels) for things to work on. Here are some labels worth searching: + +* [critical](https://github.com/jrnl-org/jrnl/labels/critical) +* [help wanted](https://github.com/jrnl-org/jrnl/labels/help%20wanted) +* [bug](https://github.com/jrnl-org/jrnl/labels/bug) +* [enhancement](https://github.com/jrnl-org/jrnl/labels/enhancement) + +You can also get a feel for the project's priorities by reviewing the [milestones](https://github.com/jrnl-org/jrnl/milestones). + +### A note for new programmers and programmers new to python + +Although jrnl has grown quite a bit since its inception, the overall complexity (for an end-user program) is fairly low, and we hope you'll find the code easy enough to understand. + +If you have a question, please don't hesitate to ask! Python is known for its welcoming community and openness to novice programmers, so feel free to fork the code and play around with it! If you create something you want to share with us, please create a pull request. We never expect pull requests to be perfect, idiomatic, instantly mergeable code. We can work through it together! diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index 491a0baa..d98392e8 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -51,6 +51,14 @@ h2 { margin-top: 40px; } +h3 { + font-size: 1.1em; +} + +h4 { + font-size: 1em; +} + p, td, tr, @@ -72,8 +80,10 @@ div.rst-content { } .wy-side-nav-search, -.wy-menu-vertical li.current { +.wy-menu-vertical li.current, +.wy-menu-vertical li.toctree-l1.current > a { background-color: transparent; + border: none; } .wy-nav-top { @@ -107,7 +117,8 @@ a.icon-home:before { line-height: 2em; } -.wy-menu-vertical a:hover { +.wy-menu-vertical a:hover, +.wy-menu-vertical li.current a:hover { background-color: var(--black-shadow); color: var(--white); } @@ -119,12 +130,12 @@ a.icon-home:before { position: relative; } -.wy-menu-vertical li.current>a { +.wy-menu-vertical li.current > a.current { background: var(--darkest-purple); border: none !important; } -.wy-menu-vertical li.current>a:hover { +.wy-menu-vertical li.current > a:hover { background: var(--darkest-purple); border: none; } @@ -146,10 +157,12 @@ a.icon-home:before { border-bottom: 1em solid transparent; border-right: 1em solid var(--white); } -.wy-menu-vertical li li.toctree-l2 { - font-weight: 800 !important; + +.wy-menu-vertical li.toctree-l2.current { font-size: 50px; - color: red !important; +} + +.wy-menu-vertical li.toctree-l2.current > a{ } .toctree-expand:before { @@ -161,10 +174,14 @@ a.icon-home:before { display: none; } +.wy-menu-vertical p.caption { + margin-top: 2em; +} + .wy-menu-vertical span { color: var(--white); font-size: 1.2em; - font-weight: 300; + font-weight: 600; } .wy-menu-vertical li a { @@ -207,9 +224,16 @@ form .search-query::placeholder { } .toctree-l2 a:first-child { - display: none; + display: block; } +.wy-menu-vertical li.current ul { + background-color: var(--mid-purple); + border-bottom: 1px solid var(--mid-purple); + border-top: 1px solid var(--dark-purple); +} + + /* ------------------------------------------------------------ */ /* Logo: ; */ /* ------------------------------------------------------------ */ diff --git a/mkdocs.yml b/mkdocs.yml index 348f0a83..5515d0fa 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,11 +18,14 @@ site_author: jrnl contributors site_description: Collect your thoughts and notes without leaving the command line. nav: - Overview: overview.md - - Quickstart: installation.md - - Basic Usage: usage.md - - Encryption: encryption.md - - Journal Types: journal-types.md - - Privacy and Security: privacy-and-security.md - - Formats: formats.md - - Advanced Usage: advanced.md - - Recipes: recipes.md + - 'User Guide': + - Quickstart: installation.md + - Basic Usage: usage.md + - Encryption: encryption.md + - Journal Types: journal-types.md + - Privacy and Security: privacy-and-security.md + - Formats: formats.md + - Advanced Usage: advanced.md + - Recipes: recipes.md + - 'Contributing': + - Contributing to jrnl: contributing.md From 54c9a058df97ced8f2f07d11cba155af25a86446 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Oct 2021 22:23:23 +0000 Subject: [PATCH 0525/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cc8a5e1..c2eca1e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ **Documentation:** - Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326) +- Move and expand contributing.md content into docs site [\#1180](https://github.com/jrnl-org/jrnl/issues/1180) - Added Recipe for visualizing Markdown in the CLI [\#1354](https://github.com/jrnl-org/jrnl/pull/1354) ([viegasfh](https://github.com/viegasfh)) - Fix recipe 'Launch a terminal for rapid logging' [\#1351](https://github.com/jrnl-org/jrnl/pull/1351) ([zapateo](https://github.com/zapateo)) - Fix readme splash and add changelog link to readme [\#1339](https://github.com/jrnl-org/jrnl/pull/1339) ([micahellison](https://github.com/micahellison)) From c68c13ab6e2befa802c493e25de8215eb84120e6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 23 Oct 2021 21:17:32 +0200 Subject: [PATCH 0526/1132] Switch to poetry-core (#1359) --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 098211e4..c36a5264 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,5 +99,6 @@ filterwarnings = [ extend-ignore = "E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W3,W5" [build-system] -requires = ["poetry>=1.1"] -build-backend = "poetry.masonry.api" +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + From b4ccf44d3aff38d496e119f576f99c375e626226 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Oct 2021 19:19:39 +0000 Subject: [PATCH 0527/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2eca1e1..bfd51aec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Build:** +- Switch from poetry to poetry-core [\#1359](https://github.com/jrnl-org/jrnl/pull/1359) ([fabaff](https://github.com/fabaff)) - Add more steps to `pytest`, fully remove `behave` [\#1347](https://github.com/jrnl-org/jrnl/pull/1347) ([wren](https://github.com/wren)) **Documentation:** From 8cabf0f87a09e8c8aa2f336f380c26169df29bda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Nov 2021 13:24:50 -0700 Subject: [PATCH 0528/1132] Bump black from 21.9b0 to 21.10b0 (#1370) Bumps [black](https://github.com/psf/black) from 21.9b0 to 21.10b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8098c0dd..f97ee49b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -71,7 +71,7 @@ python-versions = "*" [[package]] name = "black" -version = "21.9b0" +version = "21.10b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -92,9 +92,9 @@ typing-extensions = [ [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] +d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.2)"] +python2 = ["typed-ast (>=1.4.3)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] @@ -926,8 +926,8 @@ backcall = [ {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] black = [ - {file = "black-21.9b0-py3-none-any.whl", hash = "sha256:380f1b5da05e5a1429225676655dddb96f5ae8c75bdf91e53d798871b902a115"}, - {file = "black-21.9b0.tar.gz", hash = "sha256:7de4cfc7eb6b710de325712d40125689101d21d25283eed7e9998722cf10eb91"}, + {file = "black-21.10b0-py3-none-any.whl", hash = "sha256:6eb7448da9143ee65b856a5f3676b7dda98ad9abe0f87fce8c59291f15e82a5b"}, + {file = "black-21.10b0.tar.gz", hash = "sha256:a9952229092e325fe5f3dae56d81f639b23f7131eb840781947e4b2886030f33"}, ] cffi = [ {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, @@ -1070,12 +1070,28 @@ markdown = [ {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1084,14 +1100,27 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1101,6 +1130,12 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, From f608e176c1f1a0d884a1e38684f026787eb4235f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 20:26:39 +0000 Subject: [PATCH 0529/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfd51aec..8c16ce07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ **Packaging:** +- Bump black from 21.9b0 to 21.10b0 [\#1370](https://github.com/jrnl-org/jrnl/pull/1370) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump mkdocs from 1.2.2 to 1.2.3 [\#1355](https://github.com/jrnl-org/jrnl/pull/1355) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot)) @@ -27,6 +28,7 @@ - Bump keyring from 23.1.0 to 23.2.1 [\#1342](https://github.com/jrnl-org/jrnl/pull/1342) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.4 to 6.2.5 [\#1334](https://github.com/jrnl-org/jrnl/pull/1334) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.7b0 to 21.8b0 [\#1333](https://github.com/jrnl-org/jrnl/pull/1333) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump cryptography from 3.4.7 to 3.4.8 [\#1329](https://github.com/jrnl-org/jrnl/pull/1329) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.3](https://pypi.org/project/jrnl/v2.8.3/) (2021-09-06) From 99c19b2a64d416db7f8f047eee7e2814812676c8 Mon Sep 17 00:00:00 2001 From: Ben Beasley Date: Sat, 6 Nov 2021 16:30:25 -0400 Subject: [PATCH 0530/1132] Support pytest-bdd 5.x (#1365) https://github.com/pytest-dev/pytest-bdd/blob/5.0.0/README.rst#migration-of-your-tests-from-versions-4xx --- tests/lib/then_steps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 627cb323..b4011938 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -74,6 +74,7 @@ def output_should_be_empty(cli_run): assert actual == "" +@then(parse('the output should contain the date "{date}"')) @then('the output should contain the date ""') def output_should_contain_date(date, cli_run): assert date and date in cli_run["stdout"] From e08215677981a9c01f810ce87f873f92ffc86472 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 20:32:07 +0000 Subject: [PATCH 0531/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c16ce07..0fc161fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...HEAD) +**Fixed bugs:** + +- Support pytest-bdd 5 [\#1364](https://github.com/jrnl-org/jrnl/issues/1364) + **Build:** - Switch from poetry to poetry-core [\#1359](https://github.com/jrnl-org/jrnl/pull/1359) ([fabaff](https://github.com/fabaff)) @@ -28,7 +32,6 @@ - Bump keyring from 23.1.0 to 23.2.1 [\#1342](https://github.com/jrnl-org/jrnl/pull/1342) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.4 to 6.2.5 [\#1334](https://github.com/jrnl-org/jrnl/pull/1334) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.7b0 to 21.8b0 [\#1333](https://github.com/jrnl-org/jrnl/pull/1333) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump cryptography from 3.4.7 to 3.4.8 [\#1329](https://github.com/jrnl-org/jrnl/pull/1329) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.3](https://pypi.org/project/jrnl/v2.8.3/) (2021-09-06) From e242aa4ced186529f40eea83667fb2c5c195678e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Nov 2021 13:37:54 -0700 Subject: [PATCH 0532/1132] Bump pytest-bdd from 4.1.0 to 5.0.0 (#1368) Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd) from 4.1.0 to 5.0.0. - [Release notes](https://github.com/pytest-dev/pytest-bdd/releases) - [Changelog](https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst) - [Commits](https://github.com/pytest-dev/pytest-bdd/compare/4.1.0...5.0.0) --- updated-dependencies: - dependency-name: pytest-bdd dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index f97ee49b..10f76d81 100644 --- a/poetry.lock +++ b/poetry.lock @@ -645,7 +645,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-bdd" -version = "4.1.0" +version = "5.0.0" description = "BDD for pytest" category = "main" optional = false @@ -1244,8 +1244,8 @@ pytest = [ {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] pytest-bdd = [ - {file = "pytest-bdd-4.1.0.tar.gz", hash = "sha256:304cd2b09923b838d0c2f08331d1f4236a14ef3594efa94e3bdae0f384d3fa5d"}, - {file = "pytest_bdd-4.1.0-py3-none-any.whl", hash = "sha256:7c5221680cec9a97630e1fae6132f4a97c2f86a90914206ee06a55ae1a409fe5"}, + {file = "pytest-bdd-5.0.0.tar.gz", hash = "sha256:fab7093ed3d5e51ee0c68de093c90e4f40de345bd9a54a188b2991ce2a2a39cf"}, + {file = "pytest_bdd-5.0.0-py3-none-any.whl", hash = "sha256:c7cf12209606421f61f36b5dc63beccd0c82d29446c0592cf68af2dad0a9761d"}, ] pytest-clarity = [ {file = "pytest-clarity-1.0.1.tar.gz", hash = "sha256:505fe345fad4fe11c6a4187fe683f2c7c52c077caa1e135f3e483fe112db7772"}, From 5057c290c19a0e595b0f2d00d433b21ee22653e9 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 20:39:19 +0000 Subject: [PATCH 0533/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fc161fa..864b07d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ **Packaging:** - Bump black from 21.9b0 to 21.10b0 [\#1370](https://github.com/jrnl-org/jrnl/pull/1370) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest-bdd from 4.1.0 to 5.0.0 [\#1368](https://github.com/jrnl-org/jrnl/pull/1368) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump mkdocs from 1.2.2 to 1.2.3 [\#1355](https://github.com/jrnl-org/jrnl/pull/1355) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot)) From ae009099ed8b69c2f311dc44f68551ee35c2a318 Mon Sep 17 00:00:00 2001 From: samuelgregorovic <47627184+samuelgregorovic@users.noreply.github.com> Date: Sat, 6 Nov 2021 22:12:34 +0100 Subject: [PATCH 0534/1132] Add --config-file argument to use alternate config file at runtime (#1290) * added new CLI argument option --config-file * pass argument and fetch alt config file if specified * argparse argument setting update * argument alias --cf added * documentation update - usage of CLI argument * fixed name-clash + unit tests * feature test added * #1170-alternate-config-file: Auto stash before rebase of "refs/heads/#1170-alternate-config-file" * Update docs/advanced.md Co-authored-by: Jonathan Wren * BDD tests added * Begin migrating/rewording --cf tests in pytest-bdd. Uses current directory instead of deep directory structure, but requires a given for each config file referenced * Fix issue where specifying a config-file that needs to be upgraded ended up upgrading the user config file instead * Uncomment and rework remaining tests for pytest-bdd instead of behave * Fix copytree for Python 3.7 (which doesn't support dirs_exist_ok) * Minor fixes to alternative config examples * Remove behave tests (behave is no longer in use) * Move config file unit test to unit test dir and use pytext path fixture instead of current directory to find test data * Use explicit "given the config exists" for copying config files instead of shoehorning in "given we use the config" twice * Change when/when to when/and * Clarify scenarios and fix indentation * Confirm primary config file isn't modified when encrypting/decrypting a journal in an alternate config file * Remove try/except on copytree since I'm no longer using the same Co-authored-by: Jonathan Wren Co-authored-by: Micah Jerome Ellison --- docs/advanced.md | 19 ++++++ jrnl/args.py | 25 +++++++ jrnl/config.py | 9 ++- jrnl/install.py | 45 +++++++++---- jrnl/jrnl.py | 2 +- tests/bdd/features/config_file.feature | 92 ++++++++++++++++++++++++++ tests/bdd/test_features.py | 1 + tests/lib/given_steps.py | 8 +++ tests/unit/test_config_file.py | 22 ++++++ tests/unit/test_parse_args.py | 1 + 10 files changed, 209 insertions(+), 15 deletions(-) create mode 100644 tests/bdd/features/config_file.feature create mode 100644 tests/unit/test_config_file.py diff --git a/docs/advanced.md b/docs/advanced.md index b1b7bef0..a9f1fb27 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -85,6 +85,25 @@ jrnl --config-override display_format fancy --config-override linewrap 20 \ ``` +### Using an alternate config + +You can specify an alternate configuration file for the current instance of `jrnl` using `--config-file CONFIG_FILE_PATH` where +`CONFIG_FILE_PATH` is a path to an alternate `jrnl` configuration file. + +#### Examples: + +``` +# Use personalised configuration file for personal journal entries +jrnl --config-file ~/foo/jrnl/personal-config.yaml + +# Use alternate configuration file for work-related entries +jrnl --config-file ~/foo/jrnl/work-config.yaml + +# Use default configuration file (created on installation) +jrnl +``` + + ## Multiple journal files You can configure `jrnl`to use with multiple journals (eg. diff --git a/jrnl/args.py b/jrnl/args.py index 972fe802..604f9c0e 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -337,6 +337,31 @@ def parse_args(args=[]): """, ) + alternate_config = parser.add_argument_group( + "Specifies alternate config to be used", + textwrap.dedent("Applies alternate config for current session"), + ) + + alternate_config.add_argument( + "--config-file", + dest="config_file_path", + type=str, + default="", + help=""" + Overrides default (created when first installed) config file for this command only. + + Examples: \n + \t - Use a work config file for this jrnl entry, call: \n + \t jrnl --config-file /home/user1/work_config.yaml + \t - Use a personal config file stored on a thumb drive: \n + \t jrnl --config-file /media/user1/my-thumb-drive/personal_config.yaml + """, + ) + + alternate_config.add_argument( + "--cf", dest="config_file_path", type=str, default="", help=argparse.SUPPRESS + ) + # Handle '-123' as a shortcut for '-n 123' num = re.compile(r"^-(\d+)$") args = [num.sub(r"-n \1", arg) for arg in args] diff --git a/jrnl/config.py b/jrnl/config.py index a0482405..035fb34a 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -47,9 +47,14 @@ def make_yaml_valid_dict(input: list) -> dict: return runtime_modifications -def save_config(config): +def save_config(config, alt_config_path=None): + """Supply alt_config_path if using an alternate config through --config-file.""" config["version"] = __version__ - with open(get_config_path(), "w", encoding=YAML_FILE_ENCODING) as f: + with open( + alt_config_path if alt_config_path else get_config_path(), + "w", + encoding=YAML_FILE_ENCODING, + ) as f: yaml.safe_dump( config, f, diff --git a/jrnl/install.py b/jrnl/install.py index b0ae2aa1..b2b583cf 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -19,32 +19,53 @@ from .prompt import yesno from .upgrade import is_old_version -def upgrade_config(config): +def upgrade_config(config_data, alt_config_path=None): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. This essentially automatically ports jrnl installations if new config parameters are introduced in later - versions.""" + versions. + Supply alt_config_path if using an alternate config through --config-file.""" default_config = get_default_config() - missing_keys = set(default_config).difference(config) + missing_keys = set(default_config).difference(config_data) if missing_keys: for key in missing_keys: - config[key] = default_config[key] - save_config(config) + config_data[key] = default_config[key] + save_config(config_data, alt_config_path) + config_path = alt_config_path if alt_config_path else get_config_path() print( - f"[Configuration updated to newest version at {get_config_path()}]", + f"[Configuration updated to newest version at {config_path}]", file=sys.stderr, ) -def load_or_install_jrnl(): - """ - If jrnl is already installed, loads and returns a config object. - Else, perform various prompts to install jrnl. - """ +def find_default_config(): config_path = ( get_config_path() if os.path.exists(get_config_path()) else os.path.join(os.path.expanduser("~"), ".jrnl_config") ) + return config_path + + +def find_alt_config(alt_config): + if os.path.exists(alt_config): + return alt_config + else: + print( + "Alternate configuration file not found at path specified.", file=sys.stderr + ) + print("Exiting.", file=sys.stderr) + sys.exit(1) + + +def load_or_install_jrnl(alt_config_path): + """ + If jrnl is already installed, loads and returns a default config object. + If alternate config is specified via --config-file flag, it will be used. + Else, perform various prompts to install jrnl. + """ + config_path = ( + find_alt_config(alt_config_path) if alt_config_path else find_default_config() + ) if os.path.exists(config_path): logging.debug("Reading configuration from file %s", config_path) @@ -68,7 +89,7 @@ def load_or_install_jrnl(): print("Exiting.", file=sys.stderr) sys.exit(1) - upgrade_config(config) + upgrade_config(config, alt_config_path) verify_config_colors(config) else: diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index bc7e0b88..9d128a3a 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -36,7 +36,7 @@ def run(args): # Load the config, and extract journal name try: - config = install.load_or_install_jrnl() + config = install.load_or_install_jrnl(args.config_file_path) original_config = config.copy() # Apply config overrides diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature new file mode 100644 index 00000000..ce4f042b --- /dev/null +++ b/tests/bdd/features/config_file.feature @@ -0,0 +1,92 @@ +Feature: Multiple journals + + Scenario: Read a journal from an alternate config + Given the config "basic_onefile.yaml" exists + And we use the config "multiple.yaml" + When we run "jrnl --cf basic_onefile.yaml -999" + Then the output should not contain "My first entry" # from multiple.yaml + And the output should contain "Lorem ipsum" # from basic_onefile.yaml + + Scenario: Write to default journal by default using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl --cf multiple.yaml this goes to default" + And we run "jrnl -1" + Then the output should not contain "this goes to default" + When we run "jrnl --cf multiple.yaml -1" + Then the output should contain "this goes to default" + + Scenario: Write to specified journal using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl work --cf multiple.yaml a long day in the office" + And we run "jrnl default --cf multiple.yaml -1" + Then the output should contain "But I'm better" + When we run "jrnl work --cf multiple.yaml -1" + Then the output should contain "a long day in the office" + + Scenario: Tell user which journal was used while using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl --cf multiple.yaml work a long day in the office" + Then we should see the message "Entry added to work journal" + + Scenario: Write to specified journal with a timestamp using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl work --cf multiple.yaml 23 july 2012: a long day in the office" + And we run "jrnl --cf multiple.yaml -1" + Then the output should contain "But I'm better" + When we run "jrnl --cf multiple.yaml work -1" + Then the output should contain "a long day in the office" + And the output should contain "2012-07-23" + + Scenario: Write to specified journal without a timestamp but with colon using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl work --cf multiple.yaml : a long day in the office" + And we run "jrnl --cf multiple.yaml -1" + Then the output should contain "But I'm better" + When we run "jrnl --cf multiple.yaml work -1" + Then the output should contain "a long day in the office" + + Scenario: Create new journals as required using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl ideas -1" + Then the output should be empty + When we run "jrnl ideas --cf multiple.yaml 23 july 2012: sell my junk on ebay and make lots of money" + Then the output should contain "Journal 'ideas' created" + When we run "jrnl ideas --cf multiple.yaml -1" + Then the output should contain "sell my junk on ebay and make lots of money" + + Scenario: Don't crash if no default journal is specified using an alternate config + Given the config "bug343.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl --cf bug343.yaml a long day in the office" + Then we should see the message "No default journal configured" + + Scenario: Don't crash if no file exists for a configured encrypted journal using an alternate config + Given the config "multiple.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl new_encrypted --cf multiple.yaml Adding first entry" and enter + these three eyes + these three eyes + n + Then we should see the message "Encrypted journal 'new_encrypted' created" + + Scenario: Don't overwrite main config when encrypting a journal in an alternate config + Given the config "basic_onefile.yaml" exists + And we use the config "multiple.yaml" + When we run "jrnl --cf basic_onefile.yaml --encrypt" and enter + these three eyes + these three eyes + n + Then we should see the message "Journal encrypted to features/journals/basic_onefile.journal" + And the config should contain "encrypt: false" # multiple.yaml remains unchanged + + Scenario: Don't overwrite main config when decrypting a journal in an alternate config + Given the config "editor_encrypted.yaml" exists + And we use the config "basic_encrypted.yaml" + When we run "jrnl --cf editor_encrypted.yaml --decrypt" + Then the config should contain "encrypt: true" # basic_encrypted remains unchanged diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py index 1509e92d..5ef3506e 100644 --- a/tests/bdd/test_features.py +++ b/tests/bdd/test_features.py @@ -1,6 +1,7 @@ from pytest_bdd import scenarios scenarios("features/build.feature") +scenarios("features/config_file.feature") scenarios("features/core.feature") scenarios("features/datetime.feature") scenarios("features/delete.feature") diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index 649d44c5..f3e6b69c 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -105,6 +105,14 @@ def we_use_the_config(config_file, temp_dir, working_dir): return config_dest +@given(parse('the config "{config_file}" exists'), target_fixture="config_path") +@given('the config "" exists', target_fixture="config_path") +def config_exists(config_file, temp_dir, working_dir): + config_source = os.path.join(working_dir, "data", "configs", config_file) + config_dest = os.path.join(temp_dir.name, config_file) + shutil.copy2(config_source, config_dest) + + @given(parse('we use the password "{pw}" if prompted'), target_fixture="password") def use_password_forever(pw): return pw diff --git a/tests/unit/test_config_file.py b/tests/unit/test_config_file.py new file mode 100644 index 00000000..04766f4a --- /dev/null +++ b/tests/unit/test_config_file.py @@ -0,0 +1,22 @@ +import pytest +import os + +from jrnl.install import find_alt_config + + +def test_find_alt_config(request): + work_config_path = os.path.join( + request.fspath.dirname, "..", "data", "configs", "basic_onefile.yaml" + ) + found_alt_config = find_alt_config(work_config_path) + assert found_alt_config == work_config_path + + +def test_find_alt_config_not_exist(request): + bad_config_path = os.path.join( + request.fspath.dirname, "..", "data", "configs", "not-existing-config.yaml" + ) + with pytest.raises(SystemExit) as ex: + found_alt_config = find_alt_config(bad_config_path) + assert found_alt_config is not None + assert isinstance(ex.value, SystemExit) diff --git a/tests/unit/test_parse_args.py b/tests/unit/test_parse_args.py index 0725d33d..f408c9aa 100644 --- a/tests/unit/test_parse_args.py +++ b/tests/unit/test_parse_args.py @@ -37,6 +37,7 @@ def expected_args(**kwargs): "tags": False, "text": [], "config_override": [], + "config_file_path": "", } return {**default_args, **kwargs} From a354b1313976284d1c9b11eaa6d012e1a0dbaa44 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 21:14:16 +0000 Subject: [PATCH 0535/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 864b07d0..f5a249e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...HEAD) +**Implemented enhancements:** + +- Specify an alternate config file in the command line [\#1170](https://github.com/jrnl-org/jrnl/issues/1170) +- Add --config-file argument to use alternate config file at runtime [\#1290](https://github.com/jrnl-org/jrnl/pull/1290) ([samuelgregorovic](https://github.com/samuelgregorovic)) + **Fixed bugs:** - Support pytest-bdd 5 [\#1364](https://github.com/jrnl-org/jrnl/issues/1364) From 06ee6db7e7d1862a2298524898d2817d3d6dd829 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 6 Nov 2021 14:18:00 -0700 Subject: [PATCH 0536/1132] Use Python 3.10 stable in CI (#1362) * Remove special case code needed for Python 3.10 pre-release and try to get Python 3.11 pre-release running on CI * Wrap 3.10 in quotes so it doesn't resolve to 3.1 * Remove pflake --version call that is crashing in Python 3.11-dev * Run poetry update and restore removed flake8 line --- .github/workflows/testing.yaml | 24 ++------ poetry.lock | 106 +++++++++++++++------------------ pyproject.toml | 2 +- 3 files changed, 54 insertions(+), 78 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index ba999fbe..63e50ea2 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -29,11 +29,11 @@ jobs: if: > ! contains(github.event.head_commit.message, '[ci skip]') runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.python-version == '3.10-dev' }} + continue-on-error: ${{ matrix.python-version == '3.11-dev' }} strategy: fail-fast: false matrix: - python-version: [ 3.7, 3.8, 3.9, 3.10-dev ] + python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11-dev ] os: [ ubuntu-latest, macos-latest, windows-latest ] steps: @@ -52,7 +52,6 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-${{ secrets.CACHE_STRING }} - name: Install dependencies - if: ${{ matrix.python-version != '3.10-dev' }} run: | echo '::group::poetry' pip --disable-pip-version-check install poetry @@ -65,29 +64,14 @@ jobs: echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV - - - name: Install dependencies (Prerelease) - if: ${{ matrix.python-version == '3.10-dev' }} - run: | - echo '::group::poetry' - pip --disable-pip-version-check install poetry==1.2.0a2 - poetry config --local virtualenvs.in-project true - echo '::endgroup::' - - echo '::group::Other dependencies' - poetry install --remove-untracked --no-dev --extras testing - echo '::endgroup::' - - echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV - - name: Code formatting (Black) - if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }} + if: ${{ env.DEPS_INSTALLED == 'true' }} run: | poetry run black --version poetry run black --check --diff . - name: Code Style (flake8) - if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }} + if: ${{ env.DEPS_INSTALLED == 'true' }} run: | poetry run pflake8 --version poetry run pflake8 jrnl tests diff --git a/poetry.lock b/poetry.lock index 10f76d81..ca4786d8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -544,7 +544,7 @@ python-versions = "*" [[package]] name = "prompt-toolkit" -version = "3.0.20" +version = "3.0.21" description = "Library for building powerful interactive command lines in Python" category = "dev" optional = false @@ -603,11 +603,14 @@ python-versions = ">=3.5" [[package]] name = "pyparsing" -version = "2.4.7" +version = "3.0.0" description = "Python parsing module" category = "main" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = ">=3.6" + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyproject-flake8" @@ -728,7 +731,7 @@ pyyaml = "*" [[package]] name = "regex" -version = "2021.10.8" +version = "2021.10.23" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -894,8 +897,8 @@ testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" -python-versions = ">=3.7.0, <3.11" -content-hash = "fc24941ef7a065e56487518ccab053638f053e49f4e47f1746cd9fbfcef40546" +python-versions = ">=3.7.0, <3.12" +content-hash = "fea1b18eee58b612f2e35f28d633878da8a3637baccc400fb4a795321191123c" [metadata.files] ansiwrap = [ @@ -1204,8 +1207,8 @@ pprintpp = [ {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] prompt-toolkit = [ - {file = "prompt_toolkit-3.0.20-py3-none-any.whl", hash = "sha256:6076e46efae19b1e0ca1ec003ed37a933dc94b4d20f486235d436e64771dcd5c"}, - {file = "prompt_toolkit-3.0.20.tar.gz", hash = "sha256:eb71d5a6b72ce6db177af4a7d4d7085b99756bf656d98ffcc4fecd36850eea6c"}, + {file = "prompt_toolkit-3.0.21-py3-none-any.whl", hash = "sha256:62b3d3ea5a3ccee94dc1aac018279cf64866a76837156ebe159b981c42dd20a8"}, + {file = "prompt_toolkit-3.0.21.tar.gz", hash = "sha256:27f13ff4e4850fe8f860b77414c7880f67c6158076a7b099062cc8570f1562e5"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -1232,8 +1235,8 @@ pygments = [ {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, ] pyparsing = [ - {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, - {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, + {file = "pyparsing-3.0.0-py3-none-any.whl", hash = "sha256:d487599e9fb0dc36bee6b5c183c6fc5bd372ce667736f3d430ab7d842a54a35a"}, + {file = "pyparsing-3.0.0.tar.gz", hash = "sha256:001cad8d467e7a9248ef9fd513f5c0d39afcbcb9a43684101853bd0ab962e479"}, ] pyproject-flake8 = [ {file = "pyproject-flake8-0.0.1a2.tar.gz", hash = "sha256:bdeca37f78ecd34bd64a49d3657d53d099f5445831071a31c46e1fe20cd61461"}, @@ -1306,53 +1309,42 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:094a905e87a4171508c2a0e10217795f83c636ccc05ddf86e7272c26e14056ae"}, - {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:981c786293a3115bc14c103086ae54e5ee50ca57f4c02ce7cf1b60318d1e8072"}, - {file = "regex-2021.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b0f2f874c6a157c91708ac352470cb3bef8e8814f5325e3c5c7a0533064c6a24"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51feefd58ac38eb91a21921b047da8644155e5678e9066af7bcb30ee0dca7361"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea8de658d7db5987b11097445f2b1f134400e2232cb40e614e5f7b6f5428710e"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1ce02f420a7ec3b2480fe6746d756530f69769292eca363218c2291d0b116a01"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:39079ebf54156be6e6902f5c70c078f453350616cfe7bfd2dd15bdb3eac20ccc"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ff24897f6b2001c38a805d53b6ae72267025878d35ea225aa24675fbff2dba7f"}, - {file = "regex-2021.10.8-cp310-cp310-win32.whl", hash = "sha256:c6569ba7b948c3d61d27f04e2b08ebee24fec9ff8e9ea154d8d1e975b175bfa7"}, - {file = "regex-2021.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:45cb0f7ff782ef51bc79e227a87e4e8f24bc68192f8de4f18aae60b1d60bc152"}, - {file = "regex-2021.10.8-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fab3ab8aedfb443abb36729410403f0fe7f60ad860c19a979d47fb3eb98ef820"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74e55f8d66f1b41d44bc44c891bcf2c7fad252f8f323ee86fba99d71fd1ad5e3"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d52c5e089edbdb6083391faffbe70329b804652a53c2fdca3533e99ab0580d9"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1abbd95cbe9e2467cac65c77b6abd9223df717c7ae91a628502de67c73bf6838"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9b5c215f3870aa9b011c00daeb7be7e1ae4ecd628e9beb6d7e6107e07d81287"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f540f153c4f5617bc4ba6433534f8916d96366a08797cbbe4132c37b70403e92"}, - {file = "regex-2021.10.8-cp36-cp36m-win32.whl", hash = "sha256:1f51926db492440e66c89cd2be042f2396cf91e5b05383acd7372b8cb7da373f"}, - {file = "regex-2021.10.8-cp36-cp36m-win_amd64.whl", hash = "sha256:5f55c4804797ef7381518e683249310f7f9646da271b71cb6b3552416c7894ee"}, - {file = "regex-2021.10.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb2baff66b7d2267e07ef71e17d01283b55b3cc51a81b54cc385e721ae172ba4"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e527ab1c4c7cf2643d93406c04e1d289a9d12966529381ce8163c4d2abe4faf"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c98b013273e9da5790ff6002ab326e3f81072b4616fd95f06c8fa733d2745f"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:55ef044899706c10bc0aa052f2fc2e58551e2510694d6aae13f37c50f3f6ff61"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa0ab3530a279a3b7f50f852f1bab41bc304f098350b03e30a3876b7dd89840e"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a37305eb3199d8f0d8125ec2fb143ba94ff6d6d92554c4b8d4a8435795a6eccd"}, - {file = "regex-2021.10.8-cp37-cp37m-win32.whl", hash = "sha256:2efd47704bbb016136fe34dfb74c805b1ef5c7313aef3ce6dcb5ff844299f432"}, - {file = "regex-2021.10.8-cp37-cp37m-win_amd64.whl", hash = "sha256:924079d5590979c0e961681507eb1773a142553564ccae18d36f1de7324e71ca"}, - {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19b8f6d23b2dc93e8e1e7e288d3010e58fafed323474cf7f27ab9451635136d9"}, - {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b09d3904bf312d11308d9a2867427479d277365b1617e48ad09696fa7dfcdf59"}, - {file = "regex-2021.10.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:951be934dc25d8779d92b530e922de44dda3c82a509cdb5d619f3a0b1491fafa"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f125fce0a0ae4fd5c3388d369d7a7d78f185f904c90dd235f7ecf8fe13fa741"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f199419a81c1016e0560c39773c12f0bd924c37715bffc64b97140d2c314354"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:09e1031e2059abd91177c302da392a7b6859ceda038be9e015b522a182c89e4f"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c070d5895ac6aeb665bd3cd79f673775caf8d33a0b569e98ac434617ecea57d"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:176796cb7f82a7098b0c436d6daac82f57b9101bb17b8e8119c36eecf06a60a3"}, - {file = "regex-2021.10.8-cp38-cp38-win32.whl", hash = "sha256:5e5796d2f36d3c48875514c5cd9e4325a1ca172fc6c78b469faa8ddd3d770593"}, - {file = "regex-2021.10.8-cp38-cp38-win_amd64.whl", hash = "sha256:e4204708fa116dd03436a337e8e84261bc8051d058221ec63535c9403a1582a1"}, - {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6dcf53d35850ce938b4f044a43b33015ebde292840cef3af2c8eb4c860730fff"}, - {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b8b6ee6555b6fbae578f1468b3f685cdfe7940a65675611365a7ea1f8d724991"}, - {file = "regex-2021.10.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e2ec1c106d3f754444abf63b31e5c4f9b5d272272a491fa4320475aba9e8157c"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:973499dac63625a5ef9dfa4c791aa33a502ddb7615d992bdc89cf2cc2285daa3"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88dc3c1acd3f0ecfde5f95c32fcb9beda709dbdf5012acdcf66acbc4794468eb"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4786dae85c1f0624ac77cb3813ed99267c9adb72e59fdc7297e1cf4d6036d493"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe6ce4f3d3c48f9f402da1ceb571548133d3322003ce01b20d960a82251695d2"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e3e2cea8f1993f476a6833ef157f5d9e8c75a59a8d8b0395a9a6887a097243b"}, - {file = "regex-2021.10.8-cp39-cp39-win32.whl", hash = "sha256:82cfb97a36b1a53de32b642482c6c46b6ce80803854445e19bc49993655ebf3b"}, - {file = "regex-2021.10.8-cp39-cp39-win_amd64.whl", hash = "sha256:b04e512eb628ea82ed86eb31c0f7fc6842b46bf2601b66b1356a7008327f7700"}, - {file = "regex-2021.10.8.tar.gz", hash = "sha256:26895d7c9bbda5c52b3635ce5991caa90fbb1ddfac9c9ff1c7ce505e2282fb2a"}, + {file = "regex-2021.10.23-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:45b65d6a275a478ac2cbd7fdbf7cc93c1982d613de4574b56fd6972ceadb8395"}, + {file = "regex-2021.10.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74d071dbe4b53c602edd87a7476ab23015a991374ddb228d941929ad7c8c922e"}, + {file = "regex-2021.10.23-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:34d870f9f27f2161709054d73646fc9aca49480617a65533fc2b4611c518e455"}, + {file = "regex-2021.10.23-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fb698037c35109d3c2e30f2beb499e5ebae6e4bb8ff2e60c50b9a805a716f79"}, + {file = "regex-2021.10.23-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cb46b542133999580ffb691baf67410306833ee1e4f58ed06b6a7aaf4e046952"}, + {file = "regex-2021.10.23-cp310-cp310-win32.whl", hash = "sha256:5e9c9e0ce92f27cef79e28e877c6b6988c48b16942258f3bc55d39b5f911df4f"}, + {file = "regex-2021.10.23-cp310-cp310-win_amd64.whl", hash = "sha256:ab7c5684ff3538b67df3f93d66bd3369b749087871ae3786e70ef39e601345b0"}, + {file = "regex-2021.10.23-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:de557502c3bec8e634246588a94e82f1ee1b9dfcfdc453267c4fb652ff531570"}, + {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee684f139c91e69fe09b8e83d18b4d63bf87d9440c1eb2eeb52ee851883b1b29"}, + {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5095a411c8479e715784a0c9236568ae72509450ee2226b649083730f3fadfc6"}, + {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b568809dca44cb75c8ebb260844ea98252c8c88396f9d203f5094e50a70355f"}, + {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:eb672217f7bd640411cfc69756ce721d00ae600814708d35c930930f18e8029f"}, + {file = "regex-2021.10.23-cp36-cp36m-win32.whl", hash = "sha256:a7a986c45d1099a5de766a15de7bee3840b1e0e1a344430926af08e5297cf666"}, + {file = "regex-2021.10.23-cp36-cp36m-win_amd64.whl", hash = "sha256:6d7722136c6ed75caf84e1788df36397efdc5dbadab95e59c2bba82d4d808a4c"}, + {file = "regex-2021.10.23-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:9f665677e46c5a4d288ece12fdedf4f4204a422bb28ff05f0e6b08b7447796d1"}, + {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:450dc27483548214314640c89a0f275dbc557968ed088da40bde7ef8fb52829e"}, + {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:129472cd06062fb13e7b4670a102951a3e655e9b91634432cfbdb7810af9d710"}, + {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a940ca7e7189d23da2bfbb38973832813eab6bd83f3bf89a977668c2f813deae"}, + {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:530fc2bbb3dc1ebb17f70f7b234f90a1dd43b1b489ea38cea7be95fb21cdb5c7"}, + {file = "regex-2021.10.23-cp37-cp37m-win32.whl", hash = "sha256:ded0c4a3eee56b57fcb2315e40812b173cafe79d2f992d50015f4387445737fa"}, + {file = "regex-2021.10.23-cp37-cp37m-win_amd64.whl", hash = "sha256:391703a2abf8013d95bae39145d26b4e21531ab82e22f26cd3a181ee2644c234"}, + {file = "regex-2021.10.23-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be04739a27be55631069b348dda0c81d8ea9822b5da10b8019b789e42d1fe452"}, + {file = "regex-2021.10.23-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13ec99df95003f56edcd307db44f06fbeb708c4ccdcf940478067dd62353181e"}, + {file = "regex-2021.10.23-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8d1cdcda6bd16268316d5db1038965acf948f2a6f43acc2e0b1641ceab443623"}, + {file = "regex-2021.10.23-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c186691a7995ef1db61205e00545bf161fb7b59cdb8c1201c89b333141c438a"}, + {file = "regex-2021.10.23-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2b20f544cbbeffe171911f6ce90388ad36fe3fad26b7c7a35d4762817e9ea69c"}, + {file = "regex-2021.10.23-cp38-cp38-win32.whl", hash = "sha256:c0938ddd60cc04e8f1faf7a14a166ac939aac703745bfcd8e8f20322a7373019"}, + {file = "regex-2021.10.23-cp38-cp38-win_amd64.whl", hash = "sha256:56f0c81c44638dfd0e2367df1a331b4ddf2e771366c4b9c5d9a473de75e3e1c7"}, + {file = "regex-2021.10.23-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:80bb5d2e92b2258188e7dcae5b188c7bf868eafdf800ea6edd0fbfc029984a88"}, + {file = "regex-2021.10.23-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1dae12321b31059a1a72aaa0e6ba30156fe7e633355e445451e4021b8e122b6"}, + {file = "regex-2021.10.23-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1f2b59c28afc53973d22e7bc18428721ee8ca6079becf1b36571c42627321c65"}, + {file = "regex-2021.10.23-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d134757a37d8640f3c0abb41f5e68b7cf66c644f54ef1cb0573b7ea1c63e1509"}, + {file = "regex-2021.10.23-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0dcc0e71118be8c69252c207630faf13ca5e1b8583d57012aae191e7d6d28b84"}, + {file = "regex-2021.10.23-cp39-cp39-win32.whl", hash = "sha256:a30513828180264294953cecd942202dfda64e85195ae36c265daf4052af0464"}, + {file = "regex-2021.10.23-cp39-cp39-win_amd64.whl", hash = "sha256:0f7552429dd39f70057ac5d0e897e5bfe211629652399a21671e53f2a9693a4e"}, + {file = "regex-2021.10.23.tar.gz", hash = "sha256:f3f9a91d3cc5e5b0ddf1043c0ae5fa4852f18a1c0050318baf5fc7930ecc1f9c"}, ] rich = [ {file = "rich-10.12.0-py3-none-any.whl", hash = "sha256:c30d6808d1cd3defd56a7bd2d587d13e53b5f55de6cf587f035bcbb56bc3f37b"}, diff --git a/pyproject.toml b/pyproject.toml index c36a5264..288e4ae9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ "Funding" = "https://opencollective.com/jrnl" [tool.poetry.dependencies] -python = ">=3.7.0, <3.11" +python = ">=3.7.0, <3.12" ansiwrap = "^0.8.4" asteval = "^0.9" From 93d59edb670fb173658baeaa53704092fce8abb1 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 21:19:41 +0000 Subject: [PATCH 0537/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5a249e7..1cee5260 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ **Build:** +- Use Python 3.10 stable in CI [\#1362](https://github.com/jrnl-org/jrnl/pull/1362) ([micahellison](https://github.com/micahellison)) - Switch from poetry to poetry-core [\#1359](https://github.com/jrnl-org/jrnl/pull/1359) ([fabaff](https://github.com/fabaff)) - Add more steps to `pytest`, fully remove `behave` [\#1347](https://github.com/jrnl-org/jrnl/pull/1347) ([wren](https://github.com/wren)) From 7a70bbc51e96f1ca5c59c3a291ddb911418cd100 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 21:25:54 +0000 Subject: [PATCH 0538/1132] Increment version to v2.8.4-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index e0822e62..5b641fa2 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.3" +__version__ = "v2.8.4-beta" diff --git a/pyproject.toml b/pyproject.toml index 288e4ae9..4cc14b5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.3" +version = "v2.8.4-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From bbfa32a115bdee9037415cacf00a30d641d9cb01 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 6 Nov 2021 21:27:23 +0000 Subject: [PATCH 0539/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cee5260..e409ea01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8.4-beta](https://pypi.org/project/jrnl/v2.8.4-beta/) (2021-11-06) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...v2.8.4-beta) **Implemented enhancements:** From 55dd9484c9916b88e4f2f15b4003e2b9b9426895 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Nov 2021 11:48:27 -0800 Subject: [PATCH 0540/1132] Bump mkdocs from 1.1 to 1.2.3 in /docs_theme (#1360) Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.1 to 1.2.3. - [Release notes](https://github.com/mkdocs/mkdocs/releases) - [Commits](https://github.com/mkdocs/mkdocs/compare/1.1...1.2.3) --- updated-dependencies: - dependency-name: mkdocs dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs_theme/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_theme/requirements.txt b/docs_theme/requirements.txt index 33dff294..fe9469e7 100644 --- a/docs_theme/requirements.txt +++ b/docs_theme/requirements.txt @@ -1 +1 @@ -mkdocs==1.1 +mkdocs==1.2.3 From 5e45f305ac71117a453c711a2b75e3366d5e7ec9 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 13 Nov 2021 14:52:42 -0800 Subject: [PATCH 0541/1132] Use full Python version for GitHub Actions cache key (#1373) --- .github/workflows/testing.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 63e50ea2..27d839f2 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -45,11 +45,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: poetry cache # Change CACHE_STRING secret to bust the cache. Useful with minor Python version changes. + - name: Capture full Python version in env + run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV + + - name: poetry cache # Change CACHE_STRING secret to bust the cache uses: actions/cache@v2 with: path: .venv - key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-${{ secrets.CACHE_STRING }} + key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} - name: Install dependencies run: | From ffc8bdd5f1fe86a400a0f2530116394f0df444a0 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Nov 2021 22:54:50 +0000 Subject: [PATCH 0542/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e409ea01..0ea89d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...HEAD) + +**Build:** + +- Use full Python version for GitHub Actions cache key [\#1373](https://github.com/jrnl-org/jrnl/pull/1373) ([micahellison](https://github.com/micahellison)) + ## [v2.8.4-beta](https://pypi.org/project/jrnl/v2.8.4-beta/) (2021-11-06) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...v2.8.4-beta) From ba3fd2202fe9ec1b5e98c9ef055e3deccfaae569 Mon Sep 17 00:00:00 2001 From: Piero Lescano Date: Sat, 20 Nov 2021 14:47:56 -0500 Subject: [PATCH 0543/1132] Add added option to _print_edited_summary (#1366) * Add added option to _print_edited_summary * Add tests for counts of entries added, modified, and deleted * Add test for modifying an entry rather than replacing it Co-authored-by: Micah Jerome Ellison --- jrnl/jrnl.py | 7 ++- tests/bdd/features/write.feature | 86 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 9d128a3a..232eb702 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -275,13 +275,18 @@ def _edit_search_results(config, journal, old_entries, **kwargs): def _print_edited_summary(journal, old_stats, **kwargs): stats = { + "added": len(journal) - old_stats["count"], "deleted": old_stats["count"] - len(journal), "modified": len([e for e in journal.entries if e.modified]), } prompts = [] - if stats["deleted"]: + if stats["added"] > 0: + prompts.append(f"{stats['added']} {_pluralize_entry(stats['added'])} added") + stats["modified"] -= stats["added"] + + if stats["deleted"] > 0: prompts.append( f"{stats['deleted']} {_pluralize_entry(stats['deleted'])} deleted" ) diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 1cb822b5..29af9b9e 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -211,3 +211,89 @@ Feature: Writing new entries. Then we should see the message "Entry added" When we run "jrnl -1" Then the output should be "2013-07-23 09:00 Testing folder journal." + + Scenario Outline: Correctly count when adding a single entry via --edit + Given we use the config "" + And we use the password "test" if prompted + And we append to the editor if opened + [2021-11-13] worked on jrnl tests + When we run "jrnl --edit" + Then the output should contain + [1 entry added] + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + #| basic_dayone.yaml | @todo + + + Scenario Outline: Correctly count when adding multiple entries via --edit + Given we use the config "" + And we use the password "test" if prompted + And we append to the editor if opened + [2021-11-11] worked on jrnl tests + [2021-11-12] worked on jrnl tests again + [2021-11-13] worked on jrnl tests a little bit more + When we run "jrnl --edit" + Then the output should contain + [3 entries added] + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + #| basic_dayone.yaml | @todo + + + Scenario Outline: Correctly count when removing entries via --edit + Given we use the config "" + And we use the password "test" if prompted + And we write to the editor if opened + [2021-11-13] I am replacing my whole journal with this entry + When we run "jrnl --edit" + Then the output should contain + [2 entries deleted, 1 entry modified] + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + #| basic_dayone.yaml | @todo + + + Scenario Outline: Correctly count modification when running --edit to replace a single entry + Given we use the config "" + And we use the password "test" if prompted + And we write to the editor if opened + [2021-11-13] I am replacing the last entry with this entry + When we run "jrnl --edit -1" + Then the output should contain + [1 entry modified] + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + #| basic_dayone.yaml | @todo + + + Scenario Outline: Correctly count modification when running --edit on whole journal and adding to last entry + Given we use the config "" + And we use the password "test" if prompted + And we append to the editor if opened + This is a small addendum to my latest entry. + When we run "jrnl --edit" + Then the output should contain + [1 entry modified] + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + #| basic_dayone.yaml | @todo From a1f6d78e04dd1c941b453792ca6786cc572a948a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 20 Nov 2021 19:49:53 +0000 Subject: [PATCH 0544/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea89d0e..f058c8e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...HEAD) +**Fixed bugs:** + +- Wrong delete count when manually changing entries [\#1198](https://github.com/jrnl-org/jrnl/issues/1198) +- Add added option to \_print\_edited\_summary [\#1366](https://github.com/jrnl-org/jrnl/pull/1366) ([piero-vic](https://github.com/piero-vic)) + **Build:** - Use full Python version for GitHub Actions cache key [\#1373](https://github.com/jrnl-org/jrnl/pull/1373) ([micahellison](https://github.com/micahellison)) From 03940ad598617f53e5e45cb882a8c672ee8b812e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Nov 2021 11:56:41 -0800 Subject: [PATCH 0545/1132] Bump black from 21.10b0 to 21.11b1 (#1375) Bumps [black](https://github.com/psf/black) from 21.10b0 to 21.11b1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index ca4786d8..10f61256 100644 --- a/poetry.lock +++ b/poetry.lock @@ -71,7 +71,7 @@ python-versions = "*" [[package]] name = "black" -version = "21.10b0" +version = "21.11b1" description = "The uncompromising code formatter." category = "dev" optional = false @@ -82,9 +82,9 @@ click = ">=7.1.2" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0,<1" platformdirs = ">=2" -regex = ">=2020.1.8" +regex = ">=2021.4.4" tomli = ">=0.2.6,<2.0.0" -typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} +typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} typing-extensions = [ {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, @@ -929,8 +929,8 @@ backcall = [ {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] black = [ - {file = "black-21.10b0-py3-none-any.whl", hash = "sha256:6eb7448da9143ee65b856a5f3676b7dda98ad9abe0f87fce8c59291f15e82a5b"}, - {file = "black-21.10b0.tar.gz", hash = "sha256:a9952229092e325fe5f3dae56d81f639b23f7131eb840781947e4b2886030f33"}, + {file = "black-21.11b1-py3-none-any.whl", hash = "sha256:802c6c30b637b28645b7fde282ed2569c0cd777dbe493a41b6a03c1d903f99ac"}, + {file = "black-21.11b1.tar.gz", hash = "sha256:a042adbb18b3262faad5aff4e834ff186bb893f95ba3a8013f09de1e5569def2"}, ] cffi = [ {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, From 882721f85965c5bc7255481e249aae505984d16d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 20 Nov 2021 19:58:26 +0000 Subject: [PATCH 0546/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f058c8e7..6bcc2e9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ - Use full Python version for GitHub Actions cache key [\#1373](https://github.com/jrnl-org/jrnl/pull/1373) ([micahellison](https://github.com/micahellison)) +**Packaging:** + +- Bump black from 21.10b0 to 21.11b1 [\#1375](https://github.com/jrnl-org/jrnl/pull/1375) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8.4-beta](https://pypi.org/project/jrnl/v2.8.4-beta/) (2021-11-06) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...v2.8.4-beta) From 9e99a2ea96712aa1fceef8645618adc898c21722 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Nov 2021 11:47:51 -0800 Subject: [PATCH 0547/1132] Bump keyring from 23.2.1 to 23.3.0 (#1381) Bumps [keyring](https://github.com/jaraco/keyring) from 23.2.1 to 23.3.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.2.1...v23.3.0) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 10f61256..751b2c70 100644 --- a/poetry.lock +++ b/poetry.lock @@ -314,7 +314,7 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.2.1" +version = "23.3.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -327,8 +327,8 @@ pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "mako" @@ -1061,8 +1061,8 @@ jinja2 = [ {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, ] keyring = [ - {file = "keyring-23.2.1-py3-none-any.whl", hash = "sha256:bd2145a237ed70c8ce72978b497619ddfcae640b6dcf494402d5143e37755c6e"}, - {file = "keyring-23.2.1.tar.gz", hash = "sha256:6334aee6073db2fb1f30892697b1730105b5e9a77ce7e61fca6b435225493efe"}, + {file = "keyring-23.3.0-py3-none-any.whl", hash = "sha256:3842db6b5f660d3c0a0b5aeb3bd5aa60241fe313bcfc7828f8df41b1e6fb1e51"}, + {file = "keyring-23.3.0.tar.gz", hash = "sha256:0adeca86beb3a2f79362d92c7fb71949be751e72463f2c1350e2ab5c0fbd3701"}, ] mako = [ {file = "Mako-1.1.5-py2.py3-none-any.whl", hash = "sha256:6804ee66a7f6a6416910463b00d76a7b25194cd27f1918500c5bd7be2a088a23"}, From a3aeb386111226172046fbac352b42878129c538 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Nov 2021 11:49:27 -0800 Subject: [PATCH 0548/1132] Bump cryptography from 35.0.0 to 36.0.0 (#1379) Bumps [cryptography](https://github.com/pyca/cryptography) from 35.0.0 to 36.0.0. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/35.0.0...36.0.0) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/poetry.lock b/poetry.lock index 751b2c70..666b0b39 100644 --- a/poetry.lock +++ b/poetry.lock @@ -141,7 +141,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "35.0.0" +version = "36.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -152,7 +152,7 @@ cffi = ">=1.12" [package.extras] docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] -docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] @@ -997,26 +997,26 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-35.0.0-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:d57e0cdc1b44b6cdf8af1d01807db06886f10177469312fbde8f44ccbb284bc9"}, - {file = "cryptography-35.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:ced40344e811d6abba00295ced98c01aecf0c2de39481792d87af4fa58b7b4d6"}, - {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:54b2605e5475944e2213258e0ab8696f4f357a31371e538ef21e8d61c843c28d"}, - {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:7b7ceeff114c31f285528ba8b390d3e9cfa2da17b56f11d366769a807f17cbaa"}, - {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d69645f535f4b2c722cfb07a8eab916265545b3475fdb34e0be2f4ee8b0b15e"}, - {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a2d0e0acc20ede0f06ef7aa58546eee96d2592c00f450c9acb89c5879b61992"}, - {file = "cryptography-35.0.0-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:07bb7fbfb5de0980590ddfc7f13081520def06dc9ed214000ad4372fb4e3c7f6"}, - {file = "cryptography-35.0.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7eba2cebca600a7806b893cb1d541a6e910afa87e97acf2021a22b32da1df52d"}, - {file = "cryptography-35.0.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:18d90f4711bf63e2fb21e8c8e51ed8189438e6b35a6d996201ebd98a26abbbe6"}, - {file = "cryptography-35.0.0-cp36-abi3-win32.whl", hash = "sha256:c10c797ac89c746e488d2ee92bd4abd593615694ee17b2500578b63cad6b93a8"}, - {file = "cryptography-35.0.0-cp36-abi3-win_amd64.whl", hash = "sha256:7075b304cd567694dc692ffc9747f3e9cb393cc4aa4fb7b9f3abd6f5c4e43588"}, - {file = "cryptography-35.0.0-pp36-pypy36_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a688ebcd08250eab5bb5bca318cc05a8c66de5e4171a65ca51db6bd753ff8953"}, - {file = "cryptography-35.0.0-pp36-pypy36_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d99915d6ab265c22873f1b4d6ea5ef462ef797b4140be4c9d8b179915e0985c6"}, - {file = "cryptography-35.0.0-pp36-pypy36_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:928185a6d1ccdb816e883f56ebe92e975a262d31cc536429041921f8cb5a62fd"}, - {file = "cryptography-35.0.0-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:ebeddd119f526bcf323a89f853afb12e225902a24d29b55fe18dd6fcb2838a76"}, - {file = "cryptography-35.0.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:22a38e96118a4ce3b97509443feace1d1011d0571fae81fc3ad35f25ba3ea999"}, - {file = "cryptography-35.0.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb80e8a1f91e4b7ef8b33041591e6d89b2b8e122d787e87eeb2b08da71bb16ad"}, - {file = "cryptography-35.0.0-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:abb5a361d2585bb95012a19ed9b2c8f412c5d723a9836418fab7aaa0243e67d2"}, - {file = "cryptography-35.0.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:1ed82abf16df40a60942a8c211251ae72858b25b7421ce2497c2eb7a1cee817c"}, - {file = "cryptography-35.0.0.tar.gz", hash = "sha256:9933f28f70d0517686bd7de36166dda42094eac49415459d9bdf5e7df3e0086d"}, + {file = "cryptography-36.0.0-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:97199a13b772e74cdcdb03760c32109c808aff7cd49c29e9cf4b7754bb725d1d"}, + {file = "cryptography-36.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:494106e9cd945c2cadfce5374fa44c94cfadf01d4566a3b13bb487d2e6c7959e"}, + {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6fbbbb8aab4053fa018984bb0e95a16faeb051dd8cca15add2a27e267ba02b58"}, + {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:684993ff6f67000a56454b41bdc7e015429732d65a52d06385b6e9de6181c71e"}, + {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c702855cd3174666ef0d2d13dcc879090aa9c6c38f5578896407a7028f75b9f"}, + {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d91bc9f535599bed58f6d2e21a2724cb0c3895bf41c6403fe881391d29096f1d"}, + {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b17d83b3d1610e571fedac21b2eb36b816654d6f7496004d6a0d32f99d1d8120"}, + {file = "cryptography-36.0.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:8982c19bb90a4fa2aad3d635c6d71814e38b643649b4000a8419f8691f20ac44"}, + {file = "cryptography-36.0.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:24469d9d33217ffd0ce4582dfcf2a76671af115663a95328f63c99ec7ece61a4"}, + {file = "cryptography-36.0.0-cp36-abi3-win32.whl", hash = "sha256:f6a5a85beb33e57998dc605b9dbe7deaa806385fdf5c4810fb849fcd04640c81"}, + {file = "cryptography-36.0.0-cp36-abi3-win_amd64.whl", hash = "sha256:2deab5ec05d83ddcf9b0916319674d3dae88b0e7ee18f8962642d3cde0496568"}, + {file = "cryptography-36.0.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2049f8b87f449fc6190350de443ee0c1dd631f2ce4fa99efad2984de81031681"}, + {file = "cryptography-36.0.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a776bae1629c8d7198396fd93ec0265f8dd2341c553dc32b976168aaf0e6a636"}, + {file = "cryptography-36.0.0-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:aa94d617a4cd4cdf4af9b5af65100c036bce22280ebb15d8b5262e8273ebc6ba"}, + {file = "cryptography-36.0.0-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:5c49c9e8fb26a567a2b3fa0343c89f5d325447956cc2fc7231c943b29a973712"}, + {file = "cryptography-36.0.0-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ef216d13ac8d24d9cd851776662f75f8d29c9f2d05cdcc2d34a18d32463a9b0b"}, + {file = "cryptography-36.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:231c4a69b11f6af79c1495a0e5a85909686ea8db946935224b7825cfb53827ed"}, + {file = "cryptography-36.0.0-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f92556f94e476c1b616e6daec5f7ddded2c082efa7cee7f31c7aeda615906ed8"}, + {file = "cryptography-36.0.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d73e3a96c38173e0aa5646c31bf8473bc3564837977dd480f5cbeacf1d7ef3a3"}, + {file = "cryptography-36.0.0.tar.gz", hash = "sha256:52f769ecb4ef39865719aedc67b4b7eae167bafa48dbc2a26dd36fa56460507f"}, ] decorator = [ {file = "decorator-5.1.0-py3-none-any.whl", hash = "sha256:7b12e7c3c6ab203a29e157335e9122cb03de9ab7264b137594103fd4a683b374"}, From ba8a59b26f43da07bc6f1395fd484728b08ea1c5 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Nov 2021 19:52:07 +0000 Subject: [PATCH 0549/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bcc2e9d..05fe82c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ **Packaging:** +- Bump keyring from 23.2.1 to 23.3.0 [\#1381](https://github.com/jrnl-org/jrnl/pull/1381) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump cryptography from 35.0.0 to 36.0.0 [\#1379](https://github.com/jrnl-org/jrnl/pull/1379) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.10b0 to 21.11b1 [\#1375](https://github.com/jrnl-org/jrnl/pull/1375) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.4-beta](https://pypi.org/project/jrnl/v2.8.4-beta/) (2021-11-06) From bf0a4e0d1ace2c6f015dc30061fbe92ae23fae40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Dec 2021 11:55:55 -0800 Subject: [PATCH 0550/1132] Bump yq from 2.12.2 to 2.13.0 (#1385) Bumps [yq](https://github.com/kislyuk/yq) from 2.12.2 to 2.13.0. - [Release notes](https://github.com/kislyuk/yq/releases) - [Changelog](https://github.com/kislyuk/yq/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/yq/compare/v2.12.2...v2.13.0) --- updated-dependencies: - dependency-name: yq dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 666b0b39..40e2aacf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -865,20 +865,20 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "yq" -version = "2.12.2" +version = "2.13.0" description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [package.dependencies] argcomplete = ">=1.8.1" -PyYAML = ">=3.11" +PyYAML = ">=5.3.1" toml = ">=0.10.0" xmltodict = ">=0.11.0" [package.extras] -test = ["coverage", "flake8", "wheel"] +tests = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" @@ -997,6 +997,7 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ + {file = "cryptography-36.0.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:9511416e85e449fe1de73f7f99b21b3aa04fba4c4d335d30c486ba3756e3a2a6"}, {file = "cryptography-36.0.0-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:97199a13b772e74cdcdb03760c32109c808aff7cd49c29e9cf4b7754bb725d1d"}, {file = "cryptography-36.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:494106e9cd945c2cadfce5374fa44c94cfadf01d4566a3b13bb487d2e6c7959e"}, {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6fbbbb8aab4053fa018984bb0e95a16faeb051dd8cca15add2a27e267ba02b58"}, @@ -1449,8 +1450,8 @@ xmltodict = [ {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, ] yq = [ - {file = "yq-2.12.2-py2.py3-none-any.whl", hash = "sha256:9fdf4487a6dbf985ca1d357ec93f926d982813e8e896e8892bae95162b6defe3"}, - {file = "yq-2.12.2.tar.gz", hash = "sha256:2f156d0724b61487ac8752ed4eaa702a5737b804d5afa46fa55866951cd106d2"}, + {file = "yq-2.13.0-py2.py3-none-any.whl", hash = "sha256:3ae1f647c85f76d48005d75445917cbea2f4d734bae9c7409372340583c2a6c1"}, + {file = "yq-2.13.0.tar.gz", hash = "sha256:fd131fdb1f56716ad8d44cd9eaaf7d3b22d39ba8861ea64a409cc3f4ae263db8"}, ] zipp = [ {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, From 4552936e890fac793468248c19d3b3bc3169c44b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Dec 2021 19:57:33 +0000 Subject: [PATCH 0551/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05fe82c7..d46d3765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ **Packaging:** +- Bump yq from 2.12.2 to 2.13.0 [\#1385](https://github.com/jrnl-org/jrnl/pull/1385) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.2.1 to 23.3.0 [\#1381](https://github.com/jrnl-org/jrnl/pull/1381) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 35.0.0 to 36.0.0 [\#1379](https://github.com/jrnl-org/jrnl/pull/1379) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.10b0 to 21.11b1 [\#1375](https://github.com/jrnl-org/jrnl/pull/1375) ([dependabot[bot]](https://github.com/apps/dependabot)) From e9e75ea36b1fdd828ff26946790f34a23a7eae14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Dec 2021 12:02:20 -0800 Subject: [PATCH 0552/1132] Bump keyring from 23.3.0 to 23.4.0 (#1383) Bumps [keyring](https://github.com/jaraco/keyring) from 23.3.0 to 23.4.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.3.0...v23.4.0) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 40e2aacf..ab4142b2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -314,7 +314,7 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.3.0" +version = "23.4.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -1062,8 +1062,8 @@ jinja2 = [ {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, ] keyring = [ - {file = "keyring-23.3.0-py3-none-any.whl", hash = "sha256:3842db6b5f660d3c0a0b5aeb3bd5aa60241fe313bcfc7828f8df41b1e6fb1e51"}, - {file = "keyring-23.3.0.tar.gz", hash = "sha256:0adeca86beb3a2f79362d92c7fb71949be751e72463f2c1350e2ab5c0fbd3701"}, + {file = "keyring-23.4.0-py3-none-any.whl", hash = "sha256:3dc0f66062a4f8f6f2ce30d6a516e6e623e6c3c2e76864204ceaf64695408f07"}, + {file = "keyring-23.4.0.tar.gz", hash = "sha256:88f206024295e3c6fb16bb0a60fb4bb7ec1185629dc5a729f12aa7c236d01387"}, ] mako = [ {file = "Mako-1.1.5-py2.py3-none-any.whl", hash = "sha256:6804ee66a7f6a6416910463b00d76a7b25194cd27f1918500c5bd7be2a088a23"}, From 3518e370877d2caff7d7d40d4610e7cae473d696 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Dec 2021 12:02:30 -0800 Subject: [PATCH 0553/1132] Bump black from 21.11b1 to 21.12b0 (#1384) Bumps [black](https://github.com/psf/black) from 21.11b1 to 21.12b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 53 +++-------------------------------------------------- 1 file changed, 3 insertions(+), 50 deletions(-) diff --git a/poetry.lock b/poetry.lock index ab4142b2..e1beaa9d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -71,7 +71,7 @@ python-versions = "*" [[package]] name = "black" -version = "21.11b1" +version = "21.12b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -82,7 +82,6 @@ click = ">=7.1.2" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0,<1" platformdirs = ">=2" -regex = ">=2021.4.4" tomli = ">=0.2.6,<2.0.0" typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} typing-extensions = [ @@ -729,14 +728,6 @@ python-versions = ">=3.6" [package.dependencies] pyyaml = "*" -[[package]] -name = "regex" -version = "2021.10.23" -description = "Alternative regular expression module, to replace re." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "rich" version = "10.12.0" @@ -929,8 +920,8 @@ backcall = [ {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] black = [ - {file = "black-21.11b1-py3-none-any.whl", hash = "sha256:802c6c30b637b28645b7fde282ed2569c0cd777dbe493a41b6a03c1d903f99ac"}, - {file = "black-21.11b1.tar.gz", hash = "sha256:a042adbb18b3262faad5aff4e834ff186bb893f95ba3a8013f09de1e5569def2"}, + {file = "black-21.12b0-py3-none-any.whl", hash = "sha256:a615e69ae185e08fdd73e4715e260e2479c861b5740057fde6e8b4e3b7dd589f"}, + {file = "black-21.12b0.tar.gz", hash = "sha256:77b80f693a569e2e527958459634f18df9b0ba2625ba4e0c2d5da5be42e6f2b3"}, ] cffi = [ {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, @@ -1309,44 +1300,6 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] -regex = [ - {file = "regex-2021.10.23-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:45b65d6a275a478ac2cbd7fdbf7cc93c1982d613de4574b56fd6972ceadb8395"}, - {file = "regex-2021.10.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74d071dbe4b53c602edd87a7476ab23015a991374ddb228d941929ad7c8c922e"}, - {file = "regex-2021.10.23-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:34d870f9f27f2161709054d73646fc9aca49480617a65533fc2b4611c518e455"}, - {file = "regex-2021.10.23-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fb698037c35109d3c2e30f2beb499e5ebae6e4bb8ff2e60c50b9a805a716f79"}, - {file = "regex-2021.10.23-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cb46b542133999580ffb691baf67410306833ee1e4f58ed06b6a7aaf4e046952"}, - {file = "regex-2021.10.23-cp310-cp310-win32.whl", hash = "sha256:5e9c9e0ce92f27cef79e28e877c6b6988c48b16942258f3bc55d39b5f911df4f"}, - {file = "regex-2021.10.23-cp310-cp310-win_amd64.whl", hash = "sha256:ab7c5684ff3538b67df3f93d66bd3369b749087871ae3786e70ef39e601345b0"}, - {file = "regex-2021.10.23-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:de557502c3bec8e634246588a94e82f1ee1b9dfcfdc453267c4fb652ff531570"}, - {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee684f139c91e69fe09b8e83d18b4d63bf87d9440c1eb2eeb52ee851883b1b29"}, - {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5095a411c8479e715784a0c9236568ae72509450ee2226b649083730f3fadfc6"}, - {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b568809dca44cb75c8ebb260844ea98252c8c88396f9d203f5094e50a70355f"}, - {file = "regex-2021.10.23-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:eb672217f7bd640411cfc69756ce721d00ae600814708d35c930930f18e8029f"}, - {file = "regex-2021.10.23-cp36-cp36m-win32.whl", hash = "sha256:a7a986c45d1099a5de766a15de7bee3840b1e0e1a344430926af08e5297cf666"}, - {file = "regex-2021.10.23-cp36-cp36m-win_amd64.whl", hash = "sha256:6d7722136c6ed75caf84e1788df36397efdc5dbadab95e59c2bba82d4d808a4c"}, - {file = "regex-2021.10.23-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:9f665677e46c5a4d288ece12fdedf4f4204a422bb28ff05f0e6b08b7447796d1"}, - {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:450dc27483548214314640c89a0f275dbc557968ed088da40bde7ef8fb52829e"}, - {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:129472cd06062fb13e7b4670a102951a3e655e9b91634432cfbdb7810af9d710"}, - {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a940ca7e7189d23da2bfbb38973832813eab6bd83f3bf89a977668c2f813deae"}, - {file = "regex-2021.10.23-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:530fc2bbb3dc1ebb17f70f7b234f90a1dd43b1b489ea38cea7be95fb21cdb5c7"}, - {file = "regex-2021.10.23-cp37-cp37m-win32.whl", hash = "sha256:ded0c4a3eee56b57fcb2315e40812b173cafe79d2f992d50015f4387445737fa"}, - {file = "regex-2021.10.23-cp37-cp37m-win_amd64.whl", hash = "sha256:391703a2abf8013d95bae39145d26b4e21531ab82e22f26cd3a181ee2644c234"}, - {file = "regex-2021.10.23-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be04739a27be55631069b348dda0c81d8ea9822b5da10b8019b789e42d1fe452"}, - {file = "regex-2021.10.23-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13ec99df95003f56edcd307db44f06fbeb708c4ccdcf940478067dd62353181e"}, - {file = "regex-2021.10.23-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8d1cdcda6bd16268316d5db1038965acf948f2a6f43acc2e0b1641ceab443623"}, - {file = "regex-2021.10.23-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c186691a7995ef1db61205e00545bf161fb7b59cdb8c1201c89b333141c438a"}, - {file = "regex-2021.10.23-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2b20f544cbbeffe171911f6ce90388ad36fe3fad26b7c7a35d4762817e9ea69c"}, - {file = "regex-2021.10.23-cp38-cp38-win32.whl", hash = "sha256:c0938ddd60cc04e8f1faf7a14a166ac939aac703745bfcd8e8f20322a7373019"}, - {file = "regex-2021.10.23-cp38-cp38-win_amd64.whl", hash = "sha256:56f0c81c44638dfd0e2367df1a331b4ddf2e771366c4b9c5d9a473de75e3e1c7"}, - {file = "regex-2021.10.23-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:80bb5d2e92b2258188e7dcae5b188c7bf868eafdf800ea6edd0fbfc029984a88"}, - {file = "regex-2021.10.23-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1dae12321b31059a1a72aaa0e6ba30156fe7e633355e445451e4021b8e122b6"}, - {file = "regex-2021.10.23-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1f2b59c28afc53973d22e7bc18428721ee8ca6079becf1b36571c42627321c65"}, - {file = "regex-2021.10.23-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d134757a37d8640f3c0abb41f5e68b7cf66c644f54ef1cb0573b7ea1c63e1509"}, - {file = "regex-2021.10.23-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0dcc0e71118be8c69252c207630faf13ca5e1b8583d57012aae191e7d6d28b84"}, - {file = "regex-2021.10.23-cp39-cp39-win32.whl", hash = "sha256:a30513828180264294953cecd942202dfda64e85195ae36c265daf4052af0464"}, - {file = "regex-2021.10.23-cp39-cp39-win_amd64.whl", hash = "sha256:0f7552429dd39f70057ac5d0e897e5bfe211629652399a21671e53f2a9693a4e"}, - {file = "regex-2021.10.23.tar.gz", hash = "sha256:f3f9a91d3cc5e5b0ddf1043c0ae5fa4852f18a1c0050318baf5fc7930ecc1f9c"}, -] rich = [ {file = "rich-10.12.0-py3-none-any.whl", hash = "sha256:c30d6808d1cd3defd56a7bd2d587d13e53b5f55de6cf587f035bcbb56bc3f37b"}, {file = "rich-10.12.0.tar.gz", hash = "sha256:83fb3eff778beec3c55201455c17cccde1ccdf66d5b4dade8ef28f56b50c4bd4"}, From 2ab485de8c14033db35c2324badbe43afd2e0dc9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 11 Dec 2021 12:35:32 -0800 Subject: [PATCH 0554/1132] Improve handling of mocking logic in pytest (#1382) * WIP * fix handling of user input (stdin, input, getpass) * take out redundant pytest step * fix handling of 'we should' statements * fix test that doesn't use a config file * fix another test that uses stdin Co-authored-by: Micah Jerome Ellison * remove .tool-versions file per PR feedback * add comment to clarify why disembodied variables are here Co-authored-by: Micah Jerome Ellison --- .gitignore | 4 +- tests/bdd/features/config_file.feature | 15 +- tests/bdd/features/datetime.feature | 10 +- tests/bdd/features/encrypt.feature | 5 +- tests/bdd/features/file_storage.feature | 5 +- tests/bdd/features/multiple_journals.feature | 2 +- tests/bdd/features/override.feature | 9 +- tests/bdd/features/password.feature | 10 +- tests/bdd/features/search.feature | 18 +-- tests/bdd/features/star.feature | 4 +- tests/bdd/features/write.feature | 14 +- tests/lib/fixtures.py | 151 ++++++++++++++++--- tests/lib/given_steps.py | 23 +-- tests/lib/helpers.py | 21 +++ tests/lib/then_steps.py | 62 ++++---- tests/lib/when_steps.py | 103 +++---------- 16 files changed, 259 insertions(+), 197 deletions(-) diff --git a/.gitignore b/.gitignore index 41d2df7b..a2bb0798 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ # C extensions *.so -.python-version # Packages *.egg @@ -17,7 +16,10 @@ sdist develop-eggs .installed.cfg lib64 + +# Versioning .python-version +.tool-version # Installer logs pip-log.txt diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index ce4f042b..4f306b54 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -29,7 +29,7 @@ Feature: Multiple journals Given the config "multiple.yaml" exists And we use the config "basic_onefile.yaml" When we run "jrnl --cf multiple.yaml work a long day in the office" - Then we should see the message "Entry added to work journal" + Then the output should contain "Entry added to work journal" Scenario: Write to specified journal with a timestamp using an alternate config Given the config "multiple.yaml" exists @@ -64,7 +64,7 @@ Feature: Multiple journals Given the config "bug343.yaml" exists And we use the config "basic_onefile.yaml" When we run "jrnl --cf bug343.yaml a long day in the office" - Then we should see the message "No default journal configured" + Then the output should contain "No default journal configured" Scenario: Don't crash if no file exists for a configured encrypted journal using an alternate config Given the config "multiple.yaml" exists @@ -73,7 +73,7 @@ Feature: Multiple journals these three eyes these three eyes n - Then we should see the message "Encrypted journal 'new_encrypted' created" + Then the output should contain "Encrypted journal 'new_encrypted' created" Scenario: Don't overwrite main config when encrypting a journal in an alternate config Given the config "basic_onefile.yaml" exists @@ -82,11 +82,14 @@ Feature: Multiple journals these three eyes these three eyes n - Then we should see the message "Journal encrypted to features/journals/basic_onefile.journal" - And the config should contain "encrypt: false" # multiple.yaml remains unchanged + Then the output should contain "Journal encrypted to features/journals/basic_onefile.journal" + And the config should contain "encrypt: false" + Scenario: Don't overwrite main config when decrypting a journal in an alternate config Given the config "editor_encrypted.yaml" exists + And we use the password "bad doggie no biscuit" if prompted And we use the config "basic_encrypted.yaml" When we run "jrnl --cf editor_encrypted.yaml --decrypt" - Then the config should contain "encrypt: true" # basic_encrypted remains unchanged + Then the config should contain "encrypt: true" + And the output should not contain "Wrong password" diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index 0da3027f..167dcf33 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -4,7 +4,7 @@ Feature: Reading and writing to journal with custom date formats # https://github.com/jrnl-org/jrnl/issues/117 Given we use the config "simple.yaml" When we run "jrnl 2013-11-30 15:42: Project Started." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -999" Then the output should contain "2013-11-30 15:42 Project Started." @@ -13,7 +13,7 @@ Feature: Reading and writing to journal with custom date formats # https://github.com/jrnl-org/jrnl/issues/185 Given we use the config "simple.yaml" When we run "jrnl 26/06/2099: Planet? Earth. Year? 2099." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -999" Then the output should contain "2099-06-26 09:00 Planet?" @@ -34,7 +34,7 @@ Feature: Reading and writing to journal with custom date formats Scenario Outline: Writing an entry from command line with custom date Given we use the config "" When we run "jrnl " - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -n 1" Then the output should contain "" @@ -87,7 +87,7 @@ Feature: Reading and writing to journal with custom date formats Given we use the config "simple.yaml" And now is "2019-03-12 01:30:32 PM" When we run "jrnl " - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -1" Then the output should contain "" Then the output should contain the date "" @@ -109,7 +109,7 @@ Feature: Reading and writing to journal with custom date formats Given we use the config "simple.yaml" And now is "2019-03-12 01:30:32 PM" When we run "jrnl " - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -1" Then the output should contain "" Then the output should contain the date "" diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index af141172..7f466c1d 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -2,8 +2,9 @@ Feature: Encrypting and decrypting journals Scenario: Decrypting a journal Given we use the config "encrypted.yaml" + # And we use the password "bad doggie no biscuit" if prompted When we run "jrnl --decrypt" and enter "bad doggie no biscuit" - Then we should see the message "Journal decrypted" + Then the output should contain "Journal decrypted" And the config for journal "default" should contain "encrypt: false" When we run "jrnl -99 --short" Then the output should be @@ -35,7 +36,7 @@ Feature: Encrypting and decrypting journals swordfish n Then we should get no error - And we should see the message "Journal encrypted" + And the output should contain "Journal encrypted" And the config for journal "default" should contain "encrypt: true" When we run "jrnl -n 1" and enter "swordfish" Then we should be prompted for a password diff --git a/tests/bdd/features/file_storage.feature b/tests/bdd/features/file_storage.feature index f81f2710..89069568 100644 --- a/tests/bdd/features/file_storage.feature +++ b/tests/bdd/features/file_storage.feature @@ -3,7 +3,7 @@ Feature: Journals iteracting with the file system in a way that users can see Scenario: Adding entries to a Folder journal should generate date files Given we use the config "empty_folder.yaml" When we run "jrnl 23 July 2013: Testing folder journal." - Then we should see the message "Entry added" + Then the output should contain "Entry added" And the journal directory should contain 2013/07/23.txt @@ -11,7 +11,7 @@ Feature: Journals iteracting with the file system in a way that users can see Given we use the config "empty_folder.yaml" When we run "jrnl 23 July 2013: Testing folder journal." And we run "jrnl 3/7/2014: Second entry of journal." - Then we should see the message "Entry added" + Then the output should contain "Entry added" And the journal directory should contain 2013/07/23.txt @@ -32,6 +32,7 @@ Feature: Journals iteracting with the file system in a way that users can see Then the output should contain "This is a new entry in my journal" Scenario: Creating journal with relative path should update to absolute path + Given we use no config When we run "jrnl hello world" and enter test.txt n diff --git a/tests/bdd/features/multiple_journals.feature b/tests/bdd/features/multiple_journals.feature index 381463bf..35df069b 100644 --- a/tests/bdd/features/multiple_journals.feature +++ b/tests/bdd/features/multiple_journals.feature @@ -34,7 +34,7 @@ Feature: Multiple journals Scenario: Tell user which journal was used Given we use the config "multiple.yaml" When we run "jrnl work a long day in the office" - Then we should see the message "Entry added to work journal" + Then the output should contain "Entry added to work journal" Scenario: Write to specified journal with a timestamp Given we use the config "multiple.yaml" diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index b29b11f0..fb3c279e 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -3,9 +3,12 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys Scenario: Override configured editor with built-in input === editor:'' Given we use the config "basic_encrypted.yaml" And we use the password "test" if prompted - When we run "jrnl --config-override editor ''" + When we run "jrnl --config-override editor ''" and enter + This is a journal entry Then the stdin prompt should have been called And the editor should not have been called + When we run "jrnl -1" + Then the output should contain "This is a journal entry" Scenario: Postconfig commands with overrides @@ -61,7 +64,7 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys And we use the password "test" if prompted When we run "jrnl --config-override journals.default features/journals/simple.journal 20 Mar 2000: The rain in Spain comes from clouds" Then we should get no error - And we should see the message "Entry added" + And the output should contain "Entry added" When we run "jrnl -3 --config-override journals.default features/journals/simple.journal" Then the output should be 2000-03-20 09:00 The rain in Spain comes from clouds @@ -78,7 +81,7 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys And we use the password "test" if prompted When we run "jrnl --config-override journals.temp features/journals/simple.journal temp Sep 06 1969: @say Ni" Then we should get no error - And we should see the message "Entry added" + And the output should contain "Entry added" When we run "jrnl --config-override journals.temp features/journals/simple.journal temp -3" Then the output should be 1969-09-06 09:00 @say Ni diff --git a/tests/bdd/features/password.feature b/tests/bdd/features/password.feature index ed8aea5f..23a08aab 100644 --- a/tests/bdd/features/password.feature +++ b/tests/bdd/features/password.feature @@ -55,7 +55,7 @@ Feature: Using the installed keyring this password will not be saved in keyring this password will not be saved in keyring y - Then we should see the message "Failed to retrieve keyring" + Then the output should contain "Failed to retrieve keyring" And we should get no error And we should be prompted for a password And the config for journal "default" should contain "encrypt: true" @@ -69,7 +69,7 @@ Feature: Using the installed keyring Then the error output should contain "Failed to retrieve keyring" And we should get no error And we should be prompted for a password - And we should see the message "Journal decrypted" + And the output should contain "Journal decrypted" And the config for journal "default" should contain "encrypt: false" When we run "jrnl --short" Then we should not be prompted for a password @@ -96,7 +96,7 @@ Feature: Using the installed keyring swordfish sordfish Then we should be prompted for a password - And we should see the message "Passwords did not match" + And the output should contain "Passwords did not match" And the config for journal "default" should not contain "encrypt: true" When we run "jrnl --short" Then the output should be @@ -113,8 +113,8 @@ Feature: Using the installed keyring swordfish n Then we should be prompted for a password - And we should see the message "Passwords did not match" - And we should see the message "Journal encrypted" + And the output should contain "Passwords did not match" + And the output should contain "Journal encrypted" And the config for journal "default" should contain "encrypt: true" When we run "jrnl -1" and enter "swordfish" Then we should be prompted for a password diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index 8d951aaf..d52273f6 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -3,7 +3,7 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -on today should display entries created today Given we use the config "" When we run "jrnl today: Adding an entry right now." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -on today" Then the output should contain "Adding an entry right now." But the output should not contain "Everything is alright" @@ -18,11 +18,11 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -from day should display correct entries Given we use the config "" When we run "jrnl yesterday: This thing happened yesterday" - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl today at 11:59pm: Adding an entry right now." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl tomorrow: A future entry." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -from today" Then the output should contain "Adding an entry right now." And the output should contain "A future entry." @@ -37,11 +37,11 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -from and -to day should display correct entries Given we use the config "" When we run "jrnl yesterday: This thing happened yesterday" - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl today at 11:59pm: Adding an entry right now." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl tomorrow: A future entry." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -from yesterday -to today" Then the output should contain "This thing happened yesterday" And the output should contain "Adding an entry right now." @@ -118,9 +118,9 @@ Feature: Searching in a journal Scenario: Out of order entries to a Folder journal should be listed in date order Given we use the config "empty_folder.yaml" When we run "jrnl 3/7/2014 4:37pm: Second entry of journal." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl 23 July 2013: Testing folder journal." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -2" Then the output should be 2013-07-23 09:00 Testing folder journal. diff --git a/tests/bdd/features/star.feature b/tests/bdd/features/star.feature index 7b1b42f1..f1340f7b 100644 --- a/tests/bdd/features/star.feature +++ b/tests/bdd/features/star.feature @@ -3,7 +3,7 @@ Feature: Starring entries Scenario Outline: Starring an entry will mark it in the journal file Given we use the config "" When we run "jrnl 20 july 2013 *: Best day of my life!" - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -on 2013-07-20 -starred" Then the output should contain "2013-07-20 09:00 Best day of my life!" @@ -30,6 +30,6 @@ Feature: Starring entries Scenario: Starring an entry will mark it in an encrypted journal Given we use the config "encrypted.yaml" When we run "jrnl 20 july 2013 *: Best day of my life!" and enter "bad doggie no biscuit" - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit" Then the output should contain "2013-07-20 09:00 Best day of my life!" diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 29af9b9e..a2c2a85b 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -46,7 +46,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -n 1" Then the output should contain "2013-07-23 09:00 A cold and stormy day." @@ -61,7 +61,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "test" if prompted When we run "jrnl this is a partial --edit" - Then we should see the message "Entry added" + Then the output should contain "Entry added" Then the editor should have been called And the editor file content should be this is a partial @@ -110,7 +110,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -n 1" Then the output should not contain "Life is good" @@ -125,7 +125,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -1" Then the output should be 2014-04-24 09:00 Created a new website - empty.com. @@ -142,7 +142,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -n 1" Then the output should contain "🌞" And the output should contain "🐘" @@ -199,7 +199,7 @@ Feature: Writing new entries. Scenario: Title with an embedded period on DayOne journal Given we use the config "dayone.yaml" When we run "jrnl 04-24-2014: Ran 6.2 miles today in 1:02:03. I am feeling sore because I forgot to stretch." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -1" Then the output should be 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. @@ -208,7 +208,7 @@ Feature: Writing new entries. Scenario: Opening an folder that's not a DayOne folder should treat as folder journal Given we use the config "empty_folder.yaml" When we run "jrnl 23 july 2013: Testing folder journal." - Then we should see the message "Entry added" + Then the output should contain "Entry added" When we run "jrnl -1" Then the output should be "2013-07-23 09:00 Testing folder journal." diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index 1b4c74dc..8d820db6 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -8,17 +8,19 @@ import tempfile from keyring import backend from keyring import errors -from keyring import set_keyring from pytest import fixture +from unittest.mock import patch +from .helpers import get_fixture import toml from jrnl.config import load_config +from jrnl.os_compat import split_args # --- Keyring --- # @fixture def keyring(): - set_keyring(NoKeyring()) + return NoKeyring() @fixture @@ -75,13 +77,90 @@ class FailedKeyring(backend.KeyringBackend): # ----- Misc ----- # @fixture -def cli_run(): - return {"status": 0, "stdout": None, "stderr": None} +def cli_run( + mock_factories, + mock_args, + mock_is_tty, + mock_config_path, + mock_editor, + mock_user_input, + mock_overrides, + mock_password, +): + # Check if we need more mocks + mock_factories.update(mock_args) + mock_factories.update(mock_is_tty) + mock_factories.update(mock_overrides) + mock_factories.update(mock_editor) + mock_factories.update(mock_config_path) + mock_factories.update(mock_user_input) + mock_factories.update(mock_password) + + return { + "status": 0, + "stdout": None, + "stderr": None, + "mocks": {}, + "mock_factories": mock_factories, + } @fixture -def mocks(): - return dict() +def mock_factories(): + return {} + + +@fixture +def mock_args(cache_dir, request): + def _mock_args(): + command = get_fixture(request, "command", "") + + if cache_dir["exists"]: + command = command.format(cache_dir=cache_dir["path"]) + + args = split_args(command) + + return patch("sys.argv", ["jrnl"] + args) + + return {"args": _mock_args} + + +@fixture +def mock_is_tty(is_tty): + return {"is_tty": lambda: patch("sys.stdin.isatty", return_value=is_tty)} + + +@fixture +def mock_overrides(config_in_memory): + from jrnl.override import apply_overrides + + def my_overrides(*args, **kwargs): + result = apply_overrides(*args, **kwargs) + config_in_memory["overrides"] = result + return result + + return { + "overrides": lambda: patch( + "jrnl.jrnl.apply_overrides", side_effect=my_overrides + ) + } + + +@fixture +def mock_config_path(request): + config_path = get_fixture(request, "config_path") + + if not config_path: + return {} + + return { + "config_path_install": lambda: patch( + "jrnl.install.get_config_path", return_value=config_path + ), + "config_path_config": lambda: patch( + "jrnl.config.get_config_path", return_value=config_path + ), + } @fixture @@ -94,12 +173,6 @@ def working_dir(request): return os.path.join(request.config.rootpath, "tests") -@fixture -def config_path(temp_dir): - os.chdir(temp_dir.name) - return temp_dir.name + "/jrnl.yaml" - - @fixture def toml_version(working_dir): pyproject = os.path.join(working_dir, "..", "pyproject.toml") @@ -108,8 +181,23 @@ def toml_version(working_dir): @fixture -def password(): - return "" +def mock_password(request): + def _mock_password(): + password = get_fixture(request, "password") + user_input = get_fixture(request, "user_input") + + if password: + password = password.splitlines() + + elif user_input: + password = user_input.splitlines() + + if not password: + password = Exception("Unexpected call for password") + + return patch("getpass.getpass", side_effect=password) + + return {"getpass": _mock_password} @fixture @@ -127,19 +215,36 @@ def str_value(): return "" -@fixture -def command(): - return "" - - @fixture def should_not(): return False @fixture -def user_input(): - return "" +def mock_user_input(request, is_tty): + def _generator(target): + def _mock_user_input(): + user_input = get_fixture(request, "user_input", None) + + if user_input is None: + user_input = Exception("Unexpected call for user input") + else: + user_input = user_input.splitlines() if is_tty else [user_input] + + return patch(target, side_effect=user_input) + + return _mock_user_input + + return { + "stdin": _generator("sys.stdin.read"), + "input": _generator("builtins.input"), + } + + +@fixture +def is_tty(input_method): + assert input_method in ["", "enter", "pipe"] + return input_method != "pipe" @fixture @@ -187,7 +292,7 @@ def editor_state(): @fixture -def editor(editor_state): +def mock_editor(editor_state): def _mock_editor(editor_command): tmpfile = editor_command[-1] @@ -203,4 +308,4 @@ def editor(editor_state): file_content = f.read() editor_state["tmpfile"]["content"] = file_content - return _mock_editor + return {"editor": lambda: patch("subprocess.call", side_effect=_mock_editor)} diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index f3e6b69c..ba619dba 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -11,7 +11,6 @@ from unittest.mock import MagicMock from unittest.mock import patch from xml.etree import ElementTree -from keyring import set_keyring from pytest_bdd import given from pytest_bdd.parsers import parse @@ -20,6 +19,7 @@ from jrnl.time import __get_pdt_calendar from .fixtures import FailedKeyring from .fixtures import TestKeyring +from .helpers import get_fixture @given(parse("we {editor_method} to the editor if opened\n{editor_input}")) @@ -36,9 +36,8 @@ def we_enter_editor(editor_method, editor_input, editor_state): editor_state["intent"] = {"method": file_method, "input": editor_input} -@given(parse('now is ""')) @given(parse('now is "{date_str}"')) -def now_is_str(date_str, mocks): +def now_is_str(date_str, mock_factories): class DatetimeMagicMock(MagicMock): # needed because jrnl does some reflection on datetime def __instancecheck__(self, subclass): @@ -63,8 +62,8 @@ def now_is_str(date_str, mocks): date_str_input, mocked_now() ) - mocks["datetime"] = patch("datetime.datetime", new=datetime_mock) - mocks["calendar_parse"] = patch( + mock_factories["datetime"] = lambda: patch("datetime.datetime", new=datetime_mock) + mock_factories["calendar_parse"] = lambda: patch( "jrnl.time.__get_pdt_calendar", return_value=calendar_mock ) @@ -73,17 +72,22 @@ def now_is_str(date_str, mocks): @given(parse("we have a {keyring_type} keyring"), target_fixture="keyring") def we_have_type_of_keyring(keyring_type): if keyring_type == "failed": - set_keyring(FailedKeyring()) + return FailedKeyring() else: - set_keyring(TestKeyring()) + return TestKeyring() @given(parse('we use the config "{config_file}"'), target_fixture="config_path") -@given('we use the config ""', target_fixture="config_path") -def we_use_the_config(config_file, temp_dir, working_dir): +@given(parse("we use no config"), target_fixture="config_path") +def we_use_the_config(request, temp_dir, working_dir): + config_file = get_fixture(request, "config_file") + # Move into temp dir as cwd os.chdir(temp_dir.name) + if not config_file: + return os.path.join(temp_dir.name, "non_existing_config.yaml") + # Copy the config file over config_source = os.path.join(working_dir, "data", "configs", config_file) config_dest = os.path.join(temp_dir.name, config_file) @@ -106,7 +110,6 @@ def we_use_the_config(config_file, temp_dir, working_dir): @given(parse('the config "{config_file}" exists'), target_fixture="config_path") -@given('the config "" exists', target_fixture="config_path") def config_exists(config_file, temp_dir, working_dir): config_source = os.path.join(working_dir, "data", "configs", config_file) config_dest = os.path.join(temp_dir.name, config_file) diff --git a/tests/lib/helpers.py b/tests/lib/helpers.py index 2e1f454a..ad68cde3 100644 --- a/tests/lib/helpers.py +++ b/tests/lib/helpers.py @@ -49,3 +49,24 @@ def get_nested_val(dictionary, path, *default): if default: return default[0] raise + + +# @see: https://stackoverflow.com/a/41599695/569146 +def spy_wrapper(wrapped_function): + from unittest import mock + + mock = mock.MagicMock() + + def wrapper(self, *args, **kwargs): + mock(*args, **kwargs) + return wrapped_function(self, *args, **kwargs) + + wrapper.mock = mock + return wrapper + + +def get_fixture(request, name, default=None): + result = default + if name in request.node.fixturenames: + result = request.getfixturevalue(name) + return result diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index b4011938..0464158f 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -30,38 +30,47 @@ def output_should_match(regex, cli_run): assert matches, f"\nRegex didn't match:\n{regex}\n{str(out)}\n{str(matches)}" -@then(parse("the output should contain\n{expected_output}")) -@then(parse('the output should contain "{expected_output}"')) -@then('the output should contain ""') -@then(parse("the {which_output_stream} output should contain\n{expected_output}")) -@then(parse('the {which_output_stream} output should contain "{expected_output}"')) -def output_should_contain(expected_output, which_output_stream, cli_run): +@then(parse("the output {should_or_should_not} contain\n{expected_output}")) +@then(parse('the output {should_or_should_not} contain "{expected_output}"')) +@then( + parse( + "the {which_output_stream} output {should_or_should_not} contain\n{expected_output}" + ) +) +@then( + parse( + 'the {which_output_stream} output {should_or_should_not} contain "{expected_output}"' + ) +) +def output_should_contain( + expected_output, which_output_stream, cli_run, should_or_should_not +): + we_should = parse_should_or_should_not(should_or_should_not) + assert expected_output if which_output_stream is None: - assert (expected_output in cli_run["stdout"]) or ( - expected_output in cli_run["stderr"] + assert ((expected_output in cli_run["stdout"]) == we_should) or ( + (expected_output in cli_run["stderr"]) == we_should ) elif which_output_stream == "standard": - assert expected_output in cli_run["stdout"] + assert (expected_output in cli_run["stdout"]) == we_should elif which_output_stream == "error": - assert expected_output in cli_run["stderr"] + assert (expected_output in cli_run["stderr"]) == we_should else: - assert expected_output in cli_run[which_output_stream] + assert (expected_output in cli_run[which_output_stream]) == we_should @then(parse("the output should not contain\n{expected_output}")) @then(parse('the output should not contain "{expected_output}"')) -@then('the output should not contain ""') def output_should_not_contain(expected_output, cli_run): assert expected_output not in cli_run["stdout"] @then(parse("the output should be\n{expected_output}")) @then(parse('the output should be "{expected_output}"')) -@then('the output should be ""') def output_should_be(expected_output, cli_run): actual = cli_run["stdout"].strip() expected = expected_output.strip() @@ -75,7 +84,6 @@ def output_should_be_empty(cli_run): @then(parse('the output should contain the date "{date}"')) -@then('the output should contain the date ""') def output_should_contain_date(date, cli_run): assert date and date in cli_run["stdout"] @@ -94,12 +102,6 @@ def output_should_be_columns_wide(cli_run, width): assert len(line) <= width -@then(parse('we should see the message "{text}"')) -def should_see_the_message(text, cli_run): - out = cli_run["stderr"] - assert text in out, [text, out] - - @then( parse( 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' @@ -126,10 +128,7 @@ def config_var_on_disk(config_on_disk, journal_name, should_or_should_not, some_ # `expected` objects formatted in yaml only compare one level deep actual_slice = {key: actual.get(key, None) for key in expected.keys()} - if we_should: - assert expected == actual_slice - else: - assert expected != actual_slice + assert (expected == actual_slice) == we_should @then( @@ -160,10 +159,7 @@ def config_var_in_memory( # `expected` objects formatted in yaml only compare one level deep actual_slice = {key: get_nested_val(actual, key) for key in expected.keys()} - if we_should: - assert expected == actual_slice - else: - assert expected != actual_slice + assert (expected == actual_slice) == we_should @then("we should be prompted for a password") @@ -355,10 +351,7 @@ def count_elements(number, item, cli_run): def count_editor_args(num_args, cli_run, editor_state, should_or_should_not): we_should = parse_should_or_should_not(should_or_should_not) - if we_should: - assert cli_run["mocks"]["editor"].called - else: - assert not cli_run["mocks"]["editor"].called + assert cli_run["mocks"]["editor"].called == we_should if isinstance(num_args, int): assert len(editor_state["command"]) == int(num_args) @@ -368,10 +361,7 @@ def count_editor_args(num_args, cli_run, editor_state, should_or_should_not): def stdin_prompt_called(cli_run, should_or_should_not): we_should = parse_should_or_should_not(should_or_should_not) - if we_should: - assert cli_run["mocks"]["stdin"].called - else: - assert not cli_run["mocks"]["stdin"].called + assert cli_run["mocks"]["stdin"].called == we_should @then(parse('the editor filename should end with "{suffix}"')) diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 80d8a7fb..c1d391a5 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -3,14 +3,12 @@ from contextlib import ExitStack import os -from unittest.mock import patch -from pytest_bdd import parsers from pytest_bdd import when from pytest_bdd.parsers import parse +from pytest_bdd.parsers import re from jrnl.cli import cli -from jrnl.os_compat import split_args @when(parse('we change directory to "{directory_name}"')) @@ -21,103 +19,38 @@ def when_we_change_directory(directory_name): os.chdir(directory_name) +# These variables are used in the `@when(re(...))` section below +command = '(?P[^"]+)' +input_method = "(?Penter|pipe)" +user_input = '(?P[^"]+)' + + @when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) -@when( - parsers.re( - 'we run "jrnl (?P[^"]+)" and (?Penter|pipe) "(?P[^"]+)"' - ) -) -@when(parse('we run "jrnl" and {input_method} "{user_input}"')) +@when(re(f'we run "jrnl {command}" and {input_method} "{user_input}"')) +@when(re(f'we run "jrnl" and {input_method} "{user_input}"')) @when(parse('we run "jrnl {command}"')) -@when('we run "jrnl "') @when('we run "jrnl"') -def we_run( - command, - config_path, - config_in_memory, - user_input, - cli_run, - capsys, - password, - cache_dir, - editor, - keyring, - input_method, - mocks, -): - assert input_method in ["", "enter", "pipe"] - is_tty = input_method != "pipe" +def we_run_jrnl(cli_run, capsys, keyring): + from keyring import set_keyring - if cache_dir["exists"]: - command = command.format(cache_dir=cache_dir["path"]) - - args = split_args(command) - status = 0 - - if user_input: - user_input = user_input.splitlines() if is_tty else [user_input] - - if password: - password = password.splitlines() - - if not password and user_input: - password = user_input + set_keyring(keyring) with ExitStack() as stack: - # Always mock - from jrnl.override import apply_overrides + mocks = cli_run["mocks"] + factories = cli_run["mock_factories"] - def my_overrides(*args, **kwargs): - result = apply_overrides(*args, **kwargs) - config_in_memory["overrides"] = result - return result - - stack.enter_context( - patch("jrnl.jrnl.apply_overrides", side_effect=my_overrides) - ) - - # Conditionally mock - stack.enter_context(patch("sys.argv", ["jrnl"] + args)) - - mock_stdin = stack.enter_context( - patch("sys.stdin.read", side_effect=user_input) - ) - stack.enter_context(patch("sys.stdin.isatty", return_value=is_tty)) - mock_input = stack.enter_context( - patch("builtins.input", side_effect=user_input) - ) - mock_getpass = stack.enter_context( - patch("getpass.getpass", side_effect=password) - ) - - if "datetime" in mocks: - stack.enter_context(mocks["datetime"]) - stack.enter_context(mocks["calendar_parse"]) - - stack.enter_context( - patch("jrnl.install.get_config_path", return_value=config_path) - ) - stack.enter_context( - patch("jrnl.config.get_config_path", return_value=config_path) - ) - mock_editor = stack.enter_context(patch("subprocess.call", side_effect=editor)) + for id in factories: + mocks[id] = stack.enter_context(factories[id]()) try: - cli(args) + cli() except StopIteration: # This happens when input is expected, but don't have any input left pass except SystemExit as e: - status = e.code + cli_run["status"] = e.code captured = capsys.readouterr() - cli_run["status"] = status cli_run["stdout"] = captured.out cli_run["stderr"] = captured.err - cli_run["mocks"] = { - "stdin": mock_stdin, - "input": mock_input, - "getpass": mock_getpass, - "editor": mock_editor, - } From 28b6126853491a44443da0af2b89922f5beece5a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Dec 2021 20:37:19 +0000 Subject: [PATCH 0555/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d46d3765..3151ff32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,15 @@ **Build:** +- Pytest BDD follow-up tasks [\#1287](https://github.com/jrnl-org/jrnl/issues/1287) +- Improve handling of mocking logic in pytest [\#1382](https://github.com/jrnl-org/jrnl/pull/1382) ([wren](https://github.com/wren)) - Use full Python version for GitHub Actions cache key [\#1373](https://github.com/jrnl-org/jrnl/pull/1373) ([micahellison](https://github.com/micahellison)) **Packaging:** - Bump yq from 2.12.2 to 2.13.0 [\#1385](https://github.com/jrnl-org/jrnl/pull/1385) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump black from 21.11b1 to 21.12b0 [\#1384](https://github.com/jrnl-org/jrnl/pull/1384) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump keyring from 23.3.0 to 23.4.0 [\#1383](https://github.com/jrnl-org/jrnl/pull/1383) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.2.1 to 23.3.0 [\#1381](https://github.com/jrnl-org/jrnl/pull/1381) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 35.0.0 to 36.0.0 [\#1379](https://github.com/jrnl-org/jrnl/pull/1379) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 21.10b0 to 21.11b1 [\#1375](https://github.com/jrnl-org/jrnl/pull/1375) ([dependabot[bot]](https://github.com/apps/dependabot)) From 2244f1ff77143b0c05abb9805cb924f98d3343e5 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Dec 2021 20:40:10 +0000 Subject: [PATCH 0556/1132] Increment version to v2.8.4-beta1 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 5b641fa2..fc4f7f0f 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.4-beta" +__version__ = "v2.8.4-beta1" diff --git a/pyproject.toml b/pyproject.toml index 4cc14b5b..449bac4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.4-beta" +version = "v2.8.4-beta1" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From bb0d96a0057ea8cea8a5e994bcecb33e88bb4472 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Dec 2021 20:41:46 +0000 Subject: [PATCH 0557/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3151ff32..ae9208ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8.4-beta1](https://pypi.org/project/jrnl/v2.8.4-beta1/) (2021-12-11) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...v2.8.4-beta1) **Fixed bugs:** From 3b0c7992d24da5a3ede0882a8825f6a579e7b6b0 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 8 Jan 2022 12:36:58 -0800 Subject: [PATCH 0558/1132] Add weekly Saturday morning build and prevent Python 3.11 from running on PRs (#1387) * Add weekly Saturday morning build and prevent Python 3.11 from running on PRs * Fix extraneous greater than symbol * Add branches and paths to cron schedule * Add back missing hyphen before cron * Trying to fix YAML syntax error * Remove branches and paths from schedule * Fix invalid conditional, push 3.11 check down to actual tests like we did with 3.10 * Separate out PR tests and scheduled tests * Fix YAML syntax * Fix uses action reference * Use proper action folder structure * Check out repo before running local action * Specify bash shell and remove unneeded if * Specify shell for each run statement * Move secret out of composite action since it is not supported directly * Fix half-fixed previous commit * Remove extraneous ./ * Fix pathing and name steps * take out shell key from action * put back missing git config line in workflows Co-authored-by: Jonathan Wren --- .github/actions/run_tests/action.yaml | 61 ++++++++++++++++++ .github/workflows/testing.yaml | 84 ------------------------- .github/workflows/testing_prs.yaml | 43 +++++++++++++ .github/workflows/testing_schedule.yaml | 25 ++++++++ 4 files changed, 129 insertions(+), 84 deletions(-) create mode 100644 .github/actions/run_tests/action.yaml delete mode 100644 .github/workflows/testing.yaml create mode 100644 .github/workflows/testing_prs.yaml create mode 100644 .github/workflows/testing_schedule.yaml diff --git a/.github/actions/run_tests/action.yaml b/.github/actions/run_tests/action.yaml new file mode 100644 index 00000000..3f40f2fd --- /dev/null +++ b/.github/actions/run_tests/action.yaml @@ -0,0 +1,61 @@ +name: run jrnl tests +description: Runs all jrnl tests on multiple platforms +inputs: + cache-string: + description: 'Cache string secret. Change to bust the cache' + required: true +runs: + using: "composite" + steps: + - run: git config --global core.autocrlf false + shell: bash + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Capture full Python version in env + run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV + shell: bash + + - name: poetry cache # Change CACHE_STRING secret to bust the cache + uses: actions/cache@v2 + with: + path: .venv + key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ inputs.cache-string }} + + - name: Install dependencies + run: | + echo '::group::poetry' + pip --disable-pip-version-check install poetry + poetry config --local virtualenvs.in-project true + echo '::endgroup::' + + echo '::group::Other dependencies' + poetry install --remove-untracked + echo '::endgroup::' + + echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV + shell: bash + + - name: Code formatting (Black) + if: ${{ env.DEPS_INSTALLED == 'true' }} + run: | + poetry run black --version + poetry run black --check --diff . + shell: bash + + - name: Code Style (flake8) + if: > + ${{ env.DEPS_INSTALLED == 'true' }} + run: | + poetry run pflake8 --version + poetry run pflake8 jrnl tests + shell: bash + + - name: Test with pytest + if: > + ${{ env.DEPS_INSTALLED == 'true' }} + run: poetry run pytest --junitxml=reports/pytest/results.xml + shell: bash diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml deleted file mode 100644 index 27d839f2..00000000 --- a/.github/workflows/testing.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: Testing - -on: - push: - branches: [ develop, release ] - paths: - - 'jrnl/**' - - 'features/**' - - 'tests/**' - - 'poetry.lock' - - 'pyproject.toml' - - '.github/workflows/testing.yaml' - pull_request: - branches: [ develop ] - paths: - - 'jrnl/**' - - 'features/**' - - 'tests/**' - - 'poetry.lock' - - 'pyproject.toml' - - '.github/workflows/testing.yaml' - -defaults: - run: - shell: bash # needed to prevent Windows from using PowerShell - -jobs: - test: - if: > - ! contains(github.event.head_commit.message, '[ci skip]') - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.python-version == '3.11-dev' }} - strategy: - fail-fast: false - matrix: - python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11-dev ] - os: [ ubuntu-latest, macos-latest, windows-latest ] - - steps: - - run: git config --global core.autocrlf false - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Capture full Python version in env - run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV - - - name: poetry cache # Change CACHE_STRING secret to bust the cache - uses: actions/cache@v2 - with: - path: .venv - key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} - - - name: Install dependencies - run: | - echo '::group::poetry' - pip --disable-pip-version-check install poetry - poetry config --local virtualenvs.in-project true - echo '::endgroup::' - - echo '::group::Other dependencies' - poetry install --remove-untracked - echo '::endgroup::' - - echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV - - - name: Code formatting (Black) - if: ${{ env.DEPS_INSTALLED == 'true' }} - run: | - poetry run black --version - poetry run black --check --diff . - - - name: Code Style (flake8) - if: ${{ env.DEPS_INSTALLED == 'true' }} - run: | - poetry run pflake8 --version - poetry run pflake8 jrnl tests - - - name: Test with pytest - if: ${{ env.DEPS_INSTALLED == 'true' }} - run: poetry run pytest --junitxml=reports/pytest/results.xml diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml new file mode 100644 index 00000000..aabe14b3 --- /dev/null +++ b/.github/workflows/testing_prs.yaml @@ -0,0 +1,43 @@ +name: Testing + +on: + push: + branches: [ develop, release ] + paths: + - 'jrnl/**' + - 'features/**' + - 'tests/**' + - 'poetry.lock' + - 'pyproject.toml' + - '.github/workflows/testing.yaml' + pull_request: + branches: [ develop ] + paths: + - 'jrnl/**' + - 'features/**' + - 'tests/**' + - 'poetry.lock' + - 'pyproject.toml' + - '.github/workflows/testing.yaml' + +defaults: + run: + shell: bash # needed to prevent Windows from using PowerShell + +jobs: + test: + if: > + ! contains(github.event.head_commit.message, '[ci skip]') + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: [ 3.7, 3.8, 3.9, '3.10' ] + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Run tests + uses: ./.github/actions/run_tests + with: + cache-string: ${{ secrets.CACHE_STRING }} diff --git a/.github/workflows/testing_schedule.yaml b/.github/workflows/testing_schedule.yaml new file mode 100644 index 00000000..72e47de4 --- /dev/null +++ b/.github/workflows/testing_schedule.yaml @@ -0,0 +1,25 @@ +name: Testing + +on: + schedule: + - cron: '0 0 * * SAT' + +defaults: + run: + shell: bash # needed to prevent Windows from using PowerShell + +jobs: + test_all: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11-dev ] + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Run tests + uses: ./.github/actions/run_tests + with: + cache-string: ${{ secrets.CACHE_STRING }} From 256aab9877356c5449854f3a4daa934bf6f0c402 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Jan 2022 20:38:48 +0000 Subject: [PATCH 0559/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae9208ab..85c1f9a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta1...HEAD) + +**Fixed bugs:** + +- Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) + ## [v2.8.4-beta1](https://pypi.org/project/jrnl/v2.8.4-beta1/) (2021-12-11) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...v2.8.4-beta1) From bf757bdc9065769787daafbc895f42c03a35781e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Jan 2022 12:43:09 -0800 Subject: [PATCH 0560/1132] Bump keyring from 23.4.0 to 23.5.0 (#1392) Bumps [keyring](https://github.com/jaraco/keyring) from 23.4.0 to 23.5.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.4.0...v23.5.0) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index e1beaa9d..ee426a0c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -313,11 +313,11 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.4.0" +version = "23.5.0" description = "Store and access your passwords safely." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] importlib-metadata = ">=3.6" @@ -1053,8 +1053,8 @@ jinja2 = [ {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, ] keyring = [ - {file = "keyring-23.4.0-py3-none-any.whl", hash = "sha256:3dc0f66062a4f8f6f2ce30d6a516e6e623e6c3c2e76864204ceaf64695408f07"}, - {file = "keyring-23.4.0.tar.gz", hash = "sha256:88f206024295e3c6fb16bb0a60fb4bb7ec1185629dc5a729f12aa7c236d01387"}, + {file = "keyring-23.5.0-py3-none-any.whl", hash = "sha256:b0d28928ac3ec8e42ef4cc227822647a19f1d544f21f96457965dc01cf555261"}, + {file = "keyring-23.5.0.tar.gz", hash = "sha256:9012508e141a80bd1c0b6778d5c610dd9f8c464d75ac6774248500503f972fb9"}, ] mako = [ {file = "Mako-1.1.5-py2.py3-none-any.whl", hash = "sha256:6804ee66a7f6a6416910463b00d76a7b25194cd27f1918500c5bd7be2a088a23"}, From c4c60efab2ef9f1beb53c29e07306fd7865f47e5 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Jan 2022 20:44:40 +0000 Subject: [PATCH 0561/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c1f9a9..0e21dfa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) +**Packaging:** + +- Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8.4-beta1](https://pypi.org/project/jrnl/v2.8.4-beta1/) (2021-12-11) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...v2.8.4-beta1) From e7f24527c3c3ffa4d34f57e9466e8b465876275f Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 8 Jan 2022 14:51:02 -0800 Subject: [PATCH 0562/1132] Fix styling on documentation sidebar (#1395) * fix sidebar stling in docs theme * don't display heading levels higher than 3 in sidebar * update sitemap step for easier debugging * add matrix so github doesn't get confused --- .github/workflows/docs.yaml | 17 +++++++++++++-- docs_theme/assets/theme.css | 42 ++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 3b8cfa96..ac85f2c0 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -22,6 +22,11 @@ jobs: accessibility: if: contains(toJson(github.event.commits), '[ci skip]') == false runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + python-version: [ 3.9 ] + os: [ ubuntu-latest ] steps: - uses: actions/checkout@v2 @@ -29,7 +34,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: ${{ matrix.python-version }} - name: Setup Node.js environment uses: actions/setup-node@main @@ -61,8 +66,16 @@ jobs: env: site_url: http://127.0.0.1:8000 run: | + filename='sitemap.xml' select="{urls: [\"${site_url}/\", \"${site_url}/search.html?q=jrnl\", .urlset.url[].loc]}" - curl -s "$site_url/sitemap.xml" | poetry run xq "$select" > list.json + + curl -s "${site_url}/${filename}" > $filename + + echo "::group::${filename}" + cat $filename + echo '::endgroup::' + + poetry run xq "$select" $filename > list.json - name: Accessibility testing (Pa11y) run: pa11y-ci -c list.json diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index d98392e8..20c4cd89 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -79,13 +79,28 @@ div.rst-content { max-width: 54em; } + .wy-side-nav-search, .wy-menu-vertical li.current, -.wy-menu-vertical li.toctree-l1.current > a { +.wy-menu-vertical li.toctree-l1.current > a, +.wy-menu-vertical li.toctree-l2.current > a, +.wy-menu-vertical li.toctree-l3.current > a { background-color: transparent; border: none; } +.wy-menu-vertical li.toctree-l2.current li.toctree-l3, +.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a { + background: transparent; +} + +.wy-menu-vertical li.toctree-l4, +.wy-menu-vertical li.toctree-l5, +.wy-menu-vertical li.toctree-l6, +.wy-menu-vertical li.toctree-l7 { + display: none; +} + .wy-nav-top { background-color: var(--mid-purple); background-image: linear-gradient(-211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); @@ -118,6 +133,7 @@ a.icon-home:before { } .wy-menu-vertical a:hover, +.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:hover, .wy-menu-vertical li.current a:hover { background-color: var(--black-shadow); color: var(--white); @@ -130,14 +146,10 @@ a.icon-home:before { position: relative; } -.wy-menu-vertical li.current > a.current { +.wy-menu-vertical li.toctree-l1.current > a { background: var(--darkest-purple); border: none !important; -} - -.wy-menu-vertical li.current > a:hover { - background: var(--darkest-purple); - border: none; + pointer-events: none; } .wy-menu-vertical li.on a, @@ -146,7 +158,7 @@ a.icon-home:before { } .wy-menu-vertical li.on a, -.wy-menu-vertical li.current>a:after { +.wy-menu-vertical li > a.current:after { position: absolute; right: 0em; z-index: 999; @@ -158,13 +170,6 @@ a.icon-home:before { border-right: 1em solid var(--white); } -.wy-menu-vertical li.toctree-l2.current { - font-size: 50px; -} - -.wy-menu-vertical li.toctree-l2.current > a{ -} - .toctree-expand:before { display: none !important; } @@ -192,7 +197,6 @@ a.icon-home:before { .wy-nav-side { background-color: var(--mid-purple); - background-image: linear-gradient(211deg, var(--mid-purple) 0%, var(--dark-purple) 100%); font-weight: 300; height: 100%; } @@ -223,14 +227,8 @@ form .search-query::placeholder { background: transparent; } -.toctree-l2 a:first-child { - display: block; -} - .wy-menu-vertical li.current ul { background-color: var(--mid-purple); - border-bottom: 1px solid var(--mid-purple); - border-top: 1px solid var(--dark-purple); } From d0921fb7b610d38ddccd88db3490f23d194bb403 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 8 Jan 2022 22:52:46 +0000 Subject: [PATCH 0563/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e21dfa0..bd3ef8de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ - Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) +**Documentation:** + +- Fix nested navigation styling on docs site [\#1349](https://github.com/jrnl-org/jrnl/issues/1349) +- Fix styling on documentation sidebar [\#1395](https://github.com/jrnl-org/jrnl/pull/1395) ([wren](https://github.com/wren)) + **Packaging:** - Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) From 5555557cece32e098537e2ba97eaf636681506e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jan 2022 12:12:39 -0800 Subject: [PATCH 0564/1132] Bump cryptography from 36.0.0 to 36.0.1 (#1389) Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.0 to 36.0.1. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/36.0.0...36.0.1) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/poetry.lock b/poetry.lock index ee426a0c..cab1ab48 100644 --- a/poetry.lock +++ b/poetry.lock @@ -140,7 +140,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "36.0.0" +version = "36.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -988,27 +988,26 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-36.0.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:9511416e85e449fe1de73f7f99b21b3aa04fba4c4d335d30c486ba3756e3a2a6"}, - {file = "cryptography-36.0.0-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:97199a13b772e74cdcdb03760c32109c808aff7cd49c29e9cf4b7754bb725d1d"}, - {file = "cryptography-36.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:494106e9cd945c2cadfce5374fa44c94cfadf01d4566a3b13bb487d2e6c7959e"}, - {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6fbbbb8aab4053fa018984bb0e95a16faeb051dd8cca15add2a27e267ba02b58"}, - {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:684993ff6f67000a56454b41bdc7e015429732d65a52d06385b6e9de6181c71e"}, - {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c702855cd3174666ef0d2d13dcc879090aa9c6c38f5578896407a7028f75b9f"}, - {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d91bc9f535599bed58f6d2e21a2724cb0c3895bf41c6403fe881391d29096f1d"}, - {file = "cryptography-36.0.0-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b17d83b3d1610e571fedac21b2eb36b816654d6f7496004d6a0d32f99d1d8120"}, - {file = "cryptography-36.0.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:8982c19bb90a4fa2aad3d635c6d71814e38b643649b4000a8419f8691f20ac44"}, - {file = "cryptography-36.0.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:24469d9d33217ffd0ce4582dfcf2a76671af115663a95328f63c99ec7ece61a4"}, - {file = "cryptography-36.0.0-cp36-abi3-win32.whl", hash = "sha256:f6a5a85beb33e57998dc605b9dbe7deaa806385fdf5c4810fb849fcd04640c81"}, - {file = "cryptography-36.0.0-cp36-abi3-win_amd64.whl", hash = "sha256:2deab5ec05d83ddcf9b0916319674d3dae88b0e7ee18f8962642d3cde0496568"}, - {file = "cryptography-36.0.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2049f8b87f449fc6190350de443ee0c1dd631f2ce4fa99efad2984de81031681"}, - {file = "cryptography-36.0.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a776bae1629c8d7198396fd93ec0265f8dd2341c553dc32b976168aaf0e6a636"}, - {file = "cryptography-36.0.0-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:aa94d617a4cd4cdf4af9b5af65100c036bce22280ebb15d8b5262e8273ebc6ba"}, - {file = "cryptography-36.0.0-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:5c49c9e8fb26a567a2b3fa0343c89f5d325447956cc2fc7231c943b29a973712"}, - {file = "cryptography-36.0.0-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ef216d13ac8d24d9cd851776662f75f8d29c9f2d05cdcc2d34a18d32463a9b0b"}, - {file = "cryptography-36.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:231c4a69b11f6af79c1495a0e5a85909686ea8db946935224b7825cfb53827ed"}, - {file = "cryptography-36.0.0-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f92556f94e476c1b616e6daec5f7ddded2c082efa7cee7f31c7aeda615906ed8"}, - {file = "cryptography-36.0.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d73e3a96c38173e0aa5646c31bf8473bc3564837977dd480f5cbeacf1d7ef3a3"}, - {file = "cryptography-36.0.0.tar.gz", hash = "sha256:52f769ecb4ef39865719aedc67b4b7eae167bafa48dbc2a26dd36fa56460507f"}, + {file = "cryptography-36.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:73bc2d3f2444bcfeac67dd130ff2ea598ea5f20b40e36d19821b4df8c9c5037b"}, + {file = "cryptography-36.0.1-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:2d87cdcb378d3cfed944dac30596da1968f88fb96d7fc34fdae30a99054b2e31"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74d6c7e80609c0f4c2434b97b80c7f8fdfaa072ca4baab7e239a15d6d70ed73a"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:6c0c021f35b421ebf5976abf2daacc47e235f8b6082d3396a2fe3ccd537ab173"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d59a9d55027a8b88fd9fd2826c4392bd487d74bf628bb9d39beecc62a644c12"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a817b961b46894c5ca8a66b599c745b9a3d9f822725221f0e0fe49dc043a3a3"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:94ae132f0e40fe48f310bba63f477f14a43116f05ddb69d6fa31e93f05848ae2"}, + {file = "cryptography-36.0.1-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7be0eec337359c155df191d6ae00a5e8bbb63933883f4f5dffc439dac5348c3f"}, + {file = "cryptography-36.0.1-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:e0344c14c9cb89e76eb6a060e67980c9e35b3f36691e15e1b7a9e58a0a6c6dc3"}, + {file = "cryptography-36.0.1-cp36-abi3-win32.whl", hash = "sha256:4caa4b893d8fad33cf1964d3e51842cd78ba87401ab1d2e44556826df849a8ca"}, + {file = "cryptography-36.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:391432971a66cfaf94b21c24ab465a4cc3e8bf4a939c1ca5c3e3a6e0abebdbcf"}, + {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb5829d027ff82aa872d76158919045a7c1e91fbf241aec32cb07956e9ebd3c9"}, + {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebc15b1c22e55c4d5566e3ca4db8689470a0ca2babef8e3a9ee057a8b82ce4b1"}, + {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:596f3cd67e1b950bc372c33f1a28a0692080625592ea6392987dba7f09f17a94"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:30ee1eb3ebe1644d1c3f183d115a8c04e4e603ed6ce8e394ed39eea4a98469ac"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec63da4e7e4a5f924b90af42eddf20b698a70e58d86a72d943857c4c6045b3ee"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca238ceb7ba0bdf6ce88c1b74a87bffcee5afbfa1e41e173b1ceb095b39add46"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:ca28641954f767f9822c24e927ad894d45d5a1e501767599647259cbf030b903"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:39bdf8e70eee6b1c7b289ec6e5d84d49a6bfa11f8b8646b5b3dfe41219153316"}, + {file = "cryptography-36.0.1.tar.gz", hash = "sha256:53e5c1dc3d7a953de055d77bef2ff607ceef7a2aac0353b5d630ab67f7423638"}, ] decorator = [ {file = "decorator-5.1.0-py3-none-any.whl", hash = "sha256:7b12e7c3c6ab203a29e157335e9122cb03de9ab7264b137594103fd4a683b374"}, From 49930e16f7d8fd6c8be3f145f714c5896fe3c50d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 15 Jan 2022 20:14:21 +0000 Subject: [PATCH 0565/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd3ef8de..ac5874a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta1...HEAD) +**Implemented enhancements:** + +- Support Python 3.11 [\#1371](https://github.com/jrnl-org/jrnl/issues/1371) + **Fixed bugs:** - Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) @@ -16,6 +20,7 @@ **Packaging:** - Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump cryptography from 36.0.0 to 36.0.1 [\#1389](https://github.com/jrnl-org/jrnl/pull/1389) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.4-beta1](https://pypi.org/project/jrnl/v2.8.4-beta1/) (2021-12-11) From 1fbb78852829bc1579f32b8163a022d01130881a Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 15 Jan 2022 14:45:00 -0800 Subject: [PATCH 0566/1132] Unskip some tests (#1399) * remove skip_editor test and tag * remove useless test * unskip blank input test * formatting * rename test so it doesn't overwrite other test * unskip some dayone tests that now work --- tests/bdd/features/format.feature | 55 +++++++------------------------ tests/bdd/features/write.feature | 25 +++++++------- tests/conftest.py | 4 --- tests/lib/when_steps.py | 7 ++-- 4 files changed, 28 insertions(+), 63 deletions(-) diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index 36a89747..18426674 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -144,12 +144,11 @@ Feature: Custom formats | basic_folder.yaml | | basic_dayone.yaml | - @skip_editor # .TODO return after editor steps implemented Scenario Outline: Increasing Headings on Markdown export Given we use the config "" And we use the password "test" if prompted - When we open the editor and append - [2020-10-14 13:23] Heading Test + Given we append to the editor if opened + [2021-10-14 13:23] Heading Test H1-1 = @@ -191,13 +190,15 @@ Feature: Custom formats More stuff more stuff again + When we run "jrnl --edit -1" + Then the editor should have been called When we run "jrnl -1 --export markdown" Then the output should be - # 2020 + # 2021 ## October - ### 2020-10-14 13:23 Heading Test + ### 2021-10-14 13:23 Heading Test #### H1-1 @@ -241,38 +242,6 @@ Feature: Custom formats | basic_folder.yaml | # | basic_dayone.yaml | @todo - @skip_editor # .TODO return after editor steps implemented - Scenario Outline: Add a blank line to Markdown export if there isn't one already - # https://github.com/jrnl-org/jrnl/issues/768 - # https://github.com/jrnl-org/jrnl/issues/881 - Given we use the config "" - And we use the password "test" if prompted - When we open the editor and append - [2020-10-29 11:11] First entry. - [2020-10-29 11:11] Second entry. - [2020-10-29 11:13] Third entry. - When we run "jrnl -3 --format markdown" - Then the output should be - # 2020 - - ## October - - ### 2020-10-29 11:11 First entry. - - - ### 2020-10-29 11:11 Second entry. - - - ### 2020-10-29 11:13 Third entry. - - - Examples: configs - | config_file | - | basic_onefile.yaml | - | basic_encrypted.yaml | - | basic_folder.yaml | - # | basic_dayone.yaml | @todo - @skip Scenario Outline: Exporting to XML Given we use the config "" @@ -288,13 +257,13 @@ Feature: Custom formats And there should be 10 "tag" elements Examples: configs - | config_file | - # | basic_onefile.yaml | @todo - # | basic_encrypted.yaml | @todo - # | basic_folder.yaml | @todo - # | basic_dayone.yaml | @todo + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | - Scenario: Exporting to XML + Scenario: Exporting to XML single Given we use the config "tags.yaml" And we use the password "test" if prompted When we run "jrnl --export xml" diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index a2c2a85b..5ed1d44b 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -89,21 +89,22 @@ Feature: Writing new entries. | basic_encrypted.yaml | | basic_onefile.yaml | - @skip + Scenario Outline: Writing an empty entry from the command line with no editor should yield nothing Given we use the config "" - And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl" and enter nothing - Then the output should be empty + And we use the password "test" if prompted + When we run "jrnl --config-override editor ''" and enter "" + Then the stdin prompt should have been called + And the output should be empty And the error output should contain "Writing Entry; on a blank line" And the editor should not have been called Examples: configs - | config_file | - | config_simple.yaml | - | empty_folder.yaml | - | encrypted.yaml | - # | dayone | @todo + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Writing an entry does not print the entire journal # https://github.com/jrnl-org/jrnl/issues/87 @@ -212,7 +213,7 @@ Feature: Writing new entries. When we run "jrnl -1" Then the output should be "2013-07-23 09:00 Testing folder journal." - Scenario Outline: Correctly count when adding a single entry via --edit + Scenario Outline: Count when adding a single entry via --edit Given we use the config "" And we use the password "test" if prompted And we append to the editor if opened @@ -282,7 +283,7 @@ Feature: Writing new entries. #| basic_dayone.yaml | @todo - Scenario Outline: Correctly count modification when running --edit on whole journal and adding to last entry + Scenario Outline: Count modifications when editing whole journal and adding to last entry Given we use the config "" And we use the password "test" if prompted And we append to the editor if opened @@ -296,4 +297,4 @@ Feature: Writing new entries. | basic_onefile.yaml | | basic_encrypted.yaml | | basic_folder.yaml | - #| basic_dayone.yaml | @todo + | basic_dayone.yaml | diff --git a/tests/conftest.py b/tests/conftest.py index 277e2602..fbbc3068 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -17,10 +17,6 @@ pytest_plugins = [ def pytest_bdd_apply_tag(tag, function): if tag == "skip_win": marker = mark.skipif(on_windows(), reason="Skip test on Windows") - elif tag == "skip_editor": - marker = mark.skip( - reason="Skipping editor-related test. We should come back to this!" - ) else: # Fall back to pytest-bdd's default behavior return None diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index c1d391a5..60302c7c 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -20,14 +20,13 @@ def when_we_change_directory(directory_name): # These variables are used in the `@when(re(...))` section below -command = '(?P[^"]+)' +command = '(?P[^"]*)' input_method = "(?Penter|pipe)" -user_input = '(?P[^"]+)' +user_input = '("(?P[^"]*)")' @when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) -@when(re(f'we run "jrnl {command}" and {input_method} "{user_input}"')) -@when(re(f'we run "jrnl" and {input_method} "{user_input}"')) +@when(re(f'we run "jrnl ?{command}" and {input_method} {user_input}')) @when(parse('we run "jrnl {command}"')) @when('we run "jrnl"') def we_run_jrnl(cli_run, capsys, keyring): From aa2c77abfc14dc9ce1668bbbc90397251eb9ced9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 10:15:36 -0800 Subject: [PATCH 0567/1132] Bump ipython from 7.28.0 to 7.31.1 (#1401) Bumps [ipython](https://github.com/ipython/ipython) from 7.28.0 to 7.31.1. - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](https://github.com/ipython/ipython/compare/7.28.0...7.31.1) --- updated-dependencies: - dependency-name: ipython dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index cab1ab48..24b482eb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -240,7 +240,7 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "7.28.0" +version = "7.31.1" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -1036,8 +1036,8 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-7.28.0-py3-none-any.whl", hash = "sha256:f16148f9163e1e526f1008d7c8d966d9c15600ca20d1a754287cf96d00ba6f1d"}, - {file = "ipython-7.28.0.tar.gz", hash = "sha256:2097be5c814d1b974aea57673176a924c4c8c9583890e7a5f082f547b9975b11"}, + {file = "ipython-7.31.1-py3-none-any.whl", hash = "sha256:55df3e0bd0f94e715abd968bedd89d4e8a7bce4bf498fb123fed4f5398fea874"}, + {file = "ipython-7.31.1.tar.gz", hash = "sha256:b5548ec5329a4bcf054a5deed5099b0f9622eb9ea51aaa7104d215fece201d8c"}, ] jedi = [ {file = "jedi-0.18.0-py2.py3-none-any.whl", hash = "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93"}, From 5463476a00218810590965e763e13866d2faa397 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 22 Jan 2022 18:17:22 +0000 Subject: [PATCH 0568/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac5874a3..d1836f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ **Packaging:** +- Bump ipython from 7.28.0 to 7.31.1 [\#1401](https://github.com/jrnl-org/jrnl/pull/1401) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.0 to 36.0.1 [\#1389](https://github.com/jrnl-org/jrnl/pull/1389) ([dependabot[bot]](https://github.com/apps/dependabot)) From b1e228ea40d95f9a081a70ecbdd200b3260ec087 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 11:44:06 -0800 Subject: [PATCH 0569/1132] Bump asteval from 0.9.25 to 0.9.26 (#1400) Bumps [asteval](https://github.com/newville/asteval) from 0.9.25 to 0.9.26. - [Release notes](https://github.com/newville/asteval/releases) - [Commits](https://github.com/newville/asteval/compare/0.9.25...0.9.26) --- updated-dependencies: - dependency-name: asteval dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 24b482eb..8cbc8c5f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -33,12 +33,15 @@ test = ["coverage", "flake8", "pexpect", "wheel"] [[package]] name = "asteval" -version = "0.9.25" +version = "0.9.26" description = "Safe, minimalistic evaluator of python expression using ast module" category = "main" optional = false python-versions = ">=3.6" +[package.dependencies] +importlib_metadata = {version = "*", markers = "python_version < \"3.8\""} + [[package]] name = "atomicwrites" version = "1.4.0" @@ -905,7 +908,7 @@ argcomplete = [ {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, ] asteval = [ - {file = "asteval-0.9.25.tar.gz", hash = "sha256:bea22b7d8fa16bcba95ebc72052ae5d8ca97114c9959bb47f8b8eebf30e4342f"}, + {file = "asteval-0.9.26.tar.gz", hash = "sha256:36125613ec21ed3e33e370ca8960a1f1e8a2324d78a8016bfa5ad76f1e16ef05"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, From 0773d6b1d3ac7ca83ae273403372905a95d694df Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Feb 2022 19:45:38 +0000 Subject: [PATCH 0570/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1836f0f..993b5849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ **Packaging:** - Bump ipython from 7.28.0 to 7.31.1 [\#1401](https://github.com/jrnl-org/jrnl/pull/1401) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump asteval from 0.9.25 to 0.9.26 [\#1400](https://github.com/jrnl-org/jrnl/pull/1400) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.0 to 36.0.1 [\#1389](https://github.com/jrnl-org/jrnl/pull/1389) ([dependabot[bot]](https://github.com/apps/dependabot)) From a8f0b18219d9bdd9fac4e12a960d052dc5997787 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 12:04:06 -0800 Subject: [PATCH 0571/1132] Bump black from 21.12b0 to 22.1.0 (#1404) * Bump black from 21.12b0 to 22.1.0 Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits/22.1.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Run make format Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Micah Jerome Ellison --- jrnl/Entry.py | 2 +- jrnl/plugins/yaml_exporter.py | 2 +- poetry.lock | 39 +++++++++++++++++++++++++---------- tests/unit/test_time.py | 17 +++++++-------- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 56347770..800345c6 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -68,7 +68,7 @@ class Entry: @staticmethod def tag_regex(tagsymbols): - pattern = fr"(?=3.6.2" [package.dependencies] -click = ">=7.1.2" +click = ">=8.0.0" mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0,<1" +pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = ">=0.2.6,<2.0.0" +tomli = ">=1.1.0" typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} -typing-extensions = [ - {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, - {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, -] +typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.3)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] @@ -923,8 +919,29 @@ backcall = [ {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] black = [ - {file = "black-21.12b0-py3-none-any.whl", hash = "sha256:a615e69ae185e08fdd73e4715e260e2479c861b5740057fde6e8b4e3b7dd589f"}, - {file = "black-21.12b0.tar.gz", hash = "sha256:77b80f693a569e2e527958459634f18df9b0ba2625ba4e0c2d5da5be42e6f2b3"}, + {file = "black-22.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1297c63b9e1b96a3d0da2d85d11cd9bf8664251fd69ddac068b98dc4f34f73b6"}, + {file = "black-22.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2ff96450d3ad9ea499fc4c60e425a1439c2120cbbc1ab959ff20f7c76ec7e866"}, + {file = "black-22.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e21e1f1efa65a50e3960edd068b6ae6d64ad6235bd8bfea116a03b21836af71"}, + {file = "black-22.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f69158a7d120fd641d1fa9a921d898e20d52e44a74a6fbbcc570a62a6bc8ab"}, + {file = "black-22.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:228b5ae2c8e3d6227e4bde5920d2fc66cc3400fde7bcc74f480cb07ef0b570d5"}, + {file = "black-22.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b1a5ed73ab4c482208d20434f700d514f66ffe2840f63a6252ecc43a9bc77e8a"}, + {file = "black-22.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35944b7100af4a985abfcaa860b06af15590deb1f392f06c8683b4381e8eeaf0"}, + {file = "black-22.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7835fee5238fc0a0baf6c9268fb816b5f5cd9b8793423a75e8cd663c48d073ba"}, + {file = "black-22.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dae63f2dbf82882fa3b2a3c49c32bffe144970a573cd68d247af6560fc493ae1"}, + {file = "black-22.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fa1db02410b1924b6749c245ab38d30621564e658297484952f3d8a39fce7e8"}, + {file = "black-22.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c8226f50b8c34a14608b848dc23a46e5d08397d009446353dad45e04af0c8e28"}, + {file = "black-22.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2d6f331c02f0f40aa51a22e479c8209d37fcd520c77721c034517d44eecf5912"}, + {file = "black-22.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742ce9af3086e5bd07e58c8feb09dbb2b047b7f566eb5f5bc63fd455814979f3"}, + {file = "black-22.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fdb8754b453fb15fad3f72cd9cad3e16776f0964d67cf30ebcbf10327a3777a3"}, + {file = "black-22.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5660feab44c2e3cb24b2419b998846cbb01c23c7fe645fee45087efa3da2d61"}, + {file = "black-22.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:6f2f01381f91c1efb1451998bd65a129b3ed6f64f79663a55fe0e9b74a5f81fd"}, + {file = "black-22.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:efbadd9b52c060a8fc3b9658744091cb33c31f830b3f074422ed27bad2b18e8f"}, + {file = "black-22.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8871fcb4b447206904932b54b567923e5be802b9b19b744fdff092bd2f3118d0"}, + {file = "black-22.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccad888050f5393f0d6029deea2a33e5ae371fd182a697313bdbd835d3edaf9c"}, + {file = "black-22.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07e5c049442d7ca1a2fc273c79d1aecbbf1bc858f62e8184abe1ad175c4f7cc2"}, + {file = "black-22.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:373922fc66676133ddc3e754e4509196a8c392fec3f5ca4486673e685a421321"}, + {file = "black-22.1.0-py3-none-any.whl", hash = "sha256:3524739d76b6b3ed1132422bf9d82123cd1705086723bc3e235ca39fd21c667d"}, + {file = "black-22.1.0.tar.gz", hash = "sha256:a7c0192d35635f6fc1174be575cb7915e92e5dd629ee79fdaf0dcfa41a80afb5"}, ] cffi = [ {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, diff --git a/tests/unit/test_time.py b/tests/unit/test_time.py index c829c52b..5f22148e 100644 --- a/tests/unit/test_time.py +++ b/tests/unit/test_time.py @@ -10,13 +10,10 @@ def test_default_hour_is_added(): def test_default_minute_is_added(): - assert ( - time.parse( - "2020-06-20", - inclusive=False, - default_hour=0, - default_minute=30, - bracketed=False, - ) - == datetime.datetime(2020, 6, 20, 0, 30) - ) + assert time.parse( + "2020-06-20", + inclusive=False, + default_hour=0, + default_minute=30, + bracketed=False, + ) == datetime.datetime(2020, 6, 20, 0, 30) From 967ec86d9de8221a652dcca6510a5bf315420858 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Feb 2022 20:05:36 +0000 Subject: [PATCH 0572/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 993b5849..78626c7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) +**Build:** + +- Improve handling of mocking logic in pytest [\#1382](https://github.com/jrnl-org/jrnl/pull/1382) ([wren](https://github.com/wren)) + **Documentation:** - Fix nested navigation styling on docs site [\#1349](https://github.com/jrnl-org/jrnl/issues/1349) @@ -19,6 +23,7 @@ **Packaging:** +- Bump black from 21.12b0 to 22.1.0 [\#1404](https://github.com/jrnl-org/jrnl/pull/1404) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump ipython from 7.28.0 to 7.31.1 [\#1401](https://github.com/jrnl-org/jrnl/pull/1401) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump asteval from 0.9.25 to 0.9.26 [\#1400](https://github.com/jrnl-org/jrnl/pull/1400) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) From 972af21bca8b63f106baa23d3a89348e24d6c10c Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 5 Feb 2022 12:59:20 -0800 Subject: [PATCH 0573/1132] Add reference documentation to docs site and separate out "Tips and Tricks" and "External Editors" from "Recipes" (#1332) * First draft of command line reference, mostly pulled from help screen * Add first draft of config file reference, mostly pulled from advanced.md * Clean up config file doc for readability * Add --config-file and remove examples from CLI reference * Add warning about time zone in timeformat * More small changes, and adding template config keyword * Cleaning up and re-ordering config file reference * Clean up reference and anything else from advanced documentation that can live elsewhere and linking to config file reference wherever config file is mentioned * Fix syntax highlighting in command line reference, clean up content a bit, include --diagnostic * Mention version config key * Apply minor changes suggested in PR review * Rename "recipes" to "Tips and Tricks", pull "External Editors" out of it into its own page, and redirect old recipes link to tips-and-tricks * Revert broken mkdocs-redirects usage from last commit --- docs/advanced.md | 150 +++++++----------------- docs/contributing.md | 4 +- docs/encryption.md | 8 ++ docs/external-editors.md | 95 +++++++++++++++ docs/reference-command-line.md | 128 ++++++++++++++++++++ docs/reference-config-file.md | 117 ++++++++++++++++++ docs/{recipes.md => tips-and-tricks.md} | 122 +++---------------- docs/usage.md | 17 +-- mkdocs.yml | 7 +- 9 files changed, 426 insertions(+), 222 deletions(-) create mode 100644 docs/external-editors.md create mode 100644 docs/reference-command-line.md create mode 100644 docs/reference-config-file.md rename docs/{recipes.md => tips-and-tricks.md} (63%) diff --git a/docs/advanced.md b/docs/advanced.md index a9f1fb27..c0b1195c 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -5,109 +5,15 @@ ## Configuration File -You can configure the way jrnl behaves in a configuration file. By -default, this is `~/.config/jrnl/jrnl.yaml`. If you have the `XDG_CONFIG_HOME` -variable set, the configuration file will be saved as -`$XDG_CONFIG_HOME/jrnl/jrnl.yaml`. +`jrnl` has a wide variety of options that can be customized through the config file, +including templates, formats, multiple journals, and more. See +the [configuration file reference](./reference-config-file.md) for details +or read on for some common use cases. -!!! note - On Windows, the configuration file is typically found at `%USERPROFILE%\.config\jrnl\jrnl.yaml`. - -The configuration file is a YAML file with the following options -and can be edited with a plain text editor. - -!!! note - Backup your journal and config file before editing. Changes to the config file - can have destructive effects on your journal! - -- `journals` - paths to your journal files -- `editor` - if set, executes this command to launch an external editor for - writing your entries, e.g. `vim`. Some editors require special - options to work properly, see `FAQ ` for details. -- `encrypt` - if `true`, encrypts your journal using AES. -- `tagsymbols` - Symbols to be interpreted as tags. (See note below) -- `default_hour` and `default_minute` - if you supply a date, such as `last thursday`, but no specific - time, the entry will be created at this time -- `timeformat` - how to format the timestamps in your journal, see the [python docs](http://docs.python.org/library/time.html#time.strftime) for reference -- `highlight` - if `true`, tags will be highlighted in cyan. -- `linewrap` - controls the width of the output. Set to `false` if you don't want to wrap long lines. -- `colors` - dictionary that controls the colors used to display journal entries. It has four subkeys, which are: `body`, `date`, `tags`, and `title`. Current valid values are: `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `MAGENTA`, `CYAN`, `WHITE`, and `NONE`. `colorama.Fore` is used for colorization, and you can find the [docs here](https://github.com/tartley/colorama#colored-output). To disable colored output, set the value to `NONE`. If you set the value of any color subkey to an invalid color, no color will be used. -- `display_format` - specifies formatter to use, formatters available are: - `boxed`, `fancy`, `json`, `markdown`, `md`, `tags`, `text`, `txt`, `xml`, or `yaml`. - -!!! note - Although it seems intuitive to use the `#` - character for tags, there's a drawback: on most shells, this is - interpreted as a meta-character starting a comment. This means that if - you type - - > `jrnl Implemented endless scrolling on the #frontend of our website.` - - your bash will chop off everything after the `#` before passing it to - `jrnl`. To avoid this, wrap your input into quotation marks like - this: - - > `jrnl "Implemented endless scrolling on the #frontend of our website."` - - Or use the built-in prompt or an external editor to compose your - entries. - -### Modifying Configurations from the Command line - -You can override a configuration field for the current instance of `jrnl` using `--config-override CONFIG_KEY CONFIG_VALUE` where `CONFIG_KEY` is a valid configuration field, specified in dot-notation and `CONFIG_VALUE` is the (valid) desired override value. - -You can specify multiple overrides as multiple calls to `--config-override`. -!!! note - These overrides allow you to modify ***any*** field of your jrnl configuration. We trust that you know what you are doing. - -#### Examples: - -``` sh -#Create an entry using the `stdin` prompt, for rapid logging -jrnl --config-override editor "" - -#Populate a project's log -jrnl --config-override journals.todo "$(git rev-parse --show-toplevel)/todo.txt" todo find my towel - -#Pass multiple overrides -jrnl --config-override display_format fancy --config-override linewrap 20 \ ---config-override colors.title green - -``` - -### Using an alternate config - -You can specify an alternate configuration file for the current instance of `jrnl` using `--config-file CONFIG_FILE_PATH` where -`CONFIG_FILE_PATH` is a path to an alternate `jrnl` configuration file. - -#### Examples: - -``` -# Use personalised configuration file for personal journal entries -jrnl --config-file ~/foo/jrnl/personal-config.yaml - -# Use alternate configuration file for work-related entries -jrnl --config-file ~/foo/jrnl/work-config.yaml - -# Use default configuration file (created on installation) -jrnl -``` - - -## Multiple journal files +### Multiple journal files You can configure `jrnl`to use with multiple journals (eg. -`private` and `work`) by defining more journals in your `jrnl.yaml`, +`private` and `work`) by defining more journals in your [config file](./reference-config-file.md), for example: ``` yaml @@ -167,12 +73,46 @@ journals: The `work` journal is encrypted, prints to `json` by default, and is edited using an existing window of VSCode. Similarly, the `food` journal prints to markdown by default, but uses all the other defaults. +### Modifying Configurations from the Command line + +You can override a configuration field for the current instance of `jrnl` using `--config-override CONFIG_KEY CONFIG_VALUE` where `CONFIG_KEY` is a valid configuration field, specified in dot notation and `CONFIG_VALUE` is the (valid) desired override value. The dot notation can be used to change config keys within other keys, such as `colors.title` for the `title` key within the `colors` key. + +You can specify multiple overrides as multiple calls to `--config-override`. !!! note - Changing `encrypt` to a different value will not encrypt or decrypt your - journal file, it merely says whether or not your journal - is encrypted. Hence manually changing - this option will most likely result in your journal file being - impossible to load. + These overrides allow you to modify ***any*** field of your jrnl configuration. We trust that you know what you are doing. + +#### Examples: + +``` sh +#Create an entry using the `stdin` prompt, for rapid logging +jrnl --config-override editor "" + +#Populate a project's log +jrnl --config-override journals.todo "$(git rev-parse --show-toplevel)/todo.txt" todo find my towel + +#Pass multiple overrides +jrnl --config-override display_format fancy --config-override linewrap 20 \ +--config-override colors.title green + +``` + +### Using an alternate config + +You can specify an alternate configuration file for the current instance of `jrnl` using `--config-file CONFIG_FILE_PATH` where +`CONFIG_FILE_PATH` is a path to an alternate `jrnl` configuration file. + +#### Examples: + +``` +# Use personalised configuration file for personal journal entries +jrnl --config-file ~/foo/jrnl/personal-config.yaml + +# Use alternate configuration file for work-related entries +jrnl --config-file ~/foo/jrnl/work-config.yaml + +# Use default configuration file (created on first run) +jrnl +``` ## Known Issues diff --git a/docs/contributing.md b/docs/contributing.md index 71c1d337..b12ce7be 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -28,9 +28,9 @@ To edit the documentation, edit the `docs/*.md` files on the **develop** branch. The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. -### Recipes and external editors +### External editors and tips and tricks -If you'd like to share a jrnl command line trick that you find useful, or advice on how to integrate a particular external editor, you may find it worthwhile to add it to the ["Recipes" section](recipes.md). +If you'd like to share a jrnl command line trick that you find useful, you may find it worthwhile to add it to the ["Tips and Tricks" section](tips-and-tricks.md). For advice on how to integrate a particular external editor, you can add to the ["External Editors" section](external-editors.md). ## Testing diff --git a/docs/encryption.md b/docs/encryption.md index ae1af43f..06217f01 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -35,6 +35,14 @@ replaces the encrypted journal file with a plain text file. You can also specify a filename, e.g., `jrnl --decrypt plain_text_copy.txt`, to leave the original encrypted file untouched and create a new plain text file next to it. +!!! note + Changing `encrypt` in your [config file](./reference-config-file.md) to + a different value will not encrypt or decrypt your + journal file. It merely says whether or not your journal + is encrypted. Hence manually changing + this option will most likely result in your journal file being + impossible to load. This is why the above commands are necessary. + ## Storing Passwords in Your Keychain Nobody can recover or reset your `jrnl` password. If you lose it, diff --git a/docs/external-editors.md b/docs/external-editors.md new file mode 100644 index 00000000..8797325a --- /dev/null +++ b/docs/external-editors.md @@ -0,0 +1,95 @@ +# External editors + +Configure your preferred external editor by updating the `editor` option +in your [configuration file](./reference-config-file.md#editor) + +!!! note + To save and log any entry edits, save and close the file. + +If your editor is not in your operating system's `PATH` environment variable, +then you will have to enter in the full path of your editor. + +## Sublime Text + +To use [Sublime Text](https://www.sublimetext.com/), install the command line +tools for Sublime Text and configure your `jrnl.yaml` like this: + +```yaml +editor: "subl -w" +``` + +Note the `-w` flag to make sure `jrnl` waits for Sublime Text to close the +file before writing into the journal. + +## Visual Studio Code + +[Visual Studio Code](https://code.visualstudio.com) also requires a flag +that tells the process to wait until the file is closed before exiting: + +```yaml +editor: "code --wait" +``` + +On Windows, `code` is not added to the path by default, so you'll need to +enter the full path to your `code.exe` file, or add it to the `PATH` variable. + +## MacVim + +Also similar to Sublime Text, MacVim must be started with a flag that tells +the the process to wait until the file is closed before passing control +back to journal. In the case of MacVim, this is `-f`: + +```yaml +editor: "mvim -f" +``` + +## iA Writer + +On OS X, you can use the fabulous [iA +Writer](http://www.iawriter.com/mac) to write entries. Configure your +`jrnl.yaml` like this: + +```yaml +editor: "open -b pro.writer.mac -Wn" +``` + +What does this do? `open -b ...` opens a file using the application +identified by the bundle identifier (a unique string for every app out +there). `-Wn` tells the application to wait until it's closed before +passing back control, and to use a new instance of the application. + +If the `pro.writer.mac` bundle identifier is not found on your system, +you can find the right string to use by inspecting iA Writer's +`Info.plist` file in your shell: + +```sh +grep -A 1 CFBundleIdentifier /Applications/iA\ Writer.app/Contents/Info.plist +``` + +## Notepad++ on Windows + +To set [Notepad++](http://notepad-plus-plus.org/) as your editor, edit +the `jrnl` config file (`jrnl.yaml`) like this: + +```yaml +editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession" +``` + +The double backslashes are needed so `jrnl` can read the file path +correctly. The `-multiInst -nosession` options will cause `jrnl` to open +its own Notepad++ window. + + +## emacs + +To use `emacs` as your editor, edit the `jrnl` config file (`jrnl.yaml`) like this: + +```yaml +editor: emacsclient -a "" -c +``` + +When you're done editing the message, save and `C-x #` to close the buffer and stop the emacsclient process. + +## Other editors + +If you're using another editor and would like to share, feel free to [contribute documentation](./contributing.md#editing-documentation) on it. \ No newline at end of file diff --git a/docs/reference-command-line.md b/docs/reference-command-line.md new file mode 100644 index 00000000..d0020d24 --- /dev/null +++ b/docs/reference-command-line.md @@ -0,0 +1,128 @@ +# Command Line Reference + +## Synopsis +``` +usage: jrnl [--debug] [--help] [--version] [--list] [--encrypt] [--decrypt] + [--import] [-on DATE] [-today-in-history] [-month DATE] + [-day DATE] [-year DATE] [-from DATE] [-to DATE] [-contains TEXT] + [-and] [-starred] [-n [NUMBER]] [-not [TAG]] [--edit] [--delete] + [--format TYPE] [--tags] [--short] + [--config-override CONFIG_KEY CONFIG_VALUE] + [--config-file CONFIG_FILE_PATH] + [[...]] +``` + +## Standalone Commands + +These commands will exit after they complete. You may only run one at a time. + +### --help +Show a help message. + +### --version +Print version and license information. + +### --list +List the config file location, all configured journals, and their locations. + +### ---encrypt +Encrypt a journal. See [encryption](encryption.md) for more information. + +### --decrypt +Decrypt a journal. See [encryption](encryption.md) for more information. + + +### --import +Import entries from another journal. If any entries have the exact same content +and timestamp, they will be deduplicated. + +Optional parameters: +```sh +--file FILENAME +``` +Specify a file to import. If not provided, `jrnl` will use STDIN as the data source. + +```sh +--format TYPE +``` +Specify the format of the file that is being imported. Defaults to the same data +storage method that jrnl uses. See [formats](formats.md) for more information. + +## Writing new entries +See [Basic Usage](usage.md). + +## Searching + +To find entries from your journal, use any combination of the below filters. +Only entries that match all the filters will be displayed. + +When specifying dates, you can use the same kinds of dates you use for new +entries, such as `yesterday`, `today`, `Tuesday`, or `2021-08-01`. + +| Search Argument | Description | +| --- | --- | +| -on DATE | Show entries on this date | +| -today-in-history | Show entries of today over the years | +| -month DATE | Show entries on this month of any year | +| -day DATE | Show entries on this day of any month | +| -year DATE | Show entries of a specific year | +| -from DATE | Show entries after, or on, this date | +| -to DATE | Show entries before, or on, this date (alias: -until) | +| -contains TEXT | Show entries containing specific text (put quotes around text with spaces) | +| -and | Show only entries that match all conditions, like saying "x AND y" (default: OR) | +| -starred | Show only starred entries (marked with *) | +| -n [NUMBER] | Show a maximum of NUMBER entries (note: '-n 3' and '-3' have the same effect) | +| -not [TAG] | Exclude entries with this tag | + +## Searching Options +These help you do various tasks with the selected entries from your search. +If used on their own (with no search), they will act on your entire journal. + +### --edit +Opens the selected entries in your configured editor. It will fail if the +`editor` key is not set in your config file. + +Once you begin editing, you can add multiple entries and delete entries +by modifying the text in your editor. When your editor closes, jrnl reads +the temporary file you were editing and makes the changes to your journal. + +### --delete +Interactively deletes selected entries. You'll be asked to confirm deletion of +each entry. + +### --format TYPE +Display selected entries in an alternate format. See [formats](formats.md). + +#### Optional parameters +```sh +--file FILENAME +``` +Write output to file instead of STDOUT. In most shells, the +same effect can be achieved using `>`. + +### --tags + +Alias for '--format tags'. Returns a list of all tags and the number of times +they occur within the searched entries. If there are no tags found, `jrnl` will output a message saying so. + +### --short +Only shows the date and titles of the searched entries. + +## Configuration arguments + +### --config-override CONFIG_KEY CONFIG_VALUE + +Override configured key-value pair with CONFIG_KV_PAIR for this command invocation only. To access config keys that aren't at the top level, separate the keys with a dot, such as `colors.title` to access the `title` key within the `colors` key. Read [advanced usage](./advanced.md) for examples. + +### --config-file CONFIG_FILE_PATH + +Use the config file at CONFIG_FILE_PATH for this command invocation only. +Read [advanced usage](./advanced.md) for examples. + +## Other Arguments + +### --debug +Prints information useful for troubleshooting while `jrnl` executes. + +### --diagnostic +Prints diagnostic information useful for [reporting issues](https://github.com/jrnl-org/jrnl/issues). \ No newline at end of file diff --git a/docs/reference-config-file.md b/docs/reference-config-file.md new file mode 100644 index 00000000..97ec290c --- /dev/null +++ b/docs/reference-config-file.md @@ -0,0 +1,117 @@ +# Configuration File Reference + +`jrnl` stores its information in a YAML configuration file. + +!!! note + Backup your journal and config file before editing. Changes to the config file + can have destructive effects on your journal! + +## Config location +You can find your configuration file location by running: +`jrnl --list` + +By default, the configuration file is `~/.config/jrnl/jrnl.yaml`. +If you have the `XDG_CONFIG_HOME` variable set, the configuration +file will be saved as `$XDG_CONFIG_HOME/jrnl/jrnl.yaml`. + +!!! note + On Windows, the configuration file is typically found at + `%USERPROFILE%\.config\jrnl\jrnl.yaml`. + + +## Config format +The configuration file is a [YAML](https://yaml.org/) file and can be edited with +a text editor. + +## Config keys + +### journals + +Describes each journal used by `jrnl`. Each indented key after this key is +the name of a journal. + +If a journal key has a value, that value will be interpreted as the path +to the journal. Otherwise, the journal needs the additional indented key +`journal` to specify its path. + +All keys below can be specified for each journal at the same level as the +`journal` key. If a key conflicts with a top-level key, the journal-specific +key will be used instead. + +### editor +If set, executes this command to launch an external editor for +writing and editing your entries. The path to a temporary file +is passed after it, and `jrnl` processes the file once +the editor is closed. + +Some editors require special options to work properly. See +[External Editors](external-editors.md) for details. + +### encrypt +If `true`, encrypts your journal using AES. Do not change this +value for journals that already have data in them. + +### template +The path to a text file to use as a template for new entries. Only works when you +have the `editor` field configured. + +### tagsymbols +Symbols to be interpreted as tags. + +!!! note + Although it seems intuitive to use the `#` + character for tags, there's a drawback: on most shells, this is + interpreted as a meta-character starting a comment. This means that if + you type + + > `jrnl Implemented endless scrolling on the #frontend of our website.` + + your bash will chop off everything after the `#` before passing it to + `jrnl`. To avoid this, wrap your input into quotation marks like + this: + + > `jrnl "Implemented endless scrolling on the #frontend of our website."` + + Or use the built-in prompt or an external editor to compose your + entries. + +### default_hour and default_minute +Entries will be created at this time if you supply a date but no specific time (for example, `last thursday`). + +### timeformat +Defines how to format the timestamps as they are stored in your journal. +See the [python docs](http://docs.python.org/library/time.html#time.strftime) for reference. + +Do not change this for an existing journal, since that might lead +to data loss. + +If you would just like to change how `jrnl` displays dates, +use display_format instead. + +!!! note + `jrnl` doesn't support the `%z` or `%Z` time zone identifiers. + +### highlight +If `true`, tags will be highlighted in cyan. + +### linewrap +Controls the width of the output. Set to `false` if you don't want to +wrap long lines. + +### colors +A dictionary that controls the colors used to display journal entries. +It has four subkeys, which are: `body`, `date`, `tags`, and `title`. + +Current valid values are: `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, +`MAGENTA`, `CYAN`, `WHITE`, and `NONE`. + +`colorama.Fore` is used for colorization, and you can find the [docs here](https://github.com/tartley/colorama#colored-output). + +To disable colored output, set the value to `NONE`. + +### display_format +Specifies formatter to use by default. See [formats](formats.md). + +### version +`jrnl` automatically updates this field to the version that it is running. +There is no need to change this field manually. diff --git a/docs/recipes.md b/docs/tips-and-tricks.md similarity index 63% rename from docs/recipes.md rename to docs/tips-and-tricks.md index 713b38c3..a158916c 100644 --- a/docs/recipes.md +++ b/docs/tips-and-tricks.md @@ -1,10 +1,11 @@ -# FAQ +# Tips and Tricks -## Recipes +This page contains tips and tricks for using `jrnl`, often in conjunction +with other tools, including external editors. -### Co-occurrence of tags +## Co-occurrence of tags If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run @@ -20,7 +21,7 @@ tag `@alberto`, and then the `--tags` option will print out how often each tag occurred in this filtered journal. Finally, we pipe this to `grep` which will only display the line containing `@melo`. -### Combining filters +## Combining filters You can do things like @@ -31,7 +32,7 @@ jrnl @fixed -starred -n 10 -to "jan 2013" --short To get a short summary of the 10 most recent, favourite entries before January 1, 2013 that are tagged with `@fixed`. -### Statistics +## Statistics How much did I write last year? @@ -50,7 +51,7 @@ This will first get the total number of words in the journal and divide it by the number of entries (this works because `jrnl --short` will print exactly one line per entry). -### Importing older files +## Importing older files If you want to import a file as an entry to `jrnl`, you can just do `jrnl < entry.ext`. But what if you want the modification date of the file to be the date of the entry in `jrnl`? Try this @@ -70,7 +71,7 @@ jrnlimport () { } ``` -### Using templates +## Using templates !!! note Templates require an [external editor](./advanced.md) be configured. @@ -79,7 +80,7 @@ A template is a code snippet that makes it easier to use repeated text each time a new journal entry is started. There are two ways you can utilize templates in your entries. -#### 1. Command line arguments +### 1. Command line arguments If you had a `template.txt` file with the following contents: @@ -98,11 +99,11 @@ jrnl < template.txt # Imports template.txt as the most recent entry jrnl -1 --edit # Opens the most recent entry in the editor ``` -#### 2. Include the template file in `jrnl.yaml` +### 2. Include the template file in `jrnl.yaml` A more efficient way to work with a template file is to declare the file -in your config file by changing the `template` setting from `false` to the -template file's path in double quotes: +in your [config file](./reference-config-file.md) by changing the `template` +setting from `false` to the template file's path in double quotes: ```sh ... @@ -121,7 +122,7 @@ logged as a new entry in the journal you specified in the original argument. jrnl -n 1 ``` -### Prompts on shell reload +## Prompts on shell reload If you'd like to be prompted each time you refresh your shell, you can include this in your `.bash_profile`: @@ -142,7 +143,7 @@ questions in the example above. Each answer will be logged as a separate journal entry at the `default_hour` and `default_minute` listed in your `jrnl.yaml` [config file](../advanced/#configuration-file). -### Display random entry +## Display random entry You can use this to select one title at random and then display the whole entry. The invocation of `cut` needs to match the format of the timestamp. @@ -155,7 +156,7 @@ jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)" ``` -### Launch a terminal for rapid logging +## Launch a terminal for rapid logging You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately. ```bash @@ -180,7 +181,7 @@ Mod4+Mod1+j bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor "" for_window[title="floating *"] floating enable ``` -### Visualize Formatted Markdown in the CLI +## Visualize Formatted Markdown in the CLI Out of the box, `jrnl` can output journal entries in Markdown. To visualize it, you can pipe to [mdless](https://github.com/ttscoff/mdless), which is a [less](https://en.wikipedia.org/wiki/Less_(Unix))-like tool that allows you to visualize your Markdown text with formatting and syntax highlighting from the CLI. You can use this in any shell that supports piping. @@ -207,94 +208,3 @@ display_format: markdown For more information on how `jrnl` outputs your entries in Markdown, please visit the [Formats](./formats.md) section. -## External editors - -Configure your preferred external editor by updating the `editor` option -in your `jrnl.yaml` file. (See [advanced usage](./advanced.md) for details). - -!!! note - To save and log any entry edits, save and close the file. - -If your editor is not in your operating system's `PATH` environment variable, -then you will have to enter in the full path of your editor. - -### Sublime Text - -To use [Sublime Text](https://www.sublimetext.com/), install the command line -tools for Sublime Text and configure your `jrnl.yaml` like this: - -```yaml -editor: "subl -w" -``` - -Note the `-w` flag to make sure `jrnl` waits for Sublime Text to close the -file before writing into the journal. - -### Visual Studio Code - -[Visual Studio Code](https://code.visualstudio.com) also requires a flag -that tells the process to wait until the file is closed before exiting: - -```yaml -editor: "code --wait" -``` - -On Windows, `code` is not added to the path by default, so you'll need to -enter the full path to your `code.exe` file, or add it to the `PATH` variable. - -### MacVim - -Also similar to Sublime Text, MacVim must be started with a flag that tells -the the process to wait until the file is closed before passing control -back to journal. In the case of MacVim, this is `-f`: - -```yaml -editor: "mvim -f" -``` - -### iA Writer - -On OS X, you can use the fabulous [iA -Writer](http://www.iawriter.com/mac) to write entries. Configure your -`jrnl.yaml` like this: - -```yaml -editor: "open -b pro.writer.mac -Wn" -``` - -What does this do? `open -b ...` opens a file using the application -identified by the bundle identifier (a unique string for every app out -there). `-Wn` tells the application to wait until it's closed before -passing back control, and to use a new instance of the application. - -If the `pro.writer.mac` bundle identifier is not found on your system, -you can find the right string to use by inspecting iA Writer's -`Info.plist` file in your shell: - -```sh -grep -A 1 CFBundleIdentifier /Applications/iA\ Writer.app/Contents/Info.plist -``` - -### Notepad++ on Windows - -To set [Notepad++](http://notepad-plus-plus.org/) as your editor, edit -the `jrnl` config file (`jrnl.yaml`) like this: - -```yaml -editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession" -``` - -The double backslashes are needed so `jrnl` can read the file path -correctly. The `-multiInst -nosession` options will cause `jrnl` to open -its own Notepad++ window. - - -### emacs - -To use `emacs` as your editor, edit the `jrnl` config file (`jrnl.yaml`) like this: - -```yaml -editor: emacsclient -a "" -c -``` - -When you're done editing the message, save and `C-x #` to close the buffer and stop the emacsclient process. diff --git a/docs/usage.md b/docs/usage.md index 6d5cd765..1a4de2a2 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -55,14 +55,15 @@ If you don't specify a date and time (e.g., `jrnl finished writing letter to bro If you don't use a timestamp, `jrnl` will create an entry using the current time. If you use a date only (no time), `jrnl` will use the default time -specified in your configuration file (see [advanced usage](./advanced.md)). +specified in your [configuration file](./reference-config-file.md#default_hour-and-default_minute). Behind the scenes, `jrnl` reorganizes entries in chronological order. ### Using Tags ### `jrnl` supports tags. The default tag symbol is `@` (largely because `#` is a -reserved character). You can specify your own tag symbol in the configuration -file. To use tags, preface the desired tag with the symbol: +reserved character). You can specify your own tag symbol in the +[configuration file](./reference-config-file.md#tagsymbols). To use tags, preface the +desired tag with the symbol: ```sh jrnl Had a wonderful day at the @beach with @Tom and @Anna. @@ -157,7 +158,7 @@ jrnl -n 5 @pinkie -and @WorldDomination displays the last five entries containing _both_ `@pinkie` _and_ `@worldDomination`. You can change which symbols you'd like to use for tagging -in the configuration. +in the [configuration file](./reference-config-file.md#tagsymbols). !!! note Entering `jrnl @pinkie @WorldDomination` will display entries in which both @@ -183,8 +184,8 @@ jrnl -starred You can edit entries after writing them. This is particularly useful when your journal file is encrypted. To use this feature, you need to have an external -editor configured in your configuration file. You can also edit only the entries -that match specific search criteria. For example, +editor configured in your [configuration file](./reference-config-file.md#editor). You +can also edit only the entries that match specific search criteria. For example, ```sh jrnl -to 1950 @texas -and @history --edit @@ -248,5 +249,5 @@ To list all of your journals: jrnl --list ``` -The journals displayed correspond to those specified in the `jrnl` configuration -file. +The journals displayed correspond to those specified in the `jrnl` +[configuration file](./reference-config-file.md#journals). diff --git a/mkdocs.yml b/mkdocs.yml index 5515d0fa..3838c1ce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -26,6 +26,11 @@ nav: - Privacy and Security: privacy-and-security.md - Formats: formats.md - Advanced Usage: advanced.md - - Recipes: recipes.md + - 'External Editors': external-editors.md + - 'Tips and Tricks': tips-and-tricks.md + - 'Reference': + - Command Line: reference-command-line.md + - Configuration File: reference-config-file.md - 'Contributing': - Contributing to jrnl: contributing.md + From f890e2fcd3d276a64ce44df6b58d15e4938e4b1c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Feb 2022 21:01:00 +0000 Subject: [PATCH 0574/1132] Update changelog [ci skip] --- CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78626c7a..1efc23dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,14 +12,12 @@ - Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) -**Build:** - -- Improve handling of mocking logic in pytest [\#1382](https://github.com/jrnl-org/jrnl/pull/1382) ([wren](https://github.com/wren)) - **Documentation:** - Fix nested navigation styling on docs site [\#1349](https://github.com/jrnl-org/jrnl/issues/1349) +- Separate out reference documentation for command line arguments and config file [\#1300](https://github.com/jrnl-org/jrnl/issues/1300) - Fix styling on documentation sidebar [\#1395](https://github.com/jrnl-org/jrnl/pull/1395) ([wren](https://github.com/wren)) +- Add reference documentation to docs site and separate out "Tips and Tricks" and "External Editors" from "Recipes" [\#1332](https://github.com/jrnl-org/jrnl/pull/1332) ([micahellison](https://github.com/micahellison)) **Packaging:** From cd865e048ee6ac9abf62dbb978a73edaf1b0b75d Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 5 Feb 2022 13:04:23 -0800 Subject: [PATCH 0575/1132] Add --co alias for --config-override (#1397) --- jrnl/args.py | 9 +++++++++ tests/bdd/features/override.feature | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/jrnl/args.py b/jrnl/args.py index 604f9c0e..dba5a749 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -336,6 +336,15 @@ def parse_args(args=[]): \t jrnl --config-override colors.body blue --config-override colors.title green """, ) + config_overrides.add_argument( + "--co", + dest="config_override", + action="append", + type=str, + nargs=2, + default=[], + help=argparse.SUPPRESS, + ) alternate_config = parser.add_argument_group( "Specifies alternate config to be used", diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index fb3c279e..d4b46e97 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -45,6 +45,11 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys When we run "jrnl -1 --config-override colors.body blue" Then the config in memory should contain "colors.body: blue" + Scenario: Override color selections with --co alias + Given we use the config "basic_encrypted.yaml" + And we use the password "test" if prompted + When we run "jrnl -1 --co colors.body blue" + Then the config in memory should contain "colors.body: blue" Scenario: Apply multiple config overrides Given we use the config "basic_encrypted.yaml" From f37062c9b6383891e8d8f4c6cb96d48fc5f4f0fa Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 5 Feb 2022 13:06:03 -0800 Subject: [PATCH 0576/1132] Add hash as a default tag symbol (#1398) --- jrnl/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/config.py b/jrnl/config.py index 035fb34a..b38b6cef 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -89,7 +89,7 @@ def get_default_config(): "default_hour": 9, "default_minute": 0, "timeformat": "%Y-%m-%d %H:%M", - "tagsymbols": "@", + "tagsymbols": "#@", "highlight": True, "linewrap": 79, "indent_character": "|", From 4b6a8efe0fce26e9b72733645df3e998e0d0d2f9 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Feb 2022 21:07:34 +0000 Subject: [PATCH 0577/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1efc23dd..0b21f6ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ **Implemented enhancements:** +- Add --co alias for --config-override [\#1394](https://github.com/jrnl-org/jrnl/issues/1394) - Support Python 3.11 [\#1371](https://github.com/jrnl-org/jrnl/issues/1371) +- Add hash as a default tag symbol for new jrnl config file [\#1398](https://github.com/jrnl-org/jrnl/pull/1398) ([micahellison](https://github.com/micahellison)) **Fixed bugs:** From cfeb9e01b72eb5c55ccc8832703ce17c8f478bef Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Feb 2022 21:08:19 +0000 Subject: [PATCH 0578/1132] Increment version to v2.8.4-beta2 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index fc4f7f0f..597e8535 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.4-beta1" +__version__ = "v2.8.4-beta2" diff --git a/pyproject.toml b/pyproject.toml index 449bac4a..85650472 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.4-beta1" +version = "v2.8.4-beta2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From fa874ace1289e748623ace923df3c0af8d0ffeb5 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 5 Feb 2022 21:09:51 +0000 Subject: [PATCH 0579/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b21f6ca..245b85ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.8.4-beta2](https://pypi.org/project/jrnl/v2.8.4-beta2/) (2022-02-05) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta1...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta1...v2.8.4-beta2) **Implemented enhancements:** From 72fea986d0fb5acdd18f09e35b81f12f4b544fea Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 12 Feb 2022 20:41:34 +0000 Subject: [PATCH 0580/1132] Increment version to v2.8.4 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 597e8535..5cc8607f 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.4-beta2" +__version__ = "v2.8.4" diff --git a/pyproject.toml b/pyproject.toml index 85650472..d0fddd8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.4-beta2" +version = "v2.8.4" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 9bceb39e26adec8dfe90298c07ac445050df8a69 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 12 Feb 2022 20:42:57 +0000 Subject: [PATCH 0581/1132] Update changelog [ci skip] --- CHANGELOG.md | 81 +++++++++++----------------------------------------- 1 file changed, 16 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 245b85ca..222ce0a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,97 +1,48 @@ # Changelog -## [v2.8.4-beta2](https://pypi.org/project/jrnl/v2.8.4-beta2/) (2022-02-05) +## [v2.8.4](https://pypi.org/project/jrnl/v2.8.4/) (2022-02-12) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta1...v2.8.4-beta2) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta2...v2.8.4) **Implemented enhancements:** -- Add --co alias for --config-override [\#1394](https://github.com/jrnl-org/jrnl/issues/1394) -- Support Python 3.11 [\#1371](https://github.com/jrnl-org/jrnl/issues/1371) - Add hash as a default tag symbol for new jrnl config file [\#1398](https://github.com/jrnl-org/jrnl/pull/1398) ([micahellison](https://github.com/micahellison)) - -**Fixed bugs:** - -- Specifying 'today' does not filter by year, also returns entries from same date in prior years [\#1391](https://github.com/jrnl-org/jrnl/issues/1391) - -**Documentation:** - -- Fix nested navigation styling on docs site [\#1349](https://github.com/jrnl-org/jrnl/issues/1349) -- Separate out reference documentation for command line arguments and config file [\#1300](https://github.com/jrnl-org/jrnl/issues/1300) -- Fix styling on documentation sidebar [\#1395](https://github.com/jrnl-org/jrnl/pull/1395) ([wren](https://github.com/wren)) -- Add reference documentation to docs site and separate out "Tips and Tricks" and "External Editors" from "Recipes" [\#1332](https://github.com/jrnl-org/jrnl/pull/1332) ([micahellison](https://github.com/micahellison)) - -**Packaging:** - -- Bump black from 21.12b0 to 22.1.0 [\#1404](https://github.com/jrnl-org/jrnl/pull/1404) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump ipython from 7.28.0 to 7.31.1 [\#1401](https://github.com/jrnl-org/jrnl/pull/1401) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump asteval from 0.9.25 to 0.9.26 [\#1400](https://github.com/jrnl-org/jrnl/pull/1400) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump keyring from 23.4.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump cryptography from 36.0.0 to 36.0.1 [\#1389](https://github.com/jrnl-org/jrnl/pull/1389) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.8.4-beta1](https://pypi.org/project/jrnl/v2.8.4-beta1/) (2021-12-11) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta...v2.8.4-beta1) - -**Fixed bugs:** - -- Wrong delete count when manually changing entries [\#1198](https://github.com/jrnl-org/jrnl/issues/1198) -- Add added option to \_print\_edited\_summary [\#1366](https://github.com/jrnl-org/jrnl/pull/1366) ([piero-vic](https://github.com/piero-vic)) - -**Build:** - -- Pytest BDD follow-up tasks [\#1287](https://github.com/jrnl-org/jrnl/issues/1287) -- Improve handling of mocking logic in pytest [\#1382](https://github.com/jrnl-org/jrnl/pull/1382) ([wren](https://github.com/wren)) -- Use full Python version for GitHub Actions cache key [\#1373](https://github.com/jrnl-org/jrnl/pull/1373) ([micahellison](https://github.com/micahellison)) - -**Packaging:** - -- Bump yq from 2.12.2 to 2.13.0 [\#1385](https://github.com/jrnl-org/jrnl/pull/1385) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump black from 21.11b1 to 21.12b0 [\#1384](https://github.com/jrnl-org/jrnl/pull/1384) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump keyring from 23.3.0 to 23.4.0 [\#1383](https://github.com/jrnl-org/jrnl/pull/1383) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump keyring from 23.2.1 to 23.3.0 [\#1381](https://github.com/jrnl-org/jrnl/pull/1381) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump cryptography from 35.0.0 to 36.0.0 [\#1379](https://github.com/jrnl-org/jrnl/pull/1379) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump black from 21.10b0 to 21.11b1 [\#1375](https://github.com/jrnl-org/jrnl/pull/1375) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.8.4-beta](https://pypi.org/project/jrnl/v2.8.4-beta/) (2021-11-06) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.3...v2.8.4-beta) - -**Implemented enhancements:** - -- Specify an alternate config file in the command line [\#1170](https://github.com/jrnl-org/jrnl/issues/1170) - Add --config-file argument to use alternate config file at runtime [\#1290](https://github.com/jrnl-org/jrnl/pull/1290) ([samuelgregorovic](https://github.com/samuelgregorovic)) **Fixed bugs:** -- Support pytest-bdd 5 [\#1364](https://github.com/jrnl-org/jrnl/issues/1364) +- Certs broken on website [\#1408](https://github.com/jrnl-org/jrnl/issues/1408) +- Add added option to \_print\_edited\_summary [\#1366](https://github.com/jrnl-org/jrnl/pull/1366) ([piero-vic](https://github.com/piero-vic)) **Build:** +- Improve handling of mocking logic in pytest [\#1382](https://github.com/jrnl-org/jrnl/pull/1382) ([wren](https://github.com/wren)) +- Use full Python version for GitHub Actions cache key [\#1373](https://github.com/jrnl-org/jrnl/pull/1373) ([micahellison](https://github.com/micahellison)) - Use Python 3.10 stable in CI [\#1362](https://github.com/jrnl-org/jrnl/pull/1362) ([micahellison](https://github.com/micahellison)) - Switch from poetry to poetry-core [\#1359](https://github.com/jrnl-org/jrnl/pull/1359) ([fabaff](https://github.com/fabaff)) - Add more steps to `pytest`, fully remove `behave` [\#1347](https://github.com/jrnl-org/jrnl/pull/1347) ([wren](https://github.com/wren)) **Documentation:** -- Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326) -- Move and expand contributing.md content into docs site [\#1180](https://github.com/jrnl-org/jrnl/issues/1180) +- Fix styling on documentation sidebar [\#1395](https://github.com/jrnl-org/jrnl/pull/1395) ([wren](https://github.com/wren)) - Added Recipe for visualizing Markdown in the CLI [\#1354](https://github.com/jrnl-org/jrnl/pull/1354) ([viegasfh](https://github.com/viegasfh)) - Fix recipe 'Launch a terminal for rapid logging' [\#1351](https://github.com/jrnl-org/jrnl/pull/1351) ([zapateo](https://github.com/zapateo)) - Fix readme splash and add changelog link to readme [\#1339](https://github.com/jrnl-org/jrnl/pull/1339) ([micahellison](https://github.com/micahellison)) +- Add reference documentation to docs site and separate out "Tips and Tricks" and "External Editors" from "Recipes" [\#1332](https://github.com/jrnl-org/jrnl/pull/1332) ([micahellison](https://github.com/micahellison)) - Document journal types [\#1331](https://github.com/jrnl-org/jrnl/pull/1331) ([micahellison](https://github.com/micahellison)) **Packaging:** -- Bump black from 21.9b0 to 21.10b0 [\#1370](https://github.com/jrnl-org/jrnl/pull/1370) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump pytest-bdd from 4.1.0 to 5.0.0 [\#1368](https://github.com/jrnl-org/jrnl/pull/1368) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump asteval from 0.9.25 to 0.9.26 [\#1400](https://github.com/jrnl-org/jrnl/pull/1400) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump black from 21.7b0 to 22.1.0 [\#1404](https://github.com/jrnl-org/jrnl/pull/1404) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump cryptography from 3.4.8 to 36.0.1 [\#1389](https://github.com/jrnl-org/jrnl/pull/1389) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump ipython from 7.28.0 to 7.31.1 [\#1401](https://github.com/jrnl-org/jrnl/pull/1401) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump keyring from 23.1.0 to 23.5.0 [\#1392](https://github.com/jrnl-org/jrnl/pull/1392) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump mkdocs from 1.2.2 to 1.2.3 [\#1355](https://github.com/jrnl-org/jrnl/pull/1355) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump black from 21.8b0 to 21.9b0 [\#1343](https://github.com/jrnl-org/jrnl/pull/1343) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump keyring from 23.1.0 to 23.2.1 [\#1342](https://github.com/jrnl-org/jrnl/pull/1342) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.4 to 6.2.5 [\#1334](https://github.com/jrnl-org/jrnl/pull/1334) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump black from 21.7b0 to 21.8b0 [\#1333](https://github.com/jrnl-org/jrnl/pull/1333) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest-bdd from 4.1.0 to 5.0.0 [\#1368](https://github.com/jrnl-org/jrnl/pull/1368) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump yq from 2.12.2 to 2.13.0 [\#1385](https://github.com/jrnl-org/jrnl/pull/1385) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.3](https://pypi.org/project/jrnl/v2.8.3/) (2021-09-06) From c2f1d19eaf50f423e6548b3d7054e3c6cdde7a87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Feb 2022 12:52:14 -0800 Subject: [PATCH 0582/1132] Bump pytest from 6.2.5 to 7.0.0 (#1407) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index c91c1b0e..8cc8fc7c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -624,7 +624,7 @@ toml = "*" [[package]] name = "pytest" -version = "6.2.5" +version = "7.0.0" description = "pytest: simple powerful testing with Python" category = "main" optional = false @@ -639,10 +639,10 @@ iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" py = ">=1.8.2" -toml = "*" +tomli = ">=1.0.0" [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-bdd" @@ -784,7 +784,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "tomli" version = "1.2.1" description = "A lil' TOML parser" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -1254,8 +1254,8 @@ pyproject-flake8 = [ {file = "pyproject_flake8-0.0.1a2-py2.py3-none-any.whl", hash = "sha256:e61ed1dc088e9f9f8a7170967ac4ec135acfef3a59ab9738c7b58cc11f294a7e"}, ] pytest = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, + {file = "pytest-7.0.0-py3-none-any.whl", hash = "sha256:42901e6bd4bd4a0e533358a86e848427a49005a3256f657c5c8f8dd35ef137a9"}, + {file = "pytest-7.0.0.tar.gz", hash = "sha256:dad48ffda394e5ad9aa3b7d7ddf339ed502e5e365b1350e0af65f4a602344b11"}, ] pytest-bdd = [ {file = "pytest-bdd-5.0.0.tar.gz", hash = "sha256:fab7093ed3d5e51ee0c68de093c90e4f40de345bd9a54a188b2991ce2a2a39cf"}, From f9a069586529f0942543f3970ae99a4b5d0d87eb Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 12 Feb 2022 20:53:58 +0000 Subject: [PATCH 0583/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 222ce0a2..8e485927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...HEAD) + +**Packaging:** + +- Bump pytest from 6.2.5 to 7.0.0 [\#1407](https://github.com/jrnl-org/jrnl/pull/1407) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.8.4](https://pypi.org/project/jrnl/v2.8.4/) (2022-02-12) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4-beta2...v2.8.4) From 117e0de5bc267d92dee8abb06d5c648abb51fe76 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 12 Feb 2022 14:07:56 -0800 Subject: [PATCH 0584/1132] Drop support for Python 3.7 and 3.8 (#1412) * Remove Python 3.7 and 3.8 from github actions workflows * Update lockfile after running poetry update a couple times * Update poetry lock * Remove Python 3.7 and 3.8 from pyproject.toml and run poetry lock --- .github/workflows/testing_prs.yaml | 2 +- .github/workflows/testing_schedule.yaml | 2 +- poetry.lock | 352 +++++++++++------------- pyproject.toml | 2 +- 4 files changed, 168 insertions(+), 190 deletions(-) diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml index aabe14b3..15015935 100644 --- a/.github/workflows/testing_prs.yaml +++ b/.github/workflows/testing_prs.yaml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.7, 3.8, 3.9, '3.10' ] + python-version: [ 3.9, '3.10' ] os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - run: git config --global core.autocrlf false diff --git a/.github/workflows/testing_schedule.yaml b/.github/workflows/testing_schedule.yaml index 72e47de4..44dd0b69 100644 --- a/.github/workflows/testing_schedule.yaml +++ b/.github/workflows/testing_schedule.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11-dev ] + python-version: [ 3.9, '3.10', 3.11-dev ] os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - run: git config --global core.autocrlf false diff --git a/poetry.lock b/poetry.lock index 8cc8fc7c..a1d17620 100644 --- a/poetry.lock +++ b/poetry.lock @@ -19,14 +19,11 @@ python-versions = "*" [[package]] name = "argcomplete" -version = "1.12.3" +version = "2.0.0" description = "Bash tab completion for argparse" category = "dev" optional = false -python-versions = "*" - -[package.dependencies] -importlib-metadata = {version = ">=0.23,<5", markers = "python_version == \"3.7\""} +python-versions = ">=3.6" [package.extras] test = ["coverage", "flake8", "pexpect", "wheel"] @@ -39,8 +36,19 @@ category = "main" optional = false python-versions = ">=3.6" +[[package]] +name = "asttokens" +version = "2.0.5" +description = "Annotate AST trees with source code positions" +category = "dev" +optional = false +python-versions = "*" + [package.dependencies] -importlib_metadata = {version = "*", markers = "python_version < \"3.8\""} +six = "*" + +[package.extras] +test = ["astroid", "pytest"] [[package]] name = "atomicwrites" @@ -52,17 +60,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.2.0" +version = "21.4.0" description = "Classes Without Boilerplate" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "backcall" @@ -86,7 +94,6 @@ mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" tomli = ">=1.1.0" -typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] @@ -116,7 +123,6 @@ python-versions = ">=3.6" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" @@ -158,12 +164,20 @@ test = ["pytest (>=6.2.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pr [[package]] name = "decorator" -version = "5.1.0" +version = "5.1.1" description = "Decorators for Humans" category = "dev" optional = false python-versions = ">=3.5" +[[package]] +name = "executing" +version = "0.8.2" +description = "Get the currently executing AST node of a frame, and other information" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "flake8" version = "4.0.1" @@ -173,7 +187,6 @@ optional = false python-versions = ">=3.6" [package.dependencies] -importlib-metadata = {version = "<4.3", markers = "python_version < \"3.8\""} mccabe = ">=0.6.0,<0.7.0" pycodestyle = ">=2.8.0,<2.9.0" pyflakes = ">=2.4.0,<2.5.0" @@ -202,19 +215,19 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.2.0" +version = "4.11.0" description = "Read metadata from Python packages" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +perf = ["ipython"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -239,15 +252,16 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "7.31.1" +version = "8.0.1" description = "IPython: Productive Interactive Computing" category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" [package.dependencies] appnope = {version = "*", markers = "sys_platform == \"darwin\""} backcall = "*" +black = "*" colorama = {version = "*", markers = "sys_platform == \"win32\""} decorator = "*" jedi = ">=0.16" @@ -256,10 +270,11 @@ pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" pygments = "*" -traitlets = ">=4.2" +stack-data = "*" +traitlets = ">=5" [package.extras] -all = ["Sphinx (>=1.3)", "ipykernel", "ipyparallel", "ipywidgets", "nbconvert", "nbformat", "nose (>=0.10.1)", "notebook", "numpy (>=1.17)", "pygments", "qtconsole", "requests", "testpath"] +all = ["Sphinx (>=1.3)", "curio", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.19)", "pandas", "pygments", "pytest", "pytest-asyncio", "qtconsole", "testpath", "trio"] doc = ["Sphinx (>=1.3)"] kernel = ["ipykernel"] nbconvert = ["nbconvert"] @@ -267,11 +282,12 @@ nbformat = ["nbformat"] notebook = ["notebook", "ipywidgets"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["nose (>=0.10.1)", "requests", "testpath", "pygments", "nbformat", "ipykernel", "numpy (>=1.17)"] +test = ["pytest", "pytest-asyncio", "testpath", "pygments"] +test_extra = ["pytest", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "pygments", "trio"] [[package]] name = "jedi" -version = "0.18.0" +version = "0.18.1" description = "An autocompletion tool for Python that can be used for text editors." category = "dev" optional = false @@ -282,7 +298,7 @@ parso = ">=0.8.0,<0.9.0" [package.extras] qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<6.0.0)"] +testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] name = "jeepney" @@ -298,7 +314,7 @@ trio = ["trio", "async-generator"] [[package]] name = "jinja2" -version = "3.0.2" +version = "3.0.3" description = "A very fast and expressive template engine." category = "dev" optional = false @@ -330,7 +346,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [[package]] name = "mako" -version = "1.1.5" +version = "1.1.6" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." category = "main" optional = false @@ -345,14 +361,14 @@ lingua = ["lingua"] [[package]] name = "markdown" -version = "3.3.4" +version = "3.3.6" description = "Python implementation of Markdown." category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] testing = ["coverage", "pyyaml"] @@ -425,14 +441,14 @@ python-versions = "*" [[package]] name = "packaging" -version = "21.0" +version = "21.3" description = "Core utilities for Python packages" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -pyparsing = ">=2.0.2" +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "parse" @@ -444,18 +460,18 @@ python-versions = "*" [[package]] name = "parse-type" -version = "0.5.2" +version = "0.6.0" description = "Simplifies to build parse types based on the parse module" category = "main" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*" [package.dependencies] -parse = ">=1.8.4" +parse = {version = ">=1.18.0", markers = "python_version >= \"3.0\""} six = ">=1.11" [package.extras] -develop = ["coverage (>=4.4)", "pytest (>=3.2)", "pytest-cov", "tox (>=2.8)"] +develop = ["coverage (>=4.4)", "pytest-html (>=1.19.0)", "pytest-cov", "tox (>=2.8)", "pytest (<5.0)", "pytest (>=5.0)"] docs = ["sphinx (>=1.2)"] [[package]] @@ -468,7 +484,7 @@ python-versions = "*" [[package]] name = "parso" -version = "0.8.2" +version = "0.8.3" description = "A Python Parser" category = "dev" optional = false @@ -507,11 +523,11 @@ python-versions = "*" [[package]] name = "platformdirs" -version = "2.4.0" +version = "2.5.0" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] @@ -525,9 +541,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.dependencies] -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} - [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] @@ -542,7 +555,7 @@ python-versions = "*" [[package]] name = "prompt-toolkit" -version = "3.0.21" +version = "3.0.28" description = "Library for building powerful interactive command lines in Python" category = "dev" optional = false @@ -559,13 +572,24 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "pure-eval" +version = "0.2.2" +description = "Safely evaluate AST nodes without side effects" +category = "dev" +optional = false +python-versions = "*" + +[package.extras] +tests = ["pytest"] + [[package]] name = "py" -version = "1.10.0" +version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pycodestyle" @@ -577,7 +601,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pycparser" -version = "2.20" +version = "2.21" description = "C parser in Python" category = "main" optional = false @@ -593,7 +617,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.10.0" +version = "2.11.2" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false @@ -601,7 +625,7 @@ python-versions = ">=3.5" [[package]] name = "pyparsing" -version = "3.0.0" +version = "3.0.7" description = "Python parsing module" category = "main" optional = false @@ -624,7 +648,7 @@ toml = "*" [[package]] name = "pytest" -version = "7.0.0" +version = "7.0.1" description = "pytest: simple powerful testing with Python" category = "main" optional = false @@ -634,7 +658,6 @@ python-versions = ">=3.6" atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" @@ -729,7 +752,7 @@ pyyaml = "*" [[package]] name = "rich" -version = "10.12.0" +version = "11.2.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false @@ -739,7 +762,6 @@ python-versions = ">=3.6.2,<4.0.0" colorama = ">=0.4.0,<0.5.0" commonmark = ">=0.9.0,<0.10.0" pygments = ">=2.6.0,<3.0.0" -typing-extensions = {version = ">=3.7.4,<4.0.0", markers = "python_version < \"3.8\""} [package.extras] jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] @@ -764,6 +786,22 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "stack-data" +version = "0.1.4" +description = "Extract data from python stack frames and tracebacks for informative displays" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +asttokens = "*" +executing = "*" +pure-eval = "*" + +[package.extras] +tests = ["pytest", "typeguard", "pygments", "littleutils"] + [[package]] name = "textwrap3" version = "0.9.2" @@ -782,15 +820,15 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomli" -version = "1.2.1" +version = "2.0.1" description = "A lil' TOML parser" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "traitlets" -version = "5.1.0" +version = "5.1.1" description = "Traitlets Python configuration system" category = "dev" optional = false @@ -800,20 +838,12 @@ python-versions = ">=3.7" test = ["pytest"] [[package]] -name = "typed-ast" -version = "1.4.3" -description = "a fork of Python 2 and 3 ast modules with type comment support" +name = "typing-extensions" +version = "4.1.0" +description = "Backported and Experimental Type Hints for Python 3.6+" category = "dev" optional = false -python-versions = "*" - -[[package]] -name = "typing-extensions" -version = "3.10.0.2" -description = "Backported and Experimental Type Hints for Python 3.5+" -category = "main" -optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "tzlocal" @@ -872,23 +902,23 @@ tests = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" -version = "3.6.0" +version = "3.7.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [extras] testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" -python-versions = ">=3.7.0, <3.12" -content-hash = "fea1b18eee58b612f2e35f28d633878da8a3637baccc400fb4a795321191123c" +python-versions = ">=3.9.0, <3.12" +content-hash = "0e9f028c0123632b42e13e961abc5f2779597b3ffdd14af8624534e0a184b794" [metadata.files] ansiwrap = [ @@ -900,19 +930,23 @@ appnope = [ {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, ] argcomplete = [ - {file = "argcomplete-1.12.3-py2.py3-none-any.whl", hash = "sha256:291f0beca7fd49ce285d2f10e4c1c77e9460cf823eef2de54df0c0fec88b0d81"}, - {file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"}, + {file = "argcomplete-2.0.0-py2.py3-none-any.whl", hash = "sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e"}, + {file = "argcomplete-2.0.0.tar.gz", hash = "sha256:6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20"}, ] asteval = [ {file = "asteval-0.9.26.tar.gz", hash = "sha256:36125613ec21ed3e33e370ca8960a1f1e8a2324d78a8016bfa5ad76f1e16ef05"}, ] +asttokens = [ + {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, + {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, +] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, ] attrs = [ - {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, - {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, + {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, + {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, ] backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, @@ -1030,8 +1064,12 @@ cryptography = [ {file = "cryptography-36.0.1.tar.gz", hash = "sha256:53e5c1dc3d7a953de055d77bef2ff607ceef7a2aac0353b5d630ab67f7423638"}, ] decorator = [ - {file = "decorator-5.1.0-py3-none-any.whl", hash = "sha256:7b12e7c3c6ab203a29e157335e9122cb03de9ab7264b137594103fd4a683b374"}, - {file = "decorator-5.1.0.tar.gz", hash = "sha256:e59913af105b9860aa2c8d3272d9de5a56a4e608db9a2f167a8480b323d529a7"}, + {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, + {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, +] +executing = [ + {file = "executing-0.8.2-py2.py3-none-any.whl", hash = "sha256:32fc6077b103bd19e6494a72682d66d5763cf20a106d5aa7c5ccbea4e47b0df7"}, + {file = "executing-0.8.2.tar.gz", hash = "sha256:c23bf42e9a7b9b212f185b1b2c3c91feb895963378887bb10e64a2e612ec0023"}, ] flake8 = [ {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, @@ -1045,8 +1083,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"}, - {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"}, + {file = "importlib_metadata-4.11.0-py3-none-any.whl", hash = "sha256:6affcdb3aec542dd98df8211e730bba6c5f2bec8288d47bacacde898f548c9ad"}, + {file = "importlib_metadata-4.11.0.tar.gz", hash = "sha256:9e5e553bbba1843cb4a00823014b907616be46ee503d2b9ba001d214a8da218f"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1056,56 +1094,40 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-7.31.1-py3-none-any.whl", hash = "sha256:55df3e0bd0f94e715abd968bedd89d4e8a7bce4bf498fb123fed4f5398fea874"}, - {file = "ipython-7.31.1.tar.gz", hash = "sha256:b5548ec5329a4bcf054a5deed5099b0f9622eb9ea51aaa7104d215fece201d8c"}, + {file = "ipython-8.0.1-py3-none-any.whl", hash = "sha256:c503a0dd6ccac9c8c260b211f2dd4479c042b49636b097cc9a0d55fe62dff64c"}, + {file = "ipython-8.0.1.tar.gz", hash = "sha256:ab564d4521ea8ceaac26c3a2c6e5ddbca15c8848fd5a5cc325f960da88d42974"}, ] jedi = [ - {file = "jedi-0.18.0-py2.py3-none-any.whl", hash = "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93"}, - {file = "jedi-0.18.0.tar.gz", hash = "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707"}, + {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, + {file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"}, ] jeepney = [ {file = "jeepney-0.7.1-py3-none-any.whl", hash = "sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac"}, {file = "jeepney-0.7.1.tar.gz", hash = "sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f"}, ] jinja2 = [ - {file = "Jinja2-3.0.2-py3-none-any.whl", hash = "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c"}, - {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, + {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, + {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, ] keyring = [ {file = "keyring-23.5.0-py3-none-any.whl", hash = "sha256:b0d28928ac3ec8e42ef4cc227822647a19f1d544f21f96457965dc01cf555261"}, {file = "keyring-23.5.0.tar.gz", hash = "sha256:9012508e141a80bd1c0b6778d5c610dd9f8c464d75ac6774248500503f972fb9"}, ] mako = [ - {file = "Mako-1.1.5-py2.py3-none-any.whl", hash = "sha256:6804ee66a7f6a6416910463b00d76a7b25194cd27f1918500c5bd7be2a088a23"}, - {file = "Mako-1.1.5.tar.gz", hash = "sha256:169fa52af22a91900d852e937400e79f535496191c63712e3b9fda5a9bed6fc3"}, + {file = "Mako-1.1.6-py2.py3-none-any.whl", hash = "sha256:afaf8e515d075b22fad7d7b8b30e4a1c90624ff2f3733a06ec125f5a5f043a57"}, + {file = "Mako-1.1.6.tar.gz", hash = "sha256:4e9e345a41924a954251b95b4b28e14a301145b544901332e658907a7464b6b2"}, ] markdown = [ - {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, - {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, + {file = "Markdown-3.3.6-py3-none-any.whl", hash = "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3"}, + {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1114,27 +1136,14 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1144,12 +1153,6 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -1175,23 +1178,23 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] packaging = [ - {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, - {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] parse = [ {file = "parse-1.19.0.tar.gz", hash = "sha256:9ff82852bcb65d139813e2a5197627a94966245c897796760a3a2a8eb66f020b"}, ] parse-type = [ - {file = "parse_type-0.5.2-py2.py3-none-any.whl", hash = "sha256:089a471b06327103865dfec2dd844230c3c658a4a1b5b4c8b6c16c8f77577f9e"}, - {file = "parse_type-0.5.2.tar.gz", hash = "sha256:7f690b18d35048c15438d6d0571f9045cffbec5907e0b1ccf006f889e3a38c0b"}, + {file = "parse_type-0.6.0-py2.py3-none-any.whl", hash = "sha256:c148e88436bd54dab16484108e882be3367f44952c649c9cd6b82a7370b650cb"}, + {file = "parse_type-0.6.0.tar.gz", hash = "sha256:20b43c660e48ed47f433bce5873a2a3d4b9b6a7ba47bd7f7d2a7cec4bec5551f"}, ] parsedatetime = [ {file = "parsedatetime-2.6-py3-none-any.whl", hash = "sha256:cb96edd7016872f58479e35879294258c71437195760746faffedb692aef000b"}, {file = "parsedatetime-2.6.tar.gz", hash = "sha256:4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455"}, ] parso = [ - {file = "parso-0.8.2-py2.py3-none-any.whl", hash = "sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22"}, - {file = "parso-0.8.2.tar.gz", hash = "sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398"}, + {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, + {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, ] pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, @@ -1206,8 +1209,8 @@ pickleshare = [ {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, ] platformdirs = [ - {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"}, - {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, + {file = "platformdirs-2.5.0-py3-none-any.whl", hash = "sha256:30671902352e97b1eafd74ade8e4a694782bd3471685e78c32d0fdfd3aa7e7bb"}, + {file = "platformdirs-2.5.0.tar.gz", hash = "sha256:8ec11dfba28ecc0715eb5fb0147a87b1bf325f349f3da9aab2cd6b50b96b692b"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, @@ -1218,44 +1221,48 @@ pprintpp = [ {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] prompt-toolkit = [ - {file = "prompt_toolkit-3.0.21-py3-none-any.whl", hash = "sha256:62b3d3ea5a3ccee94dc1aac018279cf64866a76837156ebe159b981c42dd20a8"}, - {file = "prompt_toolkit-3.0.21.tar.gz", hash = "sha256:27f13ff4e4850fe8f860b77414c7880f67c6158076a7b099062cc8570f1562e5"}, + {file = "prompt_toolkit-3.0.28-py3-none-any.whl", hash = "sha256:30129d870dcb0b3b6a53efdc9d0a83ea96162ffd28ffe077e94215b233dc670c"}, + {file = "prompt_toolkit-3.0.28.tar.gz", hash = "sha256:9f1cd16b1e86c2968f2519d7fb31dd9d669916f515612c269d14e9ed52b51650"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] +pure-eval = [ + {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, + {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, +] py = [ - {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, - {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] pycodestyle = [ {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, ] pycparser = [ - {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, - {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pyflakes = [ {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, ] pygments = [ - {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, - {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, + {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, + {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, ] pyparsing = [ - {file = "pyparsing-3.0.0-py3-none-any.whl", hash = "sha256:d487599e9fb0dc36bee6b5c183c6fc5bd372ce667736f3d430ab7d842a54a35a"}, - {file = "pyparsing-3.0.0.tar.gz", hash = "sha256:001cad8d467e7a9248ef9fd513f5c0d39afcbcb9a43684101853bd0ab962e479"}, + {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, + {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, ] pyproject-flake8 = [ {file = "pyproject-flake8-0.0.1a2.tar.gz", hash = "sha256:bdeca37f78ecd34bd64a49d3657d53d099f5445831071a31c46e1fe20cd61461"}, {file = "pyproject_flake8-0.0.1a2-py2.py3-none-any.whl", hash = "sha256:e61ed1dc088e9f9f8a7170967ac4ec135acfef3a59ab9738c7b58cc11f294a7e"}, ] pytest = [ - {file = "pytest-7.0.0-py3-none-any.whl", hash = "sha256:42901e6bd4bd4a0e533358a86e848427a49005a3256f657c5c8f8dd35ef137a9"}, - {file = "pytest-7.0.0.tar.gz", hash = "sha256:dad48ffda394e5ad9aa3b7d7ddf339ed502e5e365b1350e0af65f4a602344b11"}, + {file = "pytest-7.0.1-py3-none-any.whl", hash = "sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db"}, + {file = "pytest-7.0.1.tar.gz", hash = "sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171"}, ] pytest-bdd = [ {file = "pytest-bdd-5.0.0.tar.gz", hash = "sha256:fab7093ed3d5e51ee0c68de093c90e4f40de345bd9a54a188b2991ce2a2a39cf"}, @@ -1320,8 +1327,8 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] rich = [ - {file = "rich-10.12.0-py3-none-any.whl", hash = "sha256:c30d6808d1cd3defd56a7bd2d587d13e53b5f55de6cf587f035bcbb56bc3f37b"}, - {file = "rich-10.12.0.tar.gz", hash = "sha256:83fb3eff778beec3c55201455c17cccde1ccdf66d5b4dade8ef28f56b50c4bd4"}, + {file = "rich-11.2.0-py3-none-any.whl", hash = "sha256:d5f49ad91fb343efcae45a2b2df04a9755e863e50413623ab8c9e74f05aee52b"}, + {file = "rich-11.2.0.tar.gz", hash = "sha256:1a6266a5738115017bb64a66c59c717e7aa047b3ae49a011ede4abdeffc6536e"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, @@ -1331,6 +1338,10 @@ six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +stack-data = [ + {file = "stack_data-0.1.4-py3-none-any.whl", hash = "sha256:02cc0683cbc445ae4ca8c4e3a0e58cb1df59f252efb0aa016b34804a707cf9bc"}, + {file = "stack_data-0.1.4.tar.gz", hash = "sha256:7769ed2482ce0030e00175dd1bf4ef1e873603b6ab61cd3da443b410e64e9477"}, +] textwrap3 = [ {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, {file = "textwrap3-0.9.2.zip", hash = "sha256:5008eeebdb236f6303dcd68f18b856d355f6197511d952ba74bc75e40e0c3414"}, @@ -1340,49 +1351,16 @@ toml = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tomli = [ - {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, - {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] traitlets = [ - {file = "traitlets-5.1.0-py3-none-any.whl", hash = "sha256:03f172516916220b58c9f19d7f854734136dd9528103d04e9bf139a92c9f54c4"}, - {file = "traitlets-5.1.0.tar.gz", hash = "sha256:bd382d7ea181fbbcce157c133db9a829ce06edffe097bcf3ab945b435452b46d"}, -] -typed-ast = [ - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, - {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, - {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, - {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, - {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, - {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, - {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, - {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, - {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, - {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, + {file = "traitlets-5.1.1-py3-none-any.whl", hash = "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033"}, + {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, ] typing-extensions = [ - {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, - {file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"}, - {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, + {file = "typing_extensions-4.1.0-py3-none-any.whl", hash = "sha256:c13180fbaa7cd97065a4915ceba012bdb31dc34743e63ddee16360161d358414"}, + {file = "typing_extensions-4.1.0.tar.gz", hash = "sha256:ba97c5143e5bb067b57793c726dd857b1671d4b02ced273ca0538e71ff009095"}, ] tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, @@ -1426,6 +1404,6 @@ yq = [ {file = "yq-2.13.0.tar.gz", hash = "sha256:fd131fdb1f56716ad8d44cd9eaaf7d3b22d39ba8861ea64a409cc3f4ae263db8"}, ] zipp = [ - {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, - {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, + {file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"}, + {file = "zipp-3.7.0.tar.gz", hash = "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"}, ] diff --git a/pyproject.toml b/pyproject.toml index d0fddd8d..2c23050d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ "Funding" = "https://opencollective.com/jrnl" [tool.poetry.dependencies] -python = ">=3.7.0, <3.12" +python = ">=3.9.0, <3.12" ansiwrap = "^0.8.4" asteval = "^0.9" From 2ec4567f696bf3a2379d372cc1a0d62cd79f79b2 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 12 Feb 2022 22:09:44 +0000 Subject: [PATCH 0585/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e485927..ee9c88ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,13 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...HEAD) +**Build:** + +- Drop support for Python 3.7 and 3.8 [\#1412](https://github.com/jrnl-org/jrnl/pull/1412) ([micahellison](https://github.com/micahellison)) + **Packaging:** +- Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) - Bump pytest from 6.2.5 to 7.0.0 [\#1407](https://github.com/jrnl-org/jrnl/pull/1407) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.4](https://pypi.org/project/jrnl/v2.8.4/) (2022-02-12) From 20d6eda1ada7e01cc594e0de0da5fd0e9fce28f4 Mon Sep 17 00:00:00 2001 From: Nelson <35701520+nelnog@users.noreply.github.com> Date: Thu, 17 Feb 2022 15:38:11 -0800 Subject: [PATCH 0586/1132] Tidy up git ignore (#1414) * cleaned gitignore and add comments * removed colon for readbility * alphabetize files in sections Co-authored-by: nelnog --- .gitignore | 66 +++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index a2bb0798..4def365f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,64 +1,58 @@ +# Byte-compiled DLL and Shared Library files *.py[cod] - -# C extensions *.so # Packages *.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs +*.egg-info/ .installed.cfg -lib64 +bin/ +build/ +develop-eggs/ +dist/ +eggs/ +lib64/ +parts/ +sdist/ +var/ # Versioning .python-version .tool-version # Installer logs -pip-log.txt .DS_Store .travis-solo Icon +pip-log.txt # Documentation _build _sources _static +coverage.xml +exp/ objects.inv searchindex.js -# MS Visual Studio (PyTools) -obj -*.pyproj -*.sln -*.suo - # virtaulenv +.venv*/ env/ env*/ venv*/ -.venv*/ -# PyCharm Project files -.idea/ - -# export testing directories -exp/ - -_extras/ -*.sublime-* -site/ - -.vscode/settings.json -coverage.xml -.vscode/launch.json -.coverage -.vscode/tasks.json -todo.txt +# Editor and IDE specific files +# Since contributors may want to user a variety of development tools it is +# recommended that editor specific file types be ignored globally by each +# contributor via a global gitignore. Instructions for setting up a global +# ignore file can be found here: +# https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files +# (Configuring ignored files for all repositories on your computer) +# Examples of such files are: +# MS Visual Studio (PyTools) +# obj +# *.suo +# PyCharm +# .idea/ +# VS Code +# .vscode/settings.json \ No newline at end of file From b4e724652649088d4f844b4908c5b68d6b405699 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 12:03:57 -0800 Subject: [PATCH 0587/1132] Bump yq from 2.13.0 to 2.14.0 (#1418) Bumps [yq](https://github.com/kislyuk/yq) from 2.13.0 to 2.14.0. - [Release notes](https://github.com/kislyuk/yq/releases) - [Changelog](https://github.com/kislyuk/yq/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/yq/compare/v2.13.0...v2.14.0) --- updated-dependencies: - dependency-name: yq dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index a1d17620..80bcb2d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -885,7 +885,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "yq" -version = "2.13.0" +version = "2.14.0" description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" category = "dev" optional = false @@ -1122,12 +1122,28 @@ markdown = [ {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1136,14 +1152,27 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1153,6 +1182,12 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -1400,8 +1435,8 @@ xmltodict = [ {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, ] yq = [ - {file = "yq-2.13.0-py2.py3-none-any.whl", hash = "sha256:3ae1f647c85f76d48005d75445917cbea2f4d734bae9c7409372340583c2a6c1"}, - {file = "yq-2.13.0.tar.gz", hash = "sha256:fd131fdb1f56716ad8d44cd9eaaf7d3b22d39ba8861ea64a409cc3f4ae263db8"}, + {file = "yq-2.14.0-py3-none-any.whl", hash = "sha256:b6321b29cb39c4e92a4a6f16d47d99a024650211e45e09a02d1906ec45fbaede"}, + {file = "yq-2.14.0.tar.gz", hash = "sha256:f4bf2b299d1e5c7ebd74cfb25d1f5d9b6401063bac07a2d09a156144c1d644e1"}, ] zipp = [ {file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"}, From d6ff04cf1747a7f8b4553913614cd4af35b3e359 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Feb 2022 20:05:39 +0000 Subject: [PATCH 0588/1132] Update changelog [ci skip] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee9c88ef..4f61581a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,14 @@ **Build:** +- Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) +- Tidy up git ignore [\#1414](https://github.com/jrnl-org/jrnl/pull/1414) ([nelnog](https://github.com/nelnog)) - Drop support for Python 3.7 and 3.8 [\#1412](https://github.com/jrnl-org/jrnl/pull/1412) ([micahellison](https://github.com/micahellison)) **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump yq from 2.13.0 to 2.14.0 [\#1418](https://github.com/jrnl-org/jrnl/pull/1418) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 6.2.5 to 7.0.0 [\#1407](https://github.com/jrnl-org/jrnl/pull/1407) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.4](https://pypi.org/project/jrnl/v2.8.4/) (2022-02-12) From 5273f8769df863a73692c9d6557076d62c7aaef6 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 12 Mar 2022 12:43:26 -0800 Subject: [PATCH 0589/1132] Reformat messages and add new centralized exception handling (#1417) * Update and modularize exception handling cc #1024 #1141 - Stack traces are no longer shown to users unless the --debug flag is being used - Errors, warnings, and other messages contain color as needed - Converted error messages to Enum - Adds print_msg function to centralize output (this should replace all other output in other modules) Co-authored-by: Micah Jerome Ellison --- jrnl/cli.py | 29 ++++++++++-- jrnl/commands.py | 18 ++++++-- jrnl/config.py | 20 ++++++-- jrnl/editor.py | 35 ++++++++++---- jrnl/exception.py | 43 ++++------------- jrnl/messages.py | 79 ++++++++++++++++++++++++++++++++ jrnl/output.py | 25 ++++++++-- jrnl/plugins/fancy_exporter.py | 22 ++++++--- tests/bdd/features/write.feature | 4 +- tests/unit/test_exception.py | 19 -------- tests/unit/test_export.py | 6 +-- 11 files changed, 204 insertions(+), 96 deletions(-) create mode 100644 jrnl/messages.py delete mode 100644 tests/unit/test_exception.py diff --git a/jrnl/cli.py b/jrnl/cli.py index 6a1c6a0f..03b4f2f0 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -3,10 +3,15 @@ import logging import sys +import traceback -from .jrnl import run -from .args import parse_args -from .exception import JrnlError +from jrnl.jrnl import run +from jrnl.args import parse_args +from jrnl.output import print_msg +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType def configure_logger(debug=False): @@ -33,9 +38,23 @@ def cli(manual_args=None): return run(args) - except JrnlError as e: - print(e.message, file=sys.stderr) + except JrnlException as e: + e.print() return 1 except KeyboardInterrupt: + print_msg(Message(MsgText.KeyboardInterruptMsg, MsgType.WARNING)) + return 1 + + except Exception as e: + try: + is_debug = args.debug # type: ignore + except NameError: + # error happened before args were parsed + is_debug = "--debug" in sys.argv[1:] + + if is_debug: + traceback.print_tb(sys.exc_info()[2]) + + print_msg(Message(MsgText.UncaughtException, MsgType.ERROR, {"exception": e})) return 1 diff --git a/jrnl/commands.py b/jrnl/commands.py index d765242a..c795402a 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -13,7 +13,10 @@ avoid any possible overhead for these standalone commands. """ import platform import sys -from .exception import JrnlError +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType def preconfig_diagnostic(_): @@ -70,10 +73,15 @@ def postconfig_encrypt(args, config, original_config, **kwargs): journal = open_journal(args.journal_name, config) if hasattr(journal, "can_be_encrypted") and not journal.can_be_encrypted: - raise JrnlError( - "CannotEncryptJournalType", - journal_name=args.journal_name, - journal_type=journal.__class__.__name__, + raise JrnlException( + Message( + MsgText.CannotEncryptJournalType, + MsgType.ERROR, + { + "journal_name": args.journal_name, + "journal_type": journal.__class__.__name__, + }, + ) ) journal.config["encrypt"] = True diff --git a/jrnl/config.py b/jrnl/config.py index b38b6cef..e1929a1d 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -7,7 +7,11 @@ import yaml import xdg.BaseDirectory from . import __version__ -from .exception import JrnlError +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType + from .color import ERROR_COLOR from .color import RESET_COLOR from .output import list_journals @@ -68,12 +72,18 @@ def get_config_path(): try: config_directory_path = xdg.BaseDirectory.save_config_path(XDG_RESOURCE) except FileExistsError: - raise JrnlError( - "ConfigDirectoryIsFile", - config_directory_path=os.path.join( - xdg.BaseDirectory.xdg_config_home, XDG_RESOURCE + raise JrnlException( + Message( + MsgText.ConfigDirectoryIsFile, + MsgType.ERROR, + { + "config_directory_path": os.path.join( + xdg.BaseDirectory.xdg_config_home, XDG_RESOURCE + ) + }, ), ) + return os.path.join( config_directory_path or os.path.expanduser("~"), DEFAULT_CONFIG_NAME ) diff --git a/jrnl/editor.py b/jrnl/editor.py index 7c7413e8..81ca659a 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -6,10 +6,16 @@ import tempfile import textwrap from pathlib import Path -from .color import ERROR_COLOR -from .color import RESET_COLOR -from .os_compat import on_windows -from .os_compat import split_args +from jrnl.color import ERROR_COLOR +from jrnl.color import RESET_COLOR +from jrnl.os_compat import on_windows +from jrnl.os_compat import split_args +from jrnl.output import print_msg + +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType def get_text_from_editor(config, template=""): @@ -47,16 +53,25 @@ def get_text_from_editor(config, template=""): def get_text_from_stdin(): - _how_to_quit = "Ctrl+z and then Enter" if on_windows() else "Ctrl+d" - print( - f"[Writing Entry; on a blank line, press {_how_to_quit} to finish writing]\n", - file=sys.stderr, + print_msg( + Message( + MsgText.WritingEntryStart, + MsgType.TITLE, + { + "how_to_quit": MsgText.HowToQuitWindows + if on_windows() + else MsgText.HowToQuitLinux + }, + ) ) + try: raw = sys.stdin.read() except KeyboardInterrupt: logging.error("Write mode: keyboard interrupt") - print("[Entry NOT saved to journal]", file=sys.stderr) - sys.exit(0) + raise JrnlException( + Message(MsgText.KeyboardInterruptMsg, MsgType.ERROR), + Message(MsgText.JournalNotSaved, MsgType.WARNING), + ) return raw diff --git a/jrnl/exception.py b/jrnl/exception.py index 0bafbdeb..76da211d 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -1,6 +1,7 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import textwrap +from jrnl.messages import Message +from jrnl.output import print_msg class UserAbort(Exception): @@ -13,40 +14,12 @@ class UpgradeValidationException(Exception): pass -class JrnlError(Exception): +class JrnlException(Exception): """Common exceptions raised by jrnl.""" - def __init__(self, error_type, **kwargs): - self.error_type = error_type - self.message = self._get_error_message(**kwargs) + def __init__(self, *messages: Message): + self.messages = messages - def _get_error_message(self, **kwargs): - error_messages = { - "ConfigDirectoryIsFile": """ - The path to your jrnl configuration directory is a file, not a directory: - - {config_directory_path} - - Removing this file will allow jrnl to save its configuration. - """, - "LineWrapTooSmallForDateFormat": """ - The provided linewrap value of {config_linewrap} is too small by - {columns} columns to display the timestamps in the configured time - format for journal {journal}. - - You can avoid this error by specifying a linewrap value that is larger - by at least {columns} in the configuration file or by using - --config-override at the command line - """, - "CannotEncryptJournalType": """ - The journal {journal_name} can't be encrypted because it is a - {journal_type} journal. - - To encrypt it, create a new journal referencing a file, export - this journal to the new journal, then encrypt the new journal. - """, - } - - msg = error_messages[self.error_type].format(**kwargs) - msg = textwrap.dedent(msg) - return msg + def print(self) -> None: + for msg in self.messages: + print_msg(msg) diff --git a/jrnl/messages.py b/jrnl/messages.py new file mode 100644 index 00000000..eed0cbae --- /dev/null +++ b/jrnl/messages.py @@ -0,0 +1,79 @@ +from enum import Enum +from typing import NamedTuple +from typing import Mapping + + +class _MsgColor(NamedTuple): + # This is a colorama color, and colorama doesn't support enums or type hints + # see: https://github.com/tartley/colorama/issues/91 + color: str + + +class MsgType(Enum): + TITLE = _MsgColor("cyan") + NORMAL = _MsgColor("white") + WARNING = _MsgColor("yellow") + ERROR = _MsgColor("red") + + @property + def color(self) -> _MsgColor: + return self.value.color + + +class MsgText(Enum): + def __str__(self) -> str: + return self.value + + # --- Exceptions ---# + UncaughtException = """ + ERROR + {exception} + + This is probably a bug. Please file an issue at: + https://github.com/jrnl-org/jrnl/issues/new/choose + """ + + ConfigDirectoryIsFile = """ + The path to your jrnl configuration directory is a file, not a directory: + + {config_directory_path} + + Removing this file will allow jrnl to save its configuration. + """ + + LineWrapTooSmallForDateFormat = """ + The provided linewrap value of {config_linewrap} is too small by + {columns} columns to display the timestamps in the configured time + format for journal {journal}. + + You can avoid this error by specifying a linewrap value that is larger + by at least {columns} in the configuration file or by using + --config-override at the command line + """ + + CannotEncryptJournalType = """ + The journal {journal_name} can't be encrypted because it is a + {journal_type} journal. + + To encrypt it, create a new journal referencing a file, export + this journal to the new journal, then encrypt the new journal. + """ + + KeyboardInterruptMsg = "Aborted by user" + + # --- Journal status ---# + JournalNotSaved = "Entry NOT saved to journal" + + # --- Editor ---# + WritingEntryStart = """ + Writing Entry + To finish writing, press {how_to_quit} on a blank line. + """ + HowToQuitWindows = "Ctrl+z and then Enter" + HowToQuitLinux = "Ctrl+d" + + +class Message(NamedTuple): + text: MsgText + type: MsgType = MsgType.NORMAL + params: Mapping = {} diff --git a/jrnl/output.py b/jrnl/output.py index 60c5d5aa..4f28b96a 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -2,14 +2,16 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html import logging +import sys +import textwrap + +from jrnl.color import colorize +from jrnl.color import RESET_COLOR +from jrnl.color import WARNING_COLOR +from jrnl.messages import Message def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs): - import sys - import textwrap - - from .color import RESET_COLOR - from .color import WARNING_COLOR warning_msg = f""" The command {old_cmd} is deprecated and will be removed from jrnl soon. @@ -34,3 +36,16 @@ def list_journals(configuration): journal, ml, cfg["journal"] if isinstance(cfg, dict) else cfg ) return result + + +def print_msg(msg: Message): + msg_text = textwrap.dedent(msg.text.value.format(**msg.params)).strip().split("\n") + + longest_string = len(max(msg_text, key=len)) + msg_text = [f"[ {line:<{longest_string}} ]" for line in msg_text] + + # colorize can't be called until after the lines are padded, + # because python gets confused by the ansi color codes + msg_text[0] = f"[{colorize(msg_text[0][1:-1], msg.type.color)}]" + + print("\n".join(msg_text), file=sys.stderr) diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index 2cb27eca..c3dbc467 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -2,7 +2,10 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from jrnl.exception import JrnlError +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType from textwrap import TextWrapper from .text_exporter import TextExporter @@ -40,7 +43,7 @@ class FancyExporter(TextExporter): card = [ cls.border_a + cls.border_b * (initial_linewrap) + cls.border_c + date_str ] - check_provided_linewrap_viability(linewrap, card, entry.journal) + check_provided_linewrap_viability(linewrap, card, entry.journal.name) w = TextWrapper( width=initial_linewrap, @@ -84,9 +87,14 @@ class FancyExporter(TextExporter): def check_provided_linewrap_viability(linewrap, card, journal): if len(card[0]) > linewrap: width_violation = len(card[0]) - linewrap - raise JrnlError( - "LineWrapTooSmallForDateFormat", - config_linewrap=linewrap, - columns=width_violation, - journal=journal, + raise JrnlException( + Message( + MsgText.LineWrapTooSmallForDateFormat, + MsgType.NORMAL, + { + "config_linewrap": linewrap, + "columns": width_violation, + "journal": journal, + }, + ) ) diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 5ed1d44b..062c5fef 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -1,6 +1,6 @@ Feature: Writing new entries. - Scenario Outline: Multiline entry with punctuation should keep title punctuation + Scenario Outline: Multiline entry with punctuation should keep title punctuation Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl This is. the title\\n This is the second line" @@ -96,7 +96,7 @@ Feature: Writing new entries. When we run "jrnl --config-override editor ''" and enter "" Then the stdin prompt should have been called And the output should be empty - And the error output should contain "Writing Entry; on a blank line" + And the error output should contain "To finish writing, press" And the editor should not have been called Examples: configs diff --git a/tests/unit/test_exception.py b/tests/unit/test_exception.py deleted file mode 100644 index 1fee1982..00000000 --- a/tests/unit/test_exception.py +++ /dev/null @@ -1,19 +0,0 @@ -import textwrap - -from jrnl.exception import JrnlError - - -def test_config_directory_exception_message(): - ex = JrnlError( - "ConfigDirectoryIsFile", config_directory_path="/config/directory/path" - ) - - assert ex.message == textwrap.dedent( - """ - The path to your jrnl configuration directory is a file, not a directory: - - /config/directory/path - - Removing this file will allow jrnl to save its configuration. - """ - ) diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index 8bc1b410..05c29a1f 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -1,6 +1,7 @@ import pytest -from jrnl.exception import JrnlError +from jrnl.exception import JrnlException + from jrnl.plugins.fancy_exporter import check_provided_linewrap_viability @@ -23,6 +24,5 @@ class TestFancy: total_linewrap = 12 - with pytest.raises(JrnlError) as e: + with pytest.raises(JrnlException): check_provided_linewrap_viability(total_linewrap, [content], journal) - assert e.value.error_type == "LineWrapTooSmallForDateFormat" From e46b5a171f5e819007c5836ef42378296de73451 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 12 Mar 2022 13:14:26 -0800 Subject: [PATCH 0590/1132] Fix tests for daylight savings (#1423) * fix test failing because tomorrow is daylight savings * add test for newly discovered daylight savings issue (and skip for now) * whitespace change * update title of test * fix copypasta --- tests/bdd/features/datetime.feature | 26 ++++++++++++++++++++++++++ tests/bdd/features/search.feature | 1 + 2 files changed, 27 insertions(+) diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index 167dcf33..7676f1b2 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -83,6 +83,7 @@ Feature: Reading and writing to journal with custom date formats Then the output should not contain "Life is good" And the output should not contain "But I'm better." + Scenario Outline: Create entry using day of the week as entry date one. Given we use the config "simple.yaml" And now is "2019-03-12 01:30:32 PM" @@ -172,3 +173,28 @@ Feature: Reading and writing to journal with custom date formats Then we should get no error And the output should be 2013-10-27 03:27 Some text. + + + @skip #1422 + Scenario Outline: Using "tomorrow" near daylight savings works in Dayone journals + Given we use the config "dayone.yaml" + And now is "" + When we run "jrnl yesterday: This thing happened yesterday" + Then the output should contain "Entry added" + When we run "jrnl today at 11:59pm: Adding an entry right now." + Then the output should contain "Entry added" + When we run "jrnl tomorrow: A future entry." + Then the output should contain "Entry added" + When we run "jrnl -from yesterday -to today" + Then the output should contain "This thing happened yesterday" + And the output should contain "Adding an entry right now." + And the output should not contain "A future entry." + + Examples: Dates + | date | + | 2022-02-10 01:00:00 PM | + | 2021-03-13 01:00:00 PM | + | 2021-11-06 01:00:00 PM | + | 2022-03-12 01:00:00 PM | + | 2022-11-05 01:00:00 PM | + diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index d52273f6..44e8dc6d 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -36,6 +36,7 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -from and -to day should display correct entries Given we use the config "" + And now is "2022-03-10 02:32:00 PM" When we run "jrnl yesterday: This thing happened yesterday" Then the output should contain "Entry added" When we run "jrnl today at 11:59pm: Adding an entry right now." From d3de5b778bfa6c523b4510cd5ae0917b684e921b Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 12 Mar 2022 13:24:31 -0800 Subject: [PATCH 0591/1132] Replace PyYAML with ruamel.yaml (#1416) * Remove Python 3.7 and 3.8 from github actions workflows * Update lockfile after running poetry update a couple times * Update poetry lock * Remove Python 3.7 and 3.8 from pyproject.toml and run poetry lock * Switch from pyyaml to ruamel.yaml * Remove duplicate editor key in config * Use ruamel.yaml instead of pyyaml in legacy template.py * Prevent ruamel from collapsing config YAML * Run make format --- jrnl/config.py | 21 +- jrnl/plugins/template.py | 4 +- poetry.lock | 249 ++++++++++-------- pyproject.toml | 2 +- .../configs/editor_markdown_extension.yaml | 1 - tests/lib/then_steps.py | 6 +- 6 files changed, 154 insertions(+), 129 deletions(-) diff --git a/jrnl/config.py b/jrnl/config.py index e1929a1d..63de0586 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -3,7 +3,7 @@ import os import sys import colorama -import yaml +from ruamel.yaml import YAML import xdg.BaseDirectory from . import __version__ @@ -46,7 +46,8 @@ def make_yaml_valid_dict(input: list) -> dict: # yaml compatible strings are of the form Key:Value yamlstr = YAML_SEPARATOR.join(input) - runtime_modifications = yaml.load(yamlstr, Loader=yaml.SafeLoader) + + runtime_modifications = YAML(typ="safe").load(yamlstr) return runtime_modifications @@ -54,18 +55,16 @@ def make_yaml_valid_dict(input: list) -> dict: def save_config(config, alt_config_path=None): """Supply alt_config_path if using an alternate config through --config-file.""" config["version"] = __version__ + + yaml = YAML(typ="safe") + yaml.default_flow_style = False # prevents collapsing of tree structure + with open( alt_config_path if alt_config_path else get_config_path(), "w", encoding=YAML_FILE_ENCODING, ) as f: - yaml.safe_dump( - config, - f, - encoding=YAML_FILE_ENCODING, - allow_unicode=True, - default_flow_style=False, - ) + yaml.dump(config, f) def get_config_path(): @@ -160,7 +159,9 @@ def verify_config_colors(config): def load_config(config_path): """Tries to load a config file from YAML.""" with open(config_path, encoding=YAML_FILE_ENCODING) as f: - return yaml.load(f, Loader=yaml.SafeLoader) + yaml = YAML(typ="safe") + yaml.allow_duplicate_keys = True + return yaml.load(f) def is_config_json(config_path): diff --git a/jrnl/plugins/template.py b/jrnl/plugins/template.py index cb852471..206eaf13 100644 --- a/jrnl/plugins/template.py +++ b/jrnl/plugins/template.py @@ -3,7 +3,7 @@ import re -import yaml +from ruamel.yaml import YAML VAR_RE = r"[_a-zA-Z][a-zA-Z0-9_]*" EXPRESSION_RE = r"[\[\]():.a-zA-Z0-9_]*" @@ -26,7 +26,7 @@ class Template: def from_file(cls, filename): with open(filename) as f: front_matter, body = f.read().strip("-\n").split("---", 2) - front_matter = yaml.load(front_matter, Loader=yaml.SafeLoader) + front_matter = YAML(typ="safe").load(front_matter) template = cls(body) template.__dict__.update(front_matter) return template diff --git a/poetry.lock b/poetry.lock index 80bcb2d1..59abc6c5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -115,7 +115,7 @@ pycparser = "*" [[package]] name = "click" -version = "8.0.3" +version = "8.0.4" description = "Composable command line interface toolkit" category = "dev" optional = false @@ -172,7 +172,7 @@ python-versions = ">=3.5" [[package]] name = "executing" -version = "0.8.2" +version = "0.8.3" description = "Get the currently executing AST node of a frame, and other information" category = "dev" optional = false @@ -215,7 +215,7 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.11.0" +version = "4.11.2" description = "Read metadata from Python packages" category = "main" optional = false @@ -225,9 +225,9 @@ python-versions = ">=3.7" zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -252,7 +252,7 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "8.0.1" +version = "8.1.1" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -261,7 +261,6 @@ python-versions = ">=3.8" [package.dependencies] appnope = {version = "*", markers = "sys_platform == \"darwin\""} backcall = "*" -black = "*" colorama = {version = "*", markers = "sys_platform == \"win32\""} decorator = "*" jedi = ">=0.16" @@ -269,21 +268,22 @@ matplotlib-inline = "*" pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" -pygments = "*" +pygments = ">=2.4.0" stack-data = "*" traitlets = ">=5" [package.extras] -all = ["Sphinx (>=1.3)", "curio", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.19)", "pandas", "pygments", "pytest", "pytest-asyncio", "qtconsole", "testpath", "trio"] +all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "pytest", "testpath", "trio", "pytest-asyncio"] +black = ["black"] doc = ["Sphinx (>=1.3)"] kernel = ["ipykernel"] nbconvert = ["nbconvert"] nbformat = ["nbformat"] -notebook = ["notebook", "ipywidgets"] +notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["pytest", "pytest-asyncio", "testpath", "pygments"] -test_extra = ["pytest", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "pygments", "trio"] +test = ["pytest", "pytest-asyncio", "testpath"] +test_extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "pytest", "testpath", "trio"] [[package]] name = "jedi" @@ -346,11 +346,11 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [[package]] name = "mako" -version = "1.1.6" -description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +version = "1.2.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.7" [package.dependencies] MarkupSafe = ">=0.9.2" @@ -358,6 +358,7 @@ MarkupSafe = ">=0.9.2" [package.extras] babel = ["babel"] lingua = ["lingua"] +testing = ["pytest"] [[package]] name = "markdown" @@ -375,11 +376,11 @@ testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" -version = "2.0.1" +version = "2.1.0" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "matplotlib-inline" @@ -523,7 +524,7 @@ python-versions = "*" [[package]] name = "platformdirs" -version = "2.5.0" +version = "2.5.1" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false @@ -735,7 +736,7 @@ python-versions = "*" name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -752,20 +753,42 @@ pyyaml = "*" [[package]] name = "rich" -version = "11.2.0" +version = "12.0.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false python-versions = ">=3.6.2,<4.0.0" [package.dependencies] -colorama = ">=0.4.0,<0.5.0" commonmark = ">=0.9.0,<0.10.0" pygments = ">=2.6.0,<3.0.0" [package.extras] jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] +[[package]] +name = "ruamel.yaml" +version = "0.17.21" +description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" +category = "main" +optional = false +python-versions = ">=3" + +[package.dependencies] +"ruamel.yaml.clib" = {version = ">=0.2.6", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.11\""} + +[package.extras] +docs = ["ryd"] +jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] + +[[package]] +name = "ruamel.yaml.clib" +version = "0.2.6" +description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" +category = "main" +optional = false +python-versions = ">=3.5" + [[package]] name = "secretstorage" version = "3.3.1" @@ -788,7 +811,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "stack-data" -version = "0.1.4" +version = "0.2.0" description = "Extract data from python stack frames and tracebacks for informative displays" category = "dev" optional = false @@ -800,7 +823,7 @@ executing = "*" pure-eval = "*" [package.extras] -tests = ["pytest", "typeguard", "pygments", "littleutils"] +tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] [[package]] name = "textwrap3" @@ -839,7 +862,7 @@ test = ["pytest"] [[package]] name = "typing-extensions" -version = "4.1.0" +version = "4.1.1" description = "Backported and Experimental Type Hints for Python 3.6+" category = "dev" optional = false @@ -918,7 +941,7 @@ testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "0e9f028c0123632b42e13e961abc5f2779597b3ffdd14af8624534e0a184b794" +content-hash = "8393124bac95ba61eb1a3590f5ed97d938d7b3637ea1dc19e0baacfc1ccab093" [metadata.files] ansiwrap = [ @@ -1030,8 +1053,8 @@ cffi = [ {file = "cffi-1.15.0.tar.gz", hash = "sha256:920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"}, ] click = [ - {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, - {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, + {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, + {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -1068,8 +1091,8 @@ decorator = [ {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] executing = [ - {file = "executing-0.8.2-py2.py3-none-any.whl", hash = "sha256:32fc6077b103bd19e6494a72682d66d5763cf20a106d5aa7c5ccbea4e47b0df7"}, - {file = "executing-0.8.2.tar.gz", hash = "sha256:c23bf42e9a7b9b212f185b1b2c3c91feb895963378887bb10e64a2e612ec0023"}, + {file = "executing-0.8.3-py2.py3-none-any.whl", hash = "sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9"}, + {file = "executing-0.8.3.tar.gz", hash = "sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501"}, ] flake8 = [ {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, @@ -1083,8 +1106,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.11.0-py3-none-any.whl", hash = "sha256:6affcdb3aec542dd98df8211e730bba6c5f2bec8288d47bacacde898f548c9ad"}, - {file = "importlib_metadata-4.11.0.tar.gz", hash = "sha256:9e5e553bbba1843cb4a00823014b907616be46ee503d2b9ba001d214a8da218f"}, + {file = "importlib_metadata-4.11.2-py3-none-any.whl", hash = "sha256:d16e8c1deb60de41b8e8ed21c1a7b947b0bc62fab7e1d470bcdf331cea2e6735"}, + {file = "importlib_metadata-4.11.2.tar.gz", hash = "sha256:b36ffa925fe3139b2f6ff11d6925ffd4fa7bc47870165e3ac260ac7b4f91e6ac"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1094,8 +1117,8 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-8.0.1-py3-none-any.whl", hash = "sha256:c503a0dd6ccac9c8c260b211f2dd4479c042b49636b097cc9a0d55fe62dff64c"}, - {file = "ipython-8.0.1.tar.gz", hash = "sha256:ab564d4521ea8ceaac26c3a2c6e5ddbca15c8848fd5a5cc325f960da88d42974"}, + {file = "ipython-8.1.1-py3-none-any.whl", hash = "sha256:6f56bfaeaa3247aa3b9cd3b8cbab3a9c0abf7428392f97b21902d12b2f42a381"}, + {file = "ipython-8.1.1.tar.gz", hash = "sha256:8138762243c9b3a3ffcf70b37151a2a35c23d3a29f9743878c33624f4207be3d"}, ] jedi = [ {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, @@ -1114,83 +1137,54 @@ keyring = [ {file = "keyring-23.5.0.tar.gz", hash = "sha256:9012508e141a80bd1c0b6778d5c610dd9f8c464d75ac6774248500503f972fb9"}, ] mako = [ - {file = "Mako-1.1.6-py2.py3-none-any.whl", hash = "sha256:afaf8e515d075b22fad7d7b8b30e4a1c90624ff2f3733a06ec125f5a5f043a57"}, - {file = "Mako-1.1.6.tar.gz", hash = "sha256:4e9e345a41924a954251b95b4b28e14a301145b544901332e658907a7464b6b2"}, + {file = "Mako-1.2.0-py3-none-any.whl", hash = "sha256:23aab11fdbbb0f1051b93793a58323ff937e98e34aece1c4219675122e57e4ba"}, + {file = "Mako-1.2.0.tar.gz", hash = "sha256:9a7c7e922b87db3686210cf49d5d767033a41d4010b284e747682c92bddd8b39"}, ] markdown = [ {file = "Markdown-3.3.6-py3-none-any.whl", hash = "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3"}, {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3028252424c72b2602a323f70fbf50aa80a5d3aa616ea6add4ba21ae9cc9da4c"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:290b02bab3c9e216da57c1d11d2ba73a9f73a614bbdcc027d299a60cdfabb11a"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e104c0c2b4cd765b4e83909cde7ec61a1e313f8a75775897db321450e928cce"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24c3be29abb6b34052fd26fc7a8e0a49b1ee9d282e3665e8ad09a0a68faee5b3"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204730fd5fe2fe3b1e9ccadb2bd18ba8712b111dcabce185af0b3b5285a7c989"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d3b64c65328cb4cd252c94f83e66e3d7acf8891e60ebf588d7b493a55a1dbf26"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:96de1932237abe0a13ba68b63e94113678c379dca45afa040a17b6e1ad7ed076"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:75bb36f134883fdbe13d8e63b8675f5f12b80bb6627f7714c7d6c5becf22719f"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-win32.whl", hash = "sha256:4056f752015dfa9828dce3140dbadd543b555afb3252507348c493def166d454"}, + {file = "MarkupSafe-2.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:d4e702eea4a2903441f2735799d217f4ac1b55f7d8ad96ab7d4e25417cb0827c"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f0eddfcabd6936558ec020130f932d479930581171368fd728efcfb6ef0dd357"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ddea4c352a488b5e1069069f2f501006b1a4362cb906bee9a193ef1245a7a61"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:09c86c9643cceb1d87ca08cdc30160d1b7ab49a8a21564868921959bd16441b8"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0a0abef2ca47b33fb615b491ce31b055ef2430de52c5b3fb19a4042dbc5cadb"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:736895a020e31b428b3382a7887bfea96102c529530299f426bf2e636aacec9e"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:679cbb78914ab212c49c67ba2c7396dc599a8479de51b9a87b174700abd9ea49"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:84ad5e29bf8bab3ad70fd707d3c05524862bddc54dc040982b0dbcff36481de7"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-win32.whl", hash = "sha256:8da5924cb1f9064589767b0f3fc39d03e3d0fb5aa29e0cb21d43106519bd624a"}, + {file = "MarkupSafe-2.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:454ffc1cbb75227d15667c09f164a0099159da0c1f3d2636aa648f12675491ad"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:142119fb14a1ef6d758912b25c4e803c3ff66920635c44078666fe7cc3f8f759"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b2a5a856019d2833c56a3dcac1b80fe795c95f401818ea963594b345929dffa7"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d1fb9b2eec3c9714dd936860850300b51dbaa37404209c8d4cb66547884b7ed"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:62c0285e91414f5c8f621a17b69fc0088394ccdaa961ef469e833dbff64bd5ea"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc3150f85e2dbcf99e65238c842d1cfe69d3e7649b19864c1cc043213d9cd730"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f02cf7221d5cd915d7fa58ab64f7ee6dd0f6cddbb48683debf5d04ae9b1c2cc1"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d5653619b3eb5cbd35bfba3c12d575db2a74d15e0e1c08bf1db788069d410ce8"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7d2f5d97fcbd004c03df8d8fe2b973fe2b14e7bfeb2cfa012eaa8759ce9a762f"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-win32.whl", hash = "sha256:3cace1837bc84e63b3fd2dfce37f08f8c18aeb81ef5cf6bb9b51f625cb4e6cd8"}, + {file = "MarkupSafe-2.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:fabbe18087c3d33c5824cb145ffca52eccd053061df1d79d4b66dafa5ad2a5ea"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:023af8c54fe63530545f70dd2a2a7eed18d07a9a77b94e8bf1e2ff7f252db9a3"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d66624f04de4af8bbf1c7f21cc06649c1c69a7f84109179add573ce35e46d448"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c532d5ab79be0199fa2658e24a02fce8542df196e60665dd322409a03db6a52c"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67ec74fada3841b8c5f4c4f197bea916025cb9aa3fe5abf7d52b655d042f956"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c653fde75a6e5eb814d2a0a89378f83d1d3f502ab710904ee585c38888816c"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:961eb86e5be7d0973789f30ebcf6caab60b844203f4396ece27310295a6082c7"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:598b65d74615c021423bd45c2bc5e9b59539c875a9bdb7e5f2a6b92dfcfc268d"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:599941da468f2cf22bf90a84f6e2a65524e87be2fce844f96f2dd9a6c9d1e635"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-win32.whl", hash = "sha256:e6f7f3f41faffaea6596da86ecc2389672fa949bd035251eab26dc6697451d05"}, + {file = "MarkupSafe-2.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:b8811d48078d1cf2a6863dafb896e68406c5f513048451cd2ded0473133473c7"}, + {file = "MarkupSafe-2.1.0.tar.gz", hash = "sha256:80beaf63ddfbc64a0452b841d8036ca0611e049650e20afcb882f5d3c266d65f"}, ] matplotlib-inline = [ {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, @@ -1244,8 +1238,8 @@ pickleshare = [ {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, ] platformdirs = [ - {file = "platformdirs-2.5.0-py3-none-any.whl", hash = "sha256:30671902352e97b1eafd74ade8e4a694782bd3471685e78c32d0fdfd3aa7e7bb"}, - {file = "platformdirs-2.5.0.tar.gz", hash = "sha256:8ec11dfba28ecc0715eb5fb0147a87b1bf325f349f3da9aab2cd6b50b96b692b"}, + {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, + {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, @@ -1362,8 +1356,39 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] rich = [ - {file = "rich-11.2.0-py3-none-any.whl", hash = "sha256:d5f49ad91fb343efcae45a2b2df04a9755e863e50413623ab8c9e74f05aee52b"}, - {file = "rich-11.2.0.tar.gz", hash = "sha256:1a6266a5738115017bb64a66c59c717e7aa047b3ae49a011ede4abdeffc6536e"}, + {file = "rich-12.0.0-py3-none-any.whl", hash = "sha256:fdcd2f8d416e152bcf35c659987038d1ae5a7bd336e821ca7551858a4c7e38a9"}, + {file = "rich-12.0.0.tar.gz", hash = "sha256:14bfd0507edc633e021b02c45cbf7ca22e33b513817627b8de3412f047a3e798"}, +] +"ruamel.yaml" = [ + {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, + {file = "ruamel.yaml-0.17.21.tar.gz", hash = "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af"}, +] +"ruamel.yaml.clib" = [ + {file = "ruamel.yaml.clib-0.2.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6e7be2c5bcb297f5b82fee9c665eb2eb7001d1050deaba8471842979293a80b0"}, + {file = "ruamel.yaml.clib-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:221eca6f35076c6ae472a531afa1c223b9c29377e62936f61bc8e6e8bdc5f9e7"}, + {file = "ruamel.yaml.clib-0.2.6-cp310-cp310-win32.whl", hash = "sha256:1070ba9dd7f9370d0513d649420c3b362ac2d687fe78c6e888f5b12bf8bc7bee"}, + {file = "ruamel.yaml.clib-0.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:77df077d32921ad46f34816a9a16e6356d8100374579bc35e15bab5d4e9377de"}, + {file = "ruamel.yaml.clib-0.2.6-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:cfdb9389d888c5b74af297e51ce357b800dd844898af9d4a547ffc143fa56751"}, + {file = "ruamel.yaml.clib-0.2.6-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7b2927e92feb51d830f531de4ccb11b320255ee95e791022555971c466af4527"}, + {file = "ruamel.yaml.clib-0.2.6-cp35-cp35m-win32.whl", hash = "sha256:ada3f400d9923a190ea8b59c8f60680c4ef8a4b0dfae134d2f2ff68429adfab5"}, + {file = "ruamel.yaml.clib-0.2.6-cp35-cp35m-win_amd64.whl", hash = "sha256:de9c6b8a1ba52919ae919f3ae96abb72b994dd0350226e28f3686cb4f142165c"}, + {file = "ruamel.yaml.clib-0.2.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d67f273097c368265a7b81e152e07fb90ed395df6e552b9fa858c6d2c9f42502"}, + {file = "ruamel.yaml.clib-0.2.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:72a2b8b2ff0a627496aad76f37a652bcef400fd861721744201ef1b45199ab78"}, + {file = "ruamel.yaml.clib-0.2.6-cp36-cp36m-win32.whl", hash = "sha256:9efef4aab5353387b07f6b22ace0867032b900d8e91674b5d8ea9150db5cae94"}, + {file = "ruamel.yaml.clib-0.2.6-cp36-cp36m-win_amd64.whl", hash = "sha256:846fc8336443106fe23f9b6d6b8c14a53d38cef9a375149d61f99d78782ea468"}, + {file = "ruamel.yaml.clib-0.2.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0847201b767447fc33b9c235780d3aa90357d20dd6108b92be544427bea197dd"}, + {file = "ruamel.yaml.clib-0.2.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:78988ed190206672da0f5d50c61afef8f67daa718d614377dcd5e3ed85ab4a99"}, + {file = "ruamel.yaml.clib-0.2.6-cp37-cp37m-win32.whl", hash = "sha256:a49e0161897901d1ac9c4a79984b8410f450565bbad64dbfcbf76152743a0cdb"}, + {file = "ruamel.yaml.clib-0.2.6-cp37-cp37m-win_amd64.whl", hash = "sha256:bf75d28fa071645c529b5474a550a44686821decebdd00e21127ef1fd566eabe"}, + {file = "ruamel.yaml.clib-0.2.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a32f8d81ea0c6173ab1b3da956869114cae53ba1e9f72374032e33ba3118c233"}, + {file = "ruamel.yaml.clib-0.2.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7f7ecb53ae6848f959db6ae93bdff1740e651809780822270eab111500842a84"}, + {file = "ruamel.yaml.clib-0.2.6-cp38-cp38-win32.whl", hash = "sha256:89221ec6d6026f8ae859c09b9718799fea22c0e8da8b766b0b2c9a9ba2db326b"}, + {file = "ruamel.yaml.clib-0.2.6-cp38-cp38-win_amd64.whl", hash = "sha256:31ea73e564a7b5fbbe8188ab8b334393e06d997914a4e184975348f204790277"}, + {file = "ruamel.yaml.clib-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dc6a613d6c74eef5a14a214d433d06291526145431c3b964f5e16529b1842bed"}, + {file = "ruamel.yaml.clib-0.2.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:1866cf2c284a03b9524a5cc00daca56d80057c5ce3cdc86a52020f4c720856f0"}, + {file = "ruamel.yaml.clib-0.2.6-cp39-cp39-win32.whl", hash = "sha256:3fb9575a5acd13031c57a62cc7823e5d2ff8bc3835ba4d94b921b4e6ee664104"}, + {file = "ruamel.yaml.clib-0.2.6-cp39-cp39-win_amd64.whl", hash = "sha256:825d5fccef6da42f3c8eccd4281af399f21c02b32d98e113dbc631ea6a6ecbc7"}, + {file = "ruamel.yaml.clib-0.2.6.tar.gz", hash = "sha256:4ff604ce439abb20794f05613c374759ce10e3595d1867764dd1ae675b85acbd"}, ] secretstorage = [ {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, @@ -1374,8 +1399,8 @@ six = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] stack-data = [ - {file = "stack_data-0.1.4-py3-none-any.whl", hash = "sha256:02cc0683cbc445ae4ca8c4e3a0e58cb1df59f252efb0aa016b34804a707cf9bc"}, - {file = "stack_data-0.1.4.tar.gz", hash = "sha256:7769ed2482ce0030e00175dd1bf4ef1e873603b6ab61cd3da443b410e64e9477"}, + {file = "stack_data-0.2.0-py3-none-any.whl", hash = "sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e"}, + {file = "stack_data-0.2.0.tar.gz", hash = "sha256:45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12"}, ] textwrap3 = [ {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, @@ -1394,8 +1419,8 @@ traitlets = [ {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, ] typing-extensions = [ - {file = "typing_extensions-4.1.0-py3-none-any.whl", hash = "sha256:c13180fbaa7cd97065a4915ceba012bdb31dc34743e63ddee16360161d358414"}, - {file = "typing_extensions-4.1.0.tar.gz", hash = "sha256:ba97c5143e5bb067b57793c726dd857b1671d4b02ced273ca0538e71ff009095"}, + {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, + {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, ] tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, diff --git a/pyproject.toml b/pyproject.toml index 2c23050d..3d04c956 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ keyring = ">=21.0" # https://github.com/jaraco/keyring#integration parsedatetime = ">=2.6" python-dateutil = "^2.8" # https://github.com/dateutil/dateutil/blob/master/RELEASING pyxdg = ">=0.27.0" -pyyaml = ">=5.1" +"ruamel.yaml" = "^0.17.21" # dayone-only deps pytz = ">=2020" # https://pythonhosted.org/pytz/#issues-limitations diff --git a/tests/data/configs/editor_markdown_extension.yaml b/tests/data/configs/editor_markdown_extension.yaml index bf3b8d8e..48d67093 100644 --- a/tests/data/configs/editor_markdown_extension.yaml +++ b/tests/data/configs/editor_markdown_extension.yaml @@ -1,6 +1,5 @@ default_hour: 9 default_minute: 0 -editor: "" encrypt: false highlight: true editor: "vim" diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 0464158f..4ef1681b 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -8,7 +8,7 @@ from xml.etree import ElementTree from pytest_bdd import then from pytest_bdd.parsers import parse -import yaml +from ruamel.yaml import YAML from jrnl.config import scope_config @@ -121,7 +121,7 @@ def config_var_on_disk(config_on_disk, journal_name, should_or_should_not, some_ if journal_name: actual = actual["journals"][journal_name] - expected = yaml.load(some_yaml, Loader=yaml.SafeLoader) + expected = YAML(typ="safe").load(some_yaml) actual_slice = actual if type(actual) is dict: @@ -152,7 +152,7 @@ def config_var_in_memory( if journal_name: actual = actual["journals"][journal_name] - expected = yaml.load(some_yaml, Loader=yaml.SafeLoader) + expected = YAML(typ="safe").load(some_yaml) actual_slice = actual if type(actual) is dict: From 7a42800168875eb924c8d2db395cb10c8d3b9fb8 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 12 Mar 2022 21:26:01 +0000 Subject: [PATCH 0592/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f61581a..fb665a42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) - Bump yq from 2.13.0 to 2.14.0 [\#1418](https://github.com/jrnl-org/jrnl/pull/1418) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Replace PyYAML with ruamel.yaml [\#1416](https://github.com/jrnl-org/jrnl/pull/1416) ([micahellison](https://github.com/micahellison)) - Bump pytest from 6.2.5 to 7.0.0 [\#1407](https://github.com/jrnl-org/jrnl/pull/1407) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v2.8.4](https://pypi.org/project/jrnl/v2.8.4/) (2022-02-12) From 7cb8345e856c99f49f1747afdeb2b57dbee6adc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 19 Mar 2022 12:07:56 -0700 Subject: [PATCH 0593/1132] Bump cryptography from 36.0.1 to 36.0.2 (#1427) Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.1 to 36.0.2. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/36.0.1...36.0.2) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/poetry.lock b/poetry.lock index 59abc6c5..f96d9089 100644 --- a/poetry.lock +++ b/poetry.lock @@ -145,7 +145,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "36.0.1" +version = "36.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -1065,26 +1065,26 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-36.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:73bc2d3f2444bcfeac67dd130ff2ea598ea5f20b40e36d19821b4df8c9c5037b"}, - {file = "cryptography-36.0.1-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:2d87cdcb378d3cfed944dac30596da1968f88fb96d7fc34fdae30a99054b2e31"}, - {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74d6c7e80609c0f4c2434b97b80c7f8fdfaa072ca4baab7e239a15d6d70ed73a"}, - {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:6c0c021f35b421ebf5976abf2daacc47e235f8b6082d3396a2fe3ccd537ab173"}, - {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d59a9d55027a8b88fd9fd2826c4392bd487d74bf628bb9d39beecc62a644c12"}, - {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a817b961b46894c5ca8a66b599c745b9a3d9f822725221f0e0fe49dc043a3a3"}, - {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:94ae132f0e40fe48f310bba63f477f14a43116f05ddb69d6fa31e93f05848ae2"}, - {file = "cryptography-36.0.1-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7be0eec337359c155df191d6ae00a5e8bbb63933883f4f5dffc439dac5348c3f"}, - {file = "cryptography-36.0.1-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:e0344c14c9cb89e76eb6a060e67980c9e35b3f36691e15e1b7a9e58a0a6c6dc3"}, - {file = "cryptography-36.0.1-cp36-abi3-win32.whl", hash = "sha256:4caa4b893d8fad33cf1964d3e51842cd78ba87401ab1d2e44556826df849a8ca"}, - {file = "cryptography-36.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:391432971a66cfaf94b21c24ab465a4cc3e8bf4a939c1ca5c3e3a6e0abebdbcf"}, - {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb5829d027ff82aa872d76158919045a7c1e91fbf241aec32cb07956e9ebd3c9"}, - {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebc15b1c22e55c4d5566e3ca4db8689470a0ca2babef8e3a9ee057a8b82ce4b1"}, - {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:596f3cd67e1b950bc372c33f1a28a0692080625592ea6392987dba7f09f17a94"}, - {file = "cryptography-36.0.1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:30ee1eb3ebe1644d1c3f183d115a8c04e4e603ed6ce8e394ed39eea4a98469ac"}, - {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec63da4e7e4a5f924b90af42eddf20b698a70e58d86a72d943857c4c6045b3ee"}, - {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca238ceb7ba0bdf6ce88c1b74a87bffcee5afbfa1e41e173b1ceb095b39add46"}, - {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:ca28641954f767f9822c24e927ad894d45d5a1e501767599647259cbf030b903"}, - {file = "cryptography-36.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:39bdf8e70eee6b1c7b289ec6e5d84d49a6bfa11f8b8646b5b3dfe41219153316"}, - {file = "cryptography-36.0.1.tar.gz", hash = "sha256:53e5c1dc3d7a953de055d77bef2ff607ceef7a2aac0353b5d630ab67f7423638"}, + {file = "cryptography-36.0.2-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:4e2dddd38a5ba733be6a025a1475a9f45e4e41139d1321f412c6b360b19070b6"}, + {file = "cryptography-36.0.2-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:4881d09298cd0b669bb15b9cfe6166f16fc1277b4ed0d04a22f3d6430cb30f1d"}, + {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea634401ca02367c1567f012317502ef3437522e2fc44a3ea1844de028fa4b84"}, + {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:7be666cc4599b415f320839e36367b273db8501127b38316f3b9f22f17a0b815"}, + {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8241cac0aae90b82d6b5c443b853723bcc66963970c67e56e71a2609dc4b5eaf"}, + {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b2d54e787a884ffc6e187262823b6feb06c338084bbe80d45166a1cb1c6c5bf"}, + {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:c2c5250ff0d36fd58550252f54915776940e4e866f38f3a7866d92b32a654b86"}, + {file = "cryptography-36.0.2-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:ec6597aa85ce03f3e507566b8bcdf9da2227ec86c4266bd5e6ab4d9e0cc8dab2"}, + {file = "cryptography-36.0.2-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ca9f686517ec2c4a4ce930207f75c00bf03d94e5063cbc00a1dc42531511b7eb"}, + {file = "cryptography-36.0.2-cp36-abi3-win32.whl", hash = "sha256:f64b232348ee82f13aac22856515ce0195837f6968aeaa94a3d0353ea2ec06a6"}, + {file = "cryptography-36.0.2-cp36-abi3-win_amd64.whl", hash = "sha256:53e0285b49fd0ab6e604f4c5d9c5ddd98de77018542e88366923f152dbeb3c29"}, + {file = "cryptography-36.0.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:32db5cc49c73f39aac27574522cecd0a4bb7384e71198bc65a0d23f901e89bb7"}, + {file = "cryptography-36.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b3d199647468d410994dbeb8cec5816fb74feb9368aedf300af709ef507e3e"}, + {file = "cryptography-36.0.2-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:da73d095f8590ad437cd5e9faf6628a218aa7c387e1fdf67b888b47ba56a17f0"}, + {file = "cryptography-36.0.2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:0a3bf09bb0b7a2c93ce7b98cb107e9170a90c51a0162a20af1c61c765b90e60b"}, + {file = "cryptography-36.0.2-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8897b7b7ec077c819187a123174b645eb680c13df68354ed99f9b40a50898f77"}, + {file = "cryptography-36.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82740818f2f240a5da8dfb8943b360e4f24022b093207160c77cadade47d7c85"}, + {file = "cryptography-36.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:1f64a62b3b75e4005df19d3b5235abd43fa6358d5516cfc43d87aeba8d08dd51"}, + {file = "cryptography-36.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e167b6b710c7f7bc54e67ef593f8731e1f45aa35f8a8a7b72d6e42ec76afd4b3"}, + {file = "cryptography-36.0.2.tar.gz", hash = "sha256:70f8f4f7bb2ac9f340655cbac89d68c527af5bb4387522a8413e841e3e6628c9"}, ] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, From a1117918dd4e6e1dafd7a3737ebf9f79bc321195 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 19 Mar 2022 19:09:40 +0000 Subject: [PATCH 0594/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb665a42..bb95010d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...HEAD) +**Fixed bugs:** + +- Mac Installation Problem: Warning: Transient problem: HTTP error [\#1425](https://github.com/jrnl-org/jrnl/issues/1425) + **Build:** - Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) @@ -13,6 +17,7 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump cryptography from 36.0.1 to 36.0.2 [\#1427](https://github.com/jrnl-org/jrnl/pull/1427) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump yq from 2.13.0 to 2.14.0 [\#1418](https://github.com/jrnl-org/jrnl/pull/1418) ([dependabot[bot]](https://github.com/apps/dependabot)) - Replace PyYAML with ruamel.yaml [\#1416](https://github.com/jrnl-org/jrnl/pull/1416) ([micahellison](https://github.com/micahellison)) - Bump pytest from 6.2.5 to 7.0.0 [\#1407](https://github.com/jrnl-org/jrnl/pull/1407) ([dependabot[bot]](https://github.com/apps/dependabot)) From bc42f74b2bed6439fc7e15e600edbf19de4682c0 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Mar 2022 12:30:23 -0700 Subject: [PATCH 0595/1132] Reformat additional messages and finish centralizing exception handling (#1424) * Update and modularize exception handling cc #1024 #1141 - Stack traces are no longer shown to users unless the --debug flag is being used - Errors, warnings, and other messages contain color as needed - Converted error messages to Enum - Adds print_msg function to centralize output (this should replace all other output in other modules) Co-authored-by: Micah Jerome Ellison * format with black * add message to catch-all exception block * Unskip some tests (#1399) * remove skip_editor test and tag * remove useless test * unskip blank input test * formatting * rename test so it doesn't overwrite other test * unskip some dayone tests that now work * Bump ipython from 7.28.0 to 7.31.1 (#1401) Bumps [ipython](https://github.com/ipython/ipython) from 7.28.0 to 7.31.1. - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](https://github.com/ipython/ipython/compare/7.28.0...7.31.1) --- updated-dependencies: - dependency-name: ipython dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog [ci skip] * Bump asteval from 0.9.25 to 0.9.26 (#1400) Bumps [asteval](https://github.com/newville/asteval) from 0.9.25 to 0.9.26. - [Release notes](https://github.com/newville/asteval/releases) - [Commits](https://github.com/newville/asteval/compare/0.9.25...0.9.26) --- updated-dependencies: - dependency-name: asteval dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog [ci skip] * Bump black from 21.12b0 to 22.1.0 (#1404) * Bump black from 21.12b0 to 22.1.0 Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits/22.1.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Run make format Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Micah Jerome Ellison * Update changelog [ci skip] * Add reference documentation to docs site and separate out "Tips and Tricks" and "External Editors" from "Recipes" (#1332) * First draft of command line reference, mostly pulled from help screen * Add first draft of config file reference, mostly pulled from advanced.md * Clean up config file doc for readability * Add --config-file and remove examples from CLI reference * Add warning about time zone in timeformat * More small changes, and adding template config keyword * Cleaning up and re-ordering config file reference * Clean up reference and anything else from advanced documentation that can live elsewhere and linking to config file reference wherever config file is mentioned * Fix syntax highlighting in command line reference, clean up content a bit, include --diagnostic * Mention version config key * Apply minor changes suggested in PR review * Rename "recipes" to "Tips and Tricks", pull "External Editors" out of it into its own page, and redirect old recipes link to tips-and-tricks * Revert broken mkdocs-redirects usage from last commit * Update changelog [ci skip] * Add --co alias for --config-override (#1397) * Add hash as a default tag symbol (#1398) * Update changelog [ci skip] * Increment version to v2.8.4-beta2 * Update changelog [ci skip] * Increment version to v2.8.4 * Update changelog [ci skip] * Bump pytest from 6.2.5 to 7.0.0 (#1407) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog [ci skip] * Drop support for Python 3.7 and 3.8 (#1412) * Remove Python 3.7 and 3.8 from github actions workflows * Update lockfile after running poetry update a couple times * Update poetry lock * Remove Python 3.7 and 3.8 from pyproject.toml and run poetry lock * Update changelog [ci skip] * Tidy up git ignore (#1414) * cleaned gitignore and add comments * removed colon for readbility * alphabetize files in sections Co-authored-by: nelnog * fix behavior that was confusing pytest * update test to match new message * whitespace change * clean up error for manually stopping the inline editor * udpate error to use new exception handling * move some exceptions and errors to the new exception handling * add line breaks to keyboard interrupt so it looks more like other exceptions * add handling for exceptions that happen earlier in the flow * add new 'NothingToDelete' error to replace old behavior * get rid of old exception * add new exception handling to 'nothing saved to file' errors * move exception for no editor configured into new handling * move exception for no alt config to new handling * get rid of old exception handling for encrypted journal * Move error for too many wrong passwords into new handling * fix merge errors * replace sys.exit call with new exception handling * replace sys.exit call with new exception handling * replace sys.exit call with new exception handling * reformat with black * clean up old code * clean up old code * clean up linting issue * update uncaught exception for new handling * update test * fix mangled lock file Co-authored-by: Micah Jerome Ellison Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jrnl Bot Co-authored-by: Nelson <35701520+nelnog@users.noreply.github.com> Co-authored-by: nelnog --- jrnl/EncryptedJournal.py | 29 +++++++-------- jrnl/Journal.py | 13 ++----- jrnl/cli.py | 40 ++++++++++++++------- jrnl/config.py | 10 ++++-- jrnl/editor.py | 22 +++++------- jrnl/exception.py | 10 ------ jrnl/install.py | 42 ++++++++-------------- jrnl/jrnl.py | 59 ++++++++++++++---------------- jrnl/messages.py | 60 ++++++++++++++++++++++++++++++- jrnl/output.py | 2 +- jrnl/plugins/jrnl_importer.py | 12 +++++-- jrnl/upgrade.py | 47 ++++++++++++------------ tests/bdd/features/delete.feature | 1 + tests/bdd/features/write.feature | 2 +- tests/unit/test_config_file.py | 7 ++-- tests/unit/test_export.py | 1 - 16 files changed, 204 insertions(+), 153 deletions(-) diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index 7354e7a2..704a091a 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -21,6 +21,11 @@ from .Journal import Journal from .Journal import LegacyJournal from .prompt import create_password +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType + def make_key(password): password = password.encode("utf-8") @@ -53,11 +58,11 @@ def decrypt_content( password = getpass.getpass() result = decrypt_func(password) attempt += 1 - if result is not None: - return result - else: - print("Extremely wrong password.", file=sys.stderr) - sys.exit(1) + + if result is None: + raise JrnlException(Message(MsgText.PasswordMaxTriesExceeded, MsgType.ERROR)) + + return result class EncryptedJournal(Journal): @@ -121,15 +126,11 @@ class EncryptedJournal(Journal): @classmethod def from_journal(cls, other: Journal): new_journal = super().from_journal(other) - try: - new_journal.password = ( - other.password - if hasattr(other, "password") - else create_password(other.name) - ) - except KeyboardInterrupt: - print("[Interrupted while creating new journal]", file=sys.stderr) - sys.exit(1) + new_journal.password = ( + other.password + if hasattr(other, "password") + else create_password(other.name) + ) return new_journal diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 17de129f..bf446a92 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -431,13 +431,6 @@ def open_journal(journal_name, config, legacy=False): from . import EncryptedJournal - try: - if legacy: - return EncryptedJournal.LegacyEncryptedJournal( - journal_name, **config - ).open() - return EncryptedJournal.EncryptedJournal(journal_name, **config).open() - except KeyboardInterrupt: - # Since encrypted journals prompt for a password, it's easy for a user to ctrl+c out - print("[Interrupted while opening journal]", file=sys.stderr) - sys.exit(1) + if legacy: + return EncryptedJournal.LegacyEncryptedJournal(journal_name, **config).open() + return EncryptedJournal.EncryptedJournal(journal_name, **config).open() diff --git a/jrnl/cli.py b/jrnl/cli.py index 03b4f2f0..cd33f2ec 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -5,9 +5,10 @@ import logging import sys import traceback -from jrnl.jrnl import run -from jrnl.args import parse_args +from .jrnl import run +from .args import parse_args from jrnl.output import print_msg + from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText @@ -36,25 +37,40 @@ def cli(manual_args=None): configure_logger(args.debug) logging.debug("Parsed args: %s", args) - return run(args) + status_code = run(args) except JrnlException as e: + status_code = 1 e.print() - return 1 except KeyboardInterrupt: - print_msg(Message(MsgText.KeyboardInterruptMsg, MsgType.WARNING)) - return 1 + status_code = 1 + print_msg("\nKeyboardInterrupt", "\nAborted by user", msg=Message.ERROR) except Exception as e: + # uncaught exception + status_code = 1 + debug = False try: - is_debug = args.debug # type: ignore + if args.debug: # type: ignore + debug = True except NameError: - # error happened before args were parsed - is_debug = "--debug" in sys.argv[1:] + # This should only happen when the exception + # happened before the args were parsed + if "--debug" in sys.argv: + debug = True - if is_debug: + if debug: + print("\n") traceback.print_tb(sys.exc_info()[2]) - print_msg(Message(MsgText.UncaughtException, MsgType.ERROR, {"exception": e})) - return 1 + print_msg( + Message( + MsgText.UncaughtException, + MsgType.ERROR, + {"name": type(e).__name__, "exception": e}, + ) + ) + + # This should be the only exit point + return status_code diff --git a/jrnl/config.py b/jrnl/config.py index 63de0586..2b07b14b 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -197,9 +197,13 @@ def get_journal_name(args, config): args.text = args.text[1:] if args.journal_name not in config["journals"]: - print("No default journal configured.", file=sys.stderr) - print(list_journals(config), file=sys.stderr) - sys.exit(1) + raise JrnlException( + Message( + MsgText.NoDefaultJournal, + MsgType.ERROR, + {"journals": list_journals(config)}, + ), + ) logging.debug("Using journal name: %s", args.journal_name) return args diff --git a/jrnl/editor.py b/jrnl/editor.py index 81ca659a..24c625de 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -3,11 +3,8 @@ import os import subprocess import sys import tempfile -import textwrap from pathlib import Path -from jrnl.color import ERROR_COLOR -from jrnl.color import RESET_COLOR from jrnl.os_compat import on_windows from jrnl.os_compat import split_args from jrnl.output import print_msg @@ -32,22 +29,21 @@ def get_text_from_editor(config, template=""): try: subprocess.call(split_args(config["editor"]) + [tmpfile]) - except FileNotFoundError as e: - error_msg = f""" - {ERROR_COLOR}{str(e)}{RESET_COLOR} - - Please check the 'editor' key in your config file for errors: - {repr(config['editor'])} - """ - print(textwrap.dedent(error_msg).strip(), file=sys.stderr) - exit(1) + except FileNotFoundError: + raise JrnlException( + Message( + MsgText.EditorMisconfigured, + MsgType.ERROR, + {"editor_key": config["editor"]}, + ) + ) with open(tmpfile, "r", encoding="utf-8") as f: raw = f.read() os.remove(tmpfile) if not raw: - print("[Nothing saved to file]", file=sys.stderr) + raise JrnlException(Message(MsgText.NoTextReceived, MsgType.ERROR)) return raw diff --git a/jrnl/exception.py b/jrnl/exception.py index 76da211d..fdfa61a4 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -4,16 +4,6 @@ from jrnl.messages import Message from jrnl.output import print_msg -class UserAbort(Exception): - pass - - -class UpgradeValidationException(Exception): - """Raised when the contents of an upgraded journal do not match the old journal""" - - pass - - class JrnlException(Exception): """Common exceptions raised by jrnl.""" diff --git a/jrnl/install.py b/jrnl/install.py index b2b583cf..306b44e1 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -14,10 +14,14 @@ from .config import get_default_journal_path from .config import load_config from .config import save_config from .config import verify_config_colors -from .exception import UserAbort from .prompt import yesno from .upgrade import is_old_version +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType + def upgrade_config(config_data, alt_config_path=None): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. @@ -47,14 +51,14 @@ def find_default_config(): def find_alt_config(alt_config): - if os.path.exists(alt_config): - return alt_config - else: - print( - "Alternate configuration file not found at path specified.", file=sys.stderr + if not os.path.exists(alt_config): + raise JrnlException( + Message( + MsgText.AltConfigNotFound, MsgType.ERROR, {"config_file": alt_config} + ) ) - print("Exiting.", file=sys.stderr) - sys.exit(1) + + return alt_config def load_or_install_jrnl(alt_config_path): @@ -72,32 +76,16 @@ def load_or_install_jrnl(alt_config_path): config = load_config(config_path) if is_old_version(config_path): - from . import upgrade + from jrnl import upgrade - try: - upgrade.upgrade_jrnl(config_path) - except upgrade.UpgradeValidationException: - print("Aborting upgrade.", file=sys.stderr) - print( - "Please tell us about this problem at the following URL:", - file=sys.stderr, - ) - print( - "https://github.com/jrnl-org/jrnl/issues/new?title=UpgradeValidationException", - file=sys.stderr, - ) - print("Exiting.", file=sys.stderr) - sys.exit(1) + upgrade.upgrade_jrnl(config_path) upgrade_config(config, alt_config_path) verify_config_colors(config) else: logging.debug("Configuration file not found, installing jrnl...") - try: - config = install() - except KeyboardInterrupt: - raise UserAbort("Installation aborted") + config = install() logging.debug('Using configuration "%s"', config) return config diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 232eb702..8014b628 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -7,17 +7,19 @@ import sys from . import install from . import plugins from .Journal import open_journal -from .color import ERROR_COLOR -from .color import RESET_COLOR from .config import get_journal_name from .config import scope_config from .config import get_config_path from .editor import get_text_from_editor from .editor import get_text_from_stdin -from .exception import UserAbort from . import time from .override import apply_overrides +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType + def run(args): """ @@ -35,18 +37,14 @@ def run(args): return args.preconfig_cmd(args) # Load the config, and extract journal name - try: - config = install.load_or_install_jrnl(args.config_file_path) - original_config = config.copy() + config = install.load_or_install_jrnl(args.config_file_path) + original_config = config.copy() - # Apply config overrides - config = apply_overrides(args, config) + # Apply config overrides + config = apply_overrides(args, config) - args = get_journal_name(args, config) - config = scope_config(config, args.journal_name) - except UserAbort as err: - print(f"\n{err}", file=sys.stderr) - sys.exit(1) + args = get_journal_name(args, config) + config = scope_config(config, args.journal_name) # Run post-config command now that config is ready if callable(args.postconfig_cmd): @@ -138,7 +136,9 @@ def write_mode(args, config, journal, **kwargs): if not raw: logging.error("Write mode: couldn't get raw text") - sys.exit() + raise JrnlException( + Message(MsgText.JrnlExceptionMessage.NoTextReceived, MsgType.ERROR) + ) logging.debug( 'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw @@ -202,11 +202,13 @@ def _get_editor_template(config, **kwargs): logging.debug("Write mode: template loaded: %s", template) except OSError: logging.error("Write mode: template not loaded") - print( - f"[Could not read template at '{config['template']}']", - file=sys.stderr, + raise JrnlException( + Message( + MsgText.CantReadTemplate, + MsgType.ERROR, + {"template": config["template"]}, + ) ) - sys.exit(1) return template @@ -243,16 +245,13 @@ def _edit_search_results(config, journal, old_entries, **kwargs): 3. Write modifications to journal """ if not config["editor"]: - print( - f""" - [{ERROR_COLOR}ERROR{RESET_COLOR}: There is no editor configured.] - - Please specify an editor in config file ({get_config_path()}) - to use the --edit option. - """, - file=sys.stderr, + raise JrnlException( + Message( + MsgText.EditorNotConfigured, + MsgType.ERROR, + {"config_file": get_config_path()}, + ) ) - sys.exit(1) # separate entries we are not editing other_entries = [e for e in old_entries if e not in journal.entries] @@ -310,11 +309,7 @@ def _pluralize_entry(num): def _delete_search_results(journal, old_entries, **kwargs): if not journal.entries: - print( - "[No entries deleted, because the search returned no results.]", - file=sys.stderr, - ) - sys.exit(1) + raise JrnlException(Message(MsgText.NothingToDelete, MsgType.ERROR)) entries_to_delete = journal.prompt_delete_entries() diff --git a/jrnl/messages.py b/jrnl/messages.py index eed0cbae..e6a1933a 100644 --- a/jrnl/messages.py +++ b/jrnl/messages.py @@ -26,7 +26,7 @@ class MsgText(Enum): # --- Exceptions ---# UncaughtException = """ - ERROR + {name} {exception} This is probably a bug. Please file an issue at: @@ -61,6 +61,14 @@ class MsgText(Enum): KeyboardInterruptMsg = "Aborted by user" + CantReadTemplate = """ + Unreadable template + Could not read template file at: + {template} + """ + + NoDefaultJournal = "No default journal configured\n{journals}" + # --- Journal status ---# JournalNotSaved = "Entry NOT saved to journal" @@ -72,6 +80,56 @@ class MsgText(Enum): HowToQuitWindows = "Ctrl+z and then Enter" HowToQuitLinux = "Ctrl+d" + EditorMisconfigured = """ + No such file or directory: '{editor_key}' + + Please check the 'editor' key in your config file for errors: + editor: '{editor_key}' + """ + + EditorNotConfigured = """ + There is no editor configured + + To use the --edit option, please specify an editor your config file: + {config_file} + + For examples of how to configure an external editor, see: + https://jrnl.sh/en/stable/external-editors/ + """ + + NoTextReceived = """ + Nothing saved to file + """ + + # --- Upgrade --- # + JournalFailedUpgrade = """ + The following journal{s} failed to upgrade: + {failed_journals} + + Please tell us about this problem at the following URL: + https://github.com/jrnl-org/jrnl/issues/new?title=JournalFailedUpgrade + """ + + UpgradeAborted = "jrnl was NOT upgraded" + + ImportAborted = "Entries were NOT imported" + + # -- Config --- # + AltConfigNotFound = """ + Alternate configuration file not found at the given path: + {config_file} + """ + + # --- Password --- # + PasswordMaxTriesExceeded = """ + Too many attempts with wrong password + """ + + # --- Search --- # + NothingToDelete = """ + No entries to delete, because the search returned no results + """ + class Message(NamedTuple): text: MsgText diff --git a/jrnl/output.py b/jrnl/output.py index 4f28b96a..f31a02e2 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -29,7 +29,7 @@ def list_journals(configuration): from . import config """List the journals specified in the configuration file""" - result = f"Journals defined in {config.get_config_path()}\n" + result = f"Journals defined in config ({config.get_config_path()})\n" ml = min(max(len(k) for k in configuration["journals"]), 20) for journal, cfg in configuration["journals"].items(): result += " * {:{}} -> {}\n".format( diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index 214fc70b..54dd2ab8 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -4,6 +4,11 @@ import sys +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType + class JRNLImporter: """This plugin imports entries from other jrnl files.""" @@ -22,8 +27,11 @@ class JRNLImporter: try: other_journal_txt = sys.stdin.read() except KeyboardInterrupt: - print("[Entries NOT imported into journal.]", file=sys.stderr) - sys.exit(0) + raise JrnlException( + Message(MsgText.KeyboardInterruptMsg, MsgType.ERROR), + Message(MsgText.ImportAborted, MsgType.WARNING), + ) + journal.import_(other_journal_txt) new_cnt = len(journal.entries) print( diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index 158f8de3..3027f4e7 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -10,10 +10,15 @@ from .EncryptedJournal import EncryptedJournal from .config import is_config_json from .config import load_config from .config import scope_config -from .exception import UpgradeValidationException -from .exception import UserAbort from .prompt import yesno +from jrnl.output import print_msg + +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgType + def backup(filename, binary=False): print(f" Created a backup at {filename}.backup", file=sys.stderr) @@ -27,13 +32,9 @@ def backup(filename, binary=False): backup.write(contents) except FileNotFoundError: print(f"\nError: {filename} does not exist.") - try: - cont = yesno(f"\nCreate {filename}?", default=False) - if not cont: - raise KeyboardInterrupt - - except KeyboardInterrupt: - raise UserAbort("jrnl NOT upgraded, exiting.") + cont = yesno(f"\nCreate {filename}?", default=False) + if not cont: + raise JrnlException(Message(MsgText.UpgradeAborted), MsgType.WARNING) def check_exists(path): @@ -121,12 +122,9 @@ older versions of jrnl anymore. file=sys.stderr, ) - try: - cont = yesno("\nContinue upgrading jrnl?", default=False) - if not cont: - raise KeyboardInterrupt - except KeyboardInterrupt: - raise UserAbort("jrnl NOT upgraded, exiting.") + cont = yesno("\nContinue upgrading jrnl?", default=False) + if not cont: + raise JrnlException(Message(MsgText.UpgradeAborted), MsgType.WARNING) for journal_name, path in encrypted_journals.items(): print( @@ -154,15 +152,18 @@ older versions of jrnl anymore. failed_journals = [j for j in all_journals if not j.validate_parsing()] if len(failed_journals) > 0: - print( - "\nThe following journal{} failed to upgrade:\n{}".format( - "s" if len(failed_journals) > 1 else "", - "\n".join(j.name for j in failed_journals), - ), - file=sys.stderr, - ) + print_msg("Aborting upgrade.", msg=Message.NORMAL) - raise UpgradeValidationException + raise JrnlException( + Message( + MsgText.JournalFailedUpgrade, + MsgType.ERROR, + { + "s": "s" if len(failed_journals) > 1 else "", + "failed_journals": "\n".join(j.name for j in failed_journals), + }, + ) + ) # write all journals - or - don't for j in all_journals: diff --git a/tests/bdd/features/delete.feature b/tests/bdd/features/delete.feature index cfbe08ee..fe323966 100644 --- a/tests/bdd/features/delete.feature +++ b/tests/bdd/features/delete.feature @@ -41,6 +41,7 @@ Feature: Delete entries from journal Scenario Outline: Delete flag with nonsense input deletes nothing (issue #932) Given we use the config "" When we run "jrnl --delete asdfasdf" + Then the output should contain "No entries to delete" When we run "jrnl -99 --short" Then the output should be 2020-08-29 11:11 Entry the first. diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 062c5fef..60f22002 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -78,7 +78,7 @@ Feature: Writing new entries. And we write nothing to the editor if opened And we use the password "test" if prompted When we run "jrnl --edit" - Then the error output should contain "[Nothing saved to file]" + Then the error output should contain "Nothing saved to file" And the editor should have been called Examples: configs diff --git a/tests/unit/test_config_file.py b/tests/unit/test_config_file.py index 04766f4a..f9cdb7ec 100644 --- a/tests/unit/test_config_file.py +++ b/tests/unit/test_config_file.py @@ -2,6 +2,7 @@ import pytest import os from jrnl.install import find_alt_config +from jrnl.exception import JrnlException def test_find_alt_config(request): @@ -14,9 +15,9 @@ def test_find_alt_config(request): def test_find_alt_config_not_exist(request): bad_config_path = os.path.join( - request.fspath.dirname, "..", "data", "configs", "not-existing-config.yaml" + request.fspath.dirname, "..", "data", "configs", "does-not-exist.yaml" ) - with pytest.raises(SystemExit) as ex: + with pytest.raises(JrnlException) as ex: found_alt_config = find_alt_config(bad_config_path) assert found_alt_config is not None - assert isinstance(ex.value, SystemExit) + assert isinstance(ex.value, JrnlException) diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index 05c29a1f..1ca8856f 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -1,7 +1,6 @@ import pytest from jrnl.exception import JrnlException - from jrnl.plugins.fancy_exporter import check_provided_linewrap_viability From edc2e524f7c84daf79f3367ae8cb39c2cde9e5b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 11:21:43 -0700 Subject: [PATCH 0596/1132] Bump pytz from 2021.3 to 2022.1 (#1438) Bumps [pytz](https://github.com/stub42/pytz) from 2021.3 to 2022.1. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2021.3...release_2022.1) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index f96d9089..380cd443 100644 --- a/poetry.lock +++ b/poetry.lock @@ -710,7 +710,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2021.3" +version = "2022.1" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -1305,8 +1305,8 @@ python-dateutil = [ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ - {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, - {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, + {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, + {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, From a40d4536f639913d89e754ee658ba615de573362 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 11:23:28 -0700 Subject: [PATCH 0597/1132] Bump pytest from 7.0.1 to 7.1.1 (#1430) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.1 to 7.1.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.0.1...7.1.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 380cd443..d2e8f239 100644 --- a/poetry.lock +++ b/poetry.lock @@ -649,11 +649,11 @@ toml = "*" [[package]] name = "pytest" -version = "7.0.1" +version = "7.1.1" description = "pytest: simple powerful testing with Python" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -1290,8 +1290,8 @@ pyproject-flake8 = [ {file = "pyproject_flake8-0.0.1a2-py2.py3-none-any.whl", hash = "sha256:e61ed1dc088e9f9f8a7170967ac4ec135acfef3a59ab9738c7b58cc11f294a7e"}, ] pytest = [ - {file = "pytest-7.0.1-py3-none-any.whl", hash = "sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db"}, - {file = "pytest-7.0.1.tar.gz", hash = "sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171"}, + {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, + {file = "pytest-7.1.1.tar.gz", hash = "sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63"}, ] pytest-bdd = [ {file = "pytest-bdd-5.0.0.tar.gz", hash = "sha256:fab7093ed3d5e51ee0c68de093c90e4f40de345bd9a54a188b2991ce2a2a39cf"}, From a969f9b3fb94837c762b9cc77ca796d8491dd785 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Mar 2022 18:25:14 +0000 Subject: [PATCH 0598/1132] Update changelog [ci skip] --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb95010d..0b9d3a90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...HEAD) -**Fixed bugs:** +**Implemented enhancements:** -- Mac Installation Problem: Warning: Transient problem: HTTP error [\#1425](https://github.com/jrnl-org/jrnl/issues/1425) +- Reformat additional messages and finish centralizing exception handling [\#1424](https://github.com/jrnl-org/jrnl/pull/1424) ([wren](https://github.com/wren)) +- Reformat messages and add new centralized exception handling [\#1417](https://github.com/jrnl-org/jrnl/pull/1417) ([wren](https://github.com/wren)) **Build:** @@ -17,6 +18,8 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump pytz from 2021.3 to 2022.1 [\#1438](https://github.com/jrnl-org/jrnl/pull/1438) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest from 7.0.1 to 7.1.1 [\#1430](https://github.com/jrnl-org/jrnl/pull/1430) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.1 to 36.0.2 [\#1427](https://github.com/jrnl-org/jrnl/pull/1427) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump yq from 2.13.0 to 2.14.0 [\#1418](https://github.com/jrnl-org/jrnl/pull/1418) ([dependabot[bot]](https://github.com/apps/dependabot)) - Replace PyYAML with ruamel.yaml [\#1416](https://github.com/jrnl-org/jrnl/pull/1416) ([micahellison](https://github.com/micahellison)) From d405e922925afb804c5503cbc1a15b040ef1f28d Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 26 Mar 2022 11:35:14 -0700 Subject: [PATCH 0599/1132] Remove sample format and its asteval dependency (#1436) --- jrnl/plugins/__init__.py | 3 +- jrnl/plugins/template.py | 142 ------------------------------ jrnl/plugins/template_exporter.py | 43 --------- poetry.lock | 13 +-- pyproject.toml | 1 - tests/bdd/features/format.feature | 26 ------ 6 files changed, 2 insertions(+), 226 deletions(-) delete mode 100644 jrnl/plugins/template.py delete mode 100644 jrnl/plugins/template_exporter.py diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index da6199fb..e3484927 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -8,7 +8,6 @@ from .json_exporter import JSONExporter from .markdown_exporter import MarkdownExporter from .tag_exporter import TagExporter from .dates_exporter import DatesExporter -from .template_exporter import __all__ as template_exporters from .text_exporter import TextExporter from .xml_exporter import XMLExporter from .yaml_exporter import YAMLExporter @@ -22,7 +21,7 @@ __exporters = [ XMLExporter, YAMLExporter, FancyExporter, -] + template_exporters +] __importers = [JRNLImporter] __exporter_types = {name: plugin for plugin in __exporters for name in plugin.names} diff --git a/jrnl/plugins/template.py b/jrnl/plugins/template.py deleted file mode 100644 index 206eaf13..00000000 --- a/jrnl/plugins/template.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -import re - -from ruamel.yaml import YAML - -VAR_RE = r"[_a-zA-Z][a-zA-Z0-9_]*" -EXPRESSION_RE = r"[\[\]():.a-zA-Z0-9_]*" -PRINT_RE = r"{{ *(.+?) *}}" -START_BLOCK_RE = r"{% *(if|for) +(.+?) *%}" -END_BLOCK_RE = r"{% *end(for|if) *%}" -FOR_RE = r"{{% *for +({varname}) +in +([^%]+) *%}}".format(varname=VAR_RE) -IF_RE = r"{% *if +(.+?) *%}" -BLOCK_RE = r"{% *block +(.+?) *%}((?:.|\n)+?){% *endblock *%}" -INCLUDE_RE = r"{% *include +(.+?) *%}" - - -class Template: - def __init__(self, template): - self.template = template - self.clean_template = None - self.blocks = {} - - @classmethod - def from_file(cls, filename): - with open(filename) as f: - front_matter, body = f.read().strip("-\n").split("---", 2) - front_matter = YAML(typ="safe").load(front_matter) - template = cls(body) - template.__dict__.update(front_matter) - return template - - def render(self, **vars): - if self.clean_template is None: - self._get_blocks() - return self._expand(self.clean_template, **vars) - - def render_block(self, block, **vars): - if self.clean_template is None: - self._get_blocks() - return self._expand(self.blocks[block], **vars) - - def _eval_context(self, vars): - import asteval - - e = asteval.Interpreter(use_numpy=False, writer=None) - e.symtable.update(vars) - e.symtable["__last_iteration"] = vars.get("__last_iteration", False) - return e - - def _get_blocks(self): - def s(match): - name, contents = match.groups() - self.blocks[name] = self._strip_single_nl(contents) - return "" - - self.clean_template = re.sub(BLOCK_RE, s, self.template, flags=re.MULTILINE) - - def _expand(self, template, **vars): - stack = sorted( - [ - (m.start(), 1, m.groups()[0]) - for m in re.finditer(START_BLOCK_RE, template) - ] - + [ - (m.end(), -1, m.groups()[0]) - for m in re.finditer(END_BLOCK_RE, template) - ] - ) - - last_nesting, nesting = 0, 0 - start = 0 - result = "" - block_type = None - if not stack: - return self._expand_vars(template, **vars) - - for pos, indent, typ in stack: - nesting += indent - if nesting == 1 and last_nesting == 0: - block_type = typ - result += self._expand_vars(template[start:pos], **vars) - start = pos - elif nesting == 0 and last_nesting == 1: - if block_type == "if": - result += self._expand_cond(template[start:pos], **vars) - elif block_type == "for": - result += self._expand_loops(template[start:pos], **vars) - elif block_type == "block": - result += self._save_block(template[start:pos], **vars) - start = pos - last_nesting = nesting - - result += self._expand_vars(template[stack[-1][0] :], **vars) - return result - - def _expand_vars(self, template, **vars): - safe_eval = self._eval_context(vars) - expanded = re.sub( - INCLUDE_RE, lambda m: self.render_block(m.groups()[0], **vars), template - ) - return re.sub(PRINT_RE, lambda m: str(safe_eval(m.groups()[0])), expanded) - - def _expand_cond(self, template, **vars): - start_block = re.search(IF_RE, template, re.M) - end_block = list(re.finditer(END_BLOCK_RE, template, re.M))[-1] - expression = start_block.groups()[0] - sub_template = self._strip_single_nl( - template[start_block.end() : end_block.start()] - ) - - safe_eval = self._eval_context(vars) - if safe_eval(expression): - return self._expand(sub_template) - return "" - - def _strip_single_nl(self, template, strip_r=True): - if template[0] == "\n": - template = template[1:] - if strip_r and template[-1] == "\n": - template = template[:-1] - return template - - def _expand_loops(self, template, **vars): - start_block = re.search(FOR_RE, template, re.M) - end_block = list(re.finditer(END_BLOCK_RE, template, re.M))[-1] - var_name, iterator = start_block.groups() - sub_template = self._strip_single_nl( - template[start_block.end() : end_block.start()], strip_r=False - ) - - safe_eval = self._eval_context(vars) - - result = "" - items = safe_eval(iterator) - for idx, var in enumerate(items): - vars[var_name] = var - vars["__last_iteration"] = idx == len(items) - 1 - result += self._expand(sub_template, **vars) - del vars[var_name] - return self._strip_single_nl(result) diff --git a/jrnl/plugins/template_exporter.py b/jrnl/plugins/template_exporter.py deleted file mode 100644 index d2e5ce3e..00000000 --- a/jrnl/plugins/template_exporter.py +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors -# License: https://www.gnu.org/licenses/gpl-3.0.html - -from glob import glob -import os - -from .template import Template -from .text_exporter import TextExporter - - -class GenericTemplateExporter(TextExporter): - """This Exporter can convert entries and journals into text files.""" - - @classmethod - def export_entry(cls, entry): - """Returns a string representation of a single entry.""" - vars = {"entry": entry, "tags": entry.tags} - return cls.template.render_block("entry", **vars) - - @classmethod - def export_journal(cls, journal): - """Returns a string representation of an entire journal.""" - vars = {"journal": journal, "entries": journal.entries, "tags": journal.tags} - return cls.template.render_block("journal", **vars) - - -def __exporter_from_file(template_file): - """Create a template class from a file""" - name = os.path.basename(template_file).replace(".template", "") - template = Template.from_file(template_file) - return type( - str(f"{name.title()}Exporter"), - (GenericTemplateExporter,), - {"names": [name], "extension": template.extension, "template": template}, - ) - - -__all__ = [] - -# Factory pattern to create Exporter classes for all available templates -for template_file in glob("jrnl/templates/*.template"): - __all__.append(__exporter_from_file(template_file)) diff --git a/poetry.lock b/poetry.lock index d2e8f239..a749c927 100644 --- a/poetry.lock +++ b/poetry.lock @@ -28,14 +28,6 @@ python-versions = ">=3.6" [package.extras] test = ["coverage", "flake8", "pexpect", "wheel"] -[[package]] -name = "asteval" -version = "0.9.26" -description = "Safe, minimalistic evaluator of python expression using ast module" -category = "main" -optional = false -python-versions = ">=3.6" - [[package]] name = "asttokens" version = "2.0.5" @@ -941,7 +933,7 @@ testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "8393124bac95ba61eb1a3590f5ed97d938d7b3637ea1dc19e0baacfc1ccab093" +content-hash = "8a4b09a72f705e5265d6d1bebc61926df2ff1e0237ac1369bef6dbebb44f4d9c" [metadata.files] ansiwrap = [ @@ -956,9 +948,6 @@ argcomplete = [ {file = "argcomplete-2.0.0-py2.py3-none-any.whl", hash = "sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e"}, {file = "argcomplete-2.0.0.tar.gz", hash = "sha256:6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20"}, ] -asteval = [ - {file = "asteval-0.9.26.tar.gz", hash = "sha256:36125613ec21ed3e33e370ca8960a1f1e8a2324d78a8016bfa5ad76f1e16ef05"}, -] asttokens = [ {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, diff --git a/pyproject.toml b/pyproject.toml index 3d04c956..88861740 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,6 @@ classifiers = [ python = ">=3.9.0, <3.12" ansiwrap = "^0.8.4" -asteval = "^0.9" colorama = ">=0.4" # https://github.com/tartley/colorama/blob/master/CHANGELOG.rst cryptography = ">=3.0" # https://cryptography.io/en/latest/api-stability.html keyring = ">=21.0" # https://github.com/jaraco/keyring#integration diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index 18426674..dc5c92ca 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -118,32 +118,6 @@ Feature: Custom formats | basic_folder.yaml | | basic_dayone.yaml | - Scenario Outline: Exporting using custom templates - Given we use the config "" - And we use the password "test" if prompted - When we run "jrnl -1 --format sample" - Then the output should be - The third entry finally after weeks without writing. - ---------------------------------------------------- - - I'm so excited about emojis. 💯 🎶 💩 - - Donec semper pellentesque iaculis. Nullam cursus et justo sit amet venenatis. - Vivamus tempus ex dictum metus vehicula gravida. Aliquam sed sem dolor. Nulla - eget ultrices purus. Quisque at nunc at quam pharetra consectetur vitae quis - dolor. Fusce ultricies purus eu est feugiat, quis scelerisque nibh malesuada. - Quisque egestas semper nibh in hendrerit. Nam finibus ex in mi mattis - vulputate. Sed mauris urna, consectetur in justo eu, volutpat accumsan justo. - Phasellus aliquam lacus placerat convallis vestibulum. Curabitur maximus at - ante eget fringilla. @tagthree and also @tagone - - Examples: configs - | config_file | - | basic_onefile.yaml | - | basic_encrypted.yaml | - | basic_folder.yaml | - | basic_dayone.yaml | - Scenario Outline: Increasing Headings on Markdown export Given we use the config "" And we use the password "test" if prompted From 17e09df050dab225b006fa09ded074542f868c15 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Mar 2022 18:36:47 +0000 Subject: [PATCH 0600/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b9d3a90..75d36130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ - Reformat additional messages and finish centralizing exception handling [\#1424](https://github.com/jrnl-org/jrnl/pull/1424) ([wren](https://github.com/wren)) - Reformat messages and add new centralized exception handling [\#1417](https://github.com/jrnl-org/jrnl/pull/1417) ([wren](https://github.com/wren)) +**Deprecated:** + +- Remove "sample" format and its asteval dependency [\#1435](https://github.com/jrnl-org/jrnl/issues/1435) + **Build:** - Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) From 23839305d82e24d272dc0eece04585124b685a1d Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 26 Mar 2022 11:48:41 -0700 Subject: [PATCH 0601/1132] Pin jinja2 in docs requirements to keep readthedocs builds from failing (#1439) * Attempt to pin jinja requirement to keep readthedocs from failing * Change read the docs Python version from 3.7 to 3.10 * Unpin jinja and remove deprecated python version setting * Try pinning to jinja 3.0.3 * Fix "jinja2" (instead of "jinja") --- docs_theme/requirements.txt | 1 + readthedocs.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_theme/requirements.txt b/docs_theme/requirements.txt index fe9469e7..fdc093ae 100644 --- a/docs_theme/requirements.txt +++ b/docs_theme/requirements.txt @@ -1 +1,2 @@ mkdocs==1.2.3 +jinja2==3.0.3 # https://github.com/readthedocs/readthedocs.org/issues/9037 diff --git a/readthedocs.yml b/readthedocs.yml index f74f3d23..60d14db0 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -17,6 +17,5 @@ formats: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.7 install: - requirements: docs_theme/requirements.txt From 650aeb387bf104d2ace81e63dac5b198bf31c130 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 26 Mar 2022 18:50:20 +0000 Subject: [PATCH 0602/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75d36130..24e76387 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ **Build:** - Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) +- Pin jinja2 in docs requirements to keep readthedocs builds from failing [\#1439](https://github.com/jrnl-org/jrnl/pull/1439) ([micahellison](https://github.com/micahellison)) - Tidy up git ignore [\#1414](https://github.com/jrnl-org/jrnl/pull/1414) ([nelnog](https://github.com/nelnog)) - Drop support for Python 3.7 and 3.8 [\#1412](https://github.com/jrnl-org/jrnl/pull/1412) ([micahellison](https://github.com/micahellison)) From 2c626844ef6dde506eafef48e856047168f69120 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 13:58:21 -0700 Subject: [PATCH 0603/1132] Bump black from 22.1.0 to 22.3.0 (#1442) Bumps [black](https://github.com/psf/black) from 22.1.0 to 22.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/22.1.0...22.3.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/poetry.lock b/poetry.lock index a749c927..effd14a9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -74,7 +74,7 @@ python-versions = "*" [[package]] name = "black" -version = "22.1.0" +version = "22.3.0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -85,7 +85,7 @@ click = ">=8.0.0" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = ">=1.1.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] @@ -965,29 +965,29 @@ backcall = [ {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] black = [ - {file = "black-22.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1297c63b9e1b96a3d0da2d85d11cd9bf8664251fd69ddac068b98dc4f34f73b6"}, - {file = "black-22.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2ff96450d3ad9ea499fc4c60e425a1439c2120cbbc1ab959ff20f7c76ec7e866"}, - {file = "black-22.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e21e1f1efa65a50e3960edd068b6ae6d64ad6235bd8bfea116a03b21836af71"}, - {file = "black-22.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f69158a7d120fd641d1fa9a921d898e20d52e44a74a6fbbcc570a62a6bc8ab"}, - {file = "black-22.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:228b5ae2c8e3d6227e4bde5920d2fc66cc3400fde7bcc74f480cb07ef0b570d5"}, - {file = "black-22.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b1a5ed73ab4c482208d20434f700d514f66ffe2840f63a6252ecc43a9bc77e8a"}, - {file = "black-22.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35944b7100af4a985abfcaa860b06af15590deb1f392f06c8683b4381e8eeaf0"}, - {file = "black-22.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7835fee5238fc0a0baf6c9268fb816b5f5cd9b8793423a75e8cd663c48d073ba"}, - {file = "black-22.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dae63f2dbf82882fa3b2a3c49c32bffe144970a573cd68d247af6560fc493ae1"}, - {file = "black-22.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fa1db02410b1924b6749c245ab38d30621564e658297484952f3d8a39fce7e8"}, - {file = "black-22.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c8226f50b8c34a14608b848dc23a46e5d08397d009446353dad45e04af0c8e28"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2d6f331c02f0f40aa51a22e479c8209d37fcd520c77721c034517d44eecf5912"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742ce9af3086e5bd07e58c8feb09dbb2b047b7f566eb5f5bc63fd455814979f3"}, - {file = "black-22.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fdb8754b453fb15fad3f72cd9cad3e16776f0964d67cf30ebcbf10327a3777a3"}, - {file = "black-22.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5660feab44c2e3cb24b2419b998846cbb01c23c7fe645fee45087efa3da2d61"}, - {file = "black-22.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:6f2f01381f91c1efb1451998bd65a129b3ed6f64f79663a55fe0e9b74a5f81fd"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:efbadd9b52c060a8fc3b9658744091cb33c31f830b3f074422ed27bad2b18e8f"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8871fcb4b447206904932b54b567923e5be802b9b19b744fdff092bd2f3118d0"}, - {file = "black-22.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccad888050f5393f0d6029deea2a33e5ae371fd182a697313bdbd835d3edaf9c"}, - {file = "black-22.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07e5c049442d7ca1a2fc273c79d1aecbbf1bc858f62e8184abe1ad175c4f7cc2"}, - {file = "black-22.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:373922fc66676133ddc3e754e4509196a8c392fec3f5ca4486673e685a421321"}, - {file = "black-22.1.0-py3-none-any.whl", hash = "sha256:3524739d76b6b3ed1132422bf9d82123cd1705086723bc3e235ca39fd21c667d"}, - {file = "black-22.1.0.tar.gz", hash = "sha256:a7c0192d35635f6fc1174be575cb7915e92e5dd629ee79fdaf0dcfa41a80afb5"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb"}, + {file = "black-22.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a"}, + {file = "black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968"}, + {file = "black-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d"}, + {file = "black-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce"}, + {file = "black-22.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82"}, + {file = "black-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b"}, + {file = "black-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015"}, + {file = "black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b"}, + {file = "black-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464"}, + {file = "black-22.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0"}, + {file = "black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176"}, + {file = "black-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a"}, + {file = "black-22.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad"}, + {file = "black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21"}, + {file = "black-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265"}, + {file = "black-22.3.0-py3-none-any.whl", hash = "sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72"}, + {file = "black-22.3.0.tar.gz", hash = "sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79"}, ] cffi = [ {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, From 026cafad3fd1d27ce4da55db1f76caadc816bf19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 13:58:43 -0700 Subject: [PATCH 0604/1132] Bump mkdocs from 1.2.3 to 1.3.0 (#1441) Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.2.3 to 1.3.0. - [Release notes](https://github.com/mkdocs/mkdocs/releases) - [Commits](https://github.com/mkdocs/mkdocs/compare/1.2.3...1.3.0) --- updated-dependencies: - dependency-name: mkdocs dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index effd14a9..91e18e68 100644 --- a/poetry.lock +++ b/poetry.lock @@ -403,7 +403,7 @@ python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.2.3" +version = "1.3.0" description = "Project documentation with Markdown." category = "dev" optional = false @@ -412,8 +412,8 @@ python-versions = ">=3.6" [package.dependencies] click = ">=3.3" ghp-import = ">=1.0" -importlib-metadata = ">=3.10" -Jinja2 = ">=2.10.1" +importlib-metadata = ">=4.3" +Jinja2 = ">=2.10.2" Markdown = ">=3.2.1" mergedeep = ">=1.3.4" packaging = ">=20.5" @@ -1188,8 +1188,8 @@ mergedeep = [ {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.2.3-py3-none-any.whl", hash = "sha256:a1fa8c2d0c1305d7fc2b9d9f607c71778572a8b110fb26642aa00296c9e6d072"}, - {file = "mkdocs-1.2.3.tar.gz", hash = "sha256:89f5a094764381cda656af4298727c9f53dc3e602983087e1fe96ea1df24f4c1"}, + {file = "mkdocs-1.3.0-py3-none-any.whl", hash = "sha256:26bd2b03d739ac57a3e6eed0b7bcc86168703b719c27b99ad6ca91dc439aacde"}, + {file = "mkdocs-1.3.0.tar.gz", hash = "sha256:b504405b04da38795fec9b2e5e28f6aa3a73bb0960cb6d5d27ead28952bd35ea"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, From 96d45847f91a435659cd3882826fd74d84c9fd96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 13:58:58 -0700 Subject: [PATCH 0605/1132] Bump pyproject-flake8 from 0.0.1a2 to 0.0.1a3 (#1440) Bumps [pyproject-flake8](https://github.com/csachs/pyproject-flake8) from 0.0.1a2 to 0.0.1a3. - [Release notes](https://github.com/csachs/pyproject-flake8/releases) - [Commits](https://github.com/csachs/pyproject-flake8/compare/v0.0.1a2...v0.0.1a3) --- updated-dependencies: - dependency-name: pyproject-flake8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 91e18e68..3413f4d9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -629,7 +629,7 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyproject-flake8" -version = "0.0.1a2" +version = "0.0.1a3" description = "pyproject-flake8 (`pflake8`), a monkey patching wrapper to connect flake8 with pyproject.toml configuration" category = "dev" optional = false @@ -637,7 +637,7 @@ python-versions = "*" [package.dependencies] flake8 = "*" -toml = "*" +tomli = {version = "*", markers = "python_version < \"3.11.0a7\""} [[package]] name = "pytest" @@ -1275,8 +1275,8 @@ pyparsing = [ {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, ] pyproject-flake8 = [ - {file = "pyproject-flake8-0.0.1a2.tar.gz", hash = "sha256:bdeca37f78ecd34bd64a49d3657d53d099f5445831071a31c46e1fe20cd61461"}, - {file = "pyproject_flake8-0.0.1a2-py2.py3-none-any.whl", hash = "sha256:e61ed1dc088e9f9f8a7170967ac4ec135acfef3a59ab9738c7b58cc11f294a7e"}, + {file = "pyproject-flake8-0.0.1a3.tar.gz", hash = "sha256:4e3e704c639e61d9ab75aadf44dbf31a07281035896ad7d725ed7f386fd79674"}, + {file = "pyproject_flake8-0.0.1a3-py2.py3-none-any.whl", hash = "sha256:1f434780791df82e9ca2358f4c542a2b2fdd3a77e666a6ad3f60a6a1464da4e2"}, ] pytest = [ {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, From 3d036256b25b968cc998d326968e6e64913ea07b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Apr 2022 21:00:41 +0000 Subject: [PATCH 0606/1132] Update changelog [ci skip] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e76387..eee42470 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump black from 22.1.0 to 22.3.0 [\#1442](https://github.com/jrnl-org/jrnl/pull/1442) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump mkdocs from 1.2.3 to 1.3.0 [\#1441](https://github.com/jrnl-org/jrnl/pull/1441) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pyproject-flake8 from 0.0.1a2 to 0.0.1a3 [\#1440](https://github.com/jrnl-org/jrnl/pull/1440) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2021.3 to 2022.1 [\#1438](https://github.com/jrnl-org/jrnl/pull/1438) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 7.0.1 to 7.1.1 [\#1430](https://github.com/jrnl-org/jrnl/pull/1430) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.1 to 36.0.2 [\#1427](https://github.com/jrnl-org/jrnl/pull/1427) ([dependabot[bot]](https://github.com/apps/dependabot)) From 4d72f0be62346a5fed004b4920ee34ff6adf9bf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Apr 2022 11:29:53 -0700 Subject: [PATCH 0607/1132] Bump pyproject-flake8 from 0.0.1a3 to 0.0.1a4 (#1447) Bumps [pyproject-flake8](https://github.com/csachs/pyproject-flake8) from 0.0.1a3 to 0.0.1a4. - [Release notes](https://github.com/csachs/pyproject-flake8/releases) - [Commits](https://github.com/csachs/pyproject-flake8/compare/v0.0.1a3...v0.0.1a4) --- updated-dependencies: - dependency-name: pyproject-flake8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3413f4d9..8259a759 100644 --- a/poetry.lock +++ b/poetry.lock @@ -629,7 +629,7 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyproject-flake8" -version = "0.0.1a3" +version = "0.0.1a4" description = "pyproject-flake8 (`pflake8`), a monkey patching wrapper to connect flake8 with pyproject.toml configuration" category = "dev" optional = false @@ -637,7 +637,7 @@ python-versions = "*" [package.dependencies] flake8 = "*" -tomli = {version = "*", markers = "python_version < \"3.11.0a7\""} +tomli = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "pytest" @@ -1275,8 +1275,8 @@ pyparsing = [ {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, ] pyproject-flake8 = [ - {file = "pyproject-flake8-0.0.1a3.tar.gz", hash = "sha256:4e3e704c639e61d9ab75aadf44dbf31a07281035896ad7d725ed7f386fd79674"}, - {file = "pyproject_flake8-0.0.1a3-py2.py3-none-any.whl", hash = "sha256:1f434780791df82e9ca2358f4c542a2b2fdd3a77e666a6ad3f60a6a1464da4e2"}, + {file = "pyproject-flake8-0.0.1a4.tar.gz", hash = "sha256:8ed9453f1d984cfe94c998f9840275359e29e7f435b8ddd188ae084e2dc1270c"}, + {file = "pyproject_flake8-0.0.1a4-py2.py3-none-any.whl", hash = "sha256:1a8f94e18d08677ee780625049d9d00a9ee823661c6606caab8a383351037a75"}, ] pytest = [ {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, From 97f326a59c03694493dff2160d9d9437e1bd5183 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Apr 2022 18:31:52 +0000 Subject: [PATCH 0608/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eee42470..a2623fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump pyproject-flake8 from 0.0.1a3 to 0.0.1a4 [\#1447](https://github.com/jrnl-org/jrnl/pull/1447) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 22.1.0 to 22.3.0 [\#1442](https://github.com/jrnl-org/jrnl/pull/1442) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump mkdocs from 1.2.3 to 1.3.0 [\#1441](https://github.com/jrnl-org/jrnl/pull/1441) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pyproject-flake8 from 0.0.1a2 to 0.0.1a3 [\#1440](https://github.com/jrnl-org/jrnl/pull/1440) ([dependabot[bot]](https://github.com/apps/dependabot)) From e2f0f8cc9b5592cca77aa1a42b1ce6629745308f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Apr 2022 11:28:34 -0700 Subject: [PATCH 0609/1132] Bump cryptography from 36.0.2 to 37.0.1 (#1462) Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.2 to 37.0.1. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/36.0.2...37.0.1) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8259a759..570ab17e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -137,7 +137,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "36.0.2" +version = "37.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -152,7 +152,7 @@ docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.2.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "decorator" @@ -1054,26 +1054,28 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-36.0.2-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:4e2dddd38a5ba733be6a025a1475a9f45e4e41139d1321f412c6b360b19070b6"}, - {file = "cryptography-36.0.2-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:4881d09298cd0b669bb15b9cfe6166f16fc1277b4ed0d04a22f3d6430cb30f1d"}, - {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea634401ca02367c1567f012317502ef3437522e2fc44a3ea1844de028fa4b84"}, - {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:7be666cc4599b415f320839e36367b273db8501127b38316f3b9f22f17a0b815"}, - {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8241cac0aae90b82d6b5c443b853723bcc66963970c67e56e71a2609dc4b5eaf"}, - {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b2d54e787a884ffc6e187262823b6feb06c338084bbe80d45166a1cb1c6c5bf"}, - {file = "cryptography-36.0.2-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:c2c5250ff0d36fd58550252f54915776940e4e866f38f3a7866d92b32a654b86"}, - {file = "cryptography-36.0.2-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:ec6597aa85ce03f3e507566b8bcdf9da2227ec86c4266bd5e6ab4d9e0cc8dab2"}, - {file = "cryptography-36.0.2-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ca9f686517ec2c4a4ce930207f75c00bf03d94e5063cbc00a1dc42531511b7eb"}, - {file = "cryptography-36.0.2-cp36-abi3-win32.whl", hash = "sha256:f64b232348ee82f13aac22856515ce0195837f6968aeaa94a3d0353ea2ec06a6"}, - {file = "cryptography-36.0.2-cp36-abi3-win_amd64.whl", hash = "sha256:53e0285b49fd0ab6e604f4c5d9c5ddd98de77018542e88366923f152dbeb3c29"}, - {file = "cryptography-36.0.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:32db5cc49c73f39aac27574522cecd0a4bb7384e71198bc65a0d23f901e89bb7"}, - {file = "cryptography-36.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b3d199647468d410994dbeb8cec5816fb74feb9368aedf300af709ef507e3e"}, - {file = "cryptography-36.0.2-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:da73d095f8590ad437cd5e9faf6628a218aa7c387e1fdf67b888b47ba56a17f0"}, - {file = "cryptography-36.0.2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:0a3bf09bb0b7a2c93ce7b98cb107e9170a90c51a0162a20af1c61c765b90e60b"}, - {file = "cryptography-36.0.2-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8897b7b7ec077c819187a123174b645eb680c13df68354ed99f9b40a50898f77"}, - {file = "cryptography-36.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82740818f2f240a5da8dfb8943b360e4f24022b093207160c77cadade47d7c85"}, - {file = "cryptography-36.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:1f64a62b3b75e4005df19d3b5235abd43fa6358d5516cfc43d87aeba8d08dd51"}, - {file = "cryptography-36.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e167b6b710c7f7bc54e67ef593f8731e1f45aa35f8a8a7b72d6e42ec76afd4b3"}, - {file = "cryptography-36.0.2.tar.gz", hash = "sha256:70f8f4f7bb2ac9f340655cbac89d68c527af5bb4387522a8413e841e3e6628c9"}, + {file = "cryptography-37.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:74b55f67f4cf026cb84da7a1b04fc2a1d260193d4ad0ea5e9897c8b74c1e76ac"}, + {file = "cryptography-37.0.1-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:0db5cf21bd7d092baacb576482b0245102cea2d3cf09f09271ce9f69624ecb6f"}, + {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:faf0f5456c059c7b1c29441bdd5e988f0ba75bdc3eea776520d8dcb1e30e1b5c"}, + {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:06bfafa6e53ccbfb7a94be4687b211a025ce0625e3f3c60bb15cd048a18f3ed8"}, + {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf585476fcbcd37bed08072e8e2db3954ce1bfc68087a2dc9c19cfe0b90979ca"}, + {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d4daf890e674d191757d8d7d60dc3a29c58c72c7a76a05f1c0a326013f47e8b"}, + {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:ae1cd29fbe6b716855454e44f4bf743465152e15d2d317303fe3b58ee9e5af7a"}, + {file = "cryptography-37.0.1-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:451aaff8b8adf2dd0597cbb1fdcfc8a7d580f33f843b7cce75307a7f20112dd8"}, + {file = "cryptography-37.0.1-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:1858eff6246bb8bbc080eee78f3dd1528739e3f416cba5f9914e8631b8df9871"}, + {file = "cryptography-37.0.1-cp36-abi3-win32.whl", hash = "sha256:e69a0e36e62279120e648e787b76d79b41e0f9e86c1c636a4f38d415595c722e"}, + {file = "cryptography-37.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:a18ff4bfa9d64914a84d7b06c46eb86e0cc03113470b3c111255aceb6dcaf81d"}, + {file = "cryptography-37.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cce90609e01e1b192fae9e13665058ab46b2ea53a3c05a3ea74a3eb8c3af8857"}, + {file = "cryptography-37.0.1-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c4a58eeafbd7409054be41a377e726a7904a17c26f45abf18125d21b1215b08b"}, + {file = "cryptography-37.0.1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:618391152147a1221c87b1b0b7f792cafcfd4b5a685c5c72eeea2ddd29aeceff"}, + {file = "cryptography-37.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ceae26f876aabe193b13a0c36d1bb8e3e7e608d17351861b437bd882f617e9f"}, + {file = "cryptography-37.0.1-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:930b829e8a2abaf43a19f38277ae3c5e1ffcf547b936a927d2587769ae52c296"}, + {file = "cryptography-37.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:58021d6e9b1d88b1105269d0da5e60e778b37dfc0e824efc71343dd003726831"}, + {file = "cryptography-37.0.1-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b1ee5c82cf03b30f6ae4e32d2bcb1e167ef74d6071cbb77c2af30f101d0b360b"}, + {file = "cryptography-37.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f095988548ec5095e3750cdb30e6962273d239b1998ba1aac66c0d5bee7111c1"}, + {file = "cryptography-37.0.1-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:125702572be12bcd318e3a14e9e70acd4be69a43664a75f0397e8650fe3c6cc3"}, + {file = "cryptography-37.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:315af6268de72bcfa0bb3401350ce7d921f216e6b60de12a363dad128d9d459f"}, + {file = "cryptography-37.0.1.tar.gz", hash = "sha256:d610d0ee14dd9109006215c7c0de15eee91230b70a9bce2263461cf7c3720b83"}, ] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, From 2b3cf88097bf31330112b78532b6fb70b04e17f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Apr 2022 11:29:03 -0700 Subject: [PATCH 0610/1132] Bump pytest from 7.1.1 to 7.1.2 (#1458) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.1 to 7.1.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.1.1...7.1.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 570ab17e..afa20f71 100644 --- a/poetry.lock +++ b/poetry.lock @@ -641,7 +641,7 @@ tomli = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "pytest" -version = "7.1.1" +version = "7.1.2" description = "pytest: simple powerful testing with Python" category = "main" optional = false @@ -1281,8 +1281,8 @@ pyproject-flake8 = [ {file = "pyproject_flake8-0.0.1a4-py2.py3-none-any.whl", hash = "sha256:1a8f94e18d08677ee780625049d9d00a9ee823661c6606caab8a383351037a75"}, ] pytest = [ - {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, - {file = "pytest-7.1.1.tar.gz", hash = "sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63"}, + {file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"}, + {file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"}, ] pytest-bdd = [ {file = "pytest-bdd-5.0.0.tar.gz", hash = "sha256:fab7093ed3d5e51ee0c68de093c90e4f40de345bd9a54a188b2991ce2a2a39cf"}, From d21398ee60ced9d931cb7795ad6298184b44f030 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Apr 2022 18:30:34 +0000 Subject: [PATCH 0611/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2623fa0..83b128ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump cryptography from 36.0.2 to 37.0.1 [\#1462](https://github.com/jrnl-org/jrnl/pull/1462) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest from 7.1.1 to 7.1.2 [\#1458](https://github.com/jrnl-org/jrnl/pull/1458) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pyproject-flake8 from 0.0.1a3 to 0.0.1a4 [\#1447](https://github.com/jrnl-org/jrnl/pull/1447) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump black from 22.1.0 to 22.3.0 [\#1442](https://github.com/jrnl-org/jrnl/pull/1442) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump mkdocs from 1.2.3 to 1.3.0 [\#1441](https://github.com/jrnl-org/jrnl/pull/1441) ([dependabot[bot]](https://github.com/apps/dependabot)) From d6d6db0aa328cd7a6895bdce5e25e296c8122f50 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 30 Apr 2022 12:39:36 -0700 Subject: [PATCH 0612/1132] Display "No entry to save, because no text was received" after empty entry on cmdline (#1459) * Display "Entry not saved" after empty entry on cmdline * update error message --- jrnl/jrnl.py | 8 +++----- jrnl/messages.py | 2 +- tests/bdd/features/write.feature | 18 ++++++++++++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 8014b628..f6715f76 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -134,11 +134,9 @@ def write_mode(args, config, journal, **kwargs): else: raw = _write_in_editor(config) - if not raw: - logging.error("Write mode: couldn't get raw text") - raise JrnlException( - Message(MsgText.JrnlExceptionMessage.NoTextReceived, MsgType.ERROR) - ) + if not raw or raw.isspace(): + logging.error("Write mode: couldn't get raw text or entry was empty") + raise JrnlException(Message(MsgText.NoTextReceived, MsgType.ERROR)) logging.debug( 'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw diff --git a/jrnl/messages.py b/jrnl/messages.py index e6a1933a..48684195 100644 --- a/jrnl/messages.py +++ b/jrnl/messages.py @@ -98,7 +98,7 @@ class MsgText(Enum): """ NoTextReceived = """ - Nothing saved to file + No entry to save, because no text was received """ # --- Upgrade --- # diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 60f22002..608bc772 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -73,12 +73,12 @@ Feature: Writing new entries. | basic_dayone.yaml | | basic_folder.yaml | - Scenario Outline: Writing an empty entry from the editor should yield "Nothing saved to file" message + Scenario Outline: Writing an empty entry from the editor should yield "No entry to save" message Given we use the config "" And we write nothing to the editor if opened And we use the password "test" if prompted When we run "jrnl --edit" - Then the error output should contain "Nothing saved to file" + Then the error output should contain "No entry to save, because no text was received" And the editor should have been called Examples: configs @@ -89,6 +89,20 @@ Feature: Writing new entries. | basic_encrypted.yaml | | basic_onefile.yaml | + Scenario Outline: Writing an empty entry from the command line should yield "No entry to save" message + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl" and enter "\x04" + Then the error output should contain "No entry to save, because no text was received" + When we run "jrnl" and enter " \t \n \x04" + Then the error output should contain "No entry to save, because no text was received" + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | Scenario Outline: Writing an empty entry from the command line with no editor should yield nothing Given we use the config "" From 6a12853b658c571387e98def2d17e8ff84624448 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Apr 2022 19:41:10 +0000 Subject: [PATCH 0613/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83b128ad..a8cf2bd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ - Reformat additional messages and finish centralizing exception handling [\#1424](https://github.com/jrnl-org/jrnl/pull/1424) ([wren](https://github.com/wren)) - Reformat messages and add new centralized exception handling [\#1417](https://github.com/jrnl-org/jrnl/pull/1417) ([wren](https://github.com/wren)) +**Fixed bugs:** + +- "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) + **Deprecated:** - Remove "sample" format and its asteval dependency [\#1435](https://github.com/jrnl-org/jrnl/issues/1435) From 41e4b81192b2930cb3dfa5e47c2e8b97aca8f687 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 7 May 2022 10:49:23 -0700 Subject: [PATCH 0614/1132] Bump cryptography from 37.0.1 to 37.0.2 (#1467) Bumps [cryptography](https://github.com/pyca/cryptography) from 37.0.1 to 37.0.2. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/37.0.1...37.0.2) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/poetry.lock b/poetry.lock index afa20f71..38f8aca6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -137,7 +137,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "37.0.1" +version = "37.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -1054,28 +1054,28 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-37.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:74b55f67f4cf026cb84da7a1b04fc2a1d260193d4ad0ea5e9897c8b74c1e76ac"}, - {file = "cryptography-37.0.1-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:0db5cf21bd7d092baacb576482b0245102cea2d3cf09f09271ce9f69624ecb6f"}, - {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:faf0f5456c059c7b1c29441bdd5e988f0ba75bdc3eea776520d8dcb1e30e1b5c"}, - {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:06bfafa6e53ccbfb7a94be4687b211a025ce0625e3f3c60bb15cd048a18f3ed8"}, - {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf585476fcbcd37bed08072e8e2db3954ce1bfc68087a2dc9c19cfe0b90979ca"}, - {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d4daf890e674d191757d8d7d60dc3a29c58c72c7a76a05f1c0a326013f47e8b"}, - {file = "cryptography-37.0.1-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:ae1cd29fbe6b716855454e44f4bf743465152e15d2d317303fe3b58ee9e5af7a"}, - {file = "cryptography-37.0.1-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:451aaff8b8adf2dd0597cbb1fdcfc8a7d580f33f843b7cce75307a7f20112dd8"}, - {file = "cryptography-37.0.1-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:1858eff6246bb8bbc080eee78f3dd1528739e3f416cba5f9914e8631b8df9871"}, - {file = "cryptography-37.0.1-cp36-abi3-win32.whl", hash = "sha256:e69a0e36e62279120e648e787b76d79b41e0f9e86c1c636a4f38d415595c722e"}, - {file = "cryptography-37.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:a18ff4bfa9d64914a84d7b06c46eb86e0cc03113470b3c111255aceb6dcaf81d"}, - {file = "cryptography-37.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cce90609e01e1b192fae9e13665058ab46b2ea53a3c05a3ea74a3eb8c3af8857"}, - {file = "cryptography-37.0.1-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c4a58eeafbd7409054be41a377e726a7904a17c26f45abf18125d21b1215b08b"}, - {file = "cryptography-37.0.1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:618391152147a1221c87b1b0b7f792cafcfd4b5a685c5c72eeea2ddd29aeceff"}, - {file = "cryptography-37.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ceae26f876aabe193b13a0c36d1bb8e3e7e608d17351861b437bd882f617e9f"}, - {file = "cryptography-37.0.1-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:930b829e8a2abaf43a19f38277ae3c5e1ffcf547b936a927d2587769ae52c296"}, - {file = "cryptography-37.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:58021d6e9b1d88b1105269d0da5e60e778b37dfc0e824efc71343dd003726831"}, - {file = "cryptography-37.0.1-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b1ee5c82cf03b30f6ae4e32d2bcb1e167ef74d6071cbb77c2af30f101d0b360b"}, - {file = "cryptography-37.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f095988548ec5095e3750cdb30e6962273d239b1998ba1aac66c0d5bee7111c1"}, - {file = "cryptography-37.0.1-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:125702572be12bcd318e3a14e9e70acd4be69a43664a75f0397e8650fe3c6cc3"}, - {file = "cryptography-37.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:315af6268de72bcfa0bb3401350ce7d921f216e6b60de12a363dad128d9d459f"}, - {file = "cryptography-37.0.1.tar.gz", hash = "sha256:d610d0ee14dd9109006215c7c0de15eee91230b70a9bce2263461cf7c3720b83"}, + {file = "cryptography-37.0.2-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:ef15c2df7656763b4ff20a9bc4381d8352e6640cfeb95c2972c38ef508e75181"}, + {file = "cryptography-37.0.2-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3c81599befb4d4f3d7648ed3217e00d21a9341a9a688ecdd615ff72ffbed7336"}, + {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2bd1096476aaac820426239ab534b636c77d71af66c547b9ddcd76eb9c79e004"}, + {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:31fe38d14d2e5f787e0aecef831457da6cec68e0bb09a35835b0b44ae8b988fe"}, + {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:093cb351031656d3ee2f4fa1be579a8c69c754cf874206be1d4cf3b542042804"}, + {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59b281eab51e1b6b6afa525af2bd93c16d49358404f814fe2c2410058623928c"}, + {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:0cc20f655157d4cfc7bada909dc5cc228211b075ba8407c46467f63597c78178"}, + {file = "cryptography-37.0.2-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:f8ec91983e638a9bcd75b39f1396e5c0dc2330cbd9ce4accefe68717e6779e0a"}, + {file = "cryptography-37.0.2-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:46f4c544f6557a2fefa7ac8ac7d1b17bf9b647bd20b16decc8fbcab7117fbc15"}, + {file = "cryptography-37.0.2-cp36-abi3-win32.whl", hash = "sha256:731c8abd27693323b348518ed0e0705713a36d79fdbd969ad968fbef0979a7e0"}, + {file = "cryptography-37.0.2-cp36-abi3-win_amd64.whl", hash = "sha256:471e0d70201c069f74c837983189949aa0d24bb2d751b57e26e3761f2f782b8d"}, + {file = "cryptography-37.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a68254dd88021f24a68b613d8c51d5c5e74d735878b9e32cc0adf19d1f10aaf9"}, + {file = "cryptography-37.0.2-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:a7d5137e556cc0ea418dca6186deabe9129cee318618eb1ffecbd35bee55ddc1"}, + {file = "cryptography-37.0.2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aeaba7b5e756ea52c8861c133c596afe93dd716cbcacae23b80bc238202dc023"}, + {file = "cryptography-37.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95e590dd70642eb2079d280420a888190aa040ad20f19ec8c6e097e38aa29e06"}, + {file = "cryptography-37.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:1b9362d34363f2c71b7853f6251219298124aa4cc2075ae2932e64c91a3e2717"}, + {file = "cryptography-37.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e53258e69874a306fcecb88b7534d61820db8a98655662a3dd2ec7f1afd9132f"}, + {file = "cryptography-37.0.2-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:1f3bfbd611db5cb58ca82f3deb35e83af34bb8cf06043fa61500157d50a70982"}, + {file = "cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:419c57d7b63f5ec38b1199a9521d77d7d1754eb97827bbb773162073ccd8c8d4"}, + {file = "cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:dc26bb134452081859aa21d4990474ddb7e863aa39e60d1592800a8865a702de"}, + {file = "cryptography-37.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3b8398b3d0efc420e777c40c16764d6870bcef2eb383df9c6dbb9ffe12c64452"}, + {file = "cryptography-37.0.2.tar.gz", hash = "sha256:f224ad253cc9cea7568f49077007d2263efa57396a2f2f78114066fd54b5c68e"}, ] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, From 048c9d40e7aaa7f3500eafad42a6bace5e5d19e7 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 7 May 2022 17:51:26 +0000 Subject: [PATCH 0615/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8cf2bd4..bbaf7886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ **Fixed bugs:** - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) +- Display "No entry to save, because no text was received" after empty entry on cmdline [\#1459](https://github.com/jrnl-org/jrnl/pull/1459) ([apainintheneck](https://github.com/apainintheneck)) **Deprecated:** @@ -27,6 +28,7 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump cryptography from 37.0.1 to 37.0.2 [\#1467](https://github.com/jrnl-org/jrnl/pull/1467) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.2 to 37.0.1 [\#1462](https://github.com/jrnl-org/jrnl/pull/1462) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 7.1.1 to 7.1.2 [\#1458](https://github.com/jrnl-org/jrnl/pull/1458) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pyproject-flake8 from 0.0.1a3 to 0.0.1a4 [\#1447](https://github.com/jrnl-org/jrnl/pull/1447) ([dependabot[bot]](https://github.com/apps/dependabot)) From 74200f8dc4347d23a5be030c2e0a0ee85c8f68a8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 7 May 2022 11:11:00 -0700 Subject: [PATCH 0616/1132] Yaml export errors now don't show stack trace (#1449) * Yaml export errors now don't show stacktrace * Add test for user-friendly error when exporting YAML to a nonexistent directory * Leave partially written to files after export error * unskip working tests Co-authored-by: Micah Jerome Ellison Co-authored-by: Jonathan Wren --- jrnl/plugins/text_exporter.py | 4 ++++ jrnl/plugins/yaml_exporter.py | 12 ++++-------- tests/bdd/features/format.feature | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index c9eaaf14..4a5300df 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -35,6 +35,8 @@ class TextExporter: return f"[Journal exported to {path}]" except IOError as e: return f"[{ERROR_COLOR}ERROR{RESET_COLOR}: {e.filename} {e.strerror}]" + except RuntimeError as e: + return e @classmethod def make_filename(cls, entry): @@ -54,6 +56,8 @@ class TextExporter: return "[{2}ERROR{3}: {0} {1}]".format( e.filename, e.strerror, ERROR_COLOR, RESET_COLOR ) + except RuntimeError as e: + return e return "[Journal exported to {}]".format(path) def _slugify(string): diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 3c627cd5..8983d2e4 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -23,12 +23,10 @@ class YAMLExporter(TextExporter): def export_entry(cls, entry, to_multifile=True): """Returns a markdown representation of a single entry, with YAML front matter.""" if to_multifile is False: - print( + raise RuntimeError( f"{ERROR_COLOR}ERROR{RESET_COLOR}: YAML export must be to individual files. Please \ - specify a directory to export to.", - file=sys.stderr, + specify a directory to export to." ) - return date_str = entry.date.strftime(entry.journal.config["timeformat"]) body_wrapper = "\n" if entry.body else "" @@ -131,10 +129,8 @@ class YAMLExporter(TextExporter): @classmethod def export_journal(cls, journal): """Returns an error, as YAML export requires a directory as a target.""" - print( + raise RuntimeError( "{}ERROR{}: YAML export must be to individual files. Please specify a directory to export to.".format( ERROR_COLOR, RESET_COLOR - ), - file=sys.stderr, + ) ) - return diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index dc5c92ca..3f0decb2 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -425,6 +425,20 @@ Feature: Custom formats | basic_folder.yaml | # | basic_dayone.yaml | + Scenario Outline: Exporting YAML to nonexistent directory leads to user-friendly error with no traceback + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --export yaml --file nonexistent_dir" + Then the output should contain "YAML export must be to individual files" + And the output should not contain "Traceback" + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + @skip_win # @todo YAML exporter does not correctly export emoji on Windows Scenario Outline: Add a blank line to YAML export if there isn't one already # https://github.com/jrnl-org/jrnl/issues/768 From 71c1d38d50eb14b91b7fe2ef192cd0cb221b5f2e Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 7 May 2022 18:12:57 +0000 Subject: [PATCH 0617/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbaf7886..60bc6350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,9 @@ **Fixed bugs:** - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) +- Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) - Display "No entry to save, because no text was received" after empty entry on cmdline [\#1459](https://github.com/jrnl-org/jrnl/pull/1459) ([apainintheneck](https://github.com/apainintheneck)) +- Yaml export errors now don't show stack trace [\#1449](https://github.com/jrnl-org/jrnl/pull/1449) ([apainintheneck](https://github.com/apainintheneck)) **Deprecated:** From 792f188eccacd592128dc45fed25ce87064f2f82 Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 7 May 2022 21:13:36 +0200 Subject: [PATCH 0618/1132] Give a proper message when trying to use an empty config file (#1461) * Added check for empty config file and if so, use default config * Added check for empty config file and if so, use default config * Fix and add tests for empty config file * Exit program with message if config is empty. bdd-test doesn't add version if file is (and should stay) empty. * Exit program with message if config is empty. * bdd-test doesn't add version if file is (and should stay) empty. Co-authored-by: Micah Jerome Ellison --- jrnl/install.py | 4 ++++ tests/bdd/features/config_file.feature | 12 +++++++++++- tests/data/configs/empty_file.yaml | 0 tests/lib/given_steps.py | 6 +++++- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tests/data/configs/empty_file.yaml diff --git a/jrnl/install.py b/jrnl/install.py index 306b44e1..f8322fba 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -75,6 +75,10 @@ def load_or_install_jrnl(alt_config_path): logging.debug("Reading configuration from file %s", config_path) config = load_config(config_path) + if config is None: + print("Unable to parse config file", file=sys.stderr) + sys.exit() + if is_old_version(config_path): from jrnl import upgrade diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index 4f306b54..0bba7037 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -85,7 +85,6 @@ Feature: Multiple journals Then the output should contain "Journal encrypted to features/journals/basic_onefile.journal" And the config should contain "encrypt: false" - Scenario: Don't overwrite main config when decrypting a journal in an alternate config Given the config "editor_encrypted.yaml" exists And we use the password "bad doggie no biscuit" if prompted @@ -93,3 +92,14 @@ Feature: Multiple journals When we run "jrnl --cf editor_encrypted.yaml --decrypt" Then the config should contain "encrypt: true" And the output should not contain "Wrong password" + + Scenario: Show an error message when the config file is empty + Given we use the config "empty_file.yaml" + When we run "jrnl -1" + Then the error output should contain "Unable to parse config file" + + Scenario: Show an error message when using --config-file with empty file + Given the config "empty_file.yaml" exists + And we use the config "basic_onefile.yaml" + When we run "jrnl --cf empty_file.yaml" + Then the error output should contain "Unable to parse config file" diff --git a/tests/data/configs/empty_file.yaml b/tests/data/configs/empty_file.yaml new file mode 100644 index 00000000..e69de29b diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index ba619dba..dd7c4720 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -101,7 +101,11 @@ def we_use_the_config(request, temp_dir, working_dir): # @todo get rid of this by using default config values # merge in version number - if config_file.endswith("yaml") and os.path.exists(config_dest): + if ( + config_file.endswith("yaml") + and os.path.exists(config_dest) + and os.path.getsize(config_dest) > 0 + ): # Add jrnl version to file for 2.x journals with open(config_dest, "a") as cf: cf.write("version: {}".format(__version__)) From 4dacd86bc39eca53024f4f3a2f502fef5e0a76bb Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 7 May 2022 19:15:14 +0000 Subject: [PATCH 0619/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60bc6350..7da01438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,10 @@ **Fixed bugs:** +- Empty config file leads to confusing error message [\#1420](https://github.com/jrnl-org/jrnl/issues/1420) - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) - Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- Give a proper message when trying to use an empty config file [\#1461](https://github.com/jrnl-org/jrnl/pull/1461) ([jonakeys](https://github.com/jonakeys)) - Display "No entry to save, because no text was received" after empty entry on cmdline [\#1459](https://github.com/jrnl-org/jrnl/pull/1459) ([apainintheneck](https://github.com/apainintheneck)) - Yaml export errors now don't show stack trace [\#1449](https://github.com/jrnl-org/jrnl/pull/1449) ([apainintheneck](https://github.com/apainintheneck)) From 8458cdb06f4cf17602f3d9c4a1f6333518167b8a Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 7 May 2022 12:19:37 -0700 Subject: [PATCH 0620/1132] Fixed -not option with no arguments bug (#1466) --- jrnl/args.py | 4 ++-- tests/unit/test_parse_args.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/jrnl/args.py b/jrnl/args.py index dba5a749..6a2a86ea 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -243,10 +243,10 @@ def parse_args(args=[]): reading.add_argument( "-not", dest="excluded", - nargs="?", + nargs=1, default=[], metavar="TAG", - action="append", + action="extend", help="Exclude entries with this tag", ) diff --git a/tests/unit/test_parse_args.py b/tests/unit/test_parse_args.py index f408c9aa..aadc6684 100644 --- a/tests/unit/test_parse_args.py +++ b/tests/unit/test_parse_args.py @@ -88,6 +88,12 @@ def test_end_date_alone(): assert expected == cli_as_dict("-to 2020-01-01") +def test_not_empty(): + with pytest.raises(SystemExit) as wrapped_e: + cli_as_dict("-not") + assert wrapped_e.value.code == 2 + + def test_not_alone(): assert cli_as_dict("-not test") == expected_args(excluded=["test"]) From e6ed64ac7af2e3af82d7619109c073051cc91145 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 7 May 2022 19:21:16 +0000 Subject: [PATCH 0621/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7da01438..daef0399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,9 @@ - Empty config file leads to confusing error message [\#1420](https://github.com/jrnl-org/jrnl/issues/1420) - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) +- '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) - Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- The `-not` option with no arguments now outputs error instead of stack trace [\#1466](https://github.com/jrnl-org/jrnl/pull/1466) ([apainintheneck](https://github.com/apainintheneck)) - Give a proper message when trying to use an empty config file [\#1461](https://github.com/jrnl-org/jrnl/pull/1461) ([jonakeys](https://github.com/jonakeys)) - Display "No entry to save, because no text was received" after empty entry on cmdline [\#1459](https://github.com/jrnl-org/jrnl/pull/1459) ([apainintheneck](https://github.com/apainintheneck)) - Yaml export errors now don't show stack trace [\#1449](https://github.com/jrnl-org/jrnl/pull/1449) ([apainintheneck](https://github.com/apainintheneck)) From 33c9dce80d7f2c7b778bb2d92568be5d04ab1fab Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Sat, 21 May 2022 14:03:27 -0500 Subject: [PATCH 0622/1132] Implement --change-time flag (#1452) * Implement --change-time flag * Remove todo from --change-time bdd folder journal tests * Add warning when --change-time used with no matching entries * Add a test to make sure running --change-time with nothing prints a warning and doesn't change anything * Add prompt for --change-time * Don't prompt for --change-time when used with --edit and only one entry * When using --edit and --change-time, change the time before editing * Add test for --change-time used with --edit * Modify failing --change-time test to conform to text in develop branch --- jrnl/FolderJournal.py | 12 ++ jrnl/Journal.py | 24 ++- jrnl/args.py | 8 + jrnl/jrnl.py | 57 +++++- jrnl/messages.py | 4 + tests/bdd/features/change_time.feature | 240 +++++++++++++++++++++++++ tests/bdd/test_features.py | 1 + tests/unit/test_parse_args.py | 8 + 8 files changed, 342 insertions(+), 12 deletions(-) create mode 100644 tests/bdd/features/change_time.feature diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index 74f6291b..62b7ade5 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -8,6 +8,7 @@ import fnmatch import os from . import Journal +from . import time def get_files(journal_config): @@ -89,6 +90,17 @@ class Folder(Journal.Journal): self.entries.remove(entry) self._diff_entry_dates.append(entry.date) + def change_date_entries(self, date): + """Changes entry dates to given date.""" + + date = time.parse(date) + + self._diff_entry_dates.append(date) + + for entry in self.entries: + self._diff_entry_dates.append(entry.date) + entry.date = date + def parse_editable_str(self, edited): """Parses the output of self.editable_str and updates its entries.""" mod_entries = self._parse(edited) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index bf446a92..13c5363a 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -261,23 +261,29 @@ class Journal: for entry in entries_to_delete: self.entries.remove(entry) - def prompt_delete_entries(self): - """Prompts for deletion of each of the entries in a journal. - Returns the entries the user wishes to delete.""" + def change_date_entries(self, date): + """Changes entry dates to given date.""" + date = time.parse(date) - to_delete = [] + for entry in self.entries: + entry.date = date - def ask_delete(entry): + def prompt_action_entries(self, message): + """Prompts for action for each entry in a journal, using given message. + Returns the entries the user wishes to apply the action on.""" + to_act = [] + + def ask_action(entry): return yesno( - f"Delete entry '{entry.pprint(short=True)}'?", + f"{message} '{entry.pprint(short=True)}'?", default=False, ) for entry in self.entries: - if ask_delete(entry): - to_delete.append(entry) + if ask_action(entry): + to_act.append(entry) - return to_delete + return to_act def new_entry(self, raw, date=None, sort=True): """Constructs a new entry from some raw text input. diff --git a/jrnl/args.py b/jrnl/args.py index 6a2a86ea..1f3e3c9a 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -267,6 +267,14 @@ def parse_args(args=[]): action="store_true", help="Interactively deletes selected entries", ) + exporting.add_argument( + "--change-time", + dest="change_time", + nargs="?", + metavar="DATE", + const="now", + help="Change timestamp for seleted entries (default: now)", + ) exporting.add_argument( "--format", metavar="TYPE", diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index f6715f76..7c09734e 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -79,6 +79,7 @@ def _is_write_mode(args, config, **kwargs): args.contains, args.delete, args.edit, + args.change_time, args.export, args.end_date, args.today_in_history, @@ -150,7 +151,9 @@ def write_mode(args, config, journal, **kwargs): def search_mode(args, journal, **kwargs): """ Search for entries in a journal, then either: - 1. Send them to configured editor for user manipulation + 1. Send them to configured editor for user manipulation (and also + change their timestamps if requested) + 2. Change their timestamps 2. Delete them (with confirmation for each entry) 3. Display them (with formatting options) """ @@ -166,8 +169,27 @@ def search_mode(args, journal, **kwargs): # Where do the search results go? if args.edit: + # If we want to both edit and change time in one action + if args.change_time: + # Generate a new list instead of assigning so it won't be + # modified by _change_time_search_results + selected_entries = [e for e in journal.entries] + + no_change_time_prompt = len(journal.entries) == 1 + _change_time_search_results(no_prompt=no_change_time_prompt, **kwargs) + + # Re-filter the journal enties (_change_time_search_results + # puts the filtered entries back); use selected_entries + # instead of running _search_journal again, because times + # have changed since the original search + kwargs["old_entries"] = journal.entries + journal.entries = selected_entries + _edit_search_results(**kwargs) + elif args.change_time: + _change_time_search_results(**kwargs) + elif args.delete: _delete_search_results(**kwargs) @@ -236,6 +258,11 @@ def _search_journal(args, journal, **kwargs): journal.limit(args.limit) +def _other_entries(journal, entries): + """Find entries that are not in journal""" + return [e for e in entries if e not in journal.entries] + + def _edit_search_results(config, journal, old_entries, **kwargs): """ 1. Send the given journal entries to the user-configured editor @@ -252,7 +279,7 @@ def _edit_search_results(config, journal, old_entries, **kwargs): ) # separate entries we are not editing - other_entries = [e for e in old_entries if e not in journal.entries] + other_entries = _other_entries(journal, old_entries) # Get stats now for summary later old_stats = _get_predit_stats(journal) @@ -309,7 +336,7 @@ def _delete_search_results(journal, old_entries, **kwargs): if not journal.entries: raise JrnlException(Message(MsgText.NothingToDelete, MsgType.ERROR)) - entries_to_delete = journal.prompt_delete_entries() + entries_to_delete = journal.prompt_action_entries("Delete entry") if entries_to_delete: journal.entries = old_entries @@ -318,6 +345,30 @@ def _delete_search_results(journal, old_entries, **kwargs): journal.write() +def _change_time_search_results(args, journal, old_entries, no_prompt=False, **kwargs): + if not journal.entries: + raise JrnlException(Message(MsgText.NothingToModify, MsgType.WARNING)) + + # separate entries we are not editing + other_entries = _other_entries(journal, old_entries) + + if no_prompt: + entries_to_change = journal.entries + else: + entries_to_change = journal.prompt_action_entries("Change time") + + if entries_to_change: + other_entries += [e for e in journal.entries if e not in entries_to_change] + journal.entries = entries_to_change + + date = time.parse(args.change_time) + journal.change_date_entries(date) + + journal.entries += other_entries + journal.sort() + journal.write() + + def _display_search_results(args, journal, **kwargs): if args.short or args.export == "short": print(journal.pprint(short=True)) diff --git a/jrnl/messages.py b/jrnl/messages.py index 48684195..34f45e7d 100644 --- a/jrnl/messages.py +++ b/jrnl/messages.py @@ -130,6 +130,10 @@ class MsgText(Enum): No entries to delete, because the search returned no results """ + NothingToModify = """ + No entries to modify, because the search returned no results + """ + class Message(NamedTuple): text: MsgText diff --git a/tests/bdd/features/change_time.feature b/tests/bdd/features/change_time.feature new file mode 100644 index 00000000..bd8e77f7 --- /dev/null +++ b/tests/bdd/features/change_time.feature @@ -0,0 +1,240 @@ +Feature: Change entry times in journal + Scenario Outline: Change time flag changes single entry timestamp + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl -1" + Then the output should contain "2020-09-24 09:14 The third entry finally" + When we run "jrnl -1 --change-time '2022-04-23 10:30'" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2022-04-23 10:30 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + Scenario Outline: Change flag changes prompted entries + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl -1" + Then the output should contain "2020-09-24 09:14 The third entry finally" + When we run "jrnl --change-time '2022-04-23 10:30'" and enter + Y + N + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2022-04-23 10:30 Entry the first. + 2022-04-23 10:30 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with nonsense input changes nothing + Given we use the config "" + When we run "jrnl --change-time now asdfasdf" + Then the output should contain "No entries to modify" + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + + Scenario Outline: Change time flag with tag only changes tagged entries + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' @ipsum" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + 2022-04-23 10:30 Entry the first. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with multiple tags changes all entries matching any of the tags + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' @ipsum @tagthree" and enter + Y + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2022-04-23 10:30 Entry the first. + 2022-04-23 10:30 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with -and changes boolean AND of tagged entries + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' -and @tagone @tagtwo" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + 2022-04-23 10:30 Entry the first. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with -not does not change entries from given tag + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' @tagone -not @ipsum" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2022-04-23 10:30 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with -from search operator only changes entries since that date + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' -from 2020-09-01" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2022-04-23 10:30 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with -to only changes entries up to specified date + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' -to 2020-08-31" and enter + Y + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-09-24 09:14 The third entry finally after weeks without writing. + 2022-04-23 10:30 Entry the first. + 2022-04-23 10:30 A second entry in what I hope to be a long series. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with -starred only changes starred entries + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' -starred" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-09-24 09:14 The third entry finally after weeks without writing. + 2022-04-23 10:30 A second entry in what I hope to be a long series. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with -contains only changes entries containing expression + Given we use the config "" + When we run "jrnl --change-time '2022-04-23 10:30' -contains dignissim" and enter + Y + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + 2022-04-23 10:30 Entry the first. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo + + + Scenario Outline: Change time flag with no enties specified changes nothing + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --change-time" and enter + N + N + N + When we run "jrnl -99 --short" + Then the output should be + 2020-08-29 11:11 Entry the first. + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2020-09-24 09:14 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + + Scenario Outline: --change-time with --edit modifies selected entries + Given we use the config "" + And we write nothing to the editor if opened + And we use the password "test" if prompted + When we run "jrnl --change-time '2022-04-23 10:30' --edit" and enter + Y + N + Y + Then the error output should contain "No entry to save" + And the editor should have been called + When we run "jrnl -99 --short" + Then the output should be + 2020-08-31 14:32 A second entry in what I hope to be a long series. + 2022-04-23 10:30 Entry the first. + 2022-04-23 10:30 The third entry finally after weeks without writing. + + Examples: Configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + # | basic_dayone.yaml | @todo diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py index 5ef3506e..04f9d46f 100644 --- a/tests/bdd/test_features.py +++ b/tests/bdd/test_features.py @@ -5,6 +5,7 @@ scenarios("features/config_file.feature") scenarios("features/core.feature") scenarios("features/datetime.feature") scenarios("features/delete.feature") +scenarios("features/change_time.feature") scenarios("features/encrypt.feature") scenarios("features/file_storage.feature") scenarios("features/format.feature") diff --git a/tests/unit/test_parse_args.py b/tests/unit/test_parse_args.py index aadc6684..7acae571 100644 --- a/tests/unit/test_parse_args.py +++ b/tests/unit/test_parse_args.py @@ -17,6 +17,7 @@ def expected_args(**kwargs): "contains": None, "debug": False, "delete": False, + "change_time": None, "edit": False, "end_date": None, "today_in_history": False, @@ -58,6 +59,13 @@ def test_delete_alone(): assert cli_as_dict("--delete") == expected_args(delete=True) +def test_change_time_alone(): + assert cli_as_dict("--change-time") == expected_args(change_time="now") + assert cli_as_dict("--change-time yesterday") == expected_args( + change_time="yesterday" + ) + + def test_diagnostic_alone(): from jrnl.commands import preconfig_diagnostic From 55b72a49b6620dce08e10a1f6bf116c7f1450c4f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 May 2022 19:05:14 +0000 Subject: [PATCH 0623/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index daef0399..f8e764b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ **Implemented enhancements:** +- Add --change-time command to change the timestamp of an entry [\#1429](https://github.com/jrnl-org/jrnl/issues/1429) +- Implement --change-time flag [\#1452](https://github.com/jrnl-org/jrnl/pull/1452) ([richardjs](https://github.com/richardjs)) - Reformat additional messages and finish centralizing exception handling [\#1424](https://github.com/jrnl-org/jrnl/pull/1424) ([wren](https://github.com/wren)) - Reformat messages and add new centralized exception handling [\#1417](https://github.com/jrnl-org/jrnl/pull/1417) ([wren](https://github.com/wren)) @@ -23,13 +25,13 @@ **Deprecated:** - Remove "sample" format and its asteval dependency [\#1435](https://github.com/jrnl-org/jrnl/issues/1435) +- Drop support for Python 3.7 and 3.8 [\#1412](https://github.com/jrnl-org/jrnl/pull/1412) ([micahellison](https://github.com/micahellison)) **Build:** - Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) - Pin jinja2 in docs requirements to keep readthedocs builds from failing [\#1439](https://github.com/jrnl-org/jrnl/pull/1439) ([micahellison](https://github.com/micahellison)) - Tidy up git ignore [\#1414](https://github.com/jrnl-org/jrnl/pull/1414) ([nelnog](https://github.com/nelnog)) -- Drop support for Python 3.7 and 3.8 [\#1412](https://github.com/jrnl-org/jrnl/pull/1412) ([micahellison](https://github.com/micahellison)) **Packaging:** From 86c8466ae49c4a5c9d0c22e0eb701c02a65d3e6d Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 21 May 2022 23:03:18 +0200 Subject: [PATCH 0624/1132] Show name of journal when creating a password/encrypting (#1478) * Show name of journal when creating password --- jrnl/prompt.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jrnl/prompt.py b/jrnl/prompt.py index 3cdd3f6f..48dbccdc 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -5,9 +5,10 @@ import getpass import sys -def create_password( - journal_name: str, prompt: str = "Enter password for new journal: " -) -> str: +def create_password(journal_name: str) -> str: + + prompt = f"Enter password for journal '{journal_name}': " + while True: pw = getpass.getpass(prompt) if not pw: From 1ce7ce8bfc99c8b3fd66dcb09810324d18b31040 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 May 2022 21:05:09 +0000 Subject: [PATCH 0625/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8e764b7..c4e90dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ **Implemented enhancements:** - Add --change-time command to change the timestamp of an entry [\#1429](https://github.com/jrnl-org/jrnl/issues/1429) +- Show name of journal when creating a password/encrypting [\#1478](https://github.com/jrnl-org/jrnl/pull/1478) ([jonakeys](https://github.com/jonakeys)) - Implement --change-time flag [\#1452](https://github.com/jrnl-org/jrnl/pull/1452) ([richardjs](https://github.com/richardjs)) - Reformat additional messages and finish centralizing exception handling [\#1424](https://github.com/jrnl-org/jrnl/pull/1424) ([wren](https://github.com/wren)) - Reformat messages and add new centralized exception handling [\#1417](https://github.com/jrnl-org/jrnl/pull/1417) ([wren](https://github.com/wren)) From ea6df4705cf3256f012fe6be036b2ccae6623a18 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 21 May 2022 14:06:07 -0700 Subject: [PATCH 0626/1132] Always expand all paths (journals, templates, etc) (#1468) * Refactored path expansion calls into a new path.py file This also fixed bugs with relative journal and template paths. * Update tests for new path functions Also, make the tests specific to Windows, Mac & Linux Co-authored-by: Jonathan Wren Co-authored-by: Micah Jerome Ellison --- jrnl/Journal.py | 3 +- jrnl/config.py | 9 ++-- jrnl/install.py | 13 ++--- jrnl/jrnl.py | 7 ++- jrnl/path.py | 13 +++++ jrnl/upgrade.py | 11 ++--- pyproject.toml | 4 ++ tests/conftest.py | 30 ++++++++++++ tests/unit/test_path.py | 103 ++++++++++++++++++++++++++++++++++++++++ 9 files changed, 172 insertions(+), 21 deletions(-) create mode 100644 jrnl/path.py create mode 100644 tests/unit/test_path.py diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 13c5363a..987c5426 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -11,6 +11,7 @@ import sys from . import Entry from . import time from .prompt import yesno +from .path import expand_path class Tag: @@ -410,7 +411,7 @@ def open_journal(journal_name, config, legacy=False): backwards compatibility with jrnl 1.x """ config = config.copy() - config["journal"] = os.path.expanduser(os.path.expandvars(config["journal"])) + config["journal"] = expand_path(config["journal"]) if os.path.isdir(config["journal"]): if config["encrypt"]: diff --git a/jrnl/config.py b/jrnl/config.py index 2b07b14b..67284c4a 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -15,6 +15,7 @@ from jrnl.messages import MsgType from .color import ERROR_COLOR from .color import RESET_COLOR from .output import list_journals +from .path import home_dir # Constants DEFAULT_CONFIG_NAME = "jrnl.yaml" @@ -83,9 +84,7 @@ def get_config_path(): ), ) - return os.path.join( - config_directory_path or os.path.expanduser("~"), DEFAULT_CONFIG_NAME - ) + return os.path.join(config_directory_path or home_dir(), DEFAULT_CONFIG_NAME) def get_default_config(): @@ -112,9 +111,7 @@ def get_default_config(): def get_default_journal_path(): - journal_data_path = xdg.BaseDirectory.save_data_path( - XDG_RESOURCE - ) or os.path.expanduser("~") + journal_data_path = xdg.BaseDirectory.save_data_path(XDG_RESOURCE) or home_dir() return os.path.join(journal_data_path, DEFAULT_JOURNAL_NAME) diff --git a/jrnl/install.py b/jrnl/install.py index f8322fba..0e29eb48 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -7,6 +7,9 @@ import logging import os import sys +from .path import home_dir +from .path import absolute_path +from .path import expand_path from .config import DEFAULT_JOURNAL_KEY from .config import get_config_path from .config import get_default_config @@ -45,7 +48,7 @@ def find_default_config(): config_path = ( get_config_path() if os.path.exists(get_config_path()) - else os.path.join(os.path.expanduser("~"), ".jrnl_config") + else os.path.join(home_dir(), ".jrnl_config") ) return config_path @@ -101,11 +104,9 @@ def install(): # Where to create the journal? default_journal_path = get_default_journal_path() path_query = f"Path to your journal file (leave blank for {default_journal_path}): " - journal_path = os.path.abspath(input(path_query).strip() or default_journal_path) + journal_path = absolute_path(input(path_query).strip() or default_journal_path) default_config = get_default_config() - default_config["journals"][DEFAULT_JOURNAL_KEY] = os.path.expanduser( - os.path.expandvars(journal_path) - ) + default_config["journals"][DEFAULT_JOURNAL_KEY] = journal_path # If the folder doesn't exist, create it path = os.path.split(default_config["journals"][DEFAULT_JOURNAL_KEY])[0] @@ -138,7 +139,7 @@ def _initialize_autocomplete(): def _autocomplete_path(text, state): - expansions = glob.glob(os.path.expanduser(os.path.expandvars(text)) + "*") + expansions = glob.glob(expand_path(text) + "*") expansions = [e + "/" if os.path.isdir(e) else e for e in expansions] expansions.append(None) return expansions[state] diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 7c09734e..aa26d1e1 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -14,6 +14,7 @@ from .editor import get_text_from_editor from .editor import get_text_from_stdin from . import time from .override import apply_overrides +from .path import expand_path from jrnl.exception import JrnlException from jrnl.messages import Message @@ -217,8 +218,10 @@ def _get_editor_template(config, **kwargs): logging.debug("Write mode: no template configured") return "" + template_path = expand_path(config["template"]) + try: - template = open(config["template"]).read() + template = open(template_path).read() logging.debug("Write mode: template loaded: %s", template) except OSError: logging.error("Write mode: template not loaded") @@ -226,7 +229,7 @@ def _get_editor_template(config, **kwargs): Message( MsgText.CantReadTemplate, MsgType.ERROR, - {"template": config["template"]}, + {"template": template_path}, ) ) diff --git a/jrnl/path.py b/jrnl/path.py new file mode 100644 index 00000000..bb465d6e --- /dev/null +++ b/jrnl/path.py @@ -0,0 +1,13 @@ +import os.path + + +def home_dir(): + return os.path.expanduser("~") + + +def expand_path(path): + return os.path.expanduser(os.path.expandvars(path)) + + +def absolute_path(path): + return os.path.abspath(expand_path(path)) diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index 3027f4e7..b9fc0092 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -11,6 +11,7 @@ from .config import is_config_json from .config import load_config from .config import scope_config from .prompt import yesno +from .path import expand_path from jrnl.output import print_msg @@ -22,7 +23,7 @@ from jrnl.messages import MsgType def backup(filename, binary=False): print(f" Created a backup at {filename}.backup", file=sys.stderr) - filename = os.path.expanduser(os.path.expandvars(filename)) + filename = expand_path(filename) try: with open(filename, "rb" if binary else "r") as original: @@ -72,15 +73,13 @@ older versions of jrnl anymore. for journal_name, journal_conf in config["journals"].items(): if isinstance(journal_conf, dict): - path = journal_conf.get("journal") + path = expand_path(journal_conf.get("journal")) encrypt = journal_conf.get("encrypt") else: encrypt = config.get("encrypt") - path = journal_conf + path = expand_path(journal_conf) - if os.path.exists(os.path.expanduser(path)): - path = os.path.expanduser(path) - else: + if not os.path.exists(path): print(f"\nError: {path} does not exist.") continue diff --git a/pyproject.toml b/pyproject.toml index 88861740..4885344e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,10 @@ required_plugins = [ ] markers = [ "todo", + "skip_win", + "skip_posix", + "on_win", + "on_posix", ] addopts = [ "--pdbcls=IPython.terminal.debugger:Pdb" diff --git a/tests/conftest.py b/tests/conftest.py index fbbc3068..c4dc5ef5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,8 +2,10 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html from pytest import mark +from pytest import skip from jrnl.os_compat import on_windows +from jrnl.os_compat import on_posix pytest_plugins = [ @@ -15,11 +17,39 @@ pytest_plugins = [ def pytest_bdd_apply_tag(tag, function): + # skip markers if tag == "skip_win": marker = mark.skipif(on_windows(), reason="Skip test on Windows") + elif tag == "skip_posix": + marker = mark.skipif(on_posix(), reason="Skip test on Mac/Linux") + + # only on OS markers + elif tag == "on_win": + marker = mark.skipif(not on_windows(), reason="Skip test not on Windows") + elif tag == "on_posix": + marker = mark.skipif(not on_posix(), reason="Skip test not on Mac/Linux") else: # Fall back to pytest-bdd's default behavior return None marker(function) return True + + +def pytest_runtest_setup(item): + markers = [mark.name for mark in item.iter_markers()] + + on_win = on_windows() + on_nix = on_posix() + + if "skip_win" in markers and on_win: + skip("Skip test on Windows") + + if "skip_posix" in markers and on_nix: + skip("Skip test on Mac/Linux") + + if "on_win" in markers and not on_win: + skip("Skip test not on Windows") + + if "on_posix" in markers and not on_nix: + skip("Skip test not on Mac/Linux") diff --git a/tests/unit/test_path.py b/tests/unit/test_path.py new file mode 100644 index 00000000..a13b89e5 --- /dev/null +++ b/tests/unit/test_path.py @@ -0,0 +1,103 @@ +import pytest +import random +import string + +from os import getenv +from unittest.mock import patch + +from jrnl.path import home_dir +from jrnl.path import expand_path +from jrnl.path import absolute_path + + +@pytest.fixture +def home_dir_str(monkeypatch): + username = "username" + monkeypatch.setenv("USERPROFILE", username) # for windows + monkeypatch.setenv("HOME", username) # for *nix + return username + + +@pytest.fixture +def random_test_var(monkeypatch): + name = f"JRNL_TEST_{''.join(random.sample(string.ascii_uppercase, 10))}" + val = "".join(random.sample(string.ascii_lowercase, 25)) + monkeypatch.setenv(name, val) + return (name, val) + + +def test_home_dir(home_dir_str): + assert home_dir() == home_dir_str + + +@pytest.mark.on_posix +@pytest.mark.parametrize( + "path", + ["~"], +) +def test_expand_path_actually_expands_mac_linux(path): + # makes sure that path isn't being returns as-is + assert expand_path(path) != path + + +@pytest.mark.on_win +@pytest.mark.parametrize( + "path", + ["~", "%USERPROFILE%"], +) +def test_expand_path_actually_expands_windows(path): + # makes sure that path isn't being returns as-is + assert expand_path(path) != path + + +@pytest.mark.on_posix +@pytest.mark.parametrize( + "paths", + [ + ["~", "HOME"], + ], +) +def test_expand_path_expands_into_correct_value_mac_linux(paths): + input_path, expected_path = paths[0], paths[1] + assert expand_path(input_path) == getenv(expected_path) + + +@pytest.mark.on_win +@pytest.mark.parametrize( + "paths", + [ + ["~", "USERPROFILE"], + ["%USERPROFILE%", "USERPROFILE"], + ], +) +def test_expand_path_expands_into_correct_value_windows(paths): + input_path, expected_path = paths[0], paths[1] + assert expand_path(input_path) == getenv(expected_path) + + +@pytest.mark.on_posix +@pytest.mark.parametrize("_", range(25)) +def test_expand_path_expands_into_random_env_value_mac_linux(_, random_test_var): + var_name, var_value = random_test_var[0], random_test_var[1] + assert expand_path(var_name) == var_name + assert expand_path(f"${var_name}") == var_value # mac & linux + assert expand_path(f"${var_name}") == getenv(var_name) + + +@pytest.mark.on_win +@pytest.mark.parametrize("_", range(25)) +def test_expand_path_expands_into_random_env_value_windows(_, random_test_var): + var_name, var_value = random_test_var[0], random_test_var[1] + assert expand_path(var_name) == var_name + assert expand_path(f"%{var_name}%") == var_value # windows + assert expand_path(f"%{var_name}%") == getenv(var_name) + + +@patch("jrnl.path.expand_path") +@patch("os.path.abspath") +def test_absolute_path(mock_abspath, mock_expand_path): + test_val = "test_value" + + assert absolute_path(test_val) == mock_abspath.return_value + mock_expand_path.assert_called_with(test_val) + mock_abspath.assert_called_with(mock_expand_path.return_value) From 7771afc1a74a6582601346223e4d8642d57b635a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 May 2022 21:07:40 +0000 Subject: [PATCH 0627/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4e90dad..fb59f44c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) - '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) - Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- Always expand all paths \(journals, templates, etc\) [\#1468](https://github.com/jrnl-org/jrnl/pull/1468) ([apainintheneck](https://github.com/apainintheneck)) - The `-not` option with no arguments now outputs error instead of stack trace [\#1466](https://github.com/jrnl-org/jrnl/pull/1466) ([apainintheneck](https://github.com/apainintheneck)) - Give a proper message when trying to use an empty config file [\#1461](https://github.com/jrnl-org/jrnl/pull/1461) ([jonakeys](https://github.com/jonakeys)) - Display "No entry to save, because no text was received" after empty entry on cmdline [\#1459](https://github.com/jrnl-org/jrnl/pull/1459) ([apainintheneck](https://github.com/apainintheneck)) From 663f1519740c9e18f33af3cfbb5f573e8bdd6fbb Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 21 May 2022 23:11:55 +0200 Subject: [PATCH 0628/1132] Prompt for password change when using 'jrnl --encrypt' on already encrypted journal (#1477) * Create new password if journal already encrypted. * Add test for encrypting already encrypted journal. --- jrnl/commands.py | 10 ++++++++-- tests/bdd/features/encrypt.feature | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/jrnl/commands.py b/jrnl/commands.py index c795402a..87d3981d 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -17,6 +17,7 @@ from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText from jrnl.messages import MsgType +from jrnl.prompt import create_password def preconfig_diagnostic(_): @@ -84,9 +85,14 @@ def postconfig_encrypt(args, config, original_config, **kwargs): ) ) - journal.config["encrypt"] = True - new_journal = EncryptedJournal.from_journal(journal) + + # If journal is encrypted, create new password + if journal.config["encrypt"] is True: + print(f"Journal {journal.name} is already encrypted. Create a new password.") + new_journal.password = create_password(new_journal.name) + + journal.config["encrypt"] = True new_journal.write(args.filename) print( diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index 7f466c1d..78b21188 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -24,10 +24,11 @@ Feature: Encrypting and decrypting journals 2013-06-10 15:40 Life is good. - @todo Scenario: Trying to encrypt an already encrypted journal - # This should warn the user that the journal is already encrypted - + Given we use the config "encrypted.yaml" + When we run "jrnl --encrypt" and enter "bad doggie no biscuit" + Then the output should contain "already encrypted. Create a new password." + Then we should be prompted for a password Scenario Outline: Encrypting a journal Given we use the config "simple.yaml" From 11209b4b42a5acf7177db427483e55a1c50ad7a7 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 21 May 2022 14:13:24 -0700 Subject: [PATCH 0629/1132] Document --change-time in web-based docs' command line reference (#1471) * Document change-time in command line reference * Keep mkdocs version under 1.3 both locally and for readthedocs --- docs/reference-command-line.md | 5 + docs_theme/requirements.txt | 2 +- poetry.lock | 271 +++++++++++++++++---------------- pyproject.toml | 2 +- 4 files changed, 143 insertions(+), 137 deletions(-) diff --git a/docs/reference-command-line.md b/docs/reference-command-line.md index d0020d24..bc624fe5 100644 --- a/docs/reference-command-line.md +++ b/docs/reference-command-line.md @@ -90,6 +90,11 @@ the temporary file you were editing and makes the changes to your journal. Interactively deletes selected entries. You'll be asked to confirm deletion of each entry. +### --change-time DATE +Interactively changes the time of the selected entries to the date specified, +or to right now if no date is specified. You'll be asked to confirm each entry, +unless you are using this with `--edit` on a single entry. + ### --format TYPE Display selected entries in an alternate format. See [formats](formats.md). diff --git a/docs_theme/requirements.txt b/docs_theme/requirements.txt index fdc093ae..026d756c 100644 --- a/docs_theme/requirements.txt +++ b/docs_theme/requirements.txt @@ -1,2 +1,2 @@ -mkdocs==1.2.3 +mkdocs>=1.0,<1.3 jinja2==3.0.3 # https://github.com/readthedocs/readthedocs.org/issues/9037 diff --git a/poetry.lock b/poetry.lock index 38f8aca6..da8f99b8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -11,7 +11,7 @@ textwrap3 = ">=0.9.2" [[package]] name = "appnope" -version = "0.1.2" +version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" category = "dev" optional = false @@ -107,11 +107,11 @@ pycparser = "*" [[package]] name = "click" -version = "8.0.4" +version = "8.1.3" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -185,7 +185,7 @@ pyflakes = ">=2.4.0,<2.5.0" [[package]] name = "ghp-import" -version = "2.0.2" +version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." category = "dev" optional = false @@ -207,7 +207,7 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.11.2" +version = "4.11.3" description = "Read metadata from Python packages" category = "main" optional = false @@ -244,7 +244,7 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "8.1.1" +version = "8.3.0" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -265,7 +265,7 @@ stack-data = "*" traitlets = ">=5" [package.extras] -all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "pytest", "testpath", "trio", "pytest-asyncio"] +all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "trio"] black = ["black"] doc = ["Sphinx (>=1.3)"] kernel = ["ipykernel"] @@ -274,8 +274,8 @@ nbformat = ["nbformat"] notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["pytest", "pytest-asyncio", "testpath"] -test_extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "pytest", "testpath", "trio"] +test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] +test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"] [[package]] name = "jedi" @@ -294,23 +294,23 @@ testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] name = "jeepney" -version = "0.7.1" +version = "0.8.0" description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio", "async-timeout"] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] trio = ["trio", "async-generator"] [[package]] name = "jinja2" -version = "3.0.3" +version = "3.1.2" description = "A very fast and expressive template engine." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] MarkupSafe = ">=2.0" @@ -354,7 +354,7 @@ testing = ["pytest"] [[package]] name = "markdown" -version = "3.3.6" +version = "3.3.7" description = "Python implementation of Markdown." category = "dev" optional = false @@ -368,7 +368,7 @@ testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" -version = "2.1.0" +version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false @@ -403,7 +403,7 @@ python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.3.0" +version = "1.2.4" description = "Project documentation with Markdown." category = "dev" optional = false @@ -516,15 +516,15 @@ python-versions = "*" [[package]] name = "platformdirs" -version = "2.5.1" +version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" [package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] [[package]] name = "pluggy" @@ -548,7 +548,7 @@ python-versions = "*" [[package]] name = "prompt-toolkit" -version = "3.0.28" +version = "3.0.29" description = "Library for building powerful interactive command lines in Python" category = "dev" optional = false @@ -610,22 +610,22 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.11.2" +version = "2.12.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] name = "pyparsing" -version = "3.0.7" -description = "Python parsing module" +version = "3.0.8" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.8" [package.extras] -diagrams = ["jinja2", "railroad-diagrams"] +diagrams = ["railroad-diagrams", "jinja2"] [[package]] name = "pyproject-flake8" @@ -745,11 +745,11 @@ pyyaml = "*" [[package]] name = "rich" -version = "12.0.0" +version = "12.4.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false -python-versions = ">=3.6.2,<4.0.0" +python-versions = ">=3.6.3,<4.0.0" [package.dependencies] commonmark = ">=0.9.0,<0.10.0" @@ -783,7 +783,7 @@ python-versions = ">=3.5" [[package]] name = "secretstorage" -version = "3.3.1" +version = "3.3.2" description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = false @@ -854,11 +854,11 @@ test = ["pytest"] [[package]] name = "typing-extensions" -version = "4.1.1" -description = "Backported and Experimental Type Hints for Python 3.6+" +version = "4.2.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "tzlocal" @@ -873,7 +873,7 @@ pytz = "*" [[package]] name = "watchdog" -version = "2.1.6" +version = "2.1.7" description = "Filesystem events monitoring" category = "dev" optional = false @@ -917,15 +917,15 @@ tests = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" -version = "3.7.0" +version = "3.8.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [extras] testing = ["pytest", "pytest-bdd", "toml"] @@ -933,7 +933,7 @@ testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "8a4b09a72f705e5265d6d1bebc61926df2ff1e0237ac1369bef6dbebb44f4d9c" +content-hash = "8cd80d198bf8208d9e4b2054b89a22f1ce9faccc91aaef3440fb22e1782b0239" [metadata.files] ansiwrap = [ @@ -941,8 +941,8 @@ ansiwrap = [ {file = "ansiwrap-0.8.4.zip", hash = "sha256:ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7"}, ] appnope = [ - {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, - {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, + {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, + {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, ] argcomplete = [ {file = "argcomplete-2.0.0-py2.py3-none-any.whl", hash = "sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e"}, @@ -1042,8 +1042,8 @@ cffi = [ {file = "cffi-1.15.0.tar.gz", hash = "sha256:920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"}, ] click = [ - {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, - {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -1090,15 +1090,15 @@ flake8 = [ {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, ] ghp-import = [ - {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, - {file = "ghp_import-2.0.2-py3-none-any.whl", hash = "sha256:5f8962b30b20652cdffa9c5a9812f7de6bcb56ec475acac579807719bf242c46"}, + {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, + {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, ] glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.11.2-py3-none-any.whl", hash = "sha256:d16e8c1deb60de41b8e8ed21c1a7b947b0bc62fab7e1d470bcdf331cea2e6735"}, - {file = "importlib_metadata-4.11.2.tar.gz", hash = "sha256:b36ffa925fe3139b2f6ff11d6925ffd4fa7bc47870165e3ac260ac7b4f91e6ac"}, + {file = "importlib_metadata-4.11.3-py3-none-any.whl", hash = "sha256:1208431ca90a8cca1a6b8af391bb53c1a2db74e5d1cef6ddced95d4b2062edc6"}, + {file = "importlib_metadata-4.11.3.tar.gz", hash = "sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1108,20 +1108,20 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-8.1.1-py3-none-any.whl", hash = "sha256:6f56bfaeaa3247aa3b9cd3b8cbab3a9c0abf7428392f97b21902d12b2f42a381"}, - {file = "ipython-8.1.1.tar.gz", hash = "sha256:8138762243c9b3a3ffcf70b37151a2a35c23d3a29f9743878c33624f4207be3d"}, + {file = "ipython-8.3.0-py3-none-any.whl", hash = "sha256:341456643a764c28f670409bbd5d2518f9b82c013441084ff2c2fc999698f83b"}, + {file = "ipython-8.3.0.tar.gz", hash = "sha256:807ae3cf43b84693c9272f70368440a9a7eaa2e7e6882dad943c32fbf7e51402"}, ] jedi = [ {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, {file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"}, ] jeepney = [ - {file = "jeepney-0.7.1-py3-none-any.whl", hash = "sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac"}, - {file = "jeepney-0.7.1.tar.gz", hash = "sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f"}, + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, ] jinja2 = [ - {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, - {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ {file = "keyring-23.5.0-py3-none-any.whl", hash = "sha256:b0d28928ac3ec8e42ef4cc227822647a19f1d544f21f96457965dc01cf555261"}, @@ -1132,50 +1132,50 @@ mako = [ {file = "Mako-1.2.0.tar.gz", hash = "sha256:9a7c7e922b87db3686210cf49d5d767033a41d4010b284e747682c92bddd8b39"}, ] markdown = [ - {file = "Markdown-3.3.6-py3-none-any.whl", hash = "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3"}, - {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, + {file = "Markdown-3.3.7-py3-none-any.whl", hash = "sha256:f5da449a6e1c989a4cea2631aa8ee67caa5a2ef855d551c88f9e309f4634c621"}, + {file = "Markdown-3.3.7.tar.gz", hash = "sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874"}, ] markupsafe = [ - {file = "MarkupSafe-2.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3028252424c72b2602a323f70fbf50aa80a5d3aa616ea6add4ba21ae9cc9da4c"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:290b02bab3c9e216da57c1d11d2ba73a9f73a614bbdcc027d299a60cdfabb11a"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e104c0c2b4cd765b4e83909cde7ec61a1e313f8a75775897db321450e928cce"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24c3be29abb6b34052fd26fc7a8e0a49b1ee9d282e3665e8ad09a0a68faee5b3"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204730fd5fe2fe3b1e9ccadb2bd18ba8712b111dcabce185af0b3b5285a7c989"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d3b64c65328cb4cd252c94f83e66e3d7acf8891e60ebf588d7b493a55a1dbf26"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:96de1932237abe0a13ba68b63e94113678c379dca45afa040a17b6e1ad7ed076"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:75bb36f134883fdbe13d8e63b8675f5f12b80bb6627f7714c7d6c5becf22719f"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-win32.whl", hash = "sha256:4056f752015dfa9828dce3140dbadd543b555afb3252507348c493def166d454"}, - {file = "MarkupSafe-2.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:d4e702eea4a2903441f2735799d217f4ac1b55f7d8ad96ab7d4e25417cb0827c"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f0eddfcabd6936558ec020130f932d479930581171368fd728efcfb6ef0dd357"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ddea4c352a488b5e1069069f2f501006b1a4362cb906bee9a193ef1245a7a61"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:09c86c9643cceb1d87ca08cdc30160d1b7ab49a8a21564868921959bd16441b8"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0a0abef2ca47b33fb615b491ce31b055ef2430de52c5b3fb19a4042dbc5cadb"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:736895a020e31b428b3382a7887bfea96102c529530299f426bf2e636aacec9e"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:679cbb78914ab212c49c67ba2c7396dc599a8479de51b9a87b174700abd9ea49"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:84ad5e29bf8bab3ad70fd707d3c05524862bddc54dc040982b0dbcff36481de7"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-win32.whl", hash = "sha256:8da5924cb1f9064589767b0f3fc39d03e3d0fb5aa29e0cb21d43106519bd624a"}, - {file = "MarkupSafe-2.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:454ffc1cbb75227d15667c09f164a0099159da0c1f3d2636aa648f12675491ad"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:142119fb14a1ef6d758912b25c4e803c3ff66920635c44078666fe7cc3f8f759"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b2a5a856019d2833c56a3dcac1b80fe795c95f401818ea963594b345929dffa7"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d1fb9b2eec3c9714dd936860850300b51dbaa37404209c8d4cb66547884b7ed"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:62c0285e91414f5c8f621a17b69fc0088394ccdaa961ef469e833dbff64bd5ea"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc3150f85e2dbcf99e65238c842d1cfe69d3e7649b19864c1cc043213d9cd730"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f02cf7221d5cd915d7fa58ab64f7ee6dd0f6cddbb48683debf5d04ae9b1c2cc1"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d5653619b3eb5cbd35bfba3c12d575db2a74d15e0e1c08bf1db788069d410ce8"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7d2f5d97fcbd004c03df8d8fe2b973fe2b14e7bfeb2cfa012eaa8759ce9a762f"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-win32.whl", hash = "sha256:3cace1837bc84e63b3fd2dfce37f08f8c18aeb81ef5cf6bb9b51f625cb4e6cd8"}, - {file = "MarkupSafe-2.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:fabbe18087c3d33c5824cb145ffca52eccd053061df1d79d4b66dafa5ad2a5ea"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:023af8c54fe63530545f70dd2a2a7eed18d07a9a77b94e8bf1e2ff7f252db9a3"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d66624f04de4af8bbf1c7f21cc06649c1c69a7f84109179add573ce35e46d448"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c532d5ab79be0199fa2658e24a02fce8542df196e60665dd322409a03db6a52c"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67ec74fada3841b8c5f4c4f197bea916025cb9aa3fe5abf7d52b655d042f956"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c653fde75a6e5eb814d2a0a89378f83d1d3f502ab710904ee585c38888816c"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:961eb86e5be7d0973789f30ebcf6caab60b844203f4396ece27310295a6082c7"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:598b65d74615c021423bd45c2bc5e9b59539c875a9bdb7e5f2a6b92dfcfc268d"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:599941da468f2cf22bf90a84f6e2a65524e87be2fce844f96f2dd9a6c9d1e635"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-win32.whl", hash = "sha256:e6f7f3f41faffaea6596da86ecc2389672fa949bd035251eab26dc6697451d05"}, - {file = "MarkupSafe-2.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:b8811d48078d1cf2a6863dafb896e68406c5f513048451cd2ded0473133473c7"}, - {file = "MarkupSafe-2.1.0.tar.gz", hash = "sha256:80beaf63ddfbc64a0452b841d8036ca0611e049650e20afcb882f5d3c266d65f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] matplotlib-inline = [ {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, @@ -1190,8 +1190,8 @@ mergedeep = [ {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.3.0-py3-none-any.whl", hash = "sha256:26bd2b03d739ac57a3e6eed0b7bcc86168703b719c27b99ad6ca91dc439aacde"}, - {file = "mkdocs-1.3.0.tar.gz", hash = "sha256:b504405b04da38795fec9b2e5e28f6aa3a73bb0960cb6d5d27ead28952bd35ea"}, + {file = "mkdocs-1.2.4-py3-none-any.whl", hash = "sha256:f108e7ab5a7ed3e30826dbf82f37638f0d90d11161644616cc4f01a1e2ab3940"}, + {file = "mkdocs-1.2.4.tar.gz", hash = "sha256:8e7970a26183487fe2a1041940c6fd03aa0dbe5549e50c3e7194f565cb3c678a"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -1229,8 +1229,8 @@ pickleshare = [ {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, ] platformdirs = [ - {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, - {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, @@ -1241,8 +1241,8 @@ pprintpp = [ {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] prompt-toolkit = [ - {file = "prompt_toolkit-3.0.28-py3-none-any.whl", hash = "sha256:30129d870dcb0b3b6a53efdc9d0a83ea96162ffd28ffe077e94215b233dc670c"}, - {file = "prompt_toolkit-3.0.28.tar.gz", hash = "sha256:9f1cd16b1e86c2968f2519d7fb31dd9d669916f515612c269d14e9ed52b51650"}, + {file = "prompt_toolkit-3.0.29-py3-none-any.whl", hash = "sha256:62291dad495e665fca0bda814e342c69952086afb0f4094d0893d357e5c78752"}, + {file = "prompt_toolkit-3.0.29.tar.gz", hash = "sha256:bd640f60e8cecd74f0dc249713d433ace2ddc62b65ee07f96d358e0b152b6ea7"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -1269,12 +1269,12 @@ pyflakes = [ {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, ] pygments = [ - {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, - {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, ] pyparsing = [ - {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, - {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, + {file = "pyparsing-3.0.8-py3-none-any.whl", hash = "sha256:ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06"}, + {file = "pyparsing-3.0.8.tar.gz", hash = "sha256:7bf433498c016c4314268d95df76c81b842a4cb2b276fa3312cfb1e1d85f6954"}, ] pyproject-flake8 = [ {file = "pyproject-flake8-0.0.1a4.tar.gz", hash = "sha256:8ed9453f1d984cfe94c998f9840275359e29e7f435b8ddd188ae084e2dc1270c"}, @@ -1347,8 +1347,8 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] rich = [ - {file = "rich-12.0.0-py3-none-any.whl", hash = "sha256:fdcd2f8d416e152bcf35c659987038d1ae5a7bd336e821ca7551858a4c7e38a9"}, - {file = "rich-12.0.0.tar.gz", hash = "sha256:14bfd0507edc633e021b02c45cbf7ca22e33b513817627b8de3412f047a3e798"}, + {file = "rich-12.4.0-py3-none-any.whl", hash = "sha256:fdf6f447f231289dd446d31e5ee856fb0cc7dccd852a80f3e9d5aeecccabaedc"}, + {file = "rich-12.4.0.tar.gz", hash = "sha256:7aebf67874dc5cc2c89e2cb6ac322c95bd92510df2af0296c8bf494335ef704f"}, ] "ruamel.yaml" = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, @@ -1382,8 +1382,8 @@ rich = [ {file = "ruamel.yaml.clib-0.2.6.tar.gz", hash = "sha256:4ff604ce439abb20794f05613c374759ce10e3595d1867764dd1ae675b85acbd"}, ] secretstorage = [ - {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, - {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, + {file = "SecretStorage-3.3.2-py3-none-any.whl", hash = "sha256:755dc845b6ad76dcbcbc07ea3da75ae54bb1ea529eb72d15f83d26499a5df319"}, + {file = "SecretStorage-3.3.2.tar.gz", hash = "sha256:0a8eb9645b320881c222e827c26f4cfcf55363e8b374a021981ef886657a912f"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, @@ -1410,37 +1410,38 @@ traitlets = [ {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, ] typing-extensions = [ - {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, - {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, + {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, + {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, ] tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] watchdog = [ - {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3"}, - {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:aba5c812f8ee8a3ff3be51887ca2d55fb8e268439ed44110d3846e4229eb0e8b"}, - {file = "watchdog-2.1.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ae38bf8ba6f39d5b83f78661273216e7db5b00f08be7592062cb1fc8b8ba542"}, - {file = "watchdog-2.1.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ad6f1796e37db2223d2a3f302f586f74c72c630b48a9872c1e7ae8e92e0ab669"}, - {file = "watchdog-2.1.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:922a69fa533cb0c793b483becaaa0845f655151e7256ec73630a1b2e9ebcb660"}, - {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b2fcf9402fde2672545b139694284dc3b665fd1be660d73eca6805197ef776a3"}, - {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3386b367e950a11b0568062b70cc026c6f645428a698d33d39e013aaeda4cc04"}, - {file = "watchdog-2.1.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f1c00aa35f504197561060ca4c21d3cc079ba29cf6dd2fe61024c70160c990b"}, - {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b52b88021b9541a60531142b0a451baca08d28b74a723d0c99b13c8c8d48d604"}, - {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8047da932432aa32c515ec1447ea79ce578d0559362ca3605f8e9568f844e3c6"}, - {file = "watchdog-2.1.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e92c2d33858c8f560671b448205a268096e17870dcf60a9bb3ac7bfbafb7f5f9"}, - {file = "watchdog-2.1.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b7d336912853d7b77f9b2c24eeed6a5065d0a0cc0d3b6a5a45ad6d1d05fb8cd8"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_aarch64.whl", hash = "sha256:cca7741c0fcc765568350cb139e92b7f9f3c9a08c4f32591d18ab0a6ac9e71b6"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_armv7l.whl", hash = "sha256:25fb5240b195d17de949588628fdf93032ebf163524ef08933db0ea1f99bd685"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_i686.whl", hash = "sha256:be9be735f827820a06340dff2ddea1fb7234561fa5e6300a62fe7f54d40546a0"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0d19fb2441947b58fbf91336638c2b9f4cc98e05e1045404d7a4cb7cddc7a65"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:3becdb380d8916c873ad512f1701f8a92ce79ec6978ffde92919fd18d41da7fb"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_s390x.whl", hash = "sha256:ae67501c95606072aafa865b6ed47343ac6484472a2f95490ba151f6347acfc2"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e0f30db709c939cabf64a6dc5babb276e6d823fd84464ab916f9b9ba5623ca15"}, - {file = "watchdog-2.1.6-py3-none-win32.whl", hash = "sha256:e02794ac791662a5eafc6ffeaf9bcc149035a0e48eb0a9d40a8feb4622605a3d"}, - {file = "watchdog-2.1.6-py3-none-win_amd64.whl", hash = "sha256:bd9ba4f332cf57b2c1f698be0728c020399ef3040577cde2939f2e045b39c1e5"}, - {file = "watchdog-2.1.6-py3-none-win_ia64.whl", hash = "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923"}, - {file = "watchdog-2.1.6.tar.gz", hash = "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7"}, + {file = "watchdog-2.1.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:177bae28ca723bc00846466016d34f8c1d6a621383b6caca86745918d55c7383"}, + {file = "watchdog-2.1.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1d1cf7dfd747dec519486a98ef16097e6c480934ef115b16f18adb341df747a4"}, + {file = "watchdog-2.1.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7f14ce6adea2af1bba495acdde0e510aecaeb13b33f7bd2f6324e551b26688ca"}, + {file = "watchdog-2.1.7-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4d0e98ac2e8dd803a56f4e10438b33a2d40390a72750cff4939b4b274e7906fa"}, + {file = "watchdog-2.1.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:81982c7884aac75017a6ecc72f1a4fedbae04181a8665a34afce9539fc1b3fab"}, + {file = "watchdog-2.1.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0b4a1fe6201c6e5a1926f5767b8664b45f0fcb429b62564a41f490ff1ce1dc7a"}, + {file = "watchdog-2.1.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6e6ae29b72977f2e1ee3d0b760d7ee47896cb53e831cbeede3e64485e5633cc8"}, + {file = "watchdog-2.1.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b9777664848160449e5b4260e0b7bc1ae0f6f4992a8b285db4ec1ef119ffa0e2"}, + {file = "watchdog-2.1.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:19b36d436578eb437e029c6b838e732ed08054956366f6dd11875434a62d2b99"}, + {file = "watchdog-2.1.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b61acffaf5cd5d664af555c0850f9747cc5f2baf71e54bbac164c58398d6ca7b"}, + {file = "watchdog-2.1.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1e877c70245424b06c41ac258023ea4bd0c8e4ff15d7c1368f17cd0ae6e351dd"}, + {file = "watchdog-2.1.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d802d65262a560278cf1a65ef7cae4e2bc7ecfe19e5451349e4c67e23c9dc420"}, + {file = "watchdog-2.1.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b3750ee5399e6e9c69eae8b125092b871ee9e2fcbd657a92747aea28f9056a5c"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_aarch64.whl", hash = "sha256:ed6d9aad09a2a948572224663ab00f8975fae242aa540509737bb4507133fa2d"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_armv7l.whl", hash = "sha256:b26e13e8008dcaea6a909e91d39b629a39635d1a8a7239dd35327c74f4388601"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_i686.whl", hash = "sha256:0908bb50f6f7de54d5d31ec3da1654cb7287c6b87bce371954561e6de379d690"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_ppc64.whl", hash = "sha256:bdcbf75580bf4b960fb659bbccd00123d83119619195f42d721e002c1621602f"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:81a5861d0158a7e55fe149335fb2bbfa6f48cbcbd149b52dbe2cd9a544034bbd"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_s390x.whl", hash = "sha256:03b43d583df0f18782a0431b6e9e9965c5b3f7cf8ec36a00b930def67942c385"}, + {file = "watchdog-2.1.7-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ae934e34c11aa8296c18f70bf66ed60e9870fcdb4cc19129a04ca83ab23e7055"}, + {file = "watchdog-2.1.7-py3-none-win32.whl", hash = "sha256:49639865e3db4be032a96695c98ac09eed39bbb43fe876bb217da8f8101689a6"}, + {file = "watchdog-2.1.7-py3-none-win_amd64.whl", hash = "sha256:340b875aecf4b0e6672076a6f05cfce6686935559bb6d34cebedee04126a9566"}, + {file = "watchdog-2.1.7-py3-none-win_ia64.whl", hash = "sha256:351e09b6d9374d5bcb947e6ac47a608ec25b9d70583e9db00b2fcdb97b00b572"}, + {file = "watchdog-2.1.7.tar.gz", hash = "sha256:3fd47815353be9c44eebc94cc28fe26b2b0c5bd889dafc4a5a7cbdf924143480"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, @@ -1455,6 +1456,6 @@ yq = [ {file = "yq-2.14.0.tar.gz", hash = "sha256:f4bf2b299d1e5c7ebd74cfb25d1f5d9b6401063bac07a2d09a156144c1d644e1"}, ] zipp = [ - {file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"}, - {file = "zipp-3.7.0.tar.gz", hash = "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"}, + {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, + {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, ] diff --git a/pyproject.toml b/pyproject.toml index 4885344e..a0c04ef6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ pytest-bdd = { version = ">=4.0.1", optional = true } toml = { version = ">=0.10", optional = true } [tool.poetry.dev-dependencies] -mkdocs = ">=1.0" +mkdocs = ">=1.0,<1.3" black = { version = ">=21.5b2", allow-prereleases = true } toml = ">=0.10" pytest = ">=6.2" From fd8d64098f3c520b79250246c2dc6b8e7666c932 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 21 May 2022 21:14:56 +0000 Subject: [PATCH 0630/1132] Update changelog [ci skip] --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb59f44c..d6761e4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,10 @@ - Empty config file leads to confusing error message [\#1420](https://github.com/jrnl-org/jrnl/issues/1420) - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) +- jrnl --encrypt doesn't prompt me for password change [\#1358](https://github.com/jrnl-org/jrnl/issues/1358) - '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) - Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- Prompt for password change when using 'jrnl --encrypt' on already encrypted journal [\#1477](https://github.com/jrnl-org/jrnl/pull/1477) ([jonakeys](https://github.com/jonakeys)) - Always expand all paths \(journals, templates, etc\) [\#1468](https://github.com/jrnl-org/jrnl/pull/1468) ([apainintheneck](https://github.com/apainintheneck)) - The `-not` option with no arguments now outputs error instead of stack trace [\#1466](https://github.com/jrnl-org/jrnl/pull/1466) ([apainintheneck](https://github.com/apainintheneck)) - Give a proper message when trying to use an empty config file [\#1461](https://github.com/jrnl-org/jrnl/pull/1461) ([jonakeys](https://github.com/jonakeys)) @@ -35,6 +37,10 @@ - Pin jinja2 in docs requirements to keep readthedocs builds from failing [\#1439](https://github.com/jrnl-org/jrnl/pull/1439) ([micahellison](https://github.com/micahellison)) - Tidy up git ignore [\#1414](https://github.com/jrnl-org/jrnl/pull/1414) ([nelnog](https://github.com/nelnog)) +**Documentation:** + +- Document --change-time in web-based docs' command line reference [\#1471](https://github.com/jrnl-org/jrnl/pull/1471) ([micahellison](https://github.com/micahellison)) + **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) From de6a90a5eea38471262a2cff8b0a163385bd26cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 May 2022 11:43:43 -0700 Subject: [PATCH 0631/1132] Bump keyring from 23.5.0 to 23.5.1 (#1487) Bumps [keyring](https://github.com/jaraco/keyring) from 23.5.0 to 23.5.1. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.5.0...v23.5.1) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index da8f99b8..1a059b9f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -320,7 +320,7 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.5.0" +version = "23.5.1" description = "Store and access your passwords safely." category = "main" optional = false @@ -333,8 +333,8 @@ pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [[package]] name = "mako" @@ -412,8 +412,8 @@ python-versions = ">=3.6" [package.dependencies] click = ">=3.3" ghp-import = ">=1.0" -importlib-metadata = ">=4.3" -Jinja2 = ">=2.10.2" +importlib-metadata = ">=3.10" +Jinja2 = ">=2.10.1" Markdown = ">=3.2.1" mergedeep = ">=1.3.4" packaging = ">=20.5" @@ -1124,8 +1124,8 @@ jinja2 = [ {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ - {file = "keyring-23.5.0-py3-none-any.whl", hash = "sha256:b0d28928ac3ec8e42ef4cc227822647a19f1d544f21f96457965dc01cf555261"}, - {file = "keyring-23.5.0.tar.gz", hash = "sha256:9012508e141a80bd1c0b6778d5c610dd9f8c464d75ac6774248500503f972fb9"}, + {file = "keyring-23.5.1-py3-none-any.whl", hash = "sha256:9ef58314bcc823f426b49ec787539a2d73571b37de4cd498f839803b01acff1e"}, + {file = "keyring-23.5.1.tar.gz", hash = "sha256:dee502cdf18a98211bef428eea11456a33c00718b2f08524fd5727c7f424bffd"}, ] mako = [ {file = "Mako-1.2.0-py3-none-any.whl", hash = "sha256:23aab11fdbbb0f1051b93793a58323ff937e98e34aece1c4219675122e57e4ba"}, From 7f91d512b842cc91f9aab7efae4ffb9b7bd97b98 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 28 May 2022 18:45:24 +0000 Subject: [PATCH 0632/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6761e4b..ea22faf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump keyring from 23.5.0 to 23.5.1 [\#1487](https://github.com/jrnl-org/jrnl/pull/1487) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 37.0.1 to 37.0.2 [\#1467](https://github.com/jrnl-org/jrnl/pull/1467) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.2 to 37.0.1 [\#1462](https://github.com/jrnl-org/jrnl/pull/1462) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytest from 7.1.1 to 7.1.2 [\#1458](https://github.com/jrnl-org/jrnl/pull/1458) ([dependabot[bot]](https://github.com/apps/dependabot)) From bb0a6f585460430b39a3fa68d348a4a560981309 Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 28 May 2022 20:52:10 +0200 Subject: [PATCH 0633/1132] Fixed debug TypeError (#1484) --- jrnl/jrnl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index aa26d1e1..1c536a37 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -146,7 +146,7 @@ def write_mode(args, config, journal, **kwargs): journal.new_entry(raw) print(f"[Entry added to {args.journal_name} journal]", file=sys.stderr) journal.write() - logging.debug("Write mode: completed journal.write()", args.journal_name, raw) + logging.debug("Write mode: completed journal.write()") def search_mode(args, journal, **kwargs): From 19d579fc5ce805ab57f0aaf3d0d334166cae04bc Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 28 May 2022 18:54:06 +0000 Subject: [PATCH 0634/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea22faf2..64304854 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Implemented enhancements:** +- Remove default\_hour and default\_minute from config? [\#1455](https://github.com/jrnl-org/jrnl/issues/1455) - Add --change-time command to change the timestamp of an entry [\#1429](https://github.com/jrnl-org/jrnl/issues/1429) - Show name of journal when creating a password/encrypting [\#1478](https://github.com/jrnl-org/jrnl/pull/1478) ([jonakeys](https://github.com/jonakeys)) - Implement --change-time flag [\#1452](https://github.com/jrnl-org/jrnl/pull/1452) ([richardjs](https://github.com/richardjs)) @@ -19,6 +20,7 @@ - jrnl --encrypt doesn't prompt me for password change [\#1358](https://github.com/jrnl-org/jrnl/issues/1358) - '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) - Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- Fix TypeError when using debug flag [\#1484](https://github.com/jrnl-org/jrnl/pull/1484) ([jonakeys](https://github.com/jonakeys)) - Prompt for password change when using 'jrnl --encrypt' on already encrypted journal [\#1477](https://github.com/jrnl-org/jrnl/pull/1477) ([jonakeys](https://github.com/jonakeys)) - Always expand all paths \(journals, templates, etc\) [\#1468](https://github.com/jrnl-org/jrnl/pull/1468) ([apainintheneck](https://github.com/apainintheneck)) - The `-not` option with no arguments now outputs error instead of stack trace [\#1466](https://github.com/jrnl-org/jrnl/pull/1466) ([apainintheneck](https://github.com/apainintheneck)) From 36121007b1a8b476571a51dddbbb49fdda3c6131 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 4 Jun 2022 13:09:07 -0700 Subject: [PATCH 0635/1132] -not search parameter doesn't open editor (#1490) --- jrnl/jrnl.py | 1 + tests/bdd/features/search.feature | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 1c536a37..3eecdfd4 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -81,6 +81,7 @@ def _is_write_mode(args, config, **kwargs): args.delete, args.edit, args.change_time, + args.excluded, args.export, args.end_date, args.today_in_history, diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index 44e8dc6d..60b4fefb 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -183,6 +183,19 @@ Feature: Searching in a journal | basic_folder.yaml | | basic_dayone.yaml | + Scenario Outline: Using -not should exclude all entries with that tag + # https://github.com/jrnl-org/jrnl/issues/1472 + Given we use the config "" + When we run "jrnl -not @tagtwo" + Then the output should not contain "@tagtwo" + And the editor should not have been called + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case. # https://github.com/jrnl-org/jrnl/issues/354 Given we use the config "dayone.yaml" From 1c35c6951d9de66e3816d79981d40d76eb82d2fa Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 4 Jun 2022 20:10:38 +0000 Subject: [PATCH 0636/1132] Update changelog [ci skip] --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64304854..63900b42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ **Implemented enhancements:** -- Remove default\_hour and default\_minute from config? [\#1455](https://github.com/jrnl-org/jrnl/issues/1455) - Add --change-time command to change the timestamp of an entry [\#1429](https://github.com/jrnl-org/jrnl/issues/1429) - Show name of journal when creating a password/encrypting [\#1478](https://github.com/jrnl-org/jrnl/pull/1478) ([jonakeys](https://github.com/jonakeys)) - Implement --change-time flag [\#1452](https://github.com/jrnl-org/jrnl/pull/1452) ([richardjs](https://github.com/richardjs)) @@ -15,11 +14,13 @@ **Fixed bugs:** +- Using -not argument by itself leads to new entry creation [\#1472](https://github.com/jrnl-org/jrnl/issues/1472) - Empty config file leads to confusing error message [\#1420](https://github.com/jrnl-org/jrnl/issues/1420) - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) - jrnl --encrypt doesn't prompt me for password change [\#1358](https://github.com/jrnl-org/jrnl/issues/1358) - '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) - Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- `-not` search parameter no longer opens editor [\#1490](https://github.com/jrnl-org/jrnl/pull/1490) ([apainintheneck](https://github.com/apainintheneck)) - Fix TypeError when using debug flag [\#1484](https://github.com/jrnl-org/jrnl/pull/1484) ([jonakeys](https://github.com/jonakeys)) - Prompt for password change when using 'jrnl --encrypt' on already encrypted journal [\#1477](https://github.com/jrnl-org/jrnl/pull/1477) ([jonakeys](https://github.com/jonakeys)) - Always expand all paths \(journals, templates, etc\) [\#1468](https://github.com/jrnl-org/jrnl/pull/1468) ([apainintheneck](https://github.com/apainintheneck)) From e758986985b5c9a2ee137ea4f596a8ea5897eb3c Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 4 Jun 2022 22:20:51 +0200 Subject: [PATCH 0637/1132] Create folder if config ends with (back)slash (#1492) * Check config if FolderJournal and treat as so * Add test for end of path is slash * Code format correction * Requested changes PR 1482 * Add info to doc about path of folder. * Small addition to doc about folder journal --- docs/journal-types.md | 7 ++++--- jrnl/Journal.py | 4 ++++ tests/bdd/features/file_storage.feature | 18 ++++++++++++++++++ tests/data/configs/missing_directory.yaml | 2 ++ tests/lib/then_steps.py | 10 ++++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/docs/journal-types.md b/docs/journal-types.md index 31806572..65efc143 100644 --- a/docs/journal-types.md +++ b/docs/journal-types.md @@ -28,9 +28,10 @@ you have an entry on May 5th, 2021 in a folder journal at `~/folderjournal`, it be located in: `~/folderjournal/2021/05/05.txt` !!! note -When creating a new folder journal, you will need to create the folder before running -`jrnl`. Otherwise, when you run `jrnl` for the first time, it will assume that you -are creating a single file journal instead, and it will create a file at that path. +Creating a new folder journal can be done in two ways: + +* Create a folder with the name of the journal before running `jrnl`. Otherwise, when you run `jrnl` for the first time, it will assume that you are creating a single file journal instead, and it will create a file at that path. +* Create a new journal in your [config_file](advanced.md) and end the path with a ``/`` (on a POSIX system like Linux or MacOSX) or a ``\`` (on a Windows system). The folder will be created automatically if it doesn't exist. !!! note Folder journals can't be encrypted. diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 987c5426..5a2f0b5a 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -434,6 +434,10 @@ def open_journal(journal_name, config, legacy=False): if not config["encrypt"]: if legacy: return LegacyJournal(journal_name, **config).open() + if config["journal"].endswith(os.sep): + from . import FolderJournal + + return FolderJournal.Folder(journal_name, **config).open() return PlainJournal(journal_name, **config).open() from . import EncryptedJournal diff --git a/tests/bdd/features/file_storage.feature b/tests/bdd/features/file_storage.feature index 89069568..5cb6ba45 100644 --- a/tests/bdd/features/file_storage.feature +++ b/tests/bdd/features/file_storage.feature @@ -30,6 +30,24 @@ Feature: Journals iteracting with the file system in a way that users can see Then the journal should exist When we run "jrnl -99 --short" Then the output should contain "This is a new entry in my journal" + + @on_posix + Scenario: If the directory for a Folder journal ending in a slash ('/') doesn't exist, then it should be created + Given we use the config "missing_directory.yaml" + Then the journal "endslash" directory should not exist + When we run "jrnl endslash This is a new entry in my journal" + Then the journal "endslash" directory should exist + When we run "jrnl endslash -1" + Then the output should contain "This is a new entry in my journal" + + @on_win + Scenario: If the directory for a Folder journal ending in a backslash ('\') doesn't exist, then it should be created + Given we use the config "missing_directory.yaml" + Then the journal "endbackslash" directory should not exist + When we run "jrnl endbackslash This is a new entry in my journal" + Then the journal "endbackslash" directory should exist + When we run "jrnl endbackslash -1" + Then the output should contain "This is a new entry in my journal" Scenario: Creating journal with relative path should update to absolute path Given we use no config diff --git a/tests/data/configs/missing_directory.yaml b/tests/data/configs/missing_directory.yaml index d600404c..acf3fa09 100644 --- a/tests/data/configs/missing_directory.yaml +++ b/tests/data/configs/missing_directory.yaml @@ -5,6 +5,8 @@ encrypt: false highlight: true journals: default: features/journals/missing_directory/simple.journal + endslash: features/journals/missing_folder/ + endbackslash: features\journals\missing_folder\ linewrap: 80 tagsymbols: "@" template: false diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 4ef1681b..8dc4da71 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -210,6 +210,16 @@ def journal_should_not_exist(config_on_disk, should_or_should_not): ) +@then(parse('the journal "{journal_name}" directory {should_or_should_not} exist')) +def directory_should_not_exist(config_on_disk, should_or_should_not, journal_name): + scoped_config = scope_config(config_on_disk, journal_name) + expected_path = scoped_config["journal"] + we_should = parse_should_or_should_not(should_or_should_not) + dir_exists = os.path.isdir(expected_path) + + assert dir_exists == we_should + + @then(parse('the content of file "{file_path}" in the cache should be\n{file_content}')) def content_of_file_should_be(file_path, file_content, cache_dir): assert cache_dir["exists"] From c043f5058fdbe9b620d657cacc6cbf8cc94a3098 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 4 Jun 2022 15:13:30 -0700 Subject: [PATCH 0638/1132] Fixed error related to display_format in config file for some values (#1495) * Fixed error related to display_format in config file Now _display_search_results tries to source the export arg from the config file before dispaying search results. * Add BDD test for original bug * update unit test Co-authored-by: Micah Jerome Ellison Co-authored-by: Jonathan Wren --- jrnl/jrnl.py | 14 ++++----- tests/bdd/features/format.feature | 16 +++++++++++ tests/unit/test_display.py | 25 ---------------- tests/unit/test_jrnl.py | 48 +++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 32 deletions(-) delete mode 100644 tests/unit/test_display.py create mode 100644 tests/unit/test_jrnl.py diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 3eecdfd4..cd69a124 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -374,20 +374,20 @@ def _change_time_search_results(args, journal, old_entries, no_prompt=False, **k def _display_search_results(args, journal, **kwargs): - if args.short or args.export == "short": + # Get export format from config file if not provided at the command line + args.export = args.export or kwargs["config"].get("display_format") + + if args.tags: + print(plugins.get_exporter("tags").export(journal)) + + elif args.short or args.export == "short": print(journal.pprint(short=True)) elif args.export == "pretty": print(journal.pprint()) - elif args.tags: - print(plugins.get_exporter("tags").export(journal)) - elif args.export: exporter = plugins.get_exporter(args.export) print(exporter.export(journal, args.filename)) - elif kwargs["config"].get("display_format"): - exporter = plugins.get_exporter(kwargs["config"]["display_format"]) - print(exporter.export(journal, args.filename)) else: print(journal.pprint()) diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index 3f0decb2..9de28889 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -560,3 +560,19 @@ Feature: Custom formats | basic_encrypted.yaml | | basic_folder.yaml | | basic_dayone.yaml | + + + Scenario Outline: display_format short and pretty do not crash if specified as config values + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl --config-override display_format short -1" + Then we should get no error + When we run "jrnl --config-override display_format pretty -1" + Then we should get no error + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | diff --git a/tests/unit/test_display.py b/tests/unit/test_display.py deleted file mode 100644 index 921d1631..00000000 --- a/tests/unit/test_display.py +++ /dev/null @@ -1,25 +0,0 @@ -import argparse -from unittest import mock - -import pytest - -import jrnl -from jrnl.jrnl import _display_search_results - - -# fmt: off -# see: https://github.com/psf/black/issues/664 -@pytest.mark.parametrize("export_format", [ "pretty", "short","markdown"]) -#fmt: on -@mock.patch.object(argparse, "Namespace", return_value={"export": "markdown", "filename": "irrele.vant"}) -def test_export_format(mock_args, export_format): - - test_journal = jrnl.Journal.Journal - mock_args.export = export_format - #fmt: off - # see: https://github.com/psf/black/issues/664 - with mock.patch("builtins.print") as mock_spy_print, \ - mock.patch('jrnl.Journal.Journal.pprint') as mock_pprint: - _display_search_results(mock_args, test_journal) - mock_spy_print.assert_called_once_with(mock_pprint()) - #fmt: on diff --git a/tests/unit/test_jrnl.py b/tests/unit/test_jrnl.py new file mode 100644 index 00000000..f87f6dad --- /dev/null +++ b/tests/unit/test_jrnl.py @@ -0,0 +1,48 @@ +from unittest import mock + +import pytest + +import random +import string +import jrnl +from jrnl.jrnl import _display_search_results +from jrnl.args import parse_args + + +@pytest.fixture +def random_string(): + return "".join(random.choices(string.ascii_uppercase + string.digits, k=25)) + + +@pytest.mark.parametrize("export_format", ["pretty", "short"]) +@mock.patch("builtins.print") +@mock.patch("jrnl.Journal.Journal.pprint") +def test_display_search_results_pretty_short(mock_pprint, mock_print, export_format): + mock_args = parse_args(["--format", export_format]) + test_journal = mock.Mock(wraps=jrnl.Journal.Journal) + + _display_search_results(mock_args, test_journal) + + mock_print.assert_called_once_with(mock_pprint.return_value) + + +@pytest.mark.parametrize( + "export_format", ["markdown", "json", "xml", "yaml", "fancy", "dates"] +) +@mock.patch("jrnl.plugins.get_exporter") +@mock.patch("builtins.print") +def test_display_search_results_builtin_plugins( + mock_print, mock_exporter, export_format, random_string +): + test_filename = random_string + mock_args = parse_args(["--format", export_format, "--file", test_filename]) + + test_journal = mock.Mock(wraps=jrnl.Journal.Journal) + mock_export = mock.Mock() + mock_exporter.return_value.export = mock_export + + _display_search_results(mock_args, test_journal) + + mock_exporter.assert_called_once_with(export_format) + mock_export.assert_called_once_with(test_journal, test_filename) + mock_print.assert_called_once_with(mock_export.return_value) From c07cdbed3ced359056918ef4d9348a145cea884d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 4 Jun 2022 22:15:16 +0000 Subject: [PATCH 0639/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63900b42..7bac631e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,10 @@ - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) - jrnl --encrypt doesn't prompt me for password change [\#1358](https://github.com/jrnl-org/jrnl/issues/1358) - '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) -- Directory YAML export shows stack trace when it doesn't need to [\#1227](https://github.com/jrnl-org/jrnl/issues/1227) +- Exception when providing folder name of folder that does not exist as journal path [\#1293](https://github.com/jrnl-org/jrnl/issues/1293) +- display\_format: pretty and display\_format: short lead to crash [\#1263](https://github.com/jrnl-org/jrnl/issues/1263) +- Fixed error related to display\_format in config file for some values [\#1495](https://github.com/jrnl-org/jrnl/pull/1495) ([apainintheneck](https://github.com/apainintheneck)) +- Create folder if config ends with \(back\)slash [\#1492](https://github.com/jrnl-org/jrnl/pull/1492) ([jonakeys](https://github.com/jonakeys)) - `-not` search parameter no longer opens editor [\#1490](https://github.com/jrnl-org/jrnl/pull/1490) ([apainintheneck](https://github.com/apainintheneck)) - Fix TypeError when using debug flag [\#1484](https://github.com/jrnl-org/jrnl/pull/1484) ([jonakeys](https://github.com/jonakeys)) - Prompt for password change when using 'jrnl --encrypt' on already encrypted journal [\#1477](https://github.com/jrnl-org/jrnl/pull/1477) ([jonakeys](https://github.com/jonakeys)) From b66e28faa0a7cc88f7bfb794f4207755190c7f3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Jun 2022 11:36:20 -0700 Subject: [PATCH 0640/1132] Bump keyring from 23.5.1 to 23.6.0 (#1499) Bumps [keyring](https://github.com/jaraco/keyring) from 23.5.1 to 23.6.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.5.1...v23.6.0) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1a059b9f..84a9ba65 100644 --- a/poetry.lock +++ b/poetry.lock @@ -320,14 +320,14 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.5.1" +version = "23.6.0" description = "Store and access your passwords safely." category = "main" optional = false python-versions = ">=3.7" [package.dependencies] -importlib-metadata = ">=3.6" +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} @@ -1124,8 +1124,8 @@ jinja2 = [ {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ - {file = "keyring-23.5.1-py3-none-any.whl", hash = "sha256:9ef58314bcc823f426b49ec787539a2d73571b37de4cd498f839803b01acff1e"}, - {file = "keyring-23.5.1.tar.gz", hash = "sha256:dee502cdf18a98211bef428eea11456a33c00718b2f08524fd5727c7f424bffd"}, + {file = "keyring-23.6.0-py3-none-any.whl", hash = "sha256:372ff2fc43ab779e3f87911c26e6c7acc8bb440cbd82683e383ca37594cb0617"}, + {file = "keyring-23.6.0.tar.gz", hash = "sha256:3ac00c26e4c93739e19103091a9986a9f79665a78cf15a4df1dba7ea9ac8da2f"}, ] mako = [ {file = "Mako-1.2.0-py3-none-any.whl", hash = "sha256:23aab11fdbbb0f1051b93793a58323ff937e98e34aece1c4219675122e57e4ba"}, From 024de4d8b3ce608063d7fb1eab27faf8fabba57a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Jun 2022 18:37:54 +0000 Subject: [PATCH 0641/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bac631e..5d4b4104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ **Fixed bugs:** +- --debug leads to logging error after composing new entry [\#1496](https://github.com/jrnl-org/jrnl/issues/1496) - Using -not argument by itself leads to new entry creation [\#1472](https://github.com/jrnl-org/jrnl/issues/1472) - Empty config file leads to confusing error message [\#1420](https://github.com/jrnl-org/jrnl/issues/1420) - "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) @@ -50,6 +51,7 @@ **Packaging:** - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump keyring from 23.5.1 to 23.6.0 [\#1499](https://github.com/jrnl-org/jrnl/pull/1499) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.5.0 to 23.5.1 [\#1487](https://github.com/jrnl-org/jrnl/pull/1487) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 37.0.1 to 37.0.2 [\#1467](https://github.com/jrnl-org/jrnl/pull/1467) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.2 to 37.0.1 [\#1462](https://github.com/jrnl-org/jrnl/pull/1462) ([dependabot[bot]](https://github.com/apps/dependabot)) From e2978029a581dd5d4c36bdd671e64a0d48aed92c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Jun 2022 11:39:09 -0700 Subject: [PATCH 0642/1132] Bump pyxdg from 0.27 to 0.28 (#1497) Bumps [pyxdg](https://github.com/takluyver/pyxdg) from 0.27 to 0.28. - [Release notes](https://github.com/takluyver/pyxdg/releases) - [Changelog](https://github.com/takluyver/pyxdg/blob/master/ChangeLog) - [Commits](https://github.com/takluyver/pyxdg/compare/rel-0.27...rel-0.28) --- updated-dependencies: - dependency-name: pyxdg dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 84a9ba65..88e973cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -718,7 +718,7 @@ python-versions = "*" [[package]] name = "pyxdg" -version = "0.27" +version = "0.28" description = "PyXDG contains implementations of freedesktop.org standards in python." category = "main" optional = false @@ -1304,8 +1304,8 @@ pywin32-ctypes = [ {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, ] pyxdg = [ - {file = "pyxdg-0.27-py2.py3-none-any.whl", hash = "sha256:2d6701ab7c74bbab8caa6a95e0a0a129b1643cf6c298bf7c569adec06d0709a0"}, - {file = "pyxdg-0.27.tar.gz", hash = "sha256:80bd93aae5ed82435f20462ea0208fb198d8eec262e831ee06ce9ddb6b91c5a5"}, + {file = "pyxdg-0.28-py2.py3-none-any.whl", hash = "sha256:bdaf595999a0178ecea4052b7f4195569c1ff4d344567bccdc12dfdf02d545ab"}, + {file = "pyxdg-0.28.tar.gz", hash = "sha256:3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4"}, ] pyyaml = [ {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, From 4d683a13c0126a5c454c2d08c1b2d12184c05dd6 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Jun 2022 18:41:17 +0000 Subject: [PATCH 0643/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d4b4104..ac2f52ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ - Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) - Bump keyring from 23.5.1 to 23.6.0 [\#1499](https://github.com/jrnl-org/jrnl/pull/1499) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pyxdg from 0.27 to 0.28 [\#1497](https://github.com/jrnl-org/jrnl/pull/1497) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.5.0 to 23.5.1 [\#1487](https://github.com/jrnl-org/jrnl/pull/1487) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 37.0.1 to 37.0.2 [\#1467](https://github.com/jrnl-org/jrnl/pull/1467) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump cryptography from 36.0.2 to 37.0.1 [\#1462](https://github.com/jrnl-org/jrnl/pull/1462) ([dependabot[bot]](https://github.com/apps/dependabot)) From f53110c69be8a8ebfa806ee85c4683f09320ac6e Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 11 Jun 2022 13:32:11 -0700 Subject: [PATCH 0644/1132] Rework how all output and messaging works in jrnl (#1475) * fix missed statement from last PR * replace print statement for adding an entry to a journal * clean up linting and format * change print statement over to new print_msg function * make print_msg always print to stderr * change print statement over to new print_msg function * update importer to use new message function * update yaml format to use new message function * code cleanup * update yaml format to use new message function * update yaml format to use new exception handling * update Journal class to use new message function * update install module to use new message function * update config module to use new message function * update upgrade module to properly use new message and exception handling * fix typo * update upgrade module to use new message handling * update welcome message to use new handling * update upgrade module to use new message handling * update upgrade module journal summaries to use new message handling * take out old code * update upgrade module to use new message handling * update upgrade module to use new message handling * update more modules to use new message handling * take out old comment * update deprecated_cmd to use new message handling * update text_exporter with new message handling, get rid of old color constants * get rid of hardcoded text * whitespace changes * rework MsgType into MsgStyle so messages can have different styles * add comment * Move around code to separate concerns of each function a bit more * update create_password and yesno prompt functions for new messaging * fix missing newline for keyboard interrupts * fix misc linting * fix bug with panel titles always showing 'error' after one error * fix missing import * update debug output after uncaught exception * update exception for new exception handling * rewrite yesno function to use new centralized messages * reduce the debug output slightly * clean up print_msgs function * clean up create_password function * clean up misc linting * rename screen_input to hide_input to be more clear * update encrypted journal prompt to use new messaging functionality * fix typo in message key * move rich console into function so we can mock properly * update password mock to use rich console instead of getpass * add more helpful output to then step * fix test by updating expected output * update message to use new functionality * rework mocks in test suite for new messaging functionality * fix linting issue * fix more tests * fix more tests * fix more tests * fix more tests * fix merge bug * update prompt_action_entries to use new messaging functionality * Add new input_method "type" This does the same thing as input_method "pipe" but is more clear what it's doing (typing text into the builtin composer) * get rid of old commented code * get rid of unused code * move some files around Co-authored-by: Micah Jerome Ellison --- jrnl/EncryptedJournal.py | 45 ++-- jrnl/FolderJournal.py | 1 - jrnl/Journal.py | 43 +++- jrnl/cli.py | 16 +- jrnl/color.py | 4 - jrnl/commands.py | 24 +- jrnl/config.py | 26 +- jrnl/editor.py | 12 +- jrnl/install.py | 43 ++-- jrnl/jrnl.py | 63 +++-- jrnl/messages.py | 141 ----------- jrnl/messages/Message.py | 11 + jrnl/messages/MsgStyle.py | 89 +++++++ jrnl/messages/MsgText.py | 248 +++++++++++++++++++ jrnl/messages/__init__.py | 7 + jrnl/output.py | 85 +++++-- jrnl/plugins/fancy_exporter.py | 4 +- jrnl/plugins/jrnl_importer.py | 21 +- jrnl/plugins/markdown_exporter.py | 19 +- jrnl/plugins/text_exporter.py | 48 ++-- jrnl/plugins/yaml_exporter.py | 33 ++- jrnl/prompt.py | 63 +++-- jrnl/upgrade.py | 157 +++++++----- pyproject.toml | 1 + tests/bdd/features/config_file.feature | 2 +- tests/bdd/features/datetime.feature | 2 +- tests/bdd/features/encrypt.feature | 6 +- tests/bdd/features/format.feature | 2 +- tests/bdd/features/multiple_journals.feature | 2 +- tests/bdd/features/override.feature | 2 +- tests/bdd/features/star.feature | 3 +- tests/bdd/features/upgrade.feature | 4 +- tests/bdd/features/write.feature | 16 +- tests/lib/fixtures.py | 81 +++--- tests/lib/given_steps.py | 6 +- tests/lib/then_steps.py | 17 +- tests/lib/when_steps.py | 8 +- tests/unit/test_output.py | 27 ++ 38 files changed, 912 insertions(+), 470 deletions(-) delete mode 100644 jrnl/messages.py create mode 100644 jrnl/messages/Message.py create mode 100644 jrnl/messages/MsgStyle.py create mode 100644 jrnl/messages/MsgText.py create mode 100644 jrnl/messages/__init__.py create mode 100644 tests/unit/test_output.py diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index 704a091a..fb4ba5ce 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -1,9 +1,7 @@ import base64 -import getpass import hashlib import logging import os -import sys from typing import Callable from typing import Optional @@ -24,7 +22,8 @@ from .prompt import create_password from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle +from jrnl.output import print_msg def make_key(password): @@ -46,21 +45,26 @@ def decrypt_content( keychain: str = None, max_attempts: int = 3, ) -> str: + def get_pw(): + return print_msg( + Message(MsgText.Password, MsgStyle.PROMPT), get_input=True, hide_input=True + ) + pwd_from_keychain = keychain and get_keychain(keychain) - password = pwd_from_keychain or getpass.getpass() + password = pwd_from_keychain or get_pw() result = decrypt_func(password) # Password is bad: if result is None and pwd_from_keychain: set_keychain(keychain, None) attempt = 1 while result is None and attempt < max_attempts: - print("Wrong password, try again.", file=sys.stderr) - password = getpass.getpass() + print_msg(Message(MsgText.WrongPasswordTryAgain, MsgStyle.WARNING)) + password = get_pw() result = decrypt_func(password) attempt += 1 if result is None: - raise JrnlException(Message(MsgText.PasswordMaxTriesExceeded, MsgType.ERROR)) + raise JrnlException(Message(MsgText.PasswordMaxTriesExceeded, MsgStyle.ERROR)) return result @@ -79,13 +83,22 @@ class EncryptedJournal(Journal): if not os.path.exists(filename): if not os.path.isdir(dirname): os.makedirs(dirname) - print(f"[Directory {dirname} created]", file=sys.stderr) + print_msg( + Message( + MsgText.DirectoryCreated, + MsgStyle.NORMAL, + {"directory_name": dirname}, + ) + ) self.create_file(filename) self.password = create_password(self.name) - print( - f"Encrypted journal '{self.name}' created at {filename}", - file=sys.stderr, + print_msg( + Message( + MsgText.JournalCreated, + MsgStyle.NORMAL, + {"journal_name": self.name, "filename": filename}, + ) ) text = self._load(filename) @@ -179,7 +192,7 @@ def get_keychain(journal_name): return keyring.get_password("jrnl", journal_name) except keyring.errors.KeyringError as e: if not isinstance(e, keyring.errors.NoKeyringError): - print("Failed to retrieve keyring", file=sys.stderr) + print_msg(Message(MsgText.KeyringRetrievalFailure, MsgStyle.ERROR)) return "" @@ -196,9 +209,7 @@ def set_keychain(journal_name, password): keyring.set_password("jrnl", journal_name, password) except keyring.errors.KeyringError as e: if isinstance(e, keyring.errors.NoKeyringError): - print( - "Keyring backend not found. Please install one of the supported backends by visiting: https://pypi.org/project/keyring/", - file=sys.stderr, - ) + msg = Message(MsgText.KeyringBackendNotFound, MsgStyle.WARNING) else: - print("Failed to retrieve keyring", file=sys.stderr) + msg = Message(MsgText.KeyringRetrievalFailure, MsgStyle.ERROR) + print_msg(msg) diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index 62b7ade5..a381c872 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -81,7 +81,6 @@ class Folder(Journal.Journal): filenames = get_files(self.config["journal"]) for filename in filenames: if os.stat(filename).st_size <= 0: - # print("empty file: {}".format(filename)) os.remove(filename) def delete_entries(self, entries_to_delete): diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 5a2f0b5a..b2e5383b 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -6,13 +6,17 @@ import datetime import logging import os import re -import sys from . import Entry from . import time from .prompt import yesno from .path import expand_path +from jrnl.output import print_msg +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgStyle + class Tag: def __init__(self, name, count=0): @@ -83,9 +87,24 @@ class Journal: if not os.path.exists(filename): if not os.path.isdir(dirname): os.makedirs(dirname) - print(f"[Directory {dirname} created]", file=sys.stderr) + print_msg( + Message( + MsgText.DirectoryCreated, + MsgStyle.NORMAL, + {"directory_name": dirname}, + ) + ) self.create_file(filename) - print(f"[Journal '{self.name}' created at {filename}]", file=sys.stderr) + print_msg( + Message( + MsgText.JournalCreated, + MsgStyle.NORMAL, + { + "journal_name": self.name, + "filename": filename, + }, + ) + ) text = self._load(filename) self.entries = self._parse(text) @@ -269,14 +288,17 @@ class Journal: for entry in self.entries: entry.date = date - def prompt_action_entries(self, message): + def prompt_action_entries(self, msg: MsgText): """Prompts for action for each entry in a journal, using given message. Returns the entries the user wishes to apply the action on.""" to_act = [] def ask_action(entry): return yesno( - f"{message} '{entry.pprint(short=True)}'?", + Message( + msg, + params={"entry_title": entry.pprint(short=True)}, + ), default=False, ) @@ -415,9 +437,14 @@ def open_journal(journal_name, config, legacy=False): if os.path.isdir(config["journal"]): if config["encrypt"]: - print( - "Warning: This journal's config has 'encrypt' set to true, but this type of journal can't be encrypted.", - file=sys.stderr, + print_msg( + Message( + MsgText.ConfigEncryptedForUnencryptableJournalType, + MsgStyle.WARNING, + { + "journal_name": journal_name, + }, + ) ) if config["journal"].strip("/").endswith(".dayone") or "entries" in os.listdir( diff --git a/jrnl/cli.py b/jrnl/cli.py index cd33f2ec..305e4502 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -12,7 +12,7 @@ from jrnl.output import print_msg from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle def configure_logger(debug=False): @@ -45,7 +45,13 @@ def cli(manual_args=None): except KeyboardInterrupt: status_code = 1 - print_msg("\nKeyboardInterrupt", "\nAborted by user", msg=Message.ERROR) + + print_msg( + Message( + MsgText.KeyboardInterruptMsg, + MsgStyle.ERROR_ON_NEW_LINE, + ) + ) except Exception as e: # uncaught exception @@ -61,13 +67,15 @@ def cli(manual_args=None): debug = True if debug: - print("\n") + from rich.console import Console + traceback.print_tb(sys.exc_info()[2]) + Console(stderr=True).print_exception(extra_lines=1) print_msg( Message( MsgText.UncaughtException, - MsgType.ERROR, + MsgStyle.ERROR, {"name": type(e).__name__, "exception": e}, ) ) diff --git a/jrnl/color.py b/jrnl/color.py index 691cce9c..7cc8df2f 100644 --- a/jrnl/color.py +++ b/jrnl/color.py @@ -9,10 +9,6 @@ from .os_compat import on_windows if on_windows(): colorama.init() -WARNING_COLOR = colorama.Fore.YELLOW -ERROR_COLOR = colorama.Fore.RED -RESET_COLOR = colorama.Fore.RESET - def colorize(string, color, bold=False): """Returns the string colored with colorama.Fore.color. If the color set by diff --git a/jrnl/commands.py b/jrnl/commands.py index 87d3981d..7ef9f09c 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -13,10 +13,12 @@ avoid any possible overhead for these standalone commands. """ import platform import sys + +from jrnl.output import print_msg from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle from jrnl.prompt import create_password @@ -77,7 +79,7 @@ def postconfig_encrypt(args, config, original_config, **kwargs): raise JrnlException( Message( MsgText.CannotEncryptJournalType, - MsgType.ERROR, + MsgStyle.ERROR, { "journal_name": args.journal_name, "journal_type": journal.__class__.__name__, @@ -95,9 +97,12 @@ def postconfig_encrypt(args, config, original_config, **kwargs): journal.config["encrypt"] = True new_journal.write(args.filename) - print( - f"Journal encrypted to {args.filename or new_journal.config['journal']}.", - file=sys.stderr, + print_msg( + Message( + MsgText.JournalEncryptedTo, + MsgStyle.NORMAL, + {"path": args.filename or new_journal.config["journal"]}, + ) ) # Update the config, if we encrypted in place @@ -120,9 +125,12 @@ def postconfig_decrypt(args, config, original_config, **kwargs): new_journal = PlainJournal.from_journal(journal) new_journal.write(args.filename) - print( - f"Journal decrypted to {args.filename or new_journal.config['journal']}.", - file=sys.stderr, + print_msg( + Message( + MsgText.JournalDecryptedTo, + MsgStyle.NORMAL, + {"path": args.filename or new_journal.config["journal"]}, + ) ) # Update the config, if we decrypted in place diff --git a/jrnl/config.py b/jrnl/config.py index 67284c4a..c9b860bb 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -1,20 +1,18 @@ import logging import os -import sys import colorama from ruamel.yaml import YAML import xdg.BaseDirectory from . import __version__ +from jrnl.output import list_journals +from jrnl.output import print_msg from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle -from .color import ERROR_COLOR -from .color import RESET_COLOR -from .output import list_journals from .path import home_dir # Constants @@ -75,7 +73,7 @@ def get_config_path(): raise JrnlException( Message( MsgText.ConfigDirectoryIsFile, - MsgType.ERROR, + MsgStyle.ERROR, { "config_directory_path": os.path.join( xdg.BaseDirectory.xdg_config_home, XDG_RESOURCE @@ -143,11 +141,15 @@ def verify_config_colors(config): if upper_color == "NONE": continue if not getattr(colorama.Fore, upper_color, None): - print( - "[{2}ERROR{3}: {0} set to invalid color: {1}]".format( - key, color, ERROR_COLOR, RESET_COLOR - ), - file=sys.stderr, + print_msg( + Message( + MsgText.InvalidColor, + MsgStyle.NORMAL, + { + "key": key, + "color": color, + }, + ) ) all_valid_colors = False return all_valid_colors @@ -197,7 +199,7 @@ def get_journal_name(args, config): raise JrnlException( Message( MsgText.NoDefaultJournal, - MsgType.ERROR, + MsgStyle.ERROR, {"journals": list_journals(config)}, ), ) diff --git a/jrnl/editor.py b/jrnl/editor.py index 24c625de..91aa4d52 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -12,7 +12,7 @@ from jrnl.output import print_msg from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle def get_text_from_editor(config, template=""): @@ -33,7 +33,7 @@ def get_text_from_editor(config, template=""): raise JrnlException( Message( MsgText.EditorMisconfigured, - MsgType.ERROR, + MsgStyle.ERROR, {"editor_key": config["editor"]}, ) ) @@ -43,7 +43,7 @@ def get_text_from_editor(config, template=""): os.remove(tmpfile) if not raw: - raise JrnlException(Message(MsgText.NoTextReceived, MsgType.ERROR)) + raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.ERROR)) return raw @@ -52,7 +52,7 @@ def get_text_from_stdin(): print_msg( Message( MsgText.WritingEntryStart, - MsgType.TITLE, + MsgStyle.TITLE, { "how_to_quit": MsgText.HowToQuitWindows if on_windows() @@ -66,8 +66,8 @@ def get_text_from_stdin(): except KeyboardInterrupt: logging.error("Write mode: keyboard interrupt") raise JrnlException( - Message(MsgText.KeyboardInterruptMsg, MsgType.ERROR), - Message(MsgText.JournalNotSaved, MsgType.WARNING), + Message(MsgText.KeyboardInterruptMsg, MsgStyle.ERROR_ON_NEW_LINE), + Message(MsgText.JournalNotSaved, MsgStyle.WARNING), ) return raw diff --git a/jrnl/install.py b/jrnl/install.py index 0e29eb48..88663d58 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -20,10 +20,11 @@ from .config import verify_config_colors from .prompt import yesno from .upgrade import is_old_version +from jrnl.output import print_msg from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle def upgrade_config(config_data, alt_config_path=None): @@ -38,9 +39,10 @@ def upgrade_config(config_data, alt_config_path=None): config_data[key] = default_config[key] save_config(config_data, alt_config_path) config_path = alt_config_path if alt_config_path else get_config_path() - print( - f"[Configuration updated to newest version at {config_path}]", - file=sys.stderr, + print_msg( + Message( + MsgText.ConfigUpdated, MsgStyle.NORMAL, {"config_path": config_path} + ) ) @@ -57,7 +59,7 @@ def find_alt_config(alt_config): if not os.path.exists(alt_config): raise JrnlException( Message( - MsgText.AltConfigNotFound, MsgType.ERROR, {"config_file": alt_config} + MsgText.AltConfigNotFound, MsgStyle.ERROR, {"config_file": alt_config} ) ) @@ -79,8 +81,15 @@ def load_or_install_jrnl(alt_config_path): config = load_config(config_path) if config is None: - print("Unable to parse config file", file=sys.stderr) - sys.exit() + raise JrnlException( + Message( + MsgText.CantParseConfigFile, + MsgStyle.ERROR, + { + "config_path": config_path, + }, + ) + ) if is_old_version(config_path): from jrnl import upgrade @@ -103,8 +112,17 @@ def install(): # Where to create the journal? default_journal_path = get_default_journal_path() - path_query = f"Path to your journal file (leave blank for {default_journal_path}): " - journal_path = absolute_path(input(path_query).strip() or default_journal_path) + user_given_path = print_msg( + Message( + MsgText.InstallJournalPathQuestion, + MsgStyle.PROMPT, + params={ + "default_journal_path": default_journal_path, + }, + ), + get_input=True, + ) + journal_path = absolute_path(user_given_path or default_journal_path) default_config = get_default_config() default_config["journals"][DEFAULT_JOURNAL_KEY] = journal_path @@ -116,13 +134,10 @@ def install(): pass # Encrypt it? - encrypt = yesno( - "Do you want to encrypt your journal? You can always change this later", - default=False, - ) + encrypt = yesno(Message(MsgText.EncryptJournalQuestion), default=False) if encrypt: default_config["encrypt"] = True - print("Journal will be encrypted.", file=sys.stderr) + print_msg(Message(MsgText.JournalEncrypted, MsgStyle.NORMAL)) save_config(default_config) return default_config diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index cd69a124..18ee4ed4 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -14,12 +14,14 @@ from .editor import get_text_from_editor from .editor import get_text_from_stdin from . import time from .override import apply_overrides +from jrnl.output import print_msg +from jrnl.output import print_msgs from .path import expand_path from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle def run(args): @@ -139,13 +141,19 @@ def write_mode(args, config, journal, **kwargs): if not raw or raw.isspace(): logging.error("Write mode: couldn't get raw text or entry was empty") - raise JrnlException(Message(MsgText.NoTextReceived, MsgType.ERROR)) + raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.ERROR)) logging.debug( 'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw ) journal.new_entry(raw) - print(f"[Entry added to {args.journal_name} journal]", file=sys.stderr) + print_msg( + Message( + MsgText.JournalEntryAdded, + MsgStyle.NORMAL, + {"journal_name": args.journal_name}, + ) + ) journal.write() logging.debug("Write mode: completed journal.write()") @@ -229,7 +237,7 @@ def _get_editor_template(config, **kwargs): raise JrnlException( Message( MsgText.CantReadTemplate, - MsgType.ERROR, + MsgStyle.ERROR, {"template": template_path}, ) ) @@ -277,7 +285,7 @@ def _edit_search_results(config, journal, old_entries, **kwargs): raise JrnlException( Message( MsgText.EditorNotConfigured, - MsgType.ERROR, + MsgStyle.ERROR, {"config_file": get_config_path()}, ) ) @@ -307,40 +315,45 @@ def _print_edited_summary(journal, old_stats, **kwargs): "deleted": old_stats["count"] - len(journal), "modified": len([e for e in journal.entries if e.modified]), } - - prompts = [] + stats["modified"] -= stats["added"] + msgs = [] if stats["added"] > 0: - prompts.append(f"{stats['added']} {_pluralize_entry(stats['added'])} added") - stats["modified"] -= stats["added"] + my_msg = ( + MsgText.JournalCountAddedSingular + if stats["added"] == 1 + else MsgText.JournalCountAddedPlural + ) + msgs.append(Message(my_msg, MsgStyle.NORMAL, {"num": stats["added"]})) if stats["deleted"] > 0: - prompts.append( - f"{stats['deleted']} {_pluralize_entry(stats['deleted'])} deleted" + my_msg = ( + MsgText.JournalCountDeletedSingular + if stats["deleted"] == 1 + else MsgText.JournalCountDeletedPlural ) + msgs.append(Message(my_msg, MsgStyle.NORMAL, {"num": stats["deleted"]})) - if stats["modified"]: - prompts.append( - f"{stats['modified']} {_pluralize_entry(stats['modified'])} modified" + if stats["modified"] > 0: + my_msg = ( + MsgText.JournalCountModifiedSingular + if stats["modified"] == 1 + else MsgText.JournalCountModifiedPlural ) + msgs.append(Message(my_msg, MsgStyle.NORMAL, {"num": stats["modified"]})) - if prompts: - print(f"[{', '.join(prompts).capitalize()}]", file=sys.stderr) + print_msgs(msgs) def _get_predit_stats(journal): return {"count": len(journal)} -def _pluralize_entry(num): - return "entry" if num == 1 else "entries" - - def _delete_search_results(journal, old_entries, **kwargs): if not journal.entries: - raise JrnlException(Message(MsgText.NothingToDelete, MsgType.ERROR)) + raise JrnlException(Message(MsgText.NothingToDelete, MsgStyle.ERROR)) - entries_to_delete = journal.prompt_action_entries("Delete entry") + entries_to_delete = journal.prompt_action_entries(MsgText.DeleteEntryQuestion) if entries_to_delete: journal.entries = old_entries @@ -351,7 +364,7 @@ def _delete_search_results(journal, old_entries, **kwargs): def _change_time_search_results(args, journal, old_entries, no_prompt=False, **kwargs): if not journal.entries: - raise JrnlException(Message(MsgText.NothingToModify, MsgType.WARNING)) + raise JrnlException(Message(MsgText.NothingToModify, MsgStyle.WARNING)) # separate entries we are not editing other_entries = _other_entries(journal, old_entries) @@ -359,7 +372,9 @@ def _change_time_search_results(args, journal, old_entries, no_prompt=False, **k if no_prompt: entries_to_change = journal.entries else: - entries_to_change = journal.prompt_action_entries("Change time") + entries_to_change = journal.prompt_action_entries( + MsgText.ChangeTimeEntryQuestion + ) if entries_to_change: other_entries += [e for e in journal.entries if e not in entries_to_change] diff --git a/jrnl/messages.py b/jrnl/messages.py deleted file mode 100644 index 34f45e7d..00000000 --- a/jrnl/messages.py +++ /dev/null @@ -1,141 +0,0 @@ -from enum import Enum -from typing import NamedTuple -from typing import Mapping - - -class _MsgColor(NamedTuple): - # This is a colorama color, and colorama doesn't support enums or type hints - # see: https://github.com/tartley/colorama/issues/91 - color: str - - -class MsgType(Enum): - TITLE = _MsgColor("cyan") - NORMAL = _MsgColor("white") - WARNING = _MsgColor("yellow") - ERROR = _MsgColor("red") - - @property - def color(self) -> _MsgColor: - return self.value.color - - -class MsgText(Enum): - def __str__(self) -> str: - return self.value - - # --- Exceptions ---# - UncaughtException = """ - {name} - {exception} - - This is probably a bug. Please file an issue at: - https://github.com/jrnl-org/jrnl/issues/new/choose - """ - - ConfigDirectoryIsFile = """ - The path to your jrnl configuration directory is a file, not a directory: - - {config_directory_path} - - Removing this file will allow jrnl to save its configuration. - """ - - LineWrapTooSmallForDateFormat = """ - The provided linewrap value of {config_linewrap} is too small by - {columns} columns to display the timestamps in the configured time - format for journal {journal}. - - You can avoid this error by specifying a linewrap value that is larger - by at least {columns} in the configuration file or by using - --config-override at the command line - """ - - CannotEncryptJournalType = """ - The journal {journal_name} can't be encrypted because it is a - {journal_type} journal. - - To encrypt it, create a new journal referencing a file, export - this journal to the new journal, then encrypt the new journal. - """ - - KeyboardInterruptMsg = "Aborted by user" - - CantReadTemplate = """ - Unreadable template - Could not read template file at: - {template} - """ - - NoDefaultJournal = "No default journal configured\n{journals}" - - # --- Journal status ---# - JournalNotSaved = "Entry NOT saved to journal" - - # --- Editor ---# - WritingEntryStart = """ - Writing Entry - To finish writing, press {how_to_quit} on a blank line. - """ - HowToQuitWindows = "Ctrl+z and then Enter" - HowToQuitLinux = "Ctrl+d" - - EditorMisconfigured = """ - No such file or directory: '{editor_key}' - - Please check the 'editor' key in your config file for errors: - editor: '{editor_key}' - """ - - EditorNotConfigured = """ - There is no editor configured - - To use the --edit option, please specify an editor your config file: - {config_file} - - For examples of how to configure an external editor, see: - https://jrnl.sh/en/stable/external-editors/ - """ - - NoTextReceived = """ - No entry to save, because no text was received - """ - - # --- Upgrade --- # - JournalFailedUpgrade = """ - The following journal{s} failed to upgrade: - {failed_journals} - - Please tell us about this problem at the following URL: - https://github.com/jrnl-org/jrnl/issues/new?title=JournalFailedUpgrade - """ - - UpgradeAborted = "jrnl was NOT upgraded" - - ImportAborted = "Entries were NOT imported" - - # -- Config --- # - AltConfigNotFound = """ - Alternate configuration file not found at the given path: - {config_file} - """ - - # --- Password --- # - PasswordMaxTriesExceeded = """ - Too many attempts with wrong password - """ - - # --- Search --- # - NothingToDelete = """ - No entries to delete, because the search returned no results - """ - - NothingToModify = """ - No entries to modify, because the search returned no results - """ - - -class Message(NamedTuple): - text: MsgText - type: MsgType = MsgType.NORMAL - params: Mapping = {} diff --git a/jrnl/messages/Message.py b/jrnl/messages/Message.py new file mode 100644 index 00000000..2c02e8a0 --- /dev/null +++ b/jrnl/messages/Message.py @@ -0,0 +1,11 @@ +from typing import NamedTuple +from typing import Mapping + +from .MsgText import MsgText +from .MsgStyle import MsgStyle + + +class Message(NamedTuple): + text: MsgText + style: MsgStyle = MsgStyle.NORMAL + params: Mapping = {} diff --git a/jrnl/messages/MsgStyle.py b/jrnl/messages/MsgStyle.py new file mode 100644 index 00000000..41daa535 --- /dev/null +++ b/jrnl/messages/MsgStyle.py @@ -0,0 +1,89 @@ +from enum import Enum +from typing import NamedTuple +from typing import Callable +from rich.panel import Panel +from rich import box + +from .MsgText import MsgText + + +class MsgStyle(Enum): + class _Color(NamedTuple): + """ + String representing a standard color to display + see: https://rich.readthedocs.io/en/stable/appendix/colors.html + """ + + color: str + + class _Decoration(Enum): + NONE = { + "callback": lambda x, **_: x, + "args": {}, + } + BOX = { + "callback": Panel, + "args": { + "expand": False, + "padding": (0, 2), + "title_align": "left", + "box": box.HEAVY, + }, + } + + @property + def callback(self) -> Callable: + return self.value["callback"] + + @property + def args(self) -> dict: + return self.value["args"] + + PROMPT = { + "decoration": _Decoration.NONE, + "color": _Color("white"), + "append_space": True, + } + TITLE = { + "decoration": _Decoration.BOX, + "color": _Color("cyan"), + } + NORMAL = { + "decoration": _Decoration.BOX, + "color": _Color("white"), + } + WARNING = { + "decoration": _Decoration.BOX, + "color": _Color("yellow"), + } + ERROR = { + "decoration": _Decoration.BOX, + "color": _Color("red"), + "box_title": str(MsgText.Error), + } + ERROR_ON_NEW_LINE = { + "decoration": _Decoration.BOX, + "color": _Color("red"), + "prepend_newline": True, + "box_title": str(MsgText.Error), + } + + @property + def decoration(self) -> _Decoration: + return self.value["decoration"] + + @property + def color(self) -> _Color: + return self.value["color"].color + + @property + def prepend_newline(self) -> bool: + return self.value.get("prepend_newline", False) + + @property + def append_space(self) -> bool: + return self.value.get("append_space", False) + + @property + def box_title(self) -> MsgText: + return self.value.get("box_title", None) diff --git a/jrnl/messages/MsgText.py b/jrnl/messages/MsgText.py new file mode 100644 index 00000000..f8e85b60 --- /dev/null +++ b/jrnl/messages/MsgText.py @@ -0,0 +1,248 @@ +from enum import Enum + + +class MsgText(Enum): + def __str__(self) -> str: + return self.value + + # -- Welcome --- # + WelcomeToJrnl = """ + Welcome to jrnl {version}! + + It looks like you've been using an older version of jrnl until now. That's + okay - jrnl will now upgrade your configuration and journal files. Afterwards + you can enjoy all of the great new features that come with jrnl 2: + + - Support for storing your journal in multiple files + - Faster reading and writing for large journals + - New encryption back-end that makes installing jrnl much easier + - Tons of bug fixes + + Please note that jrnl 1.x is NOT forward compatible with this version of jrnl. + If you choose to proceed, you will not be able to use your journals with + older versions of jrnl anymore. + """ + + AllDoneUpgrade = "We're all done here and you can start enjoying jrnl 2" + + # --- Prompts --- # + InstallJournalPathQuestion = """ + Path to your journal file (leave blank for {default_journal_path}): + """ + DeleteEntryQuestion = "Delete entry '{entry_title}'?" + ChangeTimeEntryQuestion = "Change time for '{entry_title}'?" + EncryptJournalQuestion = """ + Do you want to encrypt your journal? (You can always change this later) + """ + YesOrNoPromptDefaultYes = "[Y/n]" + YesOrNoPromptDefaultNo = "[y/N]" + ContinueUpgrade = "Continue upgrading jrnl?" + + # these should be lowercase, if possible in language + # "lowercase" means whatever `.lower()` returns + OneCharacterYes = "y" + OneCharacterNo = "n" + + # --- Exceptions ---# + Error = "Error" + UncaughtException = """ + {name} + {exception} + + This is probably a bug. Please file an issue at: + https://github.com/jrnl-org/jrnl/issues/new/choose + """ + + ConfigDirectoryIsFile = """ + Problem with config file! + The path to your jrnl configuration directory is a file, not a directory: + + {config_directory_path} + + Removing this file will allow jrnl to save its configuration. + """ + + CantParseConfigFile = """ + Unable to parse config file at: + {config_path} + """ + + LineWrapTooSmallForDateFormat = """ + The provided linewrap value of {config_linewrap} is too small by + {columns} columns to display the timestamps in the configured time + format for journal {journal}. + + You can avoid this error by specifying a linewrap value that is larger + by at least {columns} in the configuration file or by using + --config-override at the command line + """ + + CannotEncryptJournalType = """ + The journal {journal_name} can't be encrypted because it is a + {journal_type} journal. + + To encrypt it, create a new journal referencing a file, export + this journal to the new journal, then encrypt the new journal. + """ + + ConfigEncryptedForUnencryptableJournalType = """ + The config for journal "{journal_name}" has 'encrypt' set to true, but this type + of journal can't be encrypted. Please fix your config file. + """ + + KeyboardInterruptMsg = "Aborted by user" + + CantReadTemplate = """ + Unreadable template + Could not read template file at: + {template} + """ + + NoDefaultJournal = "No default journal configured\n{journals}" + + DoesNotExist = "{name} does not exist" + + # --- Journal status ---# + JournalNotSaved = "Entry NOT saved to journal" + JournalEntryAdded = "Entry added to {journal_name} journal" + + JournalCountAddedSingular = "{num} entry added" + JournalCountModifiedSingular = "{num} entry modified" + JournalCountDeletedSingular = "{num} entry deleted" + + JournalCountAddedPlural = "{num} entries added" + JournalCountModifiedPlural = "{num} entries modified" + JournalCountDeletedPlural = "{num} entries deleted" + + JournalCreated = "Journal '{journal_name}' created at {filename}" + DirectoryCreated = "Directory {directory_name} created" + JournalEncrypted = "Journal will be encrypted" + JournalEncryptedTo = "Journal encrypted to {path}" + JournalDecryptedTo = "Journal decrypted to {path}" + BackupCreated = "Created a backup at {filename}" + + # --- Editor ---# + WritingEntryStart = """ + Writing Entry + To finish writing, press {how_to_quit} on a blank line. + """ + HowToQuitWindows = "Ctrl+z and then Enter" + HowToQuitLinux = "Ctrl+d" + + EditorMisconfigured = """ + No such file or directory: '{editor_key}' + + Please check the 'editor' key in your config file for errors: + editor: '{editor_key}' + """ + + EditorNotConfigured = """ + There is no editor configured + + To use the --edit option, please specify an editor your config file: + {config_file} + + For examples of how to configure an external editor, see: + https://jrnl.sh/en/stable/external-editors/ + """ + + NoTextReceived = """ + No entry to save, because no text was received + """ + + # --- Upgrade --- # + JournalFailedUpgrade = """ + The following journal{s} failed to upgrade: + {failed_journals} + + Please tell us about this problem at the following URL: + https://github.com/jrnl-org/jrnl/issues/new?title=JournalFailedUpgrade + """ + + UpgradeAborted = "jrnl was NOT upgraded" + + AbortingUpgrade = "Aborting upgrade..." + + ImportAborted = "Entries were NOT imported" + + JournalsToUpgrade = """ + The following journals will be upgraded to jrnl {version}: + + """ + + JournalsToIgnore = """ + The following journals will not be touched: + + """ + + UpgradingJournal = """ + Upgrading '{journal_name}' journal stored in {path}... + """ + + UpgradingConfig = "Upgrading config..." + + PaddedJournalName = "{journal_name:{pad}} -> {path}" + + # -- Config --- # + AltConfigNotFound = """ + Alternate configuration file not found at the given path: + {config_file} + """ + + ConfigUpdated = """ + Configuration updated to newest version at {config_path} + """ + + # --- Password --- # + Password = "Password:" + PasswordFirstEntry = "Enter password for journal '{journal_name}': " + PasswordConfirmEntry = "Enter password again: " + PasswordMaxTriesExceeded = "Too many attempts with wrong password" + PasswordCanNotBeEmpty = "Password can't be empty!" + PasswordDidNotMatch = "Passwords did not match, please try again" + WrongPasswordTryAgain = "Wrong password, try again" + PasswordStoreInKeychain = "Do you want to store the password in your keychain?" + + # --- Search --- # + NothingToDelete = """ + No entries to delete, because the search returned no results + """ + + NothingToModify = """ + No entries to modify, because the search returned no results + """ + + # --- Formats --- # + HeadingsPastH6 = """ + Headings increased past H6 on export - {date} {title} + """ + + YamlMustBeDirectory = """ + YAML export must be to a directory, not a single file + """ + + JournalExportedTo = "Journal exported to {path}" + + # --- Import --- # + ImportSummary = """ + {count} imported to {journal_name} journal + """ + + # --- Color --- # + InvalidColor = "{key} set to invalid color: {color}" + + # --- Keyring --- # + KeyringBackendNotFound = """ + Keyring backend not found. + + Please install one of the supported backends by visiting: + https://pypi.org/project/keyring/ + """ + + KeyringRetrievalFailure = "Failed to retrieve keyring" + + # --- Deprecation --- # + DeprecatedCommand = """ + The command {old_cmd} is deprecated and will be removed from jrnl soon. + Please use {new_cmd} instead. + """ diff --git a/jrnl/messages/__init__.py b/jrnl/messages/__init__.py new file mode 100644 index 00000000..930fbe75 --- /dev/null +++ b/jrnl/messages/__init__.py @@ -0,0 +1,7 @@ +from .Message import Message +from .MsgStyle import MsgStyle +from .MsgText import MsgText + +Message = Message +MsgStyle = MsgStyle +MsgText = MsgText diff --git a/jrnl/output.py b/jrnl/output.py index f31a02e2..fb21990b 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -1,25 +1,24 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - -import logging -import sys import textwrap -from jrnl.color import colorize -from jrnl.color import RESET_COLOR -from jrnl.color import WARNING_COLOR +from typing import Union +from rich.text import Text +from rich.console import Console + from jrnl.messages import Message +from jrnl.messages import MsgStyle +from jrnl.messages import MsgText def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs): - - warning_msg = f""" - The command {old_cmd} is deprecated and will be removed from jrnl soon. - Please use {new_cmd} instead. - """ - warning_msg = textwrap.dedent(warning_msg) - logging.warning(warning_msg) - print(f"{WARNING_COLOR}{warning_msg}{RESET_COLOR}", file=sys.stderr) + print_msg( + Message( + MsgText.DeprecatedCommand, + MsgStyle.WARNING, + {"old_cmd": old_cmd, "new_cmd": new_cmd}, + ) + ) if callback is not None: callback(**kwargs) @@ -38,14 +37,56 @@ def list_journals(configuration): return result -def print_msg(msg: Message): - msg_text = textwrap.dedent(msg.text.value.format(**msg.params)).strip().split("\n") +def print_msg(msg: Message, **kwargs) -> Union[None, str]: + """Helper function to print a single message""" + kwargs["style"] = msg.style + return print_msgs([msg], **kwargs) - longest_string = len(max(msg_text, key=len)) - msg_text = [f"[ {line:<{longest_string}} ]" for line in msg_text] - # colorize can't be called until after the lines are padded, - # because python gets confused by the ansi color codes - msg_text[0] = f"[{colorize(msg_text[0][1:-1], msg.type.color)}]" +def print_msgs( + msgs: list[Message], + delimiter: str = "\n", + style: MsgStyle = MsgStyle.NORMAL, + get_input: bool = False, + hide_input: bool = False, +) -> Union[None, str]: + # Same as print_msg, but for a list + text = Text("", end="") + kwargs = style.decoration.args - print("\n".join(msg_text), file=sys.stderr) + for i, msg in enumerate(msgs): + kwargs = _add_extra_style_args_if_needed(kwargs, msg=msg) + + m = format_msg_text(msg) + + if i != len(msgs) - 1: + m.append(delimiter) + + text.append(m) + + if style.append_space: + text.append(" ") + + decorated_text = style.decoration.callback(text, **kwargs) + + # Always print messages to stderr + console = _get_console(stderr=True) + + if get_input: + return str(console.input(prompt=decorated_text, password=hide_input)) + console.print(decorated_text, new_line_start=style.prepend_newline) + + +def _get_console(stderr: bool = True) -> Console: + return Console(stderr=stderr) + + +def _add_extra_style_args_if_needed(args, msg): + args["border_style"] = msg.style.color + args["title"] = msg.style.box_title + return args + + +def format_msg_text(msg: Message) -> Text: + text = textwrap.dedent(msg.text.value.format(**msg.params)).strip() + return Text(text) diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index c3dbc467..0c440e96 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -5,7 +5,7 @@ from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle from textwrap import TextWrapper from .text_exporter import TextExporter @@ -90,7 +90,7 @@ def check_provided_linewrap_viability(linewrap, card, journal): raise JrnlException( Message( MsgText.LineWrapTooSmallForDateFormat, - MsgType.NORMAL, + MsgStyle.NORMAL, { "config_linewrap": linewrap, "columns": width_violation, diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index 54dd2ab8..cfdee0d7 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -7,7 +7,8 @@ import sys from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle +from jrnl.output import print_msg class JRNLImporter: @@ -28,14 +29,20 @@ class JRNLImporter: other_journal_txt = sys.stdin.read() except KeyboardInterrupt: raise JrnlException( - Message(MsgText.KeyboardInterruptMsg, MsgType.ERROR), - Message(MsgText.ImportAborted, MsgType.WARNING), + Message(MsgText.KeyboardInterruptMsg, MsgStyle.ERROR_ON_NEW_LINE), + Message(MsgText.ImportAborted, MsgStyle.WARNING), ) journal.import_(other_journal_txt) new_cnt = len(journal.entries) - print( - "[{} imported to {} journal]".format(new_cnt - old_cnt, journal.name), - file=sys.stderr, - ) journal.write() + print_msg( + Message( + MsgText.ImportSummary, + MsgStyle.NORMAL, + { + "count": new_cnt - old_cnt, + "journal_name": journal.name, + }, + ) + ) diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 11f748b6..63be85e0 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -4,13 +4,14 @@ import os import re -import sys - -from jrnl.color import RESET_COLOR -from jrnl.color import WARNING_COLOR from .text_exporter import TextExporter +from jrnl.output import print_msg +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgStyle + class MarkdownExporter(TextExporter): """This Exporter can convert entries and journals into Markdown.""" @@ -63,10 +64,12 @@ class MarkdownExporter(TextExporter): newbody = newbody + os.linesep if warn_on_heading_level is True: - print( - f"{WARNING_COLOR}WARNING{RESET_COLOR}: " - f"Headings increased past H6 on export - {date_str} {entry.title}", - file=sys.stderr, + print_msg( + Message( + MsgText.HeadingsPastH6, + MsgStyle.WARNING, + {"date": date_str, "title": entry.title}, + ) ) return f"{heading} {date_str} {entry.title}\n{newbody} " diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index 4a5300df..d82a1e40 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -6,8 +6,10 @@ import os import re import unicodedata -from jrnl.color import ERROR_COLOR -from jrnl.color import RESET_COLOR +from jrnl.output import print_msg +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgStyle class TextExporter: @@ -29,14 +31,18 @@ class TextExporter: @classmethod def write_file(cls, journal, path): """Exports a journal into a single file.""" - try: - with open(path, "w", encoding="utf-8") as f: - f.write(cls.export_journal(journal)) - return f"[Journal exported to {path}]" - except IOError as e: - return f"[{ERROR_COLOR}ERROR{RESET_COLOR}: {e.filename} {e.strerror}]" - except RuntimeError as e: - return e + with open(path, "w", encoding="utf-8") as f: + f.write(cls.export_journal(journal)) + print_msg( + Message( + MsgText.JournalExportedTo, + MsgStyle.NORMAL, + { + "path": path, + }, + ) + ) + return "" @classmethod def make_filename(cls, entry): @@ -48,17 +54,17 @@ class TextExporter: def write_files(cls, journal, path): """Exports a journal into individual files for each entry.""" for entry in journal.entries: - try: - full_path = os.path.join(path, cls.make_filename(entry)) - with open(full_path, "w", encoding="utf-8") as f: - f.write(cls.export_entry(entry)) - except IOError as e: - return "[{2}ERROR{3}: {0} {1}]".format( - e.filename, e.strerror, ERROR_COLOR, RESET_COLOR - ) - except RuntimeError as e: - return e - return "[Journal exported to {}]".format(path) + full_path = os.path.join(path, cls.make_filename(entry)) + with open(full_path, "w", encoding="utf-8") as f: + f.write(cls.export_entry(entry)) + print_msg( + Message( + MsgText.JournalExportedTo, + MsgStyle.NORMAL, + {"path": path}, + ) + ) + return "" def _slugify(string): """Slugifies a string. diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 8983d2e4..f78c781b 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -4,14 +4,15 @@ import os import re -import sys - -from jrnl.color import ERROR_COLOR -from jrnl.color import RESET_COLOR -from jrnl.color import WARNING_COLOR from .text_exporter import TextExporter +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgStyle +from jrnl.output import print_msg + class YAMLExporter(TextExporter): """This Exporter can convert entries and journals into Markdown formatted text with YAML front matter.""" @@ -23,10 +24,7 @@ class YAMLExporter(TextExporter): def export_entry(cls, entry, to_multifile=True): """Returns a markdown representation of a single entry, with YAML front matter.""" if to_multifile is False: - raise RuntimeError( - f"{ERROR_COLOR}ERROR{RESET_COLOR}: YAML export must be to individual files. Please \ - specify a directory to export to." - ) + raise JrnlException(Message(MsgText.YamlMustBeDirectory, MsgStyle.ERROR)) date_str = entry.date.strftime(entry.journal.config["timeformat"]) body_wrapper = "\n" if entry.body else "" @@ -78,11 +76,12 @@ class YAMLExporter(TextExporter): spacebody = spacebody + "\t" + line if warn_on_heading_level is True: - print( - "{}WARNING{}: Headings increased past H6 on export - {} {}".format( - WARNING_COLOR, RESET_COLOR, date_str, entry.title - ), - file=sys.stderr, + print_msg( + Message( + MsgText.HeadingsPastH6, + MsgStyle.WARNING, + {"date": date_str, "title": entry.title}, + ) ) dayone_attributes = "" @@ -129,8 +128,4 @@ class YAMLExporter(TextExporter): @classmethod def export_journal(cls, journal): """Returns an error, as YAML export requires a directory as a target.""" - raise RuntimeError( - "{}ERROR{}: YAML export must be to individual files. Please specify a directory to export to.".format( - ERROR_COLOR, RESET_COLOR - ) - ) + raise JrnlException(Message(MsgText.YamlMustBeDirectory, MsgStyle.ERROR)) diff --git a/jrnl/prompt.py b/jrnl/prompt.py index 48dbccdc..843e7425 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -1,32 +1,65 @@ # Copyright (C) 2012-2021 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - -import getpass -import sys +from jrnl.messages import Message +from jrnl.messages import MsgText +from jrnl.messages import MsgStyle +from jrnl.output import print_msg +from jrnl.output import print_msgs def create_password(journal_name: str) -> str: - - prompt = f"Enter password for journal '{journal_name}': " - + kwargs = { + "get_input": True, + "hide_input": True, + } while True: - pw = getpass.getpass(prompt) + pw = print_msg( + Message( + MsgText.PasswordFirstEntry, + MsgStyle.PROMPT, + params={"journal_name": journal_name}, + ), + **kwargs + ) + if not pw: - print("Password can't be an empty string!", file=sys.stderr) + print_msg(Message(MsgText.PasswordCanNotBeEmpty, MsgStyle.WARNING)) continue - elif pw == getpass.getpass("Enter password again: "): + + elif pw == print_msg( + Message(MsgText.PasswordConfirmEntry, MsgStyle.PROMPT), **kwargs + ): break - print("Passwords did not match, please try again", file=sys.stderr) + print_msg(Message(MsgText.PasswordDidNotMatch, MsgStyle.ERROR)) - if yesno("Do you want to store the password in your keychain?", default=True): + if yesno(Message(MsgText.PasswordStoreInKeychain), default=True): from .EncryptedJournal import set_keychain set_keychain(journal_name, pw) + return pw -def yesno(prompt, default=True): - prompt = f"{prompt.strip()} {'[Y/n]' if default else '[y/N]'} " - response = input(prompt) - return {"y": True, "n": False}.get(response.lower().strip(), default) +def yesno(prompt: Message, default: bool = True) -> bool: + response = print_msgs( + [ + prompt, + Message( + MsgText.YesOrNoPromptDefaultYes + if default + else MsgText.YesOrNoPromptDefaultNo + ), + ], + style=MsgStyle.PROMPT, + delimiter=" ", + get_input=True, + ) + + answers = { + str(MsgText.OneCharacterYes): True, + str(MsgText.OneCharacterNo): False, + } + + # Does using `lower()` work in all languages? + return answers.get(str(response).lower().strip(), default) diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index b9fc0092..5c033534 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -2,7 +2,6 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html import os -import sys from . import Journal from . import __version__ @@ -14,15 +13,14 @@ from .prompt import yesno from .path import expand_path from jrnl.output import print_msg - +from jrnl.output import print_msgs from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText -from jrnl.messages import MsgType +from jrnl.messages import MsgStyle def backup(filename, binary=False): - print(f" Created a backup at {filename}.backup", file=sys.stderr) filename = expand_path(filename) try: @@ -31,11 +29,18 @@ def backup(filename, binary=False): with open(filename + ".backup", "wb" if binary else "w") as backup: backup.write(contents) + + print_msg( + Message( + MsgText.BackupCreated, MsgStyle.NORMAL, {"filename": "filename.backup"} + ) + ) + except FileNotFoundError: - print(f"\nError: {filename} does not exist.") + print_msg(Message(MsgText.DoesNotExist, MsgStyle.WARNING, {"name": filename})) cont = yesno(f"\nCreate {filename}?", default=False) if not cont: - raise JrnlException(Message(MsgText.UpgradeAborted), MsgType.WARNING) + raise JrnlException(Message(MsgText.UpgradeAborted, MsgStyle.WARNING)) def check_exists(path): @@ -48,23 +53,7 @@ def check_exists(path): def upgrade_jrnl(config_path): config = load_config(config_path) - print( - f"""Welcome to jrnl {__version__}. - -It looks like you've been using an older version of jrnl until now. That's -okay - jrnl will now upgrade your configuration and journal files. Afterwards -you can enjoy all of the great new features that come with jrnl 2: - -- Support for storing your journal in multiple files -- Faster reading and writing for large journals -- New encryption back-end that makes installing jrnl much easier -- Tons of bug fixes - -Please note that jrnl 1.x is NOT forward compatible with this version of jrnl. -If you choose to proceed, you will not be able to use your journals with -older versions of jrnl anymore. -""" - ) + print_msg(Message(MsgText.WelcomeToJrnl, MsgStyle.NORMAL, {"version": __version__})) encrypted_journals = {} plain_journals = {} @@ -79,8 +68,10 @@ older versions of jrnl anymore. encrypt = config.get("encrypt") path = expand_path(journal_conf) - if not os.path.exists(path): - print(f"\nError: {path} does not exist.") + if os.path.exists(path): + path = os.path.expanduser(path) + else: + print_msg(Message(MsgText.DoesNotExist, MsgStyle.ERROR, {"name": path})) continue if encrypt: @@ -90,46 +81,54 @@ older versions of jrnl anymore. else: plain_journals[journal_name] = path - longest_journal_name = max([len(journal) for journal in config["journals"]]) - if encrypted_journals: - print( - f"\nFollowing encrypted journals will be upgraded to jrnl {__version__}:", - file=sys.stderr, - ) - for journal, path in encrypted_journals.items(): - print( - " {:{pad}} -> {}".format(journal, path, pad=longest_journal_name), - file=sys.stderr, - ) + kwargs = { + # longest journal name + "pad": max([len(journal) for journal in config["journals"]]), + } - if plain_journals: - print( - f"\nFollowing plain text journals will upgraded to jrnl {__version__}:", - file=sys.stderr, - ) - for journal, path in plain_journals.items(): - print( - " {:{pad}} -> {}".format(journal, path, pad=longest_journal_name), - file=sys.stderr, - ) + _print_journal_summary( + journals=encrypted_journals, + header=Message( + MsgText.JournalsToUpgrade, + params={ + "version": __version__, + }, + ), + **kwargs, + ) - if other_journals: - print("\nFollowing journals will be not be touched:", file=sys.stderr) - for journal, path in other_journals.items(): - print( - " {:{pad}} -> {}".format(journal, path, pad=longest_journal_name), - file=sys.stderr, - ) + _print_journal_summary( + journals=plain_journals, + header=Message( + MsgText.JournalsToUpgrade, + params={ + "version": __version__, + }, + ), + **kwargs, + ) - cont = yesno("\nContinue upgrading jrnl?", default=False) + _print_journal_summary( + journals=other_journals, + header=Message(MsgText.JournalsToIgnore), + **kwargs, + ) + + cont = yesno(Message(MsgText.ContinueUpgrade), default=False) if not cont: - raise JrnlException(Message(MsgText.UpgradeAborted), MsgType.WARNING) + raise JrnlException(Message(MsgText.UpgradeAborted), MsgStyle.WARNING) for journal_name, path in encrypted_journals.items(): - print( - f"\nUpgrading encrypted '{journal_name}' journal stored in {path}...", - file=sys.stderr, + print_msg( + Message( + MsgText.UpgradingJournal, + params={ + "journal_name": journal_name, + "path": path, + }, + ) ) + backup(path, binary=True) old_journal = Journal.open_journal( journal_name, scope_config(config, journal_name), legacy=True @@ -137,10 +136,16 @@ older versions of jrnl anymore. all_journals.append(EncryptedJournal.from_journal(old_journal)) for journal_name, path in plain_journals.items(): - print( - f"\nUpgrading plain text '{journal_name}' journal stored in {path}...", - file=sys.stderr, + print_msg( + Message( + MsgText.UpgradingJournal, + params={ + "journal_name": journal_name, + "path": path, + }, + ) ) + backup(path) old_journal = Journal.open_journal( journal_name, scope_config(config, journal_name), legacy=True @@ -151,29 +156,47 @@ older versions of jrnl anymore. failed_journals = [j for j in all_journals if not j.validate_parsing()] if len(failed_journals) > 0: - print_msg("Aborting upgrade.", msg=Message.NORMAL) - raise JrnlException( + Message(MsgText.AbortingUpgrade, MsgStyle.WARNING), Message( MsgText.JournalFailedUpgrade, - MsgType.ERROR, + MsgStyle.ERROR, { "s": "s" if len(failed_journals) > 1 else "", "failed_journals": "\n".join(j.name for j in failed_journals), }, - ) + ), ) # write all journals - or - don't for j in all_journals: j.write() - print("\nUpgrading config...", file=sys.stderr) + print_msg(Message(MsgText.UpgradingConfig, MsgStyle.NORMAL)) backup(config_path) - print("\nWe're all done here and you can start enjoying jrnl 2.", file=sys.stderr) + print_msg(Message(MsgText.AllDoneUpgrade, MsgStyle.NORMAL)) def is_old_version(config_path): return is_config_json(config_path) + + +def _print_journal_summary(journals: dict, header: Message, pad: int) -> None: + if not journals: + return + + msgs = [header] + for journal, path in journals.items(): + msgs.append( + Message( + MsgText.PaddedJournalName, + params={ + "journal_name": journal, + "path": path, + "pad": pad, + }, + ) + ) + print_msgs(msgs) diff --git a/pyproject.toml b/pyproject.toml index a0c04ef6..3dd8baa0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE pytest = { version = ">=6.2", optional = true } pytest-bdd = { version = ">=4.0.1", optional = true } toml = { version = ">=0.10", optional = true } +rich = "^12.2.0" [tool.poetry.dev-dependencies] mkdocs = ">=1.0,<1.3" diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index 0bba7037..168cd7aa 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -73,7 +73,7 @@ Feature: Multiple journals these three eyes these three eyes n - Then the output should contain "Encrypted journal 'new_encrypted' created" + Then the output should contain "Journal 'new_encrypted' created at " Scenario: Don't overwrite main config when encrypting a journal in an alternate config Given the config "basic_onefile.yaml" exists diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index 7676f1b2..1b9d00b9 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -69,7 +69,7 @@ Feature: Reading and writing to journal with custom date formats Scenario: Writing an entry at the prompt with custom date Given we use the config "little_endian_dates.yaml" - When we run "jrnl" and enter "2013-05-10: I saw Elvis. He's alive." + When we run "jrnl" and type "2013-05-10: I saw Elvis. He's alive." Then we should get no error When we run "jrnl -999" Then the output should contain "10.05.2013 09:00 I saw Elvis." diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index 78b21188..09a80bcc 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -2,8 +2,8 @@ Feature: Encrypting and decrypting journals Scenario: Decrypting a journal Given we use the config "encrypted.yaml" - # And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl --decrypt" and enter "bad doggie no biscuit" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl --decrypt" Then the output should contain "Journal decrypted" And the config for journal "default" should contain "encrypt: false" When we run "jrnl -99 --short" @@ -47,7 +47,7 @@ Feature: Encrypting and decrypting journals Scenario Outline: Running jrnl with encrypt: true on unencryptable journals Given we use the config "" When we run "jrnl --config-override encrypt true here is a new entry" - Then the error output should contain "this type of journal can't be encrypted" + Then the error output should contain "journal can't be encrypted" Examples: configs | config_file | diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index 9de28889..ce29a016 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -429,7 +429,7 @@ Feature: Custom formats Given we use the config "" And we use the password "test" if prompted When we run "jrnl --export yaml --file nonexistent_dir" - Then the output should contain "YAML export must be to individual files" + Then the output should contain "YAML export must be to a directory" And the output should not contain "Traceback" Examples: configs diff --git a/tests/bdd/features/multiple_journals.feature b/tests/bdd/features/multiple_journals.feature index 35df069b..09bd71fd 100644 --- a/tests/bdd/features/multiple_journals.feature +++ b/tests/bdd/features/multiple_journals.feature @@ -87,7 +87,7 @@ Feature: Multiple journals these three eyes these three eyes n - Then the output should contain "Encrypted journal 'new_encrypted' created" + Then the output should contain "Journal 'new_encrypted' created at" Scenario: Read and write to journal with emoji name Given we use the config "multiple.yaml" diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index d4b46e97..90b7e40b 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -3,7 +3,7 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys Scenario: Override configured editor with built-in input === editor:'' Given we use the config "basic_encrypted.yaml" And we use the password "test" if prompted - When we run "jrnl --config-override editor ''" and enter + When we run "jrnl --config-override editor ''" and type This is a journal entry Then the stdin prompt should have been called And the editor should not have been called diff --git a/tests/bdd/features/star.feature b/tests/bdd/features/star.feature index f1340f7b..f59a7ecc 100644 --- a/tests/bdd/features/star.feature +++ b/tests/bdd/features/star.feature @@ -29,7 +29,8 @@ Feature: Starring entries Scenario: Starring an entry will mark it in an encrypted journal Given we use the config "encrypted.yaml" - When we run "jrnl 20 july 2013 *: Best day of my life!" and enter "bad doggie no biscuit" + And we use the password "bad doggie no biscuit" if prompted + When we run "jrnl 20 july 2013 *: Best day of my life!" Then the output should contain "Entry added" When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit" Then the output should contain "2013-07-20 09:00 Best day of my life!" diff --git a/tests/bdd/features/upgrade.feature b/tests/bdd/features/upgrade.feature index e5714a82..c092dedb 100644 --- a/tests/bdd/features/upgrade.feature +++ b/tests/bdd/features/upgrade.feature @@ -41,7 +41,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Scenario: Upgrade with missing journal Given we use the config "upgrade_from_195_with_missing_journal.json" When we run "jrnl --list" and enter "Y" - Then the output should contain "Error: features/journals/missing.journal does not exist." + Then the output should contain "features/journals/missing.journal does not exist" And we should get no error Scenario: Upgrade with missing encrypted journal @@ -49,6 +49,6 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x When we run "jrnl --list" and enter Y bad doggie no biscuit - Then the output should contain "Error: features/journals/missing.journal does not exist." + Then the output should contain "features/journals/missing.journal does not exist" And the output should contain "We're all done" And we should get no error diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 608bc772..ede1934b 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -172,7 +172,7 @@ Feature: Writing new entries. Scenario Outline: Writing an entry at the prompt (no editor) should store the entry Given we use the config "" And we use the password "bad doggie no biscuit" if prompted - When we run "jrnl" and enter "25 jul 2013: I saw Elvis. He's alive." + When we run "jrnl" and type "25 jul 2013: I saw Elvis. He's alive." Then we should get no error When we run "jrnl -on '2013-07-25'" Then the output should contain "2013-07-25 09:00 I saw Elvis." @@ -233,8 +233,7 @@ Feature: Writing new entries. And we append to the editor if opened [2021-11-13] worked on jrnl tests When we run "jrnl --edit" - Then the output should contain - [1 entry added] + Then the output should contain "1 entry added" Examples: configs | config_file | @@ -252,8 +251,7 @@ Feature: Writing new entries. [2021-11-12] worked on jrnl tests again [2021-11-13] worked on jrnl tests a little bit more When we run "jrnl --edit" - Then the output should contain - [3 entries added] + Then the error output should contain "3 entries added" Examples: configs | config_file | @@ -269,8 +267,8 @@ Feature: Writing new entries. And we write to the editor if opened [2021-11-13] I am replacing my whole journal with this entry When we run "jrnl --edit" - Then the output should contain - [2 entries deleted, 1 entry modified] + Then the output should contain "2 entries deleted" + Then the output should contain "3 entries modified" Examples: configs | config_file | @@ -287,7 +285,7 @@ Feature: Writing new entries. [2021-11-13] I am replacing the last entry with this entry When we run "jrnl --edit -1" Then the output should contain - [1 entry modified] + 1 entry modified Examples: configs | config_file | @@ -304,7 +302,7 @@ Feature: Writing new entries. This is a small addendum to my latest entry. When we run "jrnl --edit" Then the output should contain - [1 entry modified] + 1 entry modified Examples: configs | config_file | diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index 8d820db6..6fc7cc2a 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -6,12 +6,15 @@ import os from pathlib import Path import tempfile +from collections.abc import Iterable from keyring import backend from keyring import errors from pytest import fixture from unittest.mock import patch +from unittest.mock import Mock from .helpers import get_fixture import toml +from rich.console import Console from jrnl.config import load_config from jrnl.os_compat import split_args @@ -85,7 +88,6 @@ def cli_run( mock_editor, mock_user_input, mock_overrides, - mock_password, ): # Check if we need more mocks mock_factories.update(mock_args) @@ -94,7 +96,6 @@ def cli_run( mock_factories.update(mock_editor) mock_factories.update(mock_config_path) mock_factories.update(mock_user_input) - mock_factories.update(mock_password) return { "status": 0, @@ -180,26 +181,6 @@ def toml_version(working_dir): return pyproject_contents["tool"]["poetry"]["version"] -@fixture -def mock_password(request): - def _mock_password(): - password = get_fixture(request, "password") - user_input = get_fixture(request, "user_input") - - if password: - password = password.splitlines() - - elif user_input: - password = user_input.splitlines() - - if not password: - password = Exception("Unexpected call for password") - - return patch("getpass.getpass", side_effect=password) - - return {"getpass": _mock_password} - - @fixture def input_method(): return "" @@ -221,30 +202,58 @@ def should_not(): @fixture -def mock_user_input(request, is_tty): - def _generator(target): - def _mock_user_input(): - user_input = get_fixture(request, "user_input", None) +def mock_user_input(request, password_input, stdin_input): + def _mock_user_input(): + # user_input needs to be here because we don't know it until cli_run starts + user_input = get_fixture(request, "all_input", None) + if user_input is None: + user_input = Exception("Unexpected call for user input") + else: + user_input = iter(user_input.splitlines()) - if user_input is None: - user_input = Exception("Unexpected call for user input") - else: - user_input = user_input.splitlines() if is_tty else [user_input] + def mock_console_input(**kwargs): + if kwargs["password"] and not isinstance(password_input, Exception): + return password_input - return patch(target, side_effect=user_input) + if isinstance(user_input, Iterable): + return next(user_input) - return _mock_user_input + # exceptions + return user_input if not kwargs["password"] else password_input + + mock_console = Mock(wraps=Console(stderr=True)) + mock_console.input = Mock(side_effect=mock_console_input) + + return patch("jrnl.output._get_console", return_value=mock_console) return { - "stdin": _generator("sys.stdin.read"), - "input": _generator("builtins.input"), + "user_input": _mock_user_input, + "stdin_input": lambda: patch("sys.stdin.read", side_effect=stdin_input), } +@fixture +def password_input(request): + password_input = get_fixture(request, "password", None) + if password_input is None: + password_input = Exception("Unexpected call for password input") + return password_input + + +@fixture +def stdin_input(request, is_tty): + stdin_input = get_fixture(request, "all_input", None) + if stdin_input is None or is_tty: + stdin_input = Exception("Unexpected call for stdin input") + else: + stdin_input = [stdin_input] + return stdin_input + + @fixture def is_tty(input_method): - assert input_method in ["", "enter", "pipe"] - return input_method != "pipe" + assert input_method in ["", "enter", "pipe", "type"] + return input_method not in ["pipe", "type"] @fixture diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index dd7c4720..4b545849 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -120,9 +120,9 @@ def config_exists(config_file, temp_dir, working_dir): shutil.copy2(config_source, config_dest) -@given(parse('we use the password "{pw}" if prompted'), target_fixture="password") -def use_password_forever(pw): - return pw +@given(parse('we use the password "{password}" if prompted')) +def use_password_forever(password): + return password @given("we create a cache directory", target_fixture="cache_dir") diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 8dc4da71..5ec83d3c 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -47,20 +47,23 @@ def output_should_contain( ): we_should = parse_should_or_should_not(should_or_should_not) + output_str = f"\nEXPECTED:\n{expected_output}\n\nACTUAL STDOUT:\n{cli_run['stdout']}\n\nACTUAL STDERR:\n{cli_run['stderr']}" assert expected_output if which_output_stream is None: assert ((expected_output in cli_run["stdout"]) == we_should) or ( (expected_output in cli_run["stderr"]) == we_should - ) + ), output_str elif which_output_stream == "standard": - assert (expected_output in cli_run["stdout"]) == we_should + assert (expected_output in cli_run["stdout"]) == we_should, output_str elif which_output_stream == "error": - assert (expected_output in cli_run["stderr"]) == we_should + assert (expected_output in cli_run["stderr"]) == we_should, output_str else: - assert (expected_output in cli_run[which_output_stream]) == we_should + assert ( + expected_output in cli_run[which_output_stream] + ) == we_should, output_str @then(parse("the output should not contain\n{expected_output}")) @@ -164,12 +167,12 @@ def config_var_in_memory( @then("we should be prompted for a password") def password_was_called(cli_run): - assert cli_run["mocks"]["getpass"].called + assert cli_run["mocks"]["user_input"].called @then("we should not be prompted for a password") def password_was_not_called(cli_run): - assert not cli_run["mocks"]["getpass"].called + assert not cli_run["mocks"]["user_input"].called @then(parse("the cache directory should contain the files\n{file_list}")) @@ -371,7 +374,7 @@ def count_editor_args(num_args, cli_run, editor_state, should_or_should_not): def stdin_prompt_called(cli_run, should_or_should_not): we_should = parse_should_or_should_not(should_or_should_not) - assert cli_run["mocks"]["stdin"].called == we_should + assert cli_run["mocks"]["stdin_input"].called == we_should @then(parse('the editor filename should end with "{suffix}"')) diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 60302c7c..bc1d742d 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -21,12 +21,12 @@ def when_we_change_directory(directory_name): # These variables are used in the `@when(re(...))` section below command = '(?P[^"]*)' -input_method = "(?Penter|pipe)" -user_input = '("(?P[^"]*)")' +input_method = "(?Penter|pipe|type)" +all_input = '("(?P[^"]*)")' -@when(parse('we run "jrnl {command}" and {input_method}\n{user_input}')) -@when(re(f'we run "jrnl ?{command}" and {input_method} {user_input}')) +@when(parse('we run "jrnl {command}" and {input_method}\n{all_input}')) +@when(re(f'we run "jrnl ?{command}" and {input_method} {all_input}')) @when(parse('we run "jrnl {command}"')) @when('we run "jrnl"') def we_run_jrnl(cli_run, capsys, keyring): diff --git a/tests/unit/test_output.py b/tests/unit/test_output.py new file mode 100644 index 00000000..0fa9f45b --- /dev/null +++ b/tests/unit/test_output.py @@ -0,0 +1,27 @@ +# Copyright (C) 2012-2021 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html +from unittest.mock import Mock +from unittest.mock import patch + +from jrnl.messages import Message +from jrnl.output import print_msg + + +@patch("jrnl.output.print_msgs") +def test_print_msg_calls_print_msgs_as_list_with_style(print_msgs): + test_msg = Mock(Message) + print_msg(test_msg) + print_msgs.assert_called_once_with([test_msg], style=test_msg.style) + + +@patch("jrnl.output.print_msgs") +def test_print_msg_calls_print_msgs_with_kwargs(print_msgs): + test_msg = Mock(Message) + kwargs = { + "delimter": "test delimiter 🤡", + "get_input": True, + "hide_input": True, + "some_rando_arg": "💩", + } + print_msg(test_msg, **kwargs) + print_msgs.assert_called_once_with([test_msg], style=test_msg.style, **kwargs) From 86bc9bfd801822f822cb67ca690026b1f3f7f08e Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 11 Jun 2022 14:06:02 -0700 Subject: [PATCH 0645/1132] Add Python 3.11 to PR tests (#1500) * Add Python 3.11 to PR tests * Add testing_prs to trigger for testing PRs --- .github/workflows/testing_prs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml index 15015935..b5514f19 100644 --- a/.github/workflows/testing_prs.yaml +++ b/.github/workflows/testing_prs.yaml @@ -9,7 +9,7 @@ on: - 'tests/**' - 'poetry.lock' - 'pyproject.toml' - - '.github/workflows/testing.yaml' + - '.github/workflows/testing_prs.yaml' pull_request: branches: [ develop ] paths: @@ -18,7 +18,7 @@ on: - 'tests/**' - 'poetry.lock' - 'pyproject.toml' - - '.github/workflows/testing.yaml' + - '.github/workflows/testing_prs.yaml' defaults: run: @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.9, '3.10' ] + python-version: [ 3.9, '3.10', 3.11-dev ] os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - run: git config --global core.autocrlf false From 37ef1d9bc69c497602265645530e406b3d813292 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Jun 2022 21:08:07 +0000 Subject: [PATCH 0646/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac2f52ad..2d9980ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Add --change-time command to change the timestamp of an entry [\#1429](https://github.com/jrnl-org/jrnl/issues/1429) - Show name of journal when creating a password/encrypting [\#1478](https://github.com/jrnl-org/jrnl/pull/1478) ([jonakeys](https://github.com/jonakeys)) +- Rework how all output and messaging works in jrnl [\#1475](https://github.com/jrnl-org/jrnl/pull/1475) ([wren](https://github.com/wren)) - Implement --change-time flag [\#1452](https://github.com/jrnl-org/jrnl/pull/1452) ([richardjs](https://github.com/richardjs)) - Reformat additional messages and finish centralizing exception handling [\#1424](https://github.com/jrnl-org/jrnl/pull/1424) ([wren](https://github.com/wren)) - Reformat messages and add new centralized exception handling [\#1417](https://github.com/jrnl-org/jrnl/pull/1417) ([wren](https://github.com/wren)) @@ -41,6 +42,7 @@ **Build:** - Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) +- Add Python 3.11 to PR tests [\#1500](https://github.com/jrnl-org/jrnl/pull/1500) ([micahellison](https://github.com/micahellison)) - Pin jinja2 in docs requirements to keep readthedocs builds from failing [\#1439](https://github.com/jrnl-org/jrnl/pull/1439) ([micahellison](https://github.com/micahellison)) - Tidy up git ignore [\#1414](https://github.com/jrnl-org/jrnl/pull/1414) ([nelnog](https://github.com/nelnog)) From 7e7d374263cc35fc00517452e542434110515f20 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Jun 2022 21:09:10 +0000 Subject: [PATCH 0647/1132] Increment version to v3.0-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 5cc8607f..d8b052d1 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.8.4" +__version__ = "v3.0-beta" diff --git a/pyproject.toml b/pyproject.toml index 3dd8baa0..e37c3767 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.8.4" +version = "v3.0-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 9639c5386feb9b1dae69a99762d071f7c2d291e6 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Jun 2022 21:11:01 +0000 Subject: [PATCH 0648/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d9980ad..136eb49a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.0-beta](https://pypi.org/project/jrnl/v3.0-beta/) (2022-06-11) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...v3.0-beta) **Implemented enhancements:** From f5e052937c828cf4023c488ef36788c005b94094 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 18 Jun 2022 11:30:56 -0700 Subject: [PATCH 0649/1132] Update copyright year (#1502) Update copyright year in comment headers and --version output --- .github/workflows/changelog.yaml | 3 +++ .github/workflows/docs.yaml | 3 +++ .github/workflows/release.yaml | 3 +++ .github/workflows/testing_prs.yaml | 3 +++ .github/workflows/testing_schedule.yaml | 3 +++ CONTRIBUTING.md | 7 +++++-- README.md | 5 +++++ docs/advanced.md | 6 ++++-- docs/contributing.md | 7 +++++-- docs/encryption.md | 7 +++++-- docs/external-editors.md | 5 +++++ docs/formats.md | 7 +++++-- docs/installation.md | 7 +++++-- docs/journal-types.md | 7 +++++-- docs/overview.md | 7 +++++-- docs/privacy-and-security.md | 7 +++++-- docs/reference-command-line.md | 5 +++++ docs/reference-config-file.md | 5 +++++ docs/tips-and-tricks.md | 7 +++++-- docs/usage.md | 7 +++++-- docs_theme/assets/colors.css | 6 ++++-- docs_theme/assets/highlight.css | 3 +++ docs_theme/assets/index.css | 7 +++++-- docs_theme/assets/theme.css | 6 ++++-- docs_theme/index.html | 7 +++++-- docs_theme/main.html | 5 +++++ docs_theme/search.html | 5 +++++ jrnl/DayOneJournal.py | 3 +++ jrnl/EncryptedJournal.py | 3 +++ jrnl/Entry.py | 3 +-- jrnl/FolderJournal.py | 4 +--- jrnl/Journal.py | 3 +-- jrnl/__init__.py | 2 +- jrnl/__main__.py | 2 +- jrnl/args.py | 2 +- jrnl/cli.py | 2 +- jrnl/color.py | 3 +++ jrnl/commands.py | 5 ++++- jrnl/config.py | 3 +++ jrnl/editor.py | 3 +++ jrnl/exception.py | 3 ++- jrnl/install.py | 3 +-- jrnl/jrnl.py | 2 +- jrnl/messages/Message.py | 3 +++ jrnl/messages/MsgStyle.py | 3 +++ jrnl/messages/MsgText.py | 3 +++ jrnl/messages/__init__.py | 3 +++ jrnl/os_compat.py | 2 +- jrnl/output.py | 3 ++- jrnl/override.py | 3 +++ jrnl/path.py | 3 +++ jrnl/plugins/__init__.py | 3 +-- jrnl/plugins/dates_exporter.py | 4 ++-- jrnl/plugins/fancy_exporter.py | 3 +-- jrnl/plugins/jrnl_importer.py | 3 +-- jrnl/plugins/json_exporter.py | 3 +-- jrnl/plugins/markdown_exporter.py | 3 +-- jrnl/plugins/tag_exporter.py | 3 +-- jrnl/plugins/text_exporter.py | 3 +-- jrnl/plugins/util.py | 3 +-- jrnl/plugins/xml_exporter.py | 3 +-- jrnl/plugins/yaml_exporter.py | 3 +-- jrnl/prompt.py | 3 ++- jrnl/time.py | 2 +- jrnl/upgrade.py | 2 +- tests/bdd/features/build.feature | 3 +++ tests/bdd/features/change_time.feature | 3 +++ tests/bdd/features/config_file.feature | 3 +++ tests/bdd/features/core.feature | 3 +++ tests/bdd/features/datetime.feature | 3 +++ tests/bdd/features/delete.feature | 3 +++ tests/bdd/features/encrypt.feature | 3 +++ tests/bdd/features/file_storage.feature | 3 +++ tests/bdd/features/format.feature | 3 +++ tests/bdd/features/import.feature | 3 +++ tests/bdd/features/multiple_journals.feature | 3 +++ tests/bdd/features/override.feature | 3 +++ tests/bdd/features/password.feature | 3 +++ tests/bdd/features/search.feature | 3 +++ tests/bdd/features/star.feature | 3 +++ tests/bdd/features/tag.feature | 3 +++ tests/bdd/features/upgrade.feature | 3 +++ tests/bdd/features/write.feature | 3 +++ tests/bdd/test_features.py | 3 +++ tests/conftest.py | 2 +- tests/lib/fixtures.py | 2 +- tests/lib/given_steps.py | 2 +- tests/lib/helpers.py | 2 +- tests/lib/then_steps.py | 2 +- tests/lib/when_steps.py | 2 +- tests/unit/test_color.py | 3 +++ tests/unit/test_config_file.py | 3 +++ tests/unit/test_export.py | 3 +++ tests/unit/test_install.py | 3 +++ tests/unit/test_jrnl.py | 3 +++ tests/unit/test_os_compat.py | 3 +++ tests/unit/test_output.py | 3 ++- tests/unit/test_override.py | 3 +++ tests/unit/test_parse_args.py | 3 +++ tests/unit/test_path.py | 3 +++ tests/unit/test_time.py | 3 +++ 101 files changed, 282 insertions(+), 80 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index c8d184ec..b6dc9139 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + name: Changelog on: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index ac85f2c0..c4b6ef43 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + name: Docs on: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5e0169c1..3eb8c8f4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + name: Release on: workflow_dispatch: diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml index b5514f19..27126df8 100644 --- a/.github/workflows/testing_prs.yaml +++ b/.github/workflows/testing_prs.yaml @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + name: Testing on: diff --git a/.github/workflows/testing_schedule.yaml b/.github/workflows/testing_schedule.yaml index 44dd0b69..fd38cd41 100644 --- a/.github/workflows/testing_schedule.yaml +++ b/.github/workflows/testing_schedule.yaml @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + name: Testing on: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93b57d7e..bd00f6e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,8 @@ - + + # Contributing See "[Contributing](docs/contributing.md)" in the `docs` directory. diff --git a/README.md b/README.md index cacd8dda..e2809a0f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + +

diff --git a/docs/advanced.md b/docs/advanced.md index c0b1195c..61529fc4 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -1,5 +1,7 @@ - + # Advanced Usage diff --git a/docs/contributing.md b/docs/contributing.md index b12ce7be..ea651df5 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,5 +1,8 @@ - + + # Contributing to jrnl We welcome contributions to jrnl, whether it's through reporting bugs, improving the documentation, testing releases, engaging in discussion on features and bugs, or writing code. diff --git a/docs/encryption.md b/docs/encryption.md index 06217f01..e8b86e62 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -1,5 +1,8 @@ - + + # Encryption ## A Note on Security diff --git a/docs/external-editors.md b/docs/external-editors.md index 8797325a..efa0b55c 100644 --- a/docs/external-editors.md +++ b/docs/external-editors.md @@ -1,3 +1,8 @@ + + # External editors Configure your preferred external editor by updating the `editor` option diff --git a/docs/formats.md b/docs/formats.md index 99b3e69b..a87c4e8a 100644 --- a/docs/formats.md +++ b/docs/formats.md @@ -1,5 +1,8 @@ - + + # Formats `jrnl` supports a variety of alternate formats. These can be used to display your diff --git a/docs/installation.md b/docs/installation.md index a37e21fd..4d2c4c97 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,5 +1,8 @@ - + + # Getting started ## Installation diff --git a/docs/journal-types.md b/docs/journal-types.md index 65efc143..b2ec78da 100644 --- a/docs/journal-types.md +++ b/docs/journal-types.md @@ -1,5 +1,8 @@ - + + # Journal Types `jrnl` can store your journal in a few different ways: diff --git a/docs/overview.md b/docs/overview.md index 57269585..b20c85f9 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,5 +1,8 @@ - + + # Overview `jrnl` is a simple journal application for the command line. diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index c2996d25..9030df99 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -1,5 +1,8 @@ - + + # Privacy and Security `jrnl` is designed with privacy and security in mind, but like any other diff --git a/docs/reference-command-line.md b/docs/reference-command-line.md index bc624fe5..149ae26f 100644 --- a/docs/reference-command-line.md +++ b/docs/reference-command-line.md @@ -1,3 +1,8 @@ + + # Command Line Reference ## Synopsis diff --git a/docs/reference-config-file.md b/docs/reference-config-file.md index 97ec290c..03454c05 100644 --- a/docs/reference-config-file.md +++ b/docs/reference-config-file.md @@ -1,3 +1,8 @@ + + # Configuration File Reference `jrnl` stores its information in a YAML configuration file. diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index a158916c..c4531798 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -1,5 +1,8 @@ - + + # Tips and Tricks This page contains tips and tricks for using `jrnl`, often in conjunction diff --git a/docs/usage.md b/docs/usage.md index 1a4de2a2..9e8c3ee3 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,5 +1,8 @@ - + + # Basic Usage # `jrnl` has two modes: **composing** and **viewing**. Whenever you don't enter diff --git a/docs_theme/assets/colors.css b/docs_theme/assets/colors.css index 93d84b4d..3f8b46a8 100644 --- a/docs_theme/assets/colors.css +++ b/docs_theme/assets/colors.css @@ -1,5 +1,7 @@ -/* Copyright (C) 2012-2021 jrnl contributors - License: https://www.gnu.org/licenses/gpl-3.0.html */ +/* +Copyright (C) 2012-2022 jrnl contributors +License: https://www.gnu.org/licenses/gpl-3.0.html +*/ :root { /* For dark bg */ diff --git a/docs_theme/assets/highlight.css b/docs_theme/assets/highlight.css index b7052917..27950c0f 100644 --- a/docs_theme/assets/highlight.css +++ b/docs_theme/assets/highlight.css @@ -1,4 +1,7 @@ /* +Copyright (C) 2012-2022 jrnl contributors +License: https://www.gnu.org/licenses/gpl-3.0.html + Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage diff --git a/docs_theme/assets/index.css b/docs_theme/assets/index.css index a7ed63ee..d6e834e3 100644 --- a/docs_theme/assets/index.css +++ b/docs_theme/assets/index.css @@ -1,5 +1,8 @@ -/* Copyright (C) 2012-2021 jrnl contributors - License: https://www.gnu.org/licenses/gpl-3.0.html */ +/* +Copyright (C) 2012-2022 jrnl contributors +License: https://www.gnu.org/licenses/gpl-3.0.html +*/ + /* reset */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0} body { diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index 20c4cd89..152e0521 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -1,5 +1,7 @@ -/* Copyright (C) 2012-2021 jrnl contributors - License: https://www.gnu.org/licenses/gpl-3.0.html */ +/* +Copyright (C) 2012-2022 jrnl contributors +License: https://www.gnu.org/licenses/gpl-3.0.html +*/ /* ------------------------------------------------------------ */ /* Overrides for jrnl theme */ diff --git a/docs_theme/index.html b/docs_theme/index.html index b21493d2..57c90c76 100644 --- a/docs_theme/index.html +++ b/docs_theme/index.html @@ -1,5 +1,8 @@ - + + diff --git a/docs_theme/main.html b/docs_theme/main.html index 18a4f1cf..7849dd02 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -1,3 +1,8 @@ + + {% extends "base.html" %} {%- block search_button %} diff --git a/docs_theme/search.html b/docs_theme/search.html index b191fc2a..37bcfe5d 100644 --- a/docs_theme/search.html +++ b/docs_theme/search.html @@ -1,3 +1,8 @@ + + {% extends "main.html" %} {% block content %} diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 1e484365..8034e36b 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import datetime import fnmatch import os diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index fb4ba5ce..e2aec8ed 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import base64 import hashlib import logging diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 800345c6..323eef73 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -1,7 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - import datetime import re diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index a381c872..b5cf2e71 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -1,8 +1,6 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - import codecs import fnmatch import os diff --git a/jrnl/Journal.py b/jrnl/Journal.py index b2e5383b..301bba76 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -1,7 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - import datetime import logging import os diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 550d580f..2fc7e3bf 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html try: diff --git a/jrnl/__main__.py b/jrnl/__main__.py index 49497161..06ffedaa 100644 --- a/jrnl/__main__.py +++ b/jrnl/__main__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import sys diff --git a/jrnl/args.py b/jrnl/args.py index 1f3e3c9a..5fd8e370 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import argparse diff --git a/jrnl/cli.py b/jrnl/cli.py index 305e4502..e81fb1ce 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/color.py b/jrnl/color.py index 7cc8df2f..7268d773 100644 --- a/jrnl/color.py +++ b/jrnl/color.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import re from string import punctuation from string import whitespace diff --git a/jrnl/commands.py b/jrnl/commands.py index 7ef9f09c..dd2ce52b 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + """ Functions in this file are standalone commands. All standalone commands are split into two categories depending on whether they require the config to be loaded to be able to @@ -38,7 +41,7 @@ def preconfig_version(_): version_str = f"""{__title__} version {__version__} -Copyright (C) 2012-2021 jrnl contributors +Copyright (C) 2012-2022 jrnl contributors This is free software, and you are welcome to redistribute it under certain conditions; for details, see: https://www.gnu.org/licenses/gpl-3.0.html""" diff --git a/jrnl/config.py b/jrnl/config.py index c9b860bb..40746d3e 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import logging import os diff --git a/jrnl/editor.py b/jrnl/editor.py index 91aa4d52..a6bff5d3 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import logging import os import subprocess diff --git a/jrnl/exception.py b/jrnl/exception.py index fdfa61a4..6dfc6593 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -1,5 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html + from jrnl.messages import Message from jrnl.output import print_msg diff --git a/jrnl/install.py b/jrnl/install.py index 88663d58..a7dc6318 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -1,7 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html - import glob import logging import os diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 18ee4ed4..2c5fafae 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/messages/Message.py b/jrnl/messages/Message.py index 2c02e8a0..86809192 100644 --- a/jrnl/messages/Message.py +++ b/jrnl/messages/Message.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from typing import NamedTuple from typing import Mapping diff --git a/jrnl/messages/MsgStyle.py b/jrnl/messages/MsgStyle.py index 41daa535..b8e15316 100644 --- a/jrnl/messages/MsgStyle.py +++ b/jrnl/messages/MsgStyle.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from enum import Enum from typing import NamedTuple from typing import Callable diff --git a/jrnl/messages/MsgText.py b/jrnl/messages/MsgText.py index f8e85b60..8de0d518 100644 --- a/jrnl/messages/MsgText.py +++ b/jrnl/messages/MsgText.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from enum import Enum diff --git a/jrnl/messages/__init__.py b/jrnl/messages/__init__.py index 930fbe75..f2eaec4c 100644 --- a/jrnl/messages/__init__.py +++ b/jrnl/messages/__init__.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from .Message import Message from .MsgStyle import MsgStyle from .MsgText import MsgText diff --git a/jrnl/os_compat.py b/jrnl/os_compat.py index 6615b886..1ede4534 100644 --- a/jrnl/os_compat.py +++ b/jrnl/os_compat.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import shlex diff --git a/jrnl/output.py b/jrnl/output.py index fb21990b..3eae32cc 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -1,5 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html + import textwrap from typing import Union diff --git a/jrnl/override.py b/jrnl/override.py index 760b003e..6ef378f4 100644 --- a/jrnl/override.py +++ b/jrnl/override.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from .config import update_config, make_yaml_valid_dict from argparse import Namespace diff --git a/jrnl/path.py b/jrnl/path.py index bb465d6e..cf13a2a8 100644 --- a/jrnl/path.py +++ b/jrnl/path.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import os.path diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index e3484927..f994e4fc 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from .fancy_exporter import FancyExporter diff --git a/jrnl/plugins/dates_exporter.py b/jrnl/plugins/dates_exporter.py index e032b652..c1c8fd0a 100644 --- a/jrnl/plugins/dates_exporter.py +++ b/jrnl/plugins/dates_exporter.py @@ -1,6 +1,6 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html + from collections import Counter from .text_exporter import TextExporter diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index 0c440e96..cdbd4b08 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.exception import JrnlException diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index cfdee0d7..0468b476 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import sys diff --git a/jrnl/plugins/json_exporter.py b/jrnl/plugins/json_exporter.py index 666d9a3d..abce6f50 100644 --- a/jrnl/plugins/json_exporter.py +++ b/jrnl/plugins/json_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import json diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 63be85e0..30614746 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/jrnl/plugins/tag_exporter.py b/jrnl/plugins/tag_exporter.py index 1153fa01..9c2b7fb5 100644 --- a/jrnl/plugins/tag_exporter.py +++ b/jrnl/plugins/tag_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from .text_exporter import TextExporter diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index d82a1e40..55c0d83a 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/jrnl/plugins/util.py b/jrnl/plugins/util.py index ae49a2a8..a2188306 100644 --- a/jrnl/plugins/util.py +++ b/jrnl/plugins/util.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/xml_exporter.py b/jrnl/plugins/xml_exporter.py index 9901f4b7..10050b50 100644 --- a/jrnl/plugins/xml_exporter.py +++ b/jrnl/plugins/xml_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from xml.dom import minidom diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index f78c781b..00a4613b 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -1,5 +1,4 @@ -# encoding: utf-8 -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/jrnl/prompt.py b/jrnl/prompt.py index 843e7425..4cd38d90 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -1,5 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html + from jrnl.messages import Message from jrnl.messages import MsgText from jrnl.messages import MsgStyle diff --git a/jrnl/time.py b/jrnl/time.py index f4e7319d..c457c12b 100644 --- a/jrnl/time.py +++ b/jrnl/time.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index 5c033534..29ff8eb4 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/tests/bdd/features/build.feature b/tests/bdd/features/build.feature index e9b47b49..d2f5e950 100644 --- a/tests/bdd/features/build.feature +++ b/tests/bdd/features/build.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Build process Scenario: Version numbers should stay in sync diff --git a/tests/bdd/features/change_time.feature b/tests/bdd/features/change_time.feature index bd8e77f7..7f4a08e3 100644 --- a/tests/bdd/features/change_time.feature +++ b/tests/bdd/features/change_time.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Change entry times in journal Scenario Outline: Change time flag changes single entry timestamp Given we use the config "" diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index 168cd7aa..76e93059 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Multiple journals Scenario: Read a journal from an alternate config diff --git a/tests/bdd/features/core.feature b/tests/bdd/features/core.feature index 4399341d..7b8de194 100644 --- a/tests/bdd/features/core.feature +++ b/tests/bdd/features/core.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Functionality of jrnl outside of actually handling journals Scenario: Displaying the version number diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index 1b9d00b9..28d63169 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Reading and writing to journal with custom date formats Scenario: Dates can include a time diff --git a/tests/bdd/features/delete.feature b/tests/bdd/features/delete.feature index fe323966..806abb18 100644 --- a/tests/bdd/features/delete.feature +++ b/tests/bdd/features/delete.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Delete entries from journal Scenario Outline: Delete flag allows deletion of single entry Given we use the config "" diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index 09a80bcc..16c8855c 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Encrypting and decrypting journals Scenario: Decrypting a journal diff --git a/tests/bdd/features/file_storage.feature b/tests/bdd/features/file_storage.feature index 5cb6ba45..0e54f620 100644 --- a/tests/bdd/features/file_storage.feature +++ b/tests/bdd/features/file_storage.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Journals iteracting with the file system in a way that users can see Scenario: Adding entries to a Folder journal should generate date files diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index ce29a016..9781ff51 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Custom formats Scenario Outline: Short printing via --format flag diff --git a/tests/bdd/features/import.feature b/tests/bdd/features/import.feature index 920cddf2..3872702e 100644 --- a/tests/bdd/features/import.feature +++ b/tests/bdd/features/import.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Importing data Scenario Outline: --import allows new entry from stdin diff --git a/tests/bdd/features/multiple_journals.feature b/tests/bdd/features/multiple_journals.feature index 09bd71fd..642149ca 100644 --- a/tests/bdd/features/multiple_journals.feature +++ b/tests/bdd/features/multiple_journals.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Multiple journals Scenario: Loading a config with two journals diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index 90b7e40b..9af459f3 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Implementing Runtime Overrides for Select Configuration Keys Scenario: Override configured editor with built-in input === editor:'' diff --git a/tests/bdd/features/password.feature b/tests/bdd/features/password.feature index 23a08aab..cf00f85c 100644 --- a/tests/bdd/features/password.feature +++ b/tests/bdd/features/password.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Using the installed keyring Scenario: Storing a password in keyring diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index 60b4fefb..239f74d5 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Searching in a journal Scenario Outline: Displaying entries using -on today should display entries created today diff --git a/tests/bdd/features/star.feature b/tests/bdd/features/star.feature index f59a7ecc..825ee2fa 100644 --- a/tests/bdd/features/star.feature +++ b/tests/bdd/features/star.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Starring entries Scenario Outline: Starring an entry will mark it in the journal file diff --git a/tests/bdd/features/tag.feature b/tests/bdd/features/tag.feature index a62b5ac8..1d762431 100644 --- a/tests/bdd/features/tag.feature +++ b/tests/bdd/features/tag.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Tagging # See search.feature for tag-related searches # And format.feature for tag-related output diff --git a/tests/bdd/features/upgrade.feature b/tests/bdd/features/upgrade.feature index c092dedb..5e53130a 100644 --- a/tests/bdd/features/upgrade.feature +++ b/tests/bdd/features/upgrade.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Upgrading Journals from 1.x.x to 2.x.x Scenario: Upgrade and parse journals with square brackets diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index ede1934b..fe0573ff 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + Feature: Writing new entries. Scenario Outline: Multiline entry with punctuation should keep title punctuation diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py index 04f9d46f..fda146e1 100644 --- a/tests/bdd/test_features.py +++ b/tests/bdd/test_features.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from pytest_bdd import scenarios scenarios("features/build.feature") diff --git a/tests/conftest.py b/tests/conftest.py index c4dc5ef5..ed85affa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from pytest import mark diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index 6fc7cc2a..1ad17708 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from collections import defaultdict diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index 4b545849..6da84643 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from datetime import datetime diff --git a/tests/lib/helpers.py b/tests/lib/helpers.py index ad68cde3..39a24f71 100644 --- a/tests/lib/helpers.py +++ b/tests/lib/helpers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import functools diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 5ec83d3c..08d8ddc7 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import json diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index bc1d742d..759c708d 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from contextlib import ExitStack diff --git a/tests/unit/test_color.py b/tests/unit/test_color.py index 527b8e89..800d619a 100644 --- a/tests/unit/test_color.py +++ b/tests/unit/test_color.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from colorama import Fore from colorama import Style import pytest diff --git a/tests/unit/test_config_file.py b/tests/unit/test_config_file.py index f9cdb7ec..0ffb3b38 100644 --- a/tests/unit/test_config_file.py +++ b/tests/unit/test_config_file.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import pytest import os diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index 1ca8856f..c5137794 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import pytest from jrnl.exception import JrnlException diff --git a/tests/unit/test_install.py b/tests/unit/test_install.py index bc36b927..8e5db8df 100644 --- a/tests/unit/test_install.py +++ b/tests/unit/test_install.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import sys from unittest import mock diff --git a/tests/unit/test_jrnl.py b/tests/unit/test_jrnl.py index f87f6dad..247a9fd1 100644 --- a/tests/unit/test_jrnl.py +++ b/tests/unit/test_jrnl.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from unittest import mock import pytest diff --git a/tests/unit/test_os_compat.py b/tests/unit/test_os_compat.py index 02d54716..2a3b0b14 100644 --- a/tests/unit/test_os_compat.py +++ b/tests/unit/test_os_compat.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + from unittest import mock import pytest diff --git a/tests/unit/test_output.py b/tests/unit/test_output.py index 0fa9f45b..e93ec44a 100644 --- a/tests/unit/test_output.py +++ b/tests/unit/test_output.py @@ -1,5 +1,6 @@ -# Copyright (C) 2012-2021 jrnl contributors +# Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html + from unittest.mock import Mock from unittest.mock import patch diff --git a/tests/unit/test_override.py b/tests/unit/test_override.py index 2719e884..438ae03b 100644 --- a/tests/unit/test_override.py +++ b/tests/unit/test_override.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import pytest from jrnl.override import _convert_dots_to_list diff --git a/tests/unit/test_parse_args.py b/tests/unit/test_parse_args.py index 7acae571..6c187576 100644 --- a/tests/unit/test_parse_args.py +++ b/tests/unit/test_parse_args.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import shlex import pytest diff --git a/tests/unit/test_path.py b/tests/unit/test_path.py index a13b89e5..efc6e54d 100644 --- a/tests/unit/test_path.py +++ b/tests/unit/test_path.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import pytest import random import string diff --git a/tests/unit/test_time.py b/tests/unit/test_time.py index 5f22148e..8bed5f86 100644 --- a/tests/unit/test_time.py +++ b/tests/unit/test_time.py @@ -1,3 +1,6 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + import datetime from jrnl import time From c1c70e643ab0b7db3e5a69d7cae9e38595b2e07a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 18 Jun 2022 18:32:43 +0000 Subject: [PATCH 0650/1132] Update changelog [ci skip] --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 136eb49a..01522eaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta...HEAD) + +**Fixed bugs:** + +- Adding new entry with date only works with format m.d.Y [\#1509](https://github.com/jrnl-org/jrnl/issues/1509) + +**Build:** + +- Update copyright year [\#1502](https://github.com/jrnl-org/jrnl/pull/1502) ([wren](https://github.com/wren)) + ## [v3.0-beta](https://pypi.org/project/jrnl/v3.0-beta/) (2022-06-11) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...v3.0-beta) From 51ab747019b0a6d4a4e2b01e7c03eb03363ba4c7 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 18 Jun 2022 11:36:56 -0700 Subject: [PATCH 0651/1132] Replace `make` with python alternative (`poe`) (#1503) * Get rid of `make` in favor of `poe` This moves the tasks that were previously in Makefile, into pyproject.toml (with all the other config) This is also more inclusive of Windows developers since they only need Python, and no longer have to install make separately. * udpate docs * don't make code blocks also links --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- Makefile | 39 -------------------------------- docs/contributing.md | 16 ++++++++----- poetry.lock | 39 ++++++++++++++++++++++++++++---- pyproject.toml | 21 +++++++++++++++++ 5 files changed, 68 insertions(+), 51 deletions(-) delete mode 100644 Makefile diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 695290e8..8a1fe45f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,6 +19,6 @@ Here are some key points to include in your description: - [ ] I have written new tests for these changes, as needed. diff --git a/Makefile b/Makefile deleted file mode 100644 index a9833c3e..00000000 --- a/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# A Makefile for commands I run frequently: - -clean: - rm -rf dist - rm -rf _static - rm -rf jrnl.egg-info - rm -rf _build - rm -rf _sources - rm -rf _static - rm -rf site/ - rm -f *.html - -html: - poetry run mkdocs serve - -format: ## Format files to match style - poetry run black . - -lint: ## Check style with various tools - poetry check - poetry run pflake8 jrnl tests - poetry run black --check --diff . - -unit: # unit tests - poetry run pytest tests/unit - -bdd: # bdd tests - poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native - -bdd-debug: # bdd tests - poetry run pytest tests/bdd --gherkin-terminal-reporter --tb=native -x -vv - -test: lint unit bdd - -build: - poetry build - -install: clean ## install the package to the active Python's site-packages - poetry install diff --git a/docs/contributing.md b/docs/contributing.md index ea651df5..650d0cda 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -27,7 +27,7 @@ Please report bugs by [opening a new issue](https://github.com/jrnl-org/jrnl/iss If you find a typo or a mistake in the docs, please fix it right away and send a pull request. If you're unsure what to change but still see a problem, you can [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) with the "Documentation change" type. -To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `make html` (or `poetry run mkdocs serve` if on Windows) inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). +To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `poe docs` inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. @@ -85,16 +85,20 @@ In general, pull requests should be made on the `develop` branch. ### Common development commands -You can find an inventory of commands in the `makefile`. \*nix users can run the commands by typing `make` followed by the name of the command; however, Windows users will need to type out the commands directly, or install a third-party make tool such as [GNU Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm). +You can find an inventory of commands in the `pyproject.toml`. Users can run the commands by typing `poe` followed by the name of the command ([Poe the Poet](https://github.com/nat-n/poethepoet) can be installed on its own, or as part of `poetry install`). A typical development workflow includes: - * Installing dependencies: `poetry install` - * Running tests: `make test` - * Running the source in a virtual environment: + * Installing dependencies: + * `poetry install` + * Activate virtual environment: * `poetry shell` + * Running the source in a virtual environment: * `jrnl` (with or without arguments as necessary) - * Linting the code to standardize its style: `make lint` + * Running tests: + * `poe test` + * Formatting the code to standardize its style: + * `poe format` ### Updating automated tests diff --git a/poetry.lock b/poetry.lock index 88e973cb..1f144a90 100644 --- a/poetry.lock +++ b/poetry.lock @@ -128,7 +128,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" name = "commonmark" version = "0.9.1" description = "Python parser for the CommonMark Markdown spec" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -487,6 +487,14 @@ python-versions = ">=3.6" qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] testing = ["docopt", "pytest (<6.0.0)"] +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + [[package]] name = "pathspec" version = "0.9.0" @@ -538,6 +546,21 @@ python-versions = ">=3.6" dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "poethepoet" +version = "0.13.1" +description = "A task runner that works well with poetry." +category = "dev" +optional = false +python-versions = ">=3.6.2" + +[package.dependencies] +pastel = ">=0.2.1,<0.3.0" +tomli = ">=1.2.2" + +[package.extras] +poetry_plugin = ["poetry (>=1.0,<2.0)"] + [[package]] name = "pprintpp" version = "0.4.0" @@ -612,7 +635,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "pygments" version = "2.12.0" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -747,7 +770,7 @@ pyyaml = "*" name = "rich" version = "12.4.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "dev" +category = "main" optional = false python-versions = ">=3.6.3,<4.0.0" @@ -933,7 +956,7 @@ testing = ["pytest", "pytest-bdd", "toml"] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "8cd80d198bf8208d9e4b2054b89a22f1ce9faccc91aaef3440fb22e1782b0239" +content-hash = "7c8a664dc14ce88642bb27318d23b158c044022b791361c98997a3f518c7cd8b" [metadata.files] ansiwrap = [ @@ -1216,6 +1239,10 @@ parso = [ {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, ] +pastel = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, @@ -1236,6 +1263,10 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] +poethepoet = [ + {file = "poethepoet-0.13.1-py3-none-any.whl", hash = "sha256:47e7b38c8b5412f840447f7612a9330697e8633e7500a7340b6734f50e26e380"}, + {file = "poethepoet-0.13.1.tar.gz", hash = "sha256:4f6962f17f5d5a453fd7fa66e3e7897e9191d4289148433efe441c81f2451a46"}, +] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, diff --git a/pyproject.toml b/pyproject.toml index e37c3767..b81c285b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ toml = ">=0.10" pytest = ">=6.2" pytest-bdd = ">=4.0.1" ipdb = "*" +poethepoet = "*" pytest-clarity = "*" pyproject-flake8 = "*" yq = "*" @@ -68,6 +69,26 @@ testing = [ "pytest", "pytest-bdd", "toml" ] [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' +[tool.poe.tasks] +bdd = "pytest tests/bdd --gherkin-terminal-reporter --tb=native" +bdd-debug = "poe bdd -x -vv" +format = "black ." +docs = "mkdocs serve" +unit = "pytest tests/unit" + +# Groups of tasks +lint = [ + {cmd = "poetry check"}, + {cmd = "pflake8 jrnl tests"}, + {cmd = "black --check --diff ."}, +] + +test = [ + "lint", + "unit", + "bdd", +] + [tool.isort] multi_line_output = 7 force_single_line = true From 2981de95b00e9ec5dc7c387448a4b3261ed8c4dd Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 18 Jun 2022 18:39:06 +0000 Subject: [PATCH 0652/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01522eaa..03730fd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Build:** +- Replace `make` with python alternative \(`poe`\) [\#1503](https://github.com/jrnl-org/jrnl/pull/1503) ([wren](https://github.com/wren)) - Update copyright year [\#1502](https://github.com/jrnl-org/jrnl/pull/1502) ([wren](https://github.com/wren)) ## [v3.0-beta](https://pypi.org/project/jrnl/v3.0-beta/) (2022-06-11) From fe2b9768492a5ce503d1761633606d6832ab5025 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 18 Jun 2022 11:51:51 -0700 Subject: [PATCH 0653/1132] update cache for accessibility tests (to match other tests) (#1505) --- .github/workflows/docs.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c4b6ef43..4cb8218b 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -42,11 +42,14 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@main + - name: Capture full Python version in env + run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV + - name: poetry cache uses: actions/cache@v2 with: path: .venv - key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }} + key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} - name: npm cache uses: actions/cache@v2 From bd590213a146bc6cc59a0329c43ce10b9601cd61 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 18 Jun 2022 11:53:20 -0700 Subject: [PATCH 0654/1132] Stop hardcoding bot info in some pipelines (#1506) --- .github/workflows/changelog.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index b6dc9139..ba1ad405 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -144,8 +144,8 @@ jobs: - name: Commit if: env.SOMETHING_CHANGED == 'true' run: | - git config user.email "jrnl.bot@gmail.com" - git config user.name "Jrnl Bot" + git config --global user.name "${{ secrets.JRNL_BOT_NAME }}" + git config --global user.email "${{ secrets.JRNL_BOT_EMAIL }}" git add "$FILENAME" git commit -m "Update changelog [ci skip]" git push origin $BRANCH From 7dccc469b53f1d614e5a2105f6d1018238272525 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 18 Jun 2022 11:54:28 -0700 Subject: [PATCH 0655/1132] Implement Tox for testing (#1504) * Get rid of `make` in favor of `poe` This moves the tasks that were previously in Makefile, into pyproject.toml (with all the other config) This is also more inclusive of Windows developers since they only need Python, and no longer have to install make separately. * update docs * don't make code blocks also links * implement tox for testing * update command to use new task runner --- .github/actions/run_tests/action.yaml | 21 +-- .github/workflows/docs.yaml | 2 +- .gitignore | 1 + poetry.lock | 217 +++++++++++++++++--------- pyproject.toml | 72 +++++++-- tests/__init__.py | 0 6 files changed, 209 insertions(+), 104 deletions(-) create mode 100644 tests/__init__.py diff --git a/.github/actions/run_tests/action.yaml b/.github/actions/run_tests/action.yaml index 3f40f2fd..c2242e0c 100644 --- a/.github/actions/run_tests/action.yaml +++ b/.github/actions/run_tests/action.yaml @@ -39,23 +39,12 @@ runs: echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV shell: bash - - name: Code formatting (Black) + - name: Linting if: ${{ env.DEPS_INSTALLED == 'true' }} - run: | - poetry run black --version - poetry run black --check --diff . + run: poetry run poe ci-lint shell: bash - - name: Code Style (flake8) - if: > - ${{ env.DEPS_INSTALLED == 'true' }} - run: | - poetry run pflake8 --version - poetry run pflake8 jrnl tests - shell: bash - - - name: Test with pytest - if: > - ${{ env.DEPS_INSTALLED == 'true' }} - run: poetry run pytest --junitxml=reports/pytest/results.xml + - name: Testing + if: ${{ env.DEPS_INSTALLED == 'true' }} + run: poetry run poe ci-test shell: bash diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 4cb8218b..395ba66f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -66,7 +66,7 @@ jobs: echo "node_modules/.bin" >> $GITHUB_PATH - name: Start docs server - run: poetry run mkdocs serve & + run: poetry run poe docs & - name: Generate sitemap env: diff --git a/.gitignore b/.gitignore index 4def365f..48cbcddc 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ eggs/ lib64/ parts/ sdist/ +.tox/ var/ # Versioning diff --git a/poetry.lock b/poetry.lock index 1f144a90..2a0abc4c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -46,7 +46,7 @@ test = ["astroid", "pytest"] name = "atomicwrites" version = "1.4.0" description = "Atomic file writes." -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -54,7 +54,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" name = "attrs" version = "21.4.0" description = "Classes Without Boilerplate" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -118,7 +118,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.5" description = "Cross-platform colored terminal text." category = "main" optional = false @@ -162,6 +162,14 @@ category = "dev" optional = false python-versions = ">=3.5" +[[package]] +name = "distlib" +version = "0.3.4" +description = "Distribution utilities" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "executing" version = "0.8.3" @@ -170,6 +178,18 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "filelock" +version = "3.7.1" +description = "A platform independent file lock." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] +testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] + [[package]] name = "flake8" version = "4.0.1" @@ -201,13 +221,13 @@ dev = ["twine", "markdown", "flake8", "wheel"] name = "glob2" version = "0.7" description = "Version of the glob module that can capture patterns and supports recursive wildcards" -category = "main" +category = "dev" optional = false python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.11.3" +version = "4.11.4" description = "Read metadata from Python packages" category = "main" optional = false @@ -225,7 +245,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -244,7 +264,7 @@ toml = {version = ">=0.10.2", markers = "python_version > \"3.6\""} [[package]] name = "ipython" -version = "8.3.0" +version = "8.4.0" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -340,7 +360,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- name = "mako" version = "1.2.0" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -370,7 +390,7 @@ testing = ["coverage", "pyyaml"] name = "markupsafe" version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -436,7 +456,7 @@ python-versions = "*" name = "packaging" version = "21.3" description = "Core utilities for Python packages" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -447,7 +467,7 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" name = "parse" version = "1.19.0" description = "parse() is the opposite of format()" -category = "main" +category = "dev" optional = false python-versions = "*" @@ -455,7 +475,7 @@ python-versions = "*" name = "parse-type" version = "0.6.0" description = "Simplifies to build parse types based on the parse module" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*" @@ -538,7 +558,7 @@ test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytes name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -603,7 +623,7 @@ tests = ["pytest"] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "main" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -641,9 +661,9 @@ python-versions = ">=3.6" [[package]] name = "pyparsing" -version = "3.0.8" +version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" +category = "dev" optional = false python-versions = ">=3.6.8" @@ -666,7 +686,7 @@ tomli = {version = "*", markers = "python_version < \"3.11\""} name = "pytest" version = "7.1.2" description = "pytest: simple powerful testing with Python" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -687,7 +707,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2. name = "pytest-bdd" version = "5.0.0" description = "BDD for pytest" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -768,7 +788,7 @@ pyyaml = "*" [[package]] name = "rich" -version = "12.4.0" +version = "12.4.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "main" optional = false @@ -826,7 +846,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "stack-data" -version = "0.2.0" +version = "0.3.0" description = "Extract data from python stack frames and tracebacks for informative displays" category = "dev" optional = false @@ -852,7 +872,7 @@ python-versions = "*" name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "main" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -860,20 +880,42 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" +[[package]] +name = "tox" +version = "3.25.0" +description = "tox is a generic virtualenv management and test command line tool" +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} +filelock = ">=3.0.0" +packaging = ">=14" +pluggy = ">=0.12.0" +py = ">=1.4.17" +six = ">=1.14.0" +toml = ">=0.9.4" +virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" + +[package.extras] +docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] +testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "psutil (>=5.6.1)", "pathlib2 (>=2.3.3)"] + [[package]] name = "traitlets" -version = "5.1.1" -description = "Traitlets Python configuration system" +version = "5.3.0" +description = "" category = "dev" optional = false python-versions = ">=3.7" [package.extras] -test = ["pytest"] +test = ["pre-commit", "pytest"] [[package]] name = "typing-extensions" @@ -894,9 +936,27 @@ python-versions = "*" [package.dependencies] pytz = "*" +[[package]] +name = "virtualenv" +version = "20.14.1" +description = "Virtual Python Environment builder" +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +distlib = ">=0.3.1,<1" +filelock = ">=3.2,<4" +platformdirs = ">=2,<3" +six = ">=1.9.0,<2" + +[package.extras] +docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] + [[package]] name = "watchdog" -version = "2.1.7" +version = "2.1.9" description = "Filesystem events monitoring" category = "dev" optional = false @@ -915,11 +975,11 @@ python-versions = "*" [[package]] name = "xmltodict" -version = "0.12.0" +version = "0.13.0" description = "Makes working with XML feel like you are working with JSON" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.4" [[package]] name = "yq" @@ -951,12 +1011,12 @@ docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [extras] -testing = ["pytest", "pytest-bdd", "toml"] +testing = [] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "7c8a664dc14ce88642bb27318d23b158c044022b791361c98997a3f518c7cd8b" +content-hash = "ceca9186ac31a0b8ec81a6cc134469842080c786971bb8642d9e67d51bd73fca" [metadata.files] ansiwrap = [ @@ -1069,8 +1129,8 @@ click = [ {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, @@ -1104,10 +1164,18 @@ decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] +distlib = [ + {file = "distlib-0.3.4-py2.py3-none-any.whl", hash = "sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b"}, + {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, +] executing = [ {file = "executing-0.8.3-py2.py3-none-any.whl", hash = "sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9"}, {file = "executing-0.8.3.tar.gz", hash = "sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501"}, ] +filelock = [ + {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, + {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, +] flake8 = [ {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, @@ -1120,8 +1188,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.11.3-py3-none-any.whl", hash = "sha256:1208431ca90a8cca1a6b8af391bb53c1a2db74e5d1cef6ddced95d4b2062edc6"}, - {file = "importlib_metadata-4.11.3.tar.gz", hash = "sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539"}, + {file = "importlib_metadata-4.11.4-py3-none-any.whl", hash = "sha256:c58c8eb8a762858f49e18436ff552e83914778e50e9d2f1660535ffb364552ec"}, + {file = "importlib_metadata-4.11.4.tar.gz", hash = "sha256:5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1131,8 +1199,8 @@ ipdb = [ {file = "ipdb-0.13.9.tar.gz", hash = "sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5"}, ] ipython = [ - {file = "ipython-8.3.0-py3-none-any.whl", hash = "sha256:341456643a764c28f670409bbd5d2518f9b82c013441084ff2c2fc999698f83b"}, - {file = "ipython-8.3.0.tar.gz", hash = "sha256:807ae3cf43b84693c9272f70368440a9a7eaa2e7e6882dad943c32fbf7e51402"}, + {file = "ipython-8.4.0-py3-none-any.whl", hash = "sha256:7ca74052a38fa25fe9bedf52da0be7d3fdd2fb027c3b778ea78dfe8c212937d1"}, + {file = "ipython-8.4.0.tar.gz", hash = "sha256:f2db3a10254241d9b447232cec8b424847f338d9d36f9a577a6192c332a46abd"}, ] jedi = [ {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, @@ -1304,8 +1372,8 @@ pygments = [ {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, ] pyparsing = [ - {file = "pyparsing-3.0.8-py3-none-any.whl", hash = "sha256:ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06"}, - {file = "pyparsing-3.0.8.tar.gz", hash = "sha256:7bf433498c016c4314268d95df76c81b842a4cb2b276fa3312cfb1e1d85f6954"}, + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] pyproject-flake8 = [ {file = "pyproject-flake8-0.0.1a4.tar.gz", hash = "sha256:8ed9453f1d984cfe94c998f9840275359e29e7f435b8ddd188ae084e2dc1270c"}, @@ -1378,8 +1446,8 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] rich = [ - {file = "rich-12.4.0-py3-none-any.whl", hash = "sha256:fdf6f447f231289dd446d31e5ee856fb0cc7dccd852a80f3e9d5aeecccabaedc"}, - {file = "rich-12.4.0.tar.gz", hash = "sha256:7aebf67874dc5cc2c89e2cb6ac322c95bd92510df2af0296c8bf494335ef704f"}, + {file = "rich-12.4.4-py3-none-any.whl", hash = "sha256:d2bbd99c320a2532ac71ff6a3164867884357da3e3301f0240090c5d2fdac7ec"}, + {file = "rich-12.4.4.tar.gz", hash = "sha256:4c586de507202505346f3e32d1363eb9ed6932f0c2f63184dea88983ff4971e2"}, ] "ruamel.yaml" = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, @@ -1421,8 +1489,8 @@ six = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] stack-data = [ - {file = "stack_data-0.2.0-py3-none-any.whl", hash = "sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e"}, - {file = "stack_data-0.2.0.tar.gz", hash = "sha256:45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12"}, + {file = "stack_data-0.3.0-py3-none-any.whl", hash = "sha256:aa1d52d14d09c7a9a12bb740e6bdfffe0f5e8f4f9218d85e7c73a8c37f7ae38d"}, + {file = "stack_data-0.3.0.tar.gz", hash = "sha256:77bec1402dcd0987e9022326473fdbcc767304892a533ed8c29888dacb7dddbc"}, ] textwrap3 = [ {file = "textwrap3-0.9.2-py2.py3-none-any.whl", hash = "sha256:bf5f4c40faf2a9ff00a9e0791fed5da7415481054cef45bb4a3cfb1f69044ae0"}, @@ -1436,9 +1504,13 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +tox = [ + {file = "tox-3.25.0-py2.py3-none-any.whl", hash = "sha256:0805727eb4d6b049de304977dfc9ce315a1938e6619c3ab9f38682bb04662a5a"}, + {file = "tox-3.25.0.tar.gz", hash = "sha256:37888f3092aa4e9f835fc8cc6dadbaaa0782651c41ef359e3a5743fcb0308160"}, +] traitlets = [ - {file = "traitlets-5.1.1-py3-none-any.whl", hash = "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033"}, - {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, + {file = "traitlets-5.3.0-py3-none-any.whl", hash = "sha256:65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a"}, + {file = "traitlets-5.3.0.tar.gz", hash = "sha256:0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2"}, ] typing-extensions = [ {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, @@ -1448,39 +1520,44 @@ tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] +virtualenv = [ + {file = "virtualenv-20.14.1-py2.py3-none-any.whl", hash = "sha256:e617f16e25b42eb4f6e74096b9c9e37713cf10bf30168fb4a739f3fa8f898a3a"}, + {file = "virtualenv-20.14.1.tar.gz", hash = "sha256:ef589a79795589aada0c1c5b319486797c03b67ac3984c48c669c0e4f50df3a5"}, +] watchdog = [ - {file = "watchdog-2.1.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:177bae28ca723bc00846466016d34f8c1d6a621383b6caca86745918d55c7383"}, - {file = "watchdog-2.1.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1d1cf7dfd747dec519486a98ef16097e6c480934ef115b16f18adb341df747a4"}, - {file = "watchdog-2.1.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7f14ce6adea2af1bba495acdde0e510aecaeb13b33f7bd2f6324e551b26688ca"}, - {file = "watchdog-2.1.7-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4d0e98ac2e8dd803a56f4e10438b33a2d40390a72750cff4939b4b274e7906fa"}, - {file = "watchdog-2.1.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:81982c7884aac75017a6ecc72f1a4fedbae04181a8665a34afce9539fc1b3fab"}, - {file = "watchdog-2.1.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0b4a1fe6201c6e5a1926f5767b8664b45f0fcb429b62564a41f490ff1ce1dc7a"}, - {file = "watchdog-2.1.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6e6ae29b72977f2e1ee3d0b760d7ee47896cb53e831cbeede3e64485e5633cc8"}, - {file = "watchdog-2.1.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b9777664848160449e5b4260e0b7bc1ae0f6f4992a8b285db4ec1ef119ffa0e2"}, - {file = "watchdog-2.1.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:19b36d436578eb437e029c6b838e732ed08054956366f6dd11875434a62d2b99"}, - {file = "watchdog-2.1.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b61acffaf5cd5d664af555c0850f9747cc5f2baf71e54bbac164c58398d6ca7b"}, - {file = "watchdog-2.1.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1e877c70245424b06c41ac258023ea4bd0c8e4ff15d7c1368f17cd0ae6e351dd"}, - {file = "watchdog-2.1.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d802d65262a560278cf1a65ef7cae4e2bc7ecfe19e5451349e4c67e23c9dc420"}, - {file = "watchdog-2.1.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b3750ee5399e6e9c69eae8b125092b871ee9e2fcbd657a92747aea28f9056a5c"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_aarch64.whl", hash = "sha256:ed6d9aad09a2a948572224663ab00f8975fae242aa540509737bb4507133fa2d"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_armv7l.whl", hash = "sha256:b26e13e8008dcaea6a909e91d39b629a39635d1a8a7239dd35327c74f4388601"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_i686.whl", hash = "sha256:0908bb50f6f7de54d5d31ec3da1654cb7287c6b87bce371954561e6de379d690"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_ppc64.whl", hash = "sha256:bdcbf75580bf4b960fb659bbccd00123d83119619195f42d721e002c1621602f"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:81a5861d0158a7e55fe149335fb2bbfa6f48cbcbd149b52dbe2cd9a544034bbd"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_s390x.whl", hash = "sha256:03b43d583df0f18782a0431b6e9e9965c5b3f7cf8ec36a00b930def67942c385"}, - {file = "watchdog-2.1.7-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ae934e34c11aa8296c18f70bf66ed60e9870fcdb4cc19129a04ca83ab23e7055"}, - {file = "watchdog-2.1.7-py3-none-win32.whl", hash = "sha256:49639865e3db4be032a96695c98ac09eed39bbb43fe876bb217da8f8101689a6"}, - {file = "watchdog-2.1.7-py3-none-win_amd64.whl", hash = "sha256:340b875aecf4b0e6672076a6f05cfce6686935559bb6d34cebedee04126a9566"}, - {file = "watchdog-2.1.7-py3-none-win_ia64.whl", hash = "sha256:351e09b6d9374d5bcb947e6ac47a608ec25b9d70583e9db00b2fcdb97b00b572"}, - {file = "watchdog-2.1.7.tar.gz", hash = "sha256:3fd47815353be9c44eebc94cc28fe26b2b0c5bd889dafc4a5a7cbdf924143480"}, + {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, + {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, + {file = "watchdog-2.1.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ee3e38a6cc050a8830089f79cbec8a3878ec2fe5160cdb2dc8ccb6def8552658"}, + {file = "watchdog-2.1.9-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:64a27aed691408a6abd83394b38503e8176f69031ca25d64131d8d640a307591"}, + {file = "watchdog-2.1.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:195fc70c6e41237362ba720e9aaf394f8178bfc7fa68207f112d108edef1af33"}, + {file = "watchdog-2.1.9-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:bfc4d351e6348d6ec51df007432e6fe80adb53fd41183716017026af03427846"}, + {file = "watchdog-2.1.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8250546a98388cbc00c3ee3cc5cf96799b5a595270dfcfa855491a64b86ef8c3"}, + {file = "watchdog-2.1.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:117ffc6ec261639a0209a3252546b12800670d4bf5f84fbd355957a0595fe654"}, + {file = "watchdog-2.1.9-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:97f9752208f5154e9e7b76acc8c4f5a58801b338de2af14e7e181ee3b28a5d39"}, + {file = "watchdog-2.1.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:247dcf1df956daa24828bfea5a138d0e7a7c98b1a47cf1fa5b0c3c16241fcbb7"}, + {file = "watchdog-2.1.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:226b3c6c468ce72051a4c15a4cc2ef317c32590d82ba0b330403cafd98a62cfd"}, + {file = "watchdog-2.1.9-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d9820fe47c20c13e3c9dd544d3706a2a26c02b2b43c993b62fcd8011bcc0adb3"}, + {file = "watchdog-2.1.9-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:70af927aa1613ded6a68089a9262a009fbdf819f46d09c1a908d4b36e1ba2b2d"}, + {file = "watchdog-2.1.9-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ed80a1628cee19f5cfc6bb74e173f1b4189eb532e705e2a13e3250312a62e0c9"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_aarch64.whl", hash = "sha256:9f05a5f7c12452f6a27203f76779ae3f46fa30f1dd833037ea8cbc2887c60213"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_armv7l.whl", hash = "sha256:255bb5758f7e89b1a13c05a5bceccec2219f8995a3a4c4d6968fe1de6a3b2892"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_i686.whl", hash = "sha256:d3dda00aca282b26194bdd0adec21e4c21e916956d972369359ba63ade616153"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_ppc64.whl", hash = "sha256:186f6c55abc5e03872ae14c2f294a153ec7292f807af99f57611acc8caa75306"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:083171652584e1b8829581f965b9b7723ca5f9a2cd7e20271edf264cfd7c1412"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_s390x.whl", hash = "sha256:b530ae007a5f5d50b7fbba96634c7ee21abec70dc3e7f0233339c81943848dc1"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_x86_64.whl", hash = "sha256:4f4e1c4aa54fb86316a62a87b3378c025e228178d55481d30d857c6c438897d6"}, + {file = "watchdog-2.1.9-py3-none-win32.whl", hash = "sha256:5952135968519e2447a01875a6f5fc8c03190b24d14ee52b0f4b1682259520b1"}, + {file = "watchdog-2.1.9-py3-none-win_amd64.whl", hash = "sha256:7a833211f49143c3d336729b0020ffd1274078e94b0ae42e22f596999f50279c"}, + {file = "watchdog-2.1.9-py3-none-win_ia64.whl", hash = "sha256:ad576a565260d8f99d97f2e64b0f97a48228317095908568a9d5c786c829d428"}, + {file = "watchdog-2.1.9.tar.gz", hash = "sha256:43ce20ebb36a51f21fa376f76d1d4692452b2527ccd601950d69ed36b9e21609"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] xmltodict = [ - {file = "xmltodict-0.12.0-py2.py3-none-any.whl", hash = "sha256:8bbcb45cc982f48b2ca8fe7e7827c5d792f217ecf1792626f808bf41c3b86051"}, - {file = "xmltodict-0.12.0.tar.gz", hash = "sha256:50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"}, + {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, + {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] yq = [ {file = "yq-2.14.0-py3-none-any.whl", hash = "sha256:b6321b29cb39c4e92a4a6f16d47d99a024650211e45e09a02d1906ec45fbaede"}, diff --git a/pyproject.toml b/pyproject.toml index b81c285b..7733d0e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,20 +37,12 @@ parsedatetime = ">=2.6" python-dateutil = "^2.8" # https://github.com/dateutil/dateutil/blob/master/RELEASING pyxdg = ">=0.27.0" "ruamel.yaml" = "^0.17.21" +rich = "^12.2.0" # dayone-only deps pytz = ">=2020" # https://pythonhosted.org/pytz/#issues-limitations tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt -# Minimal deps required for testing -# I don't like repeating deps here, but -# there's no other way to do this yet until poetry v1.2 releases -# see: https://github.com/python-poetry/poetry/issues/1644 -pytest = { version = ">=6.2", optional = true } -pytest-bdd = { version = ">=4.0.1", optional = true } -toml = { version = ">=0.10", optional = true } -rich = "^12.2.0" - [tool.poetry.dev-dependencies] mkdocs = ">=1.0,<1.3" black = { version = ">=21.5b2", allow-prereleases = true } @@ -62,6 +54,7 @@ poethepoet = "*" pytest-clarity = "*" pyproject-flake8 = "*" yq = "*" +tox = "*" [tool.poetry.extras] testing = [ "pytest", "pytest-bdd", "toml" ] @@ -70,23 +63,46 @@ testing = [ "pytest", "pytest-bdd", "toml" ] jrnl = 'jrnl.cli:cli' [tool.poe.tasks] -bdd = "pytest tests/bdd --gherkin-terminal-reporter --tb=native" -bdd-debug = "poe bdd -x -vv" format = "black ." +format-check = "black --check --diff ." +format-version = "black --version" + +style-check = "pflake8 jrnl tests" +style-version = "pflake8 --version" + docs = "mkdocs serve" -unit = "pytest tests/unit" + +test-unit = "tox -q -e unit --" +test-bdd = "tox -q -e bdd --" +test-all = "tox -e py --" + +installer-check = "poetry check" +installer-version = "poetry --version" # Groups of tasks lint = [ - {cmd = "poetry check"}, - {cmd = "pflake8 jrnl tests"}, - {cmd = "black --check --diff ."}, + "installer-check", + "style-check", + "format-check", ] test = [ "lint", - "unit", - "bdd", + "test-unit", + "test-bdd", +] + +ci-lint = [ + "installer-version", + "installer-check", + "style-version", + "style-check", + "format-version", + "format-check", +] + +ci-test = [ + "test-all", ] [tool.isort] @@ -127,3 +143,25 @@ extend-ignore = "E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" +[tool.tox] +# see: https://tox.wiki/en/latest/example/basic.html +legacy_tox_ini = """ +[tox] +envlist = py-{unit,bdd} +isolated_build = True + +[testenv] +deps = + pytest >= 6.2 + pytest-bdd >=4.0.1 + toml >=0.10 +commands = pytest --junitxml=reports/pytest/results.xml {posargs} +passenv = HOME + +[testenv:unit] +commands = pytest tests/unit {posargs} + +[testenv:bdd] +commands = pytest tests/bdd --gherkin-terminal-reporter --tb=native {posargs} +""" + diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b From 5fb5e1140afd6c3978a1125fced3fe1a12e2f80a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 18 Jun 2022 18:56:04 +0000 Subject: [PATCH 0656/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03730fd2..7c9dfd6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ **Build:** +- Use tox [\#1361](https://github.com/jrnl-org/jrnl/issues/1361) +- Stop hardcoding bot info in changelog pipeline [\#1506](https://github.com/jrnl-org/jrnl/pull/1506) ([wren](https://github.com/wren)) +- Fix Poetry caching for accessibility tests [\#1505](https://github.com/jrnl-org/jrnl/pull/1505) ([wren](https://github.com/wren)) +- Implement Tox for testing [\#1504](https://github.com/jrnl-org/jrnl/pull/1504) ([wren](https://github.com/wren)) - Replace `make` with python alternative \(`poe`\) [\#1503](https://github.com/jrnl-org/jrnl/pull/1503) ([wren](https://github.com/wren)) - Update copyright year [\#1502](https://github.com/jrnl-org/jrnl/pull/1502) ([wren](https://github.com/wren)) From 28051046d51085fb22ac442e3c9334687ced8597 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 25 Jun 2022 11:51:19 -0700 Subject: [PATCH 0657/1132] Update maintainer email (#1515) --- CODE_OF_CONDUCT.md | 2 +- SECURITY.md | 2 +- pyproject.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index b177c666..68716f88 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -59,7 +59,7 @@ representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by [emailing the maintainers](mailto:jrnl-sh@googlegroups.com). +reported by [emailing the maintainers](mailto:maintainers@jrnl.sh). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/SECURITY.md b/SECURITY.md index c239b957..44a0f958 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,6 @@ # Security -If you've discovered a potential security issue in jrnl, please contact the maintainers at [jrnl-sh@googlegroups.com](mailto:jrnl-sh@googlegroups.com). +If you've discovered a potential security issue in jrnl, please contact the maintainers at [maintainers@jrnl.sh](mailto:maintainers@jrnl.sh). You can also feel free to [open an issue](https://github.com/jrnl-org/jrnl/issues/new/choose) (but please don't disclose the vulnerability) in case the email goes to spam. diff --git a/pyproject.toml b/pyproject.toml index 7733d0e2..79f8303b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,13 +3,13 @@ name = "jrnl" version = "v3.0-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ - "jrnl contributors ", + "jrnl contributors ", "Manuel Ebert ", "Jonathan Wren ", "Micah Ellison " ] maintainers = [ - "Jonathan Wren and Micah Ellison ", + "Jonathan Wren and Micah Ellison ", ] license = "GPL-3.0-only" readme = "README.md" From ed4f8eacea42ff186933afb5ec98ec0fd0481784 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 25 Jun 2022 11:58:31 -0700 Subject: [PATCH 0658/1132] Display message when no edits take place (#1510) --- jrnl/editor.py | 2 +- jrnl/jrnl.py | 5 ++++- jrnl/messages/MsgText.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/jrnl/editor.py b/jrnl/editor.py index a6bff5d3..1090f5d6 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -46,7 +46,7 @@ def get_text_from_editor(config, template=""): os.remove(tmpfile) if not raw: - raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.ERROR)) + raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.NORMAL)) return raw diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 2c5fafae..68b061b2 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -141,7 +141,7 @@ def write_mode(args, config, journal, **kwargs): if not raw or raw.isspace(): logging.error("Write mode: couldn't get raw text or entry was empty") - raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.ERROR)) + raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.NORMAL)) logging.debug( 'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw @@ -342,6 +342,9 @@ def _print_edited_summary(journal, old_stats, **kwargs): ) msgs.append(Message(my_msg, MsgStyle.NORMAL, {"num": stats["modified"]})) + if not msgs: + msgs.append(Message(MsgText.NoEditsReceived, MsgStyle.NORMAL)) + print_msgs(msgs) diff --git a/jrnl/messages/MsgText.py b/jrnl/messages/MsgText.py index 8de0d518..d26f1dfd 100644 --- a/jrnl/messages/MsgText.py +++ b/jrnl/messages/MsgText.py @@ -149,6 +149,8 @@ class MsgText(Enum): https://jrnl.sh/en/stable/external-editors/ """ + NoEditsReceived = "No edits to save, because nothing was changed" + NoTextReceived = """ No entry to save, because no text was received """ From c0ebf12cc8b2af44727f7fb35060025b135b4623 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Jun 2022 11:59:09 -0700 Subject: [PATCH 0659/1132] Bump cryptography from 37.0.2 to 37.0.3 (#1516) Bumps [cryptography](https://github.com/pyca/cryptography) from 37.0.2 to 37.0.3. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/37.0.2...37.0.3) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2a0abc4c..32163c36 100644 --- a/poetry.lock +++ b/poetry.lock @@ -137,7 +137,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "37.0.2" +version = "37.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -1137,28 +1137,28 @@ commonmark = [ {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] cryptography = [ - {file = "cryptography-37.0.2-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:ef15c2df7656763b4ff20a9bc4381d8352e6640cfeb95c2972c38ef508e75181"}, - {file = "cryptography-37.0.2-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3c81599befb4d4f3d7648ed3217e00d21a9341a9a688ecdd615ff72ffbed7336"}, - {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2bd1096476aaac820426239ab534b636c77d71af66c547b9ddcd76eb9c79e004"}, - {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:31fe38d14d2e5f787e0aecef831457da6cec68e0bb09a35835b0b44ae8b988fe"}, - {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:093cb351031656d3ee2f4fa1be579a8c69c754cf874206be1d4cf3b542042804"}, - {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59b281eab51e1b6b6afa525af2bd93c16d49358404f814fe2c2410058623928c"}, - {file = "cryptography-37.0.2-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:0cc20f655157d4cfc7bada909dc5cc228211b075ba8407c46467f63597c78178"}, - {file = "cryptography-37.0.2-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:f8ec91983e638a9bcd75b39f1396e5c0dc2330cbd9ce4accefe68717e6779e0a"}, - {file = "cryptography-37.0.2-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:46f4c544f6557a2fefa7ac8ac7d1b17bf9b647bd20b16decc8fbcab7117fbc15"}, - {file = "cryptography-37.0.2-cp36-abi3-win32.whl", hash = "sha256:731c8abd27693323b348518ed0e0705713a36d79fdbd969ad968fbef0979a7e0"}, - {file = "cryptography-37.0.2-cp36-abi3-win_amd64.whl", hash = "sha256:471e0d70201c069f74c837983189949aa0d24bb2d751b57e26e3761f2f782b8d"}, - {file = "cryptography-37.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a68254dd88021f24a68b613d8c51d5c5e74d735878b9e32cc0adf19d1f10aaf9"}, - {file = "cryptography-37.0.2-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:a7d5137e556cc0ea418dca6186deabe9129cee318618eb1ffecbd35bee55ddc1"}, - {file = "cryptography-37.0.2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aeaba7b5e756ea52c8861c133c596afe93dd716cbcacae23b80bc238202dc023"}, - {file = "cryptography-37.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95e590dd70642eb2079d280420a888190aa040ad20f19ec8c6e097e38aa29e06"}, - {file = "cryptography-37.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:1b9362d34363f2c71b7853f6251219298124aa4cc2075ae2932e64c91a3e2717"}, - {file = "cryptography-37.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e53258e69874a306fcecb88b7534d61820db8a98655662a3dd2ec7f1afd9132f"}, - {file = "cryptography-37.0.2-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:1f3bfbd611db5cb58ca82f3deb35e83af34bb8cf06043fa61500157d50a70982"}, - {file = "cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:419c57d7b63f5ec38b1199a9521d77d7d1754eb97827bbb773162073ccd8c8d4"}, - {file = "cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:dc26bb134452081859aa21d4990474ddb7e863aa39e60d1592800a8865a702de"}, - {file = "cryptography-37.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3b8398b3d0efc420e777c40c16764d6870bcef2eb383df9c6dbb9ffe12c64452"}, - {file = "cryptography-37.0.2.tar.gz", hash = "sha256:f224ad253cc9cea7568f49077007d2263efa57396a2f2f78114066fd54b5c68e"}, + {file = "cryptography-37.0.3-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:d10413d493e98075060d3e62e5826de372912ea653ccc948f3c41b21ddca087f"}, + {file = "cryptography-37.0.3-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:cd64147ff16506632893ceb2569624b48c84daa3ba4d89695f7c7bc24188eee9"}, + {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:17c74f7d9e9e9bb7e84521243695c1b4bdc3a0e44ca764e6bcf8f05f3de3d0df"}, + {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:0713bee6c8077786c56bdec9c5d3f099d40d2c862ff3200416f6862e9dd63156"}, + {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9c2008417741cdfbe945ef2d16b7b7ba0790886a0b49e1de533acf93eb66ed6"}, + {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:646905ff7a712e415bf0d0f214e0eb669dd2257c4d7a27db1e8baec5d2a1d55f"}, + {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:dcafadb5a06cb7a6bb49fb4c1de7414ee2f8c8e12b047606d97c3175d690f582"}, + {file = "cryptography-37.0.3-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:0b4bfc5ccfe4e5c7de535670680398fed4a0bbc5dfd52b3a295baad42230abdf"}, + {file = "cryptography-37.0.3-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:a03dbc0d8ce8c1146c177cd0e3a66ea106f36733fb1b997ea4d051f8a68539ff"}, + {file = "cryptography-37.0.3-cp36-abi3-win32.whl", hash = "sha256:190a24c14e91c1fa3101069aac7e77d11c5a73911c3904128367f52946bbb6fd"}, + {file = "cryptography-37.0.3-cp36-abi3-win_amd64.whl", hash = "sha256:b05c5478524deb7a019e240f2a970040c4b0f01f58f0425e6262c96b126c6a3e"}, + {file = "cryptography-37.0.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891ed8312840fd43e0696468a6520a582a033c0109f7b14b96067bfe1123226b"}, + {file = "cryptography-37.0.3-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:30d6aabf623a01affc7c0824936c3dde6590076b61f5dd299df3cc2c75fc5915"}, + {file = "cryptography-37.0.3-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:31a7c1f1c2551f013d4294d06e22848e2ccd77825f0987cba3239df6ebf7b020"}, + {file = "cryptography-37.0.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a94fd1ff80001cb97add71d07f596d8b865b716f25ef501183e0e199390e50d3"}, + {file = "cryptography-37.0.3-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8a85dbcc770256918b40c2f40bd3ffd3b2ae45b0cf19068b561db8f8d61bf492"}, + {file = "cryptography-37.0.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:773d5b5f2e2bd2c7cbb1bd24902ad41283c88b9dd463a0f82adc9a2870d9d066"}, + {file = "cryptography-37.0.3-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:0f9193428a55a4347af2d4fd8141a2002dedbcc26487e67fd2ae19f977ee8afc"}, + {file = "cryptography-37.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bf652c73e8f7c32a3f92f7184bf7f9106dacdf5ef59c3c3683d7dae2c4972fb"}, + {file = "cryptography-37.0.3-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c3c8b1ad2c266fdf7adc041cc4156d6a3d14db93de2f81b26a5af97ef3f209e5"}, + {file = "cryptography-37.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2383d6c3088e863304c37c65cd2ea404b7fbb4886823eab1d74137cc27f3d2ee"}, + {file = "cryptography-37.0.3.tar.gz", hash = "sha256:ae430d51c67ac638dfbb42edf56c669ca9c74744f4d225ad11c6f3d355858187"}, ] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, From e531d575be4c8c85fd8f51eb15089ecf0d3417f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Jun 2022 11:59:41 -0700 Subject: [PATCH 0660/1132] Bump poethepoet from 0.13.1 to 0.14.0 (#1514) Bumps [poethepoet](https://github.com/nat-n/poethepoet) from 0.13.1 to 0.14.0. - [Release notes](https://github.com/nat-n/poethepoet/releases) - [Commits](https://github.com/nat-n/poethepoet/compare/v0.13.1...v0.14.0) --- updated-dependencies: - dependency-name: poethepoet dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 32163c36..e18a0197 100644 --- a/poetry.lock +++ b/poetry.lock @@ -568,11 +568,11 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" -version = "0.13.1" +version = "0.14.0" description = "A task runner that works well with poetry." category = "dev" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7" [package.dependencies] pastel = ">=0.2.1,<0.3.0" @@ -1332,8 +1332,8 @@ pluggy = [ {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poethepoet = [ - {file = "poethepoet-0.13.1-py3-none-any.whl", hash = "sha256:47e7b38c8b5412f840447f7612a9330697e8633e7500a7340b6734f50e26e380"}, - {file = "poethepoet-0.13.1.tar.gz", hash = "sha256:4f6962f17f5d5a453fd7fa66e3e7897e9191d4289148433efe441c81f2451a46"}, + {file = "poethepoet-0.14.0-py3-none-any.whl", hash = "sha256:e274988b469306c11b634b1c6b1cf1ffc880353afbcff874540090c3c9c50c2c"}, + {file = "poethepoet-0.14.0.tar.gz", hash = "sha256:1557f324e3ad791d86f515d4138dbfd97ac71c6ff3ec2d308f4d792e3002d1f0"}, ] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, From 856f3612717e2ebca5cc9d71b46965301e5f20f2 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 25 Jun 2022 19:01:37 +0000 Subject: [PATCH 0661/1132] Update changelog [ci skip] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c9dfd6c..5ea6ebd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ **Fixed bugs:** - Adding new entry with date only works with format m.d.Y [\#1509](https://github.com/jrnl-org/jrnl/issues/1509) +- Blank box displays when not making any changes in --edit [\#1501](https://github.com/jrnl-org/jrnl/issues/1501) +- Display message when no edits take place [\#1510](https://github.com/jrnl-org/jrnl/pull/1510) ([apainintheneck](https://github.com/apainintheneck)) **Build:** @@ -17,6 +19,11 @@ - Replace `make` with python alternative \(`poe`\) [\#1503](https://github.com/jrnl-org/jrnl/pull/1503) ([wren](https://github.com/wren)) - Update copyright year [\#1502](https://github.com/jrnl-org/jrnl/pull/1502) ([wren](https://github.com/wren)) +**Packaging:** + +- Bump cryptography from 37.0.2 to 37.0.3 [\#1516](https://github.com/jrnl-org/jrnl/pull/1516) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump poethepoet from 0.13.1 to 0.14.0 [\#1514](https://github.com/jrnl-org/jrnl/pull/1514) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v3.0-beta](https://pypi.org/project/jrnl/v3.0-beta/) (2022-06-11) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...v3.0-beta) From 23bc0f2c8f249e8db5dcc900794488f9842c9151 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 25 Jun 2022 12:45:39 -0700 Subject: [PATCH 0662/1132] Reduce difference between local and CI environments (#1518) * Clean up pyproject file This reduces the differences between local tasks and tasks run in the CI pipelines * remove linting step (it's part of test now) * remove useless arg --- .github/actions/run_tests/action.yaml | 9 +-- pyproject.toml | 83 +++++++++++---------------- 2 files changed, 37 insertions(+), 55 deletions(-) diff --git a/.github/actions/run_tests/action.yaml b/.github/actions/run_tests/action.yaml index c2242e0c..9ab6c6ca 100644 --- a/.github/actions/run_tests/action.yaml +++ b/.github/actions/run_tests/action.yaml @@ -39,12 +39,7 @@ runs: echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV shell: bash - - name: Linting + - name: Linting & Testing if: ${{ env.DEPS_INSTALLED == 'true' }} - run: poetry run poe ci-lint - shell: bash - - - name: Testing - if: ${{ env.DEPS_INSTALLED == 'true' }} - run: poetry run poe ci-test + run: poetry run poe test shell: bash diff --git a/pyproject.toml b/pyproject.toml index 79f8303b..175dfa00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,40 +44,45 @@ pytz = ">=2020" # https://pythonhosted.org/pytz/#issues-limitations tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt [tool.poetry.dev-dependencies] -mkdocs = ">=1.0,<1.3" black = { version = ">=21.5b2", allow-prereleases = true } -toml = ">=0.10" +ipdb = "*" +mkdocs = ">=1.0,<1.3" +poethepoet = "*" +pyproject-flake8 = "*" pytest = ">=6.2" pytest-bdd = ">=4.0.1" -ipdb = "*" -poethepoet = "*" pytest-clarity = "*" -pyproject-flake8 = "*" -yq = "*" +toml = ">=0.10" tox = "*" - -[tool.poetry.extras] -testing = [ "pytest", "pytest-bdd", "toml" ] +yq = "*" [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' [tool.poe.tasks] -format = "black ." -format-check = "black --check --diff ." -format-version = "black --version" +format-run = [ + {cmd = "black ."}, +] +format-check = [ + {cmd = "black --version"}, + {cmd = "black --check --diff ."}, +] +style-check = [ + {cmd = "pflake8 --version"}, + {cmd = "pflake8 jrnl tests"}, +] +# docs-check = ? +docs-run = [ + {cmd = "mkdocs serve"}, +] +test-run =[ + {cmd = "tox -q -e py --"}, +] -style-check = "pflake8 jrnl tests" -style-version = "pflake8 --version" - -docs = "mkdocs serve" - -test-unit = "tox -q -e unit --" -test-bdd = "tox -q -e bdd --" -test-all = "tox -e py --" - -installer-check = "poetry check" -installer-version = "poetry --version" +installer-check = [ + {cmd = "poetry --version"}, + {cmd = "poetry check"}, +] # Groups of tasks lint = [ @@ -88,21 +93,7 @@ lint = [ test = [ "lint", - "test-unit", - "test-bdd", -] - -ci-lint = [ - "installer-version", - "installer-check", - "style-version", - "style-check", - "format-version", - "format-check", -] - -ci-test = [ - "test-all", + "test-run", ] [tool.isort] @@ -125,7 +116,9 @@ markers = [ "on_posix", ] addopts = [ - "--pdbcls=IPython.terminal.debugger:Pdb" + "--pdbcls=IPython.terminal.debugger:Pdb", + "--gherkin-terminal-reporter", + "--tb=native", ] filterwarnings = [ @@ -147,7 +140,7 @@ build-backend = "poetry.core.masonry.api" # see: https://tox.wiki/en/latest/example/basic.html legacy_tox_ini = """ [tox] -envlist = py-{unit,bdd} +envlist = py isolated_build = True [testenv] @@ -155,13 +148,7 @@ deps = pytest >= 6.2 pytest-bdd >=4.0.1 toml >=0.10 -commands = pytest --junitxml=reports/pytest/results.xml {posargs} + +commands = pytest {posargs} passenv = HOME - -[testenv:unit] -commands = pytest tests/unit {posargs} - -[testenv:bdd] -commands = pytest tests/bdd --gherkin-terminal-reporter --tb=native {posargs} """ - From 8b955ef002a3705e2700f7bd01a557cb0d6f7193 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 25 Jun 2022 12:47:05 -0700 Subject: [PATCH 0663/1132] Add bdd tests for jrnl installation (#1513) * Added bdd tests for jrnl installation --- tests/bdd/features/install.feature | 45 ++++++++++++++++++++++++++++++ tests/bdd/test_features.py | 1 + tests/lib/fixtures.py | 19 ++++++++++++- tests/lib/given_steps.py | 7 +++++ tests/lib/then_steps.py | 22 +++++++++++++++ tests/lib/when_steps.py | 2 ++ 6 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 tests/bdd/features/install.feature diff --git a/tests/bdd/features/install.feature b/tests/bdd/features/install.feature new file mode 100644 index 00000000..abef3d91 --- /dev/null +++ b/tests/bdd/features/install.feature @@ -0,0 +1,45 @@ +Feature: Installing jrnl + + Scenario: Install jrnl with default options + Given we use no config + When we run "jrnl hello world" and enter + \n + \n + Then the output should contain "Journal 'default' created" + And the default journal "journal.txt" should be in the "." directory + And the config should contain "encrypt: false" + And the version in the config file should be up-to-date + + Scenario: Install jrnl with custom relative default journal path + Given we use no config + When we run "jrnl hello world" and enter + default/custom.txt + n + Then the output should contain "Journal 'default' created" + And the default journal "custom.txt" should be in the "default" directory + And the config should contain "encrypt: false" + And the version in the config file should be up-to-date + + Scenario: Install jrnl with custom expanded default journal path + Given we use no config + And the home directory is called "home" + When we run "jrnl hello world" and enter + ~/custom.txt + n + Then the output should contain "Journal 'default' created" + And the default journal "custom.txt" should be in the "home" directory + And the config should contain "encrypt: false" + And the version in the config file should be up-to-date + + Scenario: Install jrnl with encrypted default journal + Given we use no config + When we run "jrnl hello world" and enter + encrypted.txt + y + Then the output should contain "Journal will be encrypted" + And the default journal "encrypted.txt" should be in the "." directory + And the config should contain "encrypt: true" + And the version in the config file should be up-to-date + When we run "jrnl" + Then we should be prompted for a password + \ No newline at end of file diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py index fda146e1..7f02e6b3 100644 --- a/tests/bdd/test_features.py +++ b/tests/bdd/test_features.py @@ -13,6 +13,7 @@ scenarios("features/encrypt.feature") scenarios("features/file_storage.feature") scenarios("features/format.feature") scenarios("features/import.feature") +scenarios("features/install.feature") scenarios("features/multiple_journals.feature") scenarios("features/override.feature") scenarios("features/password.feature") diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index 1ad17708..b5c6895f 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -88,6 +88,7 @@ def cli_run( mock_editor, mock_user_input, mock_overrides, + mock_default_journal_path, ): # Check if we need more mocks mock_factories.update(mock_args) @@ -96,6 +97,7 @@ def cli_run( mock_factories.update(mock_editor) mock_factories.update(mock_config_path) mock_factories.update(mock_user_input) + mock_factories.update(mock_default_journal_path) return { "status": 0, @@ -164,6 +166,19 @@ def mock_config_path(request): } +@fixture +def mock_default_journal_path(temp_dir): + journal_path = os.path.join(temp_dir.name, "journal.txt") + return { + "default_journal_path_install": lambda: patch( + "jrnl.install.get_default_journal_path", return_value=journal_path + ), + "default_journal_path_config": lambda: patch( + "jrnl.config.get_default_journal_path", return_value=journal_path + ), + } + + @fixture def temp_dir(): return tempfile.TemporaryDirectory() @@ -216,7 +231,9 @@ def mock_user_input(request, password_input, stdin_input): return password_input if isinstance(user_input, Iterable): - return next(user_input) + input_line = next(user_input) + # A raw newline is used to indicate deliberate empty input + return "" if input_line == r"\n" else input_line # exceptions return user_input if not kwargs["password"] else password_input diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index 6da84643..a2cdd1ea 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -147,3 +147,10 @@ def parse_output_as_language(cli_run, language_name): assert False, f"Language name {language_name} not recognized" return {"lang": language_name, "obj": parsed_output} + + +@given(parse('the home directory is called "{home_dir}"')) +def home_directory(temp_dir, home_dir, monkeypatch): + home_path = os.path.join(temp_dir.name, home_dir) + monkeypatch.setenv("USERPROFILE", home_path) # for windows + monkeypatch.setenv("HOME", home_path) # for *nix diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 08d8ddc7..857cf1f4 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -97,6 +97,12 @@ def output_should_contain_version(cli_run, toml_version): assert toml_version in out, toml_version +@then("the version in the config file should be up-to-date") +def config_file_version(config_on_disk, toml_version): + config_version = config_on_disk["version"] + assert config_version == toml_version + + @then(parse("the output should be {width:d} columns wide")) def output_should_be_columns_wide(cli_run, width): out = cli_run["stdout"] @@ -105,6 +111,22 @@ def output_should_be_columns_wide(cli_run, width): assert len(line) <= width +@then( + parse( + 'the default journal "{journal_file}" should be in the "{journal_dir}" directory' + ) +) +def default_journal_location(journal_file, journal_dir, config_on_disk, temp_dir): + default_journal_path = config_on_disk["journals"]["default"] + expected_journal_path = ( + os.path.join(temp_dir.name, journal_file) + if journal_dir == "." + else os.path.join(temp_dir.name, journal_dir, journal_file) + ) + # Use os.path.samefile here because both paths might not be fully expanded. + assert os.path.samefile(default_journal_path, expected_journal_path) + + @then( parse( 'the config for journal "{journal_name}" {should_or_should_not} contain "{some_yaml}"' diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 759c708d..bd51b503 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -23,6 +23,8 @@ def when_we_change_directory(directory_name): command = '(?P[^"]*)' input_method = "(?Penter|pipe|type)" all_input = '("(?P[^"]*)")' +# Note: A line with only a raw newline r'\n' is treated as +# an empty line of input internally for testing purposes. @when(parse('we run "jrnl {command}" and {input_method}\n{all_input}')) From 3fd109b6cdc493e25d890f309acc862713e11ace Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 25 Jun 2022 19:48:47 +0000 Subject: [PATCH 0664/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea6ebd6..67eb58b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ **Build:** - Use tox [\#1361](https://github.com/jrnl-org/jrnl/issues/1361) +- Reduce difference between local and CI environments [\#1518](https://github.com/jrnl-org/jrnl/pull/1518) ([wren](https://github.com/wren)) +- Add bdd tests for jrnl installation [\#1513](https://github.com/jrnl-org/jrnl/pull/1513) ([apainintheneck](https://github.com/apainintheneck)) - Stop hardcoding bot info in changelog pipeline [\#1506](https://github.com/jrnl-org/jrnl/pull/1506) ([wren](https://github.com/wren)) - Fix Poetry caching for accessibility tests [\#1505](https://github.com/jrnl-org/jrnl/pull/1505) ([wren](https://github.com/wren)) - Implement Tox for testing [\#1504](https://github.com/jrnl-org/jrnl/pull/1504) ([wren](https://github.com/wren)) From 20254f7434d6821329646683ead7772f024b272e Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 25 Jun 2022 13:12:52 -0700 Subject: [PATCH 0665/1132] Run tests in parallel (#1519) * Clean up pyproject file This reduces the differences between local tasks and tasks run in the CI pipelines * remove linting step (it's part of test now) * remove useless arg * add xdist for parallel test execution in pytest --- poetry.lock | 58 ++++++++++++++++++++++++++++++++++++++++++++++---- pyproject.toml | 3 +++ 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index e18a0197..7cfac23b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -170,6 +170,17 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "execnet" +version = "1.9.0" +description = "execnet: rapid multi-Python deployment" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.extras] +testing = ["pre-commit"] + [[package]] name = "executing" version = "0.8.3" @@ -732,6 +743,36 @@ pprintpp = ">=0.4.0" pytest = ">=3.5.0" rich = ">=8.0.0" +[[package]] +name = "pytest-forked" +version = "1.4.0" +description = "run tests in isolated forked subprocesses" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +py = "*" +pytest = ">=3.10" + +[[package]] +name = "pytest-xdist" +version = "2.5.0" +description = "pytest xdist plugin for distributed testing and loop-on-failing modes" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +execnet = ">=1.1" +pytest = ">=6.2.0" +pytest-forked = "*" + +[package.extras] +psutil = ["psutil (>=3.0)"] +setproctitle = ["setproctitle"] +testing = ["filelock"] + [[package]] name = "python-dateutil" version = "2.8.2" @@ -1010,13 +1051,10 @@ python-versions = ">=3.7" docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] -[extras] -testing = [] - [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "ceca9186ac31a0b8ec81a6cc134469842080c786971bb8642d9e67d51bd73fca" +content-hash = "8f6875939de19061a92093ce15d9566f5e038f899effd64db5bc8590024129fa" [metadata.files] ansiwrap = [ @@ -1168,6 +1206,10 @@ distlib = [ {file = "distlib-0.3.4-py2.py3-none-any.whl", hash = "sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b"}, {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, ] +execnet = [ + {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, + {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, +] executing = [ {file = "executing-0.8.3-py2.py3-none-any.whl", hash = "sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9"}, {file = "executing-0.8.3.tar.gz", hash = "sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501"}, @@ -1390,6 +1432,14 @@ pytest-bdd = [ pytest-clarity = [ {file = "pytest-clarity-1.0.1.tar.gz", hash = "sha256:505fe345fad4fe11c6a4187fe683f2c7c52c077caa1e135f3e483fe112db7772"}, ] +pytest-forked = [ + {file = "pytest-forked-1.4.0.tar.gz", hash = "sha256:8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e"}, + {file = "pytest_forked-1.4.0-py3-none-any.whl", hash = "sha256:bbbb6717efc886b9d64537b41fb1497cfaf3c9601276be8da2cccfea5a3c8ad8"}, +] +pytest-xdist = [ + {file = "pytest-xdist-2.5.0.tar.gz", hash = "sha256:4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf"}, + {file = "pytest_xdist-2.5.0-py3-none-any.whl", hash = "sha256:6fe5c74fec98906deb8f2d2b616b5c782022744978e7bd4695d39c8f42d0ce65"}, +] python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, diff --git a/pyproject.toml b/pyproject.toml index 175dfa00..73569ff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ pyproject-flake8 = "*" pytest = ">=6.2" pytest-bdd = ">=4.0.1" pytest-clarity = "*" +pytest-xdist = ">=2.5.0" toml = ">=0.10" tox = "*" yq = "*" @@ -119,6 +120,7 @@ addopts = [ "--pdbcls=IPython.terminal.debugger:Pdb", "--gherkin-terminal-reporter", "--tb=native", + "-n=auto", ] filterwarnings = [ @@ -147,6 +149,7 @@ isolated_build = True deps = pytest >= 6.2 pytest-bdd >=4.0.1 + pytest-xdist >=2.5.0 toml >=0.10 commands = pytest {posargs} From 0f2962a95f5eb580e1c0efe509799b4eaabea973 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 25 Jun 2022 14:43:32 -0700 Subject: [PATCH 0666/1132] Add and run `isort` on Python files (#1520) * add and run isort * udpate more import statements * fix typo --- jrnl/DayOneJournal.py | 10 ++++----- jrnl/EncryptedJournal.py | 9 ++++---- jrnl/Entry.py | 4 ++-- jrnl/FolderJournal.py | 4 ++-- jrnl/Journal.py | 21 +++++++++---------- jrnl/__init__.py | 2 +- jrnl/__main__.py | 2 +- jrnl/args.py | 20 +++++++++--------- jrnl/cli.py | 9 ++++---- jrnl/color.py | 2 +- jrnl/commands.py | 26 +++++++++++------------ jrnl/config.py | 13 ++++++------ jrnl/editor.py | 9 ++++---- jrnl/install.py | 29 +++++++++++++------------- jrnl/jrnl.py | 31 ++++++++++++++-------------- jrnl/messages/Message.py | 6 +++--- jrnl/messages/MsgStyle.py | 9 ++++---- jrnl/messages/__init__.py | 6 +++--- jrnl/output.py | 6 +++--- jrnl/override.py | 5 ++++- jrnl/plugins/__init__.py | 18 ++++++++-------- jrnl/plugins/dates_exporter.py | 2 +- jrnl/plugins/fancy_exporter.py | 10 ++++----- jrnl/plugins/jrnl_importer.py | 2 +- jrnl/plugins/json_exporter.py | 4 ++-- jrnl/plugins/markdown_exporter.py | 7 +++---- jrnl/plugins/tag_exporter.py | 4 ++-- jrnl/plugins/text_exporter.py | 4 ++-- jrnl/plugins/xml_exporter.py | 4 ++-- jrnl/plugins/yaml_exporter.py | 5 ++--- jrnl/prompt.py | 4 ++-- jrnl/upgrade.py | 23 ++++++++++----------- poetry.lock | 34 +++++++++++++++++++++++-------- pyproject.toml | 20 +++++++++++++----- tests/conftest.py | 3 +-- tests/lib/fixtures.py | 14 ++++++------- tests/lib/given_steps.py | 9 ++++---- tests/lib/then_steps.py | 9 ++++---- tests/lib/when_steps.py | 2 +- tests/unit/test_color.py | 2 +- tests/unit/test_config_file.py | 5 +++-- tests/unit/test_jrnl.py | 6 +++--- tests/unit/test_override.py | 4 ++-- tests/unit/test_path.py | 8 ++++---- 44 files changed, 223 insertions(+), 203 deletions(-) diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 8034e36b..27ffef6d 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -4,22 +4,22 @@ import datetime import fnmatch import os -from pathlib import Path import platform import plistlib import re import socket import time import uuid +from pathlib import Path from xml.parsers.expat import ExpatError import pytz import tzlocal -from . import Entry -from . import Journal -from . import __title__ -from . import __version__ +from jrnl import Entry +from jrnl import Journal +from jrnl import __title__ +from jrnl import __version__ class DayOne(Journal.Journal): diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index e2aec8ed..fb1bd355 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -18,15 +18,14 @@ from cryptography.hazmat.primitives.ciphers import algorithms from cryptography.hazmat.primitives.ciphers import modes from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC -from .Journal import Journal -from .Journal import LegacyJournal -from .prompt import create_password - from jrnl.exception import JrnlException +from jrnl.Journal import Journal +from jrnl.Journal import LegacyJournal from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText from jrnl.output import print_msg +from jrnl.prompt import create_password def make_key(password): diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 323eef73..73f26190 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -6,8 +6,8 @@ import re import ansiwrap -from .color import colorize -from .color import highlight_tags_with_background_color +from jrnl.color import colorize +from jrnl.color import highlight_tags_with_background_color class Entry: diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index b5cf2e71..9362e269 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -5,8 +5,8 @@ import codecs import fnmatch import os -from . import Journal -from . import time +from jrnl import Journal +from jrnl import time def get_files(journal_config): diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 301bba76..d389963b 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -6,15 +6,14 @@ import logging import os import re -from . import Entry -from . import time -from .prompt import yesno -from .path import expand_path - -from jrnl.output import print_msg +from jrnl import Entry +from jrnl import time from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg +from jrnl.path import expand_path +from jrnl.prompt import yesno class Tag: @@ -449,11 +448,11 @@ def open_journal(journal_name, config, legacy=False): if config["journal"].strip("/").endswith(".dayone") or "entries" in os.listdir( config["journal"] ): - from . import DayOneJournal + from jrnl import DayOneJournal return DayOneJournal.DayOne(**config).open() else: - from . import FolderJournal + from jrnl import FolderJournal return FolderJournal.Folder(journal_name, **config).open() @@ -461,12 +460,12 @@ def open_journal(journal_name, config, legacy=False): if legacy: return LegacyJournal(journal_name, **config).open() if config["journal"].endswith(os.sep): - from . import FolderJournal + from jrnl import FolderJournal return FolderJournal.Folder(journal_name, **config).open() return PlainJournal(journal_name, **config).open() - from . import EncryptedJournal + from jrnl import EncryptedJournal if legacy: return EncryptedJournal.LegacyEncryptedJournal(journal_name, **config).open() diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 2fc7e3bf..1328df2a 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -2,7 +2,7 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html try: - from .__version__ import __version__ + from jrnl.__version__ import __version__ except ImportError: __version__ = "source" __title__ = "jrnl" diff --git a/jrnl/__main__.py b/jrnl/__main__.py index 06ffedaa..8017142e 100644 --- a/jrnl/__main__.py +++ b/jrnl/__main__.py @@ -3,7 +3,7 @@ import sys -from .cli import cli +from jrnl.cli import cli if __name__ == "__main__": sys.exit(cli()) diff --git a/jrnl/args.py b/jrnl/args.py index 5fd8e370..ed33325b 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -5,16 +5,16 @@ import argparse import re import textwrap -from .commands import postconfig_decrypt -from .commands import postconfig_encrypt -from .commands import postconfig_import -from .commands import postconfig_list -from .commands import preconfig_diagnostic -from .commands import preconfig_version -from .output import deprecated_cmd -from .plugins import EXPORT_FORMATS -from .plugins import IMPORT_FORMATS -from .plugins import util +from jrnl.commands import postconfig_decrypt +from jrnl.commands import postconfig_encrypt +from jrnl.commands import postconfig_import +from jrnl.commands import postconfig_list +from jrnl.commands import preconfig_diagnostic +from jrnl.commands import preconfig_version +from jrnl.output import deprecated_cmd +from jrnl.plugins import EXPORT_FORMATS +from jrnl.plugins import IMPORT_FORMATS +from jrnl.plugins import util class WrappingFormatter(argparse.RawTextHelpFormatter): diff --git a/jrnl/cli.py b/jrnl/cli.py index e81fb1ce..5941e02c 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -5,14 +5,13 @@ import logging import sys import traceback -from .jrnl import run -from .args import parse_args -from jrnl.output import print_msg - +from jrnl.args import parse_args from jrnl.exception import JrnlException +from jrnl.jrnl import run from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg def configure_logger(debug=False): diff --git a/jrnl/color.py b/jrnl/color.py index 7268d773..1970f487 100644 --- a/jrnl/color.py +++ b/jrnl/color.py @@ -7,7 +7,7 @@ from string import whitespace import colorama -from .os_compat import on_windows +from jrnl.os_compat import on_windows if on_windows(): colorama.init() diff --git a/jrnl/commands.py b/jrnl/commands.py index dd2ce52b..b03bbf60 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -17,11 +17,11 @@ avoid any possible overhead for these standalone commands. import platform import sys -from jrnl.output import print_msg from jrnl.exception import JrnlException from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg from jrnl.prompt import create_password @@ -50,14 +50,14 @@ conditions; for details, see: https://www.gnu.org/licenses/gpl-3.0.html""" def postconfig_list(config, **kwargs): - from .output import list_journals + from jrnl.output import list_journals print(list_journals(config)) def postconfig_import(args, config, **kwargs): - from .Journal import open_journal - from .plugins import get_importer + from jrnl.Journal import open_journal + from jrnl.plugins import get_importer # Requires opening the journal journal = open_journal(args.journal_name, config) @@ -70,10 +70,10 @@ def postconfig_encrypt(args, config, original_config, **kwargs): """ Encrypt a journal in place, or optionally to a new file """ - from .EncryptedJournal import EncryptedJournal - from .Journal import open_journal - from .config import update_config - from .install import save_config + from jrnl.config import update_config + from jrnl.EncryptedJournal import EncryptedJournal + from jrnl.install import save_config + from jrnl.Journal import open_journal # Open the journal journal = open_journal(args.journal_name, config) @@ -118,10 +118,10 @@ def postconfig_encrypt(args, config, original_config, **kwargs): def postconfig_decrypt(args, config, original_config, **kwargs): """Decrypts into new file. If filename is not set, we encrypt the journal file itself.""" - from .Journal import PlainJournal - from .Journal import open_journal - from .config import update_config - from .install import save_config + from jrnl.config import update_config + from jrnl.install import save_config + from jrnl.Journal import PlainJournal + from jrnl.Journal import open_journal journal = open_journal(args.journal_name, config) journal.config["encrypt"] = False diff --git a/jrnl/config.py b/jrnl/config.py index 40746d3e..045958c1 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -5,18 +5,17 @@ import logging import os import colorama -from ruamel.yaml import YAML import xdg.BaseDirectory +from ruamel.yaml import YAML -from . import __version__ -from jrnl.output import list_journals -from jrnl.output import print_msg +from jrnl import __version__ from jrnl.exception import JrnlException from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle - -from .path import home_dir +from jrnl.messages import MsgText +from jrnl.output import list_journals +from jrnl.output import print_msg +from jrnl.path import home_dir # Constants DEFAULT_CONFIG_NAME = "jrnl.yaml" diff --git a/jrnl/editor.py b/jrnl/editor.py index 1090f5d6..f5be8395 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -8,15 +8,14 @@ import sys import tempfile from pathlib import Path +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgStyle +from jrnl.messages import MsgText from jrnl.os_compat import on_windows from jrnl.os_compat import split_args from jrnl.output import print_msg -from jrnl.exception import JrnlException -from jrnl.messages import Message -from jrnl.messages import MsgText -from jrnl.messages import MsgStyle - def get_text_from_editor(config, template=""): suffix = ".jrnl" diff --git a/jrnl/install.py b/jrnl/install.py index a7dc6318..d0ae4ac7 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -6,24 +6,23 @@ import logging import os import sys -from .path import home_dir -from .path import absolute_path -from .path import expand_path -from .config import DEFAULT_JOURNAL_KEY -from .config import get_config_path -from .config import get_default_config -from .config import get_default_journal_path -from .config import load_config -from .config import save_config -from .config import verify_config_colors -from .prompt import yesno -from .upgrade import is_old_version - -from jrnl.output import print_msg +from jrnl.config import DEFAULT_JOURNAL_KEY +from jrnl.config import get_config_path +from jrnl.config import get_default_config +from jrnl.config import get_default_journal_path +from jrnl.config import load_config +from jrnl.config import save_config +from jrnl.config import verify_config_colors from jrnl.exception import JrnlException from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg +from jrnl.path import absolute_path +from jrnl.path import expand_path +from jrnl.path import home_dir +from jrnl.prompt import yesno +from jrnl.upgrade import is_old_version def upgrade_config(config_data, alt_config_path=None): diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 68b061b2..b8f924bd 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -4,24 +4,23 @@ import logging import sys -from . import install -from . import plugins -from .Journal import open_journal -from .config import get_journal_name -from .config import scope_config -from .config import get_config_path -from .editor import get_text_from_editor -from .editor import get_text_from_stdin -from . import time -from .override import apply_overrides +from jrnl import install +from jrnl import plugins +from jrnl import time +from jrnl.config import get_config_path +from jrnl.config import get_journal_name +from jrnl.config import scope_config +from jrnl.editor import get_text_from_editor +from jrnl.editor import get_text_from_stdin +from jrnl.exception import JrnlException +from jrnl.Journal import open_journal +from jrnl.messages import Message +from jrnl.messages import MsgStyle +from jrnl.messages import MsgText from jrnl.output import print_msg from jrnl.output import print_msgs -from .path import expand_path - -from jrnl.exception import JrnlException -from jrnl.messages import Message -from jrnl.messages import MsgText -from jrnl.messages import MsgStyle +from jrnl.override import apply_overrides +from jrnl.path import expand_path def run(args): diff --git a/jrnl/messages/Message.py b/jrnl/messages/Message.py index 86809192..3008db3b 100644 --- a/jrnl/messages/Message.py +++ b/jrnl/messages/Message.py @@ -1,11 +1,11 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from typing import NamedTuple from typing import Mapping +from typing import NamedTuple -from .MsgText import MsgText -from .MsgStyle import MsgStyle +from jrnl.messages.MsgStyle import MsgStyle +from jrnl.messages.MsgText import MsgText class Message(NamedTuple): diff --git a/jrnl/messages/MsgStyle.py b/jrnl/messages/MsgStyle.py index b8e15316..c4a001d1 100644 --- a/jrnl/messages/MsgStyle.py +++ b/jrnl/messages/MsgStyle.py @@ -2,12 +2,13 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html from enum import Enum -from typing import NamedTuple from typing import Callable -from rich.panel import Panel -from rich import box +from typing import NamedTuple -from .MsgText import MsgText +from rich import box +from rich.panel import Panel + +from jrnl.messages.MsgText import MsgText class MsgStyle(Enum): diff --git a/jrnl/messages/__init__.py b/jrnl/messages/__init__.py index f2eaec4c..c452f08f 100644 --- a/jrnl/messages/__init__.py +++ b/jrnl/messages/__init__.py @@ -1,9 +1,9 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from .Message import Message -from .MsgStyle import MsgStyle -from .MsgText import MsgText +from jrnl.messages.Message import Message +from jrnl.messages.MsgStyle import MsgStyle +from jrnl.messages.MsgText import MsgText Message = Message MsgStyle = MsgStyle diff --git a/jrnl/output.py b/jrnl/output.py index 3eae32cc..78a1da24 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -2,10 +2,10 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html import textwrap - from typing import Union -from rich.text import Text + from rich.console import Console +from rich.text import Text from jrnl.messages import Message from jrnl.messages import MsgStyle @@ -26,7 +26,7 @@ def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs): def list_journals(configuration): - from . import config + from jrnl import config """List the journals specified in the configuration file""" result = f"Journals defined in config ({config.get_config_path()})\n" diff --git a/jrnl/override.py b/jrnl/override.py index 6ef378f4..7244fb8f 100644 --- a/jrnl/override.py +++ b/jrnl/override.py @@ -1,9 +1,12 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from .config import update_config, make_yaml_valid_dict from argparse import Namespace +from jrnl.config import make_yaml_valid_dict +from jrnl.config import update_config + + # import logging def apply_overrides(args: Namespace, base_config: dict) -> dict: """Unpack CLI provided overrides into the configuration tree. diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index f994e4fc..015725b2 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -1,15 +1,15 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from .fancy_exporter import FancyExporter -from .jrnl_importer import JRNLImporter -from .json_exporter import JSONExporter -from .markdown_exporter import MarkdownExporter -from .tag_exporter import TagExporter -from .dates_exporter import DatesExporter -from .text_exporter import TextExporter -from .xml_exporter import XMLExporter -from .yaml_exporter import YAMLExporter +from jrnl.plugins.dates_exporter import DatesExporter +from jrnl.plugins.fancy_exporter import FancyExporter +from jrnl.plugins.jrnl_importer import JRNLImporter +from jrnl.plugins.json_exporter import JSONExporter +from jrnl.plugins.markdown_exporter import MarkdownExporter +from jrnl.plugins.tag_exporter import TagExporter +from jrnl.plugins.text_exporter import TextExporter +from jrnl.plugins.xml_exporter import XMLExporter +from jrnl.plugins.yaml_exporter import YAMLExporter __exporters = [ JSONExporter, diff --git a/jrnl/plugins/dates_exporter.py b/jrnl/plugins/dates_exporter.py index c1c8fd0a..a5a7054f 100644 --- a/jrnl/plugins/dates_exporter.py +++ b/jrnl/plugins/dates_exporter.py @@ -3,7 +3,7 @@ from collections import Counter -from .text_exporter import TextExporter +from jrnl.plugins.text_exporter import TextExporter class DatesExporter(TextExporter): diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index cdbd4b08..b9567bfd 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -1,13 +1,13 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from jrnl.exception import JrnlException -from jrnl.messages import Message -from jrnl.messages import MsgText -from jrnl.messages import MsgStyle from textwrap import TextWrapper -from .text_exporter import TextExporter +from jrnl.exception import JrnlException +from jrnl.messages import Message +from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.plugins.text_exporter import TextExporter class FancyExporter(TextExporter): diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index 0468b476..813702d8 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -5,8 +5,8 @@ import sys from jrnl.exception import JrnlException from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText from jrnl.output import print_msg diff --git a/jrnl/plugins/json_exporter.py b/jrnl/plugins/json_exporter.py index abce6f50..6aa23434 100644 --- a/jrnl/plugins/json_exporter.py +++ b/jrnl/plugins/json_exporter.py @@ -3,8 +3,8 @@ import json -from .text_exporter import TextExporter -from .util import get_tags_count +from jrnl.plugins.text_exporter import TextExporter +from jrnl.plugins.util import get_tags_count class JSONExporter(TextExporter): diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 30614746..29e07bc1 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -4,12 +4,11 @@ import os import re -from .text_exporter import TextExporter - -from jrnl.output import print_msg from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg +from jrnl.plugins.text_exporter import TextExporter class MarkdownExporter(TextExporter): diff --git a/jrnl/plugins/tag_exporter.py b/jrnl/plugins/tag_exporter.py index 9c2b7fb5..35b25fdd 100644 --- a/jrnl/plugins/tag_exporter.py +++ b/jrnl/plugins/tag_exporter.py @@ -1,8 +1,8 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from .text_exporter import TextExporter -from .util import get_tags_count +from jrnl.plugins.text_exporter import TextExporter +from jrnl.plugins.util import get_tags_count class TagExporter(TextExporter): diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index 55c0d83a..cfd4a8ec 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -5,10 +5,10 @@ import os import re import unicodedata -from jrnl.output import print_msg from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg class TextExporter: diff --git a/jrnl/plugins/xml_exporter.py b/jrnl/plugins/xml_exporter.py index 10050b50..02c8398a 100644 --- a/jrnl/plugins/xml_exporter.py +++ b/jrnl/plugins/xml_exporter.py @@ -3,8 +3,8 @@ from xml.dom import minidom -from .json_exporter import JSONExporter -from .util import get_tags_count +from jrnl.plugins.json_exporter import JSONExporter +from jrnl.plugins.util import get_tags_count class XMLExporter(JSONExporter): diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 00a4613b..a9ff958b 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -4,13 +4,12 @@ import os import re -from .text_exporter import TextExporter - from jrnl.exception import JrnlException from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText from jrnl.output import print_msg +from jrnl.plugins.text_exporter import TextExporter class YAMLExporter(TextExporter): diff --git a/jrnl/prompt.py b/jrnl/prompt.py index 4cd38d90..803a5214 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -2,8 +2,8 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText from jrnl.output import print_msg from jrnl.output import print_msgs @@ -35,7 +35,7 @@ def create_password(journal_name: str) -> str: print_msg(Message(MsgText.PasswordDidNotMatch, MsgStyle.ERROR)) if yesno(Message(MsgText.PasswordStoreInKeychain), default=True): - from .EncryptedJournal import set_keychain + from jrnl.EncryptedJournal import set_keychain set_keychain(journal_name, pw) diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index 29ff8eb4..473f29e5 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -3,21 +3,20 @@ import os -from . import Journal -from . import __version__ -from .EncryptedJournal import EncryptedJournal -from .config import is_config_json -from .config import load_config -from .config import scope_config -from .prompt import yesno -from .path import expand_path - -from jrnl.output import print_msg -from jrnl.output import print_msgs +from jrnl import Journal +from jrnl import __version__ +from jrnl.config import is_config_json +from jrnl.config import load_config +from jrnl.config import scope_config +from jrnl.EncryptedJournal import EncryptedJournal from jrnl.exception import JrnlException from jrnl.messages import Message -from jrnl.messages import MsgText from jrnl.messages import MsgStyle +from jrnl.messages import MsgText +from jrnl.output import print_msg +from jrnl.output import print_msgs +from jrnl.path import expand_path +from jrnl.prompt import yesno def backup(filename, binary=False): diff --git a/poetry.lock b/poetry.lock index 7cfac23b..34836e59 100644 --- a/poetry.lock +++ b/poetry.lock @@ -238,7 +238,7 @@ python-versions = "*" [[package]] name = "importlib-metadata" -version = "4.11.4" +version = "4.12.0" description = "Read metadata from Python packages" category = "main" optional = false @@ -250,7 +250,7 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -308,6 +308,20 @@ qtconsole = ["qtconsole"] test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"] +[[package]] +name = "isort" +version = "5.10.1" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.6.1,<4.0" + +[package.extras] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] +plugins = ["setuptools"] + [[package]] name = "jedi" version = "0.18.1" @@ -979,7 +993,7 @@ pytz = "*" [[package]] name = "virtualenv" -version = "20.14.1" +version = "20.15.0" description = "Virtual Python Environment builder" category = "dev" optional = false @@ -1054,7 +1068,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "8f6875939de19061a92093ce15d9566f5e038f899effd64db5bc8590024129fa" +content-hash = "c739d49855d287e2a4a813938b243976f3af9f17425cfb4371fe2041dfe9f446" [metadata.files] ansiwrap = [ @@ -1230,8 +1244,8 @@ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.11.4-py3-none-any.whl", hash = "sha256:c58c8eb8a762858f49e18436ff552e83914778e50e9d2f1660535ffb364552ec"}, - {file = "importlib_metadata-4.11.4.tar.gz", hash = "sha256:5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700"}, + {file = "importlib_metadata-4.12.0-py3-none-any.whl", hash = "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"}, + {file = "importlib_metadata-4.12.0.tar.gz", hash = "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -1244,6 +1258,10 @@ ipython = [ {file = "ipython-8.4.0-py3-none-any.whl", hash = "sha256:7ca74052a38fa25fe9bedf52da0be7d3fdd2fb027c3b778ea78dfe8c212937d1"}, {file = "ipython-8.4.0.tar.gz", hash = "sha256:f2db3a10254241d9b447232cec8b424847f338d9d36f9a577a6192c332a46abd"}, ] +isort = [ + {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, + {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, +] jedi = [ {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, {file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"}, @@ -1571,8 +1589,8 @@ tzlocal = [ {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] virtualenv = [ - {file = "virtualenv-20.14.1-py2.py3-none-any.whl", hash = "sha256:e617f16e25b42eb4f6e74096b9c9e37713cf10bf30168fb4a739f3fa8f898a3a"}, - {file = "virtualenv-20.14.1.tar.gz", hash = "sha256:ef589a79795589aada0c1c5b319486797c03b67ac3984c48c669c0e4f50df3a5"}, + {file = "virtualenv-20.15.0-py2.py3-none-any.whl", hash = "sha256:804cce4de5b8a322f099897e308eecc8f6e2951f1a8e7e2b3598dff865f01336"}, + {file = "virtualenv-20.15.0.tar.gz", hash = "sha256:4c44b1d77ca81f8368e2d7414f9b20c428ad16b343ac6d226206c5b84e2b4fcc"}, ] watchdog = [ {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, diff --git a/pyproject.toml b/pyproject.toml index 73569ff3..8c0db562 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGE [tool.poetry.dev-dependencies] black = { version = ">=21.5b2", allow-prereleases = true } ipdb = "*" +isort = ">=5.10" mkdocs = ">=1.0,<1.3" poethepoet = "*" pyproject-flake8 = "*" @@ -72,6 +73,13 @@ style-check = [ {cmd = "pflake8 --version"}, {cmd = "pflake8 jrnl tests"}, ] +sort-run = [ + {cmd = "isort ."}, +] +sort-check = [ + {cmd = "isort --version"}, + {cmd = "isort --check ."}, +] # docs-check = ? docs-run = [ {cmd = "mkdocs serve"}, @@ -86,23 +94,25 @@ installer-check = [ ] # Groups of tasks +format = [ + "format-run", + "sort-run", +] lint = [ "installer-check", "style-check", + "sort-check", "format-check", ] - test = [ "lint", "test-run", ] [tool.isort] -multi_line_output = 7 +profile = "black" force_single_line = true -line_length = 88 -known_first_party = ["jrnl"] -force_sort_within_sections = true +known_first_party = ["jrnl", "tests"] [tool.pytest.ini_options] minversion = "6.0" diff --git a/tests/conftest.py b/tests/conftest.py index ed85affa..61d73c66 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,9 +4,8 @@ from pytest import mark from pytest import skip -from jrnl.os_compat import on_windows from jrnl.os_compat import on_posix - +from jrnl.os_compat import on_windows pytest_plugins = [ "tests.lib.fixtures", diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index b5c6895f..1b65e765 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -1,23 +1,23 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from collections import defaultdict import os -from pathlib import Path import tempfile - +from collections import defaultdict from collections.abc import Iterable +from pathlib import Path +from unittest.mock import Mock +from unittest.mock import patch + +import toml from keyring import backend from keyring import errors from pytest import fixture -from unittest.mock import patch -from unittest.mock import Mock -from .helpers import get_fixture -import toml from rich.console import Console from jrnl.config import load_config from jrnl.os_compat import split_args +from tests.lib.helpers import get_fixture # --- Keyring --- # diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index a2cdd1ea..490b92f3 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -1,12 +1,12 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from datetime import datetime import json import os import random import shutil import string +from datetime import datetime from unittest.mock import MagicMock from unittest.mock import patch from xml.etree import ElementTree @@ -16,10 +16,9 @@ from pytest_bdd.parsers import parse from jrnl import __version__ from jrnl.time import __get_pdt_calendar - -from .fixtures import FailedKeyring -from .fixtures import TestKeyring -from .helpers import get_fixture +from tests.lib.fixtures import FailedKeyring +from tests.lib.fixtures import TestKeyring +from tests.lib.helpers import get_fixture @given(parse("we {editor_method} to the editor if opened\n{editor_input}")) diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 857cf1f4..4efde7a5 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -11,11 +11,10 @@ from pytest_bdd.parsers import parse from ruamel.yaml import YAML from jrnl.config import scope_config - -from .helpers import assert_equal_tags_ignoring_order -from .helpers import does_directory_contain_files -from .helpers import parse_should_or_should_not -from .helpers import get_nested_val +from tests.lib.helpers import assert_equal_tags_ignoring_order +from tests.lib.helpers import does_directory_contain_files +from tests.lib.helpers import get_nested_val +from tests.lib.helpers import parse_should_or_should_not @then("we should get no error") diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index bd51b503..6590b21f 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -1,8 +1,8 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -from contextlib import ExitStack import os +from contextlib import ExitStack from pytest_bdd import when from pytest_bdd.parsers import parse diff --git a/tests/unit/test_color.py b/tests/unit/test_color.py index 800d619a..1543834c 100644 --- a/tests/unit/test_color.py +++ b/tests/unit/test_color.py @@ -1,9 +1,9 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import pytest from colorama import Fore from colorama import Style -import pytest from jrnl.color import colorize diff --git a/tests/unit/test_config_file.py b/tests/unit/test_config_file.py index 0ffb3b38..80734de4 100644 --- a/tests/unit/test_config_file.py +++ b/tests/unit/test_config_file.py @@ -1,11 +1,12 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import pytest import os -from jrnl.install import find_alt_config +import pytest + from jrnl.exception import JrnlException +from jrnl.install import find_alt_config def test_find_alt_config(request): diff --git a/tests/unit/test_jrnl.py b/tests/unit/test_jrnl.py index 247a9fd1..a310a281 100644 --- a/tests/unit/test_jrnl.py +++ b/tests/unit/test_jrnl.py @@ -1,15 +1,15 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import random +import string from unittest import mock import pytest -import random -import string import jrnl -from jrnl.jrnl import _display_search_results from jrnl.args import parse_args +from jrnl.jrnl import _display_search_results @pytest.fixture diff --git a/tests/unit/test_override.py b/tests/unit/test_override.py index 438ae03b..fedd91dd 100644 --- a/tests/unit/test_override.py +++ b/tests/unit/test_override.py @@ -1,6 +1,8 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +from argparse import Namespace + import pytest from jrnl.override import _convert_dots_to_list @@ -9,8 +11,6 @@ from jrnl.override import _get_key_and_value_from_pair from jrnl.override import _recursively_apply from jrnl.override import apply_overrides -from argparse import Namespace - @pytest.fixture() def minimal_config(): diff --git a/tests/unit/test_path.py b/tests/unit/test_path.py index efc6e54d..2759eac1 100644 --- a/tests/unit/test_path.py +++ b/tests/unit/test_path.py @@ -1,16 +1,16 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html -import pytest import random import string - from os import getenv from unittest.mock import patch -from jrnl.path import home_dir -from jrnl.path import expand_path +import pytest + from jrnl.path import absolute_path +from jrnl.path import expand_path +from jrnl.path import home_dir @pytest.fixture From 97cb7a678e38776f8c992faec37ad83e9fc2c813 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 25 Jun 2022 21:46:02 +0000 Subject: [PATCH 0667/1132] Increment version to v3.0-beta2 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index d8b052d1..e919d47f 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.0-beta" +__version__ = "v3.0-beta2" diff --git a/pyproject.toml b/pyproject.toml index 8c0db562..8050f019 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.0-beta" +version = "v3.0-beta2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 0279637fe42c3e0e70b7f2879a9e389d72fe355b Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 25 Jun 2022 21:47:37 +0000 Subject: [PATCH 0668/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67eb58b0..01ec4142 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,11 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.0-beta2](https://pypi.org/project/jrnl/v3.0-beta2/) (2022-06-25) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta...v3.0-beta2) **Fixed bugs:** -- Adding new entry with date only works with format m.d.Y [\#1509](https://github.com/jrnl-org/jrnl/issues/1509) - Blank box displays when not making any changes in --edit [\#1501](https://github.com/jrnl-org/jrnl/issues/1501) - Display message when no edits take place [\#1510](https://github.com/jrnl-org/jrnl/pull/1510) ([apainintheneck](https://github.com/apainintheneck)) From db6f80d721d6583a797495b0ebfe073d17fe40f6 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 9 Jul 2022 11:54:15 -0700 Subject: [PATCH 0669/1132] Limit pytest-bdd to <6.0 to temporarily avoid breaking changes (#1536) This will unblock other tests for now --- poetry.lock | 170 +++++++------------------------------------------ pyproject.toml | 4 +- 2 files changed, 26 insertions(+), 148 deletions(-) diff --git a/poetry.lock b/poetry.lock index 34836e59..31d03998 100644 --- a/poetry.lock +++ b/poetry.lock @@ -44,7 +44,7 @@ test = ["astroid", "pytest"] [[package]] name = "atomicwrites" -version = "1.4.0" +version = "1.4.1" description = "Atomic file writes." category = "dev" optional = false @@ -74,7 +74,7 @@ python-versions = "*" [[package]] name = "black" -version = "22.3.0" +version = "22.6.0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -85,7 +85,7 @@ click = ">=8.0.0" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] @@ -96,7 +96,7 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cffi" -version = "1.15.0" +version = "1.15.1" description = "Foreign Function Interface for Python calling C code." category = "main" optional = false @@ -137,7 +137,7 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" -version = "37.0.3" +version = "37.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -383,7 +383,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [[package]] name = "mako" -version = "1.2.0" +version = "1.2.1" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." category = "dev" optional = false @@ -593,7 +593,7 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" -version = "0.14.0" +version = "0.15.0" description = "A task runner that works well with poetry." category = "dev" optional = false @@ -616,7 +616,7 @@ python-versions = "*" [[package]] name = "prompt-toolkit" -version = "3.0.29" +version = "3.0.30" description = "Library for building powerful interactive command lines in Python" category = "dev" optional = false @@ -941,7 +941,7 @@ python-versions = ">=3.7" [[package]] name = "tox" -version = "3.25.0" +version = "3.25.1" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false @@ -974,7 +974,7 @@ test = ["pre-commit", "pytest"] [[package]] name = "typing-extensions" -version = "4.2.0" +version = "4.3.0" description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false @@ -993,7 +993,7 @@ pytz = "*" [[package]] name = "virtualenv" -version = "20.15.0" +version = "20.15.1" description = "Virtual Python Environment builder" category = "dev" optional = false @@ -1038,7 +1038,7 @@ python-versions = ">=3.4" [[package]] name = "yq" -version = "2.14.0" +version = "3.0.2" description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" category = "dev" optional = false @@ -1068,7 +1068,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "c739d49855d287e2a4a813938b243976f3af9f17425cfb4371fe2041dfe9f446" +content-hash = "647a60d3f5c77ae365e4acef948b048a112eebd0315e026ffe31a0cc441c6601" [metadata.files] ansiwrap = [ @@ -1087,10 +1087,7 @@ asttokens = [ {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, ] -atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, -] +atomicwrites = [] attrs = [ {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, @@ -1099,83 +1096,8 @@ backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [ - {file = "black-22.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09"}, - {file = "black-22.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb"}, - {file = "black-22.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a"}, - {file = "black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968"}, - {file = "black-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d"}, - {file = "black-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce"}, - {file = "black-22.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82"}, - {file = "black-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b"}, - {file = "black-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015"}, - {file = "black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b"}, - {file = "black-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a"}, - {file = "black-22.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163"}, - {file = "black-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464"}, - {file = "black-22.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0"}, - {file = "black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176"}, - {file = "black-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0"}, - {file = "black-22.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20"}, - {file = "black-22.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a"}, - {file = "black-22.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad"}, - {file = "black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21"}, - {file = "black-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265"}, - {file = "black-22.3.0-py3-none-any.whl", hash = "sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72"}, - {file = "black-22.3.0.tar.gz", hash = "sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79"}, -] -cffi = [ - {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, - {file = "cffi-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:23cfe892bd5dd8941608f93348c0737e369e51c100d03718f108bf1add7bd6d0"}, - {file = "cffi-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:41d45de54cd277a7878919867c0f08b0cf817605e4eb94093e7516505d3c8d14"}, - {file = "cffi-1.15.0-cp27-cp27m-win32.whl", hash = "sha256:4a306fa632e8f0928956a41fa8e1d6243c71e7eb59ffbd165fc0b41e316b2474"}, - {file = "cffi-1.15.0-cp27-cp27m-win_amd64.whl", hash = "sha256:e7022a66d9b55e93e1a845d8c9eba2a1bebd4966cd8bfc25d9cd07d515b33fa6"}, - {file = "cffi-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:14cd121ea63ecdae71efa69c15c5543a4b5fbcd0bbe2aad864baca0063cecf27"}, - {file = "cffi-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d4d692a89c5cf08a8557fdeb329b82e7bf609aadfaed6c0d79f5a449a3c7c023"}, - {file = "cffi-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0104fb5ae2391d46a4cb082abdd5c69ea4eab79d8d44eaaf79f1b1fd806ee4c2"}, - {file = "cffi-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:91ec59c33514b7c7559a6acda53bbfe1b283949c34fe7440bcf917f96ac0723e"}, - {file = "cffi-1.15.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f5c7150ad32ba43a07c4479f40241756145a1f03b43480e058cfd862bf5041c7"}, - {file = "cffi-1.15.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:00c878c90cb53ccfaae6b8bc18ad05d2036553e6d9d1d9dbcf323bbe83854ca3"}, - {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abb9a20a72ac4e0fdb50dae135ba5e77880518e742077ced47eb1499e29a443c"}, - {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a5263e363c27b653a90078143adb3d076c1a748ec9ecc78ea2fb916f9b861962"}, - {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f54a64f8b0c8ff0b64d18aa76675262e1700f3995182267998c31ae974fbc382"}, - {file = "cffi-1.15.0-cp310-cp310-win32.whl", hash = "sha256:c21c9e3896c23007803a875460fb786118f0cdd4434359577ea25eb556e34c55"}, - {file = "cffi-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:5e069f72d497312b24fcc02073d70cb989045d1c91cbd53979366077959933e0"}, - {file = "cffi-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:64d4ec9f448dfe041705426000cc13e34e6e5bb13736e9fd62e34a0b0c41566e"}, - {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2756c88cbb94231c7a147402476be2c4df2f6078099a6f4a480d239a8817ae39"}, - {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b96a311ac60a3f6be21d2572e46ce67f09abcf4d09344c49274eb9e0bf345fc"}, - {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75e4024375654472cc27e91cbe9eaa08567f7fbdf822638be2814ce059f58032"}, - {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:59888172256cac5629e60e72e86598027aca6bf01fa2465bdb676d37636573e8"}, - {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:27c219baf94952ae9d50ec19651a687b826792055353d07648a5695413e0c605"}, - {file = "cffi-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:4958391dbd6249d7ad855b9ca88fae690783a6be9e86df65865058ed81fc860e"}, - {file = "cffi-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:f6f824dc3bce0edab5f427efcfb1d63ee75b6fcb7282900ccaf925be84efb0fc"}, - {file = "cffi-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:06c48159c1abed75c2e721b1715c379fa3200c7784271b3c46df01383b593636"}, - {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c2051981a968d7de9dd2d7b87bcb9c939c74a34626a6e2f8181455dd49ed69e4"}, - {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fd8a250edc26254fe5b33be00402e6d287f562b6a5b2152dec302fa15bb3e997"}, - {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91d77d2a782be4274da750752bb1650a97bfd8f291022b379bb8e01c66b4e96b"}, - {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:45db3a33139e9c8f7c09234b5784a5e33d31fd6907800b316decad50af323ff2"}, - {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:263cc3d821c4ab2213cbe8cd8b355a7f72a8324577dc865ef98487c1aeee2bc7"}, - {file = "cffi-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:17771976e82e9f94976180f76468546834d22a7cc404b17c22df2a2c81db0c66"}, - {file = "cffi-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:3415c89f9204ee60cd09b235810be700e993e343a408693e80ce7f6a40108029"}, - {file = "cffi-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4238e6dab5d6a8ba812de994bbb0a79bddbdf80994e4ce802b6f6f3142fcc880"}, - {file = "cffi-1.15.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0808014eb713677ec1292301ea4c81ad277b6cdf2fdd90fd540af98c0b101d20"}, - {file = "cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:57e9ac9ccc3101fac9d6014fba037473e4358ef4e89f8e181f8951a2c0162024"}, - {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b6c2ea03845c9f501ed1313e78de148cd3f6cad741a75d43a29b43da27f2e1e"}, - {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10dffb601ccfb65262a27233ac273d552ddc4d8ae1bf93b21c94b8511bffe728"}, - {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:786902fb9ba7433aae840e0ed609f45c7bcd4e225ebb9c753aa39725bb3e6ad6"}, - {file = "cffi-1.15.0-cp38-cp38-win32.whl", hash = "sha256:da5db4e883f1ce37f55c667e5c0de439df76ac4cb55964655906306918e7363c"}, - {file = "cffi-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:181dee03b1170ff1969489acf1c26533710231c58f95534e3edac87fff06c443"}, - {file = "cffi-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:45e8636704eacc432a206ac7345a5d3d2c62d95a507ec70d62f23cd91770482a"}, - {file = "cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:31fb708d9d7c3f49a60f04cf5b119aeefe5644daba1cd2a0fe389b674fd1de37"}, - {file = "cffi-1.15.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6dc2737a3674b3e344847c8686cf29e500584ccad76204efea14f451d4cc669a"}, - {file = "cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74fdfdbfdc48d3f47148976f49fab3251e550a8720bebc99bf1483f5bfb5db3e"}, - {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffaa5c925128e29efbde7301d8ecaf35c8c60ffbcd6a1ffd3a552177c8e5e796"}, - {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f7d084648d77af029acb79a0ff49a0ad7e9d09057a9bf46596dac9514dc07df"}, - {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ef1f279350da2c586a69d32fc8733092fd32cc8ac95139a00377841f59a3f8d8"}, - {file = "cffi-1.15.0-cp39-cp39-win32.whl", hash = "sha256:2a23af14f408d53d5e6cd4e3d9a24ff9e05906ad574822a10563efcef137979a"}, - {file = "cffi-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:3773c4d81e6e818df2efbc7dd77325ca0dcb688116050fb2b3011218eda36139"}, - {file = "cffi-1.15.0.tar.gz", hash = "sha256:920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"}, -] +black = [] +cffi = [] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -1188,30 +1110,7 @@ commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] -cryptography = [ - {file = "cryptography-37.0.3-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:d10413d493e98075060d3e62e5826de372912ea653ccc948f3c41b21ddca087f"}, - {file = "cryptography-37.0.3-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:cd64147ff16506632893ceb2569624b48c84daa3ba4d89695f7c7bc24188eee9"}, - {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:17c74f7d9e9e9bb7e84521243695c1b4bdc3a0e44ca764e6bcf8f05f3de3d0df"}, - {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:0713bee6c8077786c56bdec9c5d3f099d40d2c862ff3200416f6862e9dd63156"}, - {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9c2008417741cdfbe945ef2d16b7b7ba0790886a0b49e1de533acf93eb66ed6"}, - {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:646905ff7a712e415bf0d0f214e0eb669dd2257c4d7a27db1e8baec5d2a1d55f"}, - {file = "cryptography-37.0.3-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:dcafadb5a06cb7a6bb49fb4c1de7414ee2f8c8e12b047606d97c3175d690f582"}, - {file = "cryptography-37.0.3-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:0b4bfc5ccfe4e5c7de535670680398fed4a0bbc5dfd52b3a295baad42230abdf"}, - {file = "cryptography-37.0.3-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:a03dbc0d8ce8c1146c177cd0e3a66ea106f36733fb1b997ea4d051f8a68539ff"}, - {file = "cryptography-37.0.3-cp36-abi3-win32.whl", hash = "sha256:190a24c14e91c1fa3101069aac7e77d11c5a73911c3904128367f52946bbb6fd"}, - {file = "cryptography-37.0.3-cp36-abi3-win_amd64.whl", hash = "sha256:b05c5478524deb7a019e240f2a970040c4b0f01f58f0425e6262c96b126c6a3e"}, - {file = "cryptography-37.0.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891ed8312840fd43e0696468a6520a582a033c0109f7b14b96067bfe1123226b"}, - {file = "cryptography-37.0.3-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:30d6aabf623a01affc7c0824936c3dde6590076b61f5dd299df3cc2c75fc5915"}, - {file = "cryptography-37.0.3-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:31a7c1f1c2551f013d4294d06e22848e2ccd77825f0987cba3239df6ebf7b020"}, - {file = "cryptography-37.0.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a94fd1ff80001cb97add71d07f596d8b865b716f25ef501183e0e199390e50d3"}, - {file = "cryptography-37.0.3-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8a85dbcc770256918b40c2f40bd3ffd3b2ae45b0cf19068b561db8f8d61bf492"}, - {file = "cryptography-37.0.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:773d5b5f2e2bd2c7cbb1bd24902ad41283c88b9dd463a0f82adc9a2870d9d066"}, - {file = "cryptography-37.0.3-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:0f9193428a55a4347af2d4fd8141a2002dedbcc26487e67fd2ae19f977ee8afc"}, - {file = "cryptography-37.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bf652c73e8f7c32a3f92f7184bf7f9106dacdf5ef59c3c3683d7dae2c4972fb"}, - {file = "cryptography-37.0.3-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c3c8b1ad2c266fdf7adc041cc4156d6a3d14db93de2f81b26a5af97ef3f209e5"}, - {file = "cryptography-37.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2383d6c3088e863304c37c65cd2ea404b7fbb4886823eab1d74137cc27f3d2ee"}, - {file = "cryptography-37.0.3.tar.gz", hash = "sha256:ae430d51c67ac638dfbb42edf56c669ca9c74744f4d225ad11c6f3d355858187"}, -] +cryptography = [] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, @@ -1278,10 +1177,7 @@ keyring = [ {file = "keyring-23.6.0-py3-none-any.whl", hash = "sha256:372ff2fc43ab779e3f87911c26e6c7acc8bb440cbd82683e383ca37594cb0617"}, {file = "keyring-23.6.0.tar.gz", hash = "sha256:3ac00c26e4c93739e19103091a9986a9f79665a78cf15a4df1dba7ea9ac8da2f"}, ] -mako = [ - {file = "Mako-1.2.0-py3-none-any.whl", hash = "sha256:23aab11fdbbb0f1051b93793a58323ff937e98e34aece1c4219675122e57e4ba"}, - {file = "Mako-1.2.0.tar.gz", hash = "sha256:9a7c7e922b87db3686210cf49d5d767033a41d4010b284e747682c92bddd8b39"}, -] +mako = [] markdown = [ {file = "Markdown-3.3.7-py3-none-any.whl", hash = "sha256:f5da449a6e1c989a4cea2631aa8ee67caa5a2ef855d551c88f9e309f4634c621"}, {file = "Markdown-3.3.7.tar.gz", hash = "sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874"}, @@ -1391,18 +1287,12 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -poethepoet = [ - {file = "poethepoet-0.14.0-py3-none-any.whl", hash = "sha256:e274988b469306c11b634b1c6b1cf1ffc880353afbcff874540090c3c9c50c2c"}, - {file = "poethepoet-0.14.0.tar.gz", hash = "sha256:1557f324e3ad791d86f515d4138dbfd97ac71c6ff3ec2d308f4d792e3002d1f0"}, -] +poethepoet = [] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] -prompt-toolkit = [ - {file = "prompt_toolkit-3.0.29-py3-none-any.whl", hash = "sha256:62291dad495e665fca0bda814e342c69952086afb0f4094d0893d357e5c78752"}, - {file = "prompt_toolkit-3.0.29.tar.gz", hash = "sha256:bd640f60e8cecd74f0dc249713d433ace2ddc62b65ee07f96d358e0b152b6ea7"}, -] +prompt-toolkit = [] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -1572,26 +1462,17 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -tox = [ - {file = "tox-3.25.0-py2.py3-none-any.whl", hash = "sha256:0805727eb4d6b049de304977dfc9ce315a1938e6619c3ab9f38682bb04662a5a"}, - {file = "tox-3.25.0.tar.gz", hash = "sha256:37888f3092aa4e9f835fc8cc6dadbaaa0782651c41ef359e3a5743fcb0308160"}, -] +tox = [] traitlets = [ {file = "traitlets-5.3.0-py3-none-any.whl", hash = "sha256:65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a"}, {file = "traitlets-5.3.0.tar.gz", hash = "sha256:0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2"}, ] -typing-extensions = [ - {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, - {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, -] +typing-extensions = [] tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] -virtualenv = [ - {file = "virtualenv-20.15.0-py2.py3-none-any.whl", hash = "sha256:804cce4de5b8a322f099897e308eecc8f6e2951f1a8e7e2b3598dff865f01336"}, - {file = "virtualenv-20.15.0.tar.gz", hash = "sha256:4c44b1d77ca81f8368e2d7414f9b20c428ad16b343ac6d226206c5b84e2b4fcc"}, -] +virtualenv = [] watchdog = [ {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, @@ -1627,10 +1508,7 @@ xmltodict = [ {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] -yq = [ - {file = "yq-2.14.0-py3-none-any.whl", hash = "sha256:b6321b29cb39c4e92a4a6f16d47d99a024650211e45e09a02d1906ec45fbaede"}, - {file = "yq-2.14.0.tar.gz", hash = "sha256:f4bf2b299d1e5c7ebd74cfb25d1f5d9b6401063bac07a2d09a156144c1d644e1"}, -] +yq = [] zipp = [ {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, diff --git a/pyproject.toml b/pyproject.toml index 8050f019..6a844618 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ mkdocs = ">=1.0,<1.3" poethepoet = "*" pyproject-flake8 = "*" pytest = ">=6.2" -pytest-bdd = ">=4.0.1" +pytest-bdd = ">=4.0.1,<6.0" pytest-clarity = "*" pytest-xdist = ">=2.5.0" toml = ">=0.10" @@ -158,7 +158,7 @@ isolated_build = True [testenv] deps = pytest >= 6.2 - pytest-bdd >=4.0.1 + pytest-bdd >=4.0.1,<6.0 pytest-xdist >=2.5.0 toml >=0.10 From bfe58a18e56b60bc15d10016da30f0bd411e5dd4 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Jul 2022 18:56:09 +0000 Subject: [PATCH 0670/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ec4142..04903d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta2...HEAD) + +**Build:** + +- Pin `pytest-bdd` to \<6.0 to temporarily avoid breaking changes [\#1536](https://github.com/jrnl-org/jrnl/pull/1536) ([wren](https://github.com/wren)) + ## [v3.0-beta2](https://pypi.org/project/jrnl/v3.0-beta2/) (2022-06-25) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta...v3.0-beta2) From 50b320063abe0f5f8122feb401279eaf33c3b6f7 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Jul 2022 19:02:32 +0000 Subject: [PATCH 0671/1132] Increment version to v3.0 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index e919d47f..1cb4416f 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.0-beta2" +__version__ = "v3.0" diff --git a/pyproject.toml b/pyproject.toml index 6a844618..7c57e5e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.0-beta2" +version = "v3.0" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From ca1f2a76d898bb7b27a0b4a910a0b20ac9f1ce36 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 9 Jul 2022 19:03:51 +0000 Subject: [PATCH 0672/1132] Update changelog [ci skip] --- CHANGELOG.md | 60 ++++++++++++---------------------------------------- 1 file changed, 13 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04903d3c..61bb664c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,45 +1,11 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.0](https://pypi.org/project/jrnl/v3.0/) (2022-07-09) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta2...HEAD) - -**Build:** - -- Pin `pytest-bdd` to \<6.0 to temporarily avoid breaking changes [\#1536](https://github.com/jrnl-org/jrnl/pull/1536) ([wren](https://github.com/wren)) - -## [v3.0-beta2](https://pypi.org/project/jrnl/v3.0-beta2/) (2022-06-25) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta...v3.0-beta2) - -**Fixed bugs:** - -- Blank box displays when not making any changes in --edit [\#1501](https://github.com/jrnl-org/jrnl/issues/1501) -- Display message when no edits take place [\#1510](https://github.com/jrnl-org/jrnl/pull/1510) ([apainintheneck](https://github.com/apainintheneck)) - -**Build:** - -- Use tox [\#1361](https://github.com/jrnl-org/jrnl/issues/1361) -- Reduce difference between local and CI environments [\#1518](https://github.com/jrnl-org/jrnl/pull/1518) ([wren](https://github.com/wren)) -- Add bdd tests for jrnl installation [\#1513](https://github.com/jrnl-org/jrnl/pull/1513) ([apainintheneck](https://github.com/apainintheneck)) -- Stop hardcoding bot info in changelog pipeline [\#1506](https://github.com/jrnl-org/jrnl/pull/1506) ([wren](https://github.com/wren)) -- Fix Poetry caching for accessibility tests [\#1505](https://github.com/jrnl-org/jrnl/pull/1505) ([wren](https://github.com/wren)) -- Implement Tox for testing [\#1504](https://github.com/jrnl-org/jrnl/pull/1504) ([wren](https://github.com/wren)) -- Replace `make` with python alternative \(`poe`\) [\#1503](https://github.com/jrnl-org/jrnl/pull/1503) ([wren](https://github.com/wren)) -- Update copyright year [\#1502](https://github.com/jrnl-org/jrnl/pull/1502) ([wren](https://github.com/wren)) - -**Packaging:** - -- Bump cryptography from 37.0.2 to 37.0.3 [\#1516](https://github.com/jrnl-org/jrnl/pull/1516) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump poethepoet from 0.13.1 to 0.14.0 [\#1514](https://github.com/jrnl-org/jrnl/pull/1514) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v3.0-beta](https://pypi.org/project/jrnl/v3.0-beta/) (2022-06-11) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.8.4...v3.0-beta) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta2...v3.0) **Implemented enhancements:** -- Add --change-time command to change the timestamp of an entry [\#1429](https://github.com/jrnl-org/jrnl/issues/1429) - Show name of journal when creating a password/encrypting [\#1478](https://github.com/jrnl-org/jrnl/pull/1478) ([jonakeys](https://github.com/jonakeys)) - Rework how all output and messaging works in jrnl [\#1475](https://github.com/jrnl-org/jrnl/pull/1475) ([wren](https://github.com/wren)) - Implement --change-time flag [\#1452](https://github.com/jrnl-org/jrnl/pull/1452) ([richardjs](https://github.com/richardjs)) @@ -48,14 +14,7 @@ **Fixed bugs:** -- --debug leads to logging error after composing new entry [\#1496](https://github.com/jrnl-org/jrnl/issues/1496) -- Using -not argument by itself leads to new entry creation [\#1472](https://github.com/jrnl-org/jrnl/issues/1472) -- Empty config file leads to confusing error message [\#1420](https://github.com/jrnl-org/jrnl/issues/1420) -- "Entry not saved" text doesn't appear in default stdin editor [\#1419](https://github.com/jrnl-org/jrnl/issues/1419) -- jrnl --encrypt doesn't prompt me for password change [\#1358](https://github.com/jrnl-org/jrnl/issues/1358) -- '-not -contains x' raises an AttributeError exception [\#1350](https://github.com/jrnl-org/jrnl/issues/1350) -- Exception when providing folder name of folder that does not exist as journal path [\#1293](https://github.com/jrnl-org/jrnl/issues/1293) -- display\_format: pretty and display\_format: short lead to crash [\#1263](https://github.com/jrnl-org/jrnl/issues/1263) +- Display message when no edits take place [\#1510](https://github.com/jrnl-org/jrnl/pull/1510) ([apainintheneck](https://github.com/apainintheneck)) - Fixed error related to display\_format in config file for some values [\#1495](https://github.com/jrnl-org/jrnl/pull/1495) ([apainintheneck](https://github.com/apainintheneck)) - Create folder if config ends with \(back\)slash [\#1492](https://github.com/jrnl-org/jrnl/pull/1492) ([jonakeys](https://github.com/jonakeys)) - `-not` search parameter no longer opens editor [\#1490](https://github.com/jrnl-org/jrnl/pull/1490) ([apainintheneck](https://github.com/apainintheneck)) @@ -69,12 +28,18 @@ **Deprecated:** -- Remove "sample" format and its asteval dependency [\#1435](https://github.com/jrnl-org/jrnl/issues/1435) - Drop support for Python 3.7 and 3.8 [\#1412](https://github.com/jrnl-org/jrnl/pull/1412) ([micahellison](https://github.com/micahellison)) **Build:** -- Clean up .gitignore [\#1286](https://github.com/jrnl-org/jrnl/issues/1286) +- Pin `pytest-bdd` to \<6.0 to temporarily avoid breaking changes [\#1536](https://github.com/jrnl-org/jrnl/pull/1536) ([wren](https://github.com/wren)) +- Reduce difference between local and CI environments [\#1518](https://github.com/jrnl-org/jrnl/pull/1518) ([wren](https://github.com/wren)) +- Add bdd tests for jrnl installation [\#1513](https://github.com/jrnl-org/jrnl/pull/1513) ([apainintheneck](https://github.com/apainintheneck)) +- Stop hardcoding bot info in changelog pipeline [\#1506](https://github.com/jrnl-org/jrnl/pull/1506) ([wren](https://github.com/wren)) +- Fix Poetry caching for accessibility tests [\#1505](https://github.com/jrnl-org/jrnl/pull/1505) ([wren](https://github.com/wren)) +- Implement Tox for testing [\#1504](https://github.com/jrnl-org/jrnl/pull/1504) ([wren](https://github.com/wren)) +- Replace `make` with python alternative \(`poe`\) [\#1503](https://github.com/jrnl-org/jrnl/pull/1503) ([wren](https://github.com/wren)) +- Update copyright year [\#1502](https://github.com/jrnl-org/jrnl/pull/1502) ([wren](https://github.com/wren)) - Add Python 3.11 to PR tests [\#1500](https://github.com/jrnl-org/jrnl/pull/1500) ([micahellison](https://github.com/micahellison)) - Pin jinja2 in docs requirements to keep readthedocs builds from failing [\#1439](https://github.com/jrnl-org/jrnl/pull/1439) ([micahellison](https://github.com/micahellison)) - Tidy up git ignore [\#1414](https://github.com/jrnl-org/jrnl/pull/1414) ([nelnog](https://github.com/nelnog)) @@ -85,7 +50,8 @@ **Packaging:** -- Sync jrnl's Python version support more closely to Python release cycle [\#1406](https://github.com/jrnl-org/jrnl/issues/1406) +- Bump cryptography from 37.0.2 to 37.0.3 [\#1516](https://github.com/jrnl-org/jrnl/pull/1516) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump poethepoet from 0.13.1 to 0.14.0 [\#1514](https://github.com/jrnl-org/jrnl/pull/1514) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.5.1 to 23.6.0 [\#1499](https://github.com/jrnl-org/jrnl/pull/1499) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pyxdg from 0.27 to 0.28 [\#1497](https://github.com/jrnl-org/jrnl/pull/1497) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.5.0 to 23.5.1 [\#1487](https://github.com/jrnl-org/jrnl/pull/1487) ([dependabot[bot]](https://github.com/apps/dependabot)) From c45bed7f6ce5d06991844b02f066beb68300039e Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 16 Jul 2022 14:13:48 -0700 Subject: [PATCH 0673/1132] Disable gherkin reporter to fix failing test suite (#1540) --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c57e5e5..51bd6ff6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,6 @@ markers = [ ] addopts = [ "--pdbcls=IPython.terminal.debugger:Pdb", - "--gherkin-terminal-reporter", "--tb=native", "-n=auto", ] From 3a5316cedc7ec1f06f8ff3346a0323367f18777f Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 16 Jul 2022 23:21:21 +0200 Subject: [PATCH 0674/1132] Check for duplicate keys in config file (#1511) * Check for duplicate keys in config file * Corrected BDD tests * Unneeded check removed * Make use of ruamel DuplicateKeyError exception * Remove unneeded import and function * slightly reword warning message * fix merge conflicts * update tests Co-authored-by: Jonathan Wren --- jrnl/config.py | 24 +++++++++++++++++++---- jrnl/messages/MsgText.py | 7 +++++++ tests/bdd/features/config_file.feature | 17 ++++++++++++++++ tests/data/configs/duplicate_keys.yaml | 27 ++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 tests/data/configs/duplicate_keys.yaml diff --git a/jrnl/config.py b/jrnl/config.py index 045958c1..cea3720e 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -7,6 +7,7 @@ import os import colorama import xdg.BaseDirectory from ruamel.yaml import YAML +from ruamel.yaml import constructor from jrnl import __version__ from jrnl.exception import JrnlException @@ -159,10 +160,25 @@ def verify_config_colors(config): def load_config(config_path): """Tries to load a config file from YAML.""" - with open(config_path, encoding=YAML_FILE_ENCODING) as f: - yaml = YAML(typ="safe") - yaml.allow_duplicate_keys = True - return yaml.load(f) + try: + with open(config_path, encoding=YAML_FILE_ENCODING) as f: + yaml = YAML(typ="safe") + yaml.allow_duplicate_keys = False + return yaml.load(f) + except constructor.DuplicateKeyError as e: + print_msg( + Message( + MsgText.ConfigDoubleKeys, + MsgStyle.WARNING, + { + "error_message": e, + }, + ) + ) + with open(config_path, encoding=YAML_FILE_ENCODING) as f: + yaml = YAML(typ="safe") + yaml.allow_duplicate_keys = True + return yaml.load(f) def is_config_json(config_path): diff --git a/jrnl/messages/MsgText.py b/jrnl/messages/MsgText.py index d26f1dfd..b8250970 100644 --- a/jrnl/messages/MsgText.py +++ b/jrnl/messages/MsgText.py @@ -198,6 +198,13 @@ class MsgText(Enum): Configuration updated to newest version at {config_path} """ + ConfigDoubleKeys = """ + There is at least one duplicate key in your configuration file. + + Details: + {error_message} + """ + # --- Password --- # Password = "Password:" PasswordFirstEntry = "Enter password for journal '{journal_name}': " diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index 76e93059..d6b6121f 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -106,3 +106,20 @@ Feature: Multiple journals And we use the config "basic_onefile.yaml" When we run "jrnl --cf empty_file.yaml" Then the error output should contain "Unable to parse config file" + + Scenario: Show a warning message when the config file contains duplicate keys at the same level + Given the config "duplicate_keys.yaml" exists + And we use the config "duplicate_keys.yaml" + When we run "jrnl -1" + Then the output should contain "There is at least one duplicate key in your configuration file" + + Scenario: Show a warning message when using --config-file with duplicate keys + Given the config "duplicate_keys.yaml" exists + And we use the config "multiple.yaml" + When we run "jrnl --cf duplicate_keys.yaml -1" + Then the output should contain "There is at least one duplicate key in your configuration file" + + Scenario: Don't show a duplicate keys warning message when using --config-override on an existing value + Given we use the config "multiple.yaml" + When we run "jrnl --config-override highlight false" + Then the output should not contain "There is at least one duplicate key in your configuration file" \ No newline at end of file diff --git a/tests/data/configs/duplicate_keys.yaml b/tests/data/configs/duplicate_keys.yaml new file mode 100644 index 00000000..ca74c738 --- /dev/null +++ b/tests/data/configs/duplicate_keys.yaml @@ -0,0 +1,27 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +template: false +journals: + default: + encrypt: false + journal: features/journals/simple.journal + journal: features/journals/simple.journal + ideas: + encrypt: false + journal: features/journals/does-not-exist.journal + simple: + encrypt: false + journal: features/journals/simple.journal + encrypt: false + work: + encrypt: false + journal: features/journals/work.journal +linewrap: 80 +tagsymbols: '@' +editor: nano +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" From e695180049c2d3270d8afa34c7f3d703d33258f4 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 16 Jul 2022 21:22:57 +0000 Subject: [PATCH 0675/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61bb664c..d51df7a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0...HEAD) + +**Implemented enhancements:** + +- Warn user when there are duplicate keys in the config file [\#1415](https://github.com/jrnl-org/jrnl/issues/1415) + ## [v3.0](https://pypi.org/project/jrnl/v3.0/) (2022-07-09) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta2...v3.0) From ec8bbd2187e9e908beaaabdd190695d270749e45 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 16 Jul 2022 14:45:13 -0700 Subject: [PATCH 0676/1132] update formatting function to better account for indenting (#1541) --- jrnl/output.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jrnl/output.py b/jrnl/output.py index 78a1da24..78765ca9 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -89,5 +89,9 @@ def _add_extra_style_args_if_needed(args, msg): def format_msg_text(msg: Message) -> Text: - text = textwrap.dedent(msg.text.value.format(**msg.params)).strip() + text = textwrap.dedent(msg.text.value) + text = text.format(**msg.params) + # dedent again in case inserted text needs it + text = textwrap.dedent(text) + text = text.strip() return Text(text) From 24ee35b95bb4f9bf62ab1c2a5d129020ed1dbacc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 12:02:02 -0700 Subject: [PATCH 0677/1132] Bump keyring from 23.6.0 to 23.7.0 (#1539) Bumps [keyring](https://github.com/jaraco/keyring) from 23.6.0 to 23.7.0. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.6.0...v23.7.0) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 165 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 150 insertions(+), 15 deletions(-) diff --git a/poetry.lock b/poetry.lock index 31d03998..64985299 100644 --- a/poetry.lock +++ b/poetry.lock @@ -365,7 +365,7 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.6.0" +version = "23.7.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -379,7 +379,7 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [[package]] name = "mako" @@ -1087,7 +1087,9 @@ asttokens = [ {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, ] -atomicwrites = [] +atomicwrites = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] attrs = [ {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, @@ -1096,8 +1098,97 @@ backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [] -cffi = [] +black = [ + {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, + {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, + {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, + {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, + {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, + {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, + {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, + {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, + {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, + {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, + {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, + {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, + {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, + {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, + {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, + {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, + {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, + {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, + {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, +] +cffi = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -1110,7 +1201,30 @@ commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] -cryptography = [] +cryptography = [ + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, +] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, @@ -1174,10 +1288,13 @@ jinja2 = [ {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ - {file = "keyring-23.6.0-py3-none-any.whl", hash = "sha256:372ff2fc43ab779e3f87911c26e6c7acc8bb440cbd82683e383ca37594cb0617"}, - {file = "keyring-23.6.0.tar.gz", hash = "sha256:3ac00c26e4c93739e19103091a9986a9f79665a78cf15a4df1dba7ea9ac8da2f"}, + {file = "keyring-23.7.0-py3-none-any.whl", hash = "sha256:e67fc91a7955785fd2efcbccdd72d7dacf136dbc381d27de305b2b660b3de886"}, + {file = "keyring-23.7.0.tar.gz", hash = "sha256:782e1cd1132e91bf459fcd243bcf25b326015c1ac0b198e4408f91fa6791062b"}, +] +mako = [ + {file = "Mako-1.2.1-py3-none-any.whl", hash = "sha256:df3921c3081b013c8a2d5ff03c18375651684921ae83fd12e64800b7da923257"}, + {file = "Mako-1.2.1.tar.gz", hash = "sha256:f054a5ff4743492f1aa9ecc47172cb33b42b9d993cffcc146c9de17e717b0307"}, ] -mako = [] markdown = [ {file = "Markdown-3.3.7-py3-none-any.whl", hash = "sha256:f5da449a6e1c989a4cea2631aa8ee67caa5a2ef855d551c88f9e309f4634c621"}, {file = "Markdown-3.3.7.tar.gz", hash = "sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874"}, @@ -1287,12 +1404,18 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -poethepoet = [] +poethepoet = [ + {file = "poethepoet-0.15.0-py3-none-any.whl", hash = "sha256:8ca49d8a9928a3ce1753315d6df0866888557eccb0fe37a8c88fea47454cfe12"}, + {file = "poethepoet-0.15.0.tar.gz", hash = "sha256:5843260c9074b6c42bf2e51f21107efe37e230cf75da3dd3f4b43904f365b26c"}, +] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] -prompt-toolkit = [] +prompt-toolkit = [ + {file = "prompt_toolkit-3.0.30-py3-none-any.whl", hash = "sha256:d8916d3f62a7b67ab353a952ce4ced6a1d2587dfe9ef8ebc30dd7c386751f289"}, + {file = "prompt_toolkit-3.0.30.tar.gz", hash = "sha256:859b283c50bde45f5f97829f77a4674d1c1fcd88539364f1b28a37805cfd89c0"}, +] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -1462,17 +1585,26 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -tox = [] +tox = [ + {file = "tox-3.25.1-py2.py3-none-any.whl", hash = "sha256:c38e15f4733683a9cc0129fba078633e07eb0961f550a010ada879e95fb32632"}, + {file = "tox-3.25.1.tar.gz", hash = "sha256:c138327815f53bc6da4fe56baec5f25f00622ae69ef3fe4e1e385720e22486f9"}, +] traitlets = [ {file = "traitlets-5.3.0-py3-none-any.whl", hash = "sha256:65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a"}, {file = "traitlets-5.3.0.tar.gz", hash = "sha256:0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2"}, ] -typing-extensions = [] +typing-extensions = [ + {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, + {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, +] tzlocal = [ {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, ] -virtualenv = [] +virtualenv = [ + {file = "virtualenv-20.15.1-py2.py3-none-any.whl", hash = "sha256:b30aefac647e86af6d82bfc944c556f8f1a9c90427b2fb4e3bfbf338cb82becf"}, + {file = "virtualenv-20.15.1.tar.gz", hash = "sha256:288171134a2ff3bfb1a2f54f119e77cd1b81c29fc1265a2356f3e8d14c7d58c4"}, +] watchdog = [ {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, @@ -1508,7 +1640,10 @@ xmltodict = [ {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] -yq = [] +yq = [ + {file = "yq-3.0.2-py3-none-any.whl", hash = "sha256:ec58e003c3b5f1d03702b3c56a2bc81ac9cb400567e0e53f5bf82eae3bcff755"}, + {file = "yq-3.0.2.tar.gz", hash = "sha256:e47ff2479a3746f90bdbb77f84e3ebdb789ce46a092b1c261ae5b1f5f914f8e8"}, +] zipp = [ {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, From 7b5106dd08c62c2ec8930f68e6f0f4bfef920224 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:03:58 +0000 Subject: [PATCH 0678/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d51df7a8..a99cb1d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,13 @@ **Implemented enhancements:** +- Create an environment variable when jrnl is called [\#1537](https://github.com/jrnl-org/jrnl/issues/1537) - Warn user when there are duplicate keys in the config file [\#1415](https://github.com/jrnl-org/jrnl/issues/1415) +**Packaging:** + +- Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v3.0](https://pypi.org/project/jrnl/v3.0/) (2022-07-09) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0-beta2...v3.0) From 08c366d95073c6aa232fe5287316ea64a305e23a Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 30 Jul 2022 12:16:56 -0700 Subject: [PATCH 0679/1132] Fixed index out of range error in fancy exporter (#1522) --- jrnl/plugins/fancy_exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index b9567bfd..a1e31869 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -50,7 +50,7 @@ class FancyExporter(TextExporter): subsequent_indent=cls.border_g + " ", ) - title_lines = w.wrap(entry.title) + title_lines = w.wrap(entry.title) or [""] card.append( title_lines[0].ljust(initial_linewrap + 1) + cls.border_d From 252c63f4dd4ffc1a79d4c8d2507064a0b2cf180b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 12:20:50 -0700 Subject: [PATCH 0680/1132] Bump yq from 3.0.2 to 3.1.0 (#1546) Bumps [yq](https://github.com/kislyuk/yq) from 3.0.2 to 3.1.0. - [Release notes](https://github.com/kislyuk/yq/releases) - [Changelog](https://github.com/kislyuk/yq/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/yq/compare/v3.0.2...v3.1.0) --- updated-dependencies: - dependency-name: yq dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 64985299..8adad950 100644 --- a/poetry.lock +++ b/poetry.lock @@ -26,7 +26,7 @@ optional = false python-versions = ">=3.6" [package.extras] -test = ["coverage", "flake8", "pexpect", "wheel"] +test = ["wheel", "pexpect", "flake8", "coverage"] [[package]] name = "asttokens" @@ -133,7 +133,7 @@ optional = false python-versions = "*" [package.extras] -test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] +test = ["hypothesis (==3.55.3)", "flake8 (==3.7.8)"] [[package]] name = "cryptography" @@ -226,7 +226,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["twine", "markdown", "flake8", "wheel"] +dev = ["wheel", "flake8", "markdown", "twine"] [[package]] name = "glob2" @@ -346,8 +346,8 @@ optional = false python-versions = ">=3.7" [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] -trio = ["trio", "async-generator"] +trio = ["async-generator", "trio"] +test = ["async-timeout", "trio", "testpath", "pytest-asyncio (>=0.17)", "pytest-trio", "pytest"] [[package]] name = "jinja2" @@ -509,8 +509,8 @@ parse = {version = ">=1.18.0", markers = "python_version >= \"3.0\""} six = ">=1.11" [package.extras] -develop = ["coverage (>=4.4)", "pytest-html (>=1.19.0)", "pytest-cov", "tox (>=2.8)", "pytest (<5.0)", "pytest (>=5.0)"] docs = ["sphinx (>=1.2)"] +develop = ["pytest (>=5.0)", "pytest (<5.0)", "tox (>=2.8)", "pytest-cov", "pytest-html (>=1.19.0)", "coverage (>=4.4)"] [[package]] name = "parsedatetime" @@ -588,8 +588,8 @@ optional = false python-versions = ">=3.6" [package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] +testing = ["pytest-benchmark", "pytest"] +dev = ["tox", "pre-commit"] [[package]] name = "poethepoet" @@ -913,7 +913,7 @@ executing = "*" pure-eval = "*" [package.extras] -tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] +tests = ["cython", "littleutils", "pygments", "typeguard", "pytest"] [[package]] name = "textwrap3" @@ -1038,7 +1038,7 @@ python-versions = ">=3.4" [[package]] name = "yq" -version = "3.0.2" +version = "3.1.0" description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" category = "dev" optional = false @@ -1641,8 +1641,8 @@ xmltodict = [ {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] yq = [ - {file = "yq-3.0.2-py3-none-any.whl", hash = "sha256:ec58e003c3b5f1d03702b3c56a2bc81ac9cb400567e0e53f5bf82eae3bcff755"}, - {file = "yq-3.0.2.tar.gz", hash = "sha256:e47ff2479a3746f90bdbb77f84e3ebdb789ce46a092b1c261ae5b1f5f914f8e8"}, + {file = "yq-3.1.0-py3-none-any.whl", hash = "sha256:a1acffd3257a0b8e460f1a7ec1ae5af4646944e810f7d7099084b3104aa05769"}, + {file = "yq-3.1.0.tar.gz", hash = "sha256:30a84aa22486c749ba269256bd586c0bcd370b7e2a71e76c3924ead4867e74f2"}, ] zipp = [ {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, From 80bfff384e7d17c0a6530791d5ee2d4f858ebf68 Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 30 Jul 2022 21:22:04 +0200 Subject: [PATCH 0681/1132] Add linewrap option 'auto' (#1507) * Add linewrap option 'auto' * Specify the exception thrown * Add BDD test * Specify name instead of number * Create test for linewrap auto and fancy format * Fix linewrap auto for fancy format --- docs/reference-config-file.md | 3 ++- jrnl/Entry.py | 22 ++++++++++++++++++---- jrnl/plugins/fancy_exporter.py | 19 ++++++++++++++++++- tests/bdd/features/config_file.feature | 12 +++++++++++- tests/data/configs/linewrap_auto.yaml | 17 +++++++++++++++++ 5 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 tests/data/configs/linewrap_auto.yaml diff --git a/docs/reference-config-file.md b/docs/reference-config-file.md index 03454c05..80949156 100644 --- a/docs/reference-config-file.md +++ b/docs/reference-config-file.md @@ -101,7 +101,8 @@ If `true`, tags will be highlighted in cyan. ### linewrap Controls the width of the output. Set to `false` if you don't want to -wrap long lines. +wrap long lines. Set to `auto` to let `jrnl` automatically determine +the terminal width. ### colors A dictionary that controls the colors used to display journal entries. diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 73f26190..6754072f 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -2,12 +2,14 @@ # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime +import logging +import os import re import ansiwrap -from jrnl.color import colorize -from jrnl.color import highlight_tags_with_background_color +from .color import colorize +from .color import highlight_tags_with_background_color class Entry: @@ -104,6 +106,18 @@ class Entry: ) if not short and self.journal.config["linewrap"]: + columns = self.journal.config["linewrap"] + + if columns == "auto": + try: + columns = os.get_terminal_size().columns + except OSError: + logging.debug( + "Can't determine terminal size automatically 'linewrap': '%s'", + self.journal.config["linewrap"], + ) + columns = 79 + # Color date / title and bold title title = ansiwrap.fill( date_str @@ -114,7 +128,7 @@ class Entry: self.journal.config["colors"]["title"], is_title=True, ), - self.journal.config["linewrap"], + columns, ) body = highlight_tags_with_background_color( self, self.body.rstrip(" \n"), self.journal.config["colors"]["body"] @@ -123,7 +137,7 @@ class Entry: colorize( ansiwrap.fill( line, - self.journal.config["linewrap"], + columns, initial_indent=indent, subsequent_indent=indent, drop_whitespace=True, diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index a1e31869..2ce39ae0 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -1,6 +1,8 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import logging +import os from textwrap import TextWrapper from jrnl.exception import JrnlException @@ -36,7 +38,22 @@ class FancyExporter(TextExporter): def export_entry(cls, entry): """Returns a fancy unicode representation of a single entry.""" date_str = entry.date.strftime(entry.journal.config["timeformat"]) - linewrap = entry.journal.config["linewrap"] or 78 + + if entry.journal.config["linewrap"]: + linewrap = entry.journal.config["linewrap"] + + if linewrap == "auto": + try: + linewrap = os.get_terminal_size().columns + except OSError: + logging.debug( + "Can't determine terminal size automatically 'linewrap': '%s'", + entry.journal.config["linewrap"], + ) + linewrap = 79 + else: + linewrap = 79 + initial_linewrap = max((1, linewrap - len(date_str) - 2)) body_linewrap = linewrap - 2 card = [ diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index d6b6121f..5cd3a6c5 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -107,6 +107,16 @@ Feature: Multiple journals When we run "jrnl --cf empty_file.yaml" Then the error output should contain "Unable to parse config file" + Scenario: Use a config file with linewrap set to 'auto' + Given we use the config "linewrap_auto.yaml" + When we run "jrnl -1" + Then the output should contain "Life is good." + + Scenario: Use a config file with linewrap set to 'auto' and use format 'fancy' + Given we use the config "linewrap_auto.yaml" + When we run "jrnl -1 --format fancy" + Then the output should contain "Life is good." + Scenario: Show a warning message when the config file contains duplicate keys at the same level Given the config "duplicate_keys.yaml" exists And we use the config "duplicate_keys.yaml" @@ -122,4 +132,4 @@ Feature: Multiple journals Scenario: Don't show a duplicate keys warning message when using --config-override on an existing value Given we use the config "multiple.yaml" When we run "jrnl --config-override highlight false" - Then the output should not contain "There is at least one duplicate key in your configuration file" \ No newline at end of file + Then the output should not contain "There is at least one duplicate key in your configuration file" diff --git a/tests/data/configs/linewrap_auto.yaml b/tests/data/configs/linewrap_auto.yaml new file mode 100644 index 00000000..69188710 --- /dev/null +++ b/tests/data/configs/linewrap_auto.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: auto +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none From 2d15a7a5cf5cca337ff0dfed22e6e247d5d3faf6 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:23:51 +0000 Subject: [PATCH 0682/1132] Update changelog [ci skip] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a99cb1d1..9781e00c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,16 @@ - Create an environment variable when jrnl is called [\#1537](https://github.com/jrnl-org/jrnl/issues/1537) - Warn user when there are duplicate keys in the config file [\#1415](https://github.com/jrnl-org/jrnl/issues/1415) +- Add linewrap option 'auto' [\#1507](https://github.com/jrnl-org/jrnl/pull/1507) ([jonakeys](https://github.com/jonakeys)) + +**Fixed bugs:** + +- Update formatting function to better account for indentation [\#1541](https://github.com/jrnl-org/jrnl/pull/1541) ([wren](https://github.com/wren)) +- Fixed index out of range error in fancy exporter [\#1522](https://github.com/jrnl-org/jrnl/pull/1522) ([apainintheneck](https://github.com/apainintheneck)) **Packaging:** +- Bump yq from 3.0.2 to 3.1.0 [\#1546](https://github.com/jrnl-org/jrnl/pull/1546) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v3.0](https://pypi.org/project/jrnl/v3.0/) (2022-07-09) From 506cc664b2f6752dbe85679c73eeba91c436feb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 12:34:09 -0700 Subject: [PATCH 0683/1132] Bump rich from 12.4.4 to 12.5.1 (#1538) Bumps [rich](https://github.com/willmcgugan/rich) from 12.4.4 to 12.5.1. - [Release notes](https://github.com/willmcgugan/rich/releases) - [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md) - [Commits](https://github.com/willmcgugan/rich/compare/v12.4.4...v12.5.1) --- updated-dependencies: - dependency-name: rich dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8adad950..db59d64c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -843,7 +843,7 @@ pyyaml = "*" [[package]] name = "rich" -version = "12.4.4" +version = "12.5.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "main" optional = false @@ -1527,8 +1527,8 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] rich = [ - {file = "rich-12.4.4-py3-none-any.whl", hash = "sha256:d2bbd99c320a2532ac71ff6a3164867884357da3e3301f0240090c5d2fdac7ec"}, - {file = "rich-12.4.4.tar.gz", hash = "sha256:4c586de507202505346f3e32d1363eb9ed6932f0c2f63184dea88983ff4971e2"}, + {file = "rich-12.5.1-py3-none-any.whl", hash = "sha256:2eb4e6894cde1e017976d2975ac210ef515d7548bc595ba20e195fb9628acdeb"}, + {file = "rich-12.5.1.tar.gz", hash = "sha256:63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca"}, ] "ruamel.yaml" = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, From e233ab4a742fcbe3b143799653894bf57a8a120f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:35:48 +0000 Subject: [PATCH 0684/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9781e00c..64fe2094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Bump yq from 3.0.2 to 3.1.0 [\#1546](https://github.com/jrnl-org/jrnl/pull/1546) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rich from 12.4.4 to 12.5.1 [\#1538](https://github.com/jrnl-org/jrnl/pull/1538) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v3.0](https://pypi.org/project/jrnl/v3.0/) (2022-07-09) From 94d126b0c88d132c2e88d80ccf87cd68712dc13f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 12:43:57 -0700 Subject: [PATCH 0685/1132] Bump poethepoet from 0.15.0 to 0.16.0 (#1542) Bumps [poethepoet](https://github.com/nat-n/poethepoet) from 0.15.0 to 0.16.0. - [Release notes](https://github.com/nat-n/poethepoet/releases) - [Commits](https://github.com/nat-n/poethepoet/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: poethepoet dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index db59d64c..fd01fde0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -593,7 +593,7 @@ dev = ["tox", "pre-commit"] [[package]] name = "poethepoet" -version = "0.15.0" +version = "0.16.0" description = "A task runner that works well with poetry." category = "dev" optional = false @@ -1405,8 +1405,8 @@ pluggy = [ {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poethepoet = [ - {file = "poethepoet-0.15.0-py3-none-any.whl", hash = "sha256:8ca49d8a9928a3ce1753315d6df0866888557eccb0fe37a8c88fea47454cfe12"}, - {file = "poethepoet-0.15.0.tar.gz", hash = "sha256:5843260c9074b6c42bf2e51f21107efe37e230cf75da3dd3f4b43904f365b26c"}, + {file = "poethepoet-0.16.0-py3-none-any.whl", hash = "sha256:87482ea8bba4e5db4abbd8e6360baee73b2ce0f3d5f5e99e81cdfa39d72d118f"}, + {file = "poethepoet-0.16.0.tar.gz", hash = "sha256:6455aec39f198be92dbf210a4416e1635119e967204c092b431c8b10024db1d1"}, ] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, From 049d2a72c85b2e96db7f29b01b941660fa150311 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:46:19 +0000 Subject: [PATCH 0686/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64fe2094..d63f085f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ **Packaging:** - Bump yq from 3.0.2 to 3.1.0 [\#1546](https://github.com/jrnl-org/jrnl/pull/1546) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump poethepoet from 0.15.0 to 0.16.0 [\#1542](https://github.com/jrnl-org/jrnl/pull/1542) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump rich from 12.4.4 to 12.5.1 [\#1538](https://github.com/jrnl-org/jrnl/pull/1538) ([dependabot[bot]](https://github.com/apps/dependabot)) From 62f65ce3b99aeb420855f15cac4255ffe7002922 Mon Sep 17 00:00:00 2001 From: outa Date: Sat, 30 Jul 2022 21:46:43 +0200 Subject: [PATCH 0687/1132] Update tzlocal to v4.x and remove pytz dependency (#1528) * Update tzlocal to v4.x and remove pytz dependency * Avoid `unwrap_shim` method * Remove upper bound of tzlocal version --- jrnl/DayOneJournal.py | 17 +- poetry.lock | 284 +++++++--------------------- pyproject.toml | 3 +- tests/bdd/features/datetime.feature | 2 +- 4 files changed, 78 insertions(+), 228 deletions(-) diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 27ffef6d..faeb5210 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -10,10 +10,10 @@ import re import socket import time import uuid +import zoneinfo from pathlib import Path from xml.parsers.expat import ExpatError -import pytz import tzlocal from jrnl import Entry @@ -39,10 +39,6 @@ class DayOne(Journal.Journal): super().__init__(**kwargs) def open(self): - filenames = [ - os.path.join(self.config["journal"], "entries", f) - for f in os.listdir(os.path.join(self.config["journal"], "entries")) - ] filenames = [] for root, dirnames, f in os.walk(self.config["journal"]): for filename in fnmatch.filter(f, "*.doentry"): @@ -56,14 +52,15 @@ class DayOne(Journal.Journal): pass else: try: - timezone = pytz.timezone(dict_entry["Time Zone"]) - except (KeyError, pytz.exceptions.UnknownTimeZoneError): - timezone = tzlocal.get_localzone() + timezone = zoneinfo.ZoneInfo(dict_entry["Time Zone"]) + except KeyError: + timezone_name = str(tzlocal.get_localzone()) + timezone = zoneinfo.ZoneInfo(timezone_name) date = dict_entry["Creation Date"] # convert the date to UTC rather than keep messing with # timezones - if timezone.zone != "UTC": - date = date + timezone.utcoffset(date, is_dst=False) + if timezone.key != "UTC": + date = date.replace(fold=1) + timezone.utcoffset(date) entry = Entry.Entry( self, diff --git a/poetry.lock b/poetry.lock index fd01fde0..63cebaaf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -26,7 +26,7 @@ optional = false python-versions = ">=3.6" [package.extras] -test = ["wheel", "pexpect", "flake8", "coverage"] +test = ["coverage", "flake8", "pexpect", "wheel"] [[package]] name = "asttokens" @@ -52,17 +52,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.4.0" +version = "22.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "backcall" @@ -133,7 +133,7 @@ optional = false python-versions = "*" [package.extras] -test = ["hypothesis (==3.55.3)", "flake8 (==3.7.8)"] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" @@ -164,7 +164,7 @@ python-versions = ">=3.5" [[package]] name = "distlib" -version = "0.3.4" +version = "0.3.5" description = "Distribution utilities" category = "dev" optional = false @@ -183,7 +183,7 @@ testing = ["pre-commit"] [[package]] name = "executing" -version = "0.8.3" +version = "0.9.1" description = "Get the currently executing AST node of a frame, and other information" category = "dev" optional = false @@ -226,7 +226,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["wheel", "flake8", "markdown", "twine"] +dev = ["twine", "markdown", "flake8", "wheel"] [[package]] name = "glob2" @@ -346,8 +346,8 @@ optional = false python-versions = ">=3.7" [package.extras] -trio = ["async-generator", "trio"] -test = ["async-timeout", "trio", "testpath", "pytest-asyncio (>=0.17)", "pytest-trio", "pytest"] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] [[package]] name = "jinja2" @@ -399,11 +399,11 @@ testing = ["pytest"] [[package]] name = "markdown" -version = "3.3.7" +version = "3.4.1" description = "Python implementation of Markdown." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} @@ -509,8 +509,8 @@ parse = {version = ">=1.18.0", markers = "python_version >= \"3.0\""} six = ">=1.11" [package.extras] +develop = ["coverage (>=4.4)", "pytest-html (>=1.19.0)", "pytest-cov", "tox (>=2.8)", "pytest (<5.0)", "pytest (>=5.0)"] docs = ["sphinx (>=1.2)"] -develop = ["pytest (>=5.0)", "pytest (<5.0)", "tox (>=2.8)", "pytest-cov", "pytest-html (>=1.19.0)", "coverage (>=4.4)"] [[package]] name = "parsedatetime" @@ -588,8 +588,8 @@ optional = false python-versions = ">=3.6" [package.extras] -testing = ["pytest-benchmark", "pytest"] -dev = ["tox", "pre-commit"] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" @@ -799,12 +799,15 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" six = ">=1.5" [[package]] -name = "pytz" -version = "2022.1" -description = "World timezone definitions, modern and historical" +name = "pytz-deprecation-shim" +version = "0.1.0.post0" +description = "Shims to make deprecation of pytz easier" category = "main" optional = false -python-versions = "*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" + +[package.dependencies] +tzdata = {version = "*", markers = "python_version >= \"3.6\""} [[package]] name = "pywin32-ctypes" @@ -913,7 +916,7 @@ executing = "*" pure-eval = "*" [package.extras] -tests = ["cython", "littleutils", "pygments", "typeguard", "pytest"] +tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] [[package]] name = "textwrap3" @@ -980,34 +983,46 @@ category = "dev" optional = false python-versions = ">=3.7" +[[package]] +name = "tzdata" +version = "2022.1" +description = "Provider of IANA time zone data" +category = "main" +optional = false +python-versions = ">=2" + [[package]] name = "tzlocal" -version = "2.1" +version = "4.2" description = "tzinfo object for the local timezone" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" [package.dependencies] -pytz = "*" +pytz-deprecation-shim = "*" +tzdata = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +devenv = ["black", "pyroma", "pytest-cov", "zest.releaser"] +test = ["pytest-mock (>=3.3)", "pytest (>=4.3)"] [[package]] name = "virtualenv" -version = "20.15.1" +version = "20.16.2" description = "Virtual Python Environment builder" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] distlib = ">=0.3.1,<1" filelock = ">=3.2,<4" platformdirs = ">=2,<3" -six = ">=1.9.0,<2" [package.extras] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] [[package]] name = "watchdog" @@ -1055,20 +1070,20 @@ tests = ["coverage", "flake8", "wheel"] [[package]] name = "zipp" -version = "3.8.0" +version = "3.8.1" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "647a60d3f5c77ae365e4acef948b048a112eebd0315e026ffe31a0cc441c6601" +content-hash = "5f5954af39ca238b840a95e932999bcb1ead3b8d403d0d18e0a89806ddcc59f9" [metadata.files] ansiwrap = [ @@ -1087,108 +1102,14 @@ asttokens = [ {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, ] -atomicwrites = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] -attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, -] +atomicwrites = [] +attrs = [] backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [ - {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, - {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, - {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, - {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, - {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, - {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, - {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, - {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, - {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, - {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, - {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, - {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, - {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, - {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, - {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, - {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, - {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, - {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, - {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, - {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, - {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, - {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, - {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, -] -cffi = [ - {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, - {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, - {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, - {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, - {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, - {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, - {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, - {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, - {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, - {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, - {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, - {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, - {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, - {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, - {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, - {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, - {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, - {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, - {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, -] +black = [] +cffi = [] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -1201,46 +1122,17 @@ commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] -cryptography = [ - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, - {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, - {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, - {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, -] +cryptography = [] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] -distlib = [ - {file = "distlib-0.3.4-py2.py3-none-any.whl", hash = "sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b"}, - {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, -] +distlib = [] execnet = [ {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, ] -executing = [ - {file = "executing-0.8.3-py2.py3-none-any.whl", hash = "sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9"}, - {file = "executing-0.8.3.tar.gz", hash = "sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501"}, -] +executing = [] filelock = [ {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, @@ -1287,18 +1179,9 @@ jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] -keyring = [ - {file = "keyring-23.7.0-py3-none-any.whl", hash = "sha256:e67fc91a7955785fd2efcbccdd72d7dacf136dbc381d27de305b2b660b3de886"}, - {file = "keyring-23.7.0.tar.gz", hash = "sha256:782e1cd1132e91bf459fcd243bcf25b326015c1ac0b198e4408f91fa6791062b"}, -] -mako = [ - {file = "Mako-1.2.1-py3-none-any.whl", hash = "sha256:df3921c3081b013c8a2d5ff03c18375651684921ae83fd12e64800b7da923257"}, - {file = "Mako-1.2.1.tar.gz", hash = "sha256:f054a5ff4743492f1aa9ecc47172cb33b42b9d993cffcc146c9de17e717b0307"}, -] -markdown = [ - {file = "Markdown-3.3.7-py3-none-any.whl", hash = "sha256:f5da449a6e1c989a4cea2631aa8ee67caa5a2ef855d551c88f9e309f4634c621"}, - {file = "Markdown-3.3.7.tar.gz", hash = "sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874"}, -] +keyring = [] +mako = [] +markdown = [] markupsafe = [ {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, @@ -1404,18 +1287,12 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -poethepoet = [ - {file = "poethepoet-0.16.0-py3-none-any.whl", hash = "sha256:87482ea8bba4e5db4abbd8e6360baee73b2ce0f3d5f5e99e81cdfa39d72d118f"}, - {file = "poethepoet-0.16.0.tar.gz", hash = "sha256:6455aec39f198be92dbf210a4416e1635119e967204c092b431c8b10024db1d1"}, -] +poethepoet = [] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] -prompt-toolkit = [ - {file = "prompt_toolkit-3.0.30-py3-none-any.whl", hash = "sha256:d8916d3f62a7b67ab353a952ce4ced6a1d2587dfe9ef8ebc30dd7c386751f289"}, - {file = "prompt_toolkit-3.0.30.tar.gz", hash = "sha256:859b283c50bde45f5f97829f77a4674d1c1fcd88539364f1b28a37805cfd89c0"}, -] +prompt-toolkit = [] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -1475,10 +1352,7 @@ python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] -pytz = [ - {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, - {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, -] +pytz-deprecation-shim = [] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, @@ -1526,10 +1400,7 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] -rich = [ - {file = "rich-12.5.1-py3-none-any.whl", hash = "sha256:2eb4e6894cde1e017976d2975ac210ef515d7548bc595ba20e195fb9628acdeb"}, - {file = "rich-12.5.1.tar.gz", hash = "sha256:63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca"}, -] +rich = [] "ruamel.yaml" = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, {file = "ruamel.yaml-0.17.21.tar.gz", hash = "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af"}, @@ -1585,26 +1456,15 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -tox = [ - {file = "tox-3.25.1-py2.py3-none-any.whl", hash = "sha256:c38e15f4733683a9cc0129fba078633e07eb0961f550a010ada879e95fb32632"}, - {file = "tox-3.25.1.tar.gz", hash = "sha256:c138327815f53bc6da4fe56baec5f25f00622ae69ef3fe4e1e385720e22486f9"}, -] +tox = [] traitlets = [ {file = "traitlets-5.3.0-py3-none-any.whl", hash = "sha256:65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a"}, {file = "traitlets-5.3.0.tar.gz", hash = "sha256:0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2"}, ] -typing-extensions = [ - {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, - {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, -] -tzlocal = [ - {file = "tzlocal-2.1-py2.py3-none-any.whl", hash = "sha256:e2cb6c6b5b604af38597403e9852872d7f534962ae2954c7f35efcb1ccacf4a4"}, - {file = "tzlocal-2.1.tar.gz", hash = "sha256:643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"}, -] -virtualenv = [ - {file = "virtualenv-20.15.1-py2.py3-none-any.whl", hash = "sha256:b30aefac647e86af6d82bfc944c556f8f1a9c90427b2fb4e3bfbf338cb82becf"}, - {file = "virtualenv-20.15.1.tar.gz", hash = "sha256:288171134a2ff3bfb1a2f54f119e77cd1b81c29fc1265a2356f3e8d14c7d58c4"}, -] +typing-extensions = [] +tzdata = [] +tzlocal = [] +virtualenv = [] watchdog = [ {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, @@ -1640,11 +1500,5 @@ xmltodict = [ {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] -yq = [ - {file = "yq-3.1.0-py3-none-any.whl", hash = "sha256:a1acffd3257a0b8e460f1a7ec1ae5af4646944e810f7d7099084b3104aa05769"}, - {file = "yq-3.1.0.tar.gz", hash = "sha256:30a84aa22486c749ba269256bd586c0bcd370b7e2a71e76c3924ead4867e74f2"}, -] -zipp = [ - {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, - {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, -] +yq = [] +zipp = [] diff --git a/pyproject.toml b/pyproject.toml index 51bd6ff6..1c5e7bf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,8 +40,7 @@ pyxdg = ">=0.27.0" rich = "^12.2.0" # dayone-only deps -pytz = ">=2020" # https://pythonhosted.org/pytz/#issues-limitations -tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt +tzlocal = ">=4.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt [tool.poetry.dev-dependencies] black = { version = ">=21.5b2", allow-prereleases = true } diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index 28d63169..e2b0fa76 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -175,7 +175,7 @@ Feature: Reading and writing to journal with custom date formats When we run "jrnl -1" Then we should get no error And the output should be - 2013-10-27 03:27 Some text. + 2013-10-27 04:27 Some text. @skip #1422 From a78632768c8f9df3829bf4dbbe653f3cd378a2b9 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:48:19 +0000 Subject: [PATCH 0688/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d63f085f..e07e15aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Create an environment variable when jrnl is called [\#1537](https://github.com/jrnl-org/jrnl/issues/1537) - Warn user when there are duplicate keys in the config file [\#1415](https://github.com/jrnl-org/jrnl/issues/1415) +- Support tzlocal v4 [\#1338](https://github.com/jrnl-org/jrnl/issues/1338) - Add linewrap option 'auto' [\#1507](https://github.com/jrnl-org/jrnl/pull/1507) ([jonakeys](https://github.com/jonakeys)) **Fixed bugs:** From 6ade0da597d5be62adb5b6ec930daf529b595e05 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:51:10 +0000 Subject: [PATCH 0689/1132] Increment version to v3.1-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 1cb4416f..c4a343ad 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.0" +__version__ = "v3.1-beta" diff --git a/pyproject.toml b/pyproject.toml index 1c5e7bf7..fa40a1c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.0" +version = "v3.1-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 6f4df4b55ee5be644803229b53c3f906707fe546 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 30 Jul 2022 19:52:53 +0000 Subject: [PATCH 0690/1132] Update changelog [ci skip] --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e07e15aa..594d127e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,14 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.1-beta](https://pypi.org/project/jrnl/v3.1-beta/) (2022-07-30) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0...v3.1-beta) **Implemented enhancements:** -- Create an environment variable when jrnl is called [\#1537](https://github.com/jrnl-org/jrnl/issues/1537) - Warn user when there are duplicate keys in the config file [\#1415](https://github.com/jrnl-org/jrnl/issues/1415) - Support tzlocal v4 [\#1338](https://github.com/jrnl-org/jrnl/issues/1338) +- Update tzlocal to v4.x and remove pytz dependency [\#1528](https://github.com/jrnl-org/jrnl/pull/1528) ([outa](https://github.com/outa)) - Add linewrap option 'auto' [\#1507](https://github.com/jrnl-org/jrnl/pull/1507) ([jonakeys](https://github.com/jonakeys)) **Fixed bugs:** From 611d6d7b117b3bf85d4b6de39d62434d231257f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 12:47:57 -0700 Subject: [PATCH 0691/1132] Bump pyproject-flake8 from 0.0.1a4 to 0.0.1a5 (#1552) Bumps [pyproject-flake8](https://github.com/csachs/pyproject-flake8) from 0.0.1a4 to 0.0.1a5. - [Release notes](https://github.com/csachs/pyproject-flake8/releases) - [Commits](https://github.com/csachs/pyproject-flake8/compare/v0.0.1a4...v0.0.1a5) --- updated-dependencies: - dependency-name: pyproject-flake8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 233 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 199 insertions(+), 34 deletions(-) diff --git a/poetry.lock b/poetry.lock index 63cebaaf..ef3d3582 100644 --- a/poetry.lock +++ b/poetry.lock @@ -26,7 +26,7 @@ optional = false python-versions = ">=3.6" [package.extras] -test = ["coverage", "flake8", "pexpect", "wheel"] +test = ["wheel", "pexpect", "flake8", "coverage"] [[package]] name = "asttokens" @@ -133,7 +133,7 @@ optional = false python-versions = "*" [package.extras] -test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] +test = ["hypothesis (==3.55.3)", "flake8 (==3.7.8)"] [[package]] name = "cryptography" @@ -226,7 +226,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["twine", "markdown", "flake8", "wheel"] +dev = ["wheel", "flake8", "markdown", "twine"] [[package]] name = "glob2" @@ -346,8 +346,8 @@ optional = false python-versions = ">=3.7" [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] -trio = ["trio", "async-generator"] +trio = ["async-generator", "trio"] +test = ["async-timeout", "trio", "testpath", "pytest-asyncio (>=0.17)", "pytest-trio", "pytest"] [[package]] name = "jinja2" @@ -509,8 +509,8 @@ parse = {version = ">=1.18.0", markers = "python_version >= \"3.0\""} six = ">=1.11" [package.extras] -develop = ["coverage (>=4.4)", "pytest-html (>=1.19.0)", "pytest-cov", "tox (>=2.8)", "pytest (<5.0)", "pytest (>=5.0)"] docs = ["sphinx (>=1.2)"] +develop = ["pytest (>=5.0)", "pytest (<5.0)", "tox (>=2.8)", "pytest-cov", "pytest-html (>=1.19.0)", "coverage (>=4.4)"] [[package]] name = "parsedatetime" @@ -588,8 +588,8 @@ optional = false python-versions = ">=3.6" [package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] +testing = ["pytest-benchmark", "pytest"] +dev = ["tox", "pre-commit"] [[package]] name = "poethepoet" @@ -697,14 +697,14 @@ diagrams = ["railroad-diagrams", "jinja2"] [[package]] name = "pyproject-flake8" -version = "0.0.1a4" +version = "0.0.1a5" description = "pyproject-flake8 (`pflake8`), a monkey patching wrapper to connect flake8 with pyproject.toml configuration" category = "dev" optional = false python-versions = "*" [package.dependencies] -flake8 = "*" +flake8 = "<5.0.0" tomli = {version = "*", markers = "python_version < \"3.11\""} [[package]] @@ -916,7 +916,7 @@ executing = "*" pure-eval = "*" [package.extras] -tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] +tests = ["cython", "littleutils", "pygments", "typeguard", "pytest"] [[package]] name = "textwrap3" @@ -1102,14 +1102,108 @@ asttokens = [ {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, ] -atomicwrites = [] -attrs = [] +atomicwrites = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [] -cffi = [] +black = [ + {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, + {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, + {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, + {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, + {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, + {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, + {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, + {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, + {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, + {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, + {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, + {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, + {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, + {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, + {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, + {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, + {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, + {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, + {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, +] +cffi = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -1122,17 +1216,46 @@ commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] -cryptography = [] +cryptography = [ + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, +] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] -distlib = [] +distlib = [ + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, +] execnet = [ {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, ] -executing = [] +executing = [ + {file = "executing-0.9.1-py2.py3-none-any.whl", hash = "sha256:4ce4d6082d99361c0231fc31ac1a0f56979363cc6819de0b1410784f99e49105"}, + {file = "executing-0.9.1.tar.gz", hash = "sha256:ea278e2cf90cbbacd24f1080dd1f0ac25b71b2e21f50ab439b7ba45dd3195587"}, +] filelock = [ {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, @@ -1179,9 +1302,18 @@ jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] -keyring = [] -mako = [] -markdown = [] +keyring = [ + {file = "keyring-23.7.0-py3-none-any.whl", hash = "sha256:e67fc91a7955785fd2efcbccdd72d7dacf136dbc381d27de305b2b660b3de886"}, + {file = "keyring-23.7.0.tar.gz", hash = "sha256:782e1cd1132e91bf459fcd243bcf25b326015c1ac0b198e4408f91fa6791062b"}, +] +mako = [ + {file = "Mako-1.2.1-py3-none-any.whl", hash = "sha256:df3921c3081b013c8a2d5ff03c18375651684921ae83fd12e64800b7da923257"}, + {file = "Mako-1.2.1.tar.gz", hash = "sha256:f054a5ff4743492f1aa9ecc47172cb33b42b9d993cffcc146c9de17e717b0307"}, +] +markdown = [ + {file = "Markdown-3.4.1-py3-none-any.whl", hash = "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186"}, + {file = "Markdown-3.4.1.tar.gz", hash = "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff"}, +] markupsafe = [ {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, @@ -1287,12 +1419,18 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -poethepoet = [] +poethepoet = [ + {file = "poethepoet-0.16.0-py3-none-any.whl", hash = "sha256:87482ea8bba4e5db4abbd8e6360baee73b2ce0f3d5f5e99e81cdfa39d72d118f"}, + {file = "poethepoet-0.16.0.tar.gz", hash = "sha256:6455aec39f198be92dbf210a4416e1635119e967204c092b431c8b10024db1d1"}, +] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] -prompt-toolkit = [] +prompt-toolkit = [ + {file = "prompt_toolkit-3.0.30-py3-none-any.whl", hash = "sha256:d8916d3f62a7b67ab353a952ce4ced6a1d2587dfe9ef8ebc30dd7c386751f289"}, + {file = "prompt_toolkit-3.0.30.tar.gz", hash = "sha256:859b283c50bde45f5f97829f77a4674d1c1fcd88539364f1b28a37805cfd89c0"}, +] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -1326,8 +1464,8 @@ pyparsing = [ {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] pyproject-flake8 = [ - {file = "pyproject-flake8-0.0.1a4.tar.gz", hash = "sha256:8ed9453f1d984cfe94c998f9840275359e29e7f435b8ddd188ae084e2dc1270c"}, - {file = "pyproject_flake8-0.0.1a4-py2.py3-none-any.whl", hash = "sha256:1a8f94e18d08677ee780625049d9d00a9ee823661c6606caab8a383351037a75"}, + {file = "pyproject-flake8-0.0.1a5.tar.gz", hash = "sha256:22542080ba90d4bd80ee060852db15a24aeea61c9a29ed7c16f5b59b0e47a03a"}, + {file = "pyproject_flake8-0.0.1a5-py2.py3-none-any.whl", hash = "sha256:c843d760c49d7b270e9abda58a57765c031918a9d10da25aa43572f5d77cac43"}, ] pytest = [ {file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"}, @@ -1352,7 +1490,10 @@ python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] -pytz-deprecation-shim = [] +pytz-deprecation-shim = [ + {file = "pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl", hash = "sha256:8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6"}, + {file = "pytz_deprecation_shim-0.1.0.post0.tar.gz", hash = "sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d"}, +] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, @@ -1400,7 +1541,10 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] -rich = [] +rich = [ + {file = "rich-12.5.1-py3-none-any.whl", hash = "sha256:2eb4e6894cde1e017976d2975ac210ef515d7548bc595ba20e195fb9628acdeb"}, + {file = "rich-12.5.1.tar.gz", hash = "sha256:63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca"}, +] "ruamel.yaml" = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, {file = "ruamel.yaml-0.17.21.tar.gz", hash = "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af"}, @@ -1456,15 +1600,30 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -tox = [] +tox = [ + {file = "tox-3.25.1-py2.py3-none-any.whl", hash = "sha256:c38e15f4733683a9cc0129fba078633e07eb0961f550a010ada879e95fb32632"}, + {file = "tox-3.25.1.tar.gz", hash = "sha256:c138327815f53bc6da4fe56baec5f25f00622ae69ef3fe4e1e385720e22486f9"}, +] traitlets = [ {file = "traitlets-5.3.0-py3-none-any.whl", hash = "sha256:65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a"}, {file = "traitlets-5.3.0.tar.gz", hash = "sha256:0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2"}, ] -typing-extensions = [] -tzdata = [] -tzlocal = [] -virtualenv = [] +typing-extensions = [ + {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, + {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, +] +tzdata = [ + {file = "tzdata-2022.1-py2.py3-none-any.whl", hash = "sha256:238e70234214138ed7b4e8a0fab0e5e13872edab3be586ab8198c407620e2ab9"}, + {file = "tzdata-2022.1.tar.gz", hash = "sha256:8b536a8ec63dc0751342b3984193a3118f8fca2afe25752bb9b7fffd398552d3"}, +] +tzlocal = [ + {file = "tzlocal-4.2-py3-none-any.whl", hash = "sha256:89885494684c929d9191c57aa27502afc87a579be5cdd3225c77c463ea043745"}, + {file = "tzlocal-4.2.tar.gz", hash = "sha256:ee5842fa3a795f023514ac2d801c4a81d1743bbe642e3940143326b3a00addd7"}, +] +virtualenv = [ + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, +] watchdog = [ {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, @@ -1500,5 +1659,11 @@ xmltodict = [ {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] -yq = [] -zipp = [] +yq = [ + {file = "yq-3.1.0-py3-none-any.whl", hash = "sha256:a1acffd3257a0b8e460f1a7ec1ae5af4646944e810f7d7099084b3104aa05769"}, + {file = "yq-3.1.0.tar.gz", hash = "sha256:30a84aa22486c749ba269256bd586c0bcd370b7e2a71e76c3924ead4867e74f2"}, +] +zipp = [ + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, +] From c92ee476323077fb476d1a6039c750b13b6f315c Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Aug 2022 19:49:55 +0000 Subject: [PATCH 0692/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 594d127e..178ead4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta...HEAD) + +**Packaging:** + +- Bump pyproject-flake8 from 0.0.1a4 to 0.0.1a5 [\#1552](https://github.com/jrnl-org/jrnl/pull/1552) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v3.1-beta](https://pypi.org/project/jrnl/v3.1-beta/) (2022-07-30) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0...v3.1-beta) From fb473007da79c78827b76ed576e71768f22c034a Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Sat, 13 Aug 2022 22:02:19 +0200 Subject: [PATCH 0693/1132] Export to file(s) when first line/title of an entry is very long (#1527) --- jrnl/plugins/text_exporter.py | 22 +++++++++++++++++++--- tests/bdd/features/format.feature | 18 ++++++++++++++++++ tests/lib/helpers.py | 15 +++++++++++++++ tests/lib/then_steps.py | 6 ++++++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index cfd4a8ec..eeb934f9 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -1,6 +1,7 @@ # Copyright (C) 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html +import errno import os import re import unicodedata @@ -53,9 +54,24 @@ class TextExporter: def write_files(cls, journal, path): """Exports a journal into individual files for each entry.""" for entry in journal.entries: - full_path = os.path.join(path, cls.make_filename(entry)) - with open(full_path, "w", encoding="utf-8") as f: - f.write(cls.export_entry(entry)) + entry_is_written = False + while not entry_is_written: + full_path = os.path.join(path, cls.make_filename(entry)) + try: + with open(full_path, "w", encoding="utf-8") as f: + f.write(cls.export_entry(entry)) + entry_is_written = True + except OSError as oserr: + title_length = len(str(entry.title)) + if ( + oserr.errno == errno.ENAMETOOLONG + or oserr.errno == errno.ENOENT + or oserr.errno == errno.EINVAL + ) and title_length > 1: + shorter_file_length = title_length // 2 + entry.title = str(entry.title)[:shorter_file_length] + else: + raise print_msg( Message( MsgText.JournalExportedTo, diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index 9781ff51..d5714630 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -579,3 +579,21 @@ Feature: Custom formats | basic_encrypted.yaml | | basic_folder.yaml | | basic_dayone.yaml | + + Scenario: Export entries in markdown format with a title longer than max file name length. + Given we use the config "basic_onefile.yaml" + And we create a cache directory + When we run "jrnl 2022-07-31 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Laoreet id donec ultrices tincidunt arcu Dolor sit amet consectetur adipiscing elit duis tristique sollicitudin Ut pharetra sit amet aliquam id diam maecenas Habitasse platea dictumst quisque sagittis Aliquam purus sit amet luctus venenatis lectus magna Aenean sed adipiscing diam donec adipiscing tristique risus nec feugiat Diam vel quam elementum pulvinar etiam non Odio ut enim blandit volutpat maecenas volutpat Lacus vestibulum sed arcu non odio euismod lacinia at quis. Pretium nibh ipsum consequat nisl." + When we run "jrnl 2022-07-31 Magna fermentum iaculis eu non diam phasellus Non pulvinar neque laoreet suspendisse interdum consectetur libero id Scelerisque felis imperdiet proin fermentum leo Eu ultrices vitae auctor eu augue ut lectus Bibendum arcu vitae elementum curabitur vitae nunc sed Tincidunt tortor aliquam nulla facilisi cras fermentum Malesuada nunc vel risus commodo viverra maecenas accumsan lacus vel Non sodales neque sodales ut Enim nulla aliquet porttitor lacus luctus accumsan Volutpat blandit aliquam etiam erat velit scelerisque in dictum non Egestas fringilla phasellus faucibus scelerisque At risus viverra adipiscing at in tellus integer feugiat scelerisque Eget velit aliquet sagittis id consectetur purus ut Imperdiet nulla malesuada pellentesque elit eget gravida cum sociis Lacus vestibulum sed arcu non odio euismod lacinia at Elit pellentesque habitant morbi tristique Vestibulum lorem sed risus ultricies Integer eget aliquet nibh praesent tristique magna sit amet purus Quisque id diam vel quam elementum pulvinar etiam non quam Nisi scelerisque eu ultrices vitae auctor eu augue. Malesuada fames ac turpis egestas integer eget aliquet." + When we run "jrnl --format markdown --file {cache_dir}" + Then the cache directory should contain 5 files + And we should get no error + + Scenario: Export entries in text format with a title longer than max file name length. + Given we use the config "basic_onefile.yaml" + And we create a cache directory + When we run "jrnl 2022-07-31 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Laoreet id donec ultrices tincidunt arcu Dolor sit amet consectetur adipiscing elit duis tristique sollicitudin Ut pharetra sit amet aliquam id diam maecenas Habitasse platea dictumst quisque sagittis Aliquam purus sit amet luctus venenatis lectus magna Aenean sed adipiscing diam donec adipiscing tristique risus nec feugiat Diam vel quam elementum pulvinar etiam non Odio ut enim blandit volutpat maecenas volutpat Lacus vestibulum sed arcu non odio euismod lacinia at quis. Pretium nibh ipsum consequat nisl." + When we run "jrnl 2022-07-31 Magna fermentum iaculis eu non diam phasellus Non pulvinar neque laoreet suspendisse interdum consectetur libero id Scelerisque felis imperdiet proin fermentum leo Eu ultrices vitae auctor eu augue ut lectus Bibendum arcu vitae elementum curabitur vitae nunc sed Tincidunt tortor aliquam nulla facilisi cras fermentum Malesuada nunc vel risus commodo viverra maecenas accumsan lacus vel Non sodales neque sodales ut Enim nulla aliquet porttitor lacus luctus accumsan Volutpat blandit aliquam etiam erat velit scelerisque in dictum non Egestas fringilla phasellus faucibus scelerisque At risus viverra adipiscing at in tellus integer feugiat scelerisque Eget velit aliquet sagittis id consectetur purus ut Imperdiet nulla malesuada pellentesque elit eget gravida cum sociis Lacus vestibulum sed arcu non odio euismod lacinia at Elit pellentesque habitant morbi tristique Vestibulum lorem sed risus ultricies Integer eget aliquet nibh praesent tristique magna sit amet purus Quisque id diam vel quam elementum pulvinar etiam non quam Nisi scelerisque eu ultrices vitae auctor eu augue. Malesuada fames ac turpis egestas integer eget aliquet." + When we run "jrnl --format text --file {cache_dir}" + Then the cache directory should contain 5 files + And we should get no error diff --git a/tests/lib/helpers.py b/tests/lib/helpers.py index 39a24f71..e3a4d70d 100644 --- a/tests/lib/helpers.py +++ b/tests/lib/helpers.py @@ -17,6 +17,21 @@ def does_directory_contain_files(file_list, directory_path): return True +def does_directory_contain_n_files(directory_path, number): + count = 0 + if not os.path.isdir(directory_path): + return False + + files = [ + f + for f in os.listdir(directory_path) + if os.path.isfile(os.path.join(directory_path, f)) + ] + count = len(files) + + return int(number) == count + + def parse_should_or_should_not(should_or_should_not): if should_or_should_not == "should": return True diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 4efde7a5..51b145d1 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -13,6 +13,7 @@ from ruamel.yaml import YAML from jrnl.config import scope_config from tests.lib.helpers import assert_equal_tags_ignoring_order from tests.lib.helpers import does_directory_contain_files +from tests.lib.helpers import does_directory_contain_n_files from tests.lib.helpers import get_nested_val from tests.lib.helpers import parse_should_or_should_not @@ -201,6 +202,11 @@ def assert_dir_contains_files(file_list, cache_dir): assert does_directory_contain_files(file_list, cache_dir["path"]) +@then(parse("the cache directory should contain {number} files")) +def assert_dir_contains_n_files(cache_dir, number): + assert does_directory_contain_n_files(cache_dir["path"], number) + + @then(parse("the journal directory should contain\n{file_list}")) def journal_directory_should_contain(config_on_disk, file_list): scoped_config = scope_config(config_on_disk, "default") From 5387763169cb006d093990dc2a9bc6d4457370b7 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Aug 2022 20:04:09 +0000 Subject: [PATCH 0694/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 178ead4f..c49a334c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta...HEAD) +**Fixed bugs:** + +- Export to file\(s\) when first line/title of an entry is very long [\#1527](https://github.com/jrnl-org/jrnl/pull/1527) ([jonakeys](https://github.com/jonakeys)) + **Packaging:** - Bump pyproject-flake8 from 0.0.1a4 to 0.0.1a5 [\#1552](https://github.com/jrnl-org/jrnl/pull/1552) ([dependabot[bot]](https://github.com/apps/dependabot)) From 4b53d16ea0fd0cab900796692ba9988212f5002d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 13:48:38 -0700 Subject: [PATCH 0695/1132] Bump keyring from 23.7.0 to 23.8.2 (#1551) Bumps [keyring](https://github.com/jaraco/keyring) from 23.7.0 to 23.8.2. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v23.7.0...v23.8.2) --- updated-dependencies: - dependency-name: keyring dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 102 ++++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/poetry.lock b/poetry.lock index ef3d3582..2e922711 100644 --- a/poetry.lock +++ b/poetry.lock @@ -40,7 +40,7 @@ python-versions = "*" six = "*" [package.extras] -test = ["astroid", "pytest"] +test = ["pytest", "astroid"] [[package]] name = "atomicwrites" @@ -59,10 +59,10 @@ optional = false python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] [[package]] name = "backcall" @@ -89,10 +89,10 @@ tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] +jupyter = ["tokenize-rt (>=3.2.0)", "ipython (>=7.8.0)"] +d = ["aiohttp (>=3.7.4)"] +colorama = ["colorama (>=0.4.3)"] [[package]] name = "cffi" @@ -198,8 +198,8 @@ optional = false python-versions = ">=3.7" [package.extras] -docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] -testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] +testing = ["pytest-timeout (>=1.4.2)", "pytest-cov", "pytest (>=4)", "coverage (>=4)", "covdefaults (>=1.2.0)"] +docs = ["sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4.1)", "furo (>=2021.8.17b43)"] [[package]] name = "flake8" @@ -248,9 +248,9 @@ python-versions = ">=3.7" zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +testing = ["importlib-resources (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-black (>=0.3.7)", "pytest-perf (>=0.9.2)", "flufl.flake8", "pyfakefs", "packaging", "pytest-enabler (>=1.3)", "pytest-cov", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=6)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +docs = ["rst.linker (>=1.9)", "jaraco.packaging (>=9)", "sphinx"] [[package]] name = "iniconfig" @@ -296,17 +296,17 @@ stack-data = "*" traitlets = ">=5" [package.extras] -all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "trio"] -black = ["black"] -doc = ["Sphinx (>=1.3)"] -kernel = ["ipykernel"] -nbconvert = ["nbconvert"] -nbformat = ["nbformat"] -notebook = ["ipywidgets", "notebook"] -parallel = ["ipyparallel"] +test_extra = ["trio", "pandas", "numpy (>=1.19)", "nbformat", "matplotlib (!=3.2.0)", "curio", "testpath", "pytest-asyncio", "pytest (<7.1)"] +test = ["testpath", "pytest-asyncio", "pytest (<7.1)"] qtconsole = ["qtconsole"] -test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] -test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"] +parallel = ["ipyparallel"] +notebook = ["notebook", "ipywidgets"] +nbformat = ["nbformat"] +nbconvert = ["nbconvert"] +kernel = ["ipykernel"] +doc = ["Sphinx (>=1.3)"] +black = ["black"] +all = ["trio", "pandas", "numpy (>=1.19)", "matplotlib (!=3.2.0)", "curio", "testpath", "pytest-asyncio", "pytest (<7.1)", "qtconsole", "ipyparallel", "notebook", "ipywidgets", "nbformat", "nbconvert", "ipykernel", "Sphinx (>=1.3)", "black"] [[package]] name = "isort" @@ -317,10 +317,10 @@ optional = false python-versions = ">=3.6.1,<4.0" [package.extras] -pipfile_deprecated_finder = ["pipreqs", "requirementslib"] -requirements_deprecated_finder = ["pipreqs", "pip-api"] -colors = ["colorama (>=0.4.3,<0.5.0)"] plugins = ["setuptools"] +colors = ["colorama (>=0.4.3,<0.5.0)"] +requirements_deprecated_finder = ["pip-api", "pipreqs"] +pipfile_deprecated_finder = ["requirementslib", "pipreqs"] [[package]] name = "jedi" @@ -334,8 +334,8 @@ python-versions = ">=3.6" parso = ">=0.8.0,<0.9.0" [package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<7.0.0)"] +testing = ["pytest (<7.0.0)", "docopt", "colorama", "Django (<3.1)"] +qa = ["mypy (==0.782)", "flake8 (==3.8.3)"] [[package]] name = "jeepney" @@ -365,7 +365,7 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "23.7.0" +version = "23.8.2" description = "Store and access your passwords safely." category = "main" optional = false @@ -378,8 +378,8 @@ pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +testing = ["pytest-mypy (>=0.9.1)", "pytest-black (>=0.3.7)", "pytest-enabler (>=1.3)", "pytest-cov", "flake8 (<5)", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=6)"] +docs = ["jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "jaraco.packaging (>=9)", "sphinx"] [[package]] name = "mako" @@ -409,7 +409,7 @@ python-versions = ">=3.7" importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] -testing = ["coverage", "pyyaml"] +testing = ["pyyaml", "coverage"] [[package]] name = "markupsafe" @@ -529,8 +529,8 @@ optional = false python-versions = ">=3.6" [package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["docopt", "pytest (<6.0.0)"] +testing = ["pytest (<6.0.0)", "docopt"] +qa = ["mypy (==0.782)", "flake8 (==3.8.3)"] [[package]] name = "pastel" @@ -576,8 +576,8 @@ optional = false python-versions = ">=3.7" [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] -test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] +test = ["pytest (>=6)", "pytest-mock (>=3.6)", "pytest-cov (>=2.7)", "appdirs (==1.4.4)"] +docs = ["sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)", "proselint (>=0.10.2)", "furo (>=2021.7.5b38)"] [[package]] name = "pluggy" @@ -693,7 +693,7 @@ optional = false python-versions = ">=3.6.8" [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyproject-flake8" @@ -726,7 +726,7 @@ py = ">=1.8.2" tomli = ">=1.0.0" [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["xmlschema", "requests", "pygments (>=2.7.2)", "nose", "mock", "hypothesis (>=3.56)", "argcomplete"] [[package]] name = "pytest-bdd" @@ -783,9 +783,9 @@ pytest = ">=6.2.0" pytest-forked = "*" [package.extras] -psutil = ["psutil (>=3.0)"] -setproctitle = ["setproctitle"] testing = ["filelock"] +setproctitle = ["setproctitle"] +psutil = ["psutil (>=3.0)"] [[package]] name = "python-dateutil" @@ -961,8 +961,8 @@ toml = ">=0.9.4" virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" [package.extras] -docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] -testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "psutil (>=5.6.1)", "pathlib2 (>=2.3.3)"] +testing = ["pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest-randomly (>=1.0.0)", "pytest-mock (>=1.10.0)", "pytest-cov (>=2.5.1)", "pytest (>=4.0.0)", "freezegun (>=0.3.11)", "flaky (>=3.4.0)"] +docs = ["towncrier (>=18.5.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "sphinx (>=2.0.0)", "pygments-github-lexers (>=0.0.5)"] [[package]] name = "traitlets" @@ -973,7 +973,7 @@ optional = false python-versions = ">=3.7" [package.extras] -test = ["pre-commit", "pytest"] +test = ["pytest", "pre-commit"] [[package]] name = "typing-extensions" @@ -1004,8 +1004,8 @@ pytz-deprecation-shim = "*" tzdata = {version = "*", markers = "platform_system == \"Windows\""} [package.extras] -devenv = ["black", "pyroma", "pytest-cov", "zest.releaser"] -test = ["pytest-mock (>=3.3)", "pytest (>=4.3)"] +test = ["pytest (>=4.3)", "pytest-mock (>=3.3)"] +devenv = ["zest.releaser", "pytest-cov", "pyroma", "black"] [[package]] name = "virtualenv" @@ -1021,8 +1021,8 @@ filelock = ">=3.2,<4" platformdirs = ">=2,<3" [package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] [[package]] name = "watchdog" @@ -1066,7 +1066,7 @@ toml = ">=0.10.0" xmltodict = ">=0.11.0" [package.extras] -tests = ["coverage", "flake8", "wheel"] +tests = ["wheel", "flake8", "coverage"] [[package]] name = "zipp" @@ -1077,8 +1077,8 @@ optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +testing = ["pytest-mypy (>=0.9.1)", "pytest-black (>=0.3.7)", "func-timeout", "jaraco.itertools", "pytest-enabler (>=1.3)", "pytest-cov", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=6)"] +docs = ["jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "jaraco.packaging (>=9)", "sphinx"] [metadata] lock-version = "1.1" @@ -1303,8 +1303,8 @@ jinja2 = [ {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ - {file = "keyring-23.7.0-py3-none-any.whl", hash = "sha256:e67fc91a7955785fd2efcbccdd72d7dacf136dbc381d27de305b2b660b3de886"}, - {file = "keyring-23.7.0.tar.gz", hash = "sha256:782e1cd1132e91bf459fcd243bcf25b326015c1ac0b198e4408f91fa6791062b"}, + {file = "keyring-23.8.2-py3-none-any.whl", hash = "sha256:10d2a8639663fe2090705a00b8c47c687cacdf97598ea9c11456679fa974473a"}, + {file = "keyring-23.8.2.tar.gz", hash = "sha256:0d9973f8891850f1ade5f26aafd06bb16865fbbae3fc56b0defb6a14a2624003"}, ] mako = [ {file = "Mako-1.2.1-py3-none-any.whl", hash = "sha256:df3921c3081b013c8a2d5ff03c18375651684921ae83fd12e64800b7da923257"}, From a6756ebe0f43efcfe473b0e7f05d70e190ce3172 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Aug 2022 20:50:33 +0000 Subject: [PATCH 0696/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c49a334c..cabb4750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ **Packaging:** - Bump pyproject-flake8 from 0.0.1a4 to 0.0.1a5 [\#1552](https://github.com/jrnl-org/jrnl/pull/1552) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump keyring from 23.7.0 to 23.8.2 [\#1551](https://github.com/jrnl-org/jrnl/pull/1551) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v3.1-beta](https://pypi.org/project/jrnl/v3.1-beta/) (2022-07-30) From 6f4e669e0d3ed38d3a4d41ce22e346cc5f193a34 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Aug 2022 21:03:51 +0000 Subject: [PATCH 0697/1132] Increment version to v3.1-beta2 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index c4a343ad..bae5c2a2 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.1-beta" +__version__ = "v3.1-beta2" diff --git a/pyproject.toml b/pyproject.toml index fa40a1c3..5d57af1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.1-beta" +version = "v3.1-beta2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 33607acbb6c00c6475445ed87b31dfa2a960e107 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 13 Aug 2022 21:05:29 +0000 Subject: [PATCH 0698/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cabb4750..473706ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.1-beta2](https://pypi.org/project/jrnl/v3.1-beta2/) (2022-08-13) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta...v3.1-beta2) **Fixed bugs:** @@ -12,7 +12,6 @@ - Bump pyproject-flake8 from 0.0.1a4 to 0.0.1a5 [\#1552](https://github.com/jrnl-org/jrnl/pull/1552) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.7.0 to 23.8.2 [\#1551](https://github.com/jrnl-org/jrnl/pull/1551) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) ## [v3.1-beta](https://pypi.org/project/jrnl/v3.1-beta/) (2022-07-30) From 671f4036029617921825846b05eaa2457b80d8b9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 21 Aug 2022 13:47:25 -0700 Subject: [PATCH 0699/1132] Fix docs pipeline, make docs tests easier to run locally and on different OSes (#1554) * update docs pipeline to use poe task runner * move npm dependency into package.json file instead of hardcoding into pipeline * replace nix-specific call with python version (for windows compat) * update commands to use python for win compat * update lock file * change deps to take out xq and use xmltodict instead * move script tasks from pyproject into new tasks.py * run linting on new tasks.py file * fix typo * clean up pyproject to make valid toml * update docs with correct task runner command * use npx in case node_modules/.bin isn't in the path * Run pa11y-ci in cross-platform manner (works on Windows) * Add node_modules to .gitignore * clean up poe alias Co-authored-by: Micah Jerome Ellison --- .github/workflows/docs.yaml | 21 +- .gitignore | 1 + docs/contributing.md | 2 +- package-lock.json | 2173 +++++++++++++++++++++++++++++++++++ package.json | 5 + poetry.lock | 419 +++---- pyproject.toml | 20 +- tasks.py | 56 + 8 files changed, 2397 insertions(+), 300 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 tasks.py diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 395ba66f..12fda5e2 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -62,26 +62,11 @@ jobs: pip install poetry poetry config --local virtualenvs.in-project true poetry install --no-root --remove-untracked - npm install pa11y-ci + npm install echo "node_modules/.bin" >> $GITHUB_PATH - name: Start docs server - run: poetry run poe docs & - - - name: Generate sitemap - env: - site_url: http://127.0.0.1:8000 - run: | - filename='sitemap.xml' - select="{urls: [\"${site_url}/\", \"${site_url}/search.html?q=jrnl\", .urlset.url[].loc]}" - - curl -s "${site_url}/${filename}" > $filename - - echo "::group::${filename}" - cat $filename - echo '::endgroup::' - - poetry run xq "$select" $filename > list.json + run: poetry run poe docs-run & - name: Accessibility testing (Pa11y) - run: pa11y-ci -c list.json + run: poetry run poe docs-check diff --git a/.gitignore b/.gitignore index 48cbcddc..186ef3ac 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ parts/ sdist/ .tox/ var/ +node_modules/ # Versioning .python-version diff --git a/docs/contributing.md b/docs/contributing.md index 650d0cda..2005106f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -27,7 +27,7 @@ Please report bugs by [opening a new issue](https://github.com/jrnl-org/jrnl/iss If you find a typo or a mistake in the docs, please fix it right away and send a pull request. If you're unsure what to change but still see a problem, you can [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) with the "Documentation change" type. -To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `poe docs` inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). +To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `poe docs-run` inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..8459ebe7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2173 @@ +{ + "name": "jrnl", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "pa11y-ci": ">=3.0.1" + } + }, + "node_modules/@types/node": { + "version": "18.7.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.3.tgz", + "integrity": "sha512-LJgzOEwWuMTBxHzgBR/fhhBOWrvBjvO+zPteUgbbuQi80rYIZHrk1mNbRUqPZqSLP2H7Rwt1EFLL/tNLD1Xx/w==", + "dev": true, + "optional": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "dev": true, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/axe-core": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz", + "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bfj": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.0.2.tgz", + "integrity": "sha512-+e/UqUzwmzJamNF50tBV6tZPTORow7gQ96iFow+8b562OdMpEK0BcJEq2OSPEDmAbSMBQ7PKZ87ubFkgxpYWgw==", + "dev": true, + "dependencies": { + "bluebird": "^3.5.5", + "check-types": "^11.1.1", + "hoopy": "^0.1.4", + "tryer": "^1.0.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/check-types": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz", + "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==", + "dev": true + }, + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.869402", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.869402.tgz", + "integrity": "sha512-VvlVYY+VDJe639yHs5PHISzdWTLL3Aw8rO4cvUtwvoxFd6FHbE4OpHHcde52M6096uYYazAmd4l0o5VuFRO2WA==", + "dev": true + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/file-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", + "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", + "dev": true, + "dependencies": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/hogan.js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", + "integrity": "sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==", + "dev": true, + "dependencies": { + "mkdirp": "0.3.0", + "nopt": "1.0.10" + }, + "bin": { + "hulk": "bin/hulk" + } + }, + "node_modules/hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/html_codesniffer": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/html_codesniffer/-/html_codesniffer-2.5.1.tgz", + "integrity": "sha512-vcz0yAaX/OaV6sdNHuT9alBOKkSxYb8h5Yq26dUqgi7XmCgGUSa7U9PiY1PBXQFMjKv1wVPs5/QzHlGuxPDUGg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/htmlparser2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", + "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node.extend": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz", + "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3", + "is": "^3.2.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-timeout": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz", + "integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pa11y": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pa11y/-/pa11y-6.1.1.tgz", + "integrity": "sha512-2NzqA3D9CUlDWj8WuOI4fM2P0qM1d/IUxsRRpzCOfDT5eMR1oEgmUwW2TAk+f90ff/GVck0BewdYT4et4BANew==", + "dev": true, + "dependencies": { + "axe-core": "^4.0.2", + "bfj": "~7.0.2", + "commander": "~8.0.0", + "envinfo": "~7.8.1", + "hogan.js": "^3.0.2", + "html_codesniffer": "^2.5.1", + "kleur": "~4.1.4", + "node.extend": "~2.0.2", + "p-timeout": "~4.1.0", + "puppeteer": "~9.1.1", + "semver": "~7.3.5" + }, + "bin": { + "pa11y": "bin/pa11y.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/pa11y-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pa11y-ci/-/pa11y-ci-3.0.1.tgz", + "integrity": "sha512-DUtEIhEG3Ofds7qRuplq0DdCb9doILRlzcRctFNzo4QUNmVy4iZfM3u51A9cqoPo2irCJZoo5BzfiFrcriY2IQ==", + "dev": true, + "dependencies": { + "async": "~2.6.3", + "cheerio": "~1.0.0-rc.10", + "commander": "~6.2.1", + "globby": "~6.1.0", + "kleur": "~4.1.4", + "lodash": "~4.17.21", + "node-fetch": "~2.6.1", + "pa11y": "~6.1.0", + "protocolify": "~3.0.0", + "puppeteer": "~9.1.1", + "wordwrap": "~1.0.0" + }, + "bin": { + "pa11y-ci": "bin/pa11y-ci.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/pa11y/node_modules/commander": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.0.0.tgz", + "integrity": "sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/parse5": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dev": true, + "dependencies": { + "entities": "^4.3.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prepend-http": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-3.0.1.tgz", + "integrity": "sha512-BLxfZh+m6UiAiCPZFJ4+vYoL7NrRs5XgCTRrjseATAggXhdZKKxn+JUNmuVYWY23bDHgaEHodxw8mnmtVEDtHw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/protocolify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/protocolify/-/protocolify-3.0.0.tgz", + "integrity": "sha512-PuvDJOkKJMVQx8jSNf8E5g0bJw/UTKm30mTjFHg4N30c8sefgA5Qr/f8INKqYBKfvP/MUSJrj+z1Smjbq4/3rQ==", + "dev": true, + "dependencies": { + "file-url": "^3.0.0", + "prepend-http": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-9.1.1.tgz", + "integrity": "sha512-W+nOulP2tYd/ZG99WuZC/I5ljjQQ7EUw/jQGcIb9eu8mDlZxNY2SgcJXTLG9h5gRvqA3uJOe4hZXYsd3EqioMw==", + "deprecated": "Version no longer supported. Upgrade to @latest", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "debug": "^4.1.0", + "devtools-protocol": "0.0.869402", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "pkg-dir": "^4.2.0", + "progress": "^2.0.1", + "proxy-from-env": "^1.1.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + }, + "dependencies": { + "@types/node": { + "version": "18.7.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.3.tgz", + "integrity": "sha512-LJgzOEwWuMTBxHzgBR/fhhBOWrvBjvO+zPteUgbbuQi80rYIZHrk1mNbRUqPZqSLP2H7Rwt1EFLL/tNLD1Xx/w==", + "dev": true, + "optional": true + }, + "@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true + }, + "async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "axe-core": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz", + "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bfj": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.0.2.tgz", + "integrity": "sha512-+e/UqUzwmzJamNF50tBV6tZPTORow7gQ96iFow+8b562OdMpEK0BcJEq2OSPEDmAbSMBQ7PKZ87ubFkgxpYWgw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "check-types": "^11.1.1", + "hoopy": "^0.1.4", + "tryer": "^1.0.1" + } + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true + }, + "check-types": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz", + "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==", + "dev": true + }, + "cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, + "requires": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + } + }, + "cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "devtools-protocol": { + "version": "0.0.869402", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.869402.tgz", + "integrity": "sha512-VvlVYY+VDJe639yHs5PHISzdWTLL3Aw8rO4cvUtwvoxFd6FHbE4OpHHcde52M6096uYYazAmd4l0o5VuFRO2WA==", + "dev": true + }, + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true + }, + "domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0" + } + }, + "domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, + "requires": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "file-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", + "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "hogan.js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", + "integrity": "sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==", + "dev": true, + "requires": { + "mkdirp": "0.3.0", + "nopt": "1.0.10" + } + }, + "hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true + }, + "html_codesniffer": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/html_codesniffer/-/html_codesniffer-2.5.1.tgz", + "integrity": "sha512-vcz0yAaX/OaV6sdNHuT9alBOKkSxYb8h5Yq26dUqgi7XmCgGUSa7U9PiY1PBXQFMjKv1wVPs5/QzHlGuxPDUGg==", + "dev": true + }, + "htmlparser2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", + "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", + "dev": true + }, + "kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==", + "dev": true + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node.extend": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz", + "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==", + "dev": true, + "requires": { + "has": "^1.0.3", + "is": "^3.2.1" + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-timeout": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz", + "integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==", + "dev": true + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pa11y": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pa11y/-/pa11y-6.1.1.tgz", + "integrity": "sha512-2NzqA3D9CUlDWj8WuOI4fM2P0qM1d/IUxsRRpzCOfDT5eMR1oEgmUwW2TAk+f90ff/GVck0BewdYT4et4BANew==", + "dev": true, + "requires": { + "axe-core": "^4.0.2", + "bfj": "~7.0.2", + "commander": "~8.0.0", + "envinfo": "~7.8.1", + "hogan.js": "^3.0.2", + "html_codesniffer": "^2.5.1", + "kleur": "~4.1.4", + "node.extend": "~2.0.2", + "p-timeout": "~4.1.0", + "puppeteer": "~9.1.1", + "semver": "~7.3.5" + }, + "dependencies": { + "commander": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.0.0.tgz", + "integrity": "sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ==", + "dev": true + } + } + }, + "pa11y-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pa11y-ci/-/pa11y-ci-3.0.1.tgz", + "integrity": "sha512-DUtEIhEG3Ofds7qRuplq0DdCb9doILRlzcRctFNzo4QUNmVy4iZfM3u51A9cqoPo2irCJZoo5BzfiFrcriY2IQ==", + "dev": true, + "requires": { + "async": "~2.6.3", + "cheerio": "~1.0.0-rc.10", + "commander": "~6.2.1", + "globby": "~6.1.0", + "kleur": "~4.1.4", + "lodash": "~4.17.21", + "node-fetch": "~2.6.1", + "pa11y": "~6.1.0", + "protocolify": "~3.0.0", + "puppeteer": "~9.1.1", + "wordwrap": "~1.0.0" + } + }, + "parse5": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dev": true, + "requires": { + "entities": "^4.3.0" + } + }, + "parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, + "requires": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "prepend-http": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-3.0.1.tgz", + "integrity": "sha512-BLxfZh+m6UiAiCPZFJ4+vYoL7NrRs5XgCTRrjseATAggXhdZKKxn+JUNmuVYWY23bDHgaEHodxw8mnmtVEDtHw==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "protocolify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/protocolify/-/protocolify-3.0.0.tgz", + "integrity": "sha512-PuvDJOkKJMVQx8jSNf8E5g0bJw/UTKm30mTjFHg4N30c8sefgA5Qr/f8INKqYBKfvP/MUSJrj+z1Smjbq4/3rQ==", + "dev": true, + "requires": { + "file-url": "^3.0.0", + "prepend-http": "^3.0.0" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "puppeteer": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-9.1.1.tgz", + "integrity": "sha512-W+nOulP2tYd/ZG99WuZC/I5ljjQQ7EUw/jQGcIb9eu8mDlZxNY2SgcJXTLG9h5gRvqA3uJOe4hZXYsd3EqioMw==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "devtools-protocol": "0.0.869402", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "pkg-dir": "^4.2.0", + "progress": "^2.0.1", + "proxy-from-env": "^1.1.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "requires": {} + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..28cf4eeb --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "pa11y-ci": ">=3.0.1" + } +} diff --git a/poetry.lock b/poetry.lock index 2e922711..d3f37b94 100644 --- a/poetry.lock +++ b/poetry.lock @@ -17,17 +17,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "argcomplete" -version = "2.0.0" -description = "Bash tab completion for argparse" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -test = ["wheel", "pexpect", "flake8", "coverage"] - [[package]] name = "asttokens" version = "2.0.5" @@ -40,7 +29,7 @@ python-versions = "*" six = "*" [package.extras] -test = ["pytest", "astroid"] +test = ["astroid", "pytest"] [[package]] name = "atomicwrites" @@ -59,10 +48,10 @@ optional = false python-versions = ">=3.5" [package.extras] -tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] -tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] -docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] -dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "backcall" @@ -89,10 +78,18 @@ tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] -uvloop = ["uvloop (>=0.15.2)"] -jupyter = ["tokenize-rt (>=3.2.0)", "ipython (>=7.8.0)"] -d = ["aiohttp (>=3.7.4)"] colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.7.4)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +uvloop = ["uvloop (>=0.15.2)"] + +[[package]] +name = "certifi" +version = "2022.6.15" +description = "Python package for providing Mozilla's CA Bundle." +category = "dev" +optional = false +python-versions = ">=3.6" [[package]] name = "cffi" @@ -105,6 +102,17 @@ python-versions = "*" [package.dependencies] pycparser = "*" +[[package]] +name = "charset-normalizer" +version = "2.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "dev" +optional = false +python-versions = ">=3.6.0" + +[package.extras] +unicode_backport = ["unicodedata2"] + [[package]] name = "click" version = "8.1.3" @@ -133,7 +141,7 @@ optional = false python-versions = "*" [package.extras] -test = ["hypothesis (==3.55.3)", "flake8 (==3.7.8)"] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "cryptography" @@ -198,8 +206,8 @@ optional = false python-versions = ">=3.7" [package.extras] -testing = ["pytest-timeout (>=1.4.2)", "pytest-cov", "pytest (>=4)", "coverage (>=4)", "covdefaults (>=1.2.0)"] -docs = ["sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4.1)", "furo (>=2021.8.17b43)"] +docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] +testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] [[package]] name = "flake8" @@ -226,7 +234,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["wheel", "flake8", "markdown", "twine"] +dev = ["twine", "markdown", "flake8", "wheel"] [[package]] name = "glob2" @@ -236,6 +244,14 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "idna" +version = "3.3" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "dev" +optional = false +python-versions = ">=3.5" + [[package]] name = "importlib-metadata" version = "4.12.0" @@ -248,9 +264,9 @@ python-versions = ">=3.7" zipp = ">=0.5" [package.extras] -testing = ["importlib-resources (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-black (>=0.3.7)", "pytest-perf (>=0.9.2)", "flufl.flake8", "pyfakefs", "packaging", "pytest-enabler (>=1.3)", "pytest-cov", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=6)"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] perf = ["ipython"] -docs = ["rst.linker (>=1.9)", "jaraco.packaging (>=9)", "sphinx"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -296,17 +312,17 @@ stack-data = "*" traitlets = ">=5" [package.extras] -test_extra = ["trio", "pandas", "numpy (>=1.19)", "nbformat", "matplotlib (!=3.2.0)", "curio", "testpath", "pytest-asyncio", "pytest (<7.1)"] -test = ["testpath", "pytest-asyncio", "pytest (<7.1)"] -qtconsole = ["qtconsole"] -parallel = ["ipyparallel"] -notebook = ["notebook", "ipywidgets"] -nbformat = ["nbformat"] -nbconvert = ["nbconvert"] -kernel = ["ipykernel"] -doc = ["Sphinx (>=1.3)"] +all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "trio"] black = ["black"] -all = ["trio", "pandas", "numpy (>=1.19)", "matplotlib (!=3.2.0)", "curio", "testpath", "pytest-asyncio", "pytest (<7.1)", "qtconsole", "ipyparallel", "notebook", "ipywidgets", "nbformat", "nbconvert", "ipykernel", "Sphinx (>=1.3)", "black"] +doc = ["Sphinx (>=1.3)"] +kernel = ["ipykernel"] +nbconvert = ["nbconvert"] +nbformat = ["nbformat"] +notebook = ["ipywidgets", "notebook"] +parallel = ["ipyparallel"] +qtconsole = ["qtconsole"] +test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] +test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"] [[package]] name = "isort" @@ -317,10 +333,10 @@ optional = false python-versions = ">=3.6.1,<4.0" [package.extras] -plugins = ["setuptools"] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] colors = ["colorama (>=0.4.3,<0.5.0)"] -requirements_deprecated_finder = ["pip-api", "pipreqs"] -pipfile_deprecated_finder = ["requirementslib", "pipreqs"] +plugins = ["setuptools"] [[package]] name = "jedi" @@ -334,8 +350,8 @@ python-versions = ">=3.6" parso = ">=0.8.0,<0.9.0" [package.extras] -testing = ["pytest (<7.0.0)", "docopt", "colorama", "Django (<3.1)"] -qa = ["mypy (==0.782)", "flake8 (==3.8.3)"] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] name = "jeepney" @@ -346,8 +362,8 @@ optional = false python-versions = ">=3.7" [package.extras] -trio = ["async-generator", "trio"] -test = ["async-timeout", "trio", "testpath", "pytest-asyncio (>=0.17)", "pytest-trio", "pytest"] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] [[package]] name = "jinja2" @@ -409,7 +425,7 @@ python-versions = ">=3.7" importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] -testing = ["pyyaml", "coverage"] +testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" @@ -509,8 +525,8 @@ parse = {version = ">=1.18.0", markers = "python_version >= \"3.0\""} six = ">=1.11" [package.extras] +develop = ["coverage (>=4.4)", "pytest-html (>=1.19.0)", "pytest-cov", "tox (>=2.8)", "pytest (<5.0)", "pytest (>=5.0)"] docs = ["sphinx (>=1.2)"] -develop = ["pytest (>=5.0)", "pytest (<5.0)", "tox (>=2.8)", "pytest-cov", "pytest-html (>=1.19.0)", "coverage (>=4.4)"] [[package]] name = "parsedatetime" @@ -529,8 +545,8 @@ optional = false python-versions = ">=3.6" [package.extras] -testing = ["pytest (<6.0.0)", "docopt"] -qa = ["mypy (==0.782)", "flake8 (==3.8.3)"] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["docopt", "pytest (<6.0.0)"] [[package]] name = "pastel" @@ -576,8 +592,8 @@ optional = false python-versions = ">=3.7" [package.extras] -test = ["pytest (>=6)", "pytest-mock (>=3.6)", "pytest-cov (>=2.7)", "appdirs (==1.4.4)"] -docs = ["sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)", "proselint (>=0.10.2)", "furo (>=2021.7.5b38)"] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] [[package]] name = "pluggy" @@ -588,8 +604,8 @@ optional = false python-versions = ">=3.6" [package.extras] -testing = ["pytest-benchmark", "pytest"] -dev = ["tox", "pre-commit"] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" @@ -693,7 +709,7 @@ optional = false python-versions = ">=3.6.8" [package.extras] -diagrams = ["jinja2", "railroad-diagrams"] +diagrams = ["railroad-diagrams", "jinja2"] [[package]] name = "pyproject-flake8" @@ -726,7 +742,7 @@ py = ">=1.8.2" tomli = ">=1.0.0" [package.extras] -testing = ["xmlschema", "requests", "pygments (>=2.7.2)", "nose", "mock", "hypothesis (>=3.56)", "argcomplete"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-bdd" @@ -783,9 +799,9 @@ pytest = ">=6.2.0" pytest-forked = "*" [package.extras] -testing = ["filelock"] -setproctitle = ["setproctitle"] psutil = ["psutil (>=3.0)"] +setproctitle = ["setproctitle"] +testing = ["filelock"] [[package]] name = "python-dateutil" @@ -844,6 +860,24 @@ python-versions = ">=3.6" [package.dependencies] pyyaml = "*" +[[package]] +name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "dev" +optional = false +python-versions = ">=3.7, <4" + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] + [[package]] name = "rich" version = "12.5.1" @@ -916,7 +950,7 @@ executing = "*" pure-eval = "*" [package.extras] -tests = ["cython", "littleutils", "pygments", "typeguard", "pytest"] +tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] [[package]] name = "textwrap3" @@ -961,8 +995,8 @@ toml = ">=0.9.4" virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" [package.extras] -testing = ["pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest-randomly (>=1.0.0)", "pytest-mock (>=1.10.0)", "pytest-cov (>=2.5.1)", "pytest (>=4.0.0)", "freezegun (>=0.3.11)", "flaky (>=3.4.0)"] -docs = ["towncrier (>=18.5.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "sphinx (>=2.0.0)", "pygments-github-lexers (>=0.0.5)"] +docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] +testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "psutil (>=5.6.1)", "pathlib2 (>=2.3.3)"] [[package]] name = "traitlets" @@ -973,7 +1007,7 @@ optional = false python-versions = ">=3.7" [package.extras] -test = ["pytest", "pre-commit"] +test = ["pre-commit", "pytest"] [[package]] name = "typing-extensions" @@ -1004,8 +1038,21 @@ pytz-deprecation-shim = "*" tzdata = {version = "*", markers = "platform_system == \"Windows\""} [package.extras] -test = ["pytest (>=4.3)", "pytest-mock (>=3.3)"] -devenv = ["zest.releaser", "pytest-cov", "pyroma", "black"] +devenv = ["black", "pyroma", "pytest-cov", "zest.releaser"] +test = ["pytest-mock (>=3.3)", "pytest (>=4.3)"] + +[[package]] +name = "urllib3" +version = "1.26.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +secure = ["ipaddress", "certifi", "idna (>=2.0.0)", "cryptography (>=1.3.4)", "pyOpenSSL (>=0.14)"] +brotli = ["brotlipy (>=0.6.0)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] [[package]] name = "virtualenv" @@ -1021,8 +1068,8 @@ filelock = ">=3.2,<4" platformdirs = ">=2,<3" [package.extras] -testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] -docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] +docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] [[package]] name = "watchdog" @@ -1047,27 +1094,10 @@ python-versions = "*" name = "xmltodict" version = "0.13.0" description = "Makes working with XML feel like you are working with JSON" -category = "dev" +category = "main" optional = false python-versions = ">=3.4" -[[package]] -name = "yq" -version = "3.1.0" -description = "Command-line YAML/XML processor - jq wrapper for YAML/XML documents" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -argcomplete = ">=1.8.1" -PyYAML = ">=5.3.1" -toml = ">=0.10.0" -xmltodict = ">=0.11.0" - -[package.extras] -tests = ["wheel", "flake8", "coverage"] - [[package]] name = "zipp" version = "3.8.1" @@ -1077,13 +1107,13 @@ optional = false python-versions = ">=3.7" [package.extras] -testing = ["pytest-mypy (>=0.9.1)", "pytest-black (>=0.3.7)", "func-timeout", "jaraco.itertools", "pytest-enabler (>=1.3)", "pytest-cov", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=6)"] -docs = ["jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "jaraco.packaging (>=9)", "sphinx"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "5f5954af39ca238b840a95e932999bcb1ead3b8d403d0d18e0a89806ddcc59f9" +content-hash = "256d370a30f2452fa169b9bad5eea686360556c7aba9a80b9ada70345d69f404" [metadata.files] ansiwrap = [ @@ -1094,116 +1124,20 @@ appnope = [ {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, ] -argcomplete = [ - {file = "argcomplete-2.0.0-py2.py3-none-any.whl", hash = "sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e"}, - {file = "argcomplete-2.0.0.tar.gz", hash = "sha256:6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20"}, -] asttokens = [ {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, ] -atomicwrites = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] -attrs = [ - {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, - {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, -] +atomicwrites = [] +attrs = [] backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [ - {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, - {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, - {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, - {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, - {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, - {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, - {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, - {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, - {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, - {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, - {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, - {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, - {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, - {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, - {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, - {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, - {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, - {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, - {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, - {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, - {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, - {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, - {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, -] -cffi = [ - {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, - {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, - {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, - {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, - {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, - {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, - {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, - {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, - {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, - {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, - {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, - {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, - {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, - {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, - {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, - {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, - {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, - {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, - {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, -] +black = [] +certifi = [] +cffi = [] +charset-normalizer = [] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -1216,46 +1150,17 @@ commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] -cryptography = [ - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, - {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, - {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, - {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, -] +cryptography = [] decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] -distlib = [ - {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, - {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, -] +distlib = [] execnet = [ {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, ] -executing = [ - {file = "executing-0.9.1-py2.py3-none-any.whl", hash = "sha256:4ce4d6082d99361c0231fc31ac1a0f56979363cc6819de0b1410784f99e49105"}, - {file = "executing-0.9.1.tar.gz", hash = "sha256:ea278e2cf90cbbacd24f1080dd1f0ac25b71b2e21f50ab439b7ba45dd3195587"}, -] +executing = [] filelock = [ {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, @@ -1271,6 +1176,10 @@ ghp-import = [ glob2 = [ {file = "glob2-0.7.tar.gz", hash = "sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c"}, ] +idna = [ + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, +] importlib-metadata = [ {file = "importlib_metadata-4.12.0-py3-none-any.whl", hash = "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"}, {file = "importlib_metadata-4.12.0.tar.gz", hash = "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670"}, @@ -1302,18 +1211,9 @@ jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] -keyring = [ - {file = "keyring-23.8.2-py3-none-any.whl", hash = "sha256:10d2a8639663fe2090705a00b8c47c687cacdf97598ea9c11456679fa974473a"}, - {file = "keyring-23.8.2.tar.gz", hash = "sha256:0d9973f8891850f1ade5f26aafd06bb16865fbbae3fc56b0defb6a14a2624003"}, -] -mako = [ - {file = "Mako-1.2.1-py3-none-any.whl", hash = "sha256:df3921c3081b013c8a2d5ff03c18375651684921ae83fd12e64800b7da923257"}, - {file = "Mako-1.2.1.tar.gz", hash = "sha256:f054a5ff4743492f1aa9ecc47172cb33b42b9d993cffcc146c9de17e717b0307"}, -] -markdown = [ - {file = "Markdown-3.4.1-py3-none-any.whl", hash = "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186"}, - {file = "Markdown-3.4.1.tar.gz", hash = "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff"}, -] +keyring = [] +mako = [] +markdown = [] markupsafe = [ {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, @@ -1419,18 +1319,12 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -poethepoet = [ - {file = "poethepoet-0.16.0-py3-none-any.whl", hash = "sha256:87482ea8bba4e5db4abbd8e6360baee73b2ce0f3d5f5e99e81cdfa39d72d118f"}, - {file = "poethepoet-0.16.0.tar.gz", hash = "sha256:6455aec39f198be92dbf210a4416e1635119e967204c092b431c8b10024db1d1"}, -] +poethepoet = [] pprintpp = [ {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] -prompt-toolkit = [ - {file = "prompt_toolkit-3.0.30-py3-none-any.whl", hash = "sha256:d8916d3f62a7b67ab353a952ce4ced6a1d2587dfe9ef8ebc30dd7c386751f289"}, - {file = "prompt_toolkit-3.0.30.tar.gz", hash = "sha256:859b283c50bde45f5f97829f77a4674d1c1fcd88539364f1b28a37805cfd89c0"}, -] +prompt-toolkit = [] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -1463,10 +1357,7 @@ pyparsing = [ {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] -pyproject-flake8 = [ - {file = "pyproject-flake8-0.0.1a5.tar.gz", hash = "sha256:22542080ba90d4bd80ee060852db15a24aeea61c9a29ed7c16f5b59b0e47a03a"}, - {file = "pyproject_flake8-0.0.1a5-py2.py3-none-any.whl", hash = "sha256:c843d760c49d7b270e9abda58a57765c031918a9d10da25aa43572f5d77cac43"}, -] +pyproject-flake8 = [] pytest = [ {file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"}, {file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"}, @@ -1490,10 +1381,7 @@ python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] -pytz-deprecation-shim = [ - {file = "pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl", hash = "sha256:8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6"}, - {file = "pytz_deprecation_shim-0.1.0.post0.tar.gz", hash = "sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d"}, -] +pytz-deprecation-shim = [] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, @@ -1541,10 +1429,8 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] -rich = [ - {file = "rich-12.5.1-py3-none-any.whl", hash = "sha256:2eb4e6894cde1e017976d2975ac210ef515d7548bc595ba20e195fb9628acdeb"}, - {file = "rich-12.5.1.tar.gz", hash = "sha256:63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca"}, -] +requests = [] +rich = [] "ruamel.yaml" = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, {file = "ruamel.yaml-0.17.21.tar.gz", hash = "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af"}, @@ -1600,30 +1486,16 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -tox = [ - {file = "tox-3.25.1-py2.py3-none-any.whl", hash = "sha256:c38e15f4733683a9cc0129fba078633e07eb0961f550a010ada879e95fb32632"}, - {file = "tox-3.25.1.tar.gz", hash = "sha256:c138327815f53bc6da4fe56baec5f25f00622ae69ef3fe4e1e385720e22486f9"}, -] +tox = [] traitlets = [ {file = "traitlets-5.3.0-py3-none-any.whl", hash = "sha256:65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a"}, {file = "traitlets-5.3.0.tar.gz", hash = "sha256:0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2"}, ] -typing-extensions = [ - {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, - {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, -] -tzdata = [ - {file = "tzdata-2022.1-py2.py3-none-any.whl", hash = "sha256:238e70234214138ed7b4e8a0fab0e5e13872edab3be586ab8198c407620e2ab9"}, - {file = "tzdata-2022.1.tar.gz", hash = "sha256:8b536a8ec63dc0751342b3984193a3118f8fca2afe25752bb9b7fffd398552d3"}, -] -tzlocal = [ - {file = "tzlocal-4.2-py3-none-any.whl", hash = "sha256:89885494684c929d9191c57aa27502afc87a579be5cdd3225c77c463ea043745"}, - {file = "tzlocal-4.2.tar.gz", hash = "sha256:ee5842fa3a795f023514ac2d801c4a81d1743bbe642e3940143326b3a00addd7"}, -] -virtualenv = [ - {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, - {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, -] +typing-extensions = [] +tzdata = [] +tzlocal = [] +urllib3 = [] +virtualenv = [] watchdog = [ {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, @@ -1659,11 +1531,4 @@ xmltodict = [ {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, ] -yq = [ - {file = "yq-3.1.0-py3-none-any.whl", hash = "sha256:a1acffd3257a0b8e460f1a7ec1ae5af4646944e810f7d7099084b3104aa05769"}, - {file = "yq-3.1.0.tar.gz", hash = "sha256:30a84aa22486c749ba269256bd586c0bcd370b7e2a71e76c3924ead4867e74f2"}, -] -zipp = [ - {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, - {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, -] +zipp = [] diff --git a/pyproject.toml b/pyproject.toml index 5d57af1e..2e10ae1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,9 +53,10 @@ pytest = ">=6.2" pytest-bdd = ">=4.0.1,<6.0" pytest-clarity = "*" pytest-xdist = ">=2.5.0" +requests = "*" toml = ">=0.10" tox = "*" -yq = "*" +xmltodict = "*" [tool.poetry.scripts] jrnl = 'jrnl.cli:cli' @@ -70,7 +71,7 @@ format-check = [ ] style-check = [ {cmd = "pflake8 --version"}, - {cmd = "pflake8 jrnl tests"}, + {cmd = "pflake8 jrnl tests tasks.py"}, ] sort-run = [ {cmd = "isort ."}, @@ -79,11 +80,22 @@ sort-check = [ {cmd = "isort --version"}, {cmd = "isort --check ."}, ] -# docs-check = ? + +docs-check.default_item_type = "script" +docs-check.sequence = [ + "tasks:delete_files(['sitemap.xml', 'config.json'])", + "tasks:generate_sitemap", + "tasks:output_file('sitemap.xml')", + "tasks:generate_pa11y_config_from_sitemap", + "tasks:output_file('config.json')", + "tasks:run_shell('npx pa11y-ci -c config.json')", + "tasks:delete_files(['sitemap.xml', 'config.json'])", +] docs-run = [ {cmd = "mkdocs serve"}, ] -test-run =[ + +test-run = [ {cmd = "tox -q -e py --"}, ] diff --git a/tasks.py b/tasks.py new file mode 100644 index 00000000..0fd966bd --- /dev/null +++ b/tasks.py @@ -0,0 +1,56 @@ +# Copyright © 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +import json +import os +import pathlib +import subprocess + +import requests +import xmltodict + +DOCS_URL = "http://127.0.0.1:8000" +SITEMAP_FILENAME = "sitemap.xml" +CONFIG_FILENAME = "config.json" + + +def delete_files(files): + for file in files: + pathlib.Path(file).unlink(missing_ok=True) + + +def run_shell(command): + # Required to run NPM commands in Windows and *nix + subprocess.call(command, shell=True) + + +def generate_sitemap(): + sitemap = requests.get(f"{DOCS_URL}/{SITEMAP_FILENAME}") + with open(SITEMAP_FILENAME, "wb") as f: + f.write(sitemap.content) + + +def generate_pa11y_config_from_sitemap(): + with open(SITEMAP_FILENAME) as f: + xml_sitemap = xmltodict.parse(f.read()) + + urls = [ + f"{DOCS_URL}/", + f"{DOCS_URL}/search.html?q=jrnl", + ] + urls += [url["loc"] for url in xml_sitemap["urlset"]["url"]] + + with open(CONFIG_FILENAME, "w") as f: + f.write(json.dumps({"urls": urls})) + + +def output_file(file): + if not os.getenv("CI", False): + return + + print(f"::group::{file}") + + with open(file) as f: + print(f.read()) + + print("::endgroup::") From fd981216da442c0e09b063908219f53e181ba3d3 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 21 Aug 2022 20:49:49 +0000 Subject: [PATCH 0700/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 473706ea..088728a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta2...HEAD) + +**Build:** + +- Fix docs pipeline, make docs tests easier to run locally and on different OSes [\#1554](https://github.com/jrnl-org/jrnl/pull/1554) ([wren](https://github.com/wren)) + ## [v3.1-beta2](https://pypi.org/project/jrnl/v3.1-beta2/) (2022-08-13) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta...v3.1-beta2) From 803b3956fa288c65015075e8fddd414f3a14f2db Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 21 Aug 2022 13:59:45 -0700 Subject: [PATCH 0701/1132] Add actionlint to testing pipelines (#1555) * add actionlint for github actions to testing suite * add quotes around vars per shellcheck * change expression per shellcheck * put more quotes around vars per shellcheck * put quotes around entire string * use find instead of ls to better handle non-alphanumberic filenames * update release workflow input types to have actual typese and fix typo --- .github/actionlint-matcher.json | 17 ++++++++++++ .github/workflows/changelog.yaml | 22 +++++++++------- .github/workflows/docs.yaml | 4 +-- .github/workflows/release.yaml | 24 ++++++++++------- .github/workflows/testing_pipelines.yaml | 33 ++++++++++++++++++++++++ 5 files changed, 78 insertions(+), 22 deletions(-) create mode 100644 .github/actionlint-matcher.json create mode 100644 .github/workflows/testing_pipelines.yaml diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 00000000..4613e161 --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index ba1ad405..c8ac0581 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -52,12 +52,12 @@ jobs: if [[ ! ${GITHUB_REF##*/} =~ $prerelease_regex ]]; then echo '::debug::Actual release (not a prerelease)' TAG_REGEX="$prerelease_regex" - echo "FULL_RELEASE=true" >> $GITHUB_ENV + echo "FULL_RELEASE=true" >> "$GITHUB_ENV" fi fi echo "::debug::TAG_REGEX: $TAG_REGEX" - if [[ "$(git rev-parse "origin/$BRANCH")" != $GITHUB_SHA ]]; then + if [[ "$(git rev-parse "origin/$BRANCH")" != "$GITHUB_SHA" ]]; then # Normal build on a branch (no tag) echo "::debug::BRANCH: $BRANCH $(git rev-parse origin/$BRANCH)" echo "::debug::GITHUB_SHA: $GITHUB_SHA" @@ -72,10 +72,12 @@ jobs: echo "::debug::FILENAME: CHANGELOG.md" echo "::debug::SINCE_TAG: $SINCE_TAG" - echo "BRANCH=$BRANCH" >> $GITHUB_ENV - echo "TAG_REGEX=$TAG_REGEX" >> $GITHUB_ENV - echo "FILENAME=CHANGELOG.md" >> $GITHUB_ENV - echo "SINCE_TAG=$SINCE_TAG" >> $GITHUB_ENV + { + echo "BRANCH=$BRANCH" + echo "TAG_REGEX=$TAG_REGEX" + echo "FILENAME=CHANGELOG.md" + echo "SINCE_TAG=$SINCE_TAG" + } >> "$GITHUB_ENV" - name: Prep changelog file (clear out old lines) run: | @@ -95,7 +97,7 @@ jobs: exit 1 fi - sed -i "1,$(expr $tagline - 1)d" "$FILENAME" + sed -i "1,$(( tagline - 1 ))d" "$FILENAME" # delete generated line (or it will be added multiple times) sed -i '/This Changelog was automatically generated by/d' "$FILENAME" # delete trailing empty lines @@ -139,7 +141,7 @@ jobs: SOMETHING_CHANGED=false git diff --exit-code || SOMETHING_CHANGED=true echo "::debug::SOMETHING_CHANGED: $SOMETHING_CHANGED" - echo "SOMETHING_CHANGED=$SOMETHING_CHANGED" >> $GITHUB_ENV + echo "SOMETHING_CHANGED=$SOMETHING_CHANGED" >> "$GITHUB_ENV" - name: Commit if: env.SOMETHING_CHANGED == 'true' @@ -148,13 +150,13 @@ jobs: git config --global user.email "${{ secrets.JRNL_BOT_EMAIL }}" git add "$FILENAME" git commit -m "Update changelog [ci skip]" - git push origin $BRANCH + git push origin "$BRANCH" - name: Merge to Release branch if: env.FULL_RELEASE == 'true' run: | git fetch --unshallow origin git checkout release - git merge --ff-only $BRANCH + git merge --ff-only "$BRANCH" git push origin release diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 12fda5e2..c3cd4fa9 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -43,7 +43,7 @@ jobs: uses: actions/setup-node@main - name: Capture full Python version in env - run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV + run: echo "PYTHON_FULL_VERSION=$(python --version)" >> "$GITHUB_ENV" - name: poetry cache uses: actions/cache@v2 @@ -63,7 +63,7 @@ jobs: poetry config --local virtualenvs.in-project true poetry install --no-root --remove-untracked npm install - echo "node_modules/.bin" >> $GITHUB_PATH + echo "node_modules/.bin" >> "$GITHUB_PATH" - name: Start docs server run: poetry run poe docs-run & diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3eb8c8f4..aebc2308 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,17 +7,21 @@ on: inputs: version: description: 'Version (e.g. v2.5, v2.5.1-beta, v2.6-beta2)' + type: string required: true include_repo_version: description: 'Update version in repo? (true/false)' - require: true + type: boolean + required: true default: true include_pypi: description: 'Publish to PyPI? (true/false)' + type: boolean required: true default: true include_brew: description: 'Publish to Homebrew? (true/false)' + type: boolean required: true default: true @@ -59,7 +63,7 @@ jobs: run: | JRNL_VERSION="${{ github.event.inputs.version }}" echo "::debug::version: $JRNL_VERSION" - echo "JRNL_VERSION=$JRNL_VERSION" >> $GITHUB_ENV + echo "JRNL_VERSION=$JRNL_VERSION" >> "$GITHUB_ENV" - name: Set up Python uses: actions/setup-python@v2 @@ -83,7 +87,7 @@ jobs: if: ${{ github.event.inputs.include_repo_version == 'true' }} run: | poetry version "$JRNL_VERSION" - echo __version__ = \"$JRNL_VERSION\" > jrnl/__version__.py + echo "__version__ = \"$JRNL_VERSION\"" > jrnl/__version__.py - name: Commit updated files if: ${{ github.event.inputs.include_repo_version == 'true' && github.repository == env.HOME_REPO }} @@ -106,7 +110,7 @@ jobs: - name: Get PyPI version id: pypi-version-getter run: | - pypi_version="$(ls dist/jrnl-*.tar.gz | sed -r 's!dist/jrnl-(.*)\.tar\.gz!\1!')" + pypi_version="$(find dist/jrnl-*.tar.gz | sed -r 's!dist/jrnl-(.*)\.tar\.gz!\1!')" echo "::set-output name=pypi_version::$pypi_version" release_homebrew: @@ -127,8 +131,8 @@ jobs: echo "::debug::jrnl version: $JRNL_VERSION" echo "::debug::pypi version: $PYPI_VERSION" - echo "JRNL_VERSION=$JRNL_VERSION" >> $GITHUB_ENV - echo "PYPI_VERSION=$PYPI_VERSION" >> $GITHUB_ENV + echo "JRNL_VERSION=$JRNL_VERSION" >> "$GITHUB_ENV" + echo "PYPI_VERSION=$PYPI_VERSION" >> "$GITHUB_ENV" - name: Set env variables env: @@ -141,7 +145,7 @@ jobs: echo "FORMULA_REPO=${REPO_OWNER}/homebrew-prerelease" echo "BOT_REPO=jrnl-bot/homebrew-prerelease" echo "FORMULA_NAME=jrnl-beta" - } >> $GITHUB_ENV + } >> "$GITHUB_ENV" else echo '::debug::Full release (not a prerelease)' if [[ "${{ github.repository }}" == "${HOME_REPO}" ]]; then @@ -152,14 +156,14 @@ jobs: echo "FORMULA_REPO=${REPO_OWNER}/homebrew-core" echo "BOT_REPO=jrnl-bot/homebrew-core" echo "FORMULA_NAME=jrnl" - } >> $GITHUB_ENV + } >> "$GITHUB_ENV" fi - name: Tap formula run: | - brew tap ${FORMULA_REPO} + brew tap "${FORMULA_REPO}" echo '::debug::Set tap directory' - echo "BREW_TAP_DIRECTORY=$(brew --repo ${FORMULA_REPO})" >> $GITHUB_ENV + echo "BREW_TAP_DIRECTORY=$(brew --repo "${FORMULA_REPO}")" >> "$GITHUB_ENV" - name: Install dependencies run: brew install pipgrip diff --git a/.github/workflows/testing_pipelines.yaml b/.github/workflows/testing_pipelines.yaml new file mode 100644 index 00000000..3b562e05 --- /dev/null +++ b/.github/workflows/testing_pipelines.yaml @@ -0,0 +1,33 @@ +# Copyright (C) 2012-2022 jrnl contributors +# License: https://www.gnu.org/licenses/gpl-3.0.html + +name: Testing Pipeline Files + +on: + push: + branches: [ develop, release ] + paths: + - '.github/workflows/**' + - '.github/actions/**' + pull_request: + branches: [ develop ] + paths: + - '.github/workflows/**' + - '.github/actions/**' + +jobs: + test: + if: > + ! contains(github.event.head_commit.message, '[ci skip]') + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Check workflow files + uses: docker://rhysd/actionlint:latest + with: + args: -color From 5dcc721f155741e0a82bf9110099ff150b02c294 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 21 Aug 2022 21:02:05 +0000 Subject: [PATCH 0702/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 088728a7..c9eec9d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ **Build:** -- Fix docs pipeline, make docs tests easier to run locally and on different OSes [\#1554](https://github.com/jrnl-org/jrnl/pull/1554) ([wren](https://github.com/wren)) +- Add actionlint to testing pipelines [\#1555](https://github.com/jrnl-org/jrnl/pull/1555) ([wren](https://github.com/wren)) ## [v3.1-beta2](https://pypi.org/project/jrnl/v3.1-beta2/) (2022-08-13) From 4eb9c9fdec7650f6fa85b7c756d7fdaefda29e1e Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 21 Aug 2022 14:17:35 -0700 Subject: [PATCH 0703/1132] Clean up copyright notices and version screen (#1553) * update copyright symbols to unicode * clean up version screen/copyright notice * small change to make commands more similar * update imports to appease isort * fix test * update one more file merged since PR was open --- .github/workflows/changelog.yaml | 2 +- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/testing_pipelines.yaml | 2 +- .github/workflows/testing_prs.yaml | 2 +- .github/workflows/testing_schedule.yaml | 2 +- CONTRIBUTING.md | 2 +- README.md | 2 +- docs/advanced.md | 2 +- docs/contributing.md | 2 +- docs/encryption.md | 2 +- docs/external-editors.md | 2 +- docs/formats.md | 2 +- docs/installation.md | 2 +- docs/journal-types.md | 2 +- docs/overview.md | 2 +- docs/privacy-and-security.md | 2 +- docs/reference-command-line.md | 2 +- docs/reference-config-file.md | 2 +- docs/tips-and-tricks.md | 2 +- docs/usage.md | 2 +- docs_theme/assets/colors.css | 2 +- docs_theme/assets/highlight.css | 2 +- docs_theme/assets/index.css | 2 +- docs_theme/assets/theme.css | 2 +- docs_theme/index.html | 2 +- docs_theme/main.html | 2 +- docs_theme/search.html | 2 +- jrnl/DayOneJournal.py | 2 +- jrnl/EncryptedJournal.py | 2 +- jrnl/Entry.py | 2 +- jrnl/FolderJournal.py | 2 +- jrnl/Journal.py | 2 +- jrnl/__init__.py | 2 +- jrnl/__main__.py | 2 +- jrnl/args.py | 2 +- jrnl/cli.py | 2 +- jrnl/color.py | 2 +- jrnl/commands.py | 21 +++++++++++++------- jrnl/config.py | 2 +- jrnl/editor.py | 2 +- jrnl/exception.py | 2 +- jrnl/install.py | 2 +- jrnl/jrnl.py | 2 +- jrnl/messages/Message.py | 2 +- jrnl/messages/MsgStyle.py | 2 +- jrnl/messages/MsgText.py | 2 +- jrnl/messages/__init__.py | 2 +- jrnl/os_compat.py | 2 +- jrnl/output.py | 2 +- jrnl/override.py | 2 +- jrnl/path.py | 2 +- jrnl/plugins/__init__.py | 2 +- jrnl/plugins/dates_exporter.py | 2 +- jrnl/plugins/fancy_exporter.py | 2 +- jrnl/plugins/jrnl_importer.py | 2 +- jrnl/plugins/json_exporter.py | 2 +- jrnl/plugins/markdown_exporter.py | 2 +- jrnl/plugins/tag_exporter.py | 2 +- jrnl/plugins/text_exporter.py | 2 +- jrnl/plugins/util.py | 2 +- jrnl/plugins/xml_exporter.py | 2 +- jrnl/plugins/yaml_exporter.py | 2 +- jrnl/prompt.py | 2 +- jrnl/time.py | 2 +- jrnl/upgrade.py | 2 +- tests/bdd/features/build.feature | 2 +- tests/bdd/features/change_time.feature | 2 +- tests/bdd/features/config_file.feature | 2 +- tests/bdd/features/core.feature | 4 ++-- tests/bdd/features/datetime.feature | 2 +- tests/bdd/features/delete.feature | 2 +- tests/bdd/features/encrypt.feature | 2 +- tests/bdd/features/file_storage.feature | 2 +- tests/bdd/features/format.feature | 2 +- tests/bdd/features/import.feature | 2 +- tests/bdd/features/multiple_journals.feature | 2 +- tests/bdd/features/override.feature | 2 +- tests/bdd/features/password.feature | 2 +- tests/bdd/features/search.feature | 2 +- tests/bdd/features/star.feature | 2 +- tests/bdd/features/tag.feature | 2 +- tests/bdd/features/upgrade.feature | 2 +- tests/bdd/features/write.feature | 2 +- tests/bdd/test_features.py | 2 +- tests/conftest.py | 2 +- tests/lib/fixtures.py | 2 +- tests/lib/given_steps.py | 2 +- tests/lib/helpers.py | 2 +- tests/lib/then_steps.py | 2 +- tests/lib/when_steps.py | 2 +- tests/unit/test_color.py | 2 +- tests/unit/test_config_file.py | 2 +- tests/unit/test_export.py | 2 +- tests/unit/test_install.py | 2 +- tests/unit/test_jrnl.py | 2 +- tests/unit/test_os_compat.py | 2 +- tests/unit/test_output.py | 2 +- tests/unit/test_override.py | 2 +- tests/unit/test_parse_args.py | 2 +- tests/unit/test_path.py | 2 +- tests/unit/test_time.py | 2 +- 102 files changed, 116 insertions(+), 109 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index c8ac0581..e9d56d37 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html name: Changelog diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c3cd4fa9..29da43be 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html name: Docs diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index aebc2308..d68f7e9e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html name: Release diff --git a/.github/workflows/testing_pipelines.yaml b/.github/workflows/testing_pipelines.yaml index 3b562e05..e868a63a 100644 --- a/.github/workflows/testing_pipelines.yaml +++ b/.github/workflows/testing_pipelines.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html name: Testing Pipeline Files diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml index 27126df8..11a1384b 100644 --- a/.github/workflows/testing_prs.yaml +++ b/.github/workflows/testing_prs.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html name: Testing diff --git a/.github/workflows/testing_schedule.yaml b/.github/workflows/testing_schedule.yaml index fd38cd41..ce29de64 100644 --- a/.github/workflows/testing_schedule.yaml +++ b/.github/workflows/testing_schedule.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html name: Testing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd00f6e2..0481aae2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ diff --git a/README.md b/README.md index e2809a0f..e7804059 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ diff --git a/docs/advanced.md b/docs/advanced.md index 61529fc4..7d46fbd7 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -1,5 +1,5 @@ diff --git a/docs/contributing.md b/docs/contributing.md index 2005106f..d14220dc 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,5 +1,5 @@ diff --git a/docs/encryption.md b/docs/encryption.md index e8b86e62..31f64502 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -1,5 +1,5 @@ diff --git a/docs/external-editors.md b/docs/external-editors.md index efa0b55c..be321bab 100644 --- a/docs/external-editors.md +++ b/docs/external-editors.md @@ -1,5 +1,5 @@ diff --git a/docs/formats.md b/docs/formats.md index a87c4e8a..47904c1e 100644 --- a/docs/formats.md +++ b/docs/formats.md @@ -1,5 +1,5 @@ diff --git a/docs/installation.md b/docs/installation.md index 4d2c4c97..82b9d450 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,5 +1,5 @@ diff --git a/docs/journal-types.md b/docs/journal-types.md index b2ec78da..a8e79220 100644 --- a/docs/journal-types.md +++ b/docs/journal-types.md @@ -1,5 +1,5 @@ diff --git a/docs/overview.md b/docs/overview.md index b20c85f9..df09d273 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,5 +1,5 @@ diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index 9030df99..f62f1cf6 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -1,5 +1,5 @@ diff --git a/docs/reference-command-line.md b/docs/reference-command-line.md index 149ae26f..8f906f8d 100644 --- a/docs/reference-command-line.md +++ b/docs/reference-command-line.md @@ -1,5 +1,5 @@ diff --git a/docs/reference-config-file.md b/docs/reference-config-file.md index 80949156..5239daa8 100644 --- a/docs/reference-config-file.md +++ b/docs/reference-config-file.md @@ -1,5 +1,5 @@ diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index c4531798..cebf2546 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -1,5 +1,5 @@ diff --git a/docs/usage.md b/docs/usage.md index 9e8c3ee3..13589e09 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,5 +1,5 @@ diff --git a/docs_theme/assets/colors.css b/docs_theme/assets/colors.css index 3f8b46a8..4cfe4c79 100644 --- a/docs_theme/assets/colors.css +++ b/docs_theme/assets/colors.css @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-2022 jrnl contributors +Copyright © 2012-2022 jrnl contributors License: https://www.gnu.org/licenses/gpl-3.0.html */ diff --git a/docs_theme/assets/highlight.css b/docs_theme/assets/highlight.css index 27950c0f..22f3fabe 100644 --- a/docs_theme/assets/highlight.css +++ b/docs_theme/assets/highlight.css @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-2022 jrnl contributors +Copyright © 2012-2022 jrnl contributors License: https://www.gnu.org/licenses/gpl-3.0.html Atom One Dark With support for ReasonML by Gidi Morris, based off work by diff --git a/docs_theme/assets/index.css b/docs_theme/assets/index.css index d6e834e3..4aa66b1a 100644 --- a/docs_theme/assets/index.css +++ b/docs_theme/assets/index.css @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-2022 jrnl contributors +Copyright © 2012-2022 jrnl contributors License: https://www.gnu.org/licenses/gpl-3.0.html */ diff --git a/docs_theme/assets/theme.css b/docs_theme/assets/theme.css index 152e0521..a854022e 100644 --- a/docs_theme/assets/theme.css +++ b/docs_theme/assets/theme.css @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-2022 jrnl contributors +Copyright © 2012-2022 jrnl contributors License: https://www.gnu.org/licenses/gpl-3.0.html */ diff --git a/docs_theme/index.html b/docs_theme/index.html index 57c90c76..1cd3e2dc 100644 --- a/docs_theme/index.html +++ b/docs_theme/index.html @@ -1,5 +1,5 @@ diff --git a/docs_theme/main.html b/docs_theme/main.html index 7849dd02..456924fe 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -1,5 +1,5 @@ diff --git a/docs_theme/search.html b/docs_theme/search.html index 37bcfe5d..fe3a23e7 100644 --- a/docs_theme/search.html +++ b/docs_theme/search.html @@ -1,5 +1,5 @@ diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index faeb5210..d7f06249 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index fb1bd355..8b742d29 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import base64 diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 6754072f..b8c3b640 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime diff --git a/jrnl/FolderJournal.py b/jrnl/FolderJournal.py index 9362e269..25a927e1 100644 --- a/jrnl/FolderJournal.py +++ b/jrnl/FolderJournal.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import codecs diff --git a/jrnl/Journal.py b/jrnl/Journal.py index d389963b..c2c43142 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 1328df2a..6fe12d10 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html try: diff --git a/jrnl/__main__.py b/jrnl/__main__.py index 8017142e..7ff8fd4d 100644 --- a/jrnl/__main__.py +++ b/jrnl/__main__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import sys diff --git a/jrnl/args.py b/jrnl/args.py index ed33325b..6e0671f1 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import argparse diff --git a/jrnl/cli.py b/jrnl/cli.py index 5941e02c..7c692c4f 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/color.py b/jrnl/color.py index 1970f487..f5634bbd 100644 --- a/jrnl/color.py +++ b/jrnl/color.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import re diff --git a/jrnl/commands.py b/jrnl/commands.py index b03bbf60..a96a2956 100644 --- a/jrnl/commands.py +++ b/jrnl/commands.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html """ @@ -26,27 +26,34 @@ from jrnl.prompt import create_password def preconfig_diagnostic(_): + from jrnl import __title__ from jrnl import __version__ print( - f"jrnl: {__version__}\n" + f"{__title__}: {__version__}\n" f"Python: {sys.version}\n" f"OS: {platform.system()} {platform.release()}" ) def preconfig_version(_): + import textwrap + from jrnl import __title__ from jrnl import __version__ - version_str = f"""{__title__} version {__version__} + output = f""" + {__title__} {__version__} -Copyright (C) 2012-2022 jrnl contributors + Copyright © 2012-2022 jrnl contributors -This is free software, and you are welcome to redistribute it under certain -conditions; for details, see: https://www.gnu.org/licenses/gpl-3.0.html""" + This is free software, and you are welcome to redistribute it under certain + conditions; for details, see: https://www.gnu.org/licenses/gpl-3.0.html + """ - print(version_str) + output = textwrap.dedent(output).strip() + + print(output) def postconfig_list(config, **kwargs): diff --git a/jrnl/config.py b/jrnl/config.py index cea3720e..bdcc86ab 100644 --- a/jrnl/config.py +++ b/jrnl/config.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/editor.py b/jrnl/editor.py index f5be8395..fd063f44 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/exception.py b/jrnl/exception.py index 6dfc6593..86140cd9 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.messages import Message diff --git a/jrnl/install.py b/jrnl/install.py index d0ae4ac7..a4797dc7 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import glob diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index b8f924bd..2b4df757 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/messages/Message.py b/jrnl/messages/Message.py index 3008db3b..e4d6176a 100644 --- a/jrnl/messages/Message.py +++ b/jrnl/messages/Message.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from typing import Mapping diff --git a/jrnl/messages/MsgStyle.py b/jrnl/messages/MsgStyle.py index c4a001d1..26f383ce 100644 --- a/jrnl/messages/MsgStyle.py +++ b/jrnl/messages/MsgStyle.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from enum import Enum diff --git a/jrnl/messages/MsgText.py b/jrnl/messages/MsgText.py index b8250970..4e7149b8 100644 --- a/jrnl/messages/MsgText.py +++ b/jrnl/messages/MsgText.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from enum import Enum diff --git a/jrnl/messages/__init__.py b/jrnl/messages/__init__.py index c452f08f..381ee332 100644 --- a/jrnl/messages/__init__.py +++ b/jrnl/messages/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.messages.Message import Message diff --git a/jrnl/os_compat.py b/jrnl/os_compat.py index 1ede4534..2bb46bc5 100644 --- a/jrnl/os_compat.py +++ b/jrnl/os_compat.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import shlex diff --git a/jrnl/output.py b/jrnl/output.py index 78765ca9..b82ec122 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import textwrap diff --git a/jrnl/override.py b/jrnl/override.py index 7244fb8f..4b6506ee 100644 --- a/jrnl/override.py +++ b/jrnl/override.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from argparse import Namespace diff --git a/jrnl/path.py b/jrnl/path.py index cf13a2a8..0ec3492f 100644 --- a/jrnl/path.py +++ b/jrnl/path.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os.path diff --git a/jrnl/plugins/__init__.py b/jrnl/plugins/__init__.py index 015725b2..ebfe5d3f 100644 --- a/jrnl/plugins/__init__.py +++ b/jrnl/plugins/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.plugins.dates_exporter import DatesExporter diff --git a/jrnl/plugins/dates_exporter.py b/jrnl/plugins/dates_exporter.py index a5a7054f..a5032f49 100644 --- a/jrnl/plugins/dates_exporter.py +++ b/jrnl/plugins/dates_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from collections import Counter diff --git a/jrnl/plugins/fancy_exporter.py b/jrnl/plugins/fancy_exporter.py index 2ce39ae0..1eaf74c0 100644 --- a/jrnl/plugins/fancy_exporter.py +++ b/jrnl/plugins/fancy_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import logging diff --git a/jrnl/plugins/jrnl_importer.py b/jrnl/plugins/jrnl_importer.py index 813702d8..c69d4673 100644 --- a/jrnl/plugins/jrnl_importer.py +++ b/jrnl/plugins/jrnl_importer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import sys diff --git a/jrnl/plugins/json_exporter.py b/jrnl/plugins/json_exporter.py index 6aa23434..ae153b70 100644 --- a/jrnl/plugins/json_exporter.py +++ b/jrnl/plugins/json_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import json diff --git a/jrnl/plugins/markdown_exporter.py b/jrnl/plugins/markdown_exporter.py index 29e07bc1..c3476d51 100644 --- a/jrnl/plugins/markdown_exporter.py +++ b/jrnl/plugins/markdown_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/jrnl/plugins/tag_exporter.py b/jrnl/plugins/tag_exporter.py index 35b25fdd..b9ab45b3 100644 --- a/jrnl/plugins/tag_exporter.py +++ b/jrnl/plugins/tag_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.plugins.text_exporter import TextExporter diff --git a/jrnl/plugins/text_exporter.py b/jrnl/plugins/text_exporter.py index eeb934f9..931305ef 100644 --- a/jrnl/plugins/text_exporter.py +++ b/jrnl/plugins/text_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import errno diff --git a/jrnl/plugins/util.py b/jrnl/plugins/util.py index a2188306..55ae73c5 100644 --- a/jrnl/plugins/util.py +++ b/jrnl/plugins/util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/jrnl/plugins/xml_exporter.py b/jrnl/plugins/xml_exporter.py index 02c8398a..a6c2fe79 100644 --- a/jrnl/plugins/xml_exporter.py +++ b/jrnl/plugins/xml_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from xml.dom import minidom diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index a9ff958b..c97692ad 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/jrnl/prompt.py b/jrnl/prompt.py index 803a5214..f4d62ae4 100644 --- a/jrnl/prompt.py +++ b/jrnl/prompt.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from jrnl.messages import Message diff --git a/jrnl/time.py b/jrnl/time.py index c457c12b..fd17ca0a 100644 --- a/jrnl/time.py +++ b/jrnl/time.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index 473f29e5..206b9405 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/tests/bdd/features/build.feature b/tests/bdd/features/build.feature index d2f5e950..d57e489f 100644 --- a/tests/bdd/features/build.feature +++ b/tests/bdd/features/build.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Build process diff --git a/tests/bdd/features/change_time.feature b/tests/bdd/features/change_time.feature index 7f4a08e3..6bcf8fe7 100644 --- a/tests/bdd/features/change_time.feature +++ b/tests/bdd/features/change_time.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Change entry times in journal diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index 5cd3a6c5..6c24f1e5 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Multiple journals diff --git a/tests/bdd/features/core.feature b/tests/bdd/features/core.feature index 7b8de194..4cd5328b 100644 --- a/tests/bdd/features/core.feature +++ b/tests/bdd/features/core.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Functionality of jrnl outside of actually handling journals @@ -7,7 +7,7 @@ Feature: Functionality of jrnl outside of actually handling journals Given we use the config "simple.yaml" When we run "jrnl --version" Then we should get no error - Then the output should match "^jrnl version v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" + Then the output should match "^jrnl v\d+\.\d+(\.\d+)?(-(alpha|beta)\d*)?" Scenario: Running the diagnostic command Given we use the config "simple.yaml" diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index e2b0fa76..4b80eefb 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Reading and writing to journal with custom date formats diff --git a/tests/bdd/features/delete.feature b/tests/bdd/features/delete.feature index 806abb18..6980cc26 100644 --- a/tests/bdd/features/delete.feature +++ b/tests/bdd/features/delete.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Delete entries from journal diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index 16c8855c..5c201361 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Encrypting and decrypting journals diff --git a/tests/bdd/features/file_storage.feature b/tests/bdd/features/file_storage.feature index 0e54f620..2ecdc58a 100644 --- a/tests/bdd/features/file_storage.feature +++ b/tests/bdd/features/file_storage.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Journals iteracting with the file system in a way that users can see diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index d5714630..8e395d05 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Custom formats diff --git a/tests/bdd/features/import.feature b/tests/bdd/features/import.feature index 3872702e..70dda0b3 100644 --- a/tests/bdd/features/import.feature +++ b/tests/bdd/features/import.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Importing data diff --git a/tests/bdd/features/multiple_journals.feature b/tests/bdd/features/multiple_journals.feature index 642149ca..3c2c7b73 100644 --- a/tests/bdd/features/multiple_journals.feature +++ b/tests/bdd/features/multiple_journals.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Multiple journals diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index 9af459f3..1d66f470 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Implementing Runtime Overrides for Select Configuration Keys diff --git a/tests/bdd/features/password.feature b/tests/bdd/features/password.feature index cf00f85c..2aa1b850 100644 --- a/tests/bdd/features/password.feature +++ b/tests/bdd/features/password.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Using the installed keyring diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index 239f74d5..5a3ed594 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Searching in a journal diff --git a/tests/bdd/features/star.feature b/tests/bdd/features/star.feature index 825ee2fa..5b81ec22 100644 --- a/tests/bdd/features/star.feature +++ b/tests/bdd/features/star.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Starring entries diff --git a/tests/bdd/features/tag.feature b/tests/bdd/features/tag.feature index 1d762431..4eb9d904 100644 --- a/tests/bdd/features/tag.feature +++ b/tests/bdd/features/tag.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Tagging diff --git a/tests/bdd/features/upgrade.feature b/tests/bdd/features/upgrade.feature index 5e53130a..3a6b1ee6 100644 --- a/tests/bdd/features/upgrade.feature +++ b/tests/bdd/features/upgrade.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Upgrading Journals from 1.x.x to 2.x.x diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index fe0573ff..335a33c0 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html Feature: Writing new entries. diff --git a/tests/bdd/test_features.py b/tests/bdd/test_features.py index 7f02e6b3..387bd6cc 100644 --- a/tests/bdd/test_features.py +++ b/tests/bdd/test_features.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from pytest_bdd import scenarios diff --git a/tests/conftest.py b/tests/conftest.py index 61d73c66..d97ef47f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from pytest import mark diff --git a/tests/lib/fixtures.py b/tests/lib/fixtures.py index 1b65e765..e791e1a0 100644 --- a/tests/lib/fixtures.py +++ b/tests/lib/fixtures.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index 490b92f3..5ee88ab7 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import json diff --git a/tests/lib/helpers.py b/tests/lib/helpers.py index e3a4d70d..c5db9ffd 100644 --- a/tests/lib/helpers.py +++ b/tests/lib/helpers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import functools diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 51b145d1..28bc41cf 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import json diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 6590b21f..920d66d4 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/tests/unit/test_color.py b/tests/unit/test_color.py index 1543834c..4f23955d 100644 --- a/tests/unit/test_color.py +++ b/tests/unit/test_color.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import pytest diff --git a/tests/unit/test_config_file.py b/tests/unit/test_config_file.py index 80734de4..acba3b64 100644 --- a/tests/unit/test_config_file.py +++ b/tests/unit/test_config_file.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import os diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index c5137794..27e60d80 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import pytest diff --git a/tests/unit/test_install.py b/tests/unit/test_install.py index 8e5db8df..f4e19381 100644 --- a/tests/unit/test_install.py +++ b/tests/unit/test_install.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import sys diff --git a/tests/unit/test_jrnl.py b/tests/unit/test_jrnl.py index a310a281..369d6964 100644 --- a/tests/unit/test_jrnl.py +++ b/tests/unit/test_jrnl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import random diff --git a/tests/unit/test_os_compat.py b/tests/unit/test_os_compat.py index 2a3b0b14..a18c1e75 100644 --- a/tests/unit/test_os_compat.py +++ b/tests/unit/test_os_compat.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from unittest import mock diff --git a/tests/unit/test_output.py b/tests/unit/test_output.py index e93ec44a..33f05264 100644 --- a/tests/unit/test_output.py +++ b/tests/unit/test_output.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from unittest.mock import Mock diff --git a/tests/unit/test_override.py b/tests/unit/test_override.py index fedd91dd..065ee3ee 100644 --- a/tests/unit/test_override.py +++ b/tests/unit/test_override.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html from argparse import Namespace diff --git a/tests/unit/test_parse_args.py b/tests/unit/test_parse_args.py index 6c187576..441f06e7 100644 --- a/tests/unit/test_parse_args.py +++ b/tests/unit/test_parse_args.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import shlex diff --git a/tests/unit/test_path.py b/tests/unit/test_path.py index 2759eac1..9f6bfce9 100644 --- a/tests/unit/test_path.py +++ b/tests/unit/test_path.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import random diff --git a/tests/unit/test_time.py b/tests/unit/test_time.py index 8bed5f86..20290a14 100644 --- a/tests/unit/test_time.py +++ b/tests/unit/test_time.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 jrnl contributors +# Copyright © 2012-2022 jrnl contributors # License: https://www.gnu.org/licenses/gpl-3.0.html import datetime From 8948334d5d660bb582507f645c5085b7c5e5bfbd Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 21 Aug 2022 21:19:21 +0000 Subject: [PATCH 0704/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9eec9d9..7aa3c929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ **Build:** - Add actionlint to testing pipelines [\#1555](https://github.com/jrnl-org/jrnl/pull/1555) ([wren](https://github.com/wren)) +- Fix docs pipeline, make docs tests easier to run locally and on different OSes [\#1554](https://github.com/jrnl-org/jrnl/pull/1554) ([wren](https://github.com/wren)) + +**Documentation:** + +- Clean up copyright notices and version screen [\#1553](https://github.com/jrnl-org/jrnl/pull/1553) ([wren](https://github.com/wren)) ## [v3.1-beta2](https://pypi.org/project/jrnl/v3.1-beta2/) (2022-08-13) From 5a5d31f213042ad2d47467366fc078f49bec3659 Mon Sep 17 00:00:00 2001 From: Janek Date: Sun, 21 Aug 2022 23:51:23 +0200 Subject: [PATCH 0705/1132] jrnl/args.py: reformat contributor appreciation (#1556) --- jrnl/args.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jrnl/args.py b/jrnl/args.py index 6e0671f1..4b2ba8ce 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -39,9 +39,9 @@ def parse_args(args=[]): description="Collect your thoughts and notes without leaving the command line", epilog=textwrap.dedent( """ - Thank you to all of our contributors! Come see the whole list of code and - financial contributors at https://github.com/jrnl-org/jrnl. And special - thanks to Bad Lip Reading for the Yoda joke in the Writing section above.""" + We gratefully thank all contributors! + Come see the whole list of code and financial contributors at https://github.com/jrnl-org/jrnl + And special thanks to Bad Lip Reading for the Yoda joke in the Writing section above :)""" ), ) From 1f58452b760e9f170c7c007698b838d0944fe70a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 21 Aug 2022 21:52:58 +0000 Subject: [PATCH 0706/1132] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa3c929..62da1b12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ **Documentation:** +- Reformat contributor appreciation on `--help` screen [\#1556](https://github.com/jrnl-org/jrnl/pull/1556) ([xeruf](https://github.com/xeruf)) - Clean up copyright notices and version screen [\#1553](https://github.com/jrnl-org/jrnl/pull/1553) ([wren](https://github.com/wren)) ## [v3.1-beta2](https://pypi.org/project/jrnl/v3.1-beta2/) (2022-08-13) From b26fdb424b1e1f5a30d7c7a825ccd473fa43c8af Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 21 Aug 2022 22:22:00 +0000 Subject: [PATCH 0707/1132] Increment version to v3.1 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index bae5c2a2..9809ae42 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.1-beta2" +__version__ = "v3.1" diff --git a/pyproject.toml b/pyproject.toml index 2e10ae1e..b93e265f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.1-beta2" +version = "v3.1" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 72d1a044d9014e6875b5cf37c68f45eab4e803e2 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sun, 21 Aug 2022 22:23:36 +0000 Subject: [PATCH 0708/1132] Update changelog [ci skip] --- CHANGELOG.md | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62da1b12..64689361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,19 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.1](https://pypi.org/project/jrnl/v3.1/) (2022-08-21) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta2...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta2...v3.1) + +**Implemented enhancements:** + +- Update tzlocal to v4.x and remove pytz dependency [\#1528](https://github.com/jrnl-org/jrnl/pull/1528) ([outa](https://github.com/outa)) +- Add linewrap option 'auto' [\#1507](https://github.com/jrnl-org/jrnl/pull/1507) ([jonakeys](https://github.com/jonakeys)) + +**Fixed bugs:** + +- Update formatting function to better account for indentation [\#1541](https://github.com/jrnl-org/jrnl/pull/1541) ([wren](https://github.com/wren)) +- Export to file\(s\) when first line/title of an entry is very long [\#1527](https://github.com/jrnl-org/jrnl/pull/1527) ([jonakeys](https://github.com/jonakeys)) +- Fixed index out of range error in fancy exporter [\#1522](https://github.com/jrnl-org/jrnl/pull/1522) ([apainintheneck](https://github.com/apainintheneck)) **Build:** @@ -14,37 +25,10 @@ - Reformat contributor appreciation on `--help` screen [\#1556](https://github.com/jrnl-org/jrnl/pull/1556) ([xeruf](https://github.com/xeruf)) - Clean up copyright notices and version screen [\#1553](https://github.com/jrnl-org/jrnl/pull/1553) ([wren](https://github.com/wren)) -## [v3.1-beta2](https://pypi.org/project/jrnl/v3.1-beta2/) (2022-08-13) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta...v3.1-beta2) - -**Fixed bugs:** - -- Export to file\(s\) when first line/title of an entry is very long [\#1527](https://github.com/jrnl-org/jrnl/pull/1527) ([jonakeys](https://github.com/jonakeys)) - **Packaging:** - Bump pyproject-flake8 from 0.0.1a4 to 0.0.1a5 [\#1552](https://github.com/jrnl-org/jrnl/pull/1552) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.7.0 to 23.8.2 [\#1551](https://github.com/jrnl-org/jrnl/pull/1551) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v3.1-beta](https://pypi.org/project/jrnl/v3.1-beta/) (2022-07-30) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.0...v3.1-beta) - -**Implemented enhancements:** - -- Warn user when there are duplicate keys in the config file [\#1415](https://github.com/jrnl-org/jrnl/issues/1415) -- Support tzlocal v4 [\#1338](https://github.com/jrnl-org/jrnl/issues/1338) -- Update tzlocal to v4.x and remove pytz dependency [\#1528](https://github.com/jrnl-org/jrnl/pull/1528) ([outa](https://github.com/outa)) -- Add linewrap option 'auto' [\#1507](https://github.com/jrnl-org/jrnl/pull/1507) ([jonakeys](https://github.com/jonakeys)) - -**Fixed bugs:** - -- Update formatting function to better account for indentation [\#1541](https://github.com/jrnl-org/jrnl/pull/1541) ([wren](https://github.com/wren)) -- Fixed index out of range error in fancy exporter [\#1522](https://github.com/jrnl-org/jrnl/pull/1522) ([apainintheneck](https://github.com/apainintheneck)) - -**Packaging:** - - Bump yq from 3.0.2 to 3.1.0 [\#1546](https://github.com/jrnl-org/jrnl/pull/1546) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump poethepoet from 0.15.0 to 0.16.0 [\#1542](https://github.com/jrnl-org/jrnl/pull/1542) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 23.6.0 to 23.7.0 [\#1539](https://github.com/jrnl-org/jrnl/pull/1539) ([dependabot[bot]](https://github.com/apps/dependabot)) From 3c50b01c234a9a5ea522b88e09118c8817a87283 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 27 Aug 2022 12:03:01 -0700 Subject: [PATCH 0709/1132] take out old help text from pipeline config (#1565) These used to be needed because the `type` field didn't exist. --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d68f7e9e..5e60c90b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,17 +10,17 @@ on: type: string required: true include_repo_version: - description: 'Update version in repo? (true/false)' + description: 'Update version in repo?' type: boolean required: true default: true include_pypi: - description: 'Publish to PyPI? (true/false)' + description: 'Publish to PyPI?' type: boolean required: true default: true include_brew: - description: 'Publish to Homebrew? (true/false)' + description: 'Publish to Homebrew?' type: boolean required: true default: true From 0fddb07c091a819f02644419c6bdfec87dcad8e2 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 19:05:08 +0000 Subject: [PATCH 0710/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64689361..36679130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1...HEAD) + +**Build:** + +- Quick fix follow up for actionlint [\#1565](https://github.com/jrnl-org/jrnl/pull/1565) ([wren](https://github.com/wren)) + ## [v3.1](https://pypi.org/project/jrnl/v3.1/) (2022-08-21) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta2...v3.1) From 0cc771f6331b0df7ae12b66097075480bef07bd4 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 27 Aug 2022 12:13:57 -0700 Subject: [PATCH 0711/1132] Add message showing the number of search results (#1524) * Added message showing the number of search results Modified _search_journal() to return a bool based upon whether any filter args were passed to the program. Added _print_entries_found_count() which prints a message based upon the number of entries found and prints warnings if the user was trying to edit or delete. * Add tests for search results msgs --- jrnl/jrnl.py | 60 +++++++++++++++++++++++++------ jrnl/messages/MsgText.py | 4 +++ tests/bdd/features/search.feature | 26 ++++++++++++-- 3 files changed, 77 insertions(+), 13 deletions(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 2b4df757..971ffd2a 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -173,8 +173,9 @@ def search_mode(args, journal, **kwargs): "old_entries": journal.entries, } - # Filters the journal entries in place - _search_journal(**kwargs) + if _has_search_args(args): + _filter_journal_entries(**kwargs) + _print_entries_found_count(len(journal), args) # Where do the search results go? if args.edit: @@ -196,6 +197,10 @@ def search_mode(args, journal, **kwargs): _edit_search_results(**kwargs) + elif not journal: + # Bail out if there are no entries and we're not editing + return + elif args.change_time: _change_time_search_results(**kwargs) @@ -244,8 +249,28 @@ def _get_editor_template(config, **kwargs): return template -def _search_journal(args, journal, **kwargs): - """Search the journal with the given args""" +def _has_search_args(args): + return any( + ( + args.on_date, + args.today_in_history, + args.text, + args.month, + args.day, + args.year, + args.start_date, + args.end_date, + args.strict, + args.starred, + args.excluded, + args.contains, + args.limit, + ) + ) + + +def _filter_journal_entries(args, journal, **kwargs): + """Filter journal entries in-place based upon search args""" if args.on_date: args.start_date = args.end_date = args.on_date @@ -269,6 +294,27 @@ def _search_journal(args, journal, **kwargs): journal.limit(args.limit) +def _print_entries_found_count(count, args): + if count == 0: + if args.edit or args.change_time: + print_msg(Message(MsgText.NothingToModify, MsgStyle.WARNING)) + elif args.delete: + print_msg(Message(MsgText.NothingToDelete, MsgStyle.WARNING)) + else: + print_msg(Message(MsgText.NoEntriesFound, MsgStyle.NORMAL)) + elif args.limit: + # Don't show count if the user expects a limited number of results + return + elif args.edit or not (args.change_time or args.delete): + # Don't show count if we are ONLY changing the time or deleting entries + my_msg = ( + MsgText.EntryFoundCountSingular + if count == 1 + else MsgText.EntryFoundCountPlural + ) + print_msg(Message(my_msg, MsgStyle.NORMAL, {"num": count})) + + def _other_entries(journal, entries): """Find entries that are not in journal""" return [e for e in entries if e not in journal.entries] @@ -352,9 +398,6 @@ def _get_predit_stats(journal): def _delete_search_results(journal, old_entries, **kwargs): - if not journal.entries: - raise JrnlException(Message(MsgText.NothingToDelete, MsgStyle.ERROR)) - entries_to_delete = journal.prompt_action_entries(MsgText.DeleteEntryQuestion) if entries_to_delete: @@ -365,9 +408,6 @@ def _delete_search_results(journal, old_entries, **kwargs): def _change_time_search_results(args, journal, old_entries, no_prompt=False, **kwargs): - if not journal.entries: - raise JrnlException(Message(MsgText.NothingToModify, MsgStyle.WARNING)) - # separate entries we are not editing other_entries = _other_entries(journal, old_entries) diff --git a/jrnl/messages/MsgText.py b/jrnl/messages/MsgText.py index 4e7149b8..0f509645 100644 --- a/jrnl/messages/MsgText.py +++ b/jrnl/messages/MsgText.py @@ -224,6 +224,10 @@ class MsgText(Enum): No entries to modify, because the search returned no results """ + NoEntriesFound = "no entries found" + EntryFoundCountSingular = "{num} entry found" + EntryFoundCountPlural = "{num} entries found" + # --- Formats --- # HeadingsPastH6 = """ Headings increased past H6 on export - {date} {title} diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index 5a3ed594..78e9a480 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -27,7 +27,8 @@ Feature: Searching in a journal When we run "jrnl tomorrow: A future entry." Then the output should contain "Entry added" When we run "jrnl -from today" - Then the output should contain "Adding an entry right now." + Then the output should contain "2 entries found" + And the output should contain "Adding an entry right now." And the output should contain "A future entry." And the output should not contain "This thing happened yesterday" @@ -47,7 +48,8 @@ Feature: Searching in a journal When we run "jrnl tomorrow: A future entry." Then the output should contain "Entry added" When we run "jrnl -from yesterday -to today" - Then the output should contain "This thing happened yesterday" + Then the output should contain "2 entries found" + And the output should contain "This thing happened yesterday" And the output should contain "Adding an entry right now." And the output should not contain "A future entry." @@ -61,6 +63,7 @@ Feature: Searching in a journal Given we use the config "" When we run "jrnl -contains first --short" Then we should get no error + And the output should contain "1 entry found" And the output should be 2020-08-29 11:11 Entry the first. @@ -70,6 +73,19 @@ Feature: Searching in a journal | basic_folder.yaml | | basic_dayone.yaml | + Scenario Outline: Searching for an unknown string + Given we use the config "" + When we run "jrnl -contains slkdfsdkfjsd" + Then we should get no error + And the output should contain "no entries found" + And the output should not contain "slkdfsdkfjsd" + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + Scenario Outline: Searching for a string within tag results Given we use the config "" When we run "jrnl @tagone -contains maybe" @@ -86,6 +102,7 @@ Feature: Searching in a journal Given we use the config "" When we run "jrnl -and @tagone @tagtwo -contains maybe" Then we should get no error + And the output should contain "1 entry found" And the output should contain "maybe" Examples: configs @@ -98,6 +115,7 @@ Feature: Searching in a journal Given we use the config "" When we run "jrnl -not @tagone -contains lonesome" Then we should get no error + And the output should contain "1 entry found" And the output should contain "lonesome" Examples: configs @@ -287,7 +305,8 @@ Feature: Searching in a journal And now is "2020-08-31 02:32:00 PM" When we run "jrnl 2019-08-31 01:01: Hi, from last year." And we run "jrnl -today-in-history --short" - Then the output should be + Then the output should contain "2 entries found" + And the output should be 2019-08-31 01:01 Hi, from last year. 2020-08-31 14:32 A second entry in what I hope to be a long series. @@ -302,6 +321,7 @@ Feature: Searching in a journal Given we use the config "dayone.yaml" When we run "jrnl -from 'feb 2013'" Then we should get no error + And the output should contain "3 entries found" And the output should be 2013-05-17 11:39 This entry has tags! From bb6491bd06dcc24d798044ba1c4928686e584435 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 19:16:18 +0000 Subject: [PATCH 0712/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36679130..edd9d4e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1...HEAD) +**Implemented enhancements:** + +- Report number of entries found in a search [\#1454](https://github.com/jrnl-org/jrnl/issues/1454) +- Add message showing the number of search results [\#1524](https://github.com/jrnl-org/jrnl/pull/1524) ([apainintheneck](https://github.com/apainintheneck)) + **Build:** - Quick fix follow up for actionlint [\#1565](https://github.com/jrnl-org/jrnl/pull/1565) ([wren](https://github.com/wren)) From f65f07dbcbe643ad74c0fecb9f1ba0c21f2ad11f Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 27 Aug 2022 12:33:44 -0700 Subject: [PATCH 0713/1132] Suppress "Entry added" message if using default journal (#1561) * Suppress "Entry added to default journal" message if using default journal * Replace "Entry added" BDD test steps with "we should get no error" now that the message is suppressed * Add positive and negative tests for "Entry added" message behavior --- jrnl/jrnl.py | 14 +++++----- tests/bdd/features/datetime.feature | 16 +++++------ tests/bdd/features/file_storage.feature | 4 +-- tests/bdd/features/override.feature | 1 - tests/bdd/features/search.feature | 18 ++++++------- tests/bdd/features/star.feature | 4 +-- tests/bdd/features/write.feature | 35 ++++++++++++++++++++----- 7 files changed, 57 insertions(+), 35 deletions(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 971ffd2a..5c9ae9ac 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -7,6 +7,7 @@ import sys from jrnl import install from jrnl import plugins from jrnl import time +from jrnl.config import DEFAULT_JOURNAL_KEY from jrnl.config import get_config_path from jrnl.config import get_journal_name from jrnl.config import scope_config @@ -146,13 +147,14 @@ def write_mode(args, config, journal, **kwargs): 'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw ) journal.new_entry(raw) - print_msg( - Message( - MsgText.JournalEntryAdded, - MsgStyle.NORMAL, - {"journal_name": args.journal_name}, + if args.journal_name != DEFAULT_JOURNAL_KEY: + print_msg( + Message( + MsgText.JournalEntryAdded, + MsgStyle.NORMAL, + {"journal_name": args.journal_name}, + ) ) - ) journal.write() logging.debug("Write mode: completed journal.write()") diff --git a/tests/bdd/features/datetime.feature b/tests/bdd/features/datetime.feature index 4b80eefb..48166f20 100644 --- a/tests/bdd/features/datetime.feature +++ b/tests/bdd/features/datetime.feature @@ -7,7 +7,7 @@ Feature: Reading and writing to journal with custom date formats # https://github.com/jrnl-org/jrnl/issues/117 Given we use the config "simple.yaml" When we run "jrnl 2013-11-30 15:42: Project Started." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -999" Then the output should contain "2013-11-30 15:42 Project Started." @@ -16,7 +16,7 @@ Feature: Reading and writing to journal with custom date formats # https://github.com/jrnl-org/jrnl/issues/185 Given we use the config "simple.yaml" When we run "jrnl 26/06/2099: Planet? Earth. Year? 2099." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -999" Then the output should contain "2099-06-26 09:00 Planet?" @@ -37,7 +37,7 @@ Feature: Reading and writing to journal with custom date formats Scenario Outline: Writing an entry from command line with custom date Given we use the config "" When we run "jrnl " - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -n 1" Then the output should contain "" @@ -91,7 +91,7 @@ Feature: Reading and writing to journal with custom date formats Given we use the config "simple.yaml" And now is "2019-03-12 01:30:32 PM" When we run "jrnl " - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -1" Then the output should contain "" Then the output should contain the date "" @@ -113,7 +113,7 @@ Feature: Reading and writing to journal with custom date formats Given we use the config "simple.yaml" And now is "2019-03-12 01:30:32 PM" When we run "jrnl " - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -1" Then the output should contain "" Then the output should contain the date "" @@ -183,11 +183,11 @@ Feature: Reading and writing to journal with custom date formats Given we use the config "dayone.yaml" And now is "" When we run "jrnl yesterday: This thing happened yesterday" - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl today at 11:59pm: Adding an entry right now." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl tomorrow: A future entry." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -from yesterday -to today" Then the output should contain "This thing happened yesterday" And the output should contain "Adding an entry right now." diff --git a/tests/bdd/features/file_storage.feature b/tests/bdd/features/file_storage.feature index 2ecdc58a..29728cee 100644 --- a/tests/bdd/features/file_storage.feature +++ b/tests/bdd/features/file_storage.feature @@ -6,7 +6,7 @@ Feature: Journals iteracting with the file system in a way that users can see Scenario: Adding entries to a Folder journal should generate date files Given we use the config "empty_folder.yaml" When we run "jrnl 23 July 2013: Testing folder journal." - Then the output should contain "Entry added" + Then we should get no error And the journal directory should contain 2013/07/23.txt @@ -14,7 +14,7 @@ Feature: Journals iteracting with the file system in a way that users can see Given we use the config "empty_folder.yaml" When we run "jrnl 23 July 2013: Testing folder journal." And we run "jrnl 3/7/2014: Second entry of journal." - Then the output should contain "Entry added" + Then we should get no error And the journal directory should contain 2013/07/23.txt diff --git a/tests/bdd/features/override.feature b/tests/bdd/features/override.feature index 1d66f470..edb43b2f 100644 --- a/tests/bdd/features/override.feature +++ b/tests/bdd/features/override.feature @@ -72,7 +72,6 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys And we use the password "test" if prompted When we run "jrnl --config-override journals.default features/journals/simple.journal 20 Mar 2000: The rain in Spain comes from clouds" Then we should get no error - And the output should contain "Entry added" When we run "jrnl -3 --config-override journals.default features/journals/simple.journal" Then the output should be 2000-03-20 09:00 The rain in Spain comes from clouds diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index 78e9a480..a38db59a 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -6,7 +6,7 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -on today should display entries created today Given we use the config "" When we run "jrnl today: Adding an entry right now." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -on today" Then the output should contain "Adding an entry right now." But the output should not contain "Everything is alright" @@ -21,11 +21,11 @@ Feature: Searching in a journal Scenario Outline: Displaying entries using -from day should display correct entries Given we use the config "" When we run "jrnl yesterday: This thing happened yesterday" - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl today at 11:59pm: Adding an entry right now." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl tomorrow: A future entry." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -from today" Then the output should contain "2 entries found" And the output should contain "Adding an entry right now." @@ -42,11 +42,11 @@ Feature: Searching in a journal Given we use the config "" And now is "2022-03-10 02:32:00 PM" When we run "jrnl yesterday: This thing happened yesterday" - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl today at 11:59pm: Adding an entry right now." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl tomorrow: A future entry." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -from yesterday -to today" Then the output should contain "2 entries found" And the output should contain "This thing happened yesterday" @@ -140,9 +140,9 @@ Feature: Searching in a journal Scenario: Out of order entries to a Folder journal should be listed in date order Given we use the config "empty_folder.yaml" When we run "jrnl 3/7/2014 4:37pm: Second entry of journal." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl 23 July 2013: Testing folder journal." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -2" Then the output should be 2013-07-23 09:00 Testing folder journal. diff --git a/tests/bdd/features/star.feature b/tests/bdd/features/star.feature index 5b81ec22..0359fca0 100644 --- a/tests/bdd/features/star.feature +++ b/tests/bdd/features/star.feature @@ -6,7 +6,7 @@ Feature: Starring entries Scenario Outline: Starring an entry will mark it in the journal file Given we use the config "" When we run "jrnl 20 july 2013 *: Best day of my life!" - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -on 2013-07-20 -starred" Then the output should contain "2013-07-20 09:00 Best day of my life!" @@ -34,6 +34,6 @@ Feature: Starring entries Given we use the config "encrypted.yaml" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 20 july 2013 *: Best day of my life!" - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit" Then the output should contain "2013-07-20 09:00 Best day of my life!" diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 335a33c0..33b81cdd 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -49,7 +49,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -n 1" Then the output should contain "2013-07-23 09:00 A cold and stormy day." @@ -64,7 +64,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "test" if prompted When we run "jrnl this is a partial --edit" - Then the output should contain "Entry added" + Then we should get no error Then the editor should have been called And the editor file content should be this is a partial @@ -128,7 +128,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -n 1" Then the output should not contain "Life is good" @@ -143,7 +143,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -1" Then the output should be 2014-04-24 09:00 Created a new website - empty.com. @@ -160,7 +160,7 @@ Feature: Writing new entries. Given we use the config "" And we use the password "bad doggie no biscuit" if prompted When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -n 1" Then the output should contain "🌞" And the output should contain "🐘" @@ -217,7 +217,7 @@ Feature: Writing new entries. Scenario: Title with an embedded period on DayOne journal Given we use the config "dayone.yaml" When we run "jrnl 04-24-2014: Ran 6.2 miles today in 1:02:03. I am feeling sore because I forgot to stretch." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -1" Then the output should be 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. @@ -226,7 +226,7 @@ Feature: Writing new entries. Scenario: Opening an folder that's not a DayOne folder should treat as folder journal Given we use the config "empty_folder.yaml" When we run "jrnl 23 july 2013: Testing folder journal." - Then the output should contain "Entry added" + Then we should get no error When we run "jrnl -1" Then the output should be "2013-07-23 09:00 Testing folder journal." @@ -313,3 +313,24 @@ Feature: Writing new entries. | basic_encrypted.yaml | | basic_folder.yaml | | basic_dayone.yaml | + + Scenario Outline: No "Entry added" message should appear when writing to the default journal + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl This is a new entry" + Then the output should not contain "Entry added" + And we should get no error + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + Scenario: An "Entry added" message should appear when writing to a non-default journal + Given we use the config "multiple.yaml" + And we use the password "test" if prompted + When we run "jrnl work This is a new entry" + Then the output should contain "Entry added to work journal" + And we should get no error From 3efe09ad72ba6bde6e060acef1a2f4b63784ec06 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 19:35:23 +0000 Subject: [PATCH 0714/1132] Update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index edd9d4e2..3c830095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ **Implemented enhancements:** +- Supress output if action is successful [\#1543](https://github.com/jrnl-org/jrnl/issues/1543) - Report number of entries found in a search [\#1454](https://github.com/jrnl-org/jrnl/issues/1454) +- Suppress "Entry added" message if using default journal [\#1561](https://github.com/jrnl-org/jrnl/pull/1561) ([micahellison](https://github.com/micahellison)) - Add message showing the number of search results [\#1524](https://github.com/jrnl-org/jrnl/pull/1524) ([apainintheneck](https://github.com/apainintheneck)) **Build:** From a107c868a0d0175468f6169157b141037214be38 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 19:40:35 +0000 Subject: [PATCH 0715/1132] Increment version to v3.2-beta --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 9809ae42..6481e4dd 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.1" +__version__ = "v3.2-beta" diff --git a/pyproject.toml b/pyproject.toml index b93e265f..0da60d5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.1" +version = "v3.2-beta" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From a923be53cdccafaea598a77749a37dc6fc181a2e Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 19:42:54 +0000 Subject: [PATCH 0716/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c830095..c3032c3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.2-beta](https://pypi.org/project/jrnl/v3.2-beta/) (2022-08-27) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1...v3.2-beta) **Implemented enhancements:** From 57adea3cc108f666e4ea76b7f69ef44703a61283 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 27 Aug 2022 13:56:03 -0700 Subject: [PATCH 0717/1132] Remove note about gh-pages branch that we no longer use (#1566) --- docs/contributing.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index d14220dc..d69f0599 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -29,8 +29,6 @@ If you find a typo or a mistake in the docs, please fix it right away and send a To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `poe docs-run` inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000). -The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch. - ### External editors and tips and tricks If you'd like to share a jrnl command line trick that you find useful, you may find it worthwhile to add it to the ["Tips and Tricks" section](tips-and-tricks.md). For advice on how to integrate a particular external editor, you can add to the ["External Editors" section](external-editors.md). From 11119a6143949c170a7320c86f9eb4ec0487566a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 20:57:48 +0000 Subject: [PATCH 0718/1132] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3032c3a..bd7cd3c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...HEAD) + +**Documentation:** + +- Remove note in contributing docs about gh-pages branch that we no longer use [\#1566](https://github.com/jrnl-org/jrnl/pull/1566) ([micahellison](https://github.com/micahellison)) + ## [v3.2-beta](https://pypi.org/project/jrnl/v3.2-beta/) (2022-08-27) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1...v3.2-beta) From fbb819d7a0090be63e7dbccd6dabf94507ad1258 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 27 Aug 2022 14:11:06 -0700 Subject: [PATCH 0719/1132] Update issue templates from markdown into yaml forms (#1567) * convert bug report from markdown to yaml * convert feature request from markdown to yaml * convert documentation template from markdown to yaml * convert support request template from markdown to yaml --- .github/ISSUE_TEMPLATE/bug_report.md | 42 ------------ .github/ISSUE_TEMPLATE/bug_report.yaml | 74 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/documentation.md | 31 --------- .github/ISSUE_TEMPLATE/documentation.yaml | 41 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 31 --------- .github/ISSUE_TEMPLATE/feature_request.yaml | 43 ++++++++++++ .github/ISSUE_TEMPLATE/support_request.md | 40 ----------- .github/ISSUE_TEMPLATE/support_request.yaml | 54 +++++++++++++++ 8 files changed, 212 insertions(+), 144 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml delete mode 100644 .github/ISSUE_TEMPLATE/documentation.md create mode 100644 .github/ISSUE_TEMPLATE/documentation.yaml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml delete mode 100644 .github/ISSUE_TEMPLATE/support_request.md create mode 100644 .github/ISSUE_TEMPLATE/support_request.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d546614f..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: ":new:, bug" -assignees: '' - ---- - -## Bug Report - - - -### Environment - - `jrnl --diagnostic` output: - - Install method: - -### Current Behavior - - -### Expected Behavior - - -### Repro Steps - - -### Other Information - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 00000000..0303209b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,74 @@ +name: Bug Report +description: Create a report to help us improve +title: "Bug Report" +labels: [ ":new:", "bug" ] +body: + - type: markdown + attributes: + value: | + # Bug Report + Hello, and thank you for reporting an issue! + + Please fill out the points below, as it will make our process much easier. + + - type: textarea + id: diagnostic + attributes: + label: Diagnostic output + description: Run `jrnl --diagnostic` and paste the output below + placeholder: Paste output here + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: Please put a short description of what is currently happening. + placeholder: Tell us what is happening + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: Please write a short description of what you would expect to happen + placeholder: Tell us what should be happening + validations: + required: true + + - type: textarea + id: repro-steps + attributes: + label: Repro Steps + description: | + Provide the steps to reproduce the problem. + + Please be as precise as possible, since more info will let us help you faster. + placeholder: Repro steps + validations: + required: true + + - type: textarea + id: debug-output + attributes: + label: Debug output + description: | + Please provide the output of your command with the `--debug` flag on. + placeholder: "example: `jrnl --debug lorem ipsum`" + validations: + required: true + + - type: textarea + id: other-info + attributes: + label: Other Information + description: > + Is there anything else we should know? + + (e.g. more detailed explanation, stacktraces, related + issues, suggestions how to fix, links for us to have context, eg. + stackoverflow, gitter, etc) + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md deleted file mode 100644 index dc186ee9..00000000 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Documentation Change -about: Request or report any updates to our documentation (https://jrnl.sh) -title: '' -labels: ":new:, documentation" -assignees: '' - ---- - -## Documentation Change - - -### Affected Page(s) - - - - -### What Could Be Better? - - -### Other Information - diff --git a/.github/ISSUE_TEMPLATE/documentation.yaml b/.github/ISSUE_TEMPLATE/documentation.yaml new file mode 100644 index 00000000..32e58533 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yaml @@ -0,0 +1,41 @@ +name: Documentation Change +description: Request or report any updates to our documentation (https://jrnl.sh) +title: Documentation Change +labels: [ ":new:", "documentation" ] +body: + - type: markdown + attributes: + value: | + # Documentation Change + Hello, and thank you for reporting an issue! + + Please fill out the points below, as it will make our process much easier. + + - type: textarea + id: affected-pages + attributes: + label: Affected Page(s) + description: > + Please tell us which page, or pages, from the documentation site + (https://jrnl.sh) are affected in this issue + placeholder: "example: https://jrnl.sh/en/stable/overview" + validations: + required: true + + - type: textarea + id: what-could-be-better + attributes: + label: What Could Be Better? + description: > + Please write a short description of what you hope can be clarified or + further explained. + validations: + required: true + + - type: textarea + id: other-info + attributes: + label: Other Information + description: Is there anything else we should know that might be helpful? + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index d9061604..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for jrnl -title: '' -labels: ":new:, enhancement" -assignees: '' - ---- - -## Feature Request - - -### Use Case/Motivation - - -### Example Usage - - -### Other information - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 00000000..ce0b8fb2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,43 @@ +name: Feature Report +description: Suggest an idea for jrnl +title: "Feature Report" +labels: [ ":new:", "enhancement" ] +body: + - type: markdown + attributes: + value: | + # Feature Request + Hello, and thank you for reporting an issue! + + Please fill out the points below, as it will make our process much easier. + + - type: textarea + id: user-case + attributes: + label: Use Case/Motivation + description: What is the motivation / use case for changing the behavior? + placeholder: Tell us about your idea + validations: + required: true + + - type: textarea + id: example-usage + attributes: + label: Example Usage + description: Please provide examples of the usage you would like to see. + placeholder: e.g `jrnl --new-flag="super cool new feature"` + validations: + required: true + + - type: textarea + id: other-info + attributes: + label: Other Information + description: > + Is there anything else we should know? + + (e.g. more detailed explanation, stacktraces, related + issues, suggestions how to fix, links for us to have context, eg. + stackoverflow, gitter, etc) + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md deleted file mode 100644 index e7d1a96f..00000000 --- a/.github/ISSUE_TEMPLATE/support_request.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: Support Request -about: Get help with jrnl -title: '' -labels: ":new:, support" -assignees: '' - ---- - -## Support Request - - -### Environment - - - Jrnl `--diagnostic` output: - - Install method: - -### What are you trying to do? - - -### What have you tried? - - -### Other Information - diff --git a/.github/ISSUE_TEMPLATE/support_request.yaml b/.github/ISSUE_TEMPLATE/support_request.yaml new file mode 100644 index 00000000..21c9bddc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.yaml @@ -0,0 +1,54 @@ +name: Support Request +description: Get help with jrnl +title: Support Request +labels: [ ":new:", "support" ] +body: + - type: markdown + attributes: + value: | + # Support Request + Hello, and thank you for reporting an issue! + + Please fill out the points below, as it will make our process much easier. + + - type: textarea + id: diagnostic + attributes: + label: Diagnostic output + description: Run `jrnl --diagnostic` and paste the output below + placeholder: Paste output here + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: What are you trying to do? + description: Please put a short description of what is happening. + placeholder: Tell us what is happening + validations: + required: true + + - type: textarea + id: tried + attributes: + label: What have you tried? + description: > + Have you tried anything to fix the problem? This can help give us more + information to help you with. + placeholder: Tell us what should be happening + validations: + required: true + + - type: textarea + id: other-info + attributes: + label: Other Information + description: > + Is there anything else we should know? + + (e.g. more detailed explanation, stacktraces, related + issues, suggestions how to fix, links for us to have context, eg. + stackoverflow, gitter, etc) + validations: + required: false From 0e2d16982b6272c02643f2b6629ff619754f43d8 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 27 Aug 2022 21:12:47 +0000 Subject: [PATCH 0720/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7cd3c0..89898de9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...HEAD) +**Implemented enhancements:** + +- Update issue & PR templates to use forms [\#1559](https://github.com/jrnl-org/jrnl/issues/1559) + **Documentation:** - Remove note in contributing docs about gh-pages branch that we no longer use [\#1566](https://github.com/jrnl-org/jrnl/pull/1566) ([micahellison](https://github.com/micahellison)) From 76392620be0e8314e437f471bc3d44e656975ae9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 27 Aug 2022 14:18:06 -0700 Subject: [PATCH 0721/1132] fix typo (#1569) --- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index ce0b8fb2..9d0494c4 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -1,4 +1,4 @@ -name: Feature Report +name: Feature Request description: Suggest an idea for jrnl title: "Feature Report" labels: [ ":new:", "enhancement" ] From 55e0162a87dab8e682945682ccb75c6eaebb0016 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 19:07:07 +0000 Subject: [PATCH 0722/1132] Increment version to v3.2 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index 6481e4dd..9c1e3fb9 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v3.2-beta" +__version__ = "v3.2" diff --git a/pyproject.toml b/pyproject.toml index 0da60d5b..ffeb8b27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v3.2-beta" +version = "v3.2" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From 8a7225a249c5d9292a35e8745f3184725b52f52a Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 19:09:06 +0000 Subject: [PATCH 0723/1132] Update changelog [ci skip] --- CHANGELOG.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89898de9..1cbb6b07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,12 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v3.2](https://pypi.org/project/jrnl/v3.2/) (2022-09-03) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...v3.2) **Implemented enhancements:** - Update issue & PR templates to use forms [\#1559](https://github.com/jrnl-org/jrnl/issues/1559) - -**Documentation:** - -- Remove note in contributing docs about gh-pages branch that we no longer use [\#1566](https://github.com/jrnl-org/jrnl/pull/1566) ([micahellison](https://github.com/micahellison)) - -## [v3.2-beta](https://pypi.org/project/jrnl/v3.2-beta/) (2022-08-27) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1...v3.2-beta) - -**Implemented enhancements:** - -- Supress output if action is successful [\#1543](https://github.com/jrnl-org/jrnl/issues/1543) -- Report number of entries found in a search [\#1454](https://github.com/jrnl-org/jrnl/issues/1454) - Suppress "Entry added" message if using default journal [\#1561](https://github.com/jrnl-org/jrnl/pull/1561) ([micahellison](https://github.com/micahellison)) - Add message showing the number of search results [\#1524](https://github.com/jrnl-org/jrnl/pull/1524) ([apainintheneck](https://github.com/apainintheneck)) @@ -27,6 +14,10 @@ - Quick fix follow up for actionlint [\#1565](https://github.com/jrnl-org/jrnl/pull/1565) ([wren](https://github.com/wren)) +**Documentation:** + +- Remove note in contributing docs about gh-pages branch that we no longer use [\#1566](https://github.com/jrnl-org/jrnl/pull/1566) ([micahellison](https://github.com/micahellison)) + ## [v3.1](https://pypi.org/project/jrnl/v3.1/) (2022-08-21) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.1-beta2...v3.1) From 37af7b8db60412051e9cdfd59cfe8134bcc2dca7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 12:21:52 -0700 Subject: [PATCH 0724/1132] Replace Dependabot with Renovate (#1575) * Add renovate.json * move renovate config file into .github dir * update config to match dependabot * remove old dependabot config * update prhourlylimit setting for renovate * fix typo Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Wren --- .github/dependabot.yml | 12 ------------ .github/renovate.json | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 070f47f8..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: pip - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 - reviewers: - - wren - - micahellison - labels: - - packaging diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..5aa9f254 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ], + "schedule": [ "at any time" ], + "prConcurrentLimit": 10, + "prHourlyLimit": 10, + "reviewers": [ + "wren", + "micahellison" + ], + "labels": [ "packaging" ] +} From 75008dcb1ac52cb87e980bd72b444d29ddc0bf2f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 19:23:33 +0000 Subject: [PATCH 0725/1132] Update changelog [ci skip] --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cbb6b07..b1f12c26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [Unreleased](https://github.com/jrnl-org/jrnl/) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2...HEAD) + +**Implemented enhancements:** + +- Add dependency security checks in CI [\#1488](https://github.com/jrnl-org/jrnl/issues/1488) + +**Build:** + +- Replace Dependabot [\#1560](https://github.com/jrnl-org/jrnl/issues/1560) +- Replace Dependabot with Renovate [\#1575](https://github.com/jrnl-org/jrnl/pull/1575) ([renovate[bot]](https://github.com/apps/renovate)) + ## [v3.2](https://pypi.org/project/jrnl/v3.2/) (2022-09-03) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...v3.2) From b2f53d48f77aa87dece1fa6e2c78a62072372a39 Mon Sep 17 00:00:00 2001 From: Paul Jimenez Date: Sat, 3 Sep 2022 15:48:37 -0400 Subject: [PATCH 0726/1132] Add hint for how to get vi to go to end-of-file (#1563) --- docs/tips-and-tricks.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index cebf2546..0c41cc81 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -211,3 +211,12 @@ display_format: markdown For more information on how `jrnl` outputs your entries in Markdown, please visit the [Formats](./formats.md) section. + +## Jump to end of buffer (with vi) + +To cause vi to jump to the end of the last line of the entry you edit, in your config file set: + +```yaml +editor: vi + -c "call cursor('.',strwidth(getline('.')))" +``` + From 49fc1e4e407b60a96ba8bf0687a9ee0bc47e07be Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 3 Sep 2022 12:49:43 -0700 Subject: [PATCH 0727/1132] Update to use renamed flag for brew bump-formula-pr --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5e60c90b..d5d340d4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -196,7 +196,7 @@ jobs: --url $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json) --sha256 $(jq ".releases[\"${PYPI_VERSION}\"][1].digests.sha256" -r api_response.json) --no-audit - --write + --write-only --force - name: Create Pull Request From 4d4f3285277fffdf0ea3cbaebdee0ffb8f9a9a8d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 19:51:36 +0000 Subject: [PATCH 0728/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1f12c26..92197f25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,13 @@ **Build:** - Replace Dependabot [\#1560](https://github.com/jrnl-org/jrnl/issues/1560) +- Update to use renamed flag for `brew bump-formula-pr` [\#1587](https://github.com/jrnl-org/jrnl/pull/1587) ([wren](https://github.com/wren)) - Replace Dependabot with Renovate [\#1575](https://github.com/jrnl-org/jrnl/pull/1575) ([renovate[bot]](https://github.com/apps/renovate)) +**Documentation:** + +- Add hint for how to get vi to go to end-of-file [\#1563](https://github.com/jrnl-org/jrnl/pull/1563) ([pjz](https://github.com/pjz)) + ## [v3.2](https://pypi.org/project/jrnl/v3.2/) (2022-09-03) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...v3.2) From 06a5dab129cad1c4b7603045f95218d55184fadf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:02:37 -0700 Subject: [PATCH 0729/1132] Update actions/setup-python action to v4 (#1583) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/actions/run_tests/action.yaml | 2 +- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/run_tests/action.yaml b/.github/actions/run_tests/action.yaml index 9ab6c6ca..0c57c918 100644 --- a/.github/actions/run_tests/action.yaml +++ b/.github/actions/run_tests/action.yaml @@ -11,7 +11,7 @@ runs: shell: bash - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 29da43be..5b4882d5 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d5d340d4..a8cc5aae 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,7 +66,7 @@ jobs: echo "JRNL_VERSION=$JRNL_VERSION" >> "$GITHUB_ENV" - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.9 From 7b2e2de3df42572a53d0f700d82871d71f5ba61f Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 20:04:21 +0000 Subject: [PATCH 0730/1132] Update changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92197f25..4ec1fa8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ - Add hint for how to get vi to go to end-of-file [\#1563](https://github.com/jrnl-org/jrnl/pull/1563) ([pjz](https://github.com/pjz)) +**Packaging:** + +- Update actions/setup-python action to v4 [\#1583](https://github.com/jrnl-org/jrnl/pull/1583) ([renovate[bot]](https://github.com/apps/renovate)) + ## [v3.2](https://pypi.org/project/jrnl/v3.2/) (2022-09-03) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...v3.2) From cc703ae3c6ca9302f39ebed8aaae86b192d84b97 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:11:08 -0700 Subject: [PATCH 0731/1132] Update actions/cache action to v3 (#1581) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/actions/run_tests/action.yaml | 2 +- .github/workflows/docs.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/run_tests/action.yaml b/.github/actions/run_tests/action.yaml index 0c57c918..918289a9 100644 --- a/.github/actions/run_tests/action.yaml +++ b/.github/actions/run_tests/action.yaml @@ -20,7 +20,7 @@ runs: shell: bash - name: poetry cache # Change CACHE_STRING secret to bust the cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .venv key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ inputs.cache-string }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5b4882d5..b9416ceb 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -46,13 +46,13 @@ jobs: run: echo "PYTHON_FULL_VERSION=$(python --version)" >> "$GITHUB_ENV" - name: poetry cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .venv key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} - name: npm cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: node_modules key: ${{ runner.os }}-pa11y-v3 From adc505cef9d2f12f46ee78ca485bd469503d1773 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:12:12 -0700 Subject: [PATCH 0732/1132] Update peter-evans/create-pull-request action to v4 (#1585) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a8cc5aae..67b01175 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -200,7 +200,7 @@ jobs: --force - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: path: ${{ env.BREW_TAP_DIRECTORY }} token: ${{ secrets.JRNL_BOT_TOKEN }} From 080fcde440299ba2d9d1a1b2e61f3db9d6082d86 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 20:13:58 +0000 Subject: [PATCH 0733/1132] Update changelog [ci skip] --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ec1fa8a..4107b7cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,16 +12,15 @@ - Replace Dependabot [\#1560](https://github.com/jrnl-org/jrnl/issues/1560) - Update to use renamed flag for `brew bump-formula-pr` [\#1587](https://github.com/jrnl-org/jrnl/pull/1587) ([wren](https://github.com/wren)) +- Update peter-evans/create-pull-request action to v4 [\#1585](https://github.com/jrnl-org/jrnl/pull/1585) ([renovate[bot]](https://github.com/apps/renovate)) +- Update actions/setup-python action to v4 [\#1583](https://github.com/jrnl-org/jrnl/pull/1583) ([renovate[bot]](https://github.com/apps/renovate)) +- Update actions/cache action to v3 [\#1581](https://github.com/jrnl-org/jrnl/pull/1581) ([renovate[bot]](https://github.com/apps/renovate)) - Replace Dependabot with Renovate [\#1575](https://github.com/jrnl-org/jrnl/pull/1575) ([renovate[bot]](https://github.com/apps/renovate)) **Documentation:** - Add hint for how to get vi to go to end-of-file [\#1563](https://github.com/jrnl-org/jrnl/pull/1563) ([pjz](https://github.com/pjz)) -**Packaging:** - -- Update actions/setup-python action to v4 [\#1583](https://github.com/jrnl-org/jrnl/pull/1583) ([renovate[bot]](https://github.com/apps/renovate)) - ## [v3.2](https://pypi.org/project/jrnl/v3.2/) (2022-09-03) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...v3.2) From 0d7acafc44d1b6535b2906b0282bf39f796b0c02 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:16:18 -0700 Subject: [PATCH 0734/1132] Update actions/checkout action to v3 (#1582) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/changelog.yaml | 2 +- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/testing_pipelines.yaml | 2 +- .github/workflows/testing_prs.yaml | 2 +- .github/workflows/testing_schedule.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index e9d56d37..c3f8037f 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: token: ${{ secrets.JRNL_BOT_TOKEN }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index b9416ceb..becd704c 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -32,7 +32,7 @@ jobs: os: [ ubuntu-latest ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 67b01175..62614b2d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -71,7 +71,7 @@ jobs: python-version: 3.9 - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.JRNL_BOT_TOKEN }} diff --git a/.github/workflows/testing_pipelines.yaml b/.github/workflows/testing_pipelines.yaml index e868a63a..48da48e4 100644 --- a/.github/workflows/testing_pipelines.yaml +++ b/.github/workflows/testing_pipelines.yaml @@ -26,7 +26,7 @@ jobs: os: [ ubuntu-latest ] steps: - run: git config --global core.autocrlf false - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check workflow files uses: docker://rhysd/actionlint:latest with: diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml index 11a1384b..cc76a866 100644 --- a/.github/workflows/testing_prs.yaml +++ b/.github/workflows/testing_prs.yaml @@ -39,7 +39,7 @@ jobs: os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - run: git config --global core.autocrlf false - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Run tests uses: ./.github/actions/run_tests with: diff --git a/.github/workflows/testing_schedule.yaml b/.github/workflows/testing_schedule.yaml index ce29de64..9879bd26 100644 --- a/.github/workflows/testing_schedule.yaml +++ b/.github/workflows/testing_schedule.yaml @@ -21,7 +21,7 @@ jobs: os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - run: git config --global core.autocrlf false - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Run tests uses: ./.github/actions/run_tests with: From 43d7dc026c6fd79fcd61cbc391c22db0d318cf88 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:16:28 -0700 Subject: [PATCH 0735/1132] Pin dependencies (#1577) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs_theme/requirements.txt | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs_theme/requirements.txt b/docs_theme/requirements.txt index 026d756c..b0164ff7 100644 --- a/docs_theme/requirements.txt +++ b/docs_theme/requirements.txt @@ -1,2 +1,2 @@ -mkdocs>=1.0,<1.3 +mkdocs==1.2.4 jinja2==3.0.3 # https://github.com/readthedocs/readthedocs.org/issues/9037 diff --git a/package-lock.json b/package-lock.json index 8459ebe7..aa3cf946 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "devDependencies": { - "pa11y-ci": ">=3.0.1" + "pa11y-ci": "3.0.1" } }, "node_modules/@types/node": { diff --git a/package.json b/package.json index 28cf4eeb..a2c97337 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "devDependencies": { - "pa11y-ci": ">=3.0.1" + "pa11y-ci": "3.0.1" } } From a3ce9bdb5572f82a11d443c665a9ae077954abb0 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 3 Sep 2022 20:18:05 +0000 Subject: [PATCH 0736/1132] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4107b7cc..692a0d71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Update to use renamed flag for `brew bump-formula-pr` [\#1587](https://github.com/jrnl-org/jrnl/pull/1587) ([wren](https://github.com/wren)) - Update peter-evans/create-pull-request action to v4 [\#1585](https://github.com/jrnl-org/jrnl/pull/1585) ([renovate[bot]](https://github.com/apps/renovate)) - Update actions/setup-python action to v4 [\#1583](https://github.com/jrnl-org/jrnl/pull/1583) ([renovate[bot]](https://github.com/apps/renovate)) +- Update actions/checkout action to v3 [\#1582](https://github.com/jrnl-org/jrnl/pull/1582) ([renovate[bot]](https://github.com/apps/renovate)) - Update actions/cache action to v3 [\#1581](https://github.com/jrnl-org/jrnl/pull/1581) ([renovate[bot]](https://github.com/apps/renovate)) - Replace Dependabot with Renovate [\#1575](https://github.com/jrnl-org/jrnl/pull/1575) ([renovate[bot]](https://github.com/apps/renovate)) @@ -21,6 +22,10 @@ - Add hint for how to get vi to go to end-of-file [\#1563](https://github.com/jrnl-org/jrnl/pull/1563) ([pjz](https://github.com/pjz)) +**Packaging:** + +- Pin dependencies [\#1577](https://github.com/jrnl-org/jrnl/pull/1577) ([renovate[bot]](https://github.com/apps/renovate)) + ## [v3.2](https://pypi.org/project/jrnl/v3.2/) (2022-09-03) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v3.2-beta...v3.2) From 0618ff57e4bf927677ae92bdf1344c5ef7e56ad5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:22:46 -0700 Subject: [PATCH 0737/1132] Update dependency jinja2 to v3.1.2 (#1579) * Update dependency jinja2 to v3.1.2 * Remove old unneeded comment from requirements.txt Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Micah Jerome Ellison --- docs_theme/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_theme/requirements.txt b/docs_theme/requirements.txt index b0164ff7..ac5f9b8f 100644 --- a/docs_theme/requirements.txt +++ b/docs_theme/requirements.txt @@ -1,2 +1,2 @@ mkdocs==1.2.4 -jinja2==3.0.3 # https://github.com/readthedocs/readthedocs.org/issues/9037 +jinja2==3.1.2 From a95cd333d5b3cab3ddc2a1ddf0dbdac1530e48d7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:23:37 -0700 Subject: [PATCH 0738/1132] Update dependency typed.js to v2.0.12 (#1578) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs_theme/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_theme/index.html b/docs_theme/index.html index 1cd3e2dc..96d35ebe 100644 --- a/docs_theme/index.html +++ b/docs_theme/index.html @@ -103,7 +103,7 @@ License: https://www.gnu.org/licenses/gpl-3.0.html

- + + +