Commit Graph

229 Commits

Author SHA1 Message Date
Dan Smith
22cca139c2 Remove some old tools and orphaned files
bitdiff.py is from before we had GUI developer tools, and is not py3
  compliant anyway.
img2thd72.py is no longer useful now that the thd72 driver can open
  those files directly, and is not py3 compliant anyway.
elib_intl.py is something to do with internationalization on win32
  (it seems). Not sure if/when we ever used that, but we don't anymore
  and thus it is removed.
2023-03-10 18:07:04 -08:00
Dan Smith
2f5eb1503a Remove flake8-compliant files from cpep8
These files already adhere to the stricter rules, so keep them that
way.
2023-03-10 18:07:04 -08:00
Dan Smith
32e6548b61 Make flake8 default style linter for new files
This makes cpep8 run flake8 on anything *not* in the manifest or
*not* in the blacklist. Thus, all new files will get flake8 run against
them by default. It adds a bunch of files to the blacklist that were
not in manifest and thus still aren't compliant. Those need to get
cleaned up, obviously.

No new files should be added to cpep8.manifest going forward so that
the stricter flake8 rules get applied by default. Ideally we'd also
remove files from cpep8.manifest as well so we can move to just one
set of rules for everything, but that will take a while.
2023-03-10 18:07:04 -08:00
Dan Smith
f2052d66ac Fix untranslatable driver prompt strings
Long ago, an anti-pattern was introduced by a driver whereby the prompt
string were marked for translation, but wrapped around a call to
dedent() for formatting. In order for gettext to pick up the strings
when building the catalog, the actual literals must be marked. Even
though the gettext call works at runtime, the static analysis does not
understand enough python to push through that call.

This is the first step of re-writing all those instances to avoid
using dedent() and instead use multiple string lines inside the gettext
call. This was done en masse, so it's possible that some of this is
not right, but it's a good start and much more reasonable than doing
it manually in so many places.

This also includes a dumb rule in check_commit.sh to help prevent
future introduction of this, although it won't catch all cases.

Related to #10434
2023-03-10 15:48:15 -08:00
Finn Thain
aa08e097c4 Add a driver for Q-MAC HF-90 radio
The Q-MAC HF-90 radio was in production during the 1990's and 2000's.
In 2009, Q-MAC Electronics was acquired by Barrett Communications and
Barrett was acquired by Motorola Solutions in 2022.

Several models were produced: HF-90A (Australia), HF-90E (export),
HF-90H (frequency hopping) and HF-90M (military). The aim of this driver
is to support HF-90A and HF-90E as that's the hardware I have available.
Most likely this driver is also compatible with HF-90H.

There were numerous firmware changes over the years and some radios
can't be programmed with the latest PC software from Q-MAC. Here's the
warning from Qmac.exe v3.0.4 (from 2004):

    This programming software is for use on radios with Export Version
    firmware (HF-90E or HF-90H) and firmware version 301 or greater.
    Earlier firmware versions will be corrupted if programmed using this
    software and will render the HF-90 inoperable.

Consequently, this driver comes in two flavours: "v300 or earlier" which
imitates the older v2 dealer software for use with early firmware, and
"v301 or later" which imitates the more recent v3 dealer software and
is not for use with early firmware.

Perhaps technical documentation will come to light that would explain
the quirks of the various firmware revisions. If that should happen,
the v300/v301 scheme could be improved upon. For now, it's the best
I can do.

Fixes: #10428
2023-03-09 21:45:12 -08:00
Dan Smith
ed829f5b4b Check patches to see if locale files need update
This makes msgmerge use sorted output to make the files stable.
2023-03-06 18:15:14 -08:00
Dan Smith
c4f0c614c9 Updates to check-patch job
Log the base and commits we are checking and also relax the
check for merges, since we seem to not be catching them in the
github workflow.
2023-02-23 16:01:43 -08:00
Dan Smith
9419d5b298 Remove legacy platform serial enumeration
...and mox-based tests thereof.
2023-02-22 19:23:41 -08:00
Dan Smith
08ad256959 Fix IC-V80 style issues
Related to #174
2023-02-16 14:58:46 -08:00
Dan Smith
1665671883 Add Kenwood TK-2140/3140 support
Fixes #10339
2023-02-02 15:36:37 -08:00
Dan Smith
eeae0f7a6f Fix actually returning status from fast-driver 2023-01-29 08:02:47 -08:00
Dan Smith
9cdff2b151 Add fast-driver tox target
This makes us only run driver tests for drivers that have had changes.
Note that this only works if you've got an up-to-date origin remote.
2023-01-28 08:51:26 -08:00
Dan Smith
548101122d Check for merge commits in PRs 2023-01-28 08:51:26 -08:00
Dan Smith
97f07da5bb Add Kenwood TK-7160, 8160 support
This is not very complete yet, but it works for me. Tested with a
real 7160 and with 8160 files from KPG-99D.

Fixes #10323
2023-01-27 17:05:25 -08:00
Mel Terechenok
3594e1d0d4 New Model support Wouxun KG-UV980P, KG-1000G, KG-1000G Plus
Fixes: #7223
Fixes: #10109
Fixes: #9979
2023-01-25 20:12:56 -08:00
Dan Smith
7055f5b3b4 Finish icx8x conversion to bitwise
This finishes the conversion by moving the set operations to use
bitwise and remove the legacy icx8x_ll module
2023-01-25 17:32:25 -08:00
Dan Smith
c83d09343c Fix check-patch CRLF detection 2023-01-15 21:33:37 -08:00
Dan Smith
2c125a1ba5 Make check_commit detect CRLF files 2023-01-15 21:10:17 -08:00
Dan Smith
71ba4ffbc7 Remove two unit test files for chirp-legacy
These weren't removed when chirp/ui was nuked.
2023-01-14 16:22:50 -08:00
Dan Smith
eb61d9b1f3 Fix style errors in ft2d.py
And add to manifest
2023-01-10 16:38:55 -08:00
Dan Smith
95b58df182 Squelch pep8.py warnings 2023-01-10 15:19:20 -08:00
Brad Schuler
17dd37e175 AnyTone 5888UVIII Python 3 updates, tested with radio, added to cpep8 manifest 2023-01-10 14:39:55 -08:00
Dan Smith
759501097e Record Icom W32A as working
Reported by a user. Fixes #10238
2023-01-08 09:03:56 -08:00
Dan Smith
502e982a64 Add MemoryMapBytes to check_commit.sh
Make sure we don't add new drivers with non-byte-clean MemoryMap
objects.
2023-01-04 15:13:33 -08:00
Dan Smith
3641406a9b Add check_commit.sh and github action
This enforces some commit requirements, such as not adding new code
that relies on py2 compatibility.
2022-12-31 11:01:11 -08:00
Dan Smith
b9054684e7 Delete chirp.ui module
This removes the legacy GTK GUI from the tree. This is not being
maintained, doesn't work very well, and I'm tired of accidentally
editing files here when I mean to edit wxui/*. When we announce the
chirp-next stuff to the users, I don't want packagers to be confused
about which version to use, what the required dependencies are, etc.
2022-12-28 08:32:01 -08:00
Dan Smith
7ea97a769d Remove chirpw from cpep8.manifest 2022-12-27 13:14:20 -08:00
Dan Smith
6dd505b0a0 Add a definition of 'unit tested' on the matrix 2022-12-27 10:59:12 -08:00
Dan Smith
718f0cdd72 Make RRCA use the new network source pattern
Also do some cleanup required to eliminate the globals, which no
longer really work with the split into sources/ anyway.
2022-12-20 15:02:43 -08:00
Dan Smith
4a4d65bfc8 Implement banks for TH-D74
Also add to cpep8.manifest and fix a couple style issues.
2022-12-18 16:22:30 -08:00
Dan Smith
d2c7bbf8bd Move fips from ui to wxui 2022-12-16 12:44:11 -08:00
Dan Smith
129b1aa9a4 Move config to wxui 2022-12-16 12:44:11 -08:00
Charlie Li
0f861bf65f Include data files in the chirp package itself
Data files outside the package are not installed in binary distributions, so move them inside. Use importlib_resources to load icon and stock configs.
- use only the newer files(), as_files() and namespace APIs introduced in Python 3.10
- use the importlib_resources package if Python < 3.10
- remove obviated pkg_path()
- bump minimum Python version to 3.7

Fix test paths to account for the move
2022-12-14 11:20:30 -08:00
Dan Smith
817eae76ac Add a "probably works" status to the test matrix
This is for drivers that share a cloning protocol module with other
tested drivers *and* are tested on a static image in the tree. For
example, all the kenwood live drivers use the same few routines for
communicating with the radio. Icom clone-mode radios (with one
exception) use the icf module for cloning and thus there's really
nothing to convert in the drivers themselves.
2022-12-12 16:40:21 -08:00
Dan Smith
32f8ac7084 Add a note about "Byte Clean" to the matrix 2022-12-09 19:13:00 -08:00
Dan Smith
f770f128a6 Fix "market share" stats for a few things
First, I was imperfect in my matching of models with special
characters (spaces, parens, slashes, etc) so those were not
represented here.

Second, I wasn't including aliases in the market share for the parent
radio.

This substantially alters the stats (in a good way for total
completion).
2022-12-09 17:20:40 -08:00
Dan Smith
1c56250a33 Add model usage stats to test matrix
This adds some stats about which models are the most widely used to
the test matrix to help guide decisions about total testing versus
relevant testing.

Model stats are captured from our own databases, and are far from
perfect, but are probably sufficiently useful. Stats captured on
9-Dec-2022.
2022-12-09 09:08:35 -08:00
Dan Smith
25cc75970c Fix tk760g.py style issues 2022-12-06 14:19:40 -08:00
Dan Smith
27f183cd0d Add a test procedure to the bottom of the matrix
For consistency and so a reader knows what "tested" means.
2022-12-04 11:08:37 -08:00
Merge Bot
09306b4e90 Merge commit '9608cb66ca27fdf957746428a4313769f75423a9' into py3-sync 2022-11-24 02:18:00 +00:00
Dan Smith
9608cb66ca Fix improperly-named driver modules
These drivers are only importable by the magic directory stuff, but
are not actually valid module names.
2022-11-23 18:17:37 -08:00
Dan Smith
6fc596eadc Remove the safe import and py3_remaining stuff
This makes us stop tolerating modules that don't import in py3.

\o/
2022-11-23 17:54:28 -08:00
Merge Bot
fcd454e261 Merge commit '538171e2b3cbd4ecb7d21d448403a36988084044' into py3-sync
# Conflicts:
#	chirp/drivers/icf.py
#	chirp/ui/mainapp.py
2022-11-21 15:42:56 -08:00
Dan Smith
538171e2b3 Initial ID-5100 support
Tested only with a MapRev=3 radio.

Fixes: #1647
2022-11-21 15:26:21 -08:00
Dan Smith
2db34939c2 Add some stats to the testing report
So we can see how much is completed vs. remaining.
2022-10-24 17:46:56 -07:00
Dan Smith
440a2bdefb Allow marking drivers as implied-tested
This should be used for drivers that are either exactly identical to
another (i.e. a subclass with only vendor/model changes) or which
can be tested with another model radio with only constraint
differences (i.e. a GMRS-locked version of an amateur model).
2022-10-24 17:46:56 -07:00
Dan Smith
345bb586c9 Report byte clean status on py3 driver report 2022-10-02 07:49:51 -07:00
Merge Bot
27b5bff879 Merge commit '3ccd695e34e0f7d0382206188b815a34b3c305f8' into py3-sync 2022-10-01 23:48:10 +00:00
Jim Unroe
dedb3cabee [AR-5a8] Add Abbree AR-518
This patch adds the Abbree AR-518 radio.

Fixes #9738
2022-10-01 16:39:37 -07:00
Dan Smith
e43e34b3b8 Add a tool for tracking real-world driver testing
Converting a driver to pass tests on python3 is not quite the same
as it actually working in the real world. We need to keep track of
which drivers have been tested in the wild, separate from those that
merely pass tests.

This adds a file tests/py3_driver-testers.txt, which is a simple list
of the driver ID key and the person/date when it was tested. Running
the "makesupported" tox target will also generate
tests/Python3_Driver_Testing.md, which will be render-able in github
for easy viewing.

If you test a driver on python3, please add a line to the tracking
file, run the makesupported target, and update the markdown file.
2022-09-21 15:05:09 -07:00