Skip to content

Commit

Permalink
Merge pull request #386 from nanograv/dev
Browse files Browse the repository at this point in the history
Merge dev and do new release
  • Loading branch information
AaronDJohnson authored Aug 26, 2024
2 parents 6ab5d06 + 508e0d9 commit 1ab8ad9
Show file tree
Hide file tree
Showing 20 changed files with 926 additions and 189 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: enterprise CI targets

on:
push:
branches: [ master ]
branches: [ master, dev ]
pull_request:
branches: [ master ]
branches: [ master, dev ]
release:
types:
- published
Expand All @@ -16,8 +16,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout repository
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Test with pytest
run: make test
- name: Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
#with:
# fail_ci_if_error: true

Expand All @@ -72,7 +72,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.8"
- name: Install non-python dependencies on linux
run: |
sudo apt-get install libsuitesparse-dev
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -133,4 +133,4 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
twine upload dist/*
55 changes: 44 additions & 11 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,38 @@ If you are proposing a feature:
Get Started!
------------

Ready to contribute? Here's how to set up `enterprise` for local development.
Ready to contribute? Here's how to set up ``enterprise`` for local development.

1. Fork the `enterprise` repo on GitHub.
Install the dependencies
~~~~~~~~~~~~~~~~~~~~~~~~

``enterprise`` relies on a lot of other software to function.
If you use the Anaconda distribution of Python, you can get all of this software using ``conda``.
First, you install the latest stable version of ``enterprise``, which will come with all of the dependencies.
Then you remove ``enterprise`` leaving everything else intact.
This way you can use your development version of ``enterprise`` instead of the stable version.
We will also need some additional software that is required to run the tests.

Start with a virtual environment with the extra dependencies required for running tests. In this case it is called ``ent_dev``::

$ conda create -n ent_dev -y -c conda-forge python=3.9 black=22.3.0 flake8 sphinx_rtd_theme pytest-cov
$ conda activate ent_dev

Now install everything else by running the commands::

$ conda install -c conda-forge enterprise-pulsar
$ conda remove enterprise-pulsar --force
$ pip install coverage-conditional-plugin


Get the enterprise source code and get to work!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Fork the ``enterprise`` repo on GitHub.
2. Clone your fork locally::

$ git clone [email protected]:your_name_here/enterprise.git
$ cd enterprise/
3. Set `enterprise/master` as upstream remote::
Expand All @@ -73,17 +99,25 @@ Ready to contribute? Here's how to set up `enterprise` for local development.
$ git pull upstream master

4. This is how you set up your fork for local development:

.. note::
You will need to have ``tempo`` and ``suitesparse`` installed before
running the commands below.
You will need to have ``tempo2`` and ``suitesparse`` installed before
running these commands.

::
If you installed the dependencies via conda, you are good to go!

$ cd enterprise/
If you set up a ``conda`` virtual environment with the dependencies already,
you can add your local fork of ``enterprise`` to it by running::

$ pip install -e .

If you manually installed the dependencies, this will make and activate a
Python3 virtual env with your local fork of ``enterprise``::
$ make init
$ source .enterprise/bin/activate


5. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature
Expand All @@ -93,7 +127,6 @@ Ready to contribute? Here's how to set up `enterprise` for local development.
6. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox (tox not implemented yet). Also check that any new docs are formatted correctly::

$ make test
$ make lint
$ make docs

To get flake8 and tox, just pip install them into your virtualenv.
Expand All @@ -114,9 +147,8 @@ Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring.
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
https://travis-ci.org/nanograv/enterprise/pull_requests
and make sure that the tests pass for all supported Python versions.
3. The pull request should work for all supported versions of Python: 3.8, 3.9, 3.10, 3.11, and 3.12. You
can see the progress of the tests in the `Checks` tab of your GitHub pull request.

Tips
----
Expand All @@ -130,3 +162,4 @@ To track and checkout another user's branch::
$ git remote add other-user-username https://github.com/other-user-username/enterprise.git
$ git fetch other-user-username
$ git checkout --track -b branch-name other-user-username/branch-name

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build Status](https://github.com/nanograv/enterprise/workflows/CI-Tests/badge.svg)](https://github.com/nanograv/enterprise/actions)
[![Documentation Status](https://readthedocs.org/projects/enterprise/badge/?version=latest)](https://enterprise.readthedocs.io/en/latest/?badge=latest)
[![Test Coverage](https://codecov.io/gh/nanograv/enterprise/branch/master/graph/badge.svg?token=YXSX3293VF)](https://codecov.io/gh/nanograv/enterprise)
![Python Versions](https://img.shields.io/badge/python-3.7%2C%203.8%2C%203.9%2C%203.10-blue.svg)
![Python Versions](https://img.shields.io/badge/python-3.8%2C%203.9%2C%203.10%2C%203.11%2C%203.12-blue.svg)

[![Zenodo DOI 4059815](https://zenodo.org/badge/DOI/10.5281/zenodo.4059815.svg)](https://doi.org/10.5281/zenodo.4059815)

Expand All @@ -14,7 +14,7 @@ Inference SuitE) is a pulsar timing analysis code, aimed at noise
analysis, gravitational-wave searches, and timing model analysis.

- Note: `enterprise>=3.0` does not support Python2.7. You must use
Python \>= 3.7.
Python \>= 3.8.
- Free software: MIT license
- Documentation: <https://enterprise.readthedocs.io>.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Welcome to enterprise's documentation!
.. image:: https://codecov.io/gh/nanograv/enterprise/branch/master/graph/badge.svg?token=YXSX3293VF
:target: https://codecov.io/gh/nanograv/enterprise
:alt: Test Coverage
.. image:: https://img.shields.io/badge/python-3.6%2C%203.7%2C%203.8-blue.svg
.. image:: https://img.shields.io/badge/python-3.8%2C%203.9%2C%203.10%2C%203.11%2C%203.12-blue.svg
:alt: Python Versions

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4059815.svg
Expand Down
19 changes: 19 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ Installation
.. .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
Using conda
-----------

``enterprise`` is available via conda-forge as `enterprise-pulsar <https://anaconda.org/conda-forge/enterprise-pulsar>`_.
If you use the Anaconda distribution of Python, we strongly recommend installing via the ``conda`` command:

.. code-block:: console
$ conda install -c conda-forge enterprise-pulsar
From sources
------------

Expand Down Expand Up @@ -57,3 +68,11 @@ If you want to run tests or do any other development then also run:
.. _Github repo: https://github.com/nanograv/enterprise
.. _tarball: https://github.com/nanograv/enterprise/tarball/master


Tips
----

If you have a computer with an Apple Silicon chip, see `these instructions`_ on how to install Apple Intel packages using Rosetta.

.. _these instructions: https://conda-forge.org/docs/user/tipsandtricks.html#installing-apple-intel-packages-on-apple-silicon
Loading

0 comments on commit 1ab8ad9

Please sign in to comment.