github

How to fetch an orphaned commit?

How to fetch an orphaned commit? Question: tl;dr: I have a repository cloned but cannot see an orphaned commit locally. How can I get that commit if it did not come with the repo? Details: I am trying to get the contents of a specific file on a specific commit using gitpython as below (using …

Total answers: 1

Permission denied: calling a shell script from Python in a Jenkins job

Permission denied: calling a shell script from Python in a Jenkins job Question: Trying to provide the minimal amount of information necessary here, so I’ve left a lot out. Lots of similar questions around, but the most common answer (use chmod +x) isn’t working for me. I have a Python script and a shell script …

Total answers: 1

Github Workflow / Action commit to repository returning 403

Github Workflow / Action commit to repository returning 403 Question: I have a Github Workflow file where I bump the version of the python package (setup.py) and afterwards I want to push the changes to the repository the workflow runs in. But I get 403 no access granted back build-package: permissions: contents: read id-token: write …

Total answers: 1

ModuleNotFoundError on GitHub tox test run

ModuleNotFoundError on GitHub tox test run Question: running tests on GitHub and getting the error message below. Weirdly, this error did not occur with the same setup before. Run python -m tox — –junit-xml pytest.xml py38: install_deps> python -I -m pip install pytest pytest-benchmark pytest-xdist tox: py38 py38: commands[0]> pytest tests/ –ignore=tests/lab_extension –junit-xml pytest.xml ImportError …

Total answers: 1

Download Public Github repository using Python function

Download Public Github repository using Python function Question: I have a CSV file with one column. This column consists of around 100 GitHub public repo addresses (for example, NCIP/c3pr-docs) I want to know if there is any way to download all these 100 public repo inside my computer using Python. I don’t want to use …

Total answers: 1

Installing private pip package inside docker container

Installing private pip package inside docker container Question: I am trying to create docker container for a fastapi application. This application is going to use a private pip package hosted on github. During local development, I used the following command to install the dependency: pip install git+https://<ACCESS_TOKEN>:[email protected]/username/projectname I tried the same approach inside dockerfile, however …

Total answers: 1

Unable to use Github API with authentication tuple

Unable to use Github API with authentication tuple Question: query = "https://api.github.com/repos/rhinstaller/anaconda/tags" response = requests.get(query,auth=(self.username,self.token)) response.raise_for_status() # raises exception when not a 2xx if response.status_code != 204: try: data = response.json() print("data = ",data) except: print("0") The above code always returns data as empty whereas response = requests.get(query) will still work until the rate is …

Total answers: 1

How do I correctly load data in Python?

How do I correctly load data in Python? Question: I am trying to replicate @miabrahams ACM model which is on Github here: https://github.com/miabrahams/PricingTermStructure I am coming across two errors relating to how I load data. I’m a Python novice so I’m sure it’s a simple solution but I can’t figure out how to fix this …

Total answers: 1