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
Extends the pyranges module with operations on joined genomic intervals

tiedpyranges Extends the pyranges module with operations on joined genomic intervals (e.g. exons of same transcript) Install with: pip install tiedpyr

Marco Mariotti 4 Aug 05, 2022
Import the module and create an object of the class LocalVariable.

LocalVariable Import the module and create an object of the class LocalVariable. Call the save method with the name and the value of a variable as arg

Sajedur Rahman Fiad 2 Dec 14, 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
Creates a C array from a hex-string or a stream of binary data.

hex2array-c Creates a C array from a hex-string. Usage Usage: python3 hex2array_c.py HEX_STRING [-h|--help] Use '-' to read the hex string from STDIN.

John Doe 3 Nov 24, 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
Shut is an opinionated tool to simplify publishing pure Python packages.

Welcome to Shut Shut is an opinionated tool to simplify publishing pure Python packages. What can Shut do for you? Generate setup files (setup.py, MAN

Niklas Rosenstein 6 Nov 18, 2022
A python program to find binary, octal and hexadecimal of a decimal.

decimal-converter This little python program can convert a decimal in to, Binary Octal Hexadecimal Needed Python 3 or later or a online python compile

Chandula Janith 0 Nov 27, 2021
a simple function that randomly generates and applies console text colors

ChangeConsoleTextColour a simple function that randomly generates and applies console text colors This repository corresponds to my Python Functions f

Mariya 6 Sep 20, 2022
Simple profile athena generator for Fortnite Private Servers.

Profile-Athena-Generator A simple profile athena generator for Fortnite Private Servers. This profile athena generrator features: Item variants Get al

Fevers 10 Aug 27, 2022
Allows you to canibalize methods from classes effectively implementing trait-oriented programming

About This package enables code reuse in non-inheritance way from existing classes, effectively implementing traits-oriented programming pattern. Stor

1 Dec 13, 2021
Shypan, a simple, easy to use, full-featured library written in Python.

Shypan, a simple, easy to use, full-featured library written in Python.

ShypanLib 4 Dec 08, 2021
extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file.

GetTsite python Package extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file. Install $ pip install Get

laojunjun 7 Nov 21, 2022
This repository contains scripts that help you validate QR codes.

Validation tools This repository contains scripts that help you validate QR codes. It's hacky, and a warning for Apple Silicon users: the dependencies

Ryan Barrett 8 Mar 01, 2022
A program will generate a eth key pair that has the public key that starts with a defined amount of 0

ETHAdressGenerator This short program will generate a eth key pair that has the public key that starts with a defined amount of 0 Requirements Python

3 Nov 19, 2021
A tool to create the basics of a project

Project-Scheduler Instalação Para instalar o Project Maker, você necessita está em um ambiente de desenvolvimento Linux ou wsl com alguma distro debia

2 Dec 17, 2021
Etherium unit conversation and arithmetic library

etherunit Etherium unit conversation and arithmetic library Install pip install -u etherunit Usage from etherunit import Ether, Gwei, Wei, E Creat

Yasin Özel 1 Nov 10, 2021
Generate random german words

Generate random german words / Generiere zufällige deutsche Wörter Getting Started Pip install with pip install zufallsworte Install the library with

Maximilian Freitag 5 Mar 24, 2022
Program to extract signatures from documents.

Extracting Signatures from Bank Checks Introduction Ahmed et al. [1] suggest a connected components-based method for segmenting signatures in document

Muhammad Saif Ullah Khan 9 Jan 26, 2022
NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python.

NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python. Just add your files, set your configuration and run the scri

78 Dec 27, 2022
Two fast AUC calculation implementations for python

fastauc Two fast AUC calculation implementations for python: python-based is approximately 5X faster than the default sklearn.metrics.roc_auc_score()

Vsevolod Kompantsev 26 Dec 11, 2022