-
Notifications
You must be signed in to change notification settings - Fork 233
Pull requests
David Eisenbud edited this page Oct 25, 2024
·
21 revisions
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
.
-
- 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 fetch development
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.,You can find a list of existing keywords at the packages provided with Macaulay2 documentation page.newPackage("MyPackage", ... Keywords => {"Foo"}, ...)
- Make sure that the
DebuggingMode
option tonewPackage
is either removed or set tofalse
. - Move your new package(s) or changes to the directory
foo/M2/M2/Macaulay2/packages
wherefoo/M2
is the top level of 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
foo/M2/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"
- Use
- initiate the pull pull request using the dropdown
Contribute
menu and selectingOpen Pull Request
. A new box will open. - Change the base branch of new pull requests to
development
if necessary. - Add a title and some comments about the package(s) or changes.
Homepage | Projects | Packages | Documentation | Events | Google Group