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
use pyproject.toml [build-system] and setuptools_scm #188
Changes from all commits
d63679c
e5b25c5
08dd0d6
9d1dca0
49ff3d3
c1fafd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true)$ | ||
ref-names: $Format:%D$ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
include README.md | ||
include LICENSE | ||
include CHANGELOG.rst | ||
|
||
include versioneer.py | ||
include mesmer/_version.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,22 +8,24 @@ | |
|
||
import datetime | ||
|
||
from mesmer._version import get_versions | ||
import mesmer | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = "mesmer" | ||
copyright_year = datetime.date.today().year | ||
copyright = "(c) 2021-{} ETH Zurich (Land-climate dynamics group, Prof. S.I. Seneviratne), MESMER contributors listed in AUTHORS".format( | ||
copyright_year | ||
copyright = ( | ||
f"(c) 2021-{copyright_year} ETH Zurich (Land-climate dynamics group, Prof. S.I. " | ||
"Seneviratne), MESMER contributors listed in AUTHORS" | ||
) | ||
|
||
authors = "Authors, see AUTHORS" | ||
author = authors | ||
|
||
# The short X.Y version | ||
version = get_versions()["version"].split("+")[0] | ||
version = mesmer.__version__.split("+")[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In other packages I had to follow this pattern https://github.com/openscm/openscm-runner/blob/27eb7baddb686862c7996dbccabf34cea934fcb7/docs/source/conf.py#L19 I can't remember why exactly, but it was something to do with being installed or not being installed when building docs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh - I wasn't aware that it's not (no longer?) installed per default in RTD. In xarray and regionmask we install it manually using pip (but I thought this is because it installs it with eager updates [making it impossible to pin packages]). In any case RTD currently reports "mesmer 0.0.0 documentation" - I'll try your pattern to fix this in a new PR. Related - for regionmask it reported a "dirty" version even for releases. This happens because RTD changes some files before installing the package. I used the following to work around this: regionmask/regionmask/pull/348 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
# The full version, including alpha/beta/rc tags | ||
release = get_versions()["version"] | ||
release = mesmer.__version__ | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity , what is this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only just got this recently. If you define
<filename> export-subst
in a .gitattributes file, git will expand several placeholders when adding this file to an archive (from https://git-scm.com/docs/gitattributes). These placeholders can be the commit hash etc.It currently still points to the wrong file (#189). With #189 merged:
returns
I think
git archive
is used to create the files in https://github.com/MESMER-group/mesmer/releases/tag/v0.8.3. Versioneer does it slightly differntly by writing tomesmer/_version.py export-subst
.