Skip to content

Commit b66fcaa

Browse files
committed
Merge pull request #2854 from jiahao/patch-1
Updated package contribution guidelines
2 parents b0234f0 + bbb644b commit b66fcaa

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

doc/manual/packages.rst

+28-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Julia Packages
33
==============
44

5+
Julia features an extensive list of packages which significantly extend the
6+
base functionality of the language.
7+
58
Where to find Julia packages
69
----------------------------
710

@@ -37,6 +40,19 @@ can get into an inconsistent state. Deleting the ``$HOME/.julia``
3740
directory will wipe everything related to the package system. Repeat
3841
all the steps listed here to start from a clean slate.
3942

43+
.. _contrib-existing:
44+
45+
Contributing to an existing Julia package
46+
-----------------------------------------
47+
48+
The list of :ref:`available-packages` contains direct links to the homepage of each
49+
individual package, where further instructions on how to contribute to them may be
50+
found. You may be interested in addressing open issues for individual packages, or
51+
alternatively contribute code that you already have to an existing package.
52+
53+
For packages hosted on Github, please ensure that pull requests go directly
54+
to the individual package repositories and not the main Julia repository.
55+
4056
Contributing a new Julia package
4157
--------------------------------
4258

@@ -65,7 +81,13 @@ actual desired names.
6581
Creating a new Julia package
6682
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6783

68-
1. Initialize your package in Julia by running::
84+
1. Check that your proposed package will not compete directly with an existing one
85+
by checking the list of :ref:`available-packages`. If there is significant overlap
86+
in scope, we strongly encourage that you work with the existing package maintainers
87+
to improve the existing package rather than creating a new, competing package.
88+
See ref:`contrib-existing`_.
89+
90+
2. Initialize your package in Julia by running::
6991

7092
Pkg.new("MY_PACKAGE_NAME")
7193

@@ -74,30 +96,30 @@ Creating a new Julia package
7496
.. note::
7597
This will overwrite any existing files and git repository in ``$HOME/.julia/MY_PACKAGE_NAME``.
7698

77-
2. If you have already created a repository for your package, overwrite the
99+
3. If you have already created a repository for your package, overwrite the
78100
skeleton by copying or symlinking over it. For example,::
79101

80102
rm -r $HOME/.julia/MY_PACKAGE_NAME
81103
ln -s /path/to/existing/repo/MY_PACKAGE_NAME $HOME/.julia/MY_PACKAGE_NAME
82104

83-
3. In ``REQUIRE``, list the names of all packages used by your new package. One
105+
4. In ``REQUIRE``, list the names of all packages used by your new package. One
84106
package per line.
85107

86-
4. Populate the package by filling out ``README.md`` and ``LICENSE.md``, source
108+
5. Populate the package by filling out ``README.md`` and ``LICENSE.md``, source
87109
code in ``src/``, and tests in ``test/``. Ensure that each test file contains these
88110
lines near the beginning::
89111

90112
using Test
91113
using MY_PACKAGE_NAME
92114

93-
5. Add a publicly accessible remote repository URL, if your package doesn't
115+
6. Add a publicly accessible remote repository URL, if your package doesn't
94116
already have one. For example, create a new repository called
95117
``MY_PACKAGE_NAME.jl`` on Github and then run::
96118

97119
cd $HOME/.julia/MY_PACKAGE_NAME
98120
git remote add github https://github.com/MY_GITHUB_USER/MY_PACKAGE_NAME.jl
99121
100-
6. Add at least one git commit and push it to the remote repository::
122+
7. Add at least one git commit and push it to the remote repository::
101123

102124
# Do some stuff
103125
git add #list of files goes here

0 commit comments

Comments
 (0)