File tree Expand file tree Collapse file tree 6 files changed +19
-32
lines changed Expand file tree Collapse file tree 6 files changed +19
-32
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ RUN pip install -U pip && if [ "$USE_CPU_TORCH" = "true" ]; then \
3030ARG REINSTALL_CORE_FROM_LOCAL=false
3131RUN if [ "$REINSTALL_CORE_FROM_LOCAL" = "true" ]; then \
3232 echo "Reinstalling medcat based on relative path" ; \
33- pip install -e "/webapp/medcat-v2[meta-cat,spacy]" ; \
33+ SETUPTOOLS_SCM_PRETEND_VERSION= "2.4.0-dev0" pip install -e "/webapp/medcat-v2[meta-cat,spacy]" ; \
3434 fi
3535
3636# Get the spacy model (for later copy)
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ COPY . /cat
2929ARG REINSTALL_CORE_FROM_LOCAL=false
3030RUN if [ "$REINSTALL_CORE_FROM_LOCAL" = "true" ]; then \
3131 echo "Reinstalling medcat based on relative path" ; \
32- pip install -e "./medcat-v2[meta-cat,spacy]" ; \
32+ SETUPTOOLS_SCM_PRETEND_VERSION= "2.4.0-dev0" pip install -e "./medcat-v2[meta-cat,spacy]" ; \
3333 fi
3434
3535# Now run the simple api
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ COPY . /cat
5050ARG REINSTALL_CORE_FROM_LOCAL=false
5151RUN if [ "$REINSTALL_CORE_FROM_LOCAL" = "true" ]; then \
5252 echo "Reinstalling medcat based on relative path"; \
53- pip install -e "./medcat-v2[meta-cat,spacy]"; \
53+ SETUPTOOLS_SCM_PRETEND_VERSION="2.4.0-dev0" pip install -e "./medcat-v2[meta-cat,spacy]"; \
5454 fi
5555
5656# Now run the simple api
Original file line number Diff line number Diff line change 6767# NOTE: will overwrite release branch if --force is specified
6868run_or_echo git checkout -B " $RELEASE_BRANCH "
6969
70- # Update version in pyproject.toml
71- if [[ " $( uname) " == " Darwin" ]]; then
72- # macOS (BSD sed)
73- run_or_echo sed -i \'\' \' s/^version = \" .* \" /version = \"\' $VERSION \'\" /\' pyproject.toml
74- else
75- # Linux (GNU sed)
76- run_or_echo sed -i \' s/^version = \" .* \" /version = \"\' $VERSION \'\" /\' pyproject.toml
77- fi
78-
79- run_or_echo git add pyproject.toml
80- run_or_echo git commit -m \" Bump version to $VERSION for release\"
81-
8270# Create and push tag
8371run_or_echo git tag -a \" $VERSION_TAG \" -m \" Release v$VERSION \"
8472run_or_echo git push origin \" $RELEASE_BRANCH \"
Original file line number Diff line number Diff line change @@ -169,20 +169,6 @@ for HASH in "${CHERRYPICK_HASHES[@]-}"; do
169169 fi
170170done
171171
172-
173- # Update version in pyproject.toml
174- if [[ " $( uname) " == " Darwin" ]]; then
175- # macOS (BSD sed)
176- run_or_echo sed -i \'\' \' s/^version = \" .* \" /version = \"\' $VERSION \'\" /\' pyproject.toml
177- else
178- # Linux (GNU sed)
179- run_or_echo sed -i \' s/^version = \" .* \" /version = \"\' $VERSION \'\" /\' pyproject.toml
180- fi
181-
182- # add and commit changes
183- run_or_echo git add pyproject.toml
184- run_or_echo git commit -m \" Bump version to $VERSION \" --allow-empty
185-
186172# now do the tagging
187173# NOTE: can force since without the `--force` flag we would have checked
188174# for existing tag
Original file line number Diff line number Diff line change 11[project ]
22name = " medcat"
33
4- version = " 2.2.0-dev "
4+ dynamic = [ " version " ]
55
66description = " Medical Concept Annotation Toolkit (v2)"
77
@@ -33,7 +33,7 @@ classifiers = [
3333 # 3 - Alpha
3434 # 4 - Beta
3535 # 5 - Production/Stable
36- " Development Status :: 4 - Beta " ,
36+ " Development Status :: 5 - Production/Stable " ,
3737
3838 " Intended Audience :: Healthcare Industry" ,
3939 # "Topic :: Natural Language Processing :: Named Entity Recognition and Linking",
@@ -128,9 +128,22 @@ test = [] # TODO - list
128128[build-system ]
129129# These are the assumed default build requirements from pip:
130130# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
131- requires = [" setuptools>=43.0.0" , " wheel" ]
131+ requires = [" setuptools>=43.0.0" , " setuptools_scm>=8 " , " wheel" ]
132132build-backend = " setuptools.build_meta"
133133
134+ [tool .setuptools ]
135+ package-dir = { "medcat" = " medcat" }
136+
137+ [tool .setuptools .packages .find ]
138+ include = [" medcat*" ]
139+
140+ [tool .setuptools_scm ]
141+ # look for .git folder in root of repo
142+ root = " .."
143+ version_scheme = " post-release"
144+ tag_regex = " ^medcat/v(?P<version>\\ d+(?:\\ .\\ d+)*)(?:[ab]\\ d+|rc\\ d+)?$"
145+ local_scheme = " node-and-date"
146+
134147[tool .ruff .lint ]
135148# 1. Enable some extra checks for ruff
136149select = [" E" , " F" ]
You can’t perform that action at this time.
0 commit comments