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

Fix toml install, make sure installer test works #851

Merged
merged 4 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 21 additions & 8 deletions .github/workflows/test_installer.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
on:
push:
branches: [develop]
branches: ["develop"]
pull_request:
branches: [develop]
branches: ["develop"]

jobs:
build:

runs-on: ubuntu-latest

strategy:
Expand All @@ -19,13 +18,27 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

- name: Create work directory
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
mkdir workdir
echo "WORKDIR=$(pwd)/workdir" >> $GITHUB_OUTPUT

- name: Create and activate virtual environment
run: |
cd $WORKDIR
python -m venv .venv
source .venv/bin/activate

- name: Install package
run: |
pip install .
cd $WORKDIR
source .venv/bin/activate
python -m pip install --upgrade pip
pip install $GITHUB_WORKSPACE

- name: Run post-installation test
run: |
python -c "import hed"
cd $WORKDIR
source .venv/bin/activate
python -c "from hed.models.hed_string import HedString; print('Import test passed.')"
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ versionfile_build = "hed/_version.py"
tag_prefix = ""
parentdir_prefix = "hedtools-"

[tool.setuptools]
packages = ["hed"]

[tool.setuptools.packages.find]
where = [""]
include = ["hed*"]
namespaces = false

[tool.setuptools.package-data]
hed = ["schema/schema_data/*.xml"]
Expand Down