diff --git a/Dockerfile b/Dockerfile index d1ec94d..63953d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,12 +13,13 @@ LABEL com.github.actions.name="organizational_contributors" \ org.opencontainers.image.description="GitHub Action that given an organization or repository, produces information about the contributors sorted by the organisation." WORKDIR /action/workspace -COPY requirements.txt */*.py /action/workspace/ +COPY requirements.txt LICENSE pyproject.toml README.md /action/workspace/ +COPY contributors /action/workspace/contributors -RUN python3 -m pip install --no-cache-dir -r requirements.txt \ +RUN python3 -m pip install --no-cache-dir ./ \ && apt-get -y update \ && apt-get -y install --no-install-recommends git=1:2.39.5-0+deb12u1 \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* -CMD ["/action/workspace/contributors"] +CMD ["contributors"] ENTRYPOINT ["python3", "-m"] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b1d8507 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,49 @@ +# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ + +[build-system] +requires = [ "setuptools>=60", "setuptools-scm>=8" ] + +[project] +name = "contributors" + +description = "A package to get contributor information." +keywords = [ "github" ] + +license = { file = "LICENSE" } +authors = [ + { name = "HCookie", email = "admin@eldrest.com" }, +] + +requires-python = ">=3.9" + +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] + +dynamic = [ "version" ] + +dependencies = [ + "github3.py==4.0.1", + "python-dotenv==1.0.1", + "requests==2.32.3", + +] + +optional-dependencies.all = [ ] + +optional-dependencies.tests = [ + "black==24.10.0", + "flake8==7.1.1", + "mypy==1.11.2", + "mypy-extensions==1.0.0", + "pylint==3.3.1", + "pytest==8.3.3", + "pytest-cov==5.0.0", + "types-requests==2.32.0.20240914", +]