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

Add a new scale #7

Merged
merged 6 commits into from
Mar 21, 2023
Merged

Add a new scale #7

merged 6 commits into from
Mar 21, 2023

Conversation

AryanGodara
Copy link
Contributor

Resolves #3 (May add more scales if this one works properly)
Review needed, not ready yet

@@ -13,8 +13,6 @@ depends: [
"ocaml"
"dune" {>= "3.3"}
"odoc" {with-doc}
"portmidi"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this should go away?

Copy link
Collaborator

@abbysmal abbysmal Mar 17, 2023

Choose a reason for hiding this comment

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

(I did not review the rest yet, will take a look maybe later today or this week end! (or @pitag-ha may take a look before!) But this is great, thank you very much!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @Engil !
It seems like I deleted this accidently xD while going through all the files, and checking dependencies etc.

Copy link
Contributor Author

@AryanGodara AryanGodara Mar 17, 2023

Choose a reason for hiding this comment

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

@Engil , just checked, this is weird
When I run,

dune build

It removes portmidi automatically. Same with cmdliner

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ha, I am silly!
The dependencies should be added to dune-project, not the .opam file.
Dune seems to be handling dependencies by itself, I was not aware of this behaviour.

Copy link
Owner

Choose a reason for hiding this comment

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

The dependencies should be added to dune-project, not the .opam file. Dune seems to be handling dependencies by itself

We've specified that we want Dune to do so by having (generate_opam_files true) in the dune-project.

@AryanGodara, do you want to fix this for us by adding the two dependencies to the dune-project file (and re-adding them to the .opam-file)? You could have a look at the dune-project file of the portmidi library to see the syntax. No pressure! I'm happy to do it myself if you prefer to focus on the scale task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I'd definitely like to work on this issue @pitag-ha !!
Should I open a separate issue for this? Or increase the scope of this current PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change seems trivial in size (although I might get it wrong hehe), so I'll push another commit to this PR for it.

Also, can you please review the code @pitag-ha, when you get the time, since there are no CI checks, I can't tell if I'm moving in the right direction (The code does seem to run, when using --scale=minor or --scale=pentatonic, but I'm afraid my ears arent' that trained to catch if it's working properly xd)

Copy link
Owner

Choose a reason for hiding this comment

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

No I'd definitely like to work on this issue @pitag-ha !!

Nice!

Should I open a separate issue for this? Or increase the scope of this current PR?

I leave that up to you. The cleaner version would be to open a separate PR, merge it, and then rebase this branch over the branch of the other PR. However, as you've said, this change is minimal, so mixing the things here is ok as well. If you think otherwise about git history pedantry, @Engil, let us know!

Copy link
Owner

@pitag-ha pitag-ha left a comment

Choose a reason for hiding this comment

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

Thanks, @AryanGodara, this is a great first contribution!

Apart from the few comments I have below (and the one about the dependencies is clearly on us), it looks all good to me to be merged.

.ocamlformat Outdated Show resolved Hide resolved
bin/midi.ml Show resolved Hide resolved
bin/midi.ml Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
Copy link
Owner

@pitag-ha pitag-ha left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, @AryanGodara!

bin/midi.mli Show resolved Hide resolved
cardio_crumble.opam Outdated Show resolved Hide resolved
@AryanGodara
Copy link
Contributor Author

@pitag-ha , I've updated the new changes, sorry for the delay!

@pitag-ha
Copy link
Owner

I've updated the new changes,

Thanks! To be a bit clearer on the dependencies: Given that you're fixing the dependencies in a different PR, this PR should not do any modifications on the .opam file and the dune-project file. Is it clear why?

@AryanGodara
Copy link
Contributor Author

I've updated the new changes,

Thanks! To be a bit clearer on the dependencies: Given that you're fixing the dependencies in a different PR, this PR should not do any modifications on the .opam file and the dune-project file. Is it clear why?

Yes, I understand the reason @pitag-ha !
I'll revert the last commit, and rebase with the master branch, now that the Update-dependencies PR is merged.
Is this correct?

Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
@pitag-ha
Copy link
Owner

I'll revert the last commit, and rebase with the master branch, now that the Update-dependencies PR is merged. Is this correct?

Perfect, thank! Yes, that's correct. Once you've gotten rid of the .opam and dune-project file modifications, you probably don't even need to rebase yourself given that there shouldn't be any conflicts and so github should be able do a fast-forward workflow. If you want to go the sure way, rebasing on your side sounds good!

@AryanGodara
Copy link
Contributor Author

I'll revert the last commit, and rebase with the master branch, now that the Update-dependencies PR is merged. Is this correct?

Perfect, thank! Yes, that's correct. Once you've gotten rid of the .opam and dune-project file modifications, you probably don't even need to rebase yourself given that there shouldn't be any conflicts and so github should be able do a fast-forward workflow. If you want to go the sure way, rebasing on your side sounds good!

Yes, I reverted last commit and rebased with origin/main.

Is this PR ready now?

Copy link
Owner

@pitag-ha pitag-ha left a comment

Choose a reason for hiding this comment

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

Thanks for the adaptions, @AryanGodara! You're still modifying the .opam-file. Apart from that LGTM (looks good to me)!

cardio_crumble.opam Outdated Show resolved Hide resolved
Signed-off-by: aryan <aryangodara03@gmail.com>
@AryanGodara
Copy link
Contributor Author

Thanks for the adaptions, @AryanGodara! You're still modifying the .opam-file. Apart from that LGTM (looks good to me)!

Sorry @pitag-ha , removed those two depends

Copy link
Owner

@pitag-ha pitag-ha left a comment

Choose a reason for hiding this comment

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

Perfect, thanks, @AryanGodara!

Btw, one of these days, I'll try to find time to set up a basic CI checking at least whether the code builds and formats.

@pitag-ha pitag-ha merged commit 5bb33f7 into pitag-ha:main Mar 21, 2023
@AryanGodara
Copy link
Contributor Author

Perfect, thanks, @AryanGodara!

Btw, one of these days, I'll try to find time to set up a basic CI checking at least whether the code builds and formats.

Can I try this @pitag-ha ?
I have a bit of experience with github actions, and CI, and can implement something similar to ocaml-mbr repository CI checks
(basic linting and building test at first, then add to it)

@pitag-ha
Copy link
Owner

Can I try this @pitag-ha ?

If you know how to do that, that sounds great! What kind of CI infrastructure do you have in mind?

You've mentioned ocaml-mbr, which uses the ocaml-ci pipeline. To enroll cardio-crumble to ocaml-ci, I'd have to install the ocaml-ci GitHub app myself. Afterwards, you could go ahead and do the rest: submit the PR to the ocaml-ci stack and add the ocaml-ci status to our README. Given that we don't even have tests for cardio-crumble yet, enrolling it to ocaml-ci could be considered a bit of overhead. However, tbh, to me it sounds good!

Another option could be to use a github actions workflow, making use of ocaml/setup-ocaml@v2.

And I'm also very happy to hear other suggestions if you have something else in mind.

I think in other languages the CI set-up might be more standardized. So, if you were expecting something simpler, don't feel shy to point that out. If you're still happy to work on this, let me know, so that we can open an issue for that and unassign you from #4 for now.

@AryanGodara
Copy link
Contributor Author

Can I try this @pitag-ha ?

If you know how to do that, that sounds great! What kind of CI infrastructure do you have in mind?

You've mentioned ocaml-mbr, which uses the ocaml-ci pipeline. To enroll cardio-crumble to ocaml-ci, I'd have to install the ocaml-ci GitHub app myself. Afterwards, you could go ahead and do the rest: submit the PR to the ocaml-ci stack and add the ocaml-ci status to our README. Given that we don't even have tests for cardio-crumble yet, enrolling it to ocaml-ci could be considered a bit of overhead. However, tbh, to me it sounds good!

Another option could be to use a github actions workflow, making use of ocaml/setup-ocaml@v2.

And I'm also very happy to hear other suggestions if you have something else in mind.

I think in other languages the CI set-up might be more standardized. So, if you were expecting something simpler, don't feel shy to point that out. If you're still happy to work on this, let me know, so that we can open an issue for that and unassign you from #4 for now.

I was originally thinking of github actions, or googling and seeing how it's usually done.

If you install the ocaml-ci , i will research both ways and implement after discussion whichever seems better!

It will take a bit of time though, only till sunday, then my exams will be over and i'll work much faster!

@pitag-ha pitag-ha mentioned this pull request Mar 21, 2023
@AryanGodara AryanGodara deleted the add-scale branch March 22, 2023 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new scale
3 participants