Skip to content

Commit

Permalink
Add pyproject (#48)
Browse files Browse the repository at this point in the history
* Add pyproject

* fix wheels

* fix author metadata

* fix author metadata

* missing test dep
  • Loading branch information
xgarrido committed Apr 20, 2024
1 parent 1fc462c commit 3e62e93
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 2,991 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ jobs:
- name: Install dependencies via pip
run: |
python -m pip install --upgrade pip wheel
python -m pip install numpy pytest pytest-cov
python -m pip install camb mflike
python -m pip install -e .
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Unit tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:

- name: Build sdist and wheel
run: |
python -m pip install wheel setuptools
python setup.py sdist bdist_wheel
python -m pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include cobaya_utilities/_version.py

exclude .git*
exclude codecov.yml

prune .github
8 changes: 6 additions & 2 deletions cobaya_utilities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from . import _version
from importlib.metadata import PackageNotFoundError, version

__version__ = _version.get_versions()["version"]
try:
__version__ = version("cobaya_utilities")
except PackageNotFoundError:
# package is not installed
pass

0 comments on commit 3e62e93

Please sign in to comment.