Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/12-add-precommit-hook-support' i…
Browse files Browse the repository at this point in the history
…nto 12-add-precommit-hook-support
  • Loading branch information
dylan-myome committed Sep 18, 2023
2 parents d8e84ca + 8d95662 commit 95305be
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 39 deletions.
10 changes: 0 additions & 10 deletions .deepsource.toml

This file was deleted.

12 changes: 1 addition & 11 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --use-deprecated=legacy-resolver -e .[dev]
make develop
- name: Test with pytest
run: |
make test
- name: Report test-coverage to DeepSource
run: |
# Install the CLI
curl https://deepsource.io/cli | sh
# Send the report to DeepSource
./bin/deepsource report --analyzer test-coverage --key python --value-file .coverage
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
deploy:
needs:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://github.com/actions/stale

name: 'Close stale issues and PRs'
on:
schedule:
- cron: '1 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: 30
days-before-issue-close: 7
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'

days-before-pr-stale: 30
days-before-pr-close: 7
stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'

exempt-all-pr-assignees: true
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
SHELL:=/bin/bash -e -o pipefail -O globstar
SELF:=$(firstword $(MAKEFILE_LIST))

VE_DIR=venv

TEST_DIRS:=tests
DOC_TESTS:=src ./README.md

Expand All @@ -27,17 +29,16 @@ help:
#=> devready: create venv, install prerequisites, install pkg in develop mode
.PHONY: devready
devready:
make venv && source venv/bin/activate && make develop
make ${VE_DIR} && source ${VE_DIR}/bin/activate && make develop
@echo '#################################################################################'
@echo '### Do not forget to `source venv/bin/activate` to use this environment ###'
@echo '### Do not forget to `source ${VE_DIR}/bin/activate` to use this environment ###'
@echo '#################################################################################'

#=> venv: make a Python 3 virtual environment
.PHONY: venv
venv:
${VE_DIR}:
python3 -mvenv $@; \
source $@/bin/activate; \
python -m ensurepip --upgrade; \
python3 -m ensurepip --upgrade; \
pip install --upgrade pip setuptools wheel

#=> develop: install package in develop mode
Expand Down Expand Up @@ -129,7 +130,7 @@ cleaner: clean
#=> cleanest: remove files and directories that require more time/network fetches to rebuild
.PHONY: cleanest
cleanest: cleaner
rm -fr .eggs .tox venv
rm -frv .eggs .tox venv

#=> distclean: remove untracked files and other detritus
.PHONY: distclean
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
description = "Example Package"
readme = "README.md"
license = { file="LICENSE.txt" }
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
Expand All @@ -18,8 +18,8 @@ classifiers = [
dynamic = ["version"]

[project.urls]
"Homepage" = "https://github.com/biocommons/example"
"Bug Tracker" = "https://github.com/biocommons/exmaple/issues"
"Homepage" = "https://github.com/biocommons/biocommons.example"
"Bug Tracker" = "https://github.com/biocommons/biocommons.example/issues"


[build-system]
Expand Down Expand Up @@ -52,7 +52,7 @@ markers = [
[tool.coverage.run]
branch = true
source = ["biocommons.example"]
omit = ["*_test.py", "*/tests/*"]
omit = ["*_test.py", "*/test/*", "*/tests/*"]


[tool.coverage.report]
Expand All @@ -74,7 +74,7 @@ exclude_lines = [
]

[tool.black]
line-length = 120
line-length = 100

[isort]
profile = "black"
Expand All @@ -91,4 +91,4 @@ disable = "R0913"


[tool.pylint.format]
max-line-length = "120"
max-line-length = 100
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ install_requires =
coloredlogs~=15.0
pyyaml~=6.0

[options.entry_points]
console_scripts =
marvin-quote = biocommons.example.__main__:main

[options.extras_require]
dev =
bandit~=1.7
Expand All @@ -24,14 +20,18 @@ dev =
mypy
pre-commit~=3.4
pylint~=2.14
pytest-cov~=4.0
pytest-cov~=4.1
pytest-optional-tests
pytest~=7.1
tox~=3.25
vcrpy
docs =
mkdocs

[options.entry_points]
console_scripts =
marvin-quote = biocommons.example.__main__:main

[options.packages.find]
where = src
exclude =
Expand All @@ -43,7 +43,7 @@ exclude =

[flake8]
ignore = E129,E133,E203,E221,E241,E251,E303,E266,H106,H904,W291
max-line-length = 120
max-line-length = 100
max-complexity = 15
hang-closing = true
exclude =
Expand Down

0 comments on commit 95305be

Please sign in to comment.