Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add manifest to ci (#118)
Browse files Browse the repository at this point in the history
* Add manifest to CI

* Standardise tox.ini into pyproject
  • Loading branch information
willGraham01 authored Feb 6, 2024
1 parent 12252af commit ae19fad
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 43 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@ name: tests

on:
push:
branches: [ main ]
branches:
- "main"
pull_request:
workflow_dispatch:

jobs:
lint:
linting:
name: Check Linting
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/lint@v2

manifest:
name: Check Manifest
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/check_manifest@v2

test:
needs: lint
needs: [linting, manifest]
name: ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
exclude .pre-commit-config.yaml

include LICENSE
include README.md

graft bg_atlasgen *.py

prune tests
65 changes: 39 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "bg-atlasgen"
description = "Scripts generation atlases and utilities for BrainGlobe"
readme = "README.md"
license = {file = "LICENSE"}
license = { file = "LICENSE" }
authors = [
{name = "Luigi Petrucco, Federico Claudi, Adam Tyson", email = "[email protected]"},
{ name = "Luigi Petrucco, Federico Claudi, Adam Tyson", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
Expand Down Expand Up @@ -41,29 +41,23 @@ dynamic = ["version"]
Homepage = "https://github.com/brainglobe/bg-atlasgen"

[project.optional-dependencies]
allenmouse = [
"allensdk",
]
allenmouse = ["allensdk"]

dev = [
"pytest",
"pytest-cov",
"pytest-mock",
"coverage",
"tox",
"black",
"mypy",
"pre-commit",
"ruff",
"setuptools_scm",
"pytest",
"pytest-cov",
"pytest-mock",
"coverage",
"tox",
"black",
"mypy",
"pre-commit",
"ruff",
"setuptools_scm",
]

[build-system]
requires = [
"setuptools>=45",
"wheel",
"setuptools_scm[toml]>=6.2",
]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
Expand All @@ -82,17 +76,36 @@ line-length = 79

[tool.check-manifest]
ignore = [
"*.yaml",
"tox.ini",
"tests/*",
"tests/test_unit/*",
"tests/test_integration/*",
"*.yaml",
"tox.ini",
"tests/*",
"tests/test_unit/*",
"tests/test_integration/*",
]

[tool.ruff]
line-length = 79
exclude = ["__init__.py","build",".eggs"]
exclude = ["__init__.py", "build", ".eggs"]
select = ["I", "E", "F"]
# E501 Line too long
ignore = ["E501"]
fix = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{39,310,311}
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
[testenv]
extras =
dev
commands =
pytest -v --color=yes --cov=bg_atlasgen --cov-report=xml
"""
14 changes: 0 additions & 14 deletions tox.ini

This file was deleted.

0 comments on commit ae19fad

Please sign in to comment.