Skip to content

Commit

Permalink
Merge pull request #1047 from xylar/fix-test-file-inclusion
Browse files Browse the repository at this point in the history
More fixes following move to `pyproject.toml`
  • Loading branch information
xylar authored Jan 11, 2025
2 parents 356d526 + 728a43b commit 8518cb0
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
miniforge-version: latest
channels: conda-forge
channel-priority: strict
auto-update-conda: true
auto-update-conda: false
python-version: ${{ matrix.python-version }}

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
miniforge-version: latest
channels: conda-forge
channel-priority: strict
auto-update-conda: true
auto-update-conda: false
python-version: ${{ env.PYTHON_VERSION }}

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
Expand Down
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include mpas_analysis/*.cfg
include mpas_analysis/obs/analysis_input_files
include mpas_analysis/obs/sose_10000km_input_files
include mpas_analysis/obs/observational_datasets.xml

include mpas_analysis/configuration/*.cfg
include mpas_analysis/shared/html/templates/*
include mpas_analysis/shared/plot/ScientificColourMaps7/*/*.xml
include mpas_analysis/shared/plot/SciVisColorColormaps/*.xml
include mpas_analysis/test/test*/*
include mpas_analysis/test/test*/*/*
6 changes: 2 additions & 4 deletions ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ build:
number: 0
script: {{ PYTHON }} -m pip install --no-deps --no-build-isolation -vv .
noarch: python
entry_points:
- mpas_analysis = mpas_analysis.__main__:main
- download_analysis_data = mpas_analysis.download_data:download_analysis_data

requirements:
host:
- python >=3.9
- pip
- setuptools
run:
- python >=3.9
- cartopy >=0.18.0
Expand All @@ -29,7 +27,7 @@ requirements:
- esmf >=8.4.2,<8.7.0
- esmf=*=mpi_mpich_*
- f90nml
- geometric_features >=1.6.0
- geometric_features >=1.6.1
- gsw
- lxml
- mache >=1.11.0
Expand Down
2 changes: 1 addition & 1 deletion dev-spec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dask
esmf >=8.4.2,<8.7.0
esmf=*=mpi_mpich_*
f90nml
geometric_features>=1.6.0
geometric_features>=1.6.1
gsw
lxml
mache >=1.11.0
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os
import m2r2
from glob import glob
import mpas_analysis
import mpas_analysis.version
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
os.environ['PROJ_LIB'] = '{}/{}/share/proj'.format(
Expand Down Expand Up @@ -87,9 +87,9 @@
release = version
else:
# The short X.Y.Z version.
version = mpas_analysis.__version__
version = mpas_analysis.version.__version__
# The full version, including alpha/beta/rc tags.
release = mpas_analysis.__version__
release = mpas_analysis.version.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 0 additions & 3 deletions mpas_analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
# before any other matplotlib imports
import matplotlib as mpl
mpl.use('Agg')

__version_info__ = (1, 12, 0)
__version__ = '.'.join(str(vi) for vi in __version_info__)
3 changes: 2 additions & 1 deletion mpas_analysis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Xylar Asay-Davis, Phillip J. Wolfram, Milena Veneziani

import mpas_analysis
import mpas_analysis.version

import argparse
import traceback
Expand Down Expand Up @@ -902,7 +903,7 @@ def main():
parser.add_argument('-v', '--version',
action='version',
version='mpas_analysis {}'.format(
mpas_analysis.__version__),
mpas_analysis.version.__version__),
help="Show version number and exit")
parser.add_argument("--setup_only", dest="setup_only", action='store_true',
help="If only the setup phase, not the run or HTML "
Expand Down
4 changes: 2 additions & 2 deletions mpas_analysis/shared/html/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import sys

import mpas_analysis
import mpas_analysis.version
from mpas_analysis.shared.io.utility import build_config_full_path, copyfile


Expand Down Expand Up @@ -264,7 +264,7 @@ def generate(self):
replacements = {'@runName': runName,
'@controlRunText': controlRunText,
'@components': componentsText,
'@version': mpas_analysis.__version__,
'@version': mpas_analysis.version.__version__,
'@gitHash': githash,
'@command': command,
'@configs': configsText}
Expand Down
2 changes: 2 additions & 0 deletions mpas_analysis/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version_info__ = (1, 12, 0)
__version__ = '.'.join(str(vi) for vi in __version_info__)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ build-backend = "setuptools.build_meta"
exclude = ["deploy*", "docs*", "e3sm_submodules*", "licenses*", "utils*"]

[tool.setuptools.dynamic]
version = { attr = "mpas_analysis.__init__.__version__" }
version = { attr = "mpas_analysis.version.__version__" }

# evolution of options.entry-points
[project.scripts]
Expand Down

0 comments on commit 8518cb0

Please sign in to comment.