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
A tiny Python library for generating public IDs from integers

pids Create short public identifiers based on integer IDs. Installation pip install pids Usage from pids import pid public_id = pid.from_int(1234) #

Simon Willison 7 Nov 11, 2021
Abstraction of a Unit, includes convertions and basic operations.

Units Abstraction of a Unit, includes convertions and basic operations. ------ EXAMPLE : Free Fall (No air resistance) ------- from units_test import

1 Dec 23, 2021
Python code to generate and store certificates automatically , using names from a csv file

WOC-certificate-generator Python code to generate and store certificates automatically , using names from a csv file IMPORTANT In order to make the co

Google Developer Student Club - IIIT Kalyani 10 May 26, 2022
Tool for generating Memory.scan() compatible instruction search patterns

scanpat Tool for generating Frida Memory.scan() compatible instruction search patterns. Powered by r2. Examples $ ./scanpat.py arm.ks:64 'sub sp, sp,

Ole André Vadla Ravnås 13 Sep 19, 2022
WindowsDebloat - Windows Debloat with python

Windows Debloat 🗑️ Quickly and easily configure Windows 10. Disclaimer I am NOT

1 Mar 26, 2022
Simple integer-valued time series bit packing

Smahat allows to encode a sequence of integer values using a fixed (for all values) number of bits but minimal with regards to the data range. For example: for a series of boolean values only one bit

Ghiles Meddour 7 Aug 27, 2021
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 simple python script to generate an iCalendar file for the university classes.

iCal Generator This is a simple python script to generate an iCalendar file for the university classes. Installation Clone the repository git clone ht

Foad Rashidi 2 Sep 01, 2022
Analyze metadata of your Python project.

Analyze metadata of your Python projects Setup: Clone repo py-m venv venv (venv) pip install -r requirements.txt specify the folders which you want to

Pedro Monteiro de Carvalho e Silva Prado 1 Nov 10, 2021
Python type-checker written in Rust

pravda Python type-checker written in Rust Features Fully typed with annotations and checked with mypy, PEP561 compatible Add yours! Installation pip

wemake.services 31 Oct 21, 2022
This is Cool Utility tools that you can use in python.

This is Cool Utility tools that you can use in python. There are a few tools that you might find very useful, you can use this on pretty much any project and some utils might help you a lot and save

Senarc Studios 6 Apr 18, 2022
A toolkit for writing and executing automation scripts for Final Fantasy XIV

XIV Scripter This is a tool for scripting out series of actions in FFXIV. It allows for custom actions to be defined in config.yaml as well as custom

Jacob Beel 1 Dec 09, 2021
A repository containing several general purpose Python scripts to automate daily and common tasks.

General Purpose Scripts Introduction This repository holds a curated list of Python scripts which aim to help us automate daily and common tasks. You

GDSC RCCIIT 46 Dec 25, 2022
Find version automatically based on git tags and commit messages.

GIT-CONVENTIONAL-VERSION Find version automatically based on git tags and commit messages. The tool is very specific in its function, so it is very fl

0 Nov 07, 2021
cpp20.py is a Python script to compile C++20 code using modules.

cpp20.py is a Python script to compile C++20 code using modules. It browses the source files to determine their dependencies. Then, it compiles then in order using the correct flags.

Julien VERNAY 6 Aug 26, 2022
Script to generate a massive volume of data in sql, csv, json or xml format

DataGenerator Made with Python Open for pull requests 1. Dependencies To install required dependencies run pip install -r requirements.txt 2. Executi

icrescenti 3 Sep 20, 2022
SysInfo is an app developed in python which gives Basic System Info , and some detailed graphs of system performance .

SysInfo SysInfo is an app developed in python which gives Basic System Info , and some detailed graphs of system performance . Installation Download t

5 Nov 08, 2021
A multipurpose python module

pysherlock pysherlock is a Python library for dealing with web scraping using images, it's a Python application of the rendertron headless browser API

Sachit 2 Nov 11, 2021
Helpful functions for use alongside the rich Python library.

🔧 Rich Tools A python package with helpful functions for use alongside with the rich python library. 󠀠󠀠 The current features are: Convert a Pandas

Avi Perl 14 Oct 14, 2022
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