Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
2d1a8c23
Commit
2d1a8c23
authored
5 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Discontinue Python 2.7 support?": Bilby is now python3.5+
parent
eb81daef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+0
-5
0 additions, 5 deletions
.gitlab-ci.yml
bilby/__init__.py
+23
-0
23 additions, 0 deletions
bilby/__init__.py
docs/installation.txt
+11
-4
11 additions, 4 deletions
docs/installation.txt
setup.py
+9
-1
9 additions, 1 deletion
setup.py
with
43 additions
and
10 deletions
.gitlab-ci.yml
+
0
−
5
View file @
2d1a8c23
...
...
@@ -35,11 +35,6 @@ stages:
${script} --help;
done
# test basic setup on python2
basic-2.7
:
<<
:
*test-python
image
:
python:2.7
# test basic setup on python3
basic-3.7
:
<<
:
*test-python
...
...
This diff is collapsed.
Click to expand it.
bilby/__init__.py
+
23
−
0
View file @
2d1a8c23
...
...
@@ -17,6 +17,7 @@ https://lscsoft.docs.ligo.org/bilby/installation.html.
from
__future__
import
absolute_import
import
sys
from
.
import
core
,
gw
,
hyper
...
...
@@ -25,3 +26,25 @@ from .core.sampler import run_sampler
from
.core.likelihood
import
Likelihood
__version__
=
utils
.
get_version_information
()
if
sys
.
version_info
<
(
3
,):
raise
ImportError
(
"""
You are running bilby 0.6.4 on Python 2
Bilby 0.6.4 and above are no longer compatible with Python 2, and you still
ended up with this version installed. That
'
s unfortunate; sorry about that.
It should not have happened. Make sure you have pip >= 9.0 to avoid this kind
of issue, as well as setuptools >= 24.2:
$ pip install pip setuptools --upgrade
Your choices:
- Upgrade to Python 3.
- Install an older version of bilby:
$ pip install
'
bilby<0.6.4
'
"""
)
This diff is collapsed.
Click to expand it.
docs/installation.txt
+
11
−
4
View file @
2d1a8c23
...
...
@@ -10,7 +10,7 @@ Installation
$ conda install -c conda-forge bilby
Supported python versions:
2.7,
3.5+.
Supported python versions: 3.5+.
.. tab:: Pip
...
...
@@ -18,7 +18,7 @@ Installation
$ pip install bilby
Supported python versions:
2.7,
3.5+.
Supported python versions: 3.5+.
This will install all requirements for running :code:`bilby` for general
...
...
@@ -47,7 +47,7 @@ wave inference, please additionally run the following commands.
Install bilby from source
-------------------------
:code:`bilby` is developed and tested with
both Python 2.7+ and
Python 3.
7
+. In the
:code:`bilby` is developed and tested with Python 3.
6
+. In the
following, we assume you have a working python installation, `python pip
<https://packaging.python.org/tutorials/installing-packages/#use-pip-for-installing)>`_,
and `git <https://git-scm.com/>`_. See :ref:`installing-python` for our
...
...
@@ -60,7 +60,7 @@ Clone the repository, install the requirements, and then install the software:
$ git clone git@git.ligo.org:lscsoft/bilby.git
$ cd bilby/
$ pip install -r requirements.txt
$ p
ython setup.py
install
$ p
ip
install
.
Once you have run these steps, you have :code:`bilby` installed. You can now
try to run the examples.
...
...
@@ -79,6 +79,13 @@ try to run the examples.
$ git clone https://git.ligo.org/lscsoft/bilby.git
.. note::
You may be use to using :code:`$ python setup.py install` to install software
from source. While it is possible to do this, current recommentations from
the python community (see, e.g. `this site <https://python3statement.org/practicalities/>`_
are to use :code:`pip`. For development install, the :code:`-e` flag can be
used.
Installing optional requirements
================================
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
9
−
1
View file @
2d1a8c23
...
...
@@ -2,8 +2,15 @@
from
setuptools
import
setup
import
subprocess
import
sys
import
os
# check that python version is 3.5 or above
python_version
=
sys
.
version_info
if
python_version
<
(
3
,
5
):
sys
.
exit
(
"
Python < 3.5 is not supported, aborting setup
"
)
print
(
"
Confirmed Python version {}.{}.{} >= 3.5.0
"
.
format
(
*
python_version
[:
3
]))
def
write_version_file
(
version
):
"""
Writes a file with version information to be used at run time
...
...
@@ -77,6 +84,7 @@ setup(name='bilby',
package_data
=
{
'
bilby.gw
'
:
[
'
prior_files/*
'
],
'
bilby.gw.detector
'
:
[
'
noise_curves/*.txt
'
,
'
detectors/*
'
],
'
bilby
'
:
[
version_file
]},
python_requires
=
'
>=3.5
'
,
install_requires
=
[
'
future
'
,
'
dynesty>=1.0.0
'
,
...
...
@@ -94,7 +102,7 @@ setup(name='bilby',
'
bilby_convert_resume=cli_bilby.resume:main
'
]
},
classifiers
=
[
"
Programming Language :: Python ::
2.7
"
,
"
Programming Language :: Python ::
3.6
"
,
"
Programming Language :: Python :: 3.7
"
,
"
License :: OSI Approved :: MIT License
"
,
"
Operating System :: OS Independent
"
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment