Commit graph

1162 commits

Author SHA1 Message Date
Suhas
4f79803885
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 e6c0a16342
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
2021-03-02 18:47:57 -08:00
Jrnl Bot
b99cebcee6 Update changelog [ci skip] 2021-02-27 19:05:55 +00:00
Jrnl Bot
2ac4bab4d5 Increment version to v2.7.1 2021-02-27 19:04:21 +00:00
Jrnl Bot
f7c78f63a0 Update changelog [ci skip] 2021-02-27 18:55:07 +00:00
Suhas
67682e7e93
Add per-journal config documentation (#1199)
* update documentation with example config

* make format

* clarify meaning of config
2021-02-27 10:53:21 -08:00
Jrnl Bot
e6c0a16342 Update changelog [ci skip] 2021-02-20 19:52:38 +00:00
Jrnl Bot
021ec61a81 Increment version to v2.7.1-beta 2021-02-20 19:50:52 +00:00
Jrnl Bot
0e90342b02 Update changelog [ci skip] 2021-02-20 19:32:09 +00:00
dependabot[bot]
487b0c44ae
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-20 11:30:33 -08:00
Jrnl Bot
76fd132409 Update changelog [ci skip] 2021-02-13 19:15:50 +00:00
dependabot[bot]
0d61e102c0
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-13 11:14:13 -08:00
dependabot[bot]
3df5c62b5e
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-13 11:14:03 -08:00
dependabot[bot]
2244672e33
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-13 11:13:24 -08:00
Micah Jerome Ellison
dc776b171a
Fix case on documentation tag in issue template 2021-02-06 14:10:21 -08:00
Jrnl Bot
3f3bdbeeda Update changelog [ci skip] 2021-02-06 20:19:19 +00:00
dependabot[bot]
115f790210
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-06 12:17:40 -08:00
Jrnl Bot
eca002ac29 Update changelog [ci skip] 2021-01-30 21:49:37 +00:00
dependabot[bot]
6e28b0b4a1
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-30 13:48:08 -08:00
dependabot[bot]
fbb40b75f6
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-30 13:47:37 -08:00
Jonathan Wren
ea845a8408
Make journal selection behavior more consistent when there's a colon with no date (#1164) 2021-01-30 13:47:26 -08:00
Jrnl Bot
ac0c49918d Update changelog [ci skip] 2021-01-30 21:34:06 +00:00
Micah Jerome Ellison
bd1c5c3f62
Add brew and gitter badges to README 2021-01-30 13:31:24 -08:00
eshrh
8a78c34917
Support title splitting for fullwidth CJK terminals (#1163)
* Split by fullwidth terminals without spaces.
* Add test
* Update write.feature
2021-01-23 15:29:43 -08:00
Jrnl Bot
ef563c807f Update changelog [ci skip] 2021-01-23 22:51:22 +00:00
Jrnl Bot
a32070b08a Increment version to v2.7 2021-01-23 22:49:45 +00:00
Jrnl Bot
9f386163a4 Update changelog [ci skip] 2021-01-23 21:37:04 +00:00
Micah Jerome Ellison
897943857d
Simplify VS Code documentation for all platforms and add note about PATH variable (#1160) 2021-01-23 13:35:32 -08:00
Jrnl Bot
b535782621 Update changelog [ci skip] 2021-01-23 21:29:43 +00:00
dependabot[bot]
ea7357ca26
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-23 13:27:54 -08:00
Jonathan Wren
f80f033d5d
fix typos 2021-01-17 11:22:02 -08:00
Jrnl Bot
99d0198530 Update changelog [ci skip] 2021-01-17 01:42:03 +00:00
Jonathan Wren
c06b5cf297
Fix homebrew release, add options for relase pipeline (#1154) 2021-01-16 17:40:09 -08:00
Jrnl Bot
2e254d55fb Update changelog [ci skip] 2021-01-16 23:22:56 +00:00
Jrnl Bot
b117c7a260 Increment version to v2.7-beta 2021-01-16 23:20:59 +00:00
Micah Jerome Ellison
9e6cd8820f
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
2021-01-16 15:19:11 -08:00
Jrnl Bot
b6b6e7750e Update changelog [ci skip] 2021-01-16 22:57:15 +00:00
Karim Rahal
f0e8fa2060
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
2021-01-16 14:55:27 -08:00
Jrnl Bot
18058c74e5 Update changelog [ci skip] 2021-01-16 22:52:40 +00:00
Karim Rahal
a6b828e892
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'
2021-01-16 14:50:47 -08:00
Seopril
5c0a2d4c4e
Fix YAML export formatting(#1065) (#1150)
* Fix YAML export syntax
* Fix YAML body block indentation
2021-01-16 14:44:55 -08:00
Jrnl Bot
61f8406412 Update changelog [ci skip] 2021-01-09 20:40:42 +00:00
Seopril
dbd12fc500
Clarify installation documentation (#1097) (#1137)
* Clarify installation documentation (#1097)
* Update installation docs
2021-01-09 12:39:06 -08:00
Jrnl Bot
08a0c2d11f Update changelog [ci skip] 2021-01-09 19:08:44 +00:00
Gustavo Matias
6980ed1906
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.
2021-01-09 11:07:03 -08:00
Micah Jerome Ellison
c155bafa84
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
2021-01-02 15:19:44 -08:00
Jrnl Bot
e0c53c28bb Update changelog [ci skip] 2021-01-02 22:55:45 +00:00
Jonathan Wren
f041402533
Add packaging label to included sections in changelog (#1140) 2021-01-02 14:53:54 -08:00
Jrnl Bot
bddec64faa Update changelog [ci skip] 2021-01-02 21:28:22 +00:00
Karim Rahal
57de4f9ba4
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
2021-01-02 13:26:45 -08:00
Jrnl Bot
9f1bef7fde Update changelog [ci skip] 2021-01-02 21:24:55 +00:00