Skip to content
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

Fixing pip install #90

Merged
merged 40 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d885a7c
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
4057435
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
fb422c7
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
f481940
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
39d78e1
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
9f2f4a1
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
e6bff1f
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
52fcd4e
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
ba7863e
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
f10aabc
#refs 89 first go at fixing pip install
AnthonyLim23 Feb 29, 2024
4278811
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
c4abcc9
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
f005f3c
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
1f7b76c
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
bf20f7c
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
bb4a8f7
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
6b47958
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
0103169
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
e7e809b
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
a1d4cdf
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
dc63eeb
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
14e501e
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
e0278c5
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
a906416
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
0ec7dca
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
7236df3
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
4f6976c
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
05cdd3a
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
5a01910
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
3fa0bb1
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
2fd35ea
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
38c37bd
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
3fa300f
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
a214ef2
update version number
invalid-email-address Apr 23, 2024
2bc94d5
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
718bc9f
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
e1735ab
update version number
invalid-email-address Apr 23, 2024
17b620a
refs #89 move to pyproject.toml
AnthonyLim23 Apr 23, 2024
1d7b4c7
Merge branch '89_missing_tools' of https://github.com/mantidproject/q…
AnthonyLim23 Apr 23, 2024
14cf836
limit numpy version
AnthonyLim23 Jun 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 13 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,30 @@
name: Build and upload to PyPI

on:
release:
release:
types:
- published

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
name: Build wheels and src
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: "0"

- name: Build wheels
uses: pypa/[email protected]
env:
# List of platforms to build on (incl. Python version)
CIBW_BUILD: cp3{8,9,10,11}-manylinux_x86_64 cp3{8,9,10,11}-win_amd64 cp3{8,9,10,11}-macosx_x86_64 cp3{8,9,10,11}-macosx_arm64

CIBW_BEFORE_BUILD: >
pip install numpy Cython scipy joblib

# Install test dependencies and run tests
CIBW_TEST_REQUIRES: pytest joblib
CIBW_TEST_COMMAND: >
pytest {project}/test
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build sdist
run: |
pip install numpy Cython scipy joblib
python setup.py sdist

- uses: actions/upload-artifact@v3
- name: install build
run: python -m pip install build pytest --user
- name: build wheel
run: python -m build --sdist --wheel
- name: upload wheel
uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
path: dist/

upload_pypi:
needs: [build_wheels, build_sdist]
needs: [build_wheels]
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Test
====

.. autofunction:: quickBayes.log_likelihood.loglikelihood
.. autofunction:: quickBayes.fit_engines.scipy_fit_engine.ScipyFitEngine
.. autofunction:: quickBayes.fitting.scipy_engine.ScipyFitEngine
.. autofunction:: quickBayes.utils.parallel.parallel
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'

[project]
name = 'quickBayes'
version = "1.0.0b23"
requires-python = ">=3.7.1"
dependencies = ['numpy<2.0.0', 'scipy', 'gofit']
authors = [{name='Anthony Lim', email='[email protected]'}]
description = "A Bayesian fitting package used for model selection and grid searches of fits for neutron and muon data."
keywords=['bayesian', 'fitting', 'QENS', 'muons']
readme = 'README.md'
license = {text = 'BSD'}

[project.urls]
Homepage = "https://quickbayes.readthedocs.io/en/latest/"
Documentation = "https://quickbayes.readthedocs.io/en/latest/"
Repository = 'https://github.com/ISISNeutronMuon/quickBayes'
2 changes: 1 addition & 1 deletion quickBayes-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:

dependencies:
- python =3.11.*
- numpy
- numpy < 2.0.0
- scipy
- pytest
- pre-commit >=2.15
Expand Down
38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

4 changes: 0 additions & 4 deletions src/quickBayes/fit_engines/makefile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions src/quickBayes/fit_functions/makefile.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/quickBayes/fitting/README.md

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion src/quickBayes/functions/README.md

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion src/quickBayes/makefile.txt

This file was deleted.

4 changes: 0 additions & 4 deletions src/quickBayes/test_helpers/makefile.txt

This file was deleted.

