Skip to content

Commit f0b8c5a

Browse files
committed
Update the setup.py and conda recipe
1 parent 7484ec1 commit f0b8c5a

File tree

3 files changed

+50
-73
lines changed

3 files changed

+50
-73
lines changed

conda_package/recipe/build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
set -x
44
set -e
55

6-
cp -r ocean landice visualization mesh_tools conda_package
7-
86
cd conda_package
97
${PYTHON} -m pip install . --no-deps --no-build-isolation -vv
108

119
# build and install ocean topography smoothing tool
12-
cd ${SRC_DIR}/conda_package/ocean/smooth_topo
10+
cd ${SRC_DIR}/ocean/smooth_topo
1311
mkdir build
1412
cd build
1513
cmake \
@@ -20,7 +18,7 @@ cmake --build .
2018
cmake --install .
2119

2220
# build and install sea ice partitioning tool
23-
cd ${SRC_DIR}/conda_package/mesh_tools/seaice_grid_tools
21+
cd ${SRC_DIR}/mesh_tools/seaice_grid_tools
2422
mkdir build
2523
cd build
2624
cmake \
@@ -31,7 +29,7 @@ cmake --build .
3129
cmake --install .
3230

3331
# build and install legacy mask creator
34-
cd ${SRC_DIR}/conda_package/mesh_tools/mesh_conversion_tools
32+
cd ${SRC_DIR}/mesh_tools/mesh_conversion_tools
3533
mkdir build
3634
cd build
3735
cmake \
@@ -42,7 +40,7 @@ cmake --build .
4240
cp MpasMaskCreator.x ${PREFIX}/bin
4341

4442
# build and install mesh conversion tools
45-
cd ${SRC_DIR}/conda_package/mesh_tools/mesh_conversion_tools_netcdf_c
43+
cd ${SRC_DIR}/mesh_tools/mesh_conversion_tools_netcdf_c
4644
mkdir build
4745
cd build
4846
cmake \

conda_package/recipe/meta.yaml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,6 @@ source:
1010

1111
build:
1212
number: 0
13-
entry_points:
14-
- planar_hex = mpas_tools.planar_hex:main
15-
- translate_planar_grid = mpas_tools.translate:main
16-
- merge_grids = mpas_tools.merge_grids:main
17-
- split_grids = mpas_tools.split_grids:main
18-
- inject_bathymetry = mpas_tools.ocean.inject_bathymetry:main
19-
- inject_preserve_floodplain = mpas_tools.ocean.inject_preserve_floodplain:main
20-
- mpas_to_triangle = mpas_tools.mesh.creation.mpas_to_triangle:main
21-
- triangle_to_netcdf = mpas_tools.mesh.creation.triangle_to_netcdf:main
22-
- jigsaw_to_netcdf = mpas_tools.mesh.creation.jigsaw_to_netcdf:main
23-
- scrip_from_mpas = mpas_tools.scrip.from_mpas:main
24-
- ocean_add_depth = mpas_tools.ocean.depth:main_add_depth
25-
- ocean_add_zmid = mpas_tools.ocean.depth:main_add_zmid
26-
- ocean_write_time_varying_zmid = mpas_tools.ocean.depth:main_write_time_varying_zmid
27-
- plot_ocean_transects = mpas_tools.ocean.viz.transects:main
28-
- compute_mpas_region_masks = mpas_tools.mesh.mask:entry_point_compute_mpas_region_masks
29-
- compute_mpas_transect_masks = mpas_tools.mesh.mask:entry_point_compute_mpas_transect_masks
30-
- compute_mpas_flood_fill_mask = mpas_tools.mesh.mask:entry_point_compute_mpas_flood_fill_mask
31-
- compute_lon_lat_region_masks = mpas_tools.mesh.mask:entry_point_compute_lon_lat_region_masks
32-
- compute_projection_region_masks = mpas_tools.mesh.mask:entry_point_compute_projection_grid_region_masks
33-
- prepare_seaice_partitions = mpas_tools.seaice.partition:prepare_partitions
34-
- create_seaice_partitions = mpas_tools.seaice.partition:create_partitions
35-
- simple_seaice_partitions = mpas_tools.seaice.partition:simple_partitions
36-
- sort_mesh = mpas_tools.mesh.creation.sort_mesh:main
3713

