Commit graph

119 commits

Author SHA1 Message Date
Jonathan Wren
c1eb0c54a3
Add type-checking plugin to linting checks (#1629)
* add type-checking plugin for flakeheaven

* update lock file

* fix type-checking issues in current codebase

* run linters
2022-11-03 07:18:35 -07:00
Jonathan Wren
51e9ce5638
Move existing linting into flakeheaven (#1628)
* add black and isort to flakeheaven

* update lock file

* clean up poe config

* run formta on python blocks in markdown file

* disable code for black being confused about markdown

* add cache timeout for flakeheaven

See: https://github.com/flakeheaven/flakeheaven/issues/71
2022-10-31 09:31:17 -07:00
Micah Jerome Ellison
74b7ac834e
Drop Python 3.9 and use Python 3.11 official release (#1611)
* Drop Python 3.9 and use Python 3.11 release instead of pre-release
* Run poetry lock
* Fix need for quoted 3.10 string
* Use 3.11.0-rc.2 for Python 3.11 for now
* Update minimum Python version in installation docs
* Change Python 3.11 RC version to 3.11
* Run docs and release workflows on Python 3.11
* Including Python 3.12 in allowable versions
* Restore poetry.lock from develop
* Run poetry lock --no-update
* Retrieve poetry.lock from develop and lock with --no-update
* poetry lock --no-update
2022-10-29 14:36:50 -07:00
Jonathan Wren
a77a3d5a56
Replace flake8 with flakeheaven in linting steps (#1625)
* replace flake8 with flakeheaven

* update pyproject.toml for new flake tool

* update lock file

* change flake8 to flakeheaven in tests

* undo fix for poetry

* remove unused plugin marker for flakeheaven

* remove unused import in markdown file

* Attempt to exclude .venv from flakeheaven runs in CI

* Exclude more dirs from flakeheaven

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2022-10-29 14:21:11 -07:00
Jrnl Bot
415fc336ec Increment version to v3.3 2022-10-29 19:19:53 +00:00
Jrnl Bot
ffdd4f923d Increment version to v3.3-beta2 2022-10-22 22:38:31 +00:00
Jrnl Bot
41e5d5ffff Increment version to v3.3-beta 2022-10-08 20:49:59 +00:00
Jrnl Bot
55e0162a87 Increment version to v3.2 2022-09-03 19:07:07 +00:00
Jrnl Bot
a107c868a0 Increment version to v3.2-beta 2022-08-27 19:40:35 +00:00
Jrnl Bot
b26fdb424b Increment version to v3.1 2022-08-21 22:22:00 +00:00
Jonathan Wren
671f403602
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 <micah.jerome.ellison@gmail.com>
2022-08-21 13:47:25 -07:00
Jrnl Bot
6f4e669e0d Increment version to v3.1-beta2 2022-08-13 21:03:51 +00:00
Jrnl Bot
6ade0da597 Increment version to v3.1-beta 2022-07-30 19:51:10 +00:00
outa
62f65ce3b9
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
2022-07-30 12:46:43 -07:00
Jonathan Wren
c45bed7f6c
Disable gherkin reporter to fix failing test suite (#1540) 2022-07-16 14:13:48 -07:00
Jrnl Bot
50b320063a Increment version to v3.0 2022-07-09 19:02:32 +00:00
Jonathan Wren
db6f80d721
Limit pytest-bdd to <6.0 to temporarily avoid breaking changes (#1536)
This will unblock other tests for now
2022-07-09 11:54:15 -07:00
Jrnl Bot
97cb7a678e Increment version to v3.0-beta2 2022-06-25 21:46:02 +00:00
Jonathan Wren
0f2962a95f
Add and run isort on Python files (#1520)
* add and run isort

* udpate more import statements

* fix typo
2022-06-25 14:43:32 -07:00
Jonathan Wren
20254f7434
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
2022-06-25 13:12:52 -07:00
Jonathan Wren
23bc0f2c8f
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
2022-06-25 12:45:39 -07:00
Jonathan Wren
28051046d5
Update maintainer email (#1515) 2022-06-25 11:51:19 -07:00
Jonathan Wren
7dccc469b5
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
2022-06-18 11:54:28 -07:00
Jonathan Wren
51ab747019
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
2022-06-18 11:36:56 -07:00
Jrnl Bot
7e7d374263 Increment version to v3.0-beta 2022-06-11 21:09:10 +00:00
Jonathan Wren
f53110c69b
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 <micah.jerome.ellison@gmail.com>
2022-06-11 13:32:11 -07:00
Micah Jerome Ellison
11209b4b42
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
2022-05-21 14:13:24 -07:00
Kevin
ea6df4705c
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 <jonathan@nowandwren.com>
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2022-05-21 14:06:07 -07:00
Micah Jerome Ellison
d405e92292
Remove sample format and its asteval dependency (#1436) 2022-03-26 11:35:14 -07:00
Micah Jerome Ellison
d3de5b778b
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
2022-03-12 13:24:31 -08:00
Micah Jerome Ellison
117e0de5bc
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
2022-02-12 14:07:56 -08:00
Jrnl Bot
72fea986d0 Increment version to v2.8.4 2022-02-12 20:41:34 +00:00
Jrnl Bot
cfeb9e01b7 Increment version to v2.8.4-beta2 2022-02-05 21:08:19 +00:00
Jrnl Bot
2244f1ff77 Increment version to v2.8.4-beta1 2021-12-11 20:40:10 +00:00
Jrnl Bot
7a70bbc51e Increment version to v2.8.4-beta 2021-11-06 21:25:54 +00:00
Micah Jerome Ellison
06ee6db7e7
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
2021-11-06 14:18:00 -07:00
Fabian Affolter
c68c13ab6e
Switch to poetry-core (#1359) 2021-10-23 12:17:32 -07:00
Jonathan Wren
44edb9bdee
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 <micah.jerome.ellison@gmail.com>

* 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 <micah.jerome.ellison@gmail.com>
2021-10-09 12:10:08 -07:00
Jrnl Bot
8ccaf4ac1d Increment version to v2.8.3 2021-09-06 19:43:07 +00:00
Jrnl Bot
a32aefe541 Increment version to v2.8.3-beta 2021-08-28 22:58:59 +00:00
Jrnl Bot
eaaa7bb0e1 Increment version to v2.8.2 2021-07-31 19:10:05 +00:00
Jrnl Bot
f158d7f266 Increment version to v2.8.2-beta 2021-07-17 22:16:08 +00:00
Micah Jerome Ellison
31f782e333
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
2021-07-17 13:22:01 -07:00
Micah Jerome Ellison
2723e1cfb5
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 <jonathan@nowandwren.com>

* Add continue-on-error for 3.10

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>

* 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 31e538300e.

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-10 12:13:15 -07:00
Jonathan Wren
cdad0d6289 Replace pyflakes with flake8 for linting 2021-07-03 15:49:18 -07:00
Jonathan Wren
3ddfb4d594 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 <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
849ed16d67 Install pytest-icdiff and run poetry lock
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
3b044e3044 Ignore IO errors on Windows
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
3055cca767 Add tests for core feature to pytest-bdd
- Implement "the output should contain" step

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
1390493a29 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 <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00