Skip to content

Add tasks and abstraction#13

Closed
ammonshepherd wants to merge 4 commits intoOpenGeoMetadata:mainfrom
ammonshepherd:additives
Closed

Add tasks and abstraction#13
ammonshepherd wants to merge 4 commits intoOpenGeoMetadata:mainfrom
ammonshepherd:additives

Conversation

@ammonshepherd
Copy link

This request adds three new rake tasks:

  • clean: to delete the tmp directory
  • delete: to delete the Solr index
  • all: combines clone and index for easier first time use

Also, abstracts the Solr URL for better handling of alternative Solr installations. Use of an .env file is supported, as well as adding the URL to the rake tasks (index, delete, and all).

Additionally, the --verbose flag can be used to see output.

@mejackreed
Copy link
Member

Thanks for the contribution.

A couple of comments before it can be merged.

  1. Could you please rebase your branch against master and fix any merge conflicts?
  2. I'm a bit concerned about the clean command. Specifically if GeoCombine is used in another application (Rails app/GeoBlacklight) this would probably create some unintended consequences for someone running this command. Maybe we should separate geocombine as a whole?

Maybe something like tmp/geocombine/edu.institution

Then rake geocombine:clean would just rm -rf tmp/geocombine

@mejackreed
Copy link
Member

Updated default location to be tmp/opengeometadata with #20

This request adds three new rake tasks:

 - clean: to delete the tmp directory
 - delete: to delete the Solr index
 - all: combines clone and index for easier first time use

Also, abstracts the Solr URL for better handling of alternative Solr
installations. Use of an .env file is supported, as well as adding the
URL to the rake tasks (index, delete, and all).

Additionally, the --verbose flag can be used to see output.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.56% when pulling a42a5d8 on mossiso:additives into fdcf772 on OpenGeoMetadata:master.

@mejackreed
Copy link
Member

Thanks looks great! Two additional questions came up as I was looking at this again,

  1. Is there a way we can get around including the dotenv gem dependency? This project aims to be a gem that can be included in other projects. This added dependency may add complications to this. Would something like this be sufficient?

    solr_url = ENV['SOLR_URL'] || 'http://127.0.0.1:8983/solr'
    
  2. I'm still a bit weary of the rake geocombine:delete task (and all of the Solr tasks). They start to feel a bit like they are out of scope for this tool and I'm concerned about the potential for adding this into their project (GeoBlacklight) and accidentally deleting a Solr index.

I envision that GeoCombine will soon be a dependency in GeoBlacklight and I'm unsure if these indexing tasks are even appropriate (I know I was the one who added them to start with 😸 ). What are your thoughts on this @mossiso ?

@ammonshepherd
Copy link
Author

Those are great points. We are using it mainly from the command line, so I built it with that in mind, but you're right, it would be better to take out the dotenv requirement and the delete task to make it more interoperable in other workflows. I don't really know the larger scope and design for GeoCombine/GeoBlacklight (just how we're implementing it for now).

I'll work on taking out the dotenv and the delete task.

@mejackreed mejackreed modified the milestone: v0.0.6 Apr 10, 2015
You can set the URI using environment variables. From command line call the rake
task with `SOLR_URL='http://192.168.59.103:12345/solr' rake geocombine:index`
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling fe7a05b on mossiso:additives into * on OpenGeoMetadata:master*.

Delete option was to clear out the Solr index, but was removed so
accidental Solr index clearing could not happen.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 82d9908 on mossiso:additives into * on OpenGeoMetadata:master*.

@thatbudakguy
Copy link
Member

closing this, since it's over 8 years old.

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.

4 participants