Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Should git ignore .pyproject file?
Forum Updated to NodeBB v4.3 + New Features

Should git ignore .pyproject file?

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jsulmJ jsulm

    @Developer123 Yes, it should not be committed to the repository

    D Offline
    D Offline
    Developer123
    wrote on last edited by Developer123
    #5

    @jsulm So I put *.pyproject file in .gitignore. Now I cloned the repository, and <projet>.pyproject is not there. I tried opening the project within Qt Creator and... there is no file to select to open the project, only QML files, etc.

    If I simply open the folder within QtCreator, then the Design tab doesn't work because it gives errors (QML emulator layer error, which was fixed on the original project that had the .pyproject.user file). But Projects button on the left bar is grayed out and I can't set the settings again, also Run is grayed out, because... I have no project anymore?

    Are you sure we are supposed to ignore the .pyproject file?

    jsulmJ 1 Reply Last reply
    0
    • D Developer123

      @jsulm So I put *.pyproject file in .gitignore. Now I cloned the repository, and <projet>.pyproject is not there. I tried opening the project within Qt Creator and... there is no file to select to open the project, only QML files, etc.

      If I simply open the folder within QtCreator, then the Design tab doesn't work because it gives errors (QML emulator layer error, which was fixed on the original project that had the .pyproject.user file). But Projects button on the left bar is grayed out and I can't set the settings again, also Run is grayed out, because... I have no project anymore?

      Are you sure we are supposed to ignore the .pyproject file?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #6

      @Developer123 Looks like we gave you wrong advice. .pyproject file is used by QtCreator to manage Python projects (I don't use QtCreator to handle Python projects, so didn't know).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Developer123 Looks like we gave you wrong advice. .pyproject file is used by QtCreator to manage Python projects (I don't use QtCreator to handle Python projects, so didn't know).

        D Offline
        D Offline
        Developer123
        wrote on last edited by
        #7

        @jsulm Ok so.. what's the solution for developing QtQuick (PySide2) with github?

        JonBJ 1 Reply Last reply
        0
        • D Developer123

          @jsulm Ok so.. what's the solution for developing QtQuick (PySide2) with github?

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #8

          @Developer123
          [So far as I know.] Assuming this includes your .pyproject file (unless I have misunderstood), the "solution" is to include that in your git. You do not "like" that it causes differences due to re-ordering, but that does not make it "wrong".

          M D 2 Replies Last reply
          0
          • JonBJ JonB

            @Developer123
            [So far as I know.] Assuming this includes your .pyproject file (unless I have misunderstood), the "solution" is to include that in your git. You do not "like" that it causes differences due to re-ordering, but that does not make it "wrong".

            M Offline
            M Offline
            mchinand
            wrote on last edited by
            #9

            @JonB said in Should git ignore .pyproject file?:

            You do not "like" that it causes differences due to re-ordering, but that does not make it "wrong".

            I think it would be worth creating a QtCreator bugreport for this current behavior. While adding a new file to the project will create a single line diff however they are ordered (or re-ordered), many diff tools are good at highlighting differences within a single line change. So they would benefit from not having the files re-ordered.

            1 Reply Last reply
            0
            • JonBJ JonB

              @Developer123
              [So far as I know.] Assuming this includes your .pyproject file (unless I have misunderstood), the "solution" is to include that in your git. You do not "like" that it causes differences due to re-ordering, but that does not make it "wrong".

              D Offline
              D Offline
              Developer123
              wrote on last edited by Developer123
              #10

              @JonB it's not that I don't like, it's just almost impossible to develop any medium-large software like this. Any branch merges that add/remove components will collide and require manual inspection of every component of the entire project listed on the .pyproject file.

              JonBJ 1 Reply Last reply
              0
              • D Developer123

                @JonB it's not that I don't like, it's just almost impossible to develop any medium-large software like this. Any branch merges that add/remove components will collide and require manual inspection of every component of the entire project listed on the .pyproject file.

                JonBJ Online
                JonBJ Online
                JonB
                wrote on last edited by
                #11

                @Developer123
                Well somehow others have managed. You have a choice: work with what you have now, or give up developing until you have reported the issue, it has been accepted, fixed and released, and you upgrade to that new version. That is your decision.

                If this is the only show-stopper, maybe you should write a small Python script to parse this file and re-order these lists to always be in, say, alphabetical order. You could use that when comparing, or if you say Qt only rewrites the lines when a new item is added you might run the script on the .pyproject file whenever you/someone does add a new item and then only check in that file when it has been "normalized". Yes it's a pain, but that seems to be where you are at right now.

                D 1 Reply Last reply
                0
                • JonBJ JonB

                  @Developer123
                  Well somehow others have managed. You have a choice: work with what you have now, or give up developing until you have reported the issue, it has been accepted, fixed and released, and you upgrade to that new version. That is your decision.

                  If this is the only show-stopper, maybe you should write a small Python script to parse this file and re-order these lists to always be in, say, alphabetical order. You could use that when comparing, or if you say Qt only rewrites the lines when a new item is added you might run the script on the .pyproject file whenever you/someone does add a new item and then only check in that file when it has been "normalized". Yes it's a pain, but that seems to be where you are at right now.

                  D Offline
                  D Offline
                  Developer123
                  wrote on last edited by
                  #12

                  @JonB "You're right, it's an issue with the tool experienced by developers, we need to report and fix that".

                  It's not hard you know

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mchinand
                    wrote on last edited by
                    #13

                    @Developer123 said in Should git ignore .pyproject file?:

                    It's not hard you know

                    This is a user forum, QtCreator developers most likely have not seen this post. You can create a bugreport so that they are made aware of this issue.

                    D 1 Reply Last reply
                    1
                    • M mchinand

                      @Developer123 said in Should git ignore .pyproject file?:

                      It's not hard you know

                      This is a user forum, QtCreator developers most likely have not seen this post. You can create a bugreport so that they are made aware of this issue.

                      D Offline
                      D Offline
                      Developer123
                      wrote on last edited by
                      #14

                      @mchinand Thanks that was a good advice.

                      I looked it up, this issue was already created, but the priority is "somewhat important".. so probably will remain a bug unless more people complain

                      https://bugreports.qt.io/browse/QTCREATORBUG-22492

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved