Skip to content

Conversation

@amyfromandi
Copy link
Collaborator

Made a few changes to the make file in order to get the Macrostrat command line to work.

  • Removed --no-update in the root Makefile.
  • mono is not recognized in the latest Poetry version. Commented out #./bin/macrostrat poetry run mono install
  • gdal failed to install. The pyproject.toml file now uses a 'gis' condition to choose to install this dependency or not.
  • In root folder run make and then sudo make install.
  • Then cd ./cli/. ModuleNotFoundError: No module named 'pkg_resources' so then we ran poetry run pip install setuptools
  • Pytest is not installed in ./cli, so we manually installed it poetry add pytest
  • run make and sudo make install.
  • The macrostrat command should run successfully after these updates.

@amyfromandi amyfromandi added documentation Improvements or additions to documentation command-line labels Feb 25, 2025
@davenquinn
Copy link
Member

davenquinn commented Feb 25, 2025

The mono command is defined as a Poetry script in the the macrostrat.package_tools module, imported by the CLI package. The macrostrat command is defined as a script in the CLI package itself.

We might need to figure out how to install the macrostrat.package_tools and macrostrat.cli packages with scripts. This might be a Poetry configuration option?

python-poetry/poetry#3265

@davenquinn
Copy link
Member

We should also document that GDAL should be installed on the system if you want (some parts of) map ingestion to work properly.

davenquinn and others added 8 commits March 6, 2025 12:58
* main:
  Format code and sort imports
  Provide ROCKD_DATABASE_URL to local tileserver
  Fix order of imports
  Add pylibmagic dependency
  Format code and sort imports
  Fixed line orientations function definitions
  Small improvement to migrations
  Created a command to delete tiles from the cache
  Created an 'ALWAYS_APPLIED' migration state
  Format code and sort imports
  Ensure that PostgREST API picks up additional lines_oriented attribute
  Added a data migration
  Created basic line orientations database migration
@davenquinn
Copy link
Member

I was able to successfully install this in a new virtual environment just now without extra steps, so I think we've made an improvement!

@davenquinn davenquinn merged commit c7034d0 into main Mar 6, 2025
@davenquinn davenquinn deleted the cli_install branch March 6, 2025 19:44
@amyfromandi
Copy link
Collaborator Author

amyfromandi commented Mar 14, 2025

Pulled main updates into my local branch and had issues running the command line again. Figured out that
psycopg2-binary (2.9.9) isn't compatible with [email protected]....so I deleted the current venv, installed and created [email protected] venv and the command line works now!

@davenquinn
Copy link
Member

OK! This makes sense. At core, we need to start upgrading internals to use psycopg version 3: for example, UW-Macrostrat/python-libraries#39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command-line documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants