Skip to content

Commit

Permalink
Change installation instructions to specifically request v1.0.4 (#450)
Browse files Browse the repository at this point in the history
* change installation instructions to specifically request v1.0.4 for installation (this version)

* update index.rst year

* add licence date change

* add change in conf.py of year

* year change in LICENSE.md

* publish only to anaconda on releases

* fix found typos in v1 documentation
  • Loading branch information
maxbriel authored Nov 27, 2024
1 parent 352953e commit bb29288
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 43 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/publish-to-anaconda.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: publish_conda

on:
push:
branches:
- main
release:
types: [published]

jobs:
publish:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2022, Tassos Fragos
Copyright (c) 2024, Tassos Fragos
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "posydon" %}
{% set version = "1.0.3" %}
{% set version = "1.0.4" %}

package:
name: "{{ name|lower }}"
Expand Down
2 changes: 1 addition & 1 deletion docs/about/licence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Licence

BSD 3-Clause License

Copyright (c) 2022, Tassos Fragos
Copyright (c) 2024, Tassos Fragos
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

# General information about the project.
project = u'posydon'
copyright = u'2022, Tassos Fragos'
copyright = u'2024, Tassos Fragos'
author = u'POSYDON Collaboration'

# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Table of Contents
License & Attribution
---------------------

Copyright (c) 2022, Tassos Fragos
Copyright (c) 2024, Tassos Fragos

If you make use of POSYDON in your work, please cite our paper
(`arXiv <https://arxiv.org/abs/2202.05892>`_,
Expand Down
41 changes: 26 additions & 15 deletions docs/install/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
Installation
############

.. warning::

**POSYDON v1**

You are currently viewing the documentation for POSYDON v1.0.4. If you are
looking for the documentation of the latest version of POSYDON, please
visit the `latest documentation <https://posydon.org/POSYDON/>`_.


The easiest way to start with POSYDON is to install it from Anaconda
(Recommended way), and call an executable script that downloads the grid
data automatically.
Expand All @@ -13,7 +22,7 @@ POSYDON manually through `github` (Manual Installation). Below we describe both
ways.

=========================================================
Installing POSYDON v1.0.0 from Anaconda (Recommended way)
Installing POSYDON v1.0.4 from Anaconda (Recommended way)
=========================================================

Installation
Expand All @@ -22,25 +31,25 @@ Installation
We recommend using Anaconda and to install POSYDON in a virtual environment.
We have created a package which can be accessed through conda-forge. On Linux,
the new conda environment can be created (we have named our environment
posydon-example, but you can choose any name), the conda-forge channel added,
posydon_conda, but you can choose any name), the conda-forge channel added,
and the required library installation can all be completed in one line using
the terminal or command line:

.. code-block::
conda create --name posydon-example -c posydon -c conda-forge posydon
conda create --name posydon_conda -c posydon -c conda-forge posydon=1.0.4
On Mac (or if you have problems with the above command on Linux), these steps
likely need to be separately run:

.. code-block::
conda create -n posydon-conda python=3.7
conda activate posydon-conda
conda create -n posydon_conda python=3.7
conda activate posydon_conda
conda config --add channels conda-forge
conda config --add channels posydon
conda config --set channel_priority false
conda install posydon
conda install posydon=1.0.4
In case of OSX-ARM architectures, where many packages of Python 3.7 are not
available, please use the following commands:
Expand All @@ -53,20 +62,20 @@ available, please use the following commands:
conda config --add channels conda-forge
conda config --add channels posydon
conda install python=3.7
conda install posydon
conda install posydon=1.0.4
Now, you can activate the environment with

.. code-block::
conda activate posydon
conda activate posydon_conda
Downloading the POSYDON data
----------------------------
Because the data is large, ~10 GB, it must be downloaded
with an explicit command. Export the path to where you want
to clone the data, e.g. `/home/`, and download the data from
to clone the data, e.g. ``/home/``, and download the data from
ZENODO with the following commands

.. code-block::
Expand All @@ -79,15 +88,15 @@ ZENODO with the following commands


==========================================================
Installing POSYDON v.1.0 from GitHub (Manual Installation)
Installing POSYDON v.1.0.4 from GitHub (Manual Installation)
==========================================================

Creating a conda environment
----------------------------

As above, we recommend using Anaconda to install POSYDON in a virtual
environment. After creating the environment (you can choose any name, e.g.,
`posydon`, or `posydon_env`) like this:
``posydon``, or ``posydon_env``) like this:

.. code-block::
Expand All @@ -102,11 +111,11 @@ proceed with the installation, you will need to activate the environment:
Cloning POSYDON
---------------
Clone the repository in a local directory, e.g. `/home/POSYDON/`, with
Clone the repository in a local directory, e.g. ``/home/POSYDON/``, with

.. code-block::
git clone https://github.com/POSYDON-code/POSYDON.git
git clone https://github.com/POSYDON-code/POSYDON.git --branch v1.0.4
The directory will contain the following structure:
Expand All @@ -132,11 +141,13 @@ Export the path to the cloned POSYDON code (you can add this line to your
Installing the package
~~~~~~~~~~~~~~~~~~~~~~
From the cloned POSYDON directory execute the commands to install POSYDON and
the `mpi4py` dependency (first make sure you are on the main branch!)
the ``mpi4py`` dependency.
With the git cloning command above, you should have downloaded the v1.0.4 version of
POSYDON.

.. code-block::
git checkout main
cd $PATH_TO_POSYDON
pip install -e .
conda install mpi4py
Expand Down
2 changes: 1 addition & 1 deletion docs/visualization/plot1D/plot1D.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _plot1D:

##############################################
1D plotting functionalities for POSYON GRIDS
1D plotting functionalities for POSYDON GRIDS
##############################################


Expand Down
2 changes: 1 addition & 1 deletion docs/visualization/plot2D/plot2D.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _plot2D:

##############################################
2D plotting functionalities for POSYON GRIDS
2D plotting functionalities for POSYDON GRIDS
##############################################

Similar to our 1D plotting functions, we provide a series of 2D plotting
Expand Down
22 changes: 11 additions & 11 deletions posydon/grids/post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def post_process_grid(grid, index=None, star_2_CO=True, MODEL=MODEL,
single_star=False, verbose=False):
"""Compute post processed quantitiy of any grid.
This function post process any supported grid and computes:
- Core collpase quantities for 5 prescritions given the fiducial POSYDON
This function post processes any supported grid and computes:
- Core collapse quantities for 5 prescriptions given the fiducial POSYDON
assumption given in MODEL plus:
A: direct collapse
B: Fryer+12-rapid
Expand All @@ -58,13 +58,13 @@ def post_process_grid(grid, index=None, star_2_CO=True, MODEL=MODEL,
for each prescrition we store the compact object state (WD/NS/BH),
SN type (WD, ECSN, CCSN, PISN, PPISN), fallback mass fraction f_gb,
compact object mass and spin.
- Core masses at he-depletion (used in Patton core collpase)
- Mass envelopes for common ennvelope step.
- Core masses at he-depletion (used in Patton core collapse)
- Mass envelopes for common envelope step.
Parameters
----------
grid : PSyGrid
MESA gri in PSyGrid format.
MESA grid in PSyGrid format.
index : None, touple or int
If None, loop over all indicies otherwise provide a range, e.g. [10,20]
or a index, e.g. 42.
Expand All @@ -75,7 +75,7 @@ def post_process_grid(grid, index=None, star_2_CO=True, MODEL=MODEL,
single_star : bool
If `True` the PSyGrid contains single stars.
verbose : bool
If `True` print on screen the results of each core collpase.
If `True` print the results of each core collapse on screen.
Returns
-------
Expand All @@ -84,7 +84,7 @@ def post_process_grid(grid, index=None, star_2_CO=True, MODEL=MODEL,
processed values. This is used to ensure one to one mapping when
appending the extra columns back to a grid.
EXTRA_COLUMNS: dict
Dictionary containing all post processe quantities.
Dictionary containing all post processed quantities.
"""
CORE_COLLAPSES = [['direct', ''], ['Fryer+12-rapid', ''],
Expand Down Expand Up @@ -227,7 +227,7 @@ def post_process_grid(grid, index=None, star_2_CO=True, MODEL=MODEL,
EXTRA_COLUMNS['S%s_center_other' % (j+1)].append(None)

if not single_star:
# core collpase quantities
# core collapse quantities
if interpolation_class in ['no_MT', 'stable_MT']:
if star_2_CO or TF1 == 'Primary has depleted central carbon':
star = binary.star_1
Expand Down Expand Up @@ -364,7 +364,7 @@ def add_post_processed_quantities(grid, MESA_dirs_EXTRA_COLUMNS, EXTRA_COLUMNS,
"""Append post processed quantity to a grid.
This function appends the quantities computed in post_process_grid to any
grid. Note that this function ensure you can append the quantities only if
grid. Note that this function ensures you can append the quantities only if
the grid follows the order of MESA_dirs_EXTRA_COLUMNS.
Parameters
Expand All @@ -376,9 +376,9 @@ def add_post_processed_quantities(grid, MESA_dirs_EXTRA_COLUMNS, EXTRA_COLUMNS,
processed values. This is used to ensure one to one mapping when
appending the extra columns back to a grid.
EXTRA_COLUMNS: dict
Dictionary containing all post processe quantities.
Dictionary containing all post processed quantities.
verbose : bool
If `True` print on screen the results of each core collpase.
If `True` print the results of each core collapse on screen.
"""
# check correspondance of EXTRA_COLUMNS with grid
Expand Down
12 changes: 6 additions & 6 deletions posydon/grids/psygrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
NOTE: you can use a family of HDF5 files in case of file size restrictions.
For example, using `mygrid.h5.%d` for the path when creating/loading grids,
implied that split files will be `mygrid.h5.0`, `mygrid.h5.1`, and so on.
implies that split files will be `mygrid.h5.0`, `mygrid.h5.1`, and so on.
When overwriting the file, all the family is overwritten (effectively, the
files are emptied to avoid remainder split files from previous operations.)
Expand Down Expand Up @@ -90,8 +90,8 @@
to select the exact set of columns, provide them in a tuple instead of list.
II. READING DATA FROM GRID
--------------------------
II. READING DATA FROM A GRID
----------------------------
mygrid = PSyGrid("thegrid.h5") # opens a stored grid
# Indexing...
Expand Down Expand Up @@ -125,7 +125,7 @@
for run in mygrid:
print(run)
c) Getting number of runs:
c) Getting the number of runs:
n_runs = len(psygrid)
Expand Down Expand Up @@ -159,8 +159,8 @@
myrun.history1.star_mass + myrun.history1.star_mass
loads the table two times! To reduce reading times, store in local variables
all the tables that are going to be needed more than once:
loads the table two times! To reduce reading times, store all the tables
that are going to be needed more than once in local variables:
myhistory1 = myrun.history1
myhistory1.star_mass + myhistory1.star_mass
Expand Down
2 changes: 1 addition & 1 deletion posydon/interpolation/IF_interpolation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Module for performing initial-final inteprolation.
"""Module for performing initial-final interpolation.
We showcase the initial-final interpolator which plays a critical role in the
evolving binary populations. To use the initial-final interpolator we first
Expand Down

0 comments on commit bb29288

Please sign in to comment.