Skip to content

Commit

Permalink
change setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fschncvg committed Oct 26, 2024
1 parent 4870757 commit 11c713e
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 65 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/package-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,36 @@ jobs:
name: python-package-distributions
path: dist/

#run_tests:
# name: Run the tests
# runs-on: ubuntu-latest
# needs:
# - build
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.12"
# - name: Download the distribution packages
# uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: dist/
# - name: Install dependencies
# run: >-
# python3 -m
# pip install
# pytest
# --user
# - name: Install locally the built distribution packages
# run: >-
# python3 -m
# pip install
# dist/*.whl
# --user
# - name: Run the tests
# run: python3 -m pytest
run_tests:
name: Run the tests
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Download the distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Install dependencies
run: >-
python3 -m
pip install
pytest
--user
- name: Install locally the built distribution packages
run: >-
python3 -m
pip install
dist/*.whl
--user
- name: Run the tests
run: python3 -m pytest



Expand Down
39 changes: 4 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
[project]
name = "freestylo"
version = "0.1.0"
authors = [
{ name = "Felix Schneider", email = "[email protected]"},
]
description = "A tool for stylistic device detection"
readme = "README.md"
# smaller than 3.10, bigger than 3.6
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]

[project.scripts]
freestylo = "freestylo:freestylo_main"

[project.urls]
Homepage = "https://github.com/cvjena/freestylo"
Issues = "https://github.com/cvjena/freestylo/issues"

[build-system]
requires = [
"setuptools>=75.0",
"torch",
"spacy==3.8.2",
"numpy",
"pytest",
"scikit-learn",
"scipy",
"cltk<1.0",
"wget"

]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=75.0.0","setuptools_scm[toml]>=5", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
version_scheme = "no-guess-dev"
57 changes: 57 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[metadata]
name = freestylo
version = 0.2.0
description = A tool for stylistic device detection."
author = Felix Schneider
author_email = [email protected]
# license = GNU General Public License v3.0
# license_file = LICENSE
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/cvjena/freestylo
project_urls =
Source = https://github.com/cvjena/freestylo
Tracker = https://github.com/cvjena/freestylo/issues
platforms = any
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
[options]
zip_safe = False
packages = find_namespace:
include_package_data = True
package_dir =
=src
python_requires = >=3.12
install_requires =
setuptools>=75.0
torch
spacy==3.8.2
numpy
pytest
scikit-learn
scipy
cltk<1.0
wget
[options.packages.find]
where = src
exclude =
tests
[options.extras_require]
testing =
setuptools>=75.0
pytest
pytest-cov
[tool:pytest]
addopts = --cov=freestylo --cov-report=term-missing
testpaths = tests
norecursedirs =
.git
dist
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from setuptools import setup

if __name__ == "__main__":
try:
setup(use_scm_version={"version_scheme": "no-guess-dev"})
except:
print("Error: setup.py failed")
raise

0 comments on commit 11c713e

Please sign in to comment.