Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Repository for OpenModelica Collaboration

Repository for OpenModelica Collaboration

Hi,

I am wondering whether it is reasonable to store OpenModelica code on a GitHub repository for collaboration. I am new to both GitHub and OpenModelica, so maybe the answer is pretty straightforward.
I have some doubts because in Modelica we have all packages and models in one large code file that is then uploaded to GitHub. This does not seem to provide a good overview of projects. Maybe it would be possible to store the packages and models in individual code files to give a better overview?

What are your thoughts on this? How can one collaborate well with Open Modelica?

Thanks in advance for the answers current/smile

Re: Repository for OpenModelica Collaboration

Hey nimoror,

I'm not sure if you are mixing up Modelica (a programming language) and OpenModelica (a tool simulating models written in the Modelica language). But anyway, to answer your question:

OpenModelica itself is an open-source software project with a lot of different people working on it. So naturally one needs some tool to track changes and git is one of the most popular ones and really good at doing this. So our OpenModelica project is hosted on GitHub, one of several different platforms hosting git managed repositories.
If you or anyone is wanting to contribute to OpenModelica check out our contribution guidelines. But because OpenModelica is open-source anyone can contribute and not everyone needs to be an expert programmer. Finding and reporting bugs helps as well!

On the other hand there is the Modelica language and libraries written in Modelica. For example the Modelica Standard Library is quiet a big library that is developed by a lot of people, so they are using git and GitHub as well. You can browse through the files and check out how they are structuring the repository.

So for developing your own library you can save libraries in multiple files (In OMEdit: File->New->New Modelica Class; a dialog opens where you choose package and uncheck "Save contents in one file"), have packages in packages and with that getting a well structured system of .mo-files you can work with.
Together with git (hosted on GitHub or GitLab) and a working CI (GitHub Actions, GitLab CI, Jenkins, ...) you'll get a really nice repository you can work with a lot of people to develop a new awesome Modelica library.

And I would argue that this kind of development is more or less standard for software development nowadays.

Re: Repository for OpenModelica Collaboration

nimoror wrote:

Maybe it would be possible to store the packages and models in individual code files to give a better overview?

AnHeuermann wrote:

So for developing your own library you can save libraries in multiple files (In OMEdit: File->New->New Modelica Class; a dialog opens where you choose package and uncheck "Save contents in one file"), have packages in packages and with that getting a well structured system of .mo-files you can work with.

Also, look at the structure of the Buildings library: https://github.com/lbl-srg/modelica-bui … /Buildings

Over 3000 files to store the package.

There are 0 guests and 0 other users also viewing this topic
You are here: