Skip to content
Commits on Source (133)
......@@ -128,9 +128,6 @@ docs/_templates
docs/index.html
# useless scripts
test_main.py
# backup files
*~
......@@ -142,3 +139,6 @@ pyinstaller
# link to setup.py
setup.py
# TabNine
.tabnine*
# This file is a template, and might need editing before it works on your project.
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: python:latest
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# faster jobs
DOCKER_DRIVER: overlay2
DOCKER_DRIVER: overlay2
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
......@@ -27,51 +27,121 @@ before_script:
- virtualenv venv
- source venv/bin/activate
## build
wheel:
stage: build
stage: build
script:
- python setup_core.py bdist_wheel
- python setup_core.py clean --all
- python setup_qt.py bdist_wheel
# an alternative approach is to install and run:
- pip install dist/*
# run the command here
artifacts:
paths:
- dist/*.whl
expire_in: 1 week
expire_in: 1 week
pages:
stage: build
script: useful_for_devs/docs_all_branches.sh
artifacts:
paths:
- public
only:
- master
- schedules
## tests
pytest:
stage: test
# templates
.pytest:
stage: test
before_script:
- pip install pytest hypothesis
script:
- python -m pytest --junitxml=report.xml
# - pip install tox flake8 # you can also use tox
# - tox -e py36,flake8
artifacts:
reports:
junit: report.xml
except:
- /^0\.1\.[0-9x]$/
.pytest-pypy:
stage: test
before_script:
- pip install .[test] | pip install pytest hypothesis
script:
- python setup_core.py test
- pypy3 -m pytest --junitxml=report.xml
# - pip install tox flake8 # you can also use tox
# - tox -e py36,flake8
artifacts:
reports:
junit: report.xml
except:
- /^0\.[1-3]\.[0-9x]$/
# test older python
pytest-3.4:
extends: ".pytest"
stage: "test"
image: "python:3.4"
pytest-3.5:
extends: ".pytest"
stage: "test"
image: "python:3.5"
pytest-3.6:
extends: ".pytest"
stage: "test"
image: "python:3.6"
pytest-3.7:
extends: ".pytest"
stage: "test"
image: "python:3.7"
pytest-3.8:
extends: ".pytest"
stage: "test"
image: "python:3.8"
# test latest python
#
# pytest-3.9:
# extends: ".pytest"
# stage: "test"
# image: "python:3.9"
# pypy test
pytest-pypy-latest:
extends: ".pytest-pypy"
stage: "test"
image: "pypy:latest"
pylint:
stage: test
stage: test
before_script:
- ln -s setup_core.py setup.py
- pip install pylint pylint-exit anybadge .[test]
script:
- pylint --rcfile=useful_for_devs/pylintrc --ignore=components,yamllang.py prettyetc tests | tee pylint.txt || pylint-exit $?
- pylint --rcfile=.pylintrc --ignore=components,yamllang.py prettyetc prettyetc_qt/prettyetc_qt tests | tee pylint.txt || pylint-exit $?
# create badge
- score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' pylint.txt)
- anybadge --value="$score" --file=pylint.svg --label="lint on $CI_COMMIT_REF_NAME" 2=red 4=orange 8=yellow 10=green
- anybadge --value="$score" --file=pylint.svg --label="lint result" 2=red 4=orange 8=yellow 10=green
artifacts:
paths:
- pylint.svg
pages:
stage: deploy
script: useful_for_devs/docs_all_branches.sh
artifacts:
paths:
- public
only:
- 0.1.x
- schedules
only:
- master
- tags
......@@ -5,5 +5,6 @@ First stable release.
Fix some bugs in setups.
Improve README.rst
0.2.0rc1
See https://prettyetc.gitlab.io/prettyetc-core/0.2.x/changelog/0.2.x for changelog
Starting from 0.2.x version series, the changelog was moved into docs pages:
https://prettyetc.gitlab.io/prettyetc/index.html
......@@ -2,7 +2,7 @@
PrettyEtc
=========
See your configuration files using a pretty and universal GUI interface.
Browse your configuration files in a visual way with a pretty and universal interface.
Prettyetc shows your configs in a multitabbed window,
each one being displayed as a foldable tree.
......@@ -40,7 +40,7 @@ Or from sources:
python setup_qt.py clean --all
pip install --user dist/*.whl.
If you want only the core: :code:`pip install prettyetc-core`.
If you want only the core: :code:`pip install prettyetc`.
Or from sources:
......@@ -86,7 +86,7 @@ Core features
For a detailed explanation of core features,
we suggest to go to the official API documentation of prettyetc components.
Documentation: `<https://prettyetc.gitlab.io/prettyetc-core>`_
Documentation: `<https://prettyetc.gitlab.io/prettyetc>`_
The documentation also contains instruction to create your custom plugin
and how to deploy it.
......
......@@ -185,7 +185,7 @@ Fixes:
Changes:
- comparison operators (<,<=, >=, >) now raise a TypeError
if the other object is not an instance of Field.
if the other object is not an instance of Field.
0.2.0rc3
......
======================
0.3.x series changelog
======================
This page contains a summary of the changelog for the 0.3.x version series
and the detailed version.
Summary
-------
**UI**
The UI has received some big changes in its internal structure,
standardizing and modularizing it.
A new details view for showing field description and attributes.
Settings view has less pages and more organized with some new configs.
UI support themes, 8 are built-in.
.. tip::
If you are an end user that use only the ui,
the sections below might not interest you.
**CORE**
Little improvements are made in this release.
RootField now supports configuration source code, before it's very difficult
to get the code outside ConfigStream or ConfigFile.
The etc parser was rewritten using the `lark-parser <https://github.com/lark-parser/lark>`_ library
the old parser is still avaiable if the lark-parser library is not.
Other small changes are done, see the complete changelog below for more informations.
**BASE UI**
Very big changes are made in this package (some can be breaking).
A new package for ui helper components is avaiable.
The components in the package follow (when necessary), a common lifecycle pattern
that have 3 phases: init, show and close.
The old classes BaseMainUi and BaseSettingsUi was enchanted, moved and renamed in the ui package.
The BaseMainUi class is still avaiable in the baseui.main module.
The settings manager now support object caching.
See the documentation of all components for more informations.
0.3.1
-----
**UI**
Fixes:
- missing qss themes
**BaseUi**
- missing baseui.ui package
0.3.0
-----
**UI**
Fixes:
- an unwanted window shows when the first file selected from open is opened
**Etccore**
Fixes:
- xml parser fails if element text is None
0.3.0a1
-------
**UI**
Adds:
- Prettyetc logo to the window (with resource).
- File view (where configuration files are displayed) now can have differents views.
- Source view to file views.
- Default view key in settings.
Fixes:
- Useless "Restore default" button.
- Cancel button restores the saved settings.
- remove baseui subpackages in qtui wheel.
Changes:
- View of a single field now has its dedicated widget.
- All Ui views has received a big rewrite,
using the new set of ui components from :class:`~prettyetc.baseui.ui` package.
- The toolbar becomes hidden in Windows.
**Etccore**
Adds:
- source attribute to :class:`~prettyetc.etccore.langlib.root.RootField` class.
- (WIP) etc language parser using the lark-parser library.
- 2 new Exception handler for INI parser.
Fixes:
- Unexpected error if the file given to
:class:`~prettyetc.etccore.confmgr.ConfigFile` is not readable.
- Unhandled error in :meth:`~prettyetc.etccore.confmgr.ConfigFile.automatch` method
if the filename parser exists, but it can't parse the file.
Removes:
- clone method of :class:`~prettyetc.etccore.plugins.PluginBase` class as it isn't used.
**BaseUi**
Adds:
- :mod:`~prettyetc.baseui.ui` package, containing all the ui bases.
- :class:`~prettyetc.baseui.ui.common.CommonComponent` class, that have a lifecycle structure.
- :mod:`~prettyetc.baseui.ui.field` module,
containing some helper classes to develop and manage quickly the field tree.
- :meth:`~prettyetc.baseui.ui.main.BaseMain.read_file` callable property to read the file.
- :class:`~prettyetc.baseui.settings.SettingsManager` class now cache its object (if the stream has name).
- :meth:`prettyetc.baseui.settings.SettingsManager.factory` class method
to create SettingsManager object from the given input (input processing depends to input type).
- :meth:`~prettyetc.baseui.settings.SettingsManager.init_default`
method to set default configuration keys.
- :meth:`~prettyetc.baseui.settings.SettingsManager.reset`
method for reseting settings.
- [] operator support for :class:`~prettyetc.baseui.settings.SettingsManager` class.
- :meth:`~prettyetc.baseui.ui.settings.BaseSettings.reset` method for reseting settings.
- :func:`~prettyetc.baseui.ui.utils.read_autoselect` function to preserve
:meth:`prettyetc.baseui.ui.main.BaseMain.open_config_file` in-place behaviour.
Fixes:
- :class:`prettyetc.baseui.main.UiLauncher` class use the full lifecycle of
:class:`prettyetc.baseui.ui.main.BaseMain`.
Changes:
- :class:`prettyetc.baseui.BaseMainUi` class was renamed and moved to
:class:`prettyetc.baseui.ui.main.BaseMain`.
- :class:`prettyetc.baseui.main.UiLauncher` class use
:meth:`prettyetc.baseui.ui.main.BaseMain.read_file`
for reading file from given paths by command-line.
- :class:`prettyetc.baseui.settings.BaseSettingsUi` class was renamed and moved to
:class:`prettyetc.baseui.ui.settings.BaseSettings`.
- :class:`prettyetc.baseui.settings.SettingsManager` class now use the homebase library.
- :class:`prettyetc.etccore.confmgr.ConfigStream` class now raise a BadInput
if the given stream is invalid.
Removes:
- :class:`prettyetc.baseui.ui.settings.BaseSettings` class no longer use the homebase library.
Deprecations:
- :meth:`prettyetc.baseui.ui.main.BaseMain.open_config_file` method,
use :meth:`prettyetc.baseui.ui.main.BaseMain.read_file` instead.
- :meth:`~prettyetc.baseui.ui.settings.BaseSettings.init_config`,
use :meth:`~prettyetc.baseui.settings.SettingsManager.init_default` instead in init_ui.
0.3.0a2
-------
**UI**
Adds:
- field details view.
- stylesheet and palette themes.
Fixes:
- BaseFieldItem.description returns field name instead of field description.
Changes:
- settings names and structures.
Removes:
- unused settings in both settings and view-
**Etccore**
Adds:
- :meth:`~prettyetc.etccore.langlib.root.RootField.find_by_attr`
method for searching fields in tree.
Changes:
- make all members of each package and subpackage avaiable in that.
- all :class:`~prettyetc.etccore.langlib.field.Field` subclasses are moved in
:mod:`~prettyetc.etccore.langlib.field` module.
All members are still attrvaiable in the :mod:`prettyetc.etccore.langlib` module.
Fixes:
- issue #1, a bug that prevents folder with glob character to be accepted.
Deprecations:
- :attr:`~prettyetc.etccore.langlib.root.RootField.metadata` attribute.
The `__init__` metadata parameter was deprecated in 0.2.0,
so you shouldn't have used it before.
**BaseUi**
Adds:
- Allow data update on :meth:`prettyetc.baseui.settings.SettingsManager.load` (disabled by default).
Fixes:
- Cached :class:`prettyetc.baseui.settings.SettingsManager` overriden no longer have data overriden.
Changes:
- Make all members of each package and subpackage avaiable in that.
0.3.0a3
-------
**UI**
Adds:
- File path to status bar
- (WIP) Add a find form to the toolbar
Changes:
- Use snake_case naming style for all widgets
**Etccore**
Adds:
- :meth:`~prettyetc.etccore.langlib.root.RootField.find_by_attr`
now have a check_all parameter that allow to check all given attributes
or just 1 of those.
0.3.0rc1
--------
**UI**
Adds:
- UI highlighting for find
Fixes:
- Find bar visibility on windows
- Searching when type != all
......@@ -50,3 +50,4 @@ Welcome to prettyetc's documentation!
:caption: Versions changelogs.
changelog/0.2.x
changelog/0.3.x
The baseui package
==================
Subpackages
-----------
.. toctree::
:titlesonly:
ui/ui
Submodules
----------
......@@ -17,5 +27,3 @@ BaseUI
======
.. automodule:: prettyetc.baseui
:members:
:show-inheritance:
The baseui.cmdargs module
=========================
.. if there are subpackages of this package
..
.. Subpackages
.. -----------
..
.. toctree::
..
.. subpackages
..
..
.. Submodules
.. ----------
..
.. toctree::
..
.. submodules
..
.. Module content
.. --------------
.. automodule:: prettyetc.baseui.cmdargs
:members:
......
The baseui.ui.common module
===========================
.. automodule:: prettyetc.baseui.ui.common
:members:
:show-inheritance:
The baseui.ui.field module
==========================
.. automodule:: prettyetc.baseui.ui.field
:members:
:show-inheritance:
The baseui.ui.main module
=========================
.. automodule:: prettyetc.baseui.ui.main
:members:
:show-inheritance:
The baseui.ui.settings module
=============================
.. automodule:: prettyetc.baseui.ui.settings
:members:
:show-inheritance:
The baseui.ui package
=====================
Submodules
----------
.. toctree::
:titlesonly:
common
main
field
settings
.. automodule:: prettyetc.baseui.ui
......@@ -27,5 +27,3 @@ Etccore
=======
.. automodule:: prettyetc.etccore
:members:
:show-inheritance:
The etccore.langlib.field module
===================================
.. if there are subpackages of this package
..
.. Subpackages
.. -----------
..
.. toctree::
..
.. subpackages
..
..
.. Submodules
.. ----------
..
.. toctree::
..
.. submodules
..
.. Module content
.. --------------
.. automodule:: prettyetc.etccore.langlib.field
:members:
:show-inheritance:
:special-members:
......@@ -15,10 +15,10 @@ Submodules
.. toctree::
:titlesonly:
parsers
field
root
parsers
.. automodule:: prettyetc.etccore.langlib
:members:
:show-inheritance:
......@@ -2,7 +2,6 @@
Main roadmap
============
.. a toctree here
General roadmap
......@@ -19,7 +18,7 @@ represented as :code:`work-priority: description`:
- 1 is a very simple task or is deploy related task.
Not requiring a big knowledge of the components.
- 2 is enchant and optimization of functions and methods,
- 2 is an enchant or an optimization of functions,
improve documentation or the UI/command-line interface.
- 3 is the standard estimation,
may require new classes/modules,
......@@ -50,7 +49,6 @@ For the core of this project we have big plans.
- 3-3: Add util methods to RootField.
- 4-3: Add writing support (opposed as parser support).
- 3-3: Add file conversion support (require writing support).
- 2-3: create detailed tutorials to create plugins and how to deploy them.
- 5-3: Add language sniffers for helping FileMatcher to get the language.
- 3-2: add yaml support (with comments if possible).
......@@ -60,13 +58,13 @@ For the core of this project we have big plans.
- 4-2: add csv support (with a database like structure if possible).
- 5-2: handle something else such as source codes.
**persistent tasks**
**Persistent tasks**
All of these task are endless, so no priority are assigned.
All of these task are endless, so no priorities are assigned.
- 4: Add/improve tests.
- 2: Add/improve logging in all components.
- 2: Improve/fix documentation.
- 4: Add/improve tests.
Base UI interface, command-line and settings (baseui):
------------------------------------------------------
......@@ -75,9 +73,6 @@ baseui doesn't require so much efforts because is an helper library,
however some enchant to command-line interface and settings manager can be done.
This interface can give also a simple cmd interface (not curses, of course).
- 5-3: Make settings avaiable before instancing
the main ui class (initializing level).
- 3-3: Make a simple cmd ui to display the field tree.
- 3-3: Cmd ui (require a basic cmd ui):
display the field tree in different ways such as tree,
......@@ -87,35 +82,50 @@ This interface can give also a simple cmd interface (not curses, of course).
(ex. find) to be exposed to uis.
Probably require some work in the core library.
- 1-1: in baseui.main.UiLauncher.create_ui() use better exit codes than 1
if any critical error occurred.
- 5-3: Make settings avaiable before instancing
the main ui class (initializing level).
**persistent tasks**
- 1-1: in baseui.main.UiLauncher.create_ui() use better exit codes than 1
if any critical error occurred.
All of these task are endless, so no priority are assigned.
**Persistent tasks**
- 2-3: Add/improve logging in all components.
- 2-3: Improve/fix documentation.
All of these task are endless, so no priorities are assigned.
- 2-1: Improve command-line interface with better helps, descriptions and usages.
- 2: Add/improve logging in all components.
- 2: Improve/fix documentation.
- 2: Improve command-line interface with better helps, descriptions and usages.
The Qt-based interface (qtui):
------------------------------
It's the first, official interface of the prettyetc project, but is very ugly.
This ui is made with the stock Qt style, no extra style or design,
no useful stuffs, just a tree widget, a tab widget and a toolbar.
It's the first, official interface of the prettyetc project.
It has an huge choose of integrated themes.
I think that the setting dialog is done better (at quality level) than the main window.
It requires an huge restyling, with new designs and new features,
including shortcuts.
Restyling, however, should produce at least 2 themes, a white theme and a black one.
- 3-3: create a new theme (white or black, doesn't matter).
- 3-3: create a second theme (for enthusiasts of black and white).
- 3-2: create an enchant of qt native theme.
- 1-1: add shortcuts.
- 1-3: Create an about dialog.
- 2-3: Create an error dialog, that use all of BadInput attributes.
- 3-3: create shortcuts settings.
- 4-3: Add tools to view and filter data.
- 3-2: Add localization support.
- 2-2: create an enchant of qt native theme.
**Persistent tasks**
All of these task are endless, so no priorities are assigned.
- 1: add shortcuts.
Other things
......@@ -125,10 +135,14 @@ At last we have some miscellaneous things to do,
these thing are not sticky related to the project features itself,
but are related to image, social, spreading this project and so on.
- 1-3: create a showcase,
including some screenshots of the ui,
and the command-line arguments.
- 2-3: create detailed tutorials to create plugins and how to deploy them.
(Parser plugin tutorial are done).
- 1-1: create tutorial to use the ui.
- 1-1: create detailed explanation for installation.
......@@ -165,7 +179,7 @@ Nothing at the moment :)
Qt UI
-----
Nothing at the moment :)
- Added 9 differents themes.
Other things
......
......@@ -4,13 +4,17 @@ All prettyetc versions
All documentation versions and repository branch are listed here.
master branch:
- sources: `<https://gitlab.com/prettyetc/prettyetc-core>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc-core>`_
- sources: `<https://gitlab.com/prettyetc/prettyetc>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc>`_
0.1.x
- sources: `<https://gitlab.com/prettyetc/prettyetc-core/tree/0.1.x>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc-core/0.1.x>`_
- sources: `<https://gitlab.com/prettyetc/prettyetc/tree/0.1.x>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc/0.1.x>`_
0.2.x
- sources: `<https://gitlab.com/prettyetc/prettyetc-core/tree/0.2.x>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc-core/0.2.x>`_
- sources: `<https://gitlab.com/prettyetc/prettyetc/tree/0.2.x>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc/0.2.x>`_
0.3.x
- sources: `<https://gitlab.com/prettyetc/prettyetc/tree/0.3.x>`_
- docs: `<https://prettyetc.gitlab.io/prettyetc/0.3.x>`_
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Test the ui launcher."""
from prettyetc.baseui.main import UiLauncher
if __name__ == '__main__':
......