-
Notifications
You must be signed in to change notification settings - Fork 233
Pull requests
Under construction 25 Oct 2024: This section describes the steps that are needed to contribute a new package, packages, or changes to existing code.
- If you have never done so before, on github, you need to create your own copy ("fork") of the Macaulay2 repository on github:
- go to
github.com/Macaulay2/M2
- Use the drop-down menu arrow button to the right of
Forks
at the top right side of the page
- go to
- Now on your computer:
- clone this repository, e.g.
git clone [email protected]/USERNAME/M2.git
, where USERNAME is your git user name. - change directory into the new repository on your computer, and check out the development branch with
git checkout development
.
- clone this repository, e.g.
- Suppose that the Macaulay 2 repo is called foo/M2. Change to that directory.
- Type git branch to see your branches. If you see one called "development", but it is not starred, do "git switch development" to change to it. If you do not see a development branch, you can get one with "git switch development"
- Make sure your development branch is up to date with Macaulay2',
- do this by going to
github.com/USERNAME/M2
(where USERNAME as above is your github name) - change to the development branch (drop-down menu with the branch name)
- then use the drop down "Sync fork" button, to sync with Macaulay2's development branch.
- on your machine, in the directory "foo/M2", do
git pull
to get the latest version into your computer's local repository.
- do this by going to
-
Add a "Keywords" option to the call to
newPackage
, e.g.,newPackage("MyPackage", ... Keywords => {"Foo"}, ...)
You can find a list of existing keywords at the packages provided with Macaulay2 documentation page.
-
Make sure that the
DebuggingMode
option tonewPackage
is either removed or set tofalse
. *-
push the changes to your forked M2 repository on github by
git push
-
Move your new package or changes to the directory
M2/Macaulay2/packages
in your M2 repository. -
Use
git add [FILES]
, followed bygit commit -m "some comment about your changes"
), whereFILES
is the list of files you are adding or changing -
Also, add a line to the file
M2/Macaulay2/packages/=distributed-packages
with the name of each new package on its own line, add newline character too at the end, andgit add M2/Macaulay2/packages/=distributed-packages
,git commit -m "editing =distributed-packages"
-
-
initiate
- now push to github:
git push
- Now go to your repository on github
- click on
Contribute
, it should suggest making a pull request. - FIll out the info
- click on
- now push to github:
-
Push your changes on this branch to github (Use
git push
) -
On the github website for your cloned M2 repository, do:
- Step 1
- Step 2.
Please change the base branch of new pull requests to development
.
If you are adding a new package, then please also do the following:
-
Add the name of your package to the file
M2/Macaulay2/packages/=distributed-packages
. -
Add a "Keywords" option to the call to
newPackage
, e.g.,newPackage("MyPackage", ... Keywords => {"Foo"}, ...)
You can find a list of existing keywords at the packages provided with Macaulay2 documentation page.
-
Make sure that the
DebuggingMode
option tonewPackage
is either removed or set tofalse
.
Homepage | Projects | Packages | Documentation | Events | Google Group