Scribe-Data icon indicating copy to clipboard operation
Scribe-Data copied to clipboard

Expand Scribe-Data paths to allow for Windows commands

Open andrewtavis opened this issue 1 year ago • 14 comments
trafficstars

Terms

Description

Something that would be great to add to Scribe-Data is some more documentation for Windows commands beneath their Linux/Mac counterparts in the readme and contributing guide as well as converting some of the path functionality of the codebase over to allow for Windows paths to be accessed.

  • Note that this should be worked on after #122 :)

Contribution

Happy to support on this as needed! 😊

andrewtavis avatar Mar 26 '24 01:03 andrewtavis

@mhmohona, you'd said you'd be interested in this one? :)

andrewtavis avatar Mar 26 '24 01:03 andrewtavis

Yes.

mhmohona avatar Mar 26 '24 02:03 mhmohona

Assigned, @mhmohona! Let me know if there's anything we can do to assist :)

andrewtavis avatar Mar 26 '24 08:03 andrewtavis

Assigned, @mhmohona! Let me know if there's anything we can do to assist :)

Could assist too if you don't mind

Jk40git avatar Mar 26 '24 22:03 Jk40git

Sure thing, @Jk40git. @mhmohona, let either of us know it anything's needed :)

andrewtavis avatar Mar 26 '24 22:03 andrewtavis

So the first problem I faced while installing Scribe-data was installing PyICU. It has different installation process for Windows - https://github.com/ilius/pyglossary/blob/master/doc/pyicu.md#installation-on-windows

mhmohona avatar Mar 27 '24 10:03 mhmohona

So the first problem I faced while installing Scribe-data was installing PyICU. It has different installation process for Windows - https://github.com/ilius/pyglossary/blob/master/doc/pyicu.md#installation-on-windows

@mhmohona have you tried the process? I can't load PyICU-2.9-cp311-cp311-win_amd64.whl into the command prompt

Jk40git avatar Mar 27 '24 19:03 Jk40git

So the first problem I faced while installing Scribe-data was installing PyICU. It has different installation process for Windows - https://github.com/ilius/pyglossary/blob/master/doc/pyicu.md#installation-on-windows

@mhmohona have you tried the process? I can't load PyICU-2.9-cp311-cp311-win_amd64.whl into the command prompt

Screenshot 2024-03-27 195043

Jk40git avatar Mar 27 '24 19:03 Jk40git

So the first problem I faced while installing Scribe-data was installing PyICU. It has different installation process for Windows - https://github.com/ilius/pyglossary/blob/master/doc/pyicu.md#installation-on-windows

@mhmohona have you tried the process? I can't load PyICU-2.9-cp311-cp311-win_amd64.whl into the command prompt

We need to install a certain pkg-config file using chocolatey

Jk40git avatar Mar 27 '24 20:03 Jk40git

Big thing to note here is that the PyICU behavior is known to be very weird... This is documented in #33, and I'd say that the install for PyICU for windows could be included in that issue. For this one, let's focus on the baseline paths for updating the data :)

CC @wkyoshida

andrewtavis avatar Mar 28 '24 23:03 andrewtavis

@mhmohona please where are you with this issue

Jk40git avatar Apr 01 '24 18:04 Jk40git

Hey @Jk40git, I actually havent started working on this issue after my last comment. However, I can suggest you an alternative to run the scripts without needing to installing locally. You can use Google Colab. Here I have setup the repo and other things - link. You can use this notebook as reference.

mhmohona avatar Apr 03 '24 03:04 mhmohona

All right @mhmohona. I was able to access the path locally though. But my problem was the marisa-trie build wheels. Thanks for the reply

Jk40git avatar Apr 03 '24 23:04 Jk40git

This'll be solved over the weekend odds are :) We're discussing how to change the dependencies in #61, with the likely change being that we'll remove the ones that are causing all these issues.

andrewtavis avatar Apr 04 '24 07:04 andrewtavis

Now in windows I can install Scribe data by following commands here but when trying to run a script, getting error like this - image

This issue seems it will take some time. Thus I want to work on it later.

mhmohona avatar Jul 07 '24 10:07 mhmohona

Thanks for looking into this, @mhmohona! Let's discuss later when we'd like to prioritize this :)

andrewtavis avatar Jul 07 '24 14:07 andrewtavis

Now in windows I can install Scribe data by following commands here but when trying to run a script, getting error like this - image

This issue seems it will take some time. Thus I want to work on it later.

