Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python script to replace ruby xmlschema generator #1232

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

mjcarroll
Copy link
Contributor

@mjcarroll mjcarroll commented Feb 8, 2023

In conjunction with #884, this should allow us to remove the Ruby dependency from sdformat entirely.

I checked this against the output of the ruby generator, and all files matched with the exception of a small difference in physics:

diff --git a/physics.xsd b/physics.xsd
index af02efb..2b4df93 100644
--- a/physics.xsd
+++ b/physics.xsd
@@ -144,7 +144,8 @@
         cor = e                            [rigid]
 
         Combining rule e = 0,               e1==e2==0
-                         = 2*e1*e2/(e1+e2), otherwise]]>
+                         = 2*e1*e2/(e1+e2), otherwise
+      ]]>
                   </xsd:documentation>
                 </xsd:annotation>
                 <xsd:complexType>

Base automatically changed from mjcarroll/missing_xsd to sdf13 February 8, 2023 18:19
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #1232 (675a7f8) into main (618286b) will not change coverage.
The diff coverage is n/a.

❗ Current head 675a7f8 differs from pull request most recent head 7db5abc. Consider uploading reports for the commit 7db5abc to get more accurate results

@@           Coverage Diff           @@
##             main    #1232   +/-   ##
=======================================
  Coverage   87.60%   87.60%           
=======================================
  Files         128      128           
  Lines       16830    16830           
=======================================
  Hits        14744    14744           
  Misses       2086     2086           

@scpeters
Copy link
Member

scpeters commented Feb 8, 2023

CI is failing with a permission denied message

@mjcarroll
Copy link
Contributor Author

CI is failing with a permission denied message

the power of chmod +x

@mjcarroll mjcarroll marked this pull request as ready for review February 8, 2023 23:07
@mjcarroll mjcarroll self-assigned this Feb 8, 2023
@scpeters
Copy link
Member

scpeters commented Feb 8, 2023

shall we remove the ruby script it is replacing?

@mjcarroll mjcarroll changed the title Quick and dirty script to mimic xmlschema.rb Python script to replace ruby xmlschema generator Feb 9, 2023
@mjcarroll
Copy link
Contributor Author

shall we remove the ruby script it is replacing?

Good with me. I noticed that the other PR doing this targeted main, so I will retarget this one.

@mjcarroll mjcarroll changed the base branch from sdf13 to main February 9, 2023 13:46
@azeey
Copy link
Collaborator

azeey commented Feb 9, 2023

This brought other changes over from sdf13 when you retargetted it. #1236 should help.

@mjcarroll
Copy link
Contributor Author

This brought other changes over from sdf13 when you retargetted it.

Rebased, thanks.

Note that we can't drop ruby entirely, because it will interfere with the CLI tests.

@Bi0T1N
Copy link
Contributor

Bi0T1N commented Feb 10, 2023

Is there a reason why you didn't considered #643?

@mjcarroll
Copy link
Contributor Author

Is there a reason why you didn't considered #643?

There are other questions that needed to be resolved there. I think that #643 is still relevant in the long term, I'm just trying to dump ruby dependencies as fast as possible here.

Copy link
Collaborator

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! Just a few minor comments.

tools/xmlschema.py Outdated Show resolved Hide resolved
tools/xmlschema.py Outdated Show resolved Hide resolved
tools/xmlschema.py Show resolved Hide resolved
tools/xmlschema.py Outdated Show resolved Hide resolved
tools/xmlschema.py Show resolved Hide resolved
@mjcarroll
Copy link
Contributor Author

@scpeters do you know what would be causing:

Warning: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set: not checking for outdated
dependents or dependents with broken linkage!
Error: Process completed with exit code 1.
##[debug]Finishing: Install base dependencies

In the actions build here?

@mjcarroll
Copy link
Contributor Author

Nevermind, this is the root error:

ln -s ../Cellar/[email protected]/3.11.4_1/bin/2to3 2to3
rm /usr/local/bin/2to3
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-3.11
Target /usr/local/bin/2to3-3.11
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3-3.11'

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite --dry-run [email protected]

Possible conflicting files are:
/usr/local/bin/2to3-3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/2to3-3.11
/usr/local/bin/idle3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/idle3.11
/usr/local/bin/pydoc3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/pydoc3.11
/usr/local/bin/python3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
/usr/local/bin/python3.11-config -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11-config
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /usr/local/opt/[email protected]/.brew/[email protected]
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/[email protected]

@scpeters
Copy link
Member

@scpeters do you know what would be causing:

Warning: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set: not checking for outdated
dependents or dependents with broken linkage!
Error: Process completed with exit code 1.
##[debug]Finishing: Install base dependencies

In the actions build here?

there was a fix in #1271 waiting to be forward ported to main in #1297

@mjcarroll
Copy link
Contributor Author

there was a fix in #1271

I just cherry-picked the fix here.

@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 31, 2023
@mjcarroll mjcarroll merged commit 9fc8150 into main Aug 1, 2023
10 checks passed
@mjcarroll mjcarroll deleted the mjcarroll/xmlschema_py branch August 1, 2023 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants