Skip to content
Snippets Groups Projects
Commit 7aed4541 authored by Corné Lukken's avatar Corné Lukken
Browse files

Merge branch 'setuptools_scm' into 'main'

Integrate setuptools_scm

See merge request python-package!11
parents 6718bad8 7dcdb498
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,9 @@ dist/* ...@@ -6,6 +6,9 @@ dist/*
coverage.xml coverage.xml
htmlcov/* htmlcov/*
# Setuptools SCM
my_awesome_app/_version.py
# IDE configuration # IDE configuration
.vscode .vscode
.idea .idea
include LICENSE include LICENSE
include README.md include README.md
include VERSION
recursive-include docs * recursive-include docs *
recursive-exclude tests * recursive-exclude tests *
...@@ -9,12 +9,12 @@ If you find some missing functionality with regards to CI/CD, testing, linting o ...@@ -9,12 +9,12 @@ If you find some missing functionality with regards to CI/CD, testing, linting o
## Installation ## Installation
``` ```
pip install map pip install .
``` ```
## Usage ## Usage
``` ```
from map import cool_module from my_awesome_app import cool_module
cool_module.greeter() # prints "Hello World" cool_module.greeter() # prints "Hello World"
``` ```
......
0.1
\ No newline at end of file
File moved
File moved
[build-system] [build-system]
requires = ['setuptools>=42', 'wheel'] requires = [
build-backend = 'setuptools.build_meta' "setuptools>=45",
"setuptools_scm[toml]>=6.2",
"wheel"
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "my_awesome_app/_version.py"
[tool.pylint]
ignore = "_version.py"
[metadata] [metadata]
name = my-awesome-app name = my-awesome-app
version = file: VERSION
description = An example package for CI/CD working group description = An example package for CI/CD working group
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown long_description_content_type = text/markdown
......
"""Testing of the Cool Module""" """Testing of the Cool Module"""
from unittest import TestCase from unittest import TestCase
from map.cool_module import greeter from my_awesome_app.cool_module import greeter
class TestCoolModule(TestCase): class TestCoolModule(TestCase):
......
...@@ -34,8 +34,8 @@ commands = ...@@ -34,8 +34,8 @@ commands =
black: {envpython} -m black --version black: {envpython} -m black --version
black: {envpython} -m black --check --diff . black: {envpython} -m black --check --diff .
pylint: {envpython} -m pylint --version pylint: {envpython} -m pylint --version
pylint: {envpython} -m pylint map tests pylint: {envpython} -m pylint my_awesome_app tests
format: {envpython} -m autopep8 -v -aa --in-place --recursive map format: {envpython} -m autopep8 -v -aa --in-place --recursive my_awesome_app
format: {envpython} -m autopep8 -v -aa --in-place --recursive tests format: {envpython} -m autopep8 -v -aa --in-place --recursive tests
format: {envpython} -m black -v . format: {envpython} -m black -v .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment