Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyproject.toml, dynamic CITATION.cff #8

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 12 additions & 23 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
---
cff-version: 1.2.0
title: snowblind
message: If you use this software, please cite as below.
# date-released: 2023-10-29
url: 'https://github.com/mpi-astronomy/snowblind'
# version: 0.1.2
type: software
title: snowblind
abstract: Mask cosmic ray showers (snowballs) in JWST data
authors:
- family-names: Davies
given-names: James
email: [email protected]
affiliation: MPIA
orcid: 'https://orcid.org/0000-0002-5079-9098'

# For citing software, see:

# http://journals.aas.org/authors/references.html

# GitHub has Zenodo DOI integration:
# https://guides.github.com/activities/citable-code/

# What is a CITATION.cff file:
# https://citation-file-format.github.io/

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
- name: James Davies
email: [email protected]
orcid: https://orcid.org/0000-0002-5079-9098
version: 0.2.1
date-released: '2024-02-08'
type: software
license: BSD-3-Clause
url: https://github.com/mpi-astronomy/snowblind
...
36 changes: 26 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[project]
name = "snowblind"
authors = [{name = "James Davies", email = "[email protected]"}]
authors = [
{name = "James Davies", email = "[email protected]"},
]
description = "Mask cosmic ray showers (snowballs) in JWST data"
readme = "README.md"
license = { file = 'LICENSE' }
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
Expand Down Expand Up @@ -31,28 +33,42 @@ test = [
"codecov",
"pytest-cov",
]
cff = [
"cff-from-621",
]

[project.entry-points]
"stpipe.steps" ={jwst = "snowblind:_get_steps"}
"stpipe.steps" ={snowblind = "snowblind:_get_steps"}

[project.urls]
"Bug Tracker" = "https://github.com/mpi-astronomy/snowblind/issues"
"Source Code" = "https://github.com/mpi-astronomy/snowblind"

Homepage = "https://github.com/mpi-astronomy/snowblind"

[build-system]
requires = [
"setuptools>=60",
"setuptools_scm[toml] >=3.4",
"setuptools>=64",
"setuptools_scm>=8",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools_scm]
write_to = "src/snowblind/_version.py"

[tool.setuptools.packages.find]
where = ["src"]
[tool.cff-from-621]
order = ["cff-version", "message", "title", "abstract", "authors", "urls", "version", "date-released", "type", "keywords"]

[tool.cff-from-621.static]
message = "If you use this software, please cite as below."
license = "BSD-3-Clause"
authors = [
{"name" = "James Davies", "email" = "[email protected]", "orcid" = "https://orcid.org/0000-0002-5079-9098", "affiliation" = "Max Planck Institute for Astronomy"},
]

[tool.setuptools.dynamic]
version = {attr = "snowblind._version.version"}

[tool.flake8]
max-line-length = 130
Expand Down
16 changes: 11 additions & 5 deletions src/snowblind/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
from . import _version
from importlib.metadata import version, PackageNotFoundError

from .snowblind import SnowblindStep
from .jump_plus import JumpPlusStep
from .rc_selfcal import RcSelfCalStep
from .persist import PersistenceFlagStep


try:
__version__ = _version.version
except Exception:
__version__ = version(__package__ or __name__)
except PackageNotFoundError:
__version__ = "dev"


__all__ = ['SnowblindStep', 'JumpPlusStep', 'RcSelfCalStep', 'PersistenceFlagStep',
'__version__']
__all__ = [
'__version__',
'SnowblindStep',
'JumpPlusStep',
'RcSelfCalStep',
'PersistenceFlagStep',
]


def _get_steps():
Expand Down
Loading