Getting Started
InfiniteOpt
is a large project with a lot of opportunity for development. As such we warmly welcome and encourage contributions. This page serves as the guide of how to start contributing.
Before starting please review our Code of Conduct.
Step-by-Step
This section will provide a birds-eye view on how to make a contribution to this project.
So you want to help improve InfiniteOpt
, awesome and thank you! Let's walk through step by step how this should be done.
- Setup a GitHub account if you do not already have one. Here is the link to do so.
- Select a specific task to develop that is well-defined. This can as simple as correcting/clarifying a documentation page or as involved as implementing a more efficient data management paradigm. With a task in mind, please start a new issue here in the
InfiniteOpt
repository. Also, this is a good place to find tasks to contribute to by browsing what open issues are (especially ones with the taggood first issue
). Note that if your proposed contribution corresponds to an existing issue please do not make a new issue. A guide to using issues in GitHub is located here. - Fork the
InfiniteOpt
repository to your GitHub account. Only core developers have permissions to modifyInfiniteOpt
directly, thus others need to fork it which essentially amounts to creating their own linked copy. This is done by clicking theFork
button in the top left corner on the main repository page here. - Install Git on your computer. Git is an open source version control program for repositories (it is why GitHub uses the word Git). This is needed to manipulate the repository (all the package files) locally on your computer. A simple Google search should indicate how this should be done for your computer. I personally prefer Git for Windows as a Windows user.
- Now you need to install your forked version of
InfiniteOpt
in Julia on your computer. This needs to be done via thedev
command in the package manager so you can edit it. The syntax is as follows:
We also recommend you install(v1.8) pkg> dev https://github.com/username-here/InfiniteOpt.jl
Revise.jl
which is very useful when developing packages in Julia. - Develop your contribution. Please follow the style guides featured in the sections below. A programmatic contribution will involve the following parts:
- editing/adding code to the
.jl
files in thesrc
(source) directory - adding a docstring for each public function/datatype
- including comments that describe each internal function/datatype
- adding a unit-testing for each function in the appropriate test files in the
test
directory - adding documentation of the new functionality in the appropriate place in the documentation by adding the files in the
docs/src
directory.
- editing/adding code to the
- Commit and push your changes to your forked repository. This is done via Git using your preferred interface and one should pull, add, commit, and then push the changes. Using a bash terminal it would look like this:
We recommend using VsCode as an editor and as a GUI for interfacing with Git.username@ubuntu:~$ cd repo_directory username@ubuntu:~/repo_directory$ git pull origin master username@ubuntu:~/repo_directory$ git add * username@ubuntu:~/repo_directory$ git commit -m "insert commit message here" username@ubuntu:~/repo_directory$ git push origin master
- Create a pull request. Go here to
InfiniteOpt
's main page and create a pull request drawing from your forked repository. A step by step explanation is provided here. - Make necessary changes if the tests fail and/or we ask you to make specific changes. The Codecov tests will ensure every new line of code is tested at least once with the new test functions and the GitHub Actions CI will ensure that the tests pass on a range of operating systems and Julia versions.
- That's it. Once the new additions are ready, we will merge them into the main repository.
- Contribute more by repeating steps 2 and 6-10. Just make sure to update your forked repository before getting started which can be done as explained here. Also, be sure to pull the updated repository unto your computer before getting started.