@mhmohona I think scribe_data wasn't successfully installed can you do pip install scribe_data and see?

Jk40git avatar Jul 07 '24 16:07 Jk40git

Ah ya, good point @Jk40git. It's not picking up Scribe-Data in your environment 🤔 We can maybe check this with a pip install . before the next release and figure out where the path issues are?

@Jk40git, you could also check this and @mhmohona could review? As you two see fit :)

andrewtavis avatar Jul 07 '24 17:07 andrewtavis

Specifically what we're looking for is if a person on Windows does the following:

pip install .
scribe-data q -all

If the data starts being downloaded, then that's the first hint that things are working properly :)

andrewtavis avatar Jul 07 '24 17:07 andrewtavis

Ah ya, good point @Jk40git. It's not picking up Scribe-Data in your environment 🤔 We can maybe check this with a pip install . before the next release and figure out where the path issues are?

@Jk40git, you could also check this and @mhmohona could review? As you two see fit :)

Okay sure I was able to access it before the recent changes. But I will have a look at it again

Jk40git avatar Jul 07 '24 22:07 Jk40git

Specifically what we're looking for is if a person on Windows does the following:

pip install .
scribe-data q -all

If the data starts being downloaded, then that's the first hint that things are working properly :)

Okay do you mean something like this? Screenshot 2024-07-07 223404

Jk40git avatar Jul 07 '24 22:07 Jk40git

That's the top of the output where you copied both commands in one, right @Jk40git? Now that you have it installed, and please check that you've git pulled, can you show what the output of scribe-data q -all is?

andrewtavis avatar Jul 08 '24 13:07 andrewtavis

That's the top of the output where you copied both commands in one, right @Jk40git? Now that you have it installed, and please check that you've git pulled, can you show what the output of scribe-data q -all is?

Yes. the second output bash: scribe-data: command not found

Jk40git avatar Jul 08 '24 22:07 Jk40git

Hmmmm, but that's weird as it should have been covered by git install .. Is your local Scribe-Data up to date with git pull?

andrewtavis avatar Jul 09 '24 02:07 andrewtavis

git install .? Or pip install .?

Yes it's up to date

Jk40git avatar Jul 09 '24 14:07 Jk40git

Sorry, pip install .. But this after git pull from the main branch here :)

andrewtavis avatar Jul 09 '24 14:07 andrewtavis

That's what I did It says command not found

Jk40git avatar Jul 09 '24 14:07 Jk40git

Ok, well that's not good 😅 Can you tell us if you have the cli directory in your local version, so src/scribe_data/cli? @mhmohona, you're also on Windows, right?

andrewtavis avatar Jul 09 '24 15:07 andrewtavis

Ok, well that's not good 😅 Can you tell us if you have the cli directory in your local version, so src/scribe_data/cli? @mhmohona, you're also on Windows, right?

Yes please I have the cli directory

Screenshot 2024-07-09 160326

Jk40git avatar Jul 09 '24 16:07 Jk40git

Thank for the conversation here, @Jk40git! Just checking things with the questions, hope you understand :) This is definitely something need need to be looking into then, as it seems that the CLI isn't being installed for you. @mhmohona, it'd be great to get your feedback as I believe it's working on your end, but maybe I'm misremembering your operating system as Windows, or there could be something else going on 🤔

@Jk40git, specifically this line in setup.py is the one that is setting up the CLI on install. It's at least worked for @mhmohona and I 🤔 I'm wondering what some potential fixes could be?? The line in question is:

  "console_scripts": [
      "scribe-data=scribe_data.cli.main:main",
  ],

Maybe something that's going on is that we have a prior version that's installed and the new one isn't being picked up? So maybe @Jk40git you could try pip uninstall scribe-data; pip install . as a way of reinstalling the package?

If this does work for you, then something we'd need to make sure of is that the old version of things is removed when a person wants to install the new version :) Generally I think that this comment and the thread it's in should have most of the answers we're looking for. Things to try:

  1. Uninstall and reinstall
# Solution I suggested above
pip uninstall scribe-data
pip install .
  1. Force reinstall
# Should behave as the above
pip install --force-reinstall scribe-data
  1. Update the entry_points and console_scripts via the egg info
python setup.py egg_info

@Jk40git, can you try the above and let us know if scribe-data q -all works on your end?

If one of these works, we should definitely add a quick line about them into the readme and contributing guide!

andrewtavis avatar Jul 09 '24 16:07 andrewtavis