Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding other requirement files #68

Closed
mimischi opened this issue Jun 9, 2016 · 12 comments
Closed

Adding other requirement files #68

mimischi opened this issue Jun 9, 2016 · 12 comments

Comments

@mimischi
Copy link

mimischi commented Jun 9, 2016

Have you thought about adding other non-django requirement files into the pyup check? Most specifically I'm talking about the requirements file provided by hitchtest, which is found in "/hitch/hitchreqs.txt".

Maybe an option to define other folders/files within the project would do the job!

@jayfk
Copy link
Contributor

jayfk commented Jun 9, 2016

Support for a config file just arrived, documentation is on its way.

In the meantime, this should work:

Create a file called .pyup.yml in the project root of your repository

requirements:
  - hitch/hitchreqs.txt

@mimischi
Copy link
Author

mimischi commented Jun 9, 2016

Thanks, but this does not seem to work for me though. Added a file just like this, but refreshing my repository at pyup.io does not add the new file.

@jayfk
Copy link
Contributor

jayfk commented Jun 10, 2016

Just had a look at it. The file is in tests/hitchreqs.txt instead of hitch/hichtreqs.txt.

This should do the trick:

requirements:
  - tests/hitchreqs.txt

Another thing I've noticed is that you have committed the file into the develop branch. The bot won't pick it up there unless it's told to do so.

  • If you don't want to have the file in master, you'll need to set the branch manually on the web ui.
  • If it's okay to have the file in master, but you want pull requests to happen against develop, add branch: develop to the config file and add it to the master branch.
  • If it's okay to have the file in master and pull request agains master, just add it to the master branch.

@mimischi
Copy link
Author

Obviously I'm stupid and too lazy to read, thank you very much! I just haven't pushed the newest updates to the master branch yet, so that should work then.

On a related note: are you planning to provide badges on a per-branch basis (just as require.io does)?

@pawamoy
Copy link

pawamoy commented Mar 8, 2017

Can pyup find dependencies in tox.ini if I add it to the requirements section of the configuration file?

requirements:
  - requirements/base.txt
  - tox.ini

@keimlink
Copy link

keimlink commented Mar 9, 2017

Support for tox.ini would be awesome. We define some dependencies using the deps setting. To be sure all tox envs use the same version of doc8 or flake8 we pin them. At the moment pyup does not update the dependencies and so we have to update them manually.

@keimlink
Copy link

@jayfk Can you please update us on the current status of tox.ini support? Thanks!

@jayfk
Copy link
Contributor

jayfk commented Jul 10, 2017

@keimlink I have a local dev branch with read support for tox and conda files. Next step: adding write support!

I'm currently looking for reasonably complicated tox.ini files. It'd great to add this with a good initial test coverage.

@keimlink
Copy link

Great news!

This is one of our tox.ini files. Feel free to use it.

[tox]
envlist = bandit,flake8,isort,manifest,yamllint,portable-objects,docs,compile-requirements,py35
minversion = 2.4.0

[testenv]
commands =
    pip install --constraint requirements/constraints.pip --requirement requirements/test.pip
    make bundles-development coverage
install_command = pip install --constraint requirements/constraints.pip {opts} {packages}
passenv =
    CIRCLE_*
    DATABASE_URL
    ENV
    PYTEST_ADDOPTS
whitelist_externals =
    git
    make
    rm
extras =
    raven
    whitenoise

[testenv:bandit]
commands =
    bandit --ini setup.cfg -ii -l --recursive project_directory
deps =
    bandit==1.4.0
skip_install = True

[testenv:flake8]
commands =
    make flake8
deps =
    flake8==3.3.0
skip_install = True

[testenv:isort]
commands =
    make isort-check
deps =
    isort==4.2.15
skip_install = True

[testenv:manifest]
commands =
    check-manifest --verbose
deps =
    check-manifest==0.34
skip_install = True

[testenv:yamllint]
commands =
    make yamllint
deps =
    yamllint==1.8.1
skip_install = True

[testenv:portable-objects]
commands =
    make portable-objects-lint
deps =
    dennis==0.9
skip_install = True

[testenv:docs]
commands =
    make install-documentation
    make docs BUILDDIR={envtmpdir} SPHINXOPTS='{env:SPHINXOPTS_BUILD:-W}'
    make --directory=docs linkcheck BUILDDIR={envtmpdir} SPHINXOPTS='{env:SPHINXOPTS_LINKCHECK:}'
    doc8
deps =
    doc8==0.8.0
passenv =
    {[testenv]passenv}
    SPHINXOPTS_BUILD
    SPHINXOPTS_LINKCHECK

[testenv:compile-requirements]
commands =
    rm -f heroku/requirements.txt
    pip-compile --output-file heroku/requirements.txt --rebuild --verbose requirements/constraints.pip requirements/production.in
    git checkout -- heroku/requirements.txt
deps =
    pip-tools==1.9.0
setenv =
    PIP_FIND_LINKS={distdir}
skip_install = True

Last time we fed it to pyup it thought whitelist_externals is a list of Python packages. 🤣

@jayfk
Copy link
Contributor

jayfk commented Jul 10, 2017

Last time we fed it to pyup it thought whitelist_externals is a list of Python packages. 🤣

Bots 🤦‍♂️ .

I've created a WIP branch here in case you want to track it: #222

@jayfk
Copy link
Contributor

jayfk commented Jul 11, 2017

I've decided to split the requirements parsing part into it's own library, here: https://github.com/pyupio/dparse

While it takes a little bit more time to get things right, the whole Python packaging community can use it without pulling in the whole bot as a dependency.

I'll probably have something ready by the end of the week.

@jayfk
Copy link
Contributor

jayfk commented Jul 13, 2017

Support for tox.ini and conda_env.yml files is now live 👏

It's still a bit experimental, so don't rely on it for your pacemaker's Python dependencies.

Support for Pipfile, Pipfile.lock, setup.py and eventually zc.bildout are planned.

In order to use them, add the files to your .pyup.yml requirements section:

requirements:
  - tox.ini
  - conda_env.yml

@jayfk jayfk closed this as completed Jul 13, 2017
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

No branches or pull requests

4 participants