Menu

#1477 Add webpages and transliterated titles to API output

Approved
closed
None
5
2022-01-26
2022-01-20
No

The API publication output, e.g. this one does not include the Webpages field(s) nor the Transliterated Title field(s).

As these are directly tied to the publication (rather than the container title) one would expect them to be included.

Discussion

  • Lokal_Profil

    Lokal_Profil - 2022-01-20

    Unless there is some reason not to implement this I wouldn't mind trying to provide a patch for it to familiarise myself with both the codebase and the svn+sourcforge workflow.

     
  • Ahasuerus

    Ahasuerus - 2022-01-20

    Publication-specific "Web pages" and "Transliterated Titles" multi-values are relatively recent additions to the database. Apparently, I forgot to update the REST API when they were implemented. If you would like to add them to the API output, please feel free to give it a try.

     
  • Lokal_Profil

    Lokal_Profil - 2022-01-20

    I see that a mix of tabs and spaces is in use.

    Is the convention spaces (8 per indent level) for newer code? Or keep same as the edited code block? If the former is it ok to touch adjacent code lines if the mixed indentation types makes the logic unclear?

     
  • Ahasuerus

    Ahasuerus - 2022-01-20

    http://www.isfdb.org/wiki/index.php/Development#Code_Format says:

    Older ISFDB modules tend to use tabs. Newer ISFDB modules tend to use 8 spaces. A few ISFDB modules use 4 spaces. Some modules use a mix of spaces and tabs, which can cause problems, especially if and when we migrate from Python 2 to Python 3.

    • For new development, use 8 spaces.
    • When modifying existing modules which use either spaces OR tabs, use the current indentation method.
    • When modifying existing modules which use a mix of spaces and tabs, change the module to use 8 spaces. This may require additional testing to ensure that nothing got broken.

    Since this is your first module, you may want to choose not to change the rest of the module in order to minimize the amount of testing that will be required.

     
  • Lokal_Profil

    Lokal_Profil - 2022-01-21

    A tentative patch.

    I have not tested it since I discovered I don't have enough free space to set up a virtualbox with the required environment. I'll see if I can free up enough space to get that working in the next couple of days.

     
  • Ahasuerus

    Ahasuerus - 2022-01-23
    • status: open --> closed
    • assigned_to: Ahasuerus
     
  • Ahasuerus

    Ahasuerus - 2022-01-23

    Implemented in:

    common/SQLparsing.py
    common/pubClass.py
    rest/pub_output.py
    

    Installed in SVN 831 on 2021-01-23. Closing the FR.

     
  • Ahasuerus

    Ahasuerus - 2022-01-23

    OK, everything has been tested and installed. In addition, I cleaned up the "pub_output" code, standardized the way the artist list was created and changed the publication date format from YYYY-MM-00 to YYYY-MM-DD.

    Unfortunately, I wasn't able to add your user name to the list of developers -- for some reason the Sourceforge software didn't recognize "Lokal_Profil" as an existing user name in the Admin section of the project.

     
  • Lokal_Profil

    Lokal_Profil - 2022-01-26

    Thanks!

    Lokal_Profil is just the display name, under the hood the user name is lokal-profil.

     
  • Ahasuerus

    Ahasuerus - 2022-01-26
    • assigned_to: Ahasuerus --> Lokal_Profil
     
  • Ahasuerus

    Ahasuerus - 2022-01-26

    Changed the developer's name from Ahasuerus to Lokal_Profil now that the latter has been added to the list of ISFDB developers.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB