Skip to content

Commit f614a4b

Browse files
authored
Merge pull request #25 from SPARC-FAIR-Codeathon/PyPi
Add packaging related changes
2 parents 2d0cebd + 90a2dac commit f614a4b

File tree

8 files changed

+24
-238
lines changed

8 files changed

+24
-238
lines changed

ABOUT_THIS_TEMPLATE.md

Lines changed: 0 additions & 208 deletions
This file was deleted.

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include LICENSE
22
include HISTORY.md
33
include Containerfile
4-
graft tests
5-
graft project_name
4+
include requirements.txt
5+
graft src/sparc_spy

Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ install: ## Install the project in dev mode.
2626

2727
.PHONY: fmt
2828
fmt: ## Format code using black & isort.
29-
$(ENV_PREFIX)isort project_name/
30-
$(ENV_PREFIX)black -l 79 project_name/
29+
$(ENV_PREFIX)isort sparc_spy/
30+
$(ENV_PREFIX)black -l 79 sparc_spy/
3131
$(ENV_PREFIX)black -l 79 tests/
3232

3333
.PHONY: lint
3434
lint: ## Run pep8, black, mypy linters.
35-
$(ENV_PREFIX)flake8 project_name/
36-
$(ENV_PREFIX)black -l 79 --check project_name/
35+
$(ENV_PREFIX)flake8 sparc_spy/
36+
$(ENV_PREFIX)black -l 79 --check sparc_spy/
3737
$(ENV_PREFIX)black -l 79 --check tests/
38-
$(ENV_PREFIX)mypy --ignore-missing-imports project_name/
38+
$(ENV_PREFIX)mypy --ignore-missing-imports sparc_spy/
3939

4040
.PHONY: test
4141
test: lint ## Run tests and generate coverage report.
42-
$(ENV_PREFIX)pytest -v --cov-config .coveragerc --cov=project_name -l --tb=short --maxfail=1 tests/
42+
$(ENV_PREFIX)pytest -v --cov-config .coveragerc --cov=sparc_spy -l --tb=short --maxfail=1 tests/
4343
$(ENV_PREFIX)coverage xml
4444
$(ENV_PREFIX)coverage html
4545

@@ -78,9 +78,9 @@ virtualenv: ## Create a virtual environment.
7878
release: ## Create a new tag for release.
7979
@echo "WARNING: This operation will create s version tag and push to github"
8080
@read -p "Version? (provide the next x.y.z semver) : " TAG
81-
@echo "$${TAG}" > project_name/VERSION
81+
@echo "$${TAG}" > sparc_spy/VERSION
8282
@$(ENV_PREFIX)gitchangelog > HISTORY.md
83-
@git add project_name/VERSION HISTORY.md
83+
@git add sparc_spy/VERSION HISTORY.md
8484
@git commit -m "release: version $${TAG} 🚀"
8585
@echo "creating git tag : $${TAG}"
8686
@git tag $${TAG}
@@ -101,20 +101,23 @@ switch-to-poetry: ## Switch to poetry package manager.
101101
@poetry init --no-interaction --name=a_flask_test --author=rochacbruno
102102
@echo "" >> pyproject.toml
103103
@echo "[tool.poetry.scripts]" >> pyproject.toml
104-
@echo "project_name = 'project_name.__main__:main'" >> pyproject.toml
104+
@echo "sparc_spy = 'sparc_spy.__main__:main'" >> pyproject.toml
105105
@cat requirements.txt | while read in; do poetry add --no-interaction "$${in}"; done
106106
@cat requirements-test.txt | while read in; do poetry add --no-interaction "$${in}" --dev; done
107107
@poetry install --no-interaction
108108
@mkdir -p .github/backup
109109
@mv requirements* .github/backup
110110
@mv setup.py .github/backup
111111
@echo "You have switched to https://python-poetry.org/ package manager."
112-
@echo "Please run 'poetry shell' or 'poetry run project_name'"
112+
@echo "Please run 'poetry shell' or 'poetry run sparc_spy'"
113113

114114
.PHONY: init
115115
init: ## Initialize the project based on an application template.
116116
@./.github/init.sh
117117

118+
.PHONY: build
119+
build:
120+
@python3 -m build
118121

119122
# This project has been generated from rochacbruno/python-project-template
120123
# __author__ = 'rochacbruno'

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"

requirements-dev.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

scripts/.gitkeep

Whitespace-only changes.

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ def read_requirements(path):
3030
]
3131

3232
setup(
33-
name="package_name",
34-
version=read("src/package_name", "VERSION"),
35-
description="project_description",
36-
url="https://github.com/author_name/project_urlname/",
33+
name="sparc_spy",
34+
version=read("src/sparc_spy", "VERSION"),
35+
description="A python tool to enhance the accessibility of SPARC scaffold visualisations and their analyses in accordance with FAIR principles.",
36+
url="https://github.com/SPARC-FAIR-Codeathon/sparc-spy",
3737
long_description=read("README.md"),
3838
long_description_content_type="text/markdown",
39-
author="author_name",
39+
author="SPARC SPy Team",
4040
packages=find_packages(where='src'),
4141
package_dir={'': 'src'},
42-
install_requires=read_requirements("requirements.txt"),
43-
extras_require={"test": read_requirements("requirements-dev.txt")}
42+
install_requires=read_requirements("requirements.txt")
4443
)

tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)