From 30b395b86b87b4b3f7c6b427531cf444934963e9 Mon Sep 17 00:00:00 2001 From: Jose Luis Garrido-Labrador Date: Fri, 21 Jun 2024 14:48:44 +0200 Subject: [PATCH] Update directory tree to SOFTX guide --- .github/workflows/docs.yml | 2 +- .github/workflows/python-package.yml | 3 +-- pytest.ini | 1 + setup.cfg | 9 +++++++++ src/setup.py => setup.py | 0 src/setup.cfg | 2 -- 6 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 setup.cfg rename src/setup.py => setup.py (100%) delete mode 100644 src/setup.cfg diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e0a3356..eb7c5aa 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,7 @@ jobs: # ADJUST THIS: install all dependencies (including pdoc) - run: python -m pip install --upgrade pip - run: python -m pip install pdoc - - run: if [ -f src/requirements.txt ]; then pip install -r src/requirements.txt; fi + - run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - run: python -m pip install scikit-learn==1.2.2 # ADJUST THIS: build your documentation into docs/. # We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here. diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 4fe9613..979d055 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,7 +28,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install flake8 pytest coverage - pip install -r src/requirements.txt + pip install -r requirements.txt - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names @@ -37,7 +37,6 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - cd src coverage run -m pytest test # Only if ubuntu-latest - name: Coverage diff --git a/pytest.ini b/pytest.ini index 21cdd60..890e428 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,3 +9,4 @@ filterwarnings = ignore:y contains no unlabeled samples ignore::FutureWarning ignore::DeprecationWarning +pythonpath = src diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..899010e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,9 @@ +[metadata] +description_file = README.md +[options] +package_dir= + =src +packages=find: + +[options.packages.find] +where=src diff --git a/src/setup.py b/setup.py similarity index 100% rename from src/setup.py rename to setup.py diff --git a/src/setup.cfg b/src/setup.cfg deleted file mode 100644 index 0f94f37..0000000 --- a/src/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description_file = README.md \ No newline at end of file