4 changes: 0 additions & 4 deletions src/quickBayes/utils/makefile.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/quickBayes/workflow/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from quickBayes.workflow.grid_template import GridSearchTemplate
from quickBayes.workflow.grid_search.template import GridSearchTemplate
from quickBayes.functions.qse_fixed import QSEFixFunction
from quickBayes.utils.spline import spline
from numpy import ndarray
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from quickBayes.functions.qse_function import QSEFunction
from quickBayes.utils.spline import spline
from quickBayes.utils.general import get_background_function
from quickBayes.workflow.model_template import ModelSelectionWorkflow
from quickBayes.workflow.model_selection.template import ModelSelectionWorkflow
from quickBayes.functions.base import BaseFitFunction
from quickBayes.utils.crop_data import crop

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from quickBayes.functions.qldata_function import QlDataFunction
from quickBayes.utils.spline import spline
from quickBayes.utils.general import get_background_function
from quickBayes.workflow.model_template import ModelSelectionWorkflow
from quickBayes.workflow.model_selection.template import ModelSelectionWorkflow
from quickBayes.functions.base import BaseFitFunction
from quickBayes.utils.crop_data import crop

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from quickBayes.functions.exp_decay import ExpDecay
from quickBayes.utils.general import get_background_function
from quickBayes.utils.crop_data import crop
from quickBayes.workflow.model_template import ModelSelectionWorkflow
from quickBayes.workflow.model_selection.template import ModelSelectionWorkflow
from quickBayes.functions.base import BaseFitFunction
from numpy import ndarray
from typing import Dict, List
Expand Down
Empty file.
2 changes: 0 additions & 2 deletions src/quickBayes/workflows/grid_search/makefile.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/quickBayes/workflows/makefile.txt

This file was deleted.

Empty file.
4 changes: 0 additions & 4 deletions src/quickBayes/workflows/model_selection/makefile.txt

This file was deleted.

2 changes: 1 addition & 1 deletion test/utils/parallel_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from quickBayes.workflow.QSE import qse_data_main
from quickBayes.workflow.model_selection.QSE import qse_data_main
from quickBayes.utils.parallel import parallel
import numpy as np
import os.path
Expand Down
8 changes: 4 additions & 4 deletions test/workflows/grid_search/gridSearchTemplate_test.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import unittest
from quickBayes.workflow.grid_template import GridSearchTemplate
from quickBayes.workflow.grid_search.template import GridSearchTemplate
from quickBayes.functions.BG import FlatBG
from quickBayes.functions.exp_decay import ExpDecay
from quickBayes.test_helpers.workflows import (gen_grid_search_data,
FixedBG,
FixedComposite)
from quickBayes.test_helpers.workflow_helper import (gen_grid_search_data,
FixedBG,
FixedComposite)


class SimpleWorkflow(GridSearchTemplate):
Expand Down
2 changes: 1 addition & 1 deletion test/workflows/grid_search/quest_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from quickBayes.functions.qse_fixed import QSEFixFunction
from quickBayes.functions.BG import LinearBG
from quickBayes.workflow.qse_search import QSEGridSearch
from quickBayes.workflow.grid_search.qse_grid_search import QSEGridSearch
import numpy as np
import os.path

Expand Down
4 changes: 2 additions & 2 deletions test/workflows/model_selection/modelSelectionTemplate_test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest
from quickBayes.workflow.model_template import ModelSelectionWorkflow
from quickBayes.workflow.model_selection.template import ModelSelectionWorkflow
from quickBayes.functions.BG import FlatBG
from quickBayes.functions.exp_decay import ExpDecay
from quickBayes.functions.composite import CompositeFunction
from quickBayes.test_helpers.workflows import gen_model_selection_data
from quickBayes.test_helpers.workflow_helper import gen_model_selection_data


class SimpleWorkflow(ModelSelectionWorkflow):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from quickBayes.workflow.MuonExpDecay import muon_expdecay_main
from quickBayes.workflow.model_selection.muon_decay import muon_expdecay_main
import numpy as np
import os.path

Expand Down
2 changes: 1 addition & 1 deletion test/workflows/model_selection/qldata_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from quickBayes.workflow.QlData import ql_data_main, QLData
from quickBayes.workflow.model_selection.QlData import ql_data_main, QLData
from quickBayes.functions.qldata_function import QlDataFunction
from quickBayes.functions.BG import LinearBG
import numpy as np
Expand Down
3 changes: 2 additions & 1 deletion test/workflows/model_selection/qlse_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import unittest
from quickBayes.functions.qse_function import QSEFunction
from quickBayes.functions.BG import LinearBG
from quickBayes.workflow.QSE import qse_data_main, QlStretchedExp
from quickBayes.workflow.model_selection.QSE import (qse_data_main,
QlStretchedExp)
import numpy as np
import os.path

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/create_conda_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def create_default(version):
default_yml['name'] = 'quickBayes-dev'
default_yml['channels'] = 'conda-forge'
default_yml['dependencies'] = {'python': '=' + version + '.*',
'numpy': '',
'numpy': '<2.0.0',
'scipy': '',
'pytest': '',
'pre-commit': '>=2.15',
Expand Down
58 changes: 0 additions & 58 deletions tools/setup_helper.py

This file was deleted.

Loading