-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added installation instructions for new pkg mode in README #20
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,32 +11,41 @@ | |
# PeriodicTable.jl | ||
A very simple package for accessing elements in the Periodic Table! :fire: | ||
|
||
## Installation | ||
### Installation | ||
Since PeriodicTable is registered in `METADATA.jl`, you can directly install it like, | ||
```julia | ||
# for julia version <= 0.6 | ||
julia> using Pkg | ||
julia> Pkg.add("PeriodicTable") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this seem better? Later when we drop support for version # for version <= 0.6
julia> using Pkg
julia> Pkg.add("PeriodicTable")
# for version >= 0.7
julia>] # switch to pkg> mode
(v1.0) pkg> add PeriodicTable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the upper one won't work on 0.6 (there exists no module Pkg on 0.6). As I said, I'd just drop the If you would really want to indicate both ways (0.6 and 0.7+) then I'd switch the order (0.7+ first) and remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I missed that part. |
||
|
||
# OR | ||
julia>] # switch to pkg> mode | ||
# for julia version >= 0.7 | ||
julia>] | ||
(v1.0) pkg> add PeriodicTable | ||
``` | ||
|
||
## Update | ||
```julia | ||
julia> Pkg.update("PeriodicTable") | ||
|
||
# OR | ||
julia>] # switch to pkg> mode | ||
(v1.0) pkg> update PeriodicTable | ||
``` | ||
|
||
## How it works? | ||
### How it works? | ||
PeriodicTable.jl provides a Julia interface to a small database of element | ||
properties for all of the elements in the periodic table. In particular | ||
properties for all of the elements in the periodic table. | ||
|
||
```julia | ||
using PeriodicTable | ||
julia> using PeriodicTable | ||
|
||
julia> elements | ||
Elements(…119 elements…): | ||
H He | ||
Li Be B C N O F Ne | ||
Na Mg Al Si P S Cl Ar | ||
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr | ||
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe | ||
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn | ||
Fr Ra Rf Db Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og | ||
Uue | ||
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu | ||
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr | ||
``` | ||
exports a global variable called `elements`, which is a collection of | ||
|
||
In particular `PeriodicTable` exports a global variable called `elements`, which is a collection of | ||
`Element` data structures. You can look up elements by name (case-insensitive) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd move the first sentence, "In particular |
||
via `elements["oxygen"]`, by symbol via `elements[:O]`, or by number via | ||
`elements[8]`, for example. | ||
|
@@ -75,30 +84,15 @@ julia> elements[1:4] | |
Element(Beryllium) | ||
``` | ||
|
||
### View the Periodic Table! | ||
```julia | ||
julia> elements | ||
Elements(…119 elements…): | ||
H He | ||
Li Be B C N O F Ne | ||
Na Mg Al Si P S Cl Ar | ||
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr | ||
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe | ||
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn | ||
Fr Ra Rf Db Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og | ||
Uue | ||
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu | ||
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr | ||
``` | ||
|
||
## Data by | ||
* [Periodic-Table-JSON](https://github.com/Bowserinator/Periodic-Table-JSON) | ||
### Data by | ||
The data used for this package has been pulled up in parts from [here](https://github.com/Bowserinator/Periodic-Table-JSON) | ||
Some information has been (and will be) added over the period of time. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Some information has been (and will be) added over time." sounds better to me. Also there seems to be a dot missing after the |
||
|
||
## Developed together with | ||
### Developed together with | ||
* [Steven G. Johnson](https://github.com/stevengj) | ||
* [Jacob Wikmark](https://github.com/lancebeet) | ||
* [Carsten Bauer](https://github.com/crstnbr) | ||
|
||
## Facing issues? :scream: | ||
### Facing issues? :scream: | ||
* Open a PR with the detailed expaination of the issue | ||
* Reach me out [here](https://www.rahullakhanpal.in) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we might have to replace
METADATA.jl
by the general registry on https://github.com/JuliaRegistries/General.