2
2
Julia Packages
3
3
==============
4
4
5
+ Julia features an extensive list of packages which significantly extend the
6
+ base functionality of the language.
7
+
5
8
Where to find Julia packages
6
9
----------------------------
7
10
@@ -37,6 +40,19 @@ can get into an inconsistent state. Deleting the ``$HOME/.julia``
37
40
directory will wipe everything related to the package system. Repeat
38
41
all the steps listed here to start from a clean slate.
39
42
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
+
40
56
Contributing a new Julia package
41
57
--------------------------------
42
58
@@ -65,7 +81,13 @@ actual desired names.
65
81
Creating a new Julia package
66
82
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67
83
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::
69
91
70
92
Pkg.new("MY_PACKAGE_NAME")
71
93
@@ -74,30 +96,30 @@ Creating a new Julia package
74
96
.. note ::
75
97
This will overwrite any existing files and git repository in ``$HOME/.julia/MY_PACKAGE_NAME ``.
76
98
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
78
100
skeleton by copying or symlinking over it. For example,::
79
101
80
102
rm -r $HOME/.julia/MY_PACKAGE_NAME
81
103
ln -s /path/to/existing/repo/MY_PACKAGE_NAME $HOME/.julia/MY_PACKAGE_NAME
82
104
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
84
106
package per line.
85
107
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
87
109
code in ``src/ ``, and tests in ``test/ ``. Ensure that each test file contains these
88
110
lines near the beginning::
89
111
90
112
using Test
91
113
using MY_PACKAGE_NAME
92
114
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
94
116
already have one. For example, create a new repository called
95
117
``MY_PACKAGE_NAME.jl `` on Github and then run::
96
118
97
119
cd $HOME/.julia/MY_PACKAGE_NAME
98
120
git remote add github https://github.com/MY_GITHUB_USER/MY_PACKAGE_NAME.jl
99
121
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::
101
123
102
124
# Do some stuff
103
125
git add #list of files goes here
0 commit comments