-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from js2264/PEP621_compliant
- Loading branch information
Showing
43 changed files
with
610 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
* | ||
Dockerfile* | ||
.dockerignore | ||
!metator/* | ||
!setup.py | ||
!setup.cfg | ||
!src/* | ||
!external/* | ||
!metator.yaml | ||
!requirements.txt | ||
!pyproject.toml | ||
!MANIFEST.in | ||
!README.md | ||
!external |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Test and Doc | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
Test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
include: | ||
- os: ubuntu-latest | ||
# - os: windows-latest | ||
# - os: macos-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: 🛠️ Install Python ${{ matrix.python-version }} and deps with micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: metator.yaml | ||
init-shell: bash | ||
cache-environment: false | ||
post-cleanup: 'none' | ||
generate-run-shell: true | ||
create-args: >- | ||
python=${{ matrix.python-version }} | ||
- name: 📦 Install package | ||
run: | | ||
pip install .[test] | ||
shell: micromamba-shell {0} | ||
|
||
- name: 🧪 Run tests with Python ${{ matrix.python-version }} | ||
run: | | ||
ruff check . --select=E9,F63,F7,F82 | ||
pytest --cov --cov-report=xml | ||
shell: micromamba-shell {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
args: ['--config=./pyproject.toml'] | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.6.9 | ||
hooks: | ||
- id: ruff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,21 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM mambaorg/micromamba:latest | ||
|
||
LABEL Name=metator Version=1.3.3 | ||
LABEL Name=metator Version=1.3.4 | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER . ./ | ||
|
||
# Install 3rd party packages | ||
USER root | ||
RUN apt update && \ | ||
apt install -y --no-install-recommends git make g++ curl default-jre default-jdk zlib1g-dev | ||
|
||
# Install Louvain | ||
RUN cd ./external && \ | ||
tar -xzf louvain-generic.tar.gz && \ | ||
cd gen-louvain && \ | ||
make && \ | ||
cd ../ | ||
ENV LOUVAIN_PATH=./external/gen-louvain | ||
|
||
# Install Leiden through Network analysis repo | ||
RUN git clone https://github.com/vtraag/networkanalysis.git && \ | ||
cd ./networkanalysis && \ | ||
./gradlew build && \ | ||
cd ../ | ||
ENV LEIDEN_PATH=$(pwd)/networkanalysis/build/libs/networkanalysis-1.2.0.jar | ||
apt install -y --no-install-recommends git make g++ curl default-jre default-jdk zlib1g-dev unzip | ||
|
||
## Install dependencies | ||
# ## Install dependencies | ||
USER mambauser | ||
RUN micromamba install -y -n base --file metator.yaml && \ | ||
micromamba install -y -n base pip && \ | ||
micromamba clean --all --yes | ||
|
||
# Install metator | ||
RUN micromamba run -n base python3 -m pip install -e . | ||
RUN micromamba run -n base pip install -e .[dev] | ||
|
||
WORKDIR /home/mambauser/ | ||
ENTRYPOINT [ "/bin/bash" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include requirements.txt | ||
include README.md | ||
include external/artifacts/* | ||
recursive-exclude test_data * | ||
recursive-exclude tests * |
Oops, something went wrong.