Skip to content

Commit

Permalink
Merge pull request #251 from stefanv/devpy-pin
Browse files Browse the repository at this point in the history
Pin devpy and update commands to v0.1 API
  • Loading branch information
phoebe-p authored Apr 2, 2023
2 parents 0a6b093 + 836fbb1 commit bdcafd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .devpy/cmds.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
from devpy import util
from devpy.cmds.util import get_site_packages, set_pythonpath, run
from devpy.cmds.meson import _get_site_packages, _set_pythonpath


@click.command()
Expand All @@ -25,19 +25,19 @@ def install_dependencies(test_dep=False, doc_dep=False):
config = util.get_config()
default_dependencies = config["project"]['dependencies']
print("Installing dependencies", default_dependencies)
run(
util.run(
["pip", "install"] + list(default_dependencies),
)
if test_dep:
test_dependencies = config["project.optional-dependencies"]['test']
print("Installing test-dependencies", test_dependencies)
run(
util.run(
["pip", "install"] + list(test_dependencies),
)
if doc_dep:
doc_dependencies = config["project.optional-dependencies"]['doc']
print("Installing doc-dependencies", doc_dependencies)
run(
util.run(
["pip", "install"] + list(doc_dependencies),
)

Expand All @@ -60,9 +60,9 @@ def codecov(build_dir, codecov_args):
codecov parameters
"""

site_path = get_site_packages(build_dir)
site_path = _get_site_packages()

run(
util.run(
["codecov"] + list(codecov_args),
cwd=site_path,
)
)
2 changes: 1 addition & 1 deletion .github/workflows/test_unit_and_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Install Python dependecies
run: |
pip install pytest meson-python ninja cython numpy git+https://github.com/scientific-python/devpy
pip install pytest meson-python ninja cython numpy git+https://github.com/scientific-python/devpy@v0.1
python3 -m devpy install-dependencies -test-dep
- name: Install S4
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dev = ["pre-commit"]
package = 'solcore'

[tool.devpy.commands]
"Build" = ["devpy.build", "devpy.test"]
"Build" = ["devpy.cmds.meson.build", "devpy.cmds.meson.test"]
"Extensions" = ['.devpy/cmds.py:codecov', '.devpy/cmds.py:install_dependencies']

[tool.pytest.ini_options]
Expand Down

0 comments on commit bdcafd0

Please sign in to comment.