Comments (6)
From what I can tell the post_install
function is just never getting ran.
I tried changing it to this
import subprocess
def post_install() -> None:
with open("test.txt", "w") as f:
f.write("this function ran")
subprocess.run(["poetry", "run", "pre-commit", "install"], check=True)
And no file is created when running poetry install.
from datacrawl.
I have created script.py for this. I thought it was getting installed from here.
[tool.poetry.scripts]
post_install = "scripts:post_install"
from datacrawl.
For me I had to do pre-commit install
to get the hooks :/
I can try to look into it but I've never used poetry before.
from datacrawl.
Maybe this is something you could take a look at, though I agree that using something native to poetry would be better than using extensions: https://pypi.org/project/poetry-pre-commit-plugin/
from datacrawl.
From what I can tell the [tool.poetry.scripts] option is actually for making cli scripts, so basically it lets you register a command for the cli. So what the pyproject.toml
is telling poetry is actually that it should register post_install
as a console command. And sure enough, if you just type post_install
in the command line, you get this:
Traceback (most recent call last):
File "C:\Users\Public\codg\forks\Scripts\\post_install", line 3, in <module>
from scripts import post_install
ModuleNotFoundError: No module named 'scripts'
from datacrawl.
I found this post by the creator of poetry and he says he doesn't support running scripts on installation, so its probably best to just have to person contributing run the pre-commit commands manually, or to use the extension I sent earlier (although it looks like you can't install the push hook automatically through the extension)
from datacrawl.
Related Issues (20)
- Feature: Support for crawling dynamic javascript heavy site HOT 5
- Feature: Support flag to crawl only the root website. Do not hop to external links HOT 10
- Feature: Add a feature to only crawl the given list of urls HOT 5
- Feature: Support for regular expression pattern for url crawling HOT 5
- Housekeeping: Refactor the code base to a more Modular and Extensible Architecture
- Docs: Auto generate documentation
- Add mypy to pre-commit hooks HOT 6
- Fix `crawl_result` type hint HOT 1
- First Major Release v1.0.0 HOT 3
- Make `Spider` importable from main module HOT 1
- What is the `main` function for? HOT 2
- Test coverage above 80%
- Display coverage percentage in readme HOT 2
- Crawl depth per domain
- Implement logging HOT 1
- Implement a retry mechanism for transient errors
- Can't run tests on local machine HOT 1
- Respect robots.txt when crawling when set as True HOT 1
- Use one or more `Options` classes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datacrawl.