File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 source $CONDA/etc/profile.d/conda.sh
2929 conda activate test_schimpy
3030 conda config --set anaconda_upload yes
31+ export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm)
3132 conda build -c cadwr-dms -c conda-forge --user cadwr-dms --token "$ANACONDA_CHANNEL_UPLOAD_TOKEN" conda.recipe
3233 conda activate
3334 conda remove -n test_schimpy --all
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ wheels/
2424* .egg-info /
2525.installed.cfg
2626* .egg
27+ vtools /_version.py # auto generated by setuptools_scm
2728
2829# PyInstaller
2930# Usually these files are written by a python script from a template
Original file line number Diff line number Diff line change 55
66package :
77 name : schimpy
8- version : {{ version }}
8+ version : {{ SETUPTOOLS_SCM_PRETEND_VERSION }}
99
1010source :
1111 # git_url: https://github.com/CADWRDeltaModeling/schimpy.git
@@ -28,18 +28,20 @@ requirements:
2828 - {{ dep.lower() }}
2929 {% endfor %}
3030 build :
31- - python
31+ - python {{ project['requires-python'] }}
3232 - pip
3333 - setuptools
3434 - setuptools_scm
3535 - pyproj
36- - pytest-runner >=5.0
36+ - ruff>=0.4.8
37+ # - pytest-runner >=5.0
3738 - numpy >=2.0
3839 run :
3940 - python {{ project['requires-python'] }}
4041 {% for dep in project.get('dependencies', []) %}
4142 - {{ dep.lower() }}
4243 {% endfor %}
44+ - numpy >=2.0
4345
4446test :
4547 imports :
5153 - {{ dep.lower() }}
5254 {% endfor %}
5355 commands :
54- - (setlocal && cd tests && pytest && endlocal ) # [win]
56+ - (cd tests && pytest) # [win]
5557 - (cd tests; pytest) # [unix]
5658
5759about :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " schimpy"
7- dynamic = [" version" ] # Placeholder; versioneer will manage this
7+ dynamic = [" version" ] # Placeholder; setuptools-scm will manage this
88description = " Python package for SCHISM"
99readme = " README.rst"
1010license = " MIT"
@@ -76,6 +76,9 @@ Homepage = "https://cadwrdeltamodeling.github.io/schimpy/"
7676[tool .flake8 ]
7777exclude = [" docs" ]
7878
79+ [tool .ruff .lint ]
80+ select = [" NPY201" ]
81+
7982[tool .setuptools .packages .find ]
8083include = [" schimpy" ]
8184exclude = [" docsrc" ]
Original file line number Diff line number Diff line change 33__author__ = """Eli Ateljevich, Kijin Nam"""
44__email__ = "Eli.Ateljevich@water.ca.gov; Kijin.Nam@water.ca.gov"
55
6- from importlib .metadata import version , PackageNotFoundError
7-
86try :
9- __version__ = version ( "schimpy" )
10- except PackageNotFoundError :
11- __version__ = "0.0.0" # Default version if package metadata is unavailable
7+ from . _version import __version__
8+ except ImportError :
9+ __version__ = "0.0.0" # fallback for weird dev cases
You can’t perform that action at this time.
0 commit comments