-
Notifications
You must be signed in to change notification settings - Fork 4
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
Create a 1.0.0-rc package #1
Conversation
2c9c503
to
5bb6aec
Compare
a0ad436
to
fd1e7e3
Compare
amclient/defaults.py
Outdated
@@ -20,7 +22,7 @@ | |||
THIS_DIR = os.path.abspath(os.path.dirname(__file__)) | |||
|
|||
# Global for logfile if not set. | |||
AMCLIENT_LOG_FILE = os.path.join('/tmp/amclient.log') | |||
AMCLIENT_LOG_FILE = os.path.join("{}".format(mkdtemp()), 'amclient.log') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is format
used here? (rather than using the output of mkdtemp()
directly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot, I think this is just leftover from my testing the mkdtemp
mechanism.
requirements/base.txt
Outdated
@@ -0,0 +1,3 @@ | |||
requests<3.0 | |||
six | |||
urllib3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these be version-pinned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, have you suggested versions to pin them to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be inclined to go for latest versions (six==1.12.0
and urllib3==1.24.1
). These are what it installed for me and they appear to work in both python 2 and 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! I've added those, so if you're happy with the CR changes, I'll rebase, and then seek to merge these into the master branch and create a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been testing this out, it seems to work well.
Hi @helenst I've made most of those changes. I just have the version pinning to do, but I haven't really an instinct about it, so perhaps it is something we can react to if there is a problem in future? But let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me 👍
This commit brings all of the original assets of the automation tools' amclient (Archivematica API client) into a single pypi package. The first release is a drop-in replacement for that work in the modules and tools that already make use of it.
e955bf1
to
c032974
Compare
A package can be downloaded using
pip install amclient
it can then be invoked from the command line:$ amclient
or imported as a Python module, recommended is to import:from amclient import AMClient
which will bring into your code the AMClient class to mimic its usage in the automation-tools or amauat.There are some final steps to push this over the line, including code review of the work here. I should draw the reader's attention to minor changes to the
amclient
modules to function as a package. Additional contributions in this PR are all towards the goal of packaging and makingamclient
easier to import for users.Checklist here: archivematica/Issues#543
The package release-candidate is here: https://pypi.org/project/amclient/
Notes
amauat
and currently it does seem to function as a direct replacement for the submodule/relative imports used in both those utilities.Connects to archivematica/Issues#467
Connects to archivematica/Issues#477
Connects to artefactual/automation-tools#73