Skip to content

Conversation

@mart-r
Copy link
Collaborator

@mart-r mart-r commented Nov 28, 2025

There were previously issues with installing from source. Specifically, it happened in the following scenario:

  • The project had previously been built
    • The build folder exists within the medcat-v2 folder
  • The current state of the project is older than the latest build time
  • The above meant that setuptools considered the build up to date
    • Because the current soruce was older than the build state
    • And the version of the project was still the same

In order to fix this, we needed to introduce a local versioning scheme. However, in order to do that, we needed to make quite a few changes. Here's the list of things this PR changes:

  • Specify tool.setuptools.package-dir in pyproject.toml
    • This will fix issues with installation when there's other folders in the root of the project
    • Which can happen (e.g) after tests which create a results folder
  • Add setuptools_scm to build system
    • So the below can be done
  • Make version dynamic
    • Version is now read based on tag that's been used
    • This is standard practice
  • Give the version tagging system a regular expression
    • The default is expecting tags like v2.3.4
    • But due to us having multiple repositories we have prefixes
    • So the regex needs to account for that
  • Use correct root target for setuptools_scm
    • Need to use the parent folder
    • That's where the .git folder with the relevant tags is
    • Otherwise setuptools_scm would be unable to find the tags and thus the version
  • Use a local versioning scheme
    • So that locally built versions have a useful version
    • And so that it changes on a per commit basis
  • Mark the project as being in stage 5
    • I.e production instead of beta
  • Merge in the v2.4 branch
    • So that the tag appears in history
    • Otherwise they are unable to be discovered
  • Change the release scripts
    • To account for changes
    • Now creating tag on main branc
    • Not doing any git add / commit
    • And branching from there for release branch

@tomolopolis
Copy link
Member

Task linked: CU-869banbwt Fix source install issues

Copy link
Member

@tomolopolis tomolopolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mart-r mart-r merged commit e21da73 into main Nov 28, 2025
20 checks passed
@mart-r mart-r deleted the bug/medcat/CU-869banbwt/fix-source-install-issues branch November 28, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants