taskGNU Health - Tasks: task #16513, Linting the source code


You are not allowed to post comments on this tracker with your current authentication level.

task #16513: Linting the source code

Submitter:  Gerald Wiese <gerald_wiese>
Submitted:  Tue 05 Mar 2024 06:20:24 PM UTC
Should Start On:  Tue 05 Mar 2024 12:00:00 AM UTC Should be Finished on:  Sat 05 Apr 2025 12:00:00 AM UTC
Category:  Demo server Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  meanmicio Percent Complete:  0%
Open/Closed:  Open Release:  4.9
Module:  All Component:  Hospital Management

Thu 07 Mar 2024 04:45:39 AM UTC, comment #4: 

At the moment, only left below:

feng@Tumashu ~/projects/health $ bash lint.sh |grep -v pyc
./tryton/health/setup.py:15:1: E265 block comment should start with '# '
./tryton/health_archives/setup.py:15:1: E265 block comment should start with '# '
./tryton/health_pediatrics_growth_charts/setup.py:98:80: E501 line too long (85 > 79 characters)
./tryton/health_pediatrics_growth_charts_who/setup.py:101:80: E501 line too long (93 > 79 characters)
./tryton/health_who_essential_medicines/setup.py:98:80: E501 line too long (83 > 79 characters)

Running pyflakes linting
./tryton/health_surgery/report/surgery_report.py:29:17: local variable 'timezone' is assigned to but never used
./tryton/health_surgery/report/surgery_report.py:31:9: local variable 'dt' is assigned to but never used

Running reuse linting

The following files have no copyright and licensing information:

  • tryton/health_genetics/data/human_genes_alt_loci.xml
  • tryton/health_genetics/data/human_genes_grch38.xml
  • tryton/health_genetics_uniprot/data/variant_phenotypes.xml
  • tryton/health_surgery/data/surgery_protocols.xml
  • tryton/health_surgery_protocols/data/surgery_protocols.xml
  • tryton/scripts/gnuhealth-data-import/data/1-patients.csv
  • tryton/scripts/gnuhealth-data-import/data/1-patients.ods
  • tryton/scripts/gnuhealth-data-import/data/2-products.csv
  • tryton/scripts/gnuhealth-data-import/data/2-products.ods
  • tryton/scripts/gnuhealth-data-import/data/3-medicaments.csv
  • tryton/scripts/gnuhealth-data-import/data/3-medicaments.ods
  • tryton/scripts/gnuhealth-data-import/data/4-labtests.csv
  • tryton/scripts/gnuhealth-data-import/data/4-labtests.ods
  • tryton/scripts/gnuhealth-pot-fill/data/icd10-chapter.txt
  • tryton/scripts/gnuhealth-pot-fill/data/icd10-disease.txt
  • tryton/scripts/gnuhealth-pot-fill/data/icd10-section.txt
  • tryton/scripts/gnuhealth-pot-fill/data/icd9procs.txt
  • tryton/scripts/gnuhealth-pot-fill/gnuhealth-pot-fill.el


  • Bad licenses: 0
  • Deprecated licenses: 0
  • Licenses without file extension: 0
  • Missing licenses: 0
  • Unused licenses: 0
  • Used licenses: GPL-3.0-or-later, CC-BY-SA-4.0
  • Read errors: 0
  • files with copyright information: 2399 / 2595
  • files with license information: 2399 / 2595

Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-(


  • Fix missing copyright/licensing information: For one or more files, the tool

  cannot find copyright and/or licensing information. You typically do this by
  adding 'SPDX-FileCopyrightText' and 'SPDX-License-Identifer' tags to each
  file. The tutorial explains additional ways to do this:

feng@Tumashu ~/projects/health $

Feng Shu <tumashu>
Wed 06 Mar 2024 08:48:15 AM UTC, comment #3: 

I have update most file with autopep8, except _init.py and setup.py

Feng Shu <tumashu>
Tue 05 Mar 2024 09:58:17 PM UTC, comment #2: 

As per in task #161514, leave setup.py as a lower priority on linting, since it won't be part of GH HIS 5.0 :)

Luis Falcon <meanmicio>
Group administrator
Tue 05 Mar 2024 09:37:21 PM UTC, comment #1: 

It's also a good idea to place the PEP8 / pycodestyle scripts on your favorite editor, to check while coding, before saving the file.

PS: Please use PEP8 on the commits message :)


Luis Falcon <meanmicio>
Group administrator
Tue 05 Mar 2024 06:20:24 PM UTC, original submission:  

I run Python Linting and Reuse Linting (the latter is for licensing) and saw quite some noise both for default and stable branches.

I put a shell script for this in the default branch of the main repository health in Mercurial. Developers can run it locally before committing.

In the future this could also be part of automated testing.

And we could add the same script to the other repositories containing Python Code.

Gerald Wiese <gerald_wiese>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by tumashu (Posted a comment)
  • -email is unavailable- added by meanmicio (Posted a comment)
  • -email is unavailable- added by gerald_wiese (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-05 meanmicio Should be Finished on2024-04-05 2025-04-05
    2024-03-05 meanmicio CategoryNone Demo server
        StatusNone Ready For Test
        Assigned toNone meanmicio
        ReleaseNone 4.9

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code