Repository navigation
Beta 0.19.0
Pre-release
Pre-release
Changelog
This version comes with a lot of new features, and one single deprecation (see “How to update” to know how to update your code). This version improves a little bit performances in some cases.
Added
Libs
- Add the
noug_version.clean_version_for_ghfunction that generates a beautiful str for the GH issues or PRs. - Add
noug_version.release_serialwhich is the same asnoug_version.phase_minor, as it is now deprecated. - Add
math.factorial, which computes factorial. - Add
webbrowserlib, which contains one function:webbrowser.open(url, new=0, autoraise=True): displayurlusing the default browser.
Ifnewis 0, theurlis opened in the same browser window if possible.
Ifnewis 1, a new browser window is opened if possible.
Ifnewis 2, a new tab is opened if possible.
Ifautoraiseis True, the window is raised if possible (note that under many window managers this will occur regardless of the setting of this variable).
Metas
- Add a “meta” system
- Using the syntax
@meta metaNameor@meta metaName metaValueat the beginnig of a file, you can now enable special features - As predicate, you can use
@,#@,%@,@@,-@or$@.
- Using the syntax
- Add
legacyAbsmeta- No value required
- It makes the legacy absolute value possible:
|-1|=1 - However, it makes bitwise or not accessible.
- Add
nbspBetweenFrenchGuillemetsmeta- No value required
- Experience the true french pain! (and I don’t talk about baguettes…) If you want to use the french string quotes (
«»), you will have to put a no-break space (or a narrow no-break space) after the«and before the other». Those (N)NBSP will not be counted in the string.
- Add
setTheTestValueTometa- Sets
__the_test_value__to the str value given in the meta value - If no value is given, it sets it to
None.
- Sets
Technical
- Data version and version ID can now be known using
__data_version__and__version_id__. - Data version is now stored in
./noug_version.json (lib to make libs)Adddefault_posfunction, which returns a tuple (Position, Position)(Internal API)Noug version can now be retrieved usingsrc.noug_versionlibrary. It consists of 8 constants:MAJOR,MINOR,PATCH,PHASE,RELEASE_SERIAL,VERSION(str),VERSION_ID,DATA_VERSION. It does not contains “phase minor”, as it is now called “release serial”.(Build scripts)It is now possible to use a custom python command inbuild.shby passing the command as parameter. Note that I forgot to mention that this is possible withrun_tests.shsince 0.18.0-beta.
Changed
- Renamed “phase minor” to “release serial”. In
noug_version.json, the key is renamed fromphase-minortorelease-serial. The different “phase minor” references are now deprecated (see the Deprecated section), and will be removed in 0.20.0
Technical
- Moved
./config/noug_version.jsonto./noug_version.json - Data version has been increased to 5
- Version ID has been increased to 4
- Argument handling has been rewritten back without
argparse, it was causing more issues than it simplified things - Renamed the
--command_dont_verboseCLI option to--command-dont-verbose. - Each value now takes
pos_startandpos_endarguments, so watch out if you’re making libs! These changes will be available in the documentation (along with everything else)
Deprecated
noug_version.phase_minoris deprecated and will be deleted in 0.20.0.
Fixed
- Fix typos
- Fix a bug where files were referred as
<stdin>in the shell (and therefore in error messages, etc.) - Fix some crashes with imports (where values didn’t have any context)
- Fix an internal bug where the first optional argument of functions whose
should_respect_args_numberwasFalsewas not populated. Never happen in real life because no such function take optional arguments, but you know, just in case. - Unit tests now work properly when debug mode is enabled
- Fix the fact that Nougaro exited with exit code 0 even when there was an error using
-c,-d, etc. - Sometimes, tracebacks in error messages indicated file
(unknown)and line(unknown): this has been fixed
Calculator
Added
- Add the possibility to print the current value (last value in stack) using
p. - Add the possibility to exit with
exit()(yes, it was frustrating) - Add a “DC mode”, accessible using
-dor--dc-modeoption, which is a minimal, teletype-friendly mode. - Add the possibility to print the help message using
-hCLI option. - Add the possibility to print the last error message with
h. - Add factorial with
number !.
Removed
- Remove the possibility to print i with
pi(it is now possible to get the value of π outside of an operation) - Remove the possibility to print the help with
h
Fixed
- Adding more dots into a float no longer does the same thing as adding multiple floats (for instance,
1.9.12was previously parsed to2.02, which is the same as1 0.9 + 0.12 +)
How to update
Important
If you were using noug_version.phase_minor, simply replace it with noug_version.release_serial, as phase_minor is now deprecated.
Full Code Changes: 0.18.0-beta...0.19.0-beta