DiddiParser 2: The DiddiScript parser.

Overview

DiddiParser 2

Documentation Status Code style: black

The DiddiScript parser, written in Python.

Installation

DiddiParser2 can be installed via pip:

pip install diddiparser2

Usage

DiddiParser2 is mostly used as a command-line tool. To run a DiddiScript file, just run

diddiparser2 [filename]

Also, you can use python -m diddiparser2 instead of diddiparser2.

Comments
  • Improvements to the editor

    Improvements to the editor

    TODO:

    • [x] Use new tools for ordering the widgets (first of all, stop using grid)
    • [x] Provide "themes" and the option to customize it. Fixes #80
    • [x] Update the docs to give a useful guide to users
    opened by DiddiLeija 6
  • Treating the current CI failure with tests

    Treating the current CI failure with tests

    Describe the bug

    Since #144, the CI has been failing. Not sure why (because I didn't make any breaking change), but that failure is a serious blocker.

    To Reproduce

    Check out the affected PRs (see below). Please check the tests CI (e.g. Tests (ubuntu-latest, 3.10))

    Expected behavior

    The CI (to be precise, the tests) should not fail like that.

    Additional context

    Current list of affected PRs:

    • #144
    • #145
    • #146
    • #147
    • #148
    • #149
    • #150
    • #152
    type: bug 
    opened by DiddiLeija 5
  • The CI is broken, due to a dependency update

    The CI is broken, due to a dependency update

    Describe the bug

    Something went wrong after the last Sphinx update. This is mostly the tracker to fix this issue.

    To Reproduce

    Steps to reproduce the behavior:

    1. Just check the CI (try out https://github.com/DiddiLeija/diddiparser2/runs/5725796950?check_suite_focus=true)
    2. See the issue with black

    Expected behavior

    Nothing should happen after upgrading Sphinx, the CI must go well.

    Additional context

    This is the error message:

    nox > black --check .
    Traceback (most recent call last):
      File "/home/runner/work/diddiparser2/diddiparser2/.nox/lint/bin/black", line 8, in <module>
        sys.exit(patched_main())
      File "src/black/__init__.py", line 1423, in patched_main
      File "src/black/__init__.py", line 1409, in patch_click
    ImportError: cannot import name '_unicodefun' from 'click' (/home/runner/work/diddiparser2/diddiparser2/.nox/lint/lib/python3.9/site-packages/click/__init__.py)
    nox > Command black --check . failed with exit code 1
    nox > Session lint failed.
    
    type: bug 
    opened by DiddiLeija 5
  • Bump setuptools from 60.9.3 to 60.10.0

    Bump setuptools from 60.9.3 to 60.10.0

    Bumps setuptools from 60.9.3 to 60.10.0.

    Changelog

    Sourced from setuptools's changelog.

    v60.10.0

    Changes ^^^^^^^

    • #2971: Deprecated upload_docs command, to be removed in the future.
    • #3137: Use samefile from stdlib, supported on Windows since Python 3.2.
    • #3170: Adopt nspektr (vendored) to implement Distribution._install_dependencies.

    Documentation changes ^^^^^^^^^^^^^^^^^^^^^

    • #3144: Added documentation on using console_scripts from setup.py, which was previously only shown in setup.cfg -- by :user:xhlulu
    • #3148: Added clarifications about MANIFEST.in, that include links to PyPUG docs and more prominent mentions to using a revision control system plugin as an alternative.
    • #3148: Removed mention to pkg_resources as the recommended way of accessing data files, in favour of :doc:importlib.resources. Additionally more emphasis was put on the fact that package data files reside inside the package directory (and therefore should be read-only).

    Misc ^^^^

    • #3120: Added workaround for intermittent failures of backend tests on PyPy. These tests now are marked with XFAIL <https://docs.pytest.org/en/stable/how-to/skipping.html>_, instead of erroring out directly.
    • #3124: Improved configuration for :pypi:rst-linker (extension used to build the changelog).
    • #3133: Enhanced isolation of tests using virtual environments - PYTHONPATH is not leaking to spawned subprocesses -- by :user:befeleme
    • #3147: Added options to provide a pre-built setuptools wheel or sdist for being used during tests with virtual environments. Paths for these pre-built distribution files can now be set via the environment variables: PRE_BUILT_SETUPTOOLS_SDIST and PRE_BUILT_SETUPTOOLS_WHEEL.
    Commits
    • 02f3821 Bump version: 60.9.3 → 60.10.0
    • 5a0fbfb Fix towncrier command in tools/finalize
    • 98728b1 Enable CI for windows-2019 (#3168)
    • 8afae7f Just skip the most problematic test for PyPy on Windows
    • fb258ed Exclude PyPy+Windows from test matrix
    • a2e8ef9 [Docs] Improve documentation about migration from distutils (#3171)
    • 19609c0 Link packaging
    • 82141a2 Fix PEP 632 link display
    • c522737 Fix version of setuptools for default local distutils
    • 722e1fd [Docs] Improve documentation about migration from distutils
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python blocked 
    opened by dependabot[bot] 4
  • Release 1.2.0

    Release 1.2.0

    It's finally time to cut a new DiddiParser2 release! I made several enhancements, I reworked the docs, and fixed several issues. By the way, this could be the last 1.x release, because I'm looking for a big change in the syntax!

    TODO:

    • [x] Update the changelog
    • [x] Cut the GitHub tag
    • [x] Publish the release to PyPI
    type: release tracker 
    opened by DiddiLeija 4
  • Removal of CodeQL?

    Removal of CodeQL?

    Is your feature request related to a problem? Please describe.

    CodeQL is the slowest step in our CI. And, thinking a bit further, it seems to be unecessary at the moment. So maybe it's just wasting time and space?

    Describe the solution you'd like

    Consider the removal of CodeQL setup.

    Describe alternatives you've considered

    Keep CodeQL, in case we'll need it soon.

    Additional context

    N/A

    type: enhancement 
    opened by DiddiLeija 3
  • Bump sphinx from 4.5.0 to 5.0.0

    Bump sphinx from 4.5.0 to 5.0.0

    Bumps sphinx from 4.5.0 to 5.0.0.

    Release notes

    Sourced from sphinx's releases.

    v5.0.0b1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 5.0.0 (released May 30, 2022)

    Dependencies

    5.0.0 b1

    • #10164: Support Docutils 0.18_. Patch by Adam Turner.

    .. _Docutils 0.18: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-2021-10-26

    Incompatible changes

    5.0.0 b1

    • #10031: autosummary: sphinx.ext.autosummary.import_by_name() now raises ImportExceptionGroup instead of ImportError when it failed to import target object. Please handle the exception if your extension uses the function to import Python object. As a workaround, you can disable the behavior via grouped_exception=False keyword argument until v7.0.
    • #9962: texinfo: Customizing styles of emphasized text via @definfoenclose command was not supported because the command was deprecated since texinfo 6.8
    • #2068: :confval:intersphinx_disabled_reftypes has changed default value from an empty list to ['std:doc'] as avoid too surprising silent intersphinx resolutions. To migrate: either add an explicit inventory name to the references intersphinx should resolve, or explicitly set the value of this configuration variable to an empty list.
    • #10197: html theme: Reduce body_min_width setting in basic theme to 360px
    • #9999: LaTeX: separate terms from their definitions by a CR (refs: #9985)
    • #10062: Change the default language to 'en' if any language is not set in conf.py

    5.0.0 final

    • #10474: :confval:language does not accept None as it value. The default value of language becomes to 'en' now.

    Deprecated

    5.0.0 b1

    • #10028: jQuery and underscore.js will no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript or use the mitigation below.

    ... (truncated)

    Commits
    • 953002e Bump to 5.0.0 final
    • 3d3e932 Merge pull request #10463 from AA-Turner/fix-css-docutils-0-18
    • 9298b3e Update message catalogs
    • bdeb627 Merge pull request #10486 from tk0miya/fix_babel_extract_message
    • 16ca323 Fix imgconverter: Failed to extract translation messages
    • dc30920 Merge pull request #10481 from AA-Turner/lang-none-en
    • 2004149 Update test
    • 78c478a Merge remote-tracking branch 'upstream/5.0.x' into lang-none-en
    • 479e482 Update warning, revert my original warning patch
    • fb6db30 Update comment
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 3
  • Write more DSGPs

    Write more DSGPs

    We're currently working on a 2.0.0 release, so here I have some DSGPs to start.

    Desired DSGPs for this PR:

    • [x] DSGP 4: DiddiScript parser rules, version 2
    • [x] DSGP 5: First statements
    diddiscript: DSGP 
    opened by DiddiLeija 3
  • The DSGP 2 application is causing unexpected side-effects

    The DSGP 2 application is causing unexpected side-effects

    Hi there!

    If you are here because this kind of errors:

    C:> diddiscript-console
    
    Welcome to the interactive DiddiParser console.
    Parser version: 1.0.0
    ============================================================
    
    > load_module("simpleio");
    > store_input("Some text: ");
    Some text: foo
    Error while compiling: Could not identify value: foo
    

    or something else related to "values" or "variables", don't worry.


    Why this happened

    This is due to the application of DSGP 2 (something we made at #42) combined with the adaptations to DSGP 1. On every input (and probably other interactions), the parser is trying to identify DiddiScript "values", so it fails.

    Similar strange issues happened during the DSGP 2 adoption. So we had to move a lot of things on the parser's main operations. But we didn't expect that our moves could lead to a regression.

    What to do now

    If you find a new error, before this issue gets closed, feel free to report it here. That will help us to identify the side effects faster. Then, just wait. We'll be working hard to fix these issues.

    type: bug diddiscript: DSGP application 
    opened by DiddiLeija 3
  • Apply the DSGP 1 specs

    Apply the DSGP 1 specs

    Closes #24. Variables are now possible.

    TODO:

    • [x] Make definitions possible.
    • [x] Enable variable indexing inside functions.
    • [x] Update the libraries to make this idea possible. Now they should return something.
    • [x] Update documentation.
    • [x] ~~Update the DSGP status.~~
    diddiscript: DSGP application 
    opened by DiddiLeija 3
  • Bump isort from 5.10.1 to 5.11.2

    Bump isort from 5.10.1 to 5.11.2

    Bumps isort from 5.10.1 to 5.11.2.

    Release notes

    Sourced from isort's releases.

    5.11.2

    Changes

    5.11.1

    Changes December 12 2022

    :beetle: Fixes

    5.11.0

    Changes December 12 2022

    :construction_worker: Continuous Integration

    :package: Dependencies

    Changelog

    Sourced from isort's changelog.

    5.11.2 December 12 2022

    5.11.1 December 12 2022

    5.11.0 December 12 2022

    Commits
    • 7eaab8c Merge pull request #2036 from PyCQA/feature/5.11.2-version-bump
    • 112eb30 Update version to 5.11.2
    • e64306d Merge pull request #2035 from felixxm/version-bump
    • b418718 Bump version to 5.11.1.
    • f8146c5 Merge pull request #2033 from PyCQA/hotfix/5.11.1
    • dd01cfe Hotfix 5.11.1
    • 68f0a25 Merge pull request #2032 from tomaarsen/hotfix/colorama_nameerror
    • c752a6c Only call colorama.init if colorama is available
    • 6525008 Merge pull request #2030 from PyCQA/example/update-formatting-pluging-isort-5...
    • 6c5a36c Bump formatting plugin to 0.1.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump sphinx from 5.3.0 to 6.0.0

    Bump sphinx from 5.3.0 to 6.0.0

    Bumps sphinx from 5.3.0 to 6.0.0.

    Release notes

    Sourced from sphinx's releases.

    v6.0.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b2

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 6.0.0 (released Dec 29, 2022)

    Dependencies

    • #10468: Drop Python 3.6 support
    • #10470: Drop Python 3.7, Docutils 0.14, Docutils 0.15, Docutils 0.16, and Docutils 0.17 support. Patch by Adam Turner

    Incompatible changes

    • #7405: Removed the jQuery and underscore.js JavaScript frameworks.

      These frameworks are no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript to modern standards, or use the mitigation below.

      The first option is to use the sphinxcontrib.jquery_ extension, which has been developed by the Sphinx team and contributors. To use this, add sphinxcontrib.jquery to the extensions list in conf.py, or call app.setup_extension("sphinxcontrib.jquery") if you develop a Sphinx theme or extension.

      The second option is to manually ensure that the frameworks are present. To re-add jQuery and underscore.js, you will need to copy jquery.js and underscore.js from the Sphinx repository_ to your static directory, and add the following to your layout.html:

      .. code-block:: html+jinja

      {%- block scripts %} {{ super() }} {%- endblock %}

      .. _sphinxcontrib.jquery: https://github.com/sphinx-contrib/jquery/

      Patch by Adam Turner.

    • #10471, #10565: Removed deprecated APIs scheduled for removal in Sphinx 6.0. See :ref:dev-deprecated-apis for details. Patch by Adam Turner.

    • #10901: C Domain: Remove support for parsing pre-v3 style type directives and roles. Also remove associated configuration variables c_allow_pre_v3 and c_warn_on_allowed_pre_v3. Patch by Adam Turner.

    Features added

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
Releases(1.2.0)
  • 1.2.0(Feb 28, 2022)

    Version 1.2.0

    This version is focused in refining the current docs/libraries/parsing. We added and fixed the docs. Also, we added new features, including the editor's themes!

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0.post1(Jan 27, 2022)

    This is just a post-release that fixes a packaging issue, see https://github.com/DiddiLeija/diddiparser2/issues/74 for details. The changelog that applied to 1.1.0 also applies here.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Jan 27, 2022)

    Version 1.1.0

    This version focused on cleaning up some parser errors and fixing/modifying libraries. Also, it is the first release that will use build for packaging. See the changelog for full details.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jan 9, 2022)

    Version 1.0.0

    Hey! This is our first release! We are glad that this project can be now used without trouble using pip install diddiparser2.


    Note about the docs

    The note is that... the docs doesn't work! See #62 for more details.

    Source code(tar.gz)
    Source code(zip)
Owner
Diego Ramirez
Hi, I'm @DiddiLeija, I'm interested on the @python projects, and I want to collaborate with them. Also a @pypa member.
Diego Ramirez
PyResToolbox - A collection of Reservoir Engineering Utilities

pyrestoolbox A collection of Reservoir Engineering Utilities This set of functio

Mark W. Burgoyne 39 Oct 17, 2022
Simple code to generate a password for your account!

Password-Generator Simple code to generate a password for your account! Password Generator for passwords for your accounts or anything else! This code

DEEM 1 Jun 05, 2022
A collection of utility functions to prototype geometry processing research in python

gpytoolbox This repo is a work in progress and contains general utility functions I have needed to code while trying to work on geometry process resea

Silvia Sellán 73 Jan 06, 2023
Obsidian tools - a Python package for analysing an Obsidian.md vault

obsidiantools is a Python package for getting structured metadata about your Obsidian.md notes and analysing your vault.

Mark Farragher 153 Jan 04, 2023
An OData v4 query parser and transpiler for Python

odata-query is a library that parses OData v4 filter strings, and can convert them to other forms such as Django Queries, SQLAlchemy Queries, or just plain SQL.

Gorilla 39 Jan 05, 2023
Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python

Pyfunctools Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python, bringing functional

Natanael dos Santos Feitosa 5 Dec 22, 2022
Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine.

Keval Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine. The user mode portion

42 Dec 17, 2022
Simple script to export contacts from telegram into vCard file

Telegram Contacts Exporter Simple script to export contacts from telegram into vCard file Getting Started Prerequisites You must to put your Telegram

Pere Antoni 1 Oct 17, 2021
BOLT12 Lightning Address Format

BOLT12 Address Support (DRAFT!) Inspired by the awesome lightningaddress.com, except for BOLT12: Supports BOLT12 Allows BOLT12 vendor string authentic

Rusty Russell 28 Sep 14, 2022
Similar looking domain detection using python fuzzywuzzy

Major cause of phishing and BEC incident is similar looking domain, if you detect it early, you can prevent incidents early, python fuzzywuzzy module let you do that

2 Nov 07, 2021
Adding two matrix from scratch using python.

Adding-two-matrix-from-scratch-using-python. Here, I have take two matrix from user and add it without using any library. I made this program from scr

Sachin Vinayak Dabhade 4 Sep 24, 2021
一款不需要买代理来减少扫网站目录被封概率的扫描器,适用于中小规格字典。

PoorScanner使用说明书 -工具在不同环境下可能不怎么稳定,如果有什么问题恳请大家反馈。说明书有什么错误的地方也大家欢迎指正。 更新记录 2021.8.23 修复了云函数主程序 gitee上传文件接口写错了的BUG(之前把自己的上传地址写死进去了,没从配置文件里读) 更新了说明书 PoorS

14 Aug 02, 2022
A fixture that allows runtime xfail

pytest-runtime-xfail pytest plugin, providing a runtime_xfail fixture, which is callable as runtime_xfail(), to allow runtime decisions to mark a test

Brian Okken 4 Apr 06, 2022
Animation retargeting tool for Autodesk Maya. Retargets mocap to a custom rig with a few clicks.

Animation Retargeting Tool for Maya A tool for transferring animation data and mocap from a skeleton to a custom rig in Autodesk Maya. Installation: A

Joaen 63 Jan 06, 2023
API Rate Limit Decorator

ratelimit APIs are a very common way to interact with web services. As the need to consume data grows, so does the number of API calls necessary to re

Tomas Basham 575 Jan 05, 2023
Python utility for discovering interesting CFPreferences values on iDevices

Description Simple utility to search for interesting preferences in iDevices. Installation python3 -m pip install -U --user cfprefsmon Example In this

12 Aug 19, 2022
MongoDB utility to inflate the contents of small collection to a new larger collection

MongoDB Data Inflater ("data-inflater") The data-inflater tool is a MongoDB utility to automate the creation of a new large database collection using

Paul Done 3 Nov 28, 2021
Deep Difference and search of any Python object/data.

DeepDiff v 5.6.0 DeepDiff Overview DeepDiff: Deep Difference of dictionaries, iterables, strings and other objects. It will recursively look for all t

Sep Dehpour 1.6k Jan 08, 2023
kawadi is a versatile tool that used as a form of weapon and is used to cut, shape and split wood.

kawadi kawadi (કવાડિ in Gujarati) (Axe in English) is a versatile tool that used as a form of weapon and is used to cut, shape and split wood. kawadi

Jay Vala 2 Jan 10, 2022
Here, I find the Fibonacci Series using python

Fibonacci-Series-using-python Here, I find the Fibonacci Series using python Requirements No Special Requirements Contribution I have strong belief on

Sachin Vinayak Dabhade 4 Sep 24, 2021