Skip to content

Commit c889398

Browse files
committed
Add setup module and update recipe
1 parent 9d7922e commit c889398

File tree

2 files changed

+84
-14
lines changed

2 files changed

+84
-14
lines changed

recipe/meta.yaml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "compass" %}
2-
{% set version = "0.1.12" %}
2+
{% set version = "1.0.0" %}
33
{% set build = 0 %}
44

55
{% if mpi == "nompi" %}
@@ -11,8 +11,12 @@ package:
1111
name: {{ name|lower }}
1212
version: {{ version }}
1313

14+
source:
15+
path: ../
16+
1417
build:
1518
noarch: python
19+
script: {{ PYTHON }} -m pip install . --no-deps -vv
1620
number: {{ build }}
1721
{% if mpi != "nompi" %}
1822
{% set mpi_prefix = "mpi_" + mpi %}
@@ -26,10 +30,16 @@ build:
2630
# `PKG_NAME * mpi_*` for any mpi
2731
# `PKG_NAME * nompi_*` for no mpi
2832
string: "{{ mpi_prefix }}_py_h{{ PKG_HASH }}_{{ build }}"
33+
entry_points:
34+
- compass = compass.__main__:main
2935

3036
requirements:
37+
host:
38+
- python >=3.6
39+
- pip
40+
- setuptools
3141
run:
32-
- python
42+
- python >=3.6
3343
- geometric_features 0.1.13
3444
- mpas_tools 0.1.0
3545
- jigsaw 0.9.12
@@ -47,31 +57,39 @@ requirements:
4757
- ipython
4858
- jupyter
4959
- lxml
50-
- matplotlib
60+
- matplotlib-base
5161
- cmocean
62+
- numpy
63+
- xarray
64+
- progressbar2
65+
- requests
5266

5367
test:
5468
imports:
55-
- geometric_features
56-
- mpas_tools
57-
- jigsawpy
69+
- compass
5870
commands:
71+
- compass list
72+
- compass list --help
73+
- compass setup --help
74+
- compass suite --help
75+
- compass clean --help
5976
- gpmetis --help
6077
- ffmpeg -help
6178

6279
about:
63-
home: https://github.com/MPAS-Dev/MPAS-Model/tree/ocean/develop/testing_and_setup/compass
80+
home: https://github.com/MPAS-Dev/compass
6481
license: BSD 3-Clause
6582
license_family: BSD
6683
license_file: LICENSE
67-
summary: 'A metapackage for creating test cases in the Model for Prediction Across Scales'
84+
summary: 'Test cases for the Model for Prediction Across Scales (MPAS)'
6885
description: |
69-
A metapackage of all the tools needed by COMPASS (Configuration Of Model
70-
for Prediction Across Scales Setups), a framework for setting up and running
71-
ocean and land-ice test cases in the Model for Prediction Across Scales
72-
(MPAS) framework.
73-
doc_url: https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/testing_and_setup/compass/README_ocean.md
74-
dev_url: https://github.com/MPAS-Dev/MPAS-Model/tree/ocean/develop/testing_and_setup/compass
86+
Configuration Of Model for Prediction Across Scales Setups (COMPASS) is an
87+
automated system to set up test cases that match the MPAS-Model repository.
88+
All namelists and streams files begin with the default generated from the
89+
Registry.xml file, and only the changes relevant to the particular test
90+
case are altered in those files.
91+
doc_url: https://mpas-dev.github.io/compass/stable/
92+
dev_url: https://github.com/MPAS-Dev/compass
7593

7694
extra:
7795
recipe-maintainers:

setup.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env python
2+
3+
import os
4+
import re
5+
from setuptools import setup, find_packages
6+
7+
here = os.path.abspath(os.path.dirname(__file__))
8+
with open(os.path.join(here, 'compass', '__init__.py')) as f:
9+
init_file = f.read()
10+
11+
version = re.search(r'{}\s*=\s*[(]([^)]*)[)]'.format('__version_info__'),
12+
init_file).group(1).replace(', ', '.')
13+
14+
os.chdir(here)
15+
16+
setup(name='compass',
17+
version=version,
18+
description='Configuration Of Model for Prediction Across Scales '
19+
'Setups (COMPASS) is an automated system to set up test '
20+
'cases that match the MPAS-Model repository. All '
21+
'namelists and streams files begin with the default '
22+
'generated from the Registry.xml file, and only the '
23+
'changes relevant to the particular test case are altered '
24+
'in those files.',
25+
url='https://github.com/MPAS-Dev/MPAS-Tools',
26+
author='COMPASS Developers',
27+
author_email='[email protected]',
28+
license='BSD',
29+
classifiers=[
30+
'Development Status :: 4 - Beta',
31+
'License :: OSI Approved :: BSD License',
32+
'Operating System :: OS Independent',
33+
'Intended Audience :: Science/Research',
34+
'Programming Language :: Python',
35+
'Programming Language :: Python :: 3',
36+
'Programming Language :: Python :: 3.6',
37+
'Programming Language :: Python :: 3.7',
38+
'Programming Language :: Python :: 3.8',
39+
'Programming Language :: Python :: 3.9',
40+
'Topic :: Scientific/Engineering',
41+
],
42+
packages=find_packages(exclude=['ci', 'deploy', 'docs', 'landice',
43+
'MPAS-Mode', 'ocean', 'recipe', 'test',
44+
'utility_scripts']),
45+
install_requires=['matplotlib',
46+
'netCDF4',
47+
'numpy',
48+
'progressbar2',
49+
'requests',
50+
'xarray'],
51+
entry_points={'console_scripts':
52+
['compass = compass.__main__:main']})

0 commit comments

Comments
 (0)