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

Poetry build_backend #64

Closed
iamamutt opened this issue Jan 14, 2022 · 4 comments
Closed

Poetry build_backend #64

iamamutt opened this issue Jan 14, 2022 · 4 comments

Comments

@iamamutt
Copy link
Contributor

How is everyone doing development (poetry equivalent of pip install -e .) using poetry as the build-backend? Appending sys.path? Full package install not in dev mode? Poetry core hasn't released this merged PR yet that implements PEP 660. I think after that release we will only need a pyproject.toml file and no setup.cfg or setup.py.

In order to use pip install -e I have to have the following files:

setup.cfg

[metadata]
name = aeon_mecha
version = 0.0.0

[options]
zip_safe = False
packages = find:
include_package_data = True
package_dir =
    =.

[options.packages.find]
where = .
exclude =
    tests
    docs

[options.entry_points]
console_scripts =
    aeon_ingest = aeon.dj_pipeline.ingest.process:cli

setup.py

from setuptools import setup

if __name__ == "__main__":
    setup()

pyproject.toml

[build-system]
requires = ["setuptools", "poetry-core>=1.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "aeon_mecha"
version = "0.0.0"
description = "Code for managing acquired data. Includes preprocessing, querying, and analysis modules."
authors = ["Jai Bhagat jkbhagatio@gmail.com", "Goncalo Lopes <goncaloclopes@gmail.com>"]
license = ""
readme = "readme.md"
python = ">=3.9.4"
homepage = "https://github.com/projectAeon/data-management"
repository = "https://github.com/projectAeon/data-management"
documentation = "https://github.com/projectAeon/data-management"

[tool.poetry]
name = "aeon_mecha"
version = "0.0.0"
description = "Code for managing acquired data. Includes preprocessing, querying, and analysis modules."
authors = ["Jai Bhagat <jkbhagatio@gmail.com>", "Goncalo Lopes goncaloclopes@gmail.com>"]

[tool.poetry.dependencies]
python = ">=3.9.4"
graphviz = "*"
jupyter = "*"
jupyterlab = "*"
matplotlib = "*"
numpy = "*"
opencv-python = "*"
pandas = "*"
plotly = "*"
scikit-learn = "*"
scipy = "*"
seaborn = "*"

[tool.poetry.dev-dependencies]
bandit = "*"
black = "*"
flake8 = "*"
pytest = "*"
setuptools = "*"
tox = "*"

[tool.poetry.scripts]
aeon_ingest = "aeon.dj_pipeline.ingest.process:cli"

[tool.black]
line-length = 88
target-version = ["py39"]
color = true

[tool.isort]
# make it compatible with black
profile = "black"
color_output = true

keywords = []

classifiers = [  #! Update me
  "Development Status :: 3 - Alpha",
  "Intended Audience :: Developers",
  "Operating System :: OS Independent",
  "Topic :: Software Development :: Libraries :: Python Modules",
  "License :: OSI Approved :: MIT License",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.9",
]
@jkbhagatio
Copy link
Member

Did you try just running setup.py in develop: python setup.py develop ? Did that not work?

Poetry core hasn't released this merged PR yet that implements PEP 660. I think after that release we will only need a pyproject.toml file and no setup.cfg or setup.py

yes this will be nice when that PR is merged

@iamamutt
Copy link
Contributor Author

Did you try just running setup.py in develop: python setup.py develop ? Did that not work?

Yes this will work if setup.py and/or setup.cfg are filled out appropriately with info from pyproject.toml as above. Will also give a deprecated warning to use pip.

@jkbhagatio
Copy link
Member

Hm ok, I didn't get that deprecation warning last time I tried this. I will make necessary changes specified here in the 'reorg' branch and update the pyenv + poetry set-up instructions there before closing this

@jkbhagatio
Copy link
Member

done

iamamutt pushed a commit that referenced this issue Feb 2, 2022
* Allow load to resolve priority list of paths

Fixes #42

* Add support for parsing multianimal position data

Fixes #55

* add plot for experiment-level average time spent at different locations of the arena

* update docker stuff

* Merge remote-tracking branch 'origin/datajoint_pipeline'

* python package changes for docker install

* docker updates

* fix context path

* fix dockerfile path

* docker ghcr.io PAT instructions for private repo

* use datajoint_pipeline for actions branch

* pull latest conda/mamba image

* Docker updates (#7)

* new branch avoid build

* changes to docker dev yml

* user group settings

* minor updates

* update docker image

* docker container paths permissions fixes

* minor rename

* refactor docker for aeon_db worker

* incorporate thinhs changes

* get env for linux amd64

* image updates

* add script for sudo

* process root dirs separately then concat

* some keys not in json file

* docker env updates

* update sciviz deployment

* confirm API works, revert back the temporary changes in `chunkdata`

* gh actions github context

* change cache type

* remove old cache

* devcontainer updates

* dockerfile updates

* docker updates

* docker updates

* Docker updates (#61)

Updates to docker and trigger gh actions

* test action

* env instructions

* fix repo owner

* add locked envs

* Docker updates

Updates to docker and trigger gh actions

* docker updates

* docker updates

* rm tmp dir gh actions

* rm tmp dir gh actions

* add back api fix

* gh action

* none path

* docker updates

* Docker ingestion tested (#64)

* docker updates

* try without cache

* debug buildx

* ingestion updates

Co-authored-by: glopesdev <glopesdev@users.noreply.github.com>
Co-authored-by: Thinh Nguyen <thinh@vathes.com>
Co-authored-by: Jai Bhagat <jkbhagatio@gmail.com>
iamamutt pushed a commit that referenced this issue Feb 2, 2022
* docker updates
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

2 participants