Updating molsim

Hello,

I have updated the molsim package, but when submitting the molsim.yaml file, the entire Octave package branches and is waiting for acceptance. Is this the expected behavior?

Cheers Jesper

1 Like

Thank you for the update Jesper,

Pushing directly to the main branch is not a good strategy and forbidden. Whatever is pushed to the main branch is immediately released and affects each Octave user installing packages.

Therefore, it is preferred to create a Pull-Request (PR). Having a PR to the main branch enables the GitHub Actions to run some elementary checks before merging to the main branch. In your case, I created a PR from your branch to the main branch here packages/molsim.yaml: release 0.9.4 by siko1056 · Pull Request #153 · gnu-octave/packages · GitHub (you can also create that PR yourself).

When all checks are green, we have some confidence, that pkg install -forge is still working for all Octave users world wide, when your change is added.

Thanks for your understanding. If there is anything I can do to improve the documentation about this workflow, please let me know.

Another benefit is you can test your package on a “neutral system” (GitHub Actions). From the log I can see lots of warnings during the installation. Maybe something so silence for the next package release? Update molsim.yaml · gnu-octave/packages@1466246 · GitHub

Run: pkg install   molsim@0.9.4
  sha256 checksum ok: '98f9d2a7490f578316ef611fedfd834d9c7cb81c7f97e72a6197190580deb84a'
  tools/_sep_sfg.c: In function ‘readxyz’:
  tools/_sep_sfg.c:213:3: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    213 |   fgets(str, 256, fin);
        |   ^~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c: In function ‘pipe’:
  tools/_sep_sfg.c:695:3: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    695 |   system("rm -f start.top");
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c:698:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    698 |     system("cat __bonds.top >> start.top");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c:699:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    699 |     system("echo ""  >> start.top");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c:702:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    702 |     system("cat __angles.top >> start.top");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c:703:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    703 |     system("echo ""  >> start.top");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c:706:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    706 |     system("cat __dihedrals.top >> start.top");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tools/_sep_sfg.c:707:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    707 |     system("echo ""  >> start.top");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c: In function ‘sep_mprofs_init’:
  source/sepsampler.c:1523:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1523 |   ptr->lvec    = lvec;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1524:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1524 |   ptr->nsample = 0;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1525:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1525 |   ptr->isample = isample;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1526:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1526 |   ptr->type    = type;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1527:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1527 |   ptr->dir     = dir;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1528:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1528 |   ptr->dirvel  = dirvel;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1529:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1529 |   ptr->diramom = diramom;
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1531:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1531 |   ptr->momc  = sep_vector(lvec);
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1532:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1532 |   ptr->dens  = sep_vector(lvec);
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1533:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1533 |   ptr->amom  = sep_matrix(lvec, 3);
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1534:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1534 |   ptr->temp  = sep_vector(lvec);
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1535:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1535 |   ptr->numb  = sep_vector(lvec);
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  source/sepsampler.c:1537:6: warning: array subscript ‘sepmprofs[0]’ is partly outside array bounds of ‘unsigned char[64]’ [-Warray-bounds]
   1537 |   ptr->inertia = sep_tensor(lvec,3,3);
        |      ^~
  source/sepsampler.c:1519:20: note: referencing an object of size 64 allocated by ‘malloc’
   1519 |   sepmprofs *ptr = malloc(sizeof(sepprofs));
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~
  ar: creating libsep.a
  
  molsim installed - hopefully without errors
  Try command 
   >> molsim('hello')
  in order to shake hands
  Try command 
   >> molsim_runlj 
  to run example simulation
  Reference sheet can be found under package doc/ directory. 

Finally things seem fine. Please merge the PR with the main branch and delete your local branch. Then your package release is open to every Octave user :slightly_smiling_face:

Thank you for the prompt reply once again. The procedure makes perfect sense - I have not done it the right way previously I think. I have made a pull-request now.

I see that I definitely need to consult my local compiler’s warning flags, and revisit the old base code again yikes

1 Like