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
Skywater 130nm Klayout Device Generators PDK

Skywaters 130nm Technology for KLayout Device Generators Mabrains is excited to share with you our Device Generator Library for Skywater 130nm PDK. It

Mabrains 18 Dec 14, 2022
A quick username checker to see if a username is available on a list of assorted websites.

A quick username checker to see if a username is available on a list of assorted websites.

Maddie 4 Jan 04, 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
A Python script that transcript Arcaea chart file (.aff file) into AutoJS touchscreen script which automatically plays the Arcaea chart

ArcaeaAutoplay (AutoJS Version) A Python script that transcript Arcaea chart file (.aff file) into AutoJS touchscreen script which automatically plays

7 Dec 03, 2021
Tools for binary data on cassette

Micro Manchester Tape Storage Tools for storing binary data on cassette Includes: Python script for encoding Arduino sketch for decoding Eagle CAD fil

Zack Nelson 28 Dec 25, 2022
A string extractor module for python

A string extractor module for python

Fayas Noushad 4 Jul 19, 2022
✨ Un générateur d'adresse IP aléatoire totalement fait en Python par moi, et en français.

IP Generateur ❗ Un générateur d'adresse IP aléatoire totalement fait en Python par moi, et en français. 🔮 Avec l'utilisation du module "random", j'ai

MrGabin 3 Jun 06, 2021
SH-PUBLIC is a python based cloning script. You can clone unlimited UID facebook accounts by using this tool.

SH-PUBLIC is a python based cloning script. You can clone unlimited UID facebook accounts by using this tool. This tool works on any Android devices without root.

(Md. Tanvir Ahmed) 5 Mar 09, 2022
Simplex using Jordan exchanges taught in 236A

Simplex for 236A Python script to solve LP using simplex by Jordan exchanges taught in 236A. You will need python installed along with the 'numpy' and

Kunal Kishore 1 Nov 30, 2021
A simple package for handling variables in string.

A simple package for handling string variables. Welcome! This is a simple package for handling variables in string, You can add or remove variables wi

1 Dec 31, 2021
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 04, 2023
Cleaning-utils - a collection of small Python functions and classes which make cleaning pipelines shorter and easier

cleaning-utils [] [] [] cleaning-utils is a collection of small Python functions

4 Aug 31, 2022
Modeling Category-Selective Cortical Regions with Topographic Variational Autoencoders

Modeling Category-Selective Cortical Regions with Topographic Variational Autoencoders Getting Started Install requirements with Anaconda: conda env c

T. Andy Keller 4 Aug 22, 2022
Python program for Linux users to change any url to any domain name they want.

URLMask Python program for Linux users to change a URL to ANY domain. A program than can take any url and mask it to any domain name you like. E.g. ne

2 Jun 20, 2022
An online streamlit development platform

streamlit-playground An online streamlit development platform Run, Experiment and Play with streamlit Components Develop full-fledged apps online All

Akshansh Kumar 3 Nov 06, 2021
Delete all of your forked repositories on Github

Fork Purger Delete all of your forked repositories on Github Installation Install using pip: pip install fork-purger Exploration Under construc

Redowan Delowar 29 Dec 17, 2022
A Container for the Dependency Injection in Python.

Python Dependency Injection library aiodi is a Container for the Dependency Injection in Python. Installation Use the package manager pip to install a

Denis NA 3 Nov 25, 2022
Python USD rate in RUB parser

Python EUR and USD rate parser. Python USD and EUR rate in RUB parser. Parsing i

Andrew 2 Feb 17, 2022
Produce a simulate-able SDF of an arbitrary mesh with convex decomposition.

Mesh-to-SDF converter Given a (potentially nasty, nonconvex) mesh, automatically creates an SDF file that describes that object. The visual geometry i

Greg Izatt 22 Nov 23, 2022
MITRE ATT&CK Lookup Tool

MITRE ATT&CK Lookup Tool attack-lookup is a tool that lets you easily check what Tactic, Technique, or Sub-technique ID maps to what name, and vice ve

Curated Intel 33 Nov 22, 2022