Commit graph

46 commits

Author SHA1 Message Date
Robert Sparks 7d464fcc55
fix: keep the ftp dir in sync when the datatracker creates artifacts (#8401)
* chore: fix typo in log message

* fix: write new conflict reviews to the ftp directory

* fix: log exception description

* chore: avoid reusing a name for mypy

* fix: write non-meeting-related slides to ftp/slides

* fix: write status changes to ftp dir

* fix: copy draft yang modules to the ftp dir

the last commit above (see #8401) has no tests :(. There aren't tests of this yang scaffolding to add to. Adding a set of tests should be an independent larger effort.
2025-01-09 11:23:20 -06:00
Jennifer Richards a4e0354090
feat: get tool versions without VersionInfo model (#7418)
* feat: get tool versions without VersionInfo model

* chore: remove update_external_command_info call

* feat: get tool version without VersionInfo

* chore: Remove VersionInfo model

* chore: Migration to remove VersionInfo

* fix: handle errors better; ignore stderr

* fix: type annotation
2024-05-14 18:53:31 -05:00
Jennifer Richards 6cc2fb94a3
fix: update DraftYangChecker for xym 0.6 changes (#4546)
* fix: update DraftYangChecker for xym 0.6 changes

* chore: update xym requirements to >=0.6
2022-10-06 18:03:18 -05:00
Lars Eggert edf3242665 More fixes.
- Legacy-Id: 19836
2022-01-12 18:37:18 +00:00
Lars Eggert 726b29bf74 fontawesome -> bootstrap-icons
- Legacy-Id: 19608
2021-11-10 09:28:38 +00:00
Henrik Levkowetz 1dedffb550 Provide a local environment path for pyang, which is installed with pip and may not be available globally. Fixes issue #3018.
- Legacy-Id: 18322
2020-07-30 15:33:24 +00:00
Henrik Levkowetz f0baae3623 Made test parts that depends on yanglint conditional. Added some informational messages about tests skipped due to missing resources.
- Legacy-Id: 18255
2020-07-24 13:43:59 +00:00
Henrik Levkowetz 25e644d0e2 Added support for pulling yang modules from yangcatalog.org.
- Legacy-Id: 18141
2020-07-08 18:44:56 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 3db48727ea Specified explicit UTF-8 decoding of submission checker output
- Legacy-Id: 17194
2020-01-07 22:26:00 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz 2e92652eaa Changed a regex to use an r string. Added decoding of command pipe output.
- Legacy-Id: 16374
2019-07-04 15:45:18 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 5e796292ff Added class inheritance from 'object'.
- Legacy-Id: 16238
2019-06-12 21:31:42 +00:00
Henrik Levkowetz 0cc7f73d58 Additional tweaks to submission yang testing and the test runner
- Legacy-Id: 15870
2019-01-07 13:38:44 +00:00
Henrik Levkowetz 2634e2143a Added a bit of additional checking to test_submit_invalid_yang.
- Legacy-Id: 15869
2019-01-07 11:43:28 +00:00
Henrik Levkowetz 8180716efa Added a couple of assertion to help understand test coverage percentage variations
- Legacy-Id: 15751
2018-11-11 12:19:29 +00:00
Henrik Levkowetz fcc22da623 Removed a chunk of code that won't be executed in all test environments from the test coverage measurements
- Legacy-Id: 14550
2018-01-23 17:29:41 +00:00
Henrik Levkowetz 47a0b9d3ce Changed handling of yang modeules from drafts with errors, to not place them in separate directories, due to possible follow-on effects. Added use of IANA-held modules when validating, and regular rsyncing from IANA.
- Legacy-Id: 14389
2017-12-04 14:37:15 +00:00
Henrik Levkowetz 6edcd1b407 Capture messages from xym's get_extracted_models()
- Legacy-Id: 14275
2017-11-02 14:45:58 +00:00
Henrik Levkowetz a25ee4e50d Fixed an initialization error.
- Legacy-Id: 14271
2017-11-01 20:58:21 +00:00
Henrik Levkowetz 1e98a58386 Added missing in-loop variable initializations in the yang checker code. Fixes issue #2397.
- Legacy-Id: 14268
2017-11-01 14:40:56 +00:00
Henrik Levkowetz 02ec2aa7e3 Included the path for draft moduled found invalid in the module paths when running yanglint, in order to avoid some unhelpful model not found messages. Fixes issue #2398.
- Legacy-Id: 14266
2017-11-01 14:00:24 +00:00
Henrik Levkowetz 54088de325 Changed the submission checkers to return more information in the checker details json blob; in particular added information about individual extracted code modules associated with a draft. This is used by the yang valididty checker to return a list of extracted yang modules.
- Legacy-Id: 14236
2017-10-30 11:28:19 +00:00
Henrik Levkowetz 135d5d946b Tweaked the submission checker shell invocation code to deal with command lines starting with environment variable settings.
- Legacy-Id: 14107
2017-09-08 12:09:22 +00:00
Henrik Levkowetz 95a5400dea Changed the handling of yang validation otput to capture errors messages also when command the exit code is zero.
- Legacy-Id: 14100
2017-09-03 14:40:02 +00:00
Henrik Levkowetz 25e833444c Added a check for duplicate Yang model names after xym extraction. This prevents running pyang and yanglint on one module, moving it to the module libs, and then failing to run the checks on a second module with the same name, because the file has been moved after the first check.
- Legacy-Id: 13770
2017-07-03 21:24:19 +00:00
Henrik Levkowetz 7e1b09410c Upgraded xym to 0.4.2, with related changes in method calls.
- Legacy-Id: 13741
2017-06-30 15:59:40 +00:00
Henrik Levkowetz 60e9b7451c Included the temporary yang model extraction directory in the list of model librarires given to yanglint, in order to support drafts with models referencing models in the same draft. Fixes issue #2324.
- Legacy-Id: 13736
2017-06-29 21:03:26 +00:00
Henrik Levkowetz 3b7f320c29 Removed the copy of xym copied directly from repository -- the method call we use is too unstable at the moment. Now requiring xym=='0.4'.
- Legacy-Id: 13723
2017-06-28 11:53:09 +00:00
Henrik Levkowetz 13905a2a84 Modified the yang checker to work with both versions 0.3.x and 0.4.x of xym (different signatures for get_extracted_models()).
- Legacy-Id: 13719
2017-06-27 11:37:56 +00:00
Henrik Levkowetz 8eded1d8d2 Return a checker None result with exception message on xym exceptions.
- Legacy-Id: 13707
2017-06-22 15:08:01 +00:00
Henrik Levkowetz 70de94fc48 Variable naming tweak
- Legacy-Id: 13701
2017-06-21 13:12:19 +00:00
Henrik Levkowetz 768ca0b45e Catch bad module names in the Yang checker (they are not currently flagged by xym).
- Legacy-Id: 13700
2017-06-21 13:10:05 +00:00
Henrik Levkowetz 228a68348f Don't deliver spurious yang extraction errors for drafts where no yang modules were found.
- Legacy-Id: 13668
2017-06-17 20:54:52 +00:00
Henrik Levkowetz 98dc0d0092 Only run yanglint and yanglint tests if we have it configured.
- Legacy-Id: 13636
2017-06-15 22:13:43 +00:00
Henrik Levkowetz d98054c103 Added a new yang checker, 'yanglint', to the existing Yang checker class, in
addition to the existing 'pyang' checker.

Added modal overlay displays showing the yang check results every place the
yin/yang symbol is shown (red or green) to indicate the presencee and result
of yang checks.  Added a Yang Validation: line in the document
meta-information section on the document's page in the datatracker.

Added the result of the xym extaction to the yang check results, to make
extration failures visible.

Added the version of the used xym, pyang, and yanglint commands to the check
results.

Added an action to move successfully extracted and validated modules to the
module library directories immediately on submission.

Added the xym and pyang repositories as svn:external components, rather than
listing them in requirements.txt, as there has been delays of many months
between essential features in the repositories, and an actual release.  We may
get occasional buildbot failures if broken code is pulled in from the
repository, but better that than the functionality failure of severely
outdated componets.

Added a new management command to re-run yang validation for active drafts for
which yang modules were found at submission time, in order to pick up imported
models which may have arrived in the model libraries after the draft's
submission.  Run daily from bin/daily.

Added a table to hold version information for external commands.  The yang
checker output should include the version information of the used checkers,
but seems unnecessary to run each command with its --version switch every
time we check a module...

Added a new management command to collect version information for external
commands on demand.  To be run daily from bin/daily.

Added tests to verify that xym, pyang and yanglint information is available
on the submission confirmation page, and updated the yang module contained in
the test document to validate under both pyang and yanglint.

Updated admin.py and resource.py files as needed.
 - Legacy-Id: 13630
2017-06-15 16:09:28 +00:00
Henrik Levkowetz f6a1fcdaf8 Added more information about submission errors and a full idnits run to the manual post email sent to the secretariat.
- Legacy-Id: 12831
2017-02-13 20:37:47 +00:00
Henrik Levkowetz ec684e1b4e Added a pylint rc-file, and fixed or silenced a number of issues found by pylint using the settings .pylintrc (which enable only error checking).
- Legacy-Id: 11941
2016-09-08 14:48:59 +00:00
Henrik Levkowetz d96f0fe964 Added a django management command to populate yang model libraries from RFCs and drafts.
- Legacy-Id: 11110
2016-04-08 17:18:54 +00:00
Henrik Levkowetz 4b0b7e0c58 Merged in henrik/6.16.1-pyang-work@10995:
Added in support for displaying results from selected submission checks as symbols on draft pages and in draft lists.  For now, that means that drafts with yang modules will show either a green or orange yang symbol, depending on the result of the submission yang validation check.
 - Legacy-Id: 10996
2016-03-28 19:23:10 +00:00
Henrik Levkowetz be2a2285bc Added small orange or green yang symbols to draft info- and list-pages, signifying fail or pass for the submission yang validation.
- Legacy-Id: 10994
2016-03-28 18:47:53 +00:00
Henrik Levkowetz 7b65e2624f Added another guard against varying pyang output format.
- Legacy-Id: 10966
2016-03-22 20:58:08 +00:00
Henrik Levkowetz f52e21fb17 Put a guard in the yang validator against trying to read a draft which is absent from the staging area.
- Legacy-Id: 10958
2016-03-21 11:42:06 +00:00
Henrik Levkowetz e0d1c0b313 Fixed a possible index error in the yang validator checker plugin.
- Legacy-Id: 10952
2016-03-17 13:22:16 +00:00
Henrik Levkowetz 76bb233b70 Refactored draft submission checks so that new checkers can be slotted in through a configuration in settings.py. Refactored the calling of idnits to use the new API, and added a pyang validation check.
- Legacy-Id: 10894
2016-03-04 20:08:29 +00:00