os-threat / Stix-ORM

GNU Affero General Public License v3.0
4 stars 0 forks source link

3 pip packaging from main #23

Closed andrewgin closed 1 year ago

andrewgin commented 1 year ago

tested by uploading to test.pypi: https://test.pypi.org/project/stixorm/0.1.0/ https://test.pypi.org/project/stixorm/0.1.3/

installed with: pip install --index-url https://test.pypi.org/simple/ --no-deps stixorm

and tested

from stixorm.utils import check_func
check_func.get_local_relns()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: get_local_relns() missing 1 required positional argument: 'dep_insert'
priamai commented 1 year ago

What does this do?

check_func.get_local_relns()

priamai commented 1 year ago

Hello @andrewgin we have to find a way to reference the schema files directly from the pip package. Basically how can we autofill the schema path to point into the installed pip folder?

https://github.com/os-threat/Stix-ORM/blob/main/os-intel/run_pip.ipynb

andrewgin commented 1 year ago

What does this do?

check_func.get_local_relns()

Don't know what it does, I was just using it as an example to test that I could import the package and run a function from it

andrewgin commented 1 year ago

Hello @andrewgin we have to find a way to reference the schema files directly from the pip package. Basically how can we autofill the schema path to point into the installed pip folder?

https://github.com/os-threat/Stix-ORM/blob/main/os-intel/run_pip.ipynb

ok I'll need to investigate this, I wasn't sure what functionality to test in the package, but I will test with this.

priamai commented 1 year ago

What does this do? check_func.get_local_relns()

Don't know what it does, I was just using it as an example to test that I could import the package and run a function from it

Yeah use my code to make sure you can at least open a database connection. We have to solve the reference to the schema paths, it should be automatically set to the corresponding folder in the package. Once that is fixed I can then progress into more deeper testing.

andrewgin commented 1 year ago

What does this do? check_func.get_local_relns()

Don't know what it does, I was just using it as an example to test that I could import the package and run a function from it

Yeah use my code to make sure you can at least open a database connection. We have to solve the reference to the schema paths, it should be automatically set to the corresponding folder in the package. Once that is fixed I can then progress into more deeper testing.

I have tested your code using

pip install -i https://test.pypi.org/simple/ stixorm==0.1.3a0

and it can clear the db. This isn't 'fixed'; I will need to read the code to see why we need to write within the package

dfjosullivan commented 1 year ago

There were changes need to get the pip package to work because of the referencing to schemas. I am merging this as the module names have changed. Any further changes can just be raised as additional PRs