Skip to content

Commit

Permalink
First version from cookiecutter
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Jun 13, 2023
0 parents commit c497161
Show file tree
Hide file tree
Showing 17 changed files with 793 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[bumpversion]
current_version = 0.1.0.dev0
commit = True
tag = True
sign_tags = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}.{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = prod
first_value = dev
values =
dev
prod

[bumpversion:part:build]

[bumpversion:file:setup.py]
34 changes: 34 additions & 0 deletions .github/workflows/omero_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Install and test and OMERO plugin e.g. a Web app, a CLI plugin or a library
#
# This workflow will install omero-test-infra, start an OMERO environment
# including database, server and web deployment, configure the OMERO plugin
# and run integration tests.
#
# 1. Set up the stage variable depending on the plugin. Supported stages
# are: app, cli, scripts, lib, srv
#
# 2. Adjust the cron schedule as necessary

name: OMERO
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'

jobs:
test:
name: Run integration tests against OMERO
runs-on: ubuntu-latest
env:
STAGE: cli
steps:
- uses: actions/checkout@v3
- name: Checkout omero-test-infra
uses: actions/checkout@master
with:
repository: ome/omero-test-infra
path: .omero
ref: ${{ secrets.OMERO_TEST_INFRA_REF }}
- name: Build and run OMERO tests
run: .omero/docker $STAGE
20 changes: 20 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: PyPI
on: push

jobs:
build-n-publish:
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Build a binary wheel and a source tarball
run: |
python -mpip install wheel
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_PASSWORD }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build
dist
omero-mkngff-*
*.egg*
.cache
*.DS_Store
.*un~
*.pyc
.omero
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = omero,omero_mkngff,setuptools
2 changes: 2 additions & 0 deletions .omeroci/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory implements scripts to unify
build and release actions across repos.
13 changes: 13 additions & 0 deletions .omeroci/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env make -f
release:
ifndef VERSION
$(error VERSION is undefined)
endif
git describe --exact
python setup.py sdist
echo twine upload dist/omero-mkngff-$(VERSION).tar.gz

clean:
rm -rf build dist omero-mkngff.egg-info *.pyc

.PHONY: release clean
76 changes: 76 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
repos:

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [--target-version=py36]

- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
args:
- --py36-plus

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: .bumpversion.cfg
- id: end-of-file-fixer
- id: check-json
files: \.(json)$
- id: check-yaml
- id: fix-encoding-pragma
args:
- --remove
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: pretty-format-json
args:
- --autofix

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [
flake8-blind-except,
flake8-builtins,
flake8-rst-docstrings,
flake8-logging-format,
]
args: [
# default black line length is 88
"--max-line-length=88",
# Conflicts with black: E203 whitespace before ':'
"--extend-ignore=E203",
"--rst-roles=class,func,ref,module,const",
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
language_version: python3

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
# args: [--config-data=relaxed]
#
7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=======
Changes
=======

0.1 - 2023-06-13
==================
* Initial release. Based on https://github.com/ome/cookiecutter-omero-cli-plugin
Loading

0 comments on commit c497161

Please sign in to comment.