3814
requirements:
3915
build:
@@ -110,17 +86,17 @@ test:
11086
- planar_hex --nx=30 --ny=20 --dc=1000. --npx --npy --outFileName='nonperiodic_mesh_30x20_1km.nc'
11187
- MpasCellCuller.x nonperiodic_mesh_30x20_1km.nc culled_nonperiodic_mesh_30x20_1km.nc
11288
- python -m pytest conda_package/mpas_tools/tests
113-
- mark_horns_for_culling.py --help
114-
- set_lat_lon_fields_in_planar_grid.py --help
115-
- create_SCRIP_file_from_MPAS_mesh.py --help
116-
- create_SCRIP_file_from_planar_rectangular_grid.py --help
89+
- mark_horns_for_culling --help
90+
- set_lat_lon_fields_in_planar_grid --help
91+
- create_scrip_file_from_mpas_mesh --help
92+
- create_scrip_file_from_planar_rectangular_grid --help
11793
- prepare_seaice_partitions --help
11894
- create_seaice_partitions --help
11995
- fix_regrid_output.exe
120-
- create_landice_grid_from_generic_MPAS_grid.py --help
121-
- define_cullMask.py --help
122-
- interpolate_to_mpasli_grid.py --help
123-
- mark_domain_boundaries_dirichlet.py --help
96+
- create_landice_grid_from_generic_mpas_grid --help
97+
- define_landice_cull_mask --help
98+
- interpolate_to_mpasli_grid --help
99+
- mark_domain_boundaries_dirichlet --help
124100
- add_land_locked_cells_to_mask.py --help
125101
- widen_transect_edge_masks.py --help
126102
- add_critical_land_blockages_to_mask.py --help

conda_package/setup.py

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
os.chdir(here)
3535

36-
for path in ['ocean', 'landice', 'visualization', 'mesh_tools']:
36+
for path in ['ocean', 'visualization']:
3737
destPath = './{}'.format(path)
3838
if os.path.exists(destPath):
3939
shutil.rmtree(destPath)
@@ -64,42 +64,45 @@
6464
],
6565
packages=find_packages(include=['mpas_tools', 'mpas_tools.*']),
6666
package_data={'mpas_tools.viz': ['SciVisColorColormaps/*.xml']},
67-
scripts=['mesh_tools/mesh_conversion_tools/mark_horns_for_culling.py',
68-
'mesh_tools/planar_grid_transformations/set_lat_lon_fields_in_planar_grid.py',
69-
'mesh_tools/create_SCRIP_files/create_SCRIP_file_from_MPAS_mesh.py',
70-
'mesh_tools/create_SCRIP_files/create_SCRIP_file_from_planar_rectangular_grid.py',
71-
'landice/mesh_tools_li/create_landice_grid_from_generic_MPAS_grid.py',
72-
'landice/mesh_tools_li/define_cullMask.py',
73-
'landice/mesh_tools_li/interpolate_to_mpasli_grid.py',
74-
'landice/mesh_tools_li/mark_domain_boundaries_dirichlet.py',
75-
'ocean/coastline_alteration/add_land_locked_cells_to_mask.py',
67+
scripts=['ocean/coastline_alteration/add_land_locked_cells_to_mask.py',
7668
'ocean/coastline_alteration/widen_transect_edge_masks.py',
7769
'ocean/coastline_alteration/add_critical_land_blockages_to_mask.py',
7870
'ocean/moc_southern_boundary_extractor/moc_southern_boundary_extractor.py',
7971
'visualization/paraview_vtk_field_extractor/paraview_vtk_field_extractor.py'],
8072
install_requires=install_requires,
81-
entry_points={'console_scripts':
82-
['planar_hex = mpas_tools.planar_hex:main',
83-
'translate_planar_grid = mpas_tools.translate:main',
84-
'merge_grids = mpas_tools.merge_grids:main',
85-
'split_grids = mpas_tools.split_grids:main',
86-
'inject_bathymetry = mpas_tools.ocean.inject_bathymetry:main',
87-
'inject_preserve_floodplain = mpas_tools.ocean.inject_preserve_floodplain:main',
88-
'ocean_add_depth = mpas_tools.ocean.depth:main_add_depth',
89-
'ocean_add_zmid = mpas_tools.ocean.depth:main_add_zmid',
90-
'ocean_write_time_varying_zmid = mpas_tools.ocean.depth:main_write_time_varying_zmid',
91-
'plot_ocean_transects = mpas_tools.ocean.viz.transects:main',
92-
'mpas_to_triangle = mpas_tools.mesh.creation.mpas_to_triangle:main',
93-
'triangle_to_netcdf = mpas_tools.mesh.creation.triangle_to_netcdf:main',
94-
'jigsaw_to_netcdf = mpas_tools.mesh.creation.jigsaw_to_netcdf:main',
95-
'sort_mesh = mpas_tools.mesh.creation.sort_mesh:main',
96-
'scrip_from_mpas = mpas_tools.scrip.from_mpas:main',
97-
'compute_mpas_region_masks = mpas_tools.mesh.mask:entry_point_compute_mpas_region_masks',
98-
'compute_mpas_transect_masks = mpas_tools.mesh.mask:entry_point_compute_mpas_transect_masks',
99-
'compute_mpas_flood_fill_mask = mpas_tools.mesh.mask:entry_point_compute_mpas_flood_fill_mask',
100-
'compute_lon_lat_region_masks = mpas_tools.mesh.mask:entry_point_compute_lon_lat_region_masks',
101-
'compute_projection_region_masks = mpas_tools.mesh.mask:entry_point_compute_projection_grid_region_masks',
102-
'prepare_seaice_partitions = mpas_tools.seaice.partition:prepare_partitions',
103-
'create_seaice_partitions = mpas_tools.seaice.partition:create_partitions',
104-
'simple_seaice_partitions = mpas_tools.seaice.partition:simple_partitions',
105-
'vector_reconstruct = mpas_tools.vector.reconstruct:main']})
73+
entry_points={
74+
'console_scripts': [
75+
'planar_hex = mpas_tools.planar_hex:main',
76+
'translate_planar_grid = mpas_tools.translate:main',
77+
'merge_grids = mpas_tools.merge_grids:main',
78+
'split_grids = mpas_tools.split_grids:main',
79+
'inject_bathymetry = mpas_tools.ocean.inject_bathymetry:main',
80+
'inject_preserve_floodplain = mpas_tools.ocean.inject_preserve_floodplain:main',
81+
'ocean_add_depth = mpas_tools.ocean.depth:main_add_depth',
82+
'ocean_add_zmid = mpas_tools.ocean.depth:main_add_zmid',
83+
'ocean_write_time_varying_zmid = mpas_tools.ocean.depth:main_write_time_varying_zmid',
84+
'plot_ocean_transects = mpas_tools.ocean.viz.transects:main',
85+
'mpas_to_triangle = mpas_tools.mesh.creation.mpas_to_triangle:main',
86+
'triangle_to_netcdf = mpas_tools.mesh.creation.triangle_to_netcdf:main',
87+
'jigsaw_to_netcdf = mpas_tools.mesh.creation.jigsaw_to_netcdf:main',
88+
'sort_mesh = mpas_tools.mesh.creation.sort_mesh:main',
89+
'scrip_from_mpas = mpas_tools.scrip.from_mpas:main',
90+
'compute_mpas_region_masks = mpas_tools.mesh.mask:entry_point_compute_mpas_region_masks',
91+
'compute_mpas_transect_masks = mpas_tools.mesh.mask:entry_point_compute_mpas_transect_masks',
92+
'compute_mpas_flood_fill_mask = mpas_tools.mesh.mask:entry_point_compute_mpas_flood_fill_mask',
93+
'compute_lon_lat_region_masks = mpas_tools.mesh.mask:entry_point_compute_lon_lat_region_masks',
94+
'compute_projection_region_masks = mpas_tools.mesh.mask:entry_point_compute_projection_grid_region_masks',
95+
'prepare_seaice_partitions = mpas_tools.seaice.partition:prepare_partitions',
96+
'create_seaice_partitions = mpas_tools.seaice.partition:create_partitions',
97+
'simple_seaice_partitions = mpas_tools.seaice.partition:simple_partitions',
98+
'vector_reconstruct = mpas_tools.vector.reconstruct:main',
99+
'mark_horns_for_culling = mpas_tools.mesh.mark_horns_for_culling:main',
100+
'set_lat_lon_fields_in_planar_grid = mpas_tools.landice.set_lat_lon:main',
101+
'create_scrip_file_from_mpas_mesh = mpas_tools.scrip.from_mpas:main',
102+
'create_scrip_file_from_planar_rectangular_grid = mpas_tools.scrip.from_planar:main',
103+
'create_landice_grid_from_generic_mpas_grid = mpas_tools.landice.create:create_from_generic_mpas_grid',
104+
'define_landice_cull_mask = mpas_tools.landice.cull:define_cull_mask',
105+
'interpolate_to_mpasli_grid = mpas_tools.landice.interpolate:interpolate_to_mpasli_grid',
106+
'mark_domain_boundaries_dirichlet = mpas_tools.landice.boundary:mark_domain_boundaries_dirichlet',
107+
]
108+
})

0 commit comments

Comments
 